In 2017 the fruit fly's olfactory circuit was found to compute a
locality-sensitive hash. The wiring looked random, so every
paper since has modelled it with a random matrix. We now have the real
wiring. Below, the measured connectome runs live against that assumption —
same input, same inhibition, only the synapses differ.
Antennal lobe → mushroom body calyxSignal: drifting blend
Input worldStatistics matched to each wiring's own structure
Both circuits are hashing the same signal. Similarity kept is the
fraction of the sparse code that survives a small perturbation of the
input — the property a locality-sensitive hash exists to provide.
What the measured wiring actually does
Each Kenyon cell samples about six projection neurons through dendritic
claws, and feedback inhibition leaves only the strongest 5 % firing.
Those survivors are the hash code. Swapping the real matrix for matched
null models isolates what each structural feature costs.
Retrieval quality — precision@16, five seeds
Fraction of each point's true 16 nearest neighbours recovered from the
sparse code alone. Every condition shares one fixed encoder into
projection-neuron space, so only the 130×1745 matrix varies.
The real connectome is ~20 % worse at generic
similarity search than the random matrix standing in for it. Nine years of
fly-inspired hashing has been crediting the fly with performance its own
wiring does not have.
Where the cost comes from
The nulls separate cleanly. Uneven projection-neuron out-degree is the
dominant penalty; the structured co-occurrence reported in 2022 costs
almost nothing; synaptic weighting costs nearly as much as degree. Strip
all three and you recover the idealised circuit exactly.
But it is specialised, not simply worse
Feeding the circuit input drawn from the world its own wiring implies
reverses the result completely. This is the switch wired into the console
above — flip between the two worlds and watch the winner change.
Rows are the input distribution, columns the matrix doing the hashing.
Each world is sampled with covariance equal to that wiring's
projection-neuron co-occurrence.
So the mushroom body is not a poor hash function. It is a hash function
tuned to one distribution, paying for that tuning everywhere else —
and the tuning lives almost entirely in the degree sequence rather than in
which specific glomeruli share a cell.