The incident happened on Friday November 3, around 9.30pm, opposite the Prestongrange Museum on the B1348.
Three males approached him from a nearby wooded area before launching into the attack.
The boy suffered a serious facial injury and was taken to Edinburgh Royal Infirmary before being released following treatment.
Officers are appealing for witnesses and are eager to trace three male suspects, who are aged between 16 and 20.
They were all around 5ft 8in tall and wearing dark hooded tops pulled over their faces. One of them was wearing a snood and all spoke with a local accent.
Police are investigating.