Simulating a brain from its wiring
Researchers built a computer model of the whole fly brain from the FlyWire map. It predicted which neurons drive behaviours such as feeding, and experiments confirmed some predictions.
In 60 seconds
Simulating a brain from its wiring
Researchers built a computer model of the whole fly brain from the FlyWire map. It predicted which neurons drive behaviours such as feeding, and experiments confirmed some…
How the model was used
- 1
Copy the wiring
Every neuron and connection from the map goes into the model. - 2
Choose a simple neuron model
Each neuron gets the same simple rule for adding inputs and firing. - 3
Stimulate
Switch on a group of sensory neurons in the computer, for example neurons that sense sugar. - 4
Watch
See which other neurons become active, including neurons linked to a behaviour such as feeding. - 5
Test in real flies
Experiments check whether the predicted neurons really matter for that behaviour.
Excite or inhibit?
import numpy as np
# MADE-UP network of 4 neurons. W[i, j] = weight from neuron i to j.
names = ["sugar", "relay", "block", "feed"]
W = np.array([
[0, 1.2, 0, 0 ], # sugar excites relay
[0, 0, 0, 1.1], # relay excites feed
[0, 0, 0, -2.0], # block inhibits feed
[0, 0, 0, 0 ],
])
x = np.array([1.0, 0, 0, 0]) # switch on "sugar"
for t in range(3):
x = np.maximum(x, (x @ W >= 1.0).astype(float))
print("step", t + 1, [n for n, a in zip(names, x) if a])Why this matters
- Copy every detail of real neurons
- Learn or change with experience
- Replace experiments on real flies
- Prove that every prediction is right
- Turn a huge map into testable predictions
- Suggest which few neurons to test among thousands
- Save time and effort in the lab
- Show that wiring alone carries a lot of information
Watch and read more
Lab
A step rule that spreads activity through a made-up network, and a comparison of what happens when you stimulate sugar or water neurons.
The problem
This runs in your browser. The network is made up, and much simpler than the real model.
- Run the starter. It defines a small network with a weight matrix
W. Negative weights inhibit. - Finish
step(x): given a vectorxof 0s and 1s (which neurons are active), return a new 0/1 vector where a neuron is active if its total inputx @ Wis at leastTHRESHOLD. - Run it.
run()keeps the stimulated neuron switched on and records every neuron that becomes active. - Compare
sugar_reachedandwater_reached. Doesfeed_motorswitch on in each case? Which neuron explains the difference?
Practice lab
Edit the code and run it. Python runs in your browser — nothing is sent to our server.
No output. Add print(...) to see values.
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1Change W[4, 5] from -1.0 to -0.1. What happens when you stimulate water_in, and what does that teach about wiring maps?Reveal
feed_motor gets 0.6 from inter_B and loses only 0.1 from inhib_C, so its input is 0.5, still below the threshold of 1.0, and it stays off. But if water also excited inter_A, the weak inhibition could no longer block feeding. The same wiring, with different strengths, can behave differently. A map that shows only who connects to whom is not enough; strengths and signs matter too.
Q2This toy model updates all neurons in fixed steps and uses 0/1 activity. Name two ways the real whole-brain model is richer.Reveal
The real model used spiking neurons whose voltage builds up over time and leaks away, so timing and the rate of spikes matter. It also used connection strengths taken from synapse counts across about 140,000 neurons, not a hand-made handful. Even so, it was still a simplification of real neurons.
Questions people ask
Is this a full simulation of a fly's mind?
No. It is a simplified model that uses the wiring and a simple rule for each neuron. It was used to predict specific things, and some predictions were confirmed. It does not capture everything a fly does or feels.
Why use simple neurons instead of very detailed ones?
Detailed models of every neuron would need many facts that nobody has measured yet, and far more computing. A simple model with the right wiring is easier to run, easier to understand, and its predictions can still be tested.
How do scientists test a prediction in a real fly?
In general, they use genetic tools to switch specific neurons on or off in living flies, and watch whether the behaviour changes. If switching on a predicted neuron makes the fly start a feeding action, that supports the prediction.
Could we do this for a human brain?
Not today. There is no complete map of a human brain at the level of single synapses, and it would be enormously larger than the fly's. Small brains are where these methods are being developed.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.