The incident happened around 7pm last night yesterday in Ferry Road Place.
The 12-year-old was walking in the area when the group approached and attacked him.
As a result of the assault, the victim suffered injuries to his face and torso and was taken to the ERI before being discharged.
Officers are now urging anyone who can assist with their enquiries to come forward.
The suspects are described only as being male, white and wearing hooded tops.
Safer Neighbourhood Team Sergeant David Happs said: “This was an unprovoked assault on a young boy and a terrifying experience for him.
“Fortunately he was able to flee his attackers and sought assistance at a nearby shop.
“We are conducting various lines of local enquiries to identify those responsible and will have a high-visibility police presence in the area to offer reassurance to the local community.
“Anyone who may have seen or heard anything suspicious in the area on Monday evening is asked to contact police immediately.”
Those with information can contact Lothian and Borders Police on 0131 311 3131