How it works
Short version: the whole brain fits in a tab and runs at close to real time. Here is how.
1. The data is too big to load directly
The release is up to 13 GB of tables in a Google Cloud bucket, and the bucket does not allow web pages to read it. So the work is done once, offline, and the result is shipped as ordinary files.
2. Keep the connections that matter
A connection is a count of synapses between two neurons. Weak ones are many and unreliable. Keeping only connections with 5 or more synapses drops three quarters of the list and keeps nearly three quarters of the synapses.
| Synapses | Connections | Of all synapses | Size |
|---|---|---|---|
| 1+ | 25,568,639 | 100% | 84 MB |
| 5+ | 6,236,426 | 72% | 20 MB |
| 10+ | 2,749,558 | 54% | 9 MB |
| 20+ | 1,060,450 | 36% | 3.5 MB |
Stored compactly, the brain is 20 MB. The brain shape, the fly model and the neuron list add 5 MB. The browser unpacks it in about 130 ms.
3. It runs fast enough
Each neuron is a simple integrate-and-fire unit with the settings from the published whole-brain model. Only neurons that fire touch their connections, and only neurons that are doing something get updated. One thread, plain JavaScript.
| Brain | Time step | Speed |
|---|---|---|
| 6.2M connections | 1 ms | 0.95× real time |
| 6.2M connections, with the room | 1 ms | 0.35× real time |
| 2.7M connections | 1 ms | 1.11× real time |
4. Three things the raw data gets wrong
The wiring gives you connections and synapse counts, not how neurons behave. Three fixes were needed before anything fly-like happened.
- Inhibition needs something to inhibit. A silent brain cannot be turned down. Every neuron is given a small standing push, just below firing.
- Cells have a floor. Without one, the most-connected neurons drifted to −300 mV, which no cell can do, and could never fire. They now stop at −75 mV.
- Synapse counts are not strength. Some cells get 35,000 inputs, most get a few hundred. Each cell’s input is scaled toward the average.
5. What you give up
Dropping weak connections loses 28% of synapses. Every synapse is the same strength per count, and every neuron the same type, which is not true in the animal. The time step is 1 ms rather than the 0.1 ms a careful study would use. For behaviour on the scale of a turn or a jump, that is fine.