Ants may use their refined sense of smell to tell each other apart. (Andrew Davis/John Innes Centre/Reuters)

See one ant and you've seen them all, right? They do sure look a lot alike, which makes you wonder how it is that ants can detect intruders in their colonies.

Scientists have long suspected that ant body odor is used as pheromones to organize their castes in a colony. Now, researchers at the University of California at Riverside have used hyper-sensitive technological instruments to measure just how ants use their powerful sense of smell to distinguish incredibly similar chemical compounds on other ants' bodies. They published their findings Thursday in the journal Cell Reports.

[These ‘silver’ ants use special hairs to survive the harshest desert heat]

"It's always been a curiosity as to how ants and other social insects can live together in these massive colonies with very specialized tasks," lead author and neuroscientist Anandasankar Ray said. "The answer is that they can communicate very well, as any society would require. While we use language to communicate, ants use the language of chemistry."

Florida carpenter ants castes, major workers and minor workers, taking care of the brood. (Juergen Leibig)
Florida carpenter ants castes, major workers and minor workers, taking care of the brood. (Juergen Leibig)

Ants' body odor exists on their outer shells as hydrocarbon chemicals, which are these long-chain compounds. Each caste in an ant colony has a slightly different body odor, which helps ants know who are the workers and who is the queen. And workers from one colony also smell slightly different from workers in another colony.

[Fungus turns ‘zombie ants’ into booby traps]

"Even though the smell is relatively close to each other, [ants] still have a nuanced perception of detection," Ray said. "They are able to immediately tell, 'This one is an outsider.' This leads to a lot of aggressive behavior," such as killing the "outsider."

Ray and the other researchers measured the electrical activity exhibited by single hairs from worker ants' antennae when reacting to hydrocarbon chemicals. They did this using an electrophysiology method, sort of like an EKG for chemicals. Then, they trained ants to associate certain hydrocarbon chemicals with sugar water, and discovered that the ants were able to distinguish one chemical from another.

Also, the ants don't just smell one or two of these hydrocarbons, like most non-social insects do.

"These guys can smell almost any hydrocarbon we offered to them," Ray said. "Along with it, we also discovered not only did they have a very extensive olfactory system, they are also able to distinguish very well between very closely related [compounds]. They are able to tell the difference between a hydrocarbon with 25 carbon atoms versus 24 atoms."

[Watch trap-jaw ants use their mandibles like springboards to jump from danger]

That's a very refined palate; these ants are basically the sommeliers of scents in the insect world, able to distinguish a 2009 chardonnay from a 2014. The ant used in this research, Camponotus floridanus, "has more olfactory receptor proteins in their genome than we humans have," Ray said.

Given ants' super sense of smell, it'd probably be a nightmare for ants to be also stinky. Imagine being crammed inside of an elevator with 100 people (which, sure, probably violates some sort of elevator code). What if each of those individuals was doused in Axe body spray? Sensory overload!

Instead, ant body odor is much more subtle. Because these "scents" are large molecules, they don't evaporate easily into the air. Ants have to get up close and personal to each other to smell the few molecules that have made it to the vapor state.

But that's all it takes. Ants don't need to wear the ant equivalent of Axe to know who is friend or foe. Thank goodness.

Read More:

Why you shouldn’t buy products with ‘pheromones’ in them

Fruit flies can apparently tell time

A weakening sense of smell could mean death is near

These parasitic wasps turn spiders into web-building zombies

City ants are garbage eating, rat-fighting machines