The Fly That Never Forgets a Smell
A new algorithm copies the fruit fly's olfactory wiring to solve the problem that has plagued electronic noses for decades.
By The space-quantum Desk

A fruit fly has a brain smaller than a poppy seed and roughly 140,000 neurons—yet it can sort through a huge range of smells in a fraction of a second and hold onto the memory of that scent for a long time. [1] The most advanced commercial electronic noses cannot say the same. They are expensive, narrow in what they can detect, and quick to forget an odor the moment they learn a new one. [1]
Researchers Kevin Max and Yang Shen at the Okinawa Institute of Science and Technology have built an algorithm called Spi-Fly, described in a paper published in the journal Neuromorphic Computing and Engineering, that borrows the fly's olfactory wiring to close that gap. [1][2] The algorithm combines high-dimensional sparse coding with an associative memory mechanism, enabling rapid few-shot learning and stable class-incremental continual learning without backpropagation. [2]
Smell is a strange sense to engineer around. Vision and hearing both reduce to a single physical dimension you can plot on a graph—wavelength. Odor molecules, by contrast, can't be reduced to any single physical dimension, so biology had to find a messier solution: hundreds of different receptor proteins, each shaped to grab onto specific molecular features, firing in combinations that the brain then has to decode. [1] 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. [1]
Companies like Alpha MOS, Aryballe, and Odotech sell electronic noses for food-quality control, environmental monitoring, and security screening, but what these noses are bad at is generalizing. [1] Two technical bottlenecks explain it. 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. [1]
The fly sidesteps both problems through sparse coding. Its olfactory system relies on roughly 2,000 specialized cells, called Kenyon cells, that receive sparse, randomly wired signals from odor receptors. Those Kenyon cells all report to the anterior paired lateral neuron, or APL—actually a symmetrical pair of them, one per brain hemisphere—which fires 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. [1]
Spi-Fly replicates that architecture in software. Sensor readings become a stream of spikes, projected sparsely and randomly onto a hidden layer standing in for the Kenyon cells, with neurons inhibiting each other instead of relying on a single APL-like referee. [1] The learning rule is simple: every time a hidden neuron fires alongside the correct answer, the link between that neuron and the right label gets a little stronger. There is 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. [1]
The numbers from the lab tests are stark. 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. [1] The algorithm also degrades far less than backpropagation under the tight memory constraints of neuromorphic chips, hardware that processes spikes directly rather than running conventional software. [1]
There is something compelling about the direction this points: not more compute, not bigger models, but architecture borrowed from creatures that solved the same problem millions of years before anyone thought to call it machine learning.
The ceiling is real, though. Max is candid about it. "The same odor is almost never represented by the same sparse code in two exposures, due to noise, airflow conditions, etc.," he 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." [1] Every test in 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. [1]
The next step is folding Spi-Fly into real, physical neuromorphic chips that Max and his collaborators are building at TU Eindhoven and Kiel University—hardware manufactured with all the tiny inconsistencies that come from actually being built rather than simulated. [1] The paper's authors argue that insect-inspired sparse associative learning provides a hardware-ready pathway toward fast, continual, and energy-efficient neuromorphic olfactory intelligence. [2]
Max does not put a date on when the physical chips will be ready. For now, as the Ars Technica writeup drily noted, the fly you watched drown in your wine glass still wins. [1]
The same odor is almost never represented by the same sparse code in two exposures, due to noise, airflow conditions, etc.Kevin Max