Ed Yong in Not Exactly Rocket Science:
Some insects, such as ants, lead famously social lives, with massive colonies of individuals, cooperating for a common good. These insects also tend to have unusually large brains. For over 150 years, this link has been tacitly taken as support for the idea that social animals need extra smarts to keep track of all their many relationships. But Sarah Farris from West Virginia University and Susanne Schulmeister from the American Museum of Natural History aren’t convinced.
After comparing a wide range of species, they think that the large brains of these insect collectives have little to do with their cooperative societies. Instead, their enlarged brains may have been driven by a far grislier habit: body-snatching.
The link between brain and group size was first documented by a French biologist called Felix Dujardin. He is credited for discovering mushroom bodies, a pair of structures in insect brains that control a variety of higher mental abilities: learning, memory, processing smell, attention and more. They are the insect equivalent of our own cerebral cortex, which also governs our most vaunted mental skills. Indeed, both the mushroom bodies and the cerebral cortex may have evolved from the same ancestral structure.
More here.