TL;DR
Predicting neural activity is not the same as understanding how a brain works. Using a simulated larval zebrafish where the exact "ground truth" wiring is known, researchers unleashed an LLM-guided tree search to autonomously write code modeling the fish's brain. They found that unconstrained AI models beat standard baselines by exploiting statistical shortcuts—failing miserably on new stimuli—unless they are anchored by a basic "wiring diagram" of the brain, which forces them to recover the true underlying mechanisms.
What Problem Does This Paper Address?
In neuroscience, we want to discover the mechanistic rules of how neural circuits process information and drive behavior—a challenge known as system identification. Usually, we test our models by seeing how well they predict future neural activity in real biological recordings.
Here’s the catch: in a real brain, we don't know the ground-truth equations. If a deep learning model predicts neural spikes with 99% accuracy, did it actually figure out how the circuit computes? Or did it just find a clever statistical shortcut in the training data? Real-world experiments are also noisy, short, and full of unobserved variables, creating a fundamental "verification gap." To test if AI-driven model discovery can actually uncover true biological mechanisms, we first need a realistic testbed where we hold the answer key.
Methods
The authors bridge this gap by combining embodied neuromechanical simulation with automated, LLM-driven code discovery.
- The Digital Fish: They ported an open-source simulator of a larval zebrafish (
simZFish) into JAX, making it fully differentiable. This virtual fish has a 36-unit neural circuit (processing visual motion from the retina through the pretectum to motor command centers) and swims in simulated water with realistic fluid dynamics, responding to moving visual gratings in a closed loop. - LLM-Guided Tree Search: Instead of humans manually guessing model architectures, the authors used Gemini 3 Flash paired with a heuristic tree search (PUCT) to autonomously write and "evolve" Python/Flax code defining the neural transition functions, optimizing for multi-step forecasting accuracy (up to 256 steps ahead).
- Black-Box vs. Grey-Box Discovery: They ran the AI search in two regimes. The first was an unconstrained search (anything goes to minimize error). The second was a structure-constrained ("grey-box") search, where the LLM was handed a binary structural prior—essentially a boolean mask showing which neurons are wired together (the connectome), but zero information about connection weights, signs (excitatory vs. inhibitory), or non-linear dynamics.
Datasets
The authors generated a new synthetic benchmark dataset using simZFish (400,000 samples at 1 ms resolution). They exposed the virtual fish to four distinct binocular visual motion conditions (drifting gratings). Three conditions were used for training, validation, and in-distribution testing. Crucially, the fourth visual stimulus configuration was locked away as an out-of-distribution (OOD) holdout set to test whether discovered models genuinely generalized. Unlike real-world benchmarks like ZAPBench, every sensory input, motor state, and internal weight here is known.
Key Insights and Ideas
- Pure autoregression is a trap: Many neural benchmarks try to predict future brain activity from past brain activity alone. When the authors tested the actual ground-truth circuit without feeding it instantaneous sensory input, its dynamics decayed to rest, yielding a worse error than a naive baseline that just predicts "nothing changes." Without conditioning on sensory drive, the true brain model is mathematically unidentifiable.
- Test set accuracy is a mirage: Left unconstrained, the LLM tree search invented an opaque, 256-dimensional latent model that crushed human-curated baselines on the test set. Yet when shown the OOD visual stimulus, it fell apart. Sensitivity analysis revealed it completely ignored feedforward visual pathways and instead invented fake recurrent memory loops to memorize stimulus correlations.
- Wiring diagrams kill shortcuts: Simply telling the search where connections exist (binary connectome)—without telling it if they excite or inhibit, or how strong they are—regularized the search enough to eliminate shortcuts. The AI autonomously discovered the true mathematical motifs and generalized to unseen environments.
Key Results
- Crushing Baselines: On in-distribution data, the top unconstrained AI-discovered model (
ts_422) beat state-of-the-art time-series forecasters (nlinear,tide,tsmixer,deepar) by nearly an order of magnitude in Mean Absolute Error (MAE) across prediction horizons. - OOD Generalization: On the unseen OOD visual stimulus,
ts_422degraded sharply, whereas the top structure-constrained model (sts_445) maintained low error—beating baselines by over an order of magnitude at longer horizons. - Mechanistic Recovery: Compared to the unconstrained model, adding the structural prior (
sts_445) yielded a >30-fold reduction in effective connectivity error (accurately recovering the ground-truth checkerboard of excitatory and inhibitory weights) and a >5-fold reduction in impulse response error. - LLM Capability Matters: Running the exact same constrained search with an older model (Gemini 2.5 Flash instead of Gemini 3 Flash) failed to find generalizing solutions.
Limitations and Future Work
The simulated circuit here only has 36 neural units focusing on a single visuomotor reflex. While the authors expect their warnings about sensory identifiability and shortcuts to hold universally, it is an open question whether a binary wiring diagram provides enough constraint to recover mechanisms in a whole larval zebrafish brain (~100,000 neurons). Future work will need to tackle partial observability (when you can't record every neuron), noisier real-world sensory covariates, and test these grey-box discovery strategies on real whole-brain recordings paired with upcoming synapse-resolution connectomes.
Summary updated