22.9 C
London
Thursday, September 3, 2026
Home Biology Just like a fruit fly, a new algorithm never forgets old scents
just-like-a-fruit-fly,-a-new-algorithm-never-forgets-old-scents
Just like a fruit fly, a new algorithm never forgets old scents

Just like a fruit fly, a new algorithm never forgets old scents

3
0

Fruit flies aren’t exactly famous for their brainpower; you’ve probably drowned more than one in a wine glass left too long on the patio table. And yet, working with roughly 140,000 neurons—a brain smaller than a poppy seed—Drosophila can sort through a huge range of smells in a fraction of a second, and then retain the memory of that scent for a long time.

In this, they do much better than current “electronic noses.” Even the most advanced ones on the market tend to be expensive, painfully narrow in what they can detect, and quick to forget an odor the moment they learn a new one.

So why not just copy the fly? That’s the question a growing number of researchers have been asking—including Kevin Max and Yang Shen at the Okinawa Institute of Science and Technology, whose new algorithm, Spi-Fly, is described in a paper just published in the journal Neuromorphic Computing and Engineering.

A rather obscure sense

Smell is a strange sense, mechanically speaking.

Vision and hearing both reduce to a single physical dimension you can plot on a graph—wavelength—which makes them relatively tidy to study. Odor molecules, by contrast, can’t be reduced to any single physical dimension. Biology had to find a messier solution instead: hundreds of different receptor proteins, each shaped to grab onto specific molecular features, firing in combinations that the brain then has to decode. It’s a system so combinatorially complex that it took until 1991 for Linda Buck and Richard Axel to even identify the receptor gene family behind it, work that won them a Nobel Prize in 2004.

Despite the difficulties in our understanding of smell, “electronic noses” exist on the market. Companies like Alpha MOS, Aryballe, and Odotech sell them for food-quality control, environmental monitoring, and security screening.

What these noses are bad at is generalizing. A device with software that is tuned to sniff out spoiled olive oil isn’t the same as a device that flags a specific explosive at an airport checkpoint. Retooling one for a new task usually means retraining its software almost from scratch.

Two technical bottlenecks sit behind that limitation. First, these systems typically need a mountain of hand-labeled examples before they can reliably tell one smell from another. Second, teaching them a new odor tends to scramble what they already knew, a problem researchers call “catastrophic forgetting”—the electronic equivalent of forgetting how to ride a bike right after learning to swim.

Odor barcodes

Fruit flies—and plenty of other insects—don’t have this problem, despite their minuscule brains. How do they tell odors apart and remember them with so little brainpower to work with? The secret, according to the paper’s authors, is something called sparse coding.

Think of it as the fly’s brain assigning a barcode to every smell. Its olfactory system relies on roughly 2,000 specialized cells, called Kenyon cells, that receive sparse, randomly wired signals passed on from the fly’s odor receptors. Those Kenyon cells all report to a single relay point: the anterior paired lateral neuron, or APL (actually a symmetrical pair of them, one per brain hemisphere). The APLs respond by firing strong, global inhibition back at every Kenyon cell at once, silencing nearly all of them. The cells that remain active after that crackdown are what Max and Shen call the barcode for that particular odor.

Spi-Fly picks up the story only after a sensor has already done its job—everything here happens in simulation, using pre-recorded sensor data, and the algorithm itself has nothing to do with capturing the smell in the first place.

In Max and Shen’s work, sensor readings become a stream of spikes, projected sparsely and randomly onto a hidden layer that stands in for the Kenyon cells, with neurons inhibiting each other instead of relying on a single APL-like referee. From there, the hidden layer connects to an output layer, one neuron per labeled odor, waiting to learn which barcode belongs to which smell.

A simple rule

What actually gets learned is the connection between a barcode and its label, following a simple, decades-old neural network rule: Every time a hidden neuron fires alongside the correct answer, that link gets a little stronger.

Nothing more. There’s no need for backpropagation, the technique co-invented by 2024 physics Nobel laureate Geoffrey Hinton that trains most modern neural networks by working backward through every layer to calculate exactly who’s to blame for a mistake.

In their tests, the simplified system works. On a set of odors picked up by common gas sensors, Spi-Fly peaks after just three exposures to each one, while backpropagation needs roughly 70 to get there.

Feed the network new odors a couple at a time—a stress test for catastrophic forgetting—and Spi-Fly barely blinks, holding onto old smells with almost no accuracy loss, while backpropagation crashes down into near random-guessing territory.

There’s another practical hurdle: memory. The whole point of designing a network this simple is to eventually run it on neuromorphic chips—a fast-developing technology that builds hardware that mimics the brain directly by processing spikes instead of running conventional software. Those chips typically don’t have much memory to work with. Any algorithm running on one has to make do with a fraction of what a regular computer takes for granted. Spi-Fly degrades far less than backpropagation does under those constraints.

There’s a ceiling, though, as Max himself admits. “If the sparse code layer contains 100 neurons, and each odor is represented by 5 neurons, the theoretical upper limit of odor capacity is ‘100, choose 5,’” he explained in an email—roughly 75 million possible “barcodes.” But real-world noise erases nearly all of that headroom. “The same odor is almost never represented by the same sparse code in two exposures, due to noise, airflow conditions, etc.,” Max wrote. “Given the parameters of our model, it should be able to represent a couple hundred odors, but it also depends on what type of odors, and the similarities between them.”

Same story with the tests themselves: Every one of them, like the rest of the study, ran entirely in simulation, using single, isolated odors—nothing like the tangle of competing smells a device would meet in an actual kitchen, forest, or airport terminal. There’s no guarantee Spi-Fly would hold up once real molecules start interfering with each other outside a computer.

A disputed comparison

Then there’s EPL net, which the paper singles out as its closest competitor. It manages middling results on the gas sensor dataset, but performs poorly on the synthetic Drosophila data. Max attributes that gap to, among other reasons, timing: EPL net samples odors in discrete snapshots, mimicking how animals actually sniff, while Spi-Fly reads a continuous stream, discarding nothing.

Thomas Cleland, a Cornell psychology professor who co-designed EPL net, disputes the comparison itself. In his account, EPL net and Spi-Fly were never built to solve the same problem. EPL net is meant to filter out sudden, unpredictable background odors, the smell equivalent of a stranger’s cigarette smoke drifting into the room, for example. It does so by using one-shot learning rules and wasn’t designed to learn the gradual, repeatable variation Spi-Fly is trained on. “EPL and Spi-Fly are based on different layers of the olfactory system and are built for different noise models,” he writes in an email. He’s blunt about the upshot: In his view, the comparison doesn’t tell you much of anything.

Spi-Fly exists purely as code, tested against prerecorded datasets rather than an actual whiff of anything. The next step is folding it into the odor-sensing hardware Max and his collaborators are building at TU Eindhoven and Kiel University—real, physical neuromorphic chips, manufactured with all the tiny inconsistencies that come from actually being built rather than simulated.

Max does not put a date on it, only promising that there’s more to come soon. For now, though, the fly you watched drown in your wine glass still wins.

Neuromorphic Computing and Engineering, 2026. DOI: 10.1088/2634-4386/ae9177

Federica Sgorbissa is a science journalist; she writes about neuroscience and cognitive science for Italian and international outlets.