FlylabPhilosophy of AI / Student Session 2 / Universiteit van AmsterdamModel & sources ↗

LEARNING · PREDICTION · EXPLANATION

What can a model tell us
about a learning brain?

Train a model of fly memory.
Change the spacing. Explore the mechanism.
Then compare with real flies.

THE EXPERIMENT AT A GLANCE

An odor association, stored as a change in a circuit.

Try the experiment ↓

01 / THE FLY

Zoom into its brain

Fruit fly with an enlarged view of its brainA top-view fly has its head circled. Dotted zoom lines lead to a schematic brain. The paired mushroom bodies are highlighted in teal. Brain · enlarged Mushroom bodies Fruit flyOdor learning & memory

The mushroom body is involved in learning associations between odors and outcomes.

02 / THE SELECTED CIRCUIT

Three compartments in focus

Selected compartments of one mushroom bodyA schematic of branching Kenyon-cell axons highlights gamma one on the gamma branch and alpha two and alpha three on the vertical alpha branch. Gray portions provide context. The positions are schematic, not an anatomical reconstruction. Odor input via Kenyon cells α3α2γ1 One side, simplified

The model represents γ1, α2 and α3. Measured wiring constrains its connections; neural recordings constrain its parameters.

03 / THE COMPUTATIONAL MODEL

Experience changes connections

Three interacting learning modules and the measured outputOdor inputs reach output neurons through changeable connections. Dopamine guides those changes. Selected inhibitory feedback runs from the gamma-one output to alpha-two and alpha-three dopamine units. The alpha-three output, MBON-alpha-three, is the response measured by the graph. Odor A or B → Kenyon-cell input γ1α2α3 DopamineDopamineDopamine OutputOutputOutput ★ ★ We read MBON-α3 An output neuron's response to each odor

Dopamine guides learning at odor-to-output connections (gold dots). Red lines show selected inhibitory feedback between modules.

Original teaching schematics, not anatomical reconstructions; locations and connections are simplified. Dashed gold lines indicate modulation of plasticity. Based on the Huang et al. (2024) model, constrained by Janelia hemibrain wiring. This demo does not simulate the entire fly or mushroom body.

From brain scans to explanation: explore the case study →

TRAIN / BUILD THE ASSOCIATION

A + punishment30 seconds→ pause →B alone30 seconds→ pause ↻

Repeat six rounds by default. Compare 1, 6 or 15 minutes at both pauses. Equal exposure; different spacing.

TEST / LOOK FOR A LASTING CHANGE

Present A and B without punishment.

Measure the α3 output before training, then 5 minutes and 24 hours after training. These are test times, separate from the training pauses. The computer accelerates model time.

WHAT DOES THE GRAPH MEASURE?

Response to A − response to B

We compare the same output neuron's odor-evoked firing rates, in spikes per second. A more negative value means a lower response to trained odor A relative to B.

The lasting response difference is our memory readout. It is not a score for fear, intelligence or observed avoidance.

Illustrative example · not an experiment result
Odor A10 spikes/s
Odor B25 spikes/s
10 − 25 = −15 spikes/s

“Suppressed” means this output fires less for A than for B. The odor is still detected; the whole brain is not switched off.

Which pause produces the strongest
memory trace after 24 hours?

Make a prediction; the measurements stay hidden until you reveal them.

From experience to a memory trace

Not trained yet
A → ?

A prediction we can test

Train the circuit and see how its response to odor A
differs from its response to odor B.

The outcome is a difference in neural activity, not an intelligence score.

A short-lived trace can help a lasting one form.

Follow the “brake” from γ1 to the learning signal in α3.

Illustration · intact circuit

γ1 gamma one

Short-lived trace

OUTPUT WHEN ODOR A IS PRESENTED

Stronger output

Its output inhibits dopamine neurons that guide learning in the α compartments.

Stronger brake ⊣ means inhibition
of the teaching signal

α3 alpha three

Longer-lasting trace
Dopamine teaching signal is constrained
No learned A–B difference yet

The circuit has not yet learned which odor accompanies punishment.

The brake acts on learning.

γ1 does not switch the whole α3 compartment off. Its inhibitory feedback helps regulate the dopamine signal that changes odor-to-output connections.

α2 alpha two

Another parallel learning unit

Also receives γ1 feedback. Its learning depends on the odor; the study found output plasticity for initially repulsive odors. For the α3 memory dynamics illustrated here, a reduced γ1 + α3 model gave similar results. α2 is not a middle storage stage.

Regulating learning, not transferring a memory.

γ1 changes when α3 can learn. A memory is not passed through γ1 → α2 → α3 like a parcel. This is the useful comparison with Buckner: ask what the interaction contributes, while keeping the mechanisms distinct.

Qualitative walkthrough of the intact circuit with learning enabled; independent of the controls above. Line thickness and spike marks are illustrative, not calculated values. Spacing also affects sensory adaptation, so the brake alone does not explain the optimal interval. Huang et al., Figures 4–5 ↗

Inspect the circuit for your experiment settings

An odor activates Kenyon cells. Dopamine signals guide changes in connections to output neurons. Feedback links the memory modules.

Return to the experiment and test the feedback switch ↑

BUCKNER · CHAPTER 4: MEMORY

What interacting
memory systems explain

In §4.4, Buckner discusses how fast- and slow-learning memory systems work together. Figure 4.2 (p. 167) connects their interaction to consolidation. Our question: what can the interaction between memory modules explain that a successful learning outcome alone cannot?

Fly circuits are not a hippocampus and neocortex. This demo contains no episodic replay, abstraction learning, or test of catastrophic forgetting. The analogy concerns investigating interacting memory systems.

Open the guide for your presentation ↗

FROM OUTCOME TO EXPLANATION

The difference lies
in a testable prediction.

1 / REPRODUCE

The model learns

This shows that the construction can produce a learning process. Its performance alone does not establish which biological mechanism is correct.

2 / INTERVENE

A change makes a difference

Disable feedback. Does the pattern change? This tells us what that component contributes within the model.

3 / TEST

The fly constrains the explanation

Compare with independent measurements. Agreement supports a mechanism; discrepancies limit the explanation. Extending it to the human mind requires further evidence.

Scientific basis, limitations & sources

What does the model calculate?

A browser translation of the published recurrent model by Huang, Luo and colleagues (2024), with three memory modules: γ1, α2 and α3. This is not a full MaleCNS or FlyWire simulation. We use the original best-fit parameters without refitting them to the validation measurements shown here. The model calculates neural activity and changing connections through successive odor, training and rest blocks.

Protocol and outcome

Default: six rounds of 30-second odor A presentations paired with punishment, followed by odor B without punishment. The chosen pause occurs between odor presentations, matching the inter-stimulus interval (ISI) in the source code. Measurement blocks use 5 seconds per odor. Rest before the first post-training measurement and subsequent timing follow the Figure 5h script. Punishment plasticity uses its fixed multiplier of 1.5. Odors retain the innate valences used there for ACV/EtA.

We show the response to A minus the response to B in MBON-α3, in spikes/s. More negative values indicate a lower response to A relative to B. Either odor response can change; B is not held constant. The model also includes sensory adaptation, so an immediate response difference can remain when plasticity is disabled. Animation compresses model time. Lesson mode calculates immediately and hides the outcome; it does not run hours of neural training during your presentation.

What do the switches do?

Feedback off: sets only MBON-γ1 → DAN-α2 and MBON-γ1 → DAN-α3 connections to zero, after odor-input initialization and before the first test. No parameters are refitted. This is our model intervention, not an exact reproduction of a specific biological lesion. Plasticity off: prevents all KC→MBON connection updates. Sensory adaptation remains active.

Which values are real measurements?

The orange points come from Source Data Fig. 5, Panel h, Huang et al. (2024): 14 flies per spacing condition. Large points show means; error bars show SEM (standard error of the mean); small points show individual flies. These data correspond to six rounds and an intact circuit. We therefore hide this overlay for other round counts or disabled connections. Modified settings are exploratory calculations.

Differences from the publication

The green bars use a single fixed best-fit parameter set. The published figure uses medians and 16–84% intervals from 10,000 parameter sets, available separately below the results. The available model code also caps the MBON-α3 response at 31.16 spikes/s, whereas some published table values saturate at −30.59. These differences remain visible; the demo does not claim exact reproduction of every published figure value.

The circuit structure, learning rule, decay constants and switch to longer-lasting decay after three hours are assumptions and empirically estimated elements of the model. A matching outcome does not establish a unique explanation. The software translation was checked against an independent NumPy implementation across eight protocols. The original MATLAB software was not executed during this validation. Data means and SEM were recomputed and checked against individual fly measurements.

The connection to Buckner

Chapter 4, Memory: §4.4 (pp. 160–168), especially Figure 4.2 on p. 167; §4.6 on experience replay; §4.8 as a synthesis. This is a teaching analogy between interacting memory systems. This model does not test episodic replay, human abstraction, consciousness, or catastrophic forgetting. It therefore does not directly confirm Buckner's theory or the complementary learning systems hypothesis.

Huang et al. (2024), study and Figure 5 ↗
Original model code, version used ↗
Original measurements, Source Data Fig. 5 ↗
Buckner, Chapter 4: Memory ↗

Model code: Junjie Luo, Cheng Huang and Mark J. Schnitzer, GPL-3.0-or-later; this adaptation uses the same license. Measurements: Huang et al., CC BY 4.0. Download source code and source data for technical documentation. Your session is stored only in this browser; the demo does not transmit session data.