Video yükleniyor...
Video Yüklenemedi
Simulating a fruit fly's neural network using custom WebGPU kernels, running locally in a browser. The demo uses real connectivity data for 166,700 neurons from the MaleCNS connectome. Paint neurons and watch their activity drive the fly's movements. Built with GPT-6 Astra.
158,621 görüntüleme • 1 ay önce •via X (Twitter)
30 Yorum

Of course, there are many simplifications here: the connections come from biological data, but the activity model is simplified and movements are programmed. Still, it was fun to make! 🤗 Try it yourself: 🪰 The science behind it:

You can't simulate the activity of an organism with its connectome. There is no neuromodulation in a connectome. There are no neuromuscular junctions. You don't know which neurons activate and which suppress. This is a charade.

Sick demo, it is exciting so see how AI’s rapidly advancing our scientific understanding and abilities. Wonder what I’m going to be telling my grandchildren what like was like before back propagation was cool

Thanks! 🤗 I absolutely loved your Minecraft video. It was a huge inspiration for this demo.

Computers can't emulate a brain. This is a charade.

this is ridiculously cool. How long did this take you to build?

This is true AGI

166k mapped connections for a fly. Human AGI timelines still treat wiring as a footnote.

Okay, now play Bad Apple with the fly's brain

running a fruit fly neural net locally in the browser proves WebGPU can handle massive connectivity data without external servers.
Deberían ponerlo esa mente en un dron y ver que hace

Is the entire fly model generated by astra with all the animations too or is it a stock fly made by a human?

The kernels make the system adaptative with the movement??

Will everybody stop fucking around and get it to play stairway to heaven on a simulated guitar

FINALLY ONE I CAN ACTUALLY PLAY AROUND WITH thank you

I painted only the right optic lobe and it started flying for no reason 😭 if u actually wanted to make sense of the connectome, the next step could be an in silico ablation test. if every viewer had ablated just one neuron, we'd have a 30%+ ablation map atp lolll 🤣🤣

It's so horribly misleading 😭 - But I will grant you that it's pretty cool. Amazing to see what Astra can do in one-shot.

It is incredible to see how GPT-6 Astra is being used to bridge the gap between complex biological data and interactive simulations. We actually went deeper on this here:

could you publish a post on how you parsed the connective data to drive the fly? also, would be interesting to see a log of the connectome signals. also, would be interesting to erase neurons as well as paint. well done overall!

The heading-direction bump is a single, localized patch of neural activity that travels around the ellipsoid body, a doughnut-shaped ring🍩 in the fly’s central complex. In the 2024 FlyWire connectome, this ring is tiled by a small set of EPG “compass” neurons (roughly 50 cells). Their collective activity forms one coherent bump whose position around the ring encodes the fly’s current heading. Visual landmarks and self-motion signals slide the bump; other central-complex neurons then read it out to steer walking or flight. The same 2024 wiring diagrams showed that a ring attractor this compact can remain stable even with far fewer cells if the connections are tuned just right. Motor output leaving the brain itself is also tiny. Of the 139 255 neurons mapped in FlyWire, only 1 303 are descending neurons that send commands down to the nerve cord and 106 are brain motor neurons that move head parts such as the mouthparts—together about 1 % of the brain. The muscles that actually flap the wings and move the legs sit in the ventral nerve cord, not the brain. The entire central complex that houses the heading ring and plans those movements contains only a few thousand neurons. The main memory center is the mushroom bodies. In the 2024 FlyWire map they contain about 2,580 Kenyon cells on the left and 2,597 on the right—roughly 5,180 cells, or 3.7 % of the 139,255-neuron brain. Add the mushroom-body output neurons, the dopaminergic neurons that write the memories, and a few giant interneurons, and the whole associative-learning system is still only a few percent of the brain. Those Kenyon cells store olfactory associations (this smell predicts sugar or shock) by changing the strength of their synapses onto the output cells. The central complex uses a different, much smaller form of memory: it keeps a short-term heading estimate so the fly can stay on course. That is not the same as the long-term associative memories stored in the mushroom bodies. Flies therefore need both systems; navigation memory alone would not let them learn that a particular odor is dangerous. The ellipsoid body itself is a genuine doughnut—a toroid*** with a hole through the middle. Ring neurons send axons that wrap all the way around the circumference, forming concentric layers like the rings of a sliced onion. Through the central hole run the axons of the columnar EPG “compass” neurons. Each EPG cell occupies one wedge of the doughnut, so the whole population tiles the ring like slices of a pie. At any moment only a few neighboring wedges are active; that contiguous patch of activity is the heading bump. When the fly turns right the bump slides clockwise around the doughnut; when it turns left the bump slides the other way. Visual landmarks and wind direction lock the bump to the outside world, while self-motion signals from the legs and wings keep it updated even in darkness. Because the structure is a closed ring, the bump can travel all the way around and come back to the same place, giving the fly a continuous 360-degree compass. The hole in the middle is not empty space; it is the conduit that lets the compass neurons talk to the rest of the central complex so the bump can be read out and turned into steering commands.

166k neurons is the easy number. MaleCNS is closer to ~125M synapses. if the tab stalls after painting a few regions, check WebGPU memory before blaming the kernel.

166k neurons at 0.97x in-browser via WebGPU is wild for something with zero server roundtrip. What's the frame budget looking like on mobile GPUs?

#zeitgeist 🧠

Seeing it run locally in the browser makes the whole thing feel much more tangible. The visualization is doing a lot of work here too—not just the demo.

WebGPU kernels make the graph interactive. The remaining bottleneck is biology: most synapses lack reliable weights, delays, and short-term plasticity, so activity can look alive without being predictive.

166,700 neurons in a browser tab lol

The part people underrate here is that the whole sim state stays on the GPU across frames. Most browser simulations die on readback, not on compute. 166k neurons is also right where WebGPU's default 128MB storage buffer limit starts to matter. Lovely demo.

166k neurons in a browser is nuts

Simulating 166k connectome neurons via custom WebGPU shaders right in the browser is wild. Are you packing the sparse synaptic weights into storage buffers directly, or streaming activation states per tick?

Ghost in the Shell ne sera peut-être plus une fiction un jour...
