SC‑WBD

Foundation model

SC-WBD: an integrated whole-brain foundation model across modalities, scales and dynamics

One subject's brain as a 414-parcel dynamical system that EEG, MEG, fMRI and stimulation all supervise at once — each modality constraining only what it observes, with the rest marginalized rather than imputed.

SC-WBD models a single brain as a 414-parcel dynamical system and learns it from whatever was measured. EEG constrains the fast electrical state through a lead field built on that subject's head geometry; fMRI constrains a slow haemodynamic state in the same parcel space; TMS and tFUS enter as an E-field on the same grid. One state, one set of dynamics, four instruments looking at it.

The engineering problem is that these instruments disagree about time, space and units. EEG samples at milliseconds and BOLD at seconds. EEG sees a current dipole moment in Hz·m; BOLD sees percent signal change. A subject scanned with one modality has no measurement of the others. SC-WBD carries a state that is explicit about all three — per-region structure, named clocks, typed ports — so a partial observation supervises the part it observes and nothing else.

414parcels of structured state
400 cortical + 14 subcortical
4instrument classes
EEG · MEG · fMRI · TMS/tFUS
51.7%of the whitened EEG lead field
captured by a 3-vector moment, vs 5.6% scalar
11compiler refusals
each with a test that makes it fire
0validated claims about brains
all five claim gates could_not_run

What exists today

Stated at the granularity someone could check. Every row below is a thing you could run.

ComponentStateWhat it is
Schema and compiler built Typed contracts for units, clocks, frames and transform lineage, with eleven refusals (R01–R11) that fail closed rather than warn.scwbd/schema/refusals.py A twelfth, R12, is local to this repository and fires at checkpoint emission.
Anatomy prior built 414 parcels — 400 Schaefer cortical, 14 Tian subcortical — carrying receptor density, intrinsic timescale, myelin and thickness. Partitioned into nine families by a pre-fixed rule under a spin null.1The rule was fixed before the test ran: ship the finest candidate partition in which every pair of families separates. Yeo-7 separated 6 of 21 pairs and was rejected. The surviving split is binary over cortex — cortex_unimodal (138 parcels) and cortex_association (262) — plus seven subcortical families of two parcels each.
Dynamics backends built Six generative backends — Wilson–Cowan, Jansen–Rit, reduced Wong–Wang, Stuart–Landau, Kuramoto, Linear–Gaussian — plus an equal-capacity learned control, interchangeable by one config key.2Twelve backends are registered in total once the four engineered per-family backends are counted. Only three of the six generative ones are typed mechanistic in the code; Stuart–Landau and Linear–Gaussian are effective and Kuramoto is functional. The distinction is in the source and we keep it.
Simulated corpus built 37,888 trajectories over 414 parcels at 125 Hz, generated from five of the backends.reports/run2_corpus.md
Real EEG corpus built 109 PhysioNet participants, 64 channels, split 71/11/27 and verified participant-disjoint. This is real human recording and is kept strictly separate from the simulated corpus.3The repository is emphatic about this and so are we: a simulated corpus can never be evidence that the model has learned anything about biology. Conflating the two corpora would be the most basic error available to this project.
TMS impulse-response path partial A validated E-field solver joined to the latent dynamics as an additive drive. The field computations pass their gates; the mapping from drive to neural response is explicitly flagged unvalidated in code, because no checkpoint has been trained on perturbational data.scwbd/intervene/impulse_response.py
Trained model that beats baselines does not exist Run 1's artifact lost. Run 2's pilot is training now. Nothing on this site should be read as a claim that we have one.
SC-WBD-002 training The first model on real anatomy — and, as it turns out, trained on simulation alone.4Found at step 6166 of 8700, while the run was still going. Run 2 renamed its training stages; the trainer gates measured-data losses on the previous run's stage names, so the gate never opened. The real-EEG loader was built and its split fingerprinted, and no stage ever took a gradient on it — for nine hours the only loss field emitted was sim_forecast_nll. Nothing raised, because an unmatched stage name means "no real loss" rather than "unknown stage". Two further mechanisms were inert for the same reason: per-stage gradient permissions all fell back to the wildcard, and no individualizer was ever built, so the stage named T1_individualisation ran 900 steps of ordinary simulator training. 2.5M parameters over 414 parcels with per-family engineered backends, heterogeneous per-family state widths, and state-dependent predictive variance.5This entry previously said "a ragged state layout (52% of the padded plane removed)". Both halves were wrong. Run 2 ships the padded layout — the checkpoint records layout: family_padded — with 47.34% of the (414 × 59) plane being pad, because two hippocampal parcels of width 2 set the width for all 414 regions. The ragged layout is built and tested but is not what these weights use, and the 52% figure was computed against an 11-family partition that no longer exists. Distinct from 001-beta in a way that is not a judgement call: the run-1 checkpoints refuse 414-region input, so the two do not share an input space and cannot be compared.
Impulse response measured Two TMS coil poses produce measurably different predicted EEG, and a 200-permutation shuffled-normal null puts the real contrast above every permutation (p = 0.005): orientation carries the difference, not field magnitude. The criterion was committed while the checkpoint directory was still empty.

Published artifacts

Everything below is on the Hugging Face Hub, public, with a card that states what it is and what it is not. The licences differ per artifact because the data underneath them differs — that is computed per artifact, not asserted once.

ArtifactWhat it isLicence
anatomy-prior-414 The 414-parcel group-average prior: connectome, geometry, cortical normals, folding coherence. Not NC-SA — it omits the regional maps, which are the one production asset carrying a non-commercial share-alike term.
sim-corpus-414-subset Simulated trajectories over the same 414 parcels, for anyone reproducing the training curve without the measured corpus. Generated by this repository.
scwbd-001-beta Run-1 weights, published as a negative result: it loses to copying the last observed sample forward. Structurally the control arm of our own ablation. Inherited from the corpora it was trained on.
scwbd-002-pilot Run-2 weights — the treatment arm, family-indexed heterogeneous regional state. Published as a negative result: it loses to every baseline on both columns, NLL and MSE.6NLL 3.179 against 2.045 for the best baseline; MSE 36.27 against 4.53. Every paired participant-clustered interval excludes zero. Run 1 at least won the conditional mean — run 2 does not, so the "the loss is all in the variance channel" diagnosis does not transfer. And 3.179 flatters it. SC-WBD is scored on target/s with the Jacobian folded into the log-variance; every baseline is scored on the raw target. NLL_scaled = NLL_raw − log s, and mean(log s) = 0.5694 on this fold — roughly 17× the 0.035-nat spread across the three non-trivial baselines. In their units the NLL is ≈ 3.75 and the gap ≈ 1.70 nats. No verdict changes; every interval moves further from SC-WBD. Two more things the model card carries. subject_specific_ar is bit-for-bit identical to ar16 — the participant-disjoint split leaves no test participant with a fitted model, so the thesis's hardest baseline never ran, while its own describe() reports fallback_subjects=0. Read the table as five comparators. And individualisation cannot be measured on this holdout at all: no held-out person has a fitted person effect, so the between-participant spread of the applied θ shift is exactly 0.000e+00. That is a property of the split, not a defect of the run. The number that explains it: it scores 0.565 on simulation and 3.179 on measured EEG, because five of six curriculum gates were wrong and no gradient was ever taken on a recording. And that is the smaller half. 88.7% of the model could not receive a gradient at all — 2,231,447 of 2,516,530 trainable parameters, including the entire family-indexed regional model that is the treatment arm's whole thesis.7The regional modules were renamed localfamily_local, residualfamily_residual, readoutfamily_readout when the family-padded architecture landed. The source cards still grant local.*, residual.*, readout.*, and fnmatch("family_local.ports.out_proj.weight", "local.*") is False. An unmatched glob is not an error — it is an empty permission set, which is a legal permission set. The 285,083 parameters that were reachable are enough to fit something, so the loss fell, the run finished, and five separate audits passed over it. Mechanism and measurement agree independently: those exact modules are bit-identical across every consecutive pair of the five stage checkpoints. So the negative result does not say heterogeneous regional state fails to help. That part of the model was a random initialisation participating in the forward pass for 8,700 steps. Inherited from the corpora; the anatomy prior's terms apply.

Run 2 is done and listed above with its measured result, which is a loss. That was the commitment made here while it was still training — "it will be listed with its measured result, whatever that result turns out to be" — and the result turned out to be worse than run 1's.

Who this is for

Who it is built for, in order of how directly it is usable today.

The paper

The full technical description, built from LaTeX source in this repository rather than shipped as a stale PDF.9Built with make paper, which runs tectonic over paper/sc_wbd_frontiers.tex. 29 pages. The source is the artifact; the PDF is a build product.

Jacob — repository link

This checkout has no git remote configured (git remote -v is empty), so I could not link the repository or verify a canonical URL. Every “view source” link on this site is currently rendered as a plain path rather than a dead hyperlink.

Set SITE_REPO_URL in site/build.py (or export it before make site) once the public repository exists, and the provenance chips throughout the engineering essays become links.

Video

Two short pieces, rendered from code so that every figure in them comes from the same source as the figures on this site.10Built with Remotion under video/, rendered locally with make video, and uploaded to object storage with make video-upload. Media is never committed to the repository — the compositions are the source, and the MP4s are build products.

Jacob — video hosting

Two videos are rendered and uploaded to R2, but the bucket is not served publicly, so there is no URL to embed here. Making a bucket world-readable is a hosting posture decision, so it was left to a human rather than taken on your account.

To publish them:

npx wrangler r2 bucket dev-url enable scwbd-media
then rebuild with SITE_MEDIA_URL=<the r2.dev URL> make site and this block is replaced by the players.

Alternatively attach a custom domain to the bucket, which is the better option for anything long-lived — r2.dev URLs are rate-limited and not intended for production traffic.