NeuroRVQ: Scalable EEG Tokenization Model
- NeuroRVQ is a scalable EEG tokenization framework that uses hierarchical Residual Vector Quantization to preserve multi-scale temporal and spectral signal features.
- It integrates a multi-branch temporal encoder with shared transformer modules to generate robust discrete tokens for efficient reconstruction and downstream classification.
- The model achieves superior reconstruction fidelity across EEG bands and competitive classification performance with a compact parameter count.
NeuroRVQ is a scalable Large Brainwave Model (LBM) centered on a codebook-based tokenizer for electroencephalography (EEG), devised to preserve multi-scale temporal and spectral structure during generative masked modeling (Barmpas et al., 15 Oct 2025). Its defining components are a multi-scale feature extractor, hierarchical residual vector quantization (RVQ) codebooks, and an EEG signal phase- and amplitude-aware loss function. In the reported formulation, these elements support efficient EEG compression, accurate reconstruction across all frequency bands, and transfer to multiple downstream EEG classification settings. Closely related later work, particularly BrainRVQ, extends the same general residual-quantization paradigm toward dual-domain tokenization and hierarchical autoregressive pre-training for EEG foundation models (Cui et al., 18 Feb 2026).
1. Conceptual position within EEG foundation modeling
NeuroRVQ was introduced against the background that EEG captures neural activity across multiple temporal and spectral scales, while existing EEG foundation models trained to predict masked signal-tokens were reported to be limited by their tokenization modules (Barmpas et al., 15 Oct 2025). The specific deficiency identified is that existing neural tokenizers fail to preserve high-frequency dynamics, which in turn limits high-fidelity reconstruction. NeuroRVQ addresses that bottleneck by treating tokenization not as a secondary compression stage but as the central representational interface between raw EEG and generative masked modeling.
The architecture is organized into three stages: a Multi-Scale Temporal Encoder, a Hierarchical Residual Vector Quantization Tokenizer, and a Tokenizer Decoder with Fourier-domain reconstruction (Barmpas et al., 15 Oct 2025). Per EEG sample , the signal is divided into non-overlapping patches of length , for example samples for at , and then transformed into branch-specific latent tokens that are subsequently discretized by stacked RVQ codebooks. This design explicitly targets the full frequency neural spectrum rather than a single latent abstraction level.
A useful way to characterize NeuroRVQ is as a token-first EEG foundation-model pipeline. That characterization remains faithful to the reported workflow: tokenizer pre-training is performed end-to-end for reconstruction, the tokenizer is then frozen, and foundation-model pre-training is carried out on discrete tokens via masked-patch prediction (Barmpas et al., 15 Oct 2025). This suggests that NeuroRVQ’s principal technical contribution lies in the quality of the learned discrete token space as much as in the masked-modeling objective itself.
2. Multi-scale temporal encoding and hierarchical RVQ
The encoder is explicitly multi-branch. NeuroRVQ uses temporal branches in an inception-style module, where each branch applies two stacked sequences of $1$-D convolution, GroupNorm with $4$ groups, GELU, and $1$-D pooling (Barmpas et al., 15 Oct 2025). The four branches use filters with kernel stacks 0, 1, 2, and 3; the corresponding padding and pooling settings are chosen so that branch 4 is tuned to 5 structure and branch 6 to 7. After these operations, each branch yields a scale-specific feature map 8.
These features are embedded with learnable temporal embeddings 9 and spatial embeddings 0, then processed by a shared transformer encoder with 1 layers, 2 heads, and hidden dimension 3 to produce per-branch tokens 4 (Barmpas et al., 15 Oct 2025). The transformer is therefore shared across scales, whereas the subsequent quantization is branch-specific.
Hierarchical RVQ is the core discretization mechanism. For each branch 5, NeuroRVQ applies 6 residual-quantization steps with codebooks 7, each 8 with 9 and 0 (Barmpas et al., 15 Oct 2025). The reported encoding recursion is
1
and decoding reconstructs the branch representation by
2
This hierarchy implements progressively finer residual correction rather than a single hard assignment. In that sense, NeuroRVQ differs from flat tokenizers that map each patch to one codebook index. The hierarchy is intended to preserve fine structure that would otherwise be lost, particularly in higher-frequency EEG components (Barmpas et al., 15 Oct 2025).
3. Fourier-domain decoder and phase-/amplitude-aware objective
The tokenizer decoder operates in the Fourier domain. After summing the branchwise 3-tokens to reconstruct 4, NeuroRVQ applies a shared transformer decoder with 5 layers and three prediction heads for log-amplitude 6, 7, and 8, followed by an inverse Fourier transform to obtain 9 (Barmpas et al., 15 Oct 2025). This is not a purely time-domain decoder: spectral amplitude and phase are modeled directly, then projected back to waveform space.
The loss function combines amplitude, phase, temporal, and quantization terms. The reported amplitude loss is
0
The phase loss uses a unit-circle representation,
1
with 2 (Barmpas et al., 15 Oct 2025). After inverse Fourier transformation, the temporal loss is
3
The total tokenizer loss is
4
with 5 in practice (Barmpas et al., 15 Oct 2025).
This objective is technically consequential for two reasons. First, the log-amplitude head emphasizes high frequencies by compressing spectral dynamic range. Second, the phase formulation constrains predictions on the unit circle rather than treating phase as an unconstrained scalar. The reported discussion identifies this hybrid Fourier-domain loss as one of the main reasons NeuroRVQ can reconstruct 6–7 structure with low error (Barmpas et al., 15 Oct 2025).
4. Training protocol and foundation-model usage
Tokenizer pre-training is performed end-to-end with the reconstruction objective 8. The reported setup uses 9 public datasets plus 0 proprietary dataset comprising approximately 1 hours of motor EEG, all resampled at 2, with batch size 3, AdamW with 4 and weight decay 5, a cosine learning-rate schedule from 6 to 7, warmup for 8 epochs, and 9 training epochs on $1$0 Tesla V100 GPUs (Barmpas et al., 15 Oct 2025).
Foundation-model pre-training then uses the discrete tokens from the frozen tokenizer. The reported objective is masked-patch prediction with symmetric spatial inverse masking, with approximately $1$1 of patches masked; training uses batch size $1$2, AdamW with weight decay $1$3, cosine learning rate $1$4, warmup for $1$5 epochs, and total duration $1$6 epochs (Barmpas et al., 15 Oct 2025). Fine-tuning is evaluated on motor ($1$7 classes), memory ($1$8 classes), sleep ($1$9 classes), and eyes-open/closed ($4$0 classes), using $4$1-fold subject-independent cross-validation, batch size $4$2, AdamW with weight decay $4$3, learning rate $4$4, a linear learning-rate schedule with warmup $4$5 epochs and decay factor $4$6, and $4$7 epochs with early stopping on sleep.
This training sequence places NeuroRVQ in a specific class of EEG systems: the tokenizer is optimized first for faithful signal reconstruction, then reused as a fixed discretizer for representation learning. A plausible implication is that tokenizer quality directly conditions the ceiling of the downstream foundation model, which is consistent with the paper’s emphasis on the tokenization bottleneck (Barmpas et al., 15 Oct 2025).
5. Reconstruction fidelity and downstream performance
The reported reconstruction results are unusually strong across EEG bands. After $4$8 epochs, in-distribution validation MSE is reported as $4$9 on Raw, $1$0 on Delta, $1$1 on Theta, $1$2 on Alpha, $1$3 on Beta, and $1$4 on Gamma, compared with LaBraM values of $1$5, $1$6, $1$7, $1$8, $1$9, and 0, respectively (Barmpas et al., 15 Oct 2025). Out-of-distribution results are likewise favorable: on Memory, Raw MSE is 1 and Gamma MSE is 2, compared with 3 and 4 for “LaBraM (ours)”; on Motor, Raw MSE is 5 and Gamma MSE is 6, compared with 7 and 8 (Barmpas et al., 15 Oct 2025).
These numbers directly address a common misconception about codebook tokenizers for EEG, namely that they mainly preserve low-frequency rhythms while degrading fast dynamics. NeuroRVQ was proposed precisely because existing tokenizers were said to fail at preserving high-frequency dynamics, and the reported gamma-band MSE values are presented as evidence that the redesigned tokenizer materially changes that regime (Barmpas et al., 15 Oct 2025).
Downstream balanced-accuracy results show the same pattern. NeuroRVQ reports 9 on Motor, 00 on Memory, 01 on Sleep, and 02 on Eyes, with mean 03 and a 04M backbone (Barmpas et al., 15 Oct 2025). The comparison table lists NeuroGPT at mean 05 with 06M parameters, CBraMod at 07 with 08M, LaBraM at 09 with 10M, and EEGPT at 11 with 12M. The paper summarizes this as the highest mean accuracy, at approximately 13 above NeuroGPT, with a compact backbone.
6. BrainRVQ as a dual-domain elaboration of the NeuroRVQ paradigm
BrainRVQ is a later high-fidelity EEG foundation model that replaces standard masked modeling with a Dual-Domain Residual Vector Quantization (DD-RVQ) tokenizer and a hierarchical autoregressive pre-training objective (Cui et al., 18 Feb 2026). Its design can be read as a NeuroRVQ-style extension in which the token space is explicitly factorized into temporal waveform structure and spectral content. At sample rate 14, it uses patch length 15 samples (16), splits 17 into non-overlapping patches 18, and encodes each patch with a shared encoder 19. The temporal branch uses 20 directly, while the spectral branch computes the DFT, keeps amplitude 21, discards phase 22 in the encoder, and uses phase as a reconstruction target.
Each branch has an independent RVQ cascade. For layer 23, codebooks 24 are learned with EMA updates. Quantization proceeds by residual subtraction,
25
and the quantized vector is
26
The temporal decoder reconstructs waveform, the frequency decoder predicts amplitude and phase, and the total tokenizer loss is
27
with 28 and EMA decay 29 (Cui et al., 18 Feb 2026).
BrainRVQ’s pre-training objective is explicitly hierarchical:
30
implemented with a shared transformer encoder, layer-specific heads 31, and teacher forcing during training. The layer-wise cross-entropy terms are weighted by 32, normalized so that 33 (Cui et al., 18 Feb 2026). Masking is not uniform; importance-guided curriculum masking scores patches using neural band ratio with power in 34–35, artifact penalty from power outside 36–37, Hjorth parameters, and an irregularity measure, then interpolates between random and score-based masking with 38, 39, and mask ratio 40.
The hierarchical code structure is empirically supported in the reported layerwise prediction accuracies: approximately 41 for the first layer, 42 for layer 43, and 44 for layer 45, indicating that coarser codes are more predictable than deeper residual codes (Cui et al., 18 Feb 2026). On downstream tasks, BrainRVQ is reported to outperform supervised baselines such as EEGNet and ST-Transformer as well as SSL or foundation models including BENDR, BIOT, LaBraM, and CBraMod across 46 datasets. Reported highlights include Mental Workload AUROC 47 versus 48, CHB-MIT Seizure AUROC 49 versus 50, TUEV Event Classification Kappa 51 versus 52, and BCICIV-2a Motor Imagery Kappa 53 versus 54 (Cui et al., 18 Feb 2026). Ablations show that removing either domain branch, collapsing RVQ to 55 layer, replacing autoregression with independent prediction, or using uniform masking degrades performance by 56–57 relative.
7. Scaling behavior, limitations, and research directions
The reported NeuroRVQ discussion emphasizes three strengths: faithful reconstruction of all EEG bands from 58 to 59 with orders-of-magnitude lower MSE, a compact tokenizer and foundation model at roughly 60M parameters, and a hybrid Fourier-domain loss that enforces valid phase and emphasizes high frequencies through log-amplitude (Barmpas et al., 15 Oct 2025). At the same time, the paper identifies several open questions: the masking strategy could be further optimized, for example with causal or attention-guided masks; the temporal scales are fixed at four branches, whereas adaptive scales may better model subject-specific rhythms; and the method is EEG-only, so extension to ECG, EMG, or fNIRS would require co-tokenization strategies.
BrainRVQ adds complementary scaling observations. In the reported best-practice regime, performance scales smoothly with more pre-training hours from 61 to 62 and with larger model depths from 63 to 64 layers; multi-layer RVQ with 65 is described as critical for tasks requiring fine detail, with 66 layers as a sweet spot; and mask-ratio sensitivity follows an inverted-U pattern, with 67–68 masks working best (Cui et al., 18 Feb 2026). These claims do not alter the original NeuroRVQ formulation, but they sharpen the broader design space around hierarchical EEG tokenization.
Taken together, the NeuroRVQ line of work frames EEG tokenization as a spectro-temporal discretization problem rather than a generic latent compression problem. The central idea is stable across variants: preserve neural structure at multiple scales, discretize it hierarchically, and train downstream generative models on those discrete codes. A plausible implication is that future progress will depend less on scaling masked modeling alone than on improving the structure of the token alphabet itself, whether through adaptive temporal scales, richer masking curricula, or multimodal codebooks spanning EEG and other biosignals (Barmpas et al., 15 Oct 2025).