BrainFM: Brain-Driven Computational Systems
- BrainFM is a term defining diverse brain-oriented systems that include real-time EEG-to-music interfaces and multi-task imaging foundation models.
- The EEG sonification implementation uses a minimalist, closed-loop design that maps frontal alpha asymmetry to adaptive music generation.
- The imaging framework employs a shared encoder with task-specific heads and dynamic modality integration to enhance synthesis, segmentation, and registration.
BrainFM is a name used in recent research for multiple brain-oriented computational systems. In one usage, it denotes a minimalist brain-computer musical interface that performs real-time affective sonification by translating prefrontal EEG activity into adaptive music (Monroy-D'Croz et al., 31 May 2026). In another, it denotes a modality-agnostic, multi-task vision foundation model for human brain imaging, designed to be resilient to modality, contrast, deformation, resolution, and artifacts (Liu et al., 30 Aug 2025). A related usage, “BrainFM-MRI,” refers to a foundation model for brain MRI with dynamic modality integration, masked autoencoding, and conditional layer normalization (Luu et al., 4 Nov 2025). This suggests that the label identifies a family of technically distinct systems rather than a single unified platform.
1. Nomenclature and research scope
Recent literature uses the name across at least three distinct technical contexts: closed-loop EEG-to-music interaction, multi-task neuroimaging, and self-supervised brain MRI representation learning. In the EEG domain, the name is attached to “A Minimalist Brain–Computer Musical Interface for Real-Time Emotion-Driven Sonification,” which emphasizes low-channel-count acquisition, real-time signal processing, and adaptive music generation (Monroy-D'Croz et al., 31 May 2026). In neuroimaging, the name is attached to a modality-agnostic model that uses a shared encoder plus task-specific heads to solve multiple 3D brain-imaging tasks (Liu et al., 30 Aug 2025). In brain MRI, the related “BrainFM-MRI” formulation centers on dynamic modality integration under missing or unseen sequence combinations (Luu et al., 4 Nov 2025). By contrast, the benchmark “Brain4FMs” uses “BFMs” as a broader category label for foundation models of electrical brain signals rather than as a specific system name (Shen et al., 12 Feb 2026).
| Usage of the name | Domain | Representative paper |
|---|---|---|
| BrainFM as BCMI sonification system | EEG, affective sonification, music feedback | (Monroy-D'Croz et al., 31 May 2026) |
| BrainFM as vision foundation model | Human brain imaging, multi-task 3D learning | (Liu et al., 30 Aug 2025) |
| BrainFM-MRI | Brain MRI, dynamic modality integration | (Luu et al., 4 Nov 2025) |
This terminological overlap is consequential. Without disambiguation, “BrainFM” may refer either to a real-time closed-loop brain-computer musical interface or to a foundation-model architecture for structural brain imaging.
2. BrainFM as a real-time brain-computer musical interface
In the BCMI usage, BrainFM is a minimalist affective sonification system that estimates emotional valence from frontal alpha asymmetry and maps that estimate to musical parameters in real time (Monroy-D'Croz et al., 31 May 2026). The EEG hardware is a BITalino (r)evolution Plugged Kit BT with five Ag/AgCl electrodes. The acquisition uses a two-channel bipolar montage at AF7 and AF8, with reference at A2, 25 mm spacing, impedances kept below , sampling at , and Bluetooth transmission. The software stack is a Python 3.9 multithreaded application using Lab Streaming Layer for time-synchronized multimodal data transport and XDF recording of raw EEG at , emotion estimates at , and MIDI/event markers. Signal processing uses SciPy and NumPy; MIDI generation uses Mido; rendering is performed in Ableton Live 11, which hosts virtual “chamber-orchestra” instruments—piano, cello, and bass—and pre-recorded instructions generated with Narakeet TTS. Audio feedback is routed through a Behringer U-PHORIA UMC22 to Sony MDR-V6 headphones.
The architecture is explicitly closed-loop. EEG is streamed to Python, features are extracted every , emotion estimates are published via LSL, and a Python scheduler regulates eighth-note “tick” events with an inter-tick interval that adapts to current arousal. MIDI note-on, note-off, and CC messages are sent to Ableton Live through a virtual MIDI port, and auditory instructions are triggered by MIDI CC mapped to TTS clips. The participant therefore hears music that depends on their own EEG, while all streams—EEG, emotion, MIDI, and events—are logged in XDF for post-hoc replay.
This implementation is “minimalist” in a specific sense: it relies on a sparse prefrontal montage and a comparatively compact software chain rather than a high-density EEG system or a large learned model. A plausible implication is that the design prioritizes rapid deployment and transparent mapping over spatial coverage.
3. Signal construction and music-generation logic
The BrainFM BCMI computes its control variables from sliding EEG windows of with overlap, yielding an update every , and estimates power spectral density via Welch’s method (Monroy-D'Croz et al., 31 May 2026). Alpha-band power is computed over at AF7 and AF8, with optional beta power for an arousal index. Artifact removal is limited to impedance control and band filtering.
The core asymmetry feature is frontal alpha asymmetry:
Normalization combines a local min–max normalization over the past 0 with a recursive long-term min–max to bound features in 1. The arousal and valence variables are defined as
2
and
3
The final emotion estimate is
4
and a 5-s moving average 6 is used for mode selection.
Musical mapping is rule-based but stochastic. Harmonic mode is selected from seven diatonic modes ordered from positive to negative, from Lydian mode 7 to Locrian mode 8, with modal index
9
Each mode is instantiated through a four-bar 0 progression voiced on piano, cello, bass, and melodic voice. Tempo is driven by arousal through
1
corresponding to approximately 2 when arousal is 3 and up to approximately 4 when arousal is 5. Rhythmic density is controlled via a roughness term 6; at each eighth-note tick 7 and voice 8, a note is triggered if 9, with expected activations per tick approximately 0. Loudness is set through MIDI velocity
1
giving a span from approximately piano (2) to forte (3) as arousal rises. Pitch register uses voicing 4; accompaniment chord tones are transposed by octave offsets in 5, biased upward when 6 and downward otherwise, while the bass root is set to root minus 7 semitones if 8, else root minus 9 semitones.
The mapping therefore couples harmonic mode, tempo, rhythmic density, loudness, and register to low-dimensional EEG-derived variables. This suggests a deliberately interpretable sonification strategy rather than an end-to-end learned music generator.
4. Experimental evaluation and limits of frontal alpha asymmetry control
The preliminary evaluation of the BCMI involved 0 healthy adults with mean age 1 years, including 12 musicians and 6 participants with acting training (Monroy-D'Croz et al., 31 May 2026). The protocol was within-subjects: 16 trials in random order, comprising 8 “happy” and 8 “sad” trials. Each trial consisted of a 2-s silent baseline, a 3-s instruction period, and 4-s music feedback. Before the block, participants completed a 5-s eyes-closed resting calibration; mood was assessed via IPANAS-R; a post-questionnaire captured strategies and subjective match.
The dependent variable was 6, sampled at 7. Statistical analysis used linear mixed-effects models in R with lme4, lmerTest, and clubSandwich. Random effects included intercepts for participant and trial and a participant-specific time slope. The base model used the fixed effects 8, and the full model added musician status, acting training, medication, prior exposure, baseline affect, age, and sex.
The reported findings were negative with respect to the main experimental manipulation. There was no significant main effect of target emotion 9, time 0, or their interaction 1. In the full model, experimental factors explained 2 of total signal variance, participant covariates explained 3, random effects totaled 4 with 5 at trial level and 6 between participants, and residual variance was 7. Individual differences contributed more strongly than the instructed emotion manipulation: musicianship increased predicted emotion 8, while acting training decreased it 9.
These results constrain interpretation. The study concludes that frontal alpha asymmetry did not reliably distinguish instructed emotional states and highlights the difficulty of using FAA as a voluntary control signal for closed-loop emotion regulation. Additional interpretive issues are explicit in the paper: effects of FAA are described as more robust under exogenous high-salience stimuli than under internally generated mood; the music is both driven by and influences EEG, creating a closed-loop confound that motivates yoked or sham controls; the sparse two-electrode montage may miss distributed emotion-regulation networks; and the high residual variance underscores EEG noise and single-trial unreliability. The software code, generative-engine parameter files, and raw XDF datasets are publicly available through the authors’ repository.
5. BrainFM as a modality-agnostic multi-task foundation model for human brain imaging
In neuroimaging, BrainFM is a modality-agnostic, multi-task vision foundation model for human brain imaging with a single shared encoder and small task-specific heads (Liu et al., 30 Aug 2025). The backbone is a standard five-level 3D U-Net with 64 channels at its coarsest scale, and each downstream task is served by a linear 0 convolutional head. The model is trained simultaneously on five tasks: image synthesis for CT and T1w/T2w/FLAIR MRI, anatomy segmentation, scalp-to-cortical distance estimation, bias field estimation, and atlas registration.
A central design element is “mild-to-severe” intra-subject generation. Starting from a high-resolution label map 1 with 2 tissue classes, the method applies a deformation field
3
where 4 is a random affine and 5 is an SVF-based diffeomorphism. Intensities are then “painted” according to
6
with 7 and 8 sampled under task parameters, after which the image is corrupted by anisotropic resampling, noise, and bias field distortions. The training loop generates 9 different volumes per subject on the fly, ranging from mild to severe. When a real scan of the same subject is available, BrainFM also applies a “real-synth” mix-up:
0
The task losses are explicit. Synthesis uses an 1 loss plus a gradient penalty; segmentation uses soft Dice plus cross-entropy; distance estimation uses 2; bias-field estimation uses squared 3; and registration uses 4 plus a gradient penalty. Training is performed on eleven public datasets—ABIDE, ADHD200, ADNI3, AIBL, Buckner40, COBRE, ISBI2015, HCP, Chinese-HCP, MCIC, and OASIS3—covering T1w, T2w, FLAIR, and CT. Preprocessing includes skull stripping with SynthStrip, resampling to 5 isotropic resolution, rigid registration of non-T1w to T1w within subject, and derivation of a 30-label gold-standard 6 via SynthSeg on T1w. Training uses batch size 4 intra-subject samples, patch size 7, 2,000 epochs, and AdamW with learning rate 8, 5-epoch warmup, and drops at epochs 1,000 and 1,600 by 0.1.
The evaluation reports that BrainFM outperforms both SCRATCH, which uses the same architecture trained from scratch, and Brain-ID, which is single-task and synthetic only, on all three train/test splits. On CT synthesis in Setup I, it achieves 9 versus 0 and 1, and 2, which is reported as a 3 increase over Brain-ID. In segmentation it improves Dice by approximately 2–3 points across modalities, and in registration it lowers 4 by approximately 5 voxels. Robustness analysis further reports that a single corruption level either underfits robustness or collapses the model, whereas the progressive mild-to-severe schedule reaches SSIM 6 and MS-SSIM 7 on held-out real images. The reported clinical workflows include robust modality-agnostic segmentation, CT 8 MRI synthesis for attenuation correction in PET-MRI, bias-field and distance estimation for improved surface reconstructions, and atlas registration for automatic ROI-based analyses. The code is publicly available.
6. Dynamic modality integration and related research directions
The related “BrainFM-MRI” model extends the BrainFM label into self-supervised multi-sequence brain MRI representation learning (Luu et al., 4 Nov 2025). It uses a single Transformer-style encoder that ingests arbitrary combinations of 3D sequences such as T1, T1c, T2, and FLAIR. Each volume is split into non-overlapping 9 patches, linearly projected to tokens, and conditioned by learnable modality embeddings obtained from a frozen pretrained text encoder. Modality information is injected into every Transformer layer through conditional layer normalization:
0
Pretraining uses a padding-aware masked autoencoding objective together with a VICReg-inspired variance–covariance regularizer. The dataset is FOMO25, also called FOMO60K, comprising 11,187 subjects, 13,900 sessions, and 60,529 3D MRI volumes from 16 centers. The backbone has 12 layers, hidden size 1, and 12 heads; mask ratio is 2; batch size is 64; training takes approximately 3 days on 3 A100 GPUs. In a preliminary MSLesSeg experiment on a 10-case subset, trained for 2 epochs under the T1+FLAIR-only setting, the pretrained encoder achieved Dice 4 and HD95 5, compared with 6 and 7 for a supervised 3D nnU-Net baseline. Code and pretrained models are publicly available.
Adjacent work clarifies the technical neighborhood in which the BCMI version of BrainFM operates. “Brian Intensify” presents an adaptive machine-learning framework for auditory EEG stimulation in Fragile X Syndrome, using PSD and PAC features, a Random Forest classifier, a Gradient Boosting Regressor, and Bayesian optimization over 7, 9, 11, and 13 Hz stimulation frequencies; its results identify 13 Hz as the condition yielding the largest increase in alpha power and strongest gamma suppression, and the paper explicitly frames this as a blueprint for BrainFM-style music neuromodulation (ElSayed et al., 12 Nov 2025). Jo et al. show that only an audible 40 Hz monaural beat produces a marked 40 Hz peak, progressive PSD increase over 10 minutes, and significant regional effects across frontal, central, temporal, parietal, and occipital regions, underscoring the importance of auditory sensation for brain modulation (Jo et al., 2023). “Musical NeuroPicks” demonstrates an earlier consumer-grade EEG-to-music preference system based on brainwave amplitudes, activation asymmetry, PAC, vector quantization, and extreme learning machines, with offline nRMSE 8 for NeuroPicks and 9 for NeuroPicksVQ (Kalaganis et al., 2017). At a broader methodological level, Brain4FMs organizes 15 brain foundation models and 18 public EEG/iEEG datasets under a unified self-supervised learning taxonomy and benchmark platform, situating BrainFM-like naming within a larger foundation-model ecosystem for brain data (Shen et al., 12 Feb 2026).
Taken together, these lines of work indicate that “BrainFM” has evolved into a cross-domain label spanning closed-loop affective sonification, auditory neuromodulation-adjacent BCMI design, and foundation-model approaches to brain imaging. The term therefore denotes a research trajectory characterized less by a single architecture than by the operationalization of brain-derived signals in adaptive computational systems.