Sense of Direction

About

Somebody sliced a fruit fly’s brain into pieces thin enough to photograph in an electron microscope, traced every cell through the stack, and counted the connections between them. That map is called a connectome. This one is public and free to use, and it is the largest of its kind.

About five hundred of those cells are wired up and running on this page. They are the fly’s compass — the part that keeps track of which way it is facing — plus the part of its eye that tells colours apart, and a handful of cells that set how fast it walks. The connections between them are the real counts, and they are never edited.

This is not a fly and it is not thinking. It is a few hundred numbers going round in a loop.

Not everything here is measured. The wiring is. But a connection count is not a strength, so each kind of connection is given a number that turns one into the other, and those numbers were chosen rather than found: eleven for the compass, eight for the colour circuit. They were set by searching for the values that best matched results published from living flies, not by taste. Fifty-eight more chosen numbers sit in the rest of the model, the sky and the paint. The four pigments are a choice too. All of them are listed, with where each came from, on the proof page, and the list is generated from the code rather than typed, so it cannot go stale.

The light is the real sky over London, clouds included: the sun’s bearing and height set the key light and every shadow, and cloud decides whether there is a shadow at all. What the weather does not decide is how bright the room looks. The studio is exposed to a fixed level, the way a gallery lights the work and leaves it, because a room lit by a real overcast London morning and rendered honestly is a black rectangle. The fly keeps its own hours: it works through the night under a lamp, and the sky reaches the work rather than switching it off. Nothing here decides what is good, and there is no language model anywhere in it.

The obvious suspicion is that any wiring would do this — that it is a random number generator in a costume. So the circuits were re-run on wiring that had been deliberately broken, three ways, a hundred times each. The compass forms and holds a heading in 100 of 100 runs on the real wiring, and in 0 of 300 on the broken ones. The colour circuit survives one of the three, and the proof page says exactly which and by how much. You can run it yourself: Shuffled under the studio rebuilds the same hour on rewired connections and names which break it used.

Where it’s shaky

Neurons, names, synapse counts, skeletons
Read from the connectome.
The width of the compass reading
Fitted, not discovered. Twelve numbers were tuned until the compass’s active patch came out about 90° wide, and it then measures 92.6°. What was not tuned for, and is therefore the finding: that one patch forms at all from the real connection counts, that it has a single peak, and that it stays put for the whole run.
Colour tuning
Partly reproduced. Of the four colour cells, one matches what was measured in living flies, two are close, and one is wrong — it prefers red where the real cell prefers blue. That one cannot work here: the cells that would push it the other way are not in the patch this model contains. Its selectivity comes out at 0.39 against a published 0.55.
The compass has favourite directions
Push the compass to each of sixteen headings and let go, and it slides back to one of only two. The real connection counts are not symmetric, and evening them out would mean editing them. So the compass cannot be turned by the fly’s own steering signal: a strong turn command moves it less than a degree in twenty-five seconds. What moves it is the sun. Measured over a whole day of hours, it does not move much then either: the body sweeps right round while the reading stays inside a fifth of a degree of where it settled. Thirty settings of the connection strengths were then tried, three seeds each, to see whether any legal tuning turns it: the best followed the body at 0.04 of its turn where a compass needs 1, and every setting that broke the two favourite directions into more broke the single reading with them. What the sun does do is snap it: after the sun jumps 90° the reading moves in a third of a second and holds its offset to 14°. It snaps between its favourite directions; it does not turn between them.
What a clear sky changes on the paper
Less turning, and that is all. The piece is named for the difference between holding a bearing and wandering, so here is that difference as measured over a day of hours: under a clear sky the body turns about 315° in an hour, and under cloud or at night 2,150–3,030° — seven to nine times more — and the strokes go from 0.98 of a straight line to 0.999. No sky here gives a held bearing. The goal signal the circuit steers towards flattens out two seconds into a piece, the compass does not turn with the body, so what the steering cell compares is two fixed directions about 109° apart: a constant error, answered with a constant turn, which in the dark is one full revolution every seven and a half minutes. Nothing on a sheet fans round with the sun either. The sun moves 15–19° in an hour, so a fly keeping a fixed angle to it would leave a fan that wide; this one turns 315° in the clear hour, and the other way. The walls of the room turn it more than the circuit does.
One unit of the eye
Seven. A fly’s eye comes in two flavours of unit and neither carries all the cell types this needs — none of the 892 in the dataset does. So the model uses one unit and its six neighbours.
Which connections excite and which inhibit
Read from the dataset. Measured for most cells, predicted by the dataset’s own model for the rest. None of it is guessed from the literature.
Breaking the wiring on purpose
The two circuits break differently, and only one of them breaks. The compass forms a heading in 100 of 100 runs on the real wiring and in 0 of 300 on the broken ones. The most telling break keeps every connection exactly where it is and only flattens the counts to 1 each: the compass is gone. Turning the strength back up until the network is as excitable as the real one does not bring it back. So the counts matter, not just the shape of the graph. The colour circuit is tougher: shuffle the connections while keeping each cell’s type and its number of partners, and three of the four colour cells keep almost all of their tuning. What carries it is which types connect to which, not which individual cells do. Two limits travel with these numbers and are printed on the proof page: on one broken rung a heading forms in 44 of 100 runs, and the shuffle that keeps types cannot rewire more than 39% of the compass because it runs out of legal swaps.
Sky, weather, light, eye pigments
Physics and published measurements, not the connectome. One number in the eye’s sensitivity curves was chosen rather than measured.
How wide the line is
Chosen, not measured. Nothing published says how wide a trail a fly leaves, so the width used is the animal’s own — 0.91 mm, the width of its head — and it is that width in every mark of every piece, because the contact width of a dragged wet tip is the tip’s. What the compass changes is the colour. When the heading collapses, and on a clear hour it is collapsed for a quarter of the time the brush is down, the line keeps its width and carries a thousandth of the pigment: it is water, and it behaves like water, wetting the sheet and disturbing the paint it crosses. Until this session the compass was in the width instead, twice over, so a quarter of every piece was drawn 0.127 mm wide — a third of one cell of the grid the paint runs on — and came out as a row of disconnected dots: 2,315 separate fragments over the thirteen stretches of an hour where the heading was gone, against thirteen now — one unbroken line each, which is what a line is.
How long a stop lasts
In the drawing now, and it was not before. The fly stops for about a quarter of a piece, and a tip held still keeps wicking while it has water, so a longer stop leaves a bigger dot. The rate it unloads at is a chosen number, and the number it was set to filled the dot in a fifth of a second — so a three-second stop and a half-second stop left the same mark and the sheet had no record of the difference. It now takes about a second. Then the studio printed real sheets, and they showed that half the fix had not worked: the dots were the right sizes and every one of them was the same black, the blackest this ink goes, whether the fly had stood still for a third of a second or for nine. So a stop now leaves a third of the pigment the same water would leave if it were dragged — the paper filters what wicks sideways out of a resting tip — and on a real sheet a half-second dot is 2.1 mm across against 3.1 mm for a three-second one. Its middle is not paler, and that was measured after the sentence had said it was: between a half-second stop and a three-second one the centre differs by 0.99 on one hour and 0.65 on another, the wrong way round on the second, against a spread of about five between one stop and the next of the same length. The length of a stop is in the size of the dot and nowhere else. A print and a full-size screen read that size at nine and five times what the eye can resolve; a phone reads it at 1.18 times, right on the limit; an archive thumbnail cannot read it at all and reads the dot’s total darkness instead, which also grows with the stop, by 8.7 to 9.6 of those units. The cost is stated on the proof page: a stop is still much the heaviest mark on the sheet, and a sixth of the paint on a finished sheet is in the stops, where it used to be a third and before that a twentieth. The sheet takes less paint than before, not more, and the brush wets exactly the same area it did, because none of this moved the water.
The paper
Rough, and not by choice. The sheet is 762 mm across and the paint on it is simulated on a grid 2048 cells wide, so the smallest thing the paper can have on it is two cells — 0.74 mm. Finer than that and the grain the picture is drawn at stops being the grain the paint was simulated on, which is the one thing the two renderers are not allowed to disagree about. A cold-pressed sheet has a tooth about half that size and a hot-pressed one has almost none, so both are below what can be drawn here: the tooth is 1.7 mm and the surface is named Rough because that is what a 1.7 mm tooth is. The file called it cold press for a year and it was never cold press. The grain also has a finer second scale, and until this session that one was below the limit — 0.4 mm, which the simulation could not hold and the final image could — so the sheet the paint ran on and the sheet you are looking at were not the same sheet. They are now, and the test checks the finest scale in the model rather than the coarsest.
The paint
The numbers are not the ones the model needs. Mixing paint properly needs two measurements per pigment — how much light it absorbs, and how much it scatters — and nobody has published both for these four. What is used instead is the colour of each pigment at full strength, turned into one number where two are needed. The five caveats that come with that are printed in full on the proof page.
When the fly walks, stops and flies
Which way it turns is the connectome’s: the steering command is banked and spent whole, so the total turn over a piece is exactly what the circuit asked for and nothing is invented. When it stops and for how long is not. Every signal in these circuits settles to one level and stays there — there is no slow rhythm in them to read bouts out of — so the walking and stopping is a published pattern applied as a rule, with its own seeded clock. It is listed as one on the proof page.
Which four pigments
The one purely aesthetic choice. Named on the proof page.
Ultraviolet
The fly sees it and you do not, so one of the four pigments stands in for it. That is a translation, not a measurement. Worse: the pigment data stops short of the ultraviolet for two of the four, and below that point the value is held flat — which is exactly where two of the fly’s five light sensors do most of their work.
A night piece, and an overcast piece, is one colour
The fly’s colour circuit looks at the sky, along whatever direction its body is pointing, and skylight changes colour with the angle you look at it away from the sun. So on a clear afternoon the heading is in the hue, and the day is too: between the extremes of one day the colour moves 7.26 in the units colour difference is measured in, where a difference you could see is about 2.3, and between facing the sun and facing away it moves 5.83 under a clear sky and 5.09 under the real cloud that day had. Those are the circuit’s own numbers. On the sheet the heading’s share is smaller: half of every mark is a green pigment whose published spectrum is near neutral, and with the two least colourful pigments making 83% of the mixture the whole range of colour the heading can reach is 3.0 at full strength, 1.4 on the finished sheet between one stroke direction and another, and 0.6 at archive size, all under the 2.3 you could see. What a viewer does see between noon and midnight is the line getting darker and pinker as the light comes up, 2.6 at archive size side by side. Under a full overcast it is 0.000 — exactly nothing, because a flat grey sky is the same in every direction, which is what the standard model of an overcast sky says and is why a grey day looks like one colour to anyone. At night the sky is not there at all. There is a lamp in the studio and it lights the paper; it does not light the sky, so it cannot give the fly a night palette, and a night piece comes out in the colour circuit’s resting rates. That is a fact about a dark room, printed rather than lit away.
Dopamine setting the walking speed
The direction of the effect is documented. How strong it is here was chosen.
The fly’s body and gait
Not a mesh. Nothing is downloaded and no third-party geometry is distributed: the fly is built from primitives, and what is borrowed is the flybody model’s proportions — flybody’s proportions, our triangles. The gait is procedural. Cosmetic. Not driven by motor neurons. Provenance and Apache-2.0 attribution in the body model notice.
It’s a fly painting
It is a compass and a hue detector in two loops, wearing a body. This must stay the joke.

Credit

The connectome is the MaleCNS v1.0 dataset, a collaboration between FlyEM at HHMI Janelia, the University of Cambridge, the MRC Laboratory of Molecular Biology and Google Research, released under CC-BY 4.0.

Weather data by Open-Meteo.com.

The fly’s proportions are measured from flybody (Google DeepMind / HHMI Janelia Research Campus), used under the Apache License 2.0. No mesh of theirs is distributed by this site; the full attribution required by §4 of that licence, and the list of which proportions are measurements and which are free parameters, is in the body model notice.