The secure custody officer was attacked at Oakhill Secure Training Centre in Milton Keynes on Wednesday night.
Two boys aged 16, one aged 15 and two aged 14, have been arrested on suspicion of assault, and are in custody, say Thames Valley Police.
The victim is in a critical but stable condition in hospital, and the centre says they are supporting his family.
Sue Tydeman, director for Oakhill, said colleagues had gone to the secure custody officer's "immediate aid".
She said: "Our team show tremendous courage and bravery while doing a difficult job in challenging circumstances.
"They should expect to be able to return home safely at the end of their shift and we will always work with police to push for the strongest possible sanctions in court for people who undermine the safety of our centre."
Oakhill is operated by security firm G4S and opened in August 2004. It was designed to accommodate a total of 80 young people, both boys and girls.
A 21-year-old custody officer is in a critical condition after an assault by five boys at a youth offender unit.