This is a 2D top-down map of the same circuit as the 3D version: the fruit fly's mushroom body, the insect brain's associative-memory centre. ~150 projection neurons carrying odor information from the antennal lobe fan out onto ~1500 Kenyon cells (KCs) through random, sparse wiring. Each KC only fires if enough of its random inputs are simultaneously active, so any single odor drives just ~5% of KCs — a sparse, near-orthogonal "combinatorial code" that keeps different odors' representations from overlapping:
KC fires if Σ(random PN inputs) > threshold
sparsity ≈ 5% of ~1500 Kenyon cells per odor
Every KC synapses onto two mushroom-body output neurons (MBONs): one driving approach behaviour, one driving avoidance, both starting at equal baseline weight w=1. Dopaminergic neurons (DANs) signal reinforcement by depressing the KC→MBON synapses of whichever KCs just fired — but only in the compartment matching the reinforcement:
reward paired with odor: w_avoid[i] -= η for active KCs i
punishment paired with odor: w_approach[i] -= η for active KCs i
valence(odor) = mean(w_approach) − mean(w_avoid) over that odor's active KCs
Because each odor recruits a largely different set of Kenyon cells (verified numerically: pairwise overlap between the five fixed odor ensembles here is only 1–7 cells out of ~70–80 active each), depressing synapses for one odor's ensemble barely touches another odor's weights — this is exactly how the real circuit learns odor-specific associations without one experience overwriting memories of other smells. A positive valence pulls behaviour toward approach; a negative one toward avoidance, shown both by the white marker sliding along the bar and by the glowing "fly" dot drifting toward the brighter MBON node on the map.
- Odor buttons — switch which pre-wired sparse Kenyon-cell ensemble is "presented"; active cells light up cyan on the map.
- Pair Reward / Pair Punish — fire a simulated dopamine pulse, depressing the matching synapse type for the currently active KCs only.
- Learning rate η — how much a single pairing depresses the targeted synapses.
- Reset All Synapses — restores every KC→MBON weight to the naive baseline (w=1).
- Pan / zoom — drag to move around the Kenyon-cell field, scroll or pinch to zoom in on individual cells.
Real-world relevance: this depression-based, dopamine-gated plasticity rule — reconstructed from Drosophila mushroom-body connectomics and functional imaging — is the textbook mechanism for insect olfactory learning, and is the same mushroom-body circuit studied for classical conditioning, memory consolidation, and forgetting in neuroscience labs worldwide.