What do a fruit fly and a search engine have in common? This isn’t some weird joke, but a serious line of inquiry by scientists at the Salk Institute and UC San Diego. Search engine algorithms go through great pains to match items you’ve clicked on or purchased, songs you’ve listened to, or things searched for, to similar ones. As a result, we constantly need ever faster and more efficient search engines, and so computer scientists must work tirelessly to keep up. They have to constantly tackle what they call “a fundamental machine learning problem: approximate similarity (or nearest-neighbors) search.” 

Turns out, fruit fly brains go through a similar matching process, and the way they do it is fast, efficient, and dare I say, elegant. It occurs in the fly’s olfactory circuit and is what could be called a neural algorithm. It operates as a variation of what is known as locality-sensitive hashing (LSH). Hashes are a kind of shorthand used to quicken searches by limiting the amount of information known about each item.

Instead of having a number of different kinds of cats let’s say, bunched together, where it’s hard to pick out a specific breed, you put them all in the cat hash or container. Now you’ve got one bin essentially that holds all the cats. So when the algorithm is asked to search for a Siamese, instead of searching through all information available, which would be timely and cumbersome, it goes directly to the cat hash and pulls out the fussy fur ball.

Nature performs a search differently. The fruit fly’s olfactory circuit works by ascribing neural operating patterns to items which have a similar smell. Though we’ve known how these circuits work for some time, this is among one of the first studies to show a direct correlation between neural circuits and how algorithms process information. It’s also the very first to outline how such a process could be used to speed up and innovate search engines for future computers.

When a fly identifies a new smell, it can quickly tailor its behavior, depending on experiences with a similar odor in the past. The innovation here is that a fruit fly’s brain uses a non-traditional approach, a three computational process, which is more efficient than that used by computers today.

Search engine databank. Modeling a search engine’s algorithm after a fruit fly’s olfactory neural circuit may someday help make a search faster and more efficient. Credit: Getty Images.

In their paper in the journal Science, researchers wrote, “This perception helps illuminate the logic supporting an important sensory function and provides a conceptually new algorithm for solving a fundamental computational problem.” Saket Navlakha was the lead author of the study. He’s an assistant professor in Salk's Integrative Biology Laboratory. His work has mainly focused on algorithms present in nature. These in turn illustrate how organisms process information.

Navlakha told Science Daily, "In the natural world, you're not going to encounter exactly the same odor every time; there's going to be some noise and fluctuation. But if you smell something that you've previously associated with a behavior, you need to be able to identify that similarity and recall that behavior."

Each item a fruit fly encounters creates a “tag” somewhere in its olfactory circuit. This is a group of specific neurons assigned to recognize that particular smell. When the odor is present, the neurons in the tag fire. This tag allows the fly to learn how to respond properly when it encounters a certain odor.

Researchers perused the literature concerning these odor tags. 50 neurons are responsible for the olfactory circuit, and they fire in different combinations, each pattern unique to a particular smell. Rather than taking that information (or odor) and reducing it into a number of different categories, as a computer would, flies actually expand out.

From odor, a fruit fly can tell very quickly whether it should approach something or fly away. Credit: Pixababy.

The fly’s brain takes the 50 neurons in the olfactory circuit and use their connections to include another 2,000. By spreading the data more widely, each smell becomes as distinct as a fingerprint. The fruit fly’s brain from those 2,000 neurons, stores only about 5% of the top activity as a hash or tag. By reducing the dimension, the fly’s brain is better able to notice the subtleties between items.

Navlakha explained it like this,

Say you have a bunch of people clustered by their relationships, and they're bunched into a crowded room. Then take the same people and relationships, but have them spread out on a football field. It will be much easier to see the structure of relationships and draw boundaries between groups in the expanded space relative to the crowded space.

When Navlakha and colleagues took the process a fruit fly’s brain uses and applied it to three standard datasets, which are used to test algorithms for search engines, it boosted speed and efficiency significantly. "Pieces of this approach had been used in the past by computer scientists, but evolution put it together in a very unique way," Navlakha said.

Biomimicry is a new field which notices mechanisms in nature and tries to use them to create better computers and machines. One of its goals is to better understand the human brain and in doing so, improve A.I., allowing it to operate in a more natural and effective manner. This study gets us one step closer to that goal. So when you use a search engine in the future, it may be modeled after a fruit fly’s brain and someday even your own.

To learn more about this study, click here: