Project 08Read · experimentPyTorch · rules fixed in advance

Does the fly's steering circuit help a robot follow a target?

A simulated robot has to keep a moving target in view while it steers around posts and walls. Its controller was wired with a 443-neuron circuit taken from the fly's connectome, the full map of the fly's nerve cells and their connections, and trained until it stopped improving. It was then compared with the same controller with the circuit taken out. The circuit did not clearly help. What it did do is more interesting: its loops act as a short memory, and that memory both helps and hurts.

Training runs

260, every one trained until it stopped improving

Target visible

Circuit ruled out as clearly better

Target hidden

Unclear: a benefit could be neither confirmed nor ruled out

Next stage

Not run: too little left to explain

The finding in one picture

The robot sees the world through a one-row strip of light sensors, like a single line of pixels. Two versions of its controller are compared here. One routes the signal through the fly circuit, which has loops: neurons feed back into each other, so the circuit's state carries a trace of what it saw a moment ago. The other, the direct connection, maps what the eye sees straight to the steering, with no loops and so no memory. Each version was trained 30 or 40 times from different random starting points and scored on fresh scenes it had never seen.

Slope chart. Post collisions: 13.2% for the circuit and 13.3% for the direct connection with the target visible; 18.2% against 21.4% with it hidden. Wall collisions: 7.4% against 4.5% visible, 25.5% against 22.8% hidden.Slope chart. Post collisions: 13.2% for the circuit and 13.3% for the direct connection with the target visible; 18.2% against 21.4% with it hidden. Wall collisions: 7.4% against 4.5% visible, 25.5% against 22.8% hidden.
Compare the gap between the two lines in each panel. With walls, the fly circuit is about 2.8 points worse whether or not the target is visible; with posts, the two are level while the target is visible, and the circuit is 3.2 points better once it is hidden. The circuit's loops give it a short memory, and the simplest reading is that the memory helps it hold a sensible course past posts while the target is out of sight and makes it slower to react to a wall right in front of it. With the target hidden, the two effects roughly cancel out. Only the target is ever hidden, never the posts or walls, and this explanation fits the pattern but was not tested directly.

Data: stage1_headroom.md · stage1b_occlusion.md · g1.json · g1b.json

The precise numbers behind this picture

Share of evaluation episodes with at least one collision. Target visible: 1,000 fresh scenes, 30 training runs per version. Target hidden: 2,000 fresh scenes, 40 runs per version. A difference is called reliable when we can be 95% confident it is not zero.

Collision, conditionCircuitDirectCircuit minus direct (95% range)
Post, visible13.2%13.3%−0.1 points (−1.3 to +1.1)
Wall, visible7.4%4.5%+2.8 points (+1.8 to +4.0)
Post, hidden18.2%21.4%−3.2 points (−4.4 to −2.1)
Wall, hidden25.5%22.8%+2.8 points (+1.4 to +4.1)

The question

In an earlier experiment, a controller built on this circuit did no better than the same controller with the circuit removed, and a hand-written classical tracker beat both: it succeeded in 92.5% of test scenes, against 70.9% for the fly circuit. One objection was that the circuit had been given a fixed, short training budget and might simply not have finished learning. This experiment trained every version until it stopped improving and asked again: does the circuit beat the direct connection?

Two tests were fixed in advance. The first used the normal task. The second hid the target for two spells of 1 to 2 seconds in every scene, the one situation where a memory should give the circuit a real reason to win. The circuit counted as clearly better only if it led by at least 3 points on the main score and we could be confident the lead was above zero. It counted as ruled out if we could be 95% confident its lead was below 3 points, on both the main score and the success rate. Only a clear win would have opened the next stage, which asks whether it is the fly's exact wiring that matters.

The main score

The main score is the share of time the robot kept the target in view at the right distance. A scene counts as a success when the robot kept it in view most of the time, never lost it for long, and hit nothing.

Target visible: ruled out. The circuit scored 88.9% against the direct connection's 91.0%, so it was 2.1 points behind. We can be 95% confident the true gap is between 0.7 and 3.5 points in the direct connection's favour. Its success rate was also lower.

Target hidden: unclear. The circuit scored 69.2% against 68.5%, 0.7 points ahead. We can be 95% confident the true difference lies between 0.5 points behind and 2.0 points ahead, so a lead could not be confirmed. Its success rate was 2.5 points higher, and that lead is reliably above zero, but its range reaches 4.1 points, above the 3-point bar, so a worthwhile benefit could not be ruled out either. After the first round came back unclear, the plan allowed one extension, to 40 runs per version and 2,000 test scenes. It stayed unclear, and that verdict is final.

The training runs varied more than planned for: up to about 1.86 times the planned spread, for the circuit's success rate. So this unclear result should not be read as weak evidence that there is no effect. It is a test that could not decide.

Dot and range chart: circuit minus two-signal summary +10.4 and +10.0 points; circuit minus direct connection −2.1 and +0.7 points.Dot and range chart: circuit minus two-signal summary +10.4 and +10.0 points; circuit minus direct connection −2.1 and +0.7 points.
The red dots sit far to the right in both conditions: the circuit is about 10 points ahead of a crude version that only adds up the left and right halves of the eye into two signals. It clearly does more than a crude two-signal summary. It is beaten by a simple direct connection, not by nothing.

Data: stage1_headroom.md · stage1b_occlusion.md

The precise numbers: main score and success
Circuit minus…Target visibleTarget hidden
direct connection, main score−2.1 points (−3.5 to −0.7)+0.7 points (−0.5 to +2.0)
direct connection, success rate−2.3 points (−4.0 to −0.5)+2.5 points (+0.8 to +4.1)
two-signal summary, main score+10.4 points (+7.0 to +14.3)+10.0 points (+7.6 to +12.5)

Ranges are 95% ranges from resampling training runs and scenes, 10,000 times. Main score with the target visible: circuit 88.9%, direct 91.0%. Hidden: 69.2% and 68.5%.

The loops help, not the fly's wiring

If the post advantage came from the fly's particular wiring, a scrambled copy of the circuit should lose it. Three rewired copies were trained alongside: the same neurons and the same number of connections, with the connections shuffled so that each neuron keeps its count of inputs and outputs.

Bar chart of post collisions with the target hidden: rewired copies 17.8%, 18.0%, 18.3%, real wiring 18.2%, direct connection 21.4%, two-signal summary 22.1%.Bar chart of post collisions with the target hidden: rewired copies 17.8%, 18.0%, 18.3%, real wiring 18.2%, direct connection 21.4%, two-signal summary 22.1%.
The four versions with loops all hit posts in about 18% of scenes (17.8% to 18.3%); the two without loops hit them in 21.4% and 22.1%. Three randomly rewired versions of the fly's circuit do just as well as the real one. The benefit comes from having loops at all, not from the fly's particular wiring.

Data: stage1b_occlusion.md, table “Every arm” · g1b.json

The rewired copies were trained 15 times each, against 40 for the real circuit and the direct connection, and they were compared only descriptively: no test was set in advance for them. On the main score none of them scored reliably worse than the real circuit, and one, rewired copy 3, did slightly better with the target visible: the real circuit was 1.8 points behind it, and we can be 95% confident that gap is above zero.

A difference that was there before any training

Before training, every connection's starting strength is set from its synapse count, the number of physical contacts between the two neurons. That turned out to matter on its own. Measured before any learning, with identical settings, the real circuit is quieter than every one of 64 scrambled versions of itself.

Strip chart of 64 scrambled circuits' extra output activity before training. Keeping each block's synapse strengths: 0.2% to 8.2%. Shuffling the strengths within blocks: 3.0% to 102.5%. The earlier experiment's rewired copies: 108.8% to 186.0%.Strip chart of 64 scrambled circuits' extra output activity before training. Keeping each block's synapse strengths: 0.2% to 8.2%. Shuffling the strengths within blocks: 3.0% to 102.5%. The earlier experiment's rewired copies: 108.8% to 186.0%.
Every dot is right of zero: the real circuit is quieter than every scrambled version of itself before any learning happens. Scrambles that keep the synapse strengths of each group of connections come within 0.2% to 8.2% of it; scrambles that keep the same groups but shuffle the strengths range from 3.0% to 102.5%. So the difference tracks which connections carry the largest synapse counts. Earlier comparisons that did not correct for this were comparing two different things.

Data: activity.json · preregistration, section 6

The earlier experiment's rewired copies, and the three in the figure above, started 108.8% to 186.0% more active than the real circuit. The planned next stage would have matched every scrambled circuit's starting activity to the real one before training, and also kept the unmatched versions, so the size of this effect would stay visible.

The precise numbers: activity before training
Scrambling keeps…GraphsExtra output activity
each block's synapse strengths10+0.2% to +8.2%
cell-type and side blocks20+3.0% to +102.5%
cell-type blocks10+69.7% to +121.2%
each neuron's number of links10+20.2% to +108.1%
excitatory and inhibitory counts10+8.8% to +91.9%
earlier rewired copies3+108.8% to +186.0%
earlier random copy1+40.0%

Mean output-neuron activity over 50 fixed scenes, averaged over 10 starting points, relative to the real circuit. The direct connection, which has no circuit to scramble, is not shown; it was 29.0% less active.

Training really did finish

Learning curves for every version in both conditions. All versions level off by about 4,000 training steps.Learning curves for every version in both conditions. All versions level off by about 4,000 training steps.
Every version levels off by about step 4,000, and the order between them is set early. Up to that step every run is still training; the hollow points after it rest on the few runs that had not yet stopped, with their count shown, so they say little. All 260 runs stopped under the rule set in advance, and none reached the 16,000-step limit.

Data: stage1_headroom.md and stage1b_occlusion.md, tables “Convergence” and “Mean validation tracked fraction by step”

Why we stopped

The next stage would have asked how much of the circuit's lead comes from the fly's exact wiring, by comparing it with 20 scrambled circuits, each trained 5 times. That only makes sense if there is a lead to explain.

Two bars: the circuit's whole lead with the target hidden, 0.70 points; the smallest difference the planned test could reliably detect, 2.0 points in the best case and 2.8 points in a less favourable one.Two bars: the circuit's whole lead with the target hidden, 0.70 points; the smallest difference the planned test could reliably detect, 2.0 points in the best case and 2.8 points in a less favourable one.
To find out whether the fly's exact wiring matters, we would have needed a measurement finer than the thing being measured. The planned test could reliably detect differences of two points or more. The whole gap it was looking inside was less than one point.

Data: power.json, Stage 2 table · stage1b_occlusion.md, verdict table

“Reliably detect” means the planned test would catch a real difference of that size four times out of five. The plan did not say what to do after a final unclear result at the second test, so the next stage was not started.

What this does not show

How it was run

The plan was written and fixed before any training run: the versions to compare, the number of runs, the fresh test scenes, the thresholds for a clear win and for ruling out, the single extension, and the analysis code, which was frozen and checked by its fingerprint before each analysis. Test scenes could only be scored through one guarded script. Every number on this page is rendered from the saved result files linked below; nothing is re-derived for the site.

Sources: first test report, second test report, preregistration, earlier experiment's report.

← 07 Sugar circuit audit09 Forward-only training →