Summary
The Danio biophysical simulation runtime (danio/brain/engine.py) models a 650,000 volume-constrained computational neuron population organized into 203 anatomical regions. The current vectorized Python/NumPy leaky integrate-and-fire (LIF) loop runs at 50 Hz, but per-step execution on single-thread CPU can reach 14–18 ms during high-density sensory volleys.
Goal
Accelerate the core numerical integration loop down to $< 2.5$ ms per step using:
-
Numba JIT compilation with
@njit(parallel=True, fastmath=True) on membrane potential updates:
$$V_m[t+1] = V_m[t] + \frac{dt}{\tau} \cdot (V_{rest} - V_m[t] + R \cdot I_{syn}[t])$$
- Or a lightweight C++/Rust WebAssembly module for zero-copy in-memory tensor updates.
Key Files
danio/brain/engine.py: Core DanioBrain runtime loop.
danio/simulation.py: Biophysical closed-loop coordinator.
tests/test_research_grade_simulation.py: Determinism test suite.
Acceptance Criteria
Summary
The Danio biophysical simulation runtime (
danio/brain/engine.py) models a 650,000 volume-constrained computational neuron population organized into 203 anatomical regions. The current vectorized Python/NumPy leaky integrate-and-fire (LIF) loop runs at 50 Hz, but per-step execution on single-thread CPU can reach 14–18 ms during high-density sensory volleys.Goal
Accelerate the core numerical integration loop down to$< 2.5$ ms per step using:
@njit(parallel=True, fastmath=True)on membrane potential updates:Key Files
danio/brain/engine.py: CoreDanioBrainruntime loop.danio/simulation.py: Biophysical closed-loop coordinator.tests/test_research_grade_simulation.py: Determinism test suite.Acceptance Criteria
tests/test_research_grade_simulation.py::test_engine_determinism).