TL;DR
UniMind is an EEG foundation model that connects electroencephalography signals directly to Large Language Models (LLMs) to perform unified, multi-task brain decoding. By decoupling spatial and temporal signal features through a specialized Neuro-Language Connector and routing them via a Task-aware Query Selection module, UniMind achieves an 11% average gain over existing multi-task baselines—becoming the first unified EEG-to-text model to match or beat specialized, single-task models.
What Problem Does This Paper Address?
Electroencephalography (EEG) records continuous, noisy, non-stationary electrical brain activity across varying channel configurations, durations, and sampling rates. While deep learning models can decode mental states (e.g., sleep stages, seizures, or emotions), most are task-specific—requiring bespoke architectures and dedicated fine-tuning.
Previous attempts at universal multi-task EEG foundation models faced two major bottlenecks:
- A massive modality gap: Converting continuous, high-noise, spatiotemporal neural waveforms into the discrete token semantic space of an LLM is far harder than text, audio, or vision.
- Negative transfer across tasks: Jointly training on heterogeneous EEG tasks often leads to catastrophic interference. Naively mixing datasets can degrade performance compared to training models independently on single tasks.
Methods
UniMind unifies multi-task decoding by reframing classification as conditional text generation ([EEG Features] + [Instruction Prompt] -> Text Label) using a frozen/LoRA-tuned LLM backbone (tested with Qwen2-0.5B and InternLM2.5-1.8B/7B). Its core architecture consists of:
- Pretrained EEG Patch Encoder: Uses a LaBraM backbone to segment raw multi-channel EEG signals into standard token embeddings.
- Task-aware Query Selection (TQS): To avoid inter-task interference, TQS maintains separate pools of temporal and spatial query tokens ($P_t, P_s$). A light routing network scores input embeddings and dynamically retrieves the $k$-best task-adaptive queries, combining them with a static query token.
- Neuro-Language Connector (NLC): A dual-branch cross-attention module that maps EEG features into LLM-understandable representations. One branch aggregates temporal dynamics across time within each channel ($Q_t$), while the other captures spatial dependencies across channels at each timestep ($Q_s$). The outputs are concatenated and projected linearly into the LLM’s input dimension.
Raw EEG ──> LaBraM Encoder ──> EEG Embeddings (E)
│ │
┌────────────────────┘ └────────┐
▼ ▼
TQS Router ──> Top-K Queries NLC Dual-Branch
(Spatial/Temporal) (Cross-Attention)
│ │
└──────────┬──────────┘
▼
Projected Tokens
│
Task Prompt ───────────────┴──> LLM (LoRA) ──> Text Output
Datasets
The authors compiled a unified instruction-tuning dataset containing 929k samples across 10 public EEG benchmarks spanning five core clinical and cognitive domains:
- Sleep Staging: HMC, SleepEDF, SHHS
- Emotion Recognition: SEED, SEED-IV
- Clinical Anomaly & Event Detection: TUAB, TUEV, TUSL
- Mental Workload: Workload dataset (mental arithmetic)
- Motor Imagery: SHU (imagined hand movements)
Evaluation incorporates both cross-subject splits (unseen subjects in test) and multi-subject chronological splits.
Key Insights and Ideas
- Naive joint training fails spectacularly: Simply fine-tuning a foundation encoder across multiple EEG tasks simultaneously causes negative transfer. For instance, jointly training LaBraM on TUAB and TUEV caused balanced accuracy on TUEV to plummet from 64.09% to 37.91%. TQS is essential to filter out task conflicts.
- Emergent neuroscientific alignment: Visualizing the query routing patterns revealed that functionally related tasks autonomously select similar spatial queries. Emotion tasks (SEED) and clinical seizure detection (TUAB/TUEV) shared spatial attention over bilateral temporal electrodes ($T7$ and $T8$), mirroring known neuroscience findings on emotional processing and temporal lobe epilepsy.
- Massive boosts for low-resource tasks: Pooling diverse data dramatically rescues tiny datasets. On TUSL (just 245 samples), multi-task training boosted balanced accuracy by +28.81% over the single-task baseline (50.14% $\to$ 78.95%).
Key Results
- Multi-task SOTA: UniMind achieves 70.67% average Balanced Accuracy across 10 datasets, outperforming the leading multi-task baseline NeuroLM (59.65%) by 11%.
- Beating single-task specialists: In cross-subject generalization, UniMind outpaced all dedicated single-task baselines (including BIOT, LaBraM, and CBraMod).
- Generative vs. Contrastive: Compared to an EEG-CLIP contrastive alignment baseline on HMC and TUAB, UniMind delivered superior accuracy (e.g., 75.27% vs 72.16% on HMC), proving that direct generative instruction tuning is more robust than embedding-space contrastive matching.
Limitations and Future Work
- Modalities: The model is currently trained exclusively on non-invasive scalp EEG data; authors plan to extend it to fMRI, MEG, and intracranial EEG.
- Loss of Calibrated Probabilities: Because UniMind generates text tokens directly, it cannot readily output calibrated probabilities required for confidence metrics like AUROC/AUPRC, requiring the use of discrete evaluation metrics (Balanced Accuracy, Cohen’s Kappa, and Weighted F1).
Summary updated