This from New Scientist about bees:
Many bees have a brain cell density greater than that of small birds – but most ant brains contain a far lower density of neurons. The difference may be down to the insects’ lifestyles: because bees fly, they may need more brain cells than ants do in order to process visual information […]
However, the difference in the insects’ brain cell counts probably has little to do with intelligence, says team member Wulfila Gronenberg, also at the University of Arizona. The researchers think flying insects probably need more neurons to power the enhanced vision they need for flight, an idea that they will test in future.
See also: stingless bees, murder hornets, and the 13 birds of Christmas
(via New Scientist)