No result paragraph for this entry was found in the log.
EXPERIMENTS.md · lines 1330–1389E28 — The fly beats the baseline once dopamine reports a prediction error
Date 2026-09-12 · Question E27 left the circuit learning a quarter of what ridge
regression on the composition gets. Is the representation weak, or the rule that reads
it? · Provenance forager/mushroom.py, …/{fly_layers,apl_gain, fly_decompose,fly_learn2}.py
First, a self-inflicted fault. E27's "auto" input gain targeted the current arriving
at the Kenyon cells, which drove the projection neurons to 100% saturation: every
channel pinned at 1.0, so a 5% element and a 20% element arrived identical and the
composition was destroyed at the first layer. The gain now targets the projection
neurons' own operating range. Saturation 100% -> 4.9%, and the composition survives.
APL, measured. The inhibition is real and complete in the asset - 2 GABAergic cells,
every Kenyon cell both driving APL and receiving it back. Silencing it triples the
active fraction (5.5% -> 18.0% at normal intensity), matching the direction Lin et al.
(2014) report. It does not confer intensity invariance: sparsity still rises 44-fold
over a 16-fold intensity sweep, because a bounded inhibitor cannot keep pace with
growing drive. Irrelevant to this application, where compositions always sum to one, but
it means the sparsity here is set by a fitted threshold with APL assisting, not by
divisive normalisation. Recorded rather than claimed away.
The decomposition that settled it. Fit a linear readout to each population and ask
how much of the answer is present, which is the ceiling any rule on that pathway reaches:
The representation was never the problem. The sparse code carries substantially more
about the free energy than the composition does - the expansion into 4,064 cells at 6%
occupancy is doing real work. The plasticity rule was discarding two thirds of it.
The rule was wrong, and the anatomy says how. E27 taught from baseline - reward, a
running average of past outcomes. A dopaminergic neuron does not report the outcome; it
reports how far the outcome differed from what was expected. The expectation is
available exactly where it is needed: all 97 output neurons project onto the
dopaminergic cells, 2,589 measured edges. Teaching from that error instead, with both
terms standardised against their own running statistics:
0.853 against the composition baseline's 0.561, and a ceiling of 0.928. The circuit
now extracts 92% of what is in its own code, and beats the trivial baseline by half
again. The reward-baseline rule does not merely underperform - it diverges with more
training, which is the signature of a signal carrying no credit assignment.
Caveat. lr 3.0 collapses to -0.043: the rule is stable over roughly one order of
magnitude in learning rate, not more. The standardisation of reward against score is an
implementation choice made because the two are in unrelated units; it is a dynamic-range
adjustment, and no claim is made that a fly performs precisely that arithmetic.