He hates the child? Or he's fascinated with them? There's a difference, I'm sure.
I'm a mother of a 4 yr old who is obsessed with babies. SO much so that last year, I absolutely dreaded being in the same room with anyone who had one. He seemed to instinctively know a baby was around, and immediately hone in on the stroller. He would try to touch, hold, squeeze, etc.. moms were generally pretty nice about it because they also had children in the same special needs school. But still. It was a nightmare for me! I would be on him reminding him not to touch, or that he had to ask permission to touch, etc.. Finally, I decided to make him a "social story" book on babies. I took a bunch of magazines and cut out pictures of babies in all various stages - sleeping, crying, with their mommies, eating, etc. I put it together in a book that said things like "babies sleep", "babies love
gentle hugs and kisses", etc. He could read this book whenever he wanted, and get excited over it.. and yet not physically be with one in order to learn about them. He still loves babies, but is not quite so preoccupied with them anymore, THANK GOODNESS!
I don't know if anything similar would work for the child in your class, but you have to make him realize- or have his parents make him realize- that other children (people) need space. We do not touch other people w/out their permission, etc.. You need to keep impressing this upon him (IMO) until he "gets it". I would definitely get the parents on board for this!

Good luck!
*I just wanted to add something. Are you sure it was an "attack"? Did the child look mad? Slap the kid, etc in a vicious way? My son gets a very odd look on his face when he's being affectionate. He is not affectionate in a typical way, a lot of the time. And he puts his hands on people's throats... it looks menacing to people who don't understand, but he's actually "hugging" their throats. Sounds crazy, but I know now that it's not a mean gesture. Some gestures are much more obvious, though. LOL