Writing
July 9, 2026 · 6 min read

A brain foundation model that skips tokenization entirely

B[FM]² pretrains an EEG foundation model with continuous-time flow matching instead of masked patches, using a fraction of the data prior models needed and setting a new state of the art on most benchmark tasks.

eegflow-matchingfoundation-modelsgenerative-aineuroscience

The tokenization habit doesn't fit brain signals

Most sequence foundation models inherited a design choice from language modeling: chop the input into discrete chunks, mask some of them, and train the model to reconstruct what's missing. That works because language already comes in discrete units — words, subwords. EEG doesn't. A multi-channel scalp recording is a continuous, densely sampled voltage trace, and cutting it into patches imposes boundaries the signal itself doesn't have.

That's the starting complaint of B[FM]²: Brain Foundation Model via Flow Matching with SplitUNet, from Jaedong Hwang, Kathleen Zhang, Wei Dai, Konstantinos Kontras, Maarten Vanmarcke, Maarten De Vos, Ila Fiete, and Paul Pu Liang (MIT and KU Leuven). Their diagnosis, stated directly: "discretization imposes artificial boundaries on a signal that has none — the objective ends up modeling transitions between arbitrary chunks instead of the continuous evolution of the signal, and random masking throws away exactly the fine-grained temporal detail clinical tasks rely on." Prior EEG foundation models like LaBraM and CBraMod follow the masked-patch recipe anyway, because it's the recipe that transferred from vision and language. B[FM]² is a bet that the pretext task should match the data, not the other way around — the paper's framing is blunt: instead of "predict the masked token," why not "learn to turn noise into a brain signal"?

Flow matching in place of masking

The pretraining objective is continuous-time flow matching. You draw Gaussian noise at t=0, place real EEG at t=1, and train a velocity field along the straight-line interpolant between them:

$$\mathcal{L}(\theta) = \mathbb{E},\big\lVert, v_\theta(x_t, t) - (x_1 - x_0),\big\rVert^2$$

There's no patch grid, no vocabulary, no masking ratio to tune. The model learns a vector field that moves noise toward the data manifold, and at inference it can be integrated forward to generate signal or used as a representation extractor for downstream classifiers. The authors also use optimal-transport coupling (OT-CFM), which re-pairs each minibatch's noise and data samples so the learned flow stays close to straight — fewer integration steps, less curvature to fit.

SplitUNet: an architecture built for the asymmetry

The harder problem is that EEG isn't symmetric the way images are. A recording has thousands of timepoints but only a few dozen electrodes — dense in time, sparse in space. A standard 2D convolutional U-Net wastes capacity treating both axes the same way.

SplitUNet, the velocity network in B[FM]², factorizes every spatiotemporal convolution into two 1D operations: a temporal convolution shared across electrodes, then an electrode convolution shared across time:

$$\mathrm{conv}{(1+1)\mathrm{D}}(z) = \mathrm{conv}{\text{electrode}}\big(,\sigma(,\mathrm{conv}_{\text{time}}(z),),\big)$$

The encoder downsamples only along the time axis — four stages, each halving the temporal resolution while every electrode channel stays intact end to end — followed by a self-attention bottleneck and a symmetric decoder that upsamples time back out. The authors' justification is that temporal dynamics and inter-electrode coupling are "largely separable," so factorizing recovers what a 1D-only model loses without paying for what a full 2D model wastes.

SplitUNet factorizes EEG convolutions into separate temporal and electrode passes, downsampling only along time while preserving every electrode channel

Fewer hours, more wins

B[FM]² pretrains on the TUEG corpus — 36,895 segments, roughly 307 hours — which is small next to recent baselines; REVE, one of the comparison models, pretrains on roughly 60,000 hours. Evaluated on nine standard downstream EEG classification benchmarks (Mumtaz, MAT, Siena, ISRUC, HMC, TUEV, TUAB, BCIC-IV-2a, and SEED-V), B[FM]² sets a new state of the art on seven of the nine and posts the best average balanced accuracy at 0.754, ahead of REVE (0.727), CSBrain (0.723), CBraMod (0.705), and LaBraM-Base (0.686).

Average balanced accuracy across nine EEG benchmarks plotted against pretraining hours: B[FM]² reaches the highest score at 2–200x less pretraining data than LaBraM, CBraMod, CSBrain, and REVE

That combination — best average accuracy, smallest pretraining corpus — is the paper's central claim, and it's a direct consequence of matching the pretext task to the signal: a continuous objective doesn't need volume to compensate for the information a masking scheme throws away.

The generative sanity check

Because the model is trained to generate, not just encode, the authors ran a Turing-style test: two board-certified neurologists tried to distinguish B[FM]²-generated EEG segments from real recordings. Their agreement with ground truth came out to Cohen's κ = −0.096 — at or below chance level, meaning their calls tracked no real signal in the labels at all. That's a stronger claim than a benchmark table: it says the learned velocity field isn't just extracting features that happen to be linearly separable for classifiers, it's modeling the actual statistics of brain rhythms closely enough to fool trained clinicians.

Why this matters past EEG

I've spent enough time on production generative and agentic systems to be wary of pretext-task cargo culting — masked-token pretraining became the default across modalities largely because it worked for text first, not because every modality's statistics resemble language. B[FM]² is a clean demonstration that when your data is genuinely continuous — EEG, but also ECG, IMU streams, other multichannel sensor telemetry — a continuous-time generative objective can beat tokenization on both sample efficiency and downstream accuracy, without a bigger model or more compute-hungry pretraining.

The open question the paper doesn't settle is inference cost: flow matching typically needs multiple integration steps to sample or represent a signal well, versus a single forward pass for a masked-token encoder, and that tradeoff matters once you're serving classifications in a clinical or BCI pipeline rather than just publishing a benchmark number. Worth watching whether SplitUNet-style architecture-matches-signal thinking shows up in other continuous-sensor foundation models next, and whether the step-count cost gets pushed down as this line of work matures.

References
  1. 01B[FM]²: Brain Foundation Model via Flow Matching with SplitUNet (arXiv:2606.20812)
  2. 02B[FM]² project page
  3. 03B[FM]² technical blog post