From what I understand, the current thinking is that the ratio of brain mass to overall body size is much more predictive of intelligence than brain mass by itself. And there are odd cases too in humans like an individual with a severe case of hydrocephaly, with 95% percent of his cranial cavity filled with fluid pushing his brain matter to the sides of his skull, and this individual exhibited very high intelligence and majored in mathematics. There is a lot not known about the brain and animal intelligence, and I would not be surprised if we continue to find out amazing things about ants. I recommend an older book called "Ants at Work" by Deborah Gordon to get an idea of the complexity of ant behavior.