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.

Guide for your group presentation

Before class: prepare the finale

  1. Download the offline demo (this file) and test it on the presentation computer. It includes the experiment, prepared results, this guide and the case-study page. Calculations require no GPU or internet connection.
  2. Choose Start again, then Load prepared session. Leave six rounds and both mechanisms enabled. With lesson mode on, the calculated outcomes stay hidden until you choose Show model results.
  3. Keep that tab ready while presenting the readings. If browser storage is restricted, keep it open or reload the prepared session at the end.
  4. The prepared results come from exactly the same model code as a live calculation. You can also compute live at the end: the simplified model is fast. There is no need to imply that it has been training throughout the talk.

Main presentation: Buckner on what memory contributes

Chapter 4, §4.4, pp. 160–168; Figure 4.2, p. 167: explain the computational division of labor between fast-learning medial-temporal and slower-learning cortical systems. Repeated, interleaved learning helps integrate new experience with existing knowledge and limit catastrophic interference.

§4.6: distinguish replaying stored experience to improve learning from consulting remembered events in episodic control. §4.8, pp. 188–189: emphasize how components with different architectures can compensate for one another’s limitations. The organizing question is what memory adds to the capacities of the whole system.

Main presentation: Boyle & Blomkvist on what models establish

§§2–3: distinguish event-memory mechanisms in AI from the richer concept of biological episodic memory. Explain why success on a benchmark does not isolate the causal contribution of memory: other architectural differences may matter.

§3.6: introduce ablations and fine-grained cross-system comparisons. §4 and Box 1: distinguish how-possibly explanations, which identify candidate mechanisms worth investigating, from how-actually explanations, which need justified correspondence to the target in relevant respects. Relevant resemblance depends on the explanatory question.

These locators use the supplied accepted manuscript: §3.6 is on printed pp. 11–12; §4 on pp. 13–15; Box 1 on p. 15. Its repository cover sheet makes the PDF page numbers one higher.

Transition: why finish with a fly?

We have discussed what memory contributes to artificial agents, and when those agents might explain biological memory. To finish, let us look at a case where researchers can constrain a model using an actual brain’s wiring and activity, then test its predictions against further biological experiments.

Open How the model was made. Give the short route: preserved tissue → microscopy → reconstructed wiring; then combine that anatomy with live-neuron recordings and explicit learning rules. It is a model built from evidence, not a scanned brain brought to life.

Keep the scope precise: this example models selected fruit-fly mushroom-body circuits. We are not demonstrating a whole-brain simulation, human episodic memory or consciousness. Its value here is as a case of mechanistic modeling and empirical testing.

Closing demonstration: about 3–5 minutes

  1. Orient the audience. In the experiment overview, point from the fly to the mushroom body, the three modules, and the α3 output. Explain the task in one sentence: “Odor A predicts punishment; odor B does not.”
  2. Ask a quick prediction. All three schedules receive six rounds; only the pauses differ: one, six or fifteen minutes. Ask which will leave the strongest 24-hour trace. These are simulated durations.
  3. Reveal the model. Click Show model results. Read the graph as the α3 response to A minus the response to B. A more negative value means a lower response to the trained odor relative to B. It is a neural measurement, not an avoidance percentage.
  4. Reveal the evidence. Click Reveal measurements from real flies. The orange points are published measurements from Huang and colleagues. Explain that the pattern was predicted and experimentally tested in their study; our class is revisiting that comparison.
  5. Make one intervention. If the mechanism needs explaining, use the three stages in the memory walkthrough: γ1 reduces its brake on learning in α3; later, the α3 trace can persist after the γ1 trace fades. The illustration describes the intact circuit, independently of the experiment controls. Then disable feedback. The altered result shows the contribution of those connections within this model. The biological overlay disappears because the app does not provide matching data for this intervention. Ask what biological experiment could test the altered prediction.

If time is short, use the prepared session and show just the intact model and measurements. The purpose is to illustrate the explanatory method, not to survey every control or teach the full neuroscience model.

Close with the methodological point

Detailed biological measurements now let us build and test models of specific brain circuits. A simulation makes a possible mechanism explicit and manipulable. Evidence linking it to the real circuit helps determine whether it explains how that circuit actually works. The same demand for relevant correspondence matters when we use artificial agents to reason about human memory.

This is our synthesis of the readings and the fly study. The fly model’s interacting modules offer a useful comparison with Buckner, but they do not implement hippocampal replay, abstraction learning or a catastrophic-forgetting task. Greater biological detail alone does not settle which explanation is correct.

A final question for the class

Which evidence would turn a convincing demonstration of a possible mechanism into a well-supported explanation of the actual organism?

Possible answers include more discriminating predictions, matched interventions in the model and animal, comparisons with rival models, and explicit checks that the modeled details matter to the specific claim.

Sources

Cameron J. Buckner, From Deep Learning to Rational Machines, Chapter 4, “Memory”, pp. 142–189. Chapter.

Alexandria Boyle & Andrea Blomkvist (2024), “Elements of episodic memory: insights from artificial agents”. Article. The reading locators refer to the supplied accepted manuscript.

Cheng Huang, Junjie Luo et al. (2024), “Dopamine-mediated interactions between short- and long-term memory dynamics”, Nature 634, 1141–1149. Article and Figure 5. See the case-study page for the connectome and imaging sources. Supplied course PDFs are not included in the demo.

Case study: from brain scans to an explanation of memory

CLOSING CASE STUDY / AFTER THE TWO READINGS

A wiring map becomes
a testable account of memory.

The microscope reveals structure. Experiments constrain function. A model makes a proposed mechanism precise enough to test.

01 / WHERE THE WIRING COMES FROM

A physical brain, reconstructed layer by layer

This model uses Janelia hemibrain v1.2.1, a partial adult fly brain map containing relevant mushroom-body circuitry. It does not use the later FlyWire full-brain map. The hemibrain was produced by Janelia's FlyEM team with Google Research and other partners. [1] [3]

1

Preserve the tissue

A dissected brain is fixed, stained and embedded. This is a destructive study of preserved tissue.

Physical specimen
2

Image, mill, repeat

FIB-SEM images a surface, removes a tiny layer with an ion beam, then images again. Aligned images form a 3D volume.

Nanometre-scale images
3

Trace & check

Machine learning helps trace neurons and identify synapses. Human proofreaders correct reconstruction errors.

Identified cells and contacts
4

Build the connectome

Record which neurons connect and where their synapses lie. This maps anatomical contacts, not learning rules or complete dynamics.

Evidence about structure

Original conceptual diagrams, not microscope images. Imaging: [2]; reconstruction and dataset: [1].

02 / STRUCTURE IS ONE INPUT TO THE MODEL

The learning mechanism is constructed and tested

MEASURED ANATOMY

Which connections exist?

Selected hemibrain connections constrain the three-module circuit.

SEPARATE LIVE-FLY EXPERIMENTS

How do neurons respond?

Voltage imaging supplies spike-rate data for fitting model parameters.

MODELING CHOICES

What rules govern change?

Equations specify activity, plasticity, adaptation and memory decay.

WORKING HYPOTHESIS

Three interacting memory modules

γ1α2α3

Odor and punishment inputs change connections. The circuit then responds differently to the odors.

A simulation of a proposed mechanism, not a brain scan “switched on.”

The researchers omitted connections with fewer than five synapses and fitted retained strengths to recordings; synapse counts were not copied directly as functional weights. They simplified the dynamics into event-based recurrence equations. Flylab implements that published simplified model. [3] [4]

FitUse initial recordings to estimate parameters.
PredictCalculate outcomes for new experimental conditions.
TestCompare predictions with further live-fly measurements.

Huang et al. report prospective tests in Figure 5g–k. Our demo focuses on the spacing comparison in Figure 5h. Re-running it in class reproduces an existing test; it does not create new biological evidence. [3]

What remains simplified in our classroom version?

The live calculation uses one published best-fit parameter vector; the paper also reports an ensemble of 10,000 parameter sets. The available code and published table have a small response-cap discrepancy. We disclose both in the experiment's scientific notes. The feedback switch is an additional, exploratory model intervention, not an exact reconstruction of a named biological lesion. Numerical agreement with a reference implementation checks our software; it does not independently validate the biology.

03 / WHAT KIND OF EXPLANATION HAVE WE EARNED?

From “could work this way” to evidence about “does work this way”

Boyle and Blomkvist call this the distinction between how-possibly and how-actually explanations. Relevant similarity depends on the explanatory question. A model need not reproduce every biological detail, but success on a task alone does not establish that its mechanism is the organism's mechanism. [6, §4 and Box 1]

HOW-POSSIBLY

Could this mechanism produce the effect?

A running model shows how its components can jointly produce an outcome under stated assumptions. Even without established biological correspondence, this can identify a hypothesis worth investigating.

In Flylab: these equations can generate different lasting traces from differently spaced training.

HOW-ACTUALLY

Does the real system use this mechanism?

This requires evidence linking the model's relevant organization and operations to the target system. Anatomy, activity and discriminating experimental tests can support that inference.

In the fly study: the model is constrained by actual circuitry and recordings, and predictions are tested against further experiments.

Our assessment of this case

The study provides evidence toward a how-actually account of particular fly-memory dynamics. It does not uniquely establish every equation or turn every model intervention into a biological finding. This is our application of the philosophical distinction; Boyle and Blomkvist do not assess this fly study.

Evaluate the claim, not just whether the model looks realistic
EvidenceWhat it supportsWhat it leaves open
Mapped connectionsAn anatomically constrained circuit hypothesis.How strong connections are and how they change.
Fit to neural recordingsCompatibility with measured activity.Whether other parameter sets or mechanisms also fit.
Tests of new predictionsEvidence beyond reproducing the fitting data.Whether a rival model predicts the same result.
Feedback disabled in our demoA causal contribution within this model.Whether a matched biological intervention has the predicted effect.
Similar memory themes in humans and fliesA useful question for comparative investigation.Shared algorithms, episodic experience or human explanatory scope.

This table is a classroom analysis, not a classification supplied by the neuroscience authors. There is no automatic “proof” threshold: assess which claim each test bears on.

04 / TWO READINGS, TWO COMPLEMENTARY QUESTIONS

What does memory contribute—and when does a model explain it?

CAMERON J. BUCKNER · CHAPTER 4

Why interacting memory systems matter

In §4.4, fast-learning medial-temporal and slower-learning cortical systems divide computational work. Repeated, interleaved learning helps integrate experience, develop abstractions and reduce catastrophic interference. Figure 4.2 (p. 167) summarizes this account; §4.6 discusses replay and episodic control. [5]

Rapid storageReplay & interleavingGradual integration

Our bridge: the fly case makes interactions among memory modules concrete and experimentally tractable. Different memory dynamics and their coupling matter to the outcome.

BOYLE & BLOMKVIST · 2024

Which similarities license an inference?

The authors distinguish AI “event memory” from richer biological episodic memory. They recommend isolating a memory component's contribution through ablations and examining fine-grained similarities, differences and limitations across systems. A benchmark advantage by itself may have several causes. [6, §§2.3, 3.6–4]

Candidate mechanismRelevant comparisonsQualified inference

Our bridge: the feedback switch isolates a contribution in the model. Comparing its consequences with suitable fly experiments would address whether that contribution transfers to the target.

The boundary of the analogy: Flylab models odor conditioning, not episodic recollection. Its modules are not a hippocampus and neocortex; it implements no replay buffer, mental time travel, abstraction task or test of catastrophic forgetting. The shared lesson is methodological: study what interacting components contribute, then justify the transfer from model to organism.

A comparison from the attached article

In §4, Boyle and Blomkvist discuss Zeng et al.'s comparison of episodic control, replay and an agent without event memory. Different mechanisms yield different learning profiles. This helps identify possible roles for memory and promising experiments; it does not show that biological brains run those exact algorithms. Our fly example has more direct constraints at the circuit level, but that does not make it a model of human episodic memory. The relevant target and question differ.

USE IT IN YOUR PRESENTATION

One intervention. Two questions.

Within the modelWhat changes when feedback is removed, with the other parameters held fixed?

About the flyWhich corresponding intervention and measurements would distinguish this explanation from a rival?

After the readings, use this as a brief worked example rather than a second main topic. Ask what would count against the proposed mechanism. A successful model should help design tests that could expose its limits.

The readings ask when artificial systems can tell us something about biological memory. Here we can see the research process in concrete form: measured circuitry constrains a model, the model generates predictions, and new experiments test them. The simulation makes a possible mechanism explicit; the biological evidence determines how far it explains the actual system.
Return to the experiment and try the feedback switch →

SOURCES & READING LOCATORS

Follow the evidence

  1. Scheffer et al. (2020). A connectome and analysis of the adult Drosophila central brain. See also Janelia's hemibrain project and Google's reconstruction overview.
  2. Janelia Research Campus. FIB-SEM technology and hot-knife sectioning and volume stitching.
  3. Huang, Luo et al. (2024). Dopamine-mediated interactions between short- and long-term memory dynamics. Nature 634, 1141–1149. Methods: Computational model; Figure 5a, g–k. Connectome version, fitting and approximation details are specified in the methods.
  4. Luo, Huang & Schnitzer. Published model code, pinned version used by Flylab. See the demo's scientific notes for translation checks and discrepancies.
  5. Cameron J. Buckner. From Deep Learning to Rational Machines, Chapter 4: Memory. §4.4, pp. 160–168; Figure 4.2, p. 167; §4.6; §4.8, pp. 188–189. Locators refer to printed book pages in the supplied chapter.
  6. Alexandria Boyle & Andrea Blomkvist (2024). Elements of episodic memory: insights from artificial agents. Philosophical Transactions B 379, 20230416. Supplied accepted manuscript: §3.6, pp. 11–12 (PDF pages 12–13); §4, pp. 13–15 (PDF pages 14–16); Box 1, p. 15 (PDF page 16). Pagination may differ in the published version. Accepted manuscript record.

Connections between the readings and the fly study are our teaching interpretation. Original diagrams and paraphrases were created for this page. The supplied PDFs are not redistributed.