BRAVLi

Drosophila Whole-Brain Digital Twin · 2017–present

Python Connectomics Literate Programming FlyWire

From Blue Brain to Fly Brain

BRAVLi began at the Blue Brain Project (EPFL, 2017–2024) as a framework for managing computational provenance across petabytes of neuroscience data — 4.2 million morphologically detailed neurons, 14 billion synapses. It has since evolved into something more ambitious: a literate codebase for reconstructing and simulating the Drosophila whole-brain connectome.

The Real Story Lives in codev/

This is a literate codebase. The Python files in bravli/ are tangled output from org-mode lessons in codev/. To understand the code, read the lessons. To modify the code, edit the lessons and re-tangle. The lessons are the documentation, the specification, and the source — all in one place.

18 Lessons, Bottom to Top

LessonTopic
00Foundations — dataset abstraction, logging
01Parcellation — neuropil region tree, FlyWire loader
02Composition — cell type counts, neurotransmitter profiles
03Factology — structured measurement system
04Visualization — 3D rendering via navis
05Mushroom body exploration — integration walkthrough
06Atlas — brain atlas and neuropil geometry
07Research roadmap — plan for fly brain 2026
08Connectivity — synaptic connectivity analysis
09Synaptic physiology — synapse models and neurotransmitters
10Cell models — LIF and graded cell models
11Simulation — LIF simulation engine
12Portal — interactive digital twin portal
13Mushroom body circuit — microcircuit extraction + sparseness
14ISN and learning — ISN regime + three-factor STDP conditioning
15Brunel phase diagram — FlyWire regime mapping
16Neuromodulatory switching — Marder's principle
17Stochastic synapses — noise and resonance
18LIF vs AdEx — does topology dominate?

The FlyWire Connectome

The publicly available FlyWire connectome provides the data substrate: 139,255 neurons, 50 million synapses, 8,453 cell types. BRAVLi loads, parses, and analyses this connectome at every scale — from individual neuropil regions to whole-brain connectivity patterns.

From Anatomy to Dynamics

The lesson sequence traces a deliberate arc:

  1. Structure (lessons 00–06) — What is the brain made of? Regions, cell types, neurotransmitters, morphologies, geometry.
  2. Connectivity (lessons 08–09) — How are neurons wired? Synaptic connectivity matrices, physiological parameters, neurotransmitter-receptor matching.
  3. Dynamics (lessons 10–18) — What does it do? LIF simulation, Brunel phase diagrams, neuromodulatory state switching, stochastic synapses, learning rules. The question: can this wiring diagram come alive?

Heritage

BRAVLi inherits ideas from the Blue Brain Project's cell atlas pipeline, the bravlibpy circuit analysis library, and the circuit-factology measurement framework — adapted for the publicly available FlyWire connectome. It is the neuroscience domain application within the MayaLucIA personal scientific computing environment.

Technical Stack

Python (NumPy, SciPy, navis, neuprint-python) · Org-mode literate programming · FlyWire connectome · Makefile (tangle + test) · LIF / AdEx neuron models · STDP learning rules

← Projects