BrainCodes offers compact EEG model for diverse brain monitoring tasks

BrainCodes: A Lightweight EEG Foundation Model over Discrete Neural Codes

Machine LearningNeural and Evolutionary Computing

Summary

Analyzing brain signals with EEG often needs big and complex models, which can be hard to use on small devices. The authors created BrainCodes, a small but powerful model trained on many hours of brain recordings from lots of people. This model learns useful brain features that work well for tasks like tracking sleep stages and attention, and can run on devices with limited computing power. It combines special ways to handle signals from different brain locations and frequencies.

What this means in practice

  • For wearable device engineers: Implement efficient EEG brain monitoring on low-power wearable devices using BrainCodes’ compact architecture and transferable features.$Commercial implications: Makes it viable to sell advanced brain monitoring wearables that run complex EEG models without large hardware.
  • For healthcare monitoring teams: Use BrainCodes to analyze EEG for sleep quality, attention, or cognitive load in clinical or remote monitoring setups with reduced computational cost.

Authors

Kleanthis Avramidis, Ivan Tashev, Dimitra Emmanouilidou

Abstract

Recent electroencephalography (EEG) foundation models increasingly emphasize model scale, potentially limiting their deployment on resource-constrained devices and in everyday environments. We argue that transferable EEG features can instead be learned with a compact architecture and introduce BrainCodes, a lightweight foundation model pretrained through self-supervised learning on more than 800 hours of recordings from over 1,000 participants. Our architecture combines a quantization-based neural tokenizer with a spatiotemporal encoder that supports arbitrary electrode configurations. The pretraining objective explicitly encourages representations that capture spatial connectivity through channel positional encoding, and sensitivity to narrowband neural oscillations through an auxiliary training objective. Our model matches or surpasses the state of the art across diverse neurophysiological monitoring tasks, including sleep staging, attention assessment, and cognitive load estimation. BrainCodes transfers effectively to low-resource wearable devices while using up to 97% fewer trainable parameters than comparable architectures. Beyond predictive accuracy, our evaluation framework characterizes the geometry and invariances of learned EEG representations across measurable spatial, temporal, and spectral signal properties.