A working studio for brain dynamics.
This studio simulates large-scale brain activity on your machine by integrating the equations while you wait. You can set a brain state, give it a drug, and follow the dynamics from one ion channel up to the whole cortex.
Overview
- math deterministic
- Deterministic differential equations govern the whole-brain network, the spiking microcircuit, the single neuron, and the simulated scalp projections. These mathematical formulations contain no artificial intelligence, meaning identical initial values and noise seeds yield identical trajectories every time. You observe direct numerical integrations rather than stochastic estimations or trained approximations.
- AI where the models are
- Artificial intelligence enters only when interpreting data or organizing experiments. Cajal uses specialized tools to orchestrate runs and explain traces, while pre-trained models such as LaBraM read recordings and describe what is in them. Machine learning never computes the biophysical state equations, leaving the generation of physiological dynamics entirely to classical mathematics.
Sections of the studio
- The control bench and the 85-region brain: set a state, give it a drug, run it, and compare treated against untreated.
- A blind test of whether LaBraM, trained on real human EEG, can tell four simulated states apart from their scalp projections.
- One patch of membrane: set the ion gradients, read the resting potential, inject current and watch it spike.
- Four guided experiments, each locked until you commit a prediction.
- Every word the studio uses, defined, and the line between what is mathematics and what is AI.
Neural-mass dynamics: Wilson–Cowan populations over 85 regions
The engine follows how active each population of cells is, not every neuron. Each of 85 regions pairs an excitatory group with an inhibitory one, and the regions drive each other across conduction delays: a Wilson–Cowan neural-mass model, which is the right altitude for rhythms and seizures.
Three scales: membrane, microcircuit, whole brain
Three models, one question at three sizes. The single neuron computes voltage from ion gradients and channel gates; the microcircuit runs Izhikevich cells spike by spike; the whole-brain model couples 85 regions across the synthetic connectome.
State space: six parameters, twelve conditions, fifteen treatments
Six knobs set a state, and twelve tuned conditions set all six at once. A treatment is a set of multipliers on the equations, chosen to match what the drug does at its receptor: the direction and rough size of an effect, not pharmacokinetics.
Runs: identifiers and determinism
Every run keeps a short id and the same settings give the same numbers every time. The local service holds your forty most recent runs for the session, so any of them can be reopened or handed to the assistant by id.
Whole-brain simulation: coupled Wilson–Cowan equations with conduction delays
We model large-scale brain dynamics by coupling 85 anatomical regions across a synthetic structural connectome with axonal conduction delays. Within each parcel, an excitatory population interacting with an inhibitory one governs local rhythmicity. Pressing run integrates these coupled Wilson–Cowan differential equations forward in time, and the cortical surface animates as the solver advances, translating regional population firing rates into an evolving spatial pattern.
Working the bench
- Set the state. Pick one of the twelve tuned conditions, or describe one in words and confirm the card Cajal proposes. Either way the same equations run across all 85 regions.
- Give it a drug. Add one of the fifteen compounds and press compare with untreated. The bench runs the same condition without the drug and tables what changed.
- Go down a scale. Press run cell by cell to drop the same state into a spiking microcircuit and see every spike.
Investigations: parameter sweeps and transition sharpness
Every experiment on this tab proceeds through three beats: you frame an expectation, test it against differential equations, and inspect the mechanism that drove the outcome. The run button remains locked until you register a prediction. Committing to a specific outcome before you observe the data changes how you perceive the evidence, marking the boundary between an experiment and a demonstration. Once the integration finishes, your prediction sits directly beside what the equations produced.
A sweep evaluates a complete simulation across a series of parameter values while holding every other variable and random seed constant. By tracking the largest single jump against what an even response would have produced, we obtain a measure of sharpness. A straight line scores 1, whereas a score above 3 indicates the system tipped sharply across a narrow interval rather than sloping smoothly.
Single neuron: Nernst, Goldman–Hodgkin–Katz and Hodgkin–Huxley
A neuron is a battery: pumps hold potassium inside the cell and sodium and chloride outside, and each gradient pulls the membrane toward its own Nernst potential. The Goldman–Hodgkin–Katz equation weighs those pulls by how permeable the membrane is to each ion and gives the resting potential. A Hodgkin–Huxley membrane then shows how voltage-gated channels turn that resting potential into an action potential. Change a concentration, a permeability, the temperature or a channel drug and both models update together. math Everything on the tab is integrated from the equations; no learned model is involved.
EEG benchmark: closed-loop discrimination with LaBraM
Can a network trained strictly on clinical human EEG recognise a brain state generated purely from differential equations? We synthesise four distinct neurological states with the whole-brain model, project the activity onto virtual scalp electrodes, and feed the output to LaBraM, an EEG foundation model trained on roughly 2,500 hours of real human recordings. Because LaBraM has never encountered this studio's synthetic engine, it cannot fall back on a memorised artifact — whatever it separates, it separates on the structure of the signal itself. This is a closed-loop falsification test: if the simulated biology is mathematically hollow, the evaluation fails, and the page says so.
The four stages
- Define. An external language model designs four distinct neurological conditions out of the studio's tuned biophysical presets. Adjustments are bounded to half a step from baseline, which prevents the over-saturated dynamics where every state degrades into uninformative slow waves. The selected states and their expected electrophysiological signatures are locked into the table on the left before anything is executed, eliminating retrospective bias.
- Simulate and project. The neural engine integrates each configuration across the 85-region whole-brain connectome for eight simulated seconds. A distance-weighted forward kernel then projects regional cortical currents onto 19 standard 10-20 scalp channels, incorporating a calibrated microvolt gain, pink 1/f background noise and a 1 µV trace of line-frequency hum; only cortical regions contribute. Set beside a boundary-element structural head model this projection is abstract, but it faithfully preserves the three properties the test turns on — spatial synchrony, broadband power and amplitude dynamics.
- Decompose and encode. Raw traces are bandpass-filtered between 0.1 and 75 Hz, notch-filtered for line noise, downsampled to 200 Hz and partitioned into four-second epochs. We deliberately avoid average referencing: subtracting the spatial mean artificially erases the global phase synchrony that is characteristic of generalised seizures and slow-wave sleep — the very thing those states are made of. Each epoch is then processed through two parallel paths. LaBraM compresses the multi-channel time series into latent embeddings, mapping the signal's geometry using representations learned from human clinical records, while a deterministic classical pipeline extracts canonical band power, cross-channel synchrony, a burst index and spectral flatness.
- Discriminate and score. Two independent raters evaluate the data blind. A fresh instance of the external language model reviews the tabular spectral metrics with every identifying line stripped out, names the underlying physiological condition and reports its own confidence score. Separately — and reported by nothing — we measure the geometric distance between each epoch's embedding and its true condition's centroid. The run is marked successful only if three things hold: LaBraM read every recording, its latent clusters separate the conditions better than chance, and the blind judge correctly identifies at least 3 of the 4 conditions.
Scope and limits
Every trajectory on this page reflects a synthetic connectome and an idealized mathematical model rather than a clinical measurement from an individual patient. Tipping points and seizure thresholds are intrinsic properties of these equations, so the studio describes simulated network phenomena without offering medical diagnoses.
Every word the studio uses is defined on the tab, with the line between what is mathematics and what is AI, and the technical specification.