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.
“It is hard for me [to say] exactly the percentage of reduction of the brain, since we did not use software to measure its volume. But visually, it is more than a 50 to 75 per cent reduction,” says Lionel Feuillet, a neurologist at the Mediterranean University in Marseille, France.
https://www.newscientist.com/article/dn12301-man-with-tiny-b...