Multi-Scale Spatiotemporal Graph Mamba
- The paper presents MSGM, a framework that integrates multi-window temporal segmentation, dual graph construction, and token fusion via a selective state-space layer to capture spatiotemporal dynamics.
- It employs rPSD feature extraction, ChebyNet-based graph encoders, and multi-depth processing to robustly model both global and local EEG channel interactions.
- It demonstrates state-of-the-art performance on SEED, THU-EP, and FACED datasets, achieving high accuracy and efficiency with only 349,218 parameters and millisecond-level inference.
Multi-Scale Spatiotemporal Graph Mamba (MSGM) is an EEG emotion recognition framework that combines multi-window temporal segmentation, bimodal spatial graph modeling, multi-depth graph convolution, token-embedding fusion, and a Mamba-based selective state-space layer to capture multi-scale spatiotemporal dynamics with linear sequence complexity. In its published form, MSGM is designed for subject-independent emotion classification on SEED, THU-EP, and FACED; it uses global-local graphs with neuroanatomical priors, processes fused token sequences with a single MSST-Mamba layer, and reports state-of-the-art or superior accuracy/F1 together with 349,218 parameters and millisecond-level inference on NVIDIA Jetson Xavier NX (Liu et al., 21 Jul 2025).
1. Problem setting and architectural rationale
MSGM addresses three coupled difficulties in EEG-based emotion recognition: multi-scale temporal dynamics, spatial hierarchies across EEG channels, and efficiency constraints for real-time deployment. The method assumes that emotional states contain both short-lived fluctuations and longer trends, that EEG channels exhibit both distributed global connectivity and localized regional interactions, and that attention-heavy spatiotemporal models are often too costly for edge hardware. Its central design therefore unifies multi-window temporal segmentation with bimodal graph construction and a selective SSM, rather than treating temporal modeling and graph modeling as separate stages (Liu et al., 21 Jul 2025).
The end-to-end pipeline is organized as follows. Raw EEG is segmented first into 20 s macrowindows with 4 s hop, and then into multiple second-level sub-window scales. For each scale, rPSD features over seven frequency bands are extracted, global and local adjacency matrices are built, four ChebyNet encoders generate shallow/deep graph features, and a base linear tokenization is fused with these graph-derived features. The resulting token sequences are then processed by MSST-Mamba, after which branchwise pooling, normalization, scale averaging, and linear classification produce the final prediction. A common misconception is that MSGM is simply a Mamba replacement for a Transformer; in the published architecture, graph construction, ChebyNet encoding, and token fusion remain structurally central rather than auxiliary (Liu et al., 21 Jul 2025).
2. Multi-window temporal representation
The raw EEG signal is denoted by . First-level segmentation uses a sliding 20 s window with 4 s hop, where and , producing macrowindows . Each macrowindow is then split into second-level temporal scales with dataset-dependent sub-window lengths and strides. For scale with window length and hop , the subsegments are
This design preserves multiple temporal granularities by retaining the segment count at each scale rather than collapsing all local structure into a single summary (Liu et al., 21 Jul 2025).
Feature extraction is performed in the frequency domain using relative power spectral density across seven bands: delta 0–1, theta 2–3, alpha 4–5, low beta 6–7, beta 8–9, high beta 0–1, and gamma 2–3. SEED uses 62 channels under the 10-20 system with 1000 Hz sampling and 0.3–50 Hz bandpass filtering; THU-EP and FACED use 32 channels under NeuSen.W32 with 250 Hz sampling and 0.05–47 Hz bandpass filtering plus ICA artifact removal. After flattening, a linear projection forms per-scale tokens,
4
Within this framework, rPSD outperforms PSD and DE; on SEED, rPSD achieves ACC 83.43 and F1 85.03, exceeding DE by +5.77 ACC and +11.75 F1 and exceeding PSD by +11.27 ACC and +16.69 F1 (Liu et al., 21 Jul 2025).
3. Bimodal spatial graph modeling and multi-depth graph encoding
For each temporal scale 5, MSGM constructs a tensor 6 with 7 frequency bands. After averaging over batch, 8 is reshaped to 9 and transformed as
0
where 1 and 2. The row vectors 3 serve as node features for graph construction. MSGM then builds a global adjacency 4 by combining PCC and Manhattan constraints: edges are retained when 5 and 6, where 7 is the 75th percentile of PCC and 8 is the 25th percentile of Manhattan distance. The retained edges are weighted by a Gaussian kernel,
9
with 0 computed from Euclidean distances across node pairs (Liu et al., 21 Jul 2025).
The local adjacency 1 is derived by restricting the global graph to same-region channel pairs under neuroanatomical priors:
2
The paper considers 7-, 10-, and 17-region schemes, with the 7-region partition yielding the best result. Each adjacency is duplicated into a two-slice tensor for shallow and deep encoders, 3 and 4. Spatial feature extraction is then performed by four ChebyNet encoders—shallow global, deep global, shallow local, and deep local—using
5
where 6 are Chebyshev polynomials of the normalized Laplacian, 7 are learnable coefficients, 8 is ReLU, and 9 is a bias. No graph pooling is used; instead, the shallow/deep global-local encodings are retained as complementary token sources (Liu et al., 21 Jul 2025).
4. Token fusion, MSST-Mamba, and prediction
Token formation begins with a base linear projection
0
where 1 is the flattened scale tensor. MSGM then fuses this base representation with graph-derived tokens by simple averaging. The global token sequence is
2
and the local token sequence is
3
After reshaping to 4, the global and local sequences are processed independently by MSST-Mamba (Liu et al., 21 Jul 2025).
The MSST-Mamba module is a stack of 5 MSSTBlocks with RMSNorm and residual connections:
6
In the published configuration, 7 gives the best performance by ablation. Inside each MambaBlock, the normalized input is linearly expanded and split into main and residual paths; the main path passes through depthwise temporal Conv1D with kernel size 4 and SiLU activation, while the residual path forms a multiplicative gate. The selective SSM is parameterized from the activated sequence:
8
yielding 9, 0, and 1, and
2
With learnable negative-initialized 3 and 4, the selective scan over 5 is
6
7
where 8 and 9. The SSM scan is linear in sequence length, 0, whereas attention is 1. Classification then proceeds by mean pooling over time, L2 normalization, branch averaging, mean over scales, and a final linear layer
2
Training uses cross-entropy with label smoothing 0.1, AdamW with initial LR 3, dropout 0.25, batch size 32, early stopping patience 5, and 20 epochs on SEED or 30 on THU-EP/FACED (Liu et al., 21 Jul 2025).
5. Evaluation, ablation, and deployment profile
MSGM is evaluated under subject-independent protocols. SEED uses leave-one-subject-out across 15 folds, with an 8:2 train/validation split on the remaining subjects. THU-EP uses leave-8-subjects-out, and FACED uses leave-12-subjects-out; the remaining subjects are split 9:1 for train/validation. For THU-EP and FACED, binary valence classification is formed by thresholding valence at 3.0 (Liu et al., 21 Jul 2025).
| Dataset | Protocol | MSGM result |
|---|---|---|
| SEED | Leave-one-subject-out | ACC 83.43% ± 11.42, F1 85.03% ± 9.09 |
| THU-EP | Leave-8-subjects-out | ACC 62.39% ± 3.13, F1 73.28% ± 4.39 |
| FACED | Leave-12-subjects-out | ACC 63.17% ± 3.62, F1 76.01% ± 3.74 |
These results place MSGM ahead of compared methods on SEED and THU-EP, and best in F1 on FACED while remaining competitive in ACC, where BiDANN is slightly higher. The baseline set includes KNN, SVM, DGCNN, RGNN, PGCN, TSception, LSTM, TCN, BiDANN, DMATN, and EmT. On SEED, MSGM exceeds EmT (80.20/82.10) and BiDANN (79.39/77.65); on THU-EP, it surpasses BiDANN (61.44 ACC) and EmT in ACC and attains the highest F1 (Liu et al., 21 Jul 2025).
The ablation profile attributes the largest degradation to removing MSST-Mamba. On SEED, removing MSST-Mamba reduces performance to 79.53/77.93, removing temporal multi-scale reduces it to 80.04/80.14, removing spatial multi-scale to 82.37/82.57, using a single GCN to 81.92/81.50, and removing spatiotemporal fusion to 79.75/80.23. On THU-EP, the corresponding variants yield 57.92/65.04, 59.55/72.13, 61.82/72.02, 62.01/70.68, and 59.17/66.10, against the proposed 62.39/73.28. The number of MSST blocks is also non-monotonic: one block is best, while 2, 6, and 8 blocks degrade performance and 4 blocks nearly recovers but does not surpass a single block. This indicates that the model’s gains derive from the coordinated interaction of temporal multi-scale segmentation, dual-graph spatial modeling, stable token fusion, and a shallow selective SSM rather than from depth alone (Liu et al., 21 Jul 2025).
Efficiency is a central reported property. MSGM contains 349,218 parameters and runs at 151.0 ms per sample on Jetson Xavier NX, approximately 6.6 samples/s. On a GeForce RTX 3070Ti, MSGM reports 7.9 ms inference versus 4.3 ms for EmT, while using roughly 50% of EmT’s parameters (703,530 vs 349,218). The paper attributes the deployment advantage to Mamba’s 4 selective scan compared with attention’s 5 scaling (Liu et al., 21 Jul 2025).
6. Position within graph-Mamba research and reported limitations
MSGM belongs to a broader family of graph-structured and spatiotemporal SSM models, but it occupies a specific niche. "Graph-Mamba" replaces attention in GraphGPS with a Graph-Mamba Block that combines GatedGCN for local aggregation with node-prioritized Mamba scanning for long-range reasoning on static graphs; it does not include an explicit multi-scale hierarchy or spatiotemporal modeling (Wang et al., 2024). "STG-Mamba: Spatial-Temporal Graph Learning via Selective State Space Model" formulates STG forecasting with an ST-S3M selective scan and KFGN, using recent/period/trend branches and Kalman-inspired fusion to integrate multi-granularity temporal embeddings; in that forecasting setting, the multi-scale aspect is temporal-branch fusion rather than EEG-specific multi-window tokenization with neuroanatomical dual graphs (Li et al., 2024).
Other nearby models differ in both task and the meaning of “multi-scale.” "SpoT-Mamba" learns long-range dependency on spatio-temporal graphs through bidirectional Mamba scans over node-specific BFS/DFS/random-walk sequences followed by temporal scans, but it does not implement explicit multi-scale temporal resolutions or graph coarsening levels (Choi et al., 2024). The 2025 dance-video "Spatial-Temporal Graph Mamba" introduces an STGM block with SG-SSM, TGF-SSM, and TGB-SSM for music-to-skeleton generation, yet the published design is explicitly single-scale and does not use hierarchical pooling, pyramids, or dilated scans (Tang et al., 9 Jul 2025). By contrast, "STM3: Mixture of Multiscale Mamba for Long-Term Spatio-Temporal Time-Series Prediction" formalizes multiscale Mamba, adaptive graph causal convolution, and MoE routing for long-horizon forecasting; this suggests a different branch of multiscale spatiotemporal Mamba research oriented toward generic time-series prediction rather than EEG emotion recognition (Chen et al., 17 Aug 2025).
The limitations reported for MSGM are correspondingly domain-specific. Performance depends on region partitioning, percentile thresholds 6, and SSM dimensions such as 7 and 8. The method leverages neuroanatomical priors, and overly granular or mismatched region schemes can hurt performance, as illustrated by the 17-region setting. Cross-subject variability remains a challenge even under the improved subject-independent protocol. Robustness to noise or missing channels is not explicitly reported. The stated future directions include multimodal fusion with ECG, EOG, and eye-tracking, domain adaptation and personalization for cross-subject calibration, further lightweight engineering for wearables, and adaptive online learning for nonstationary EEG (Liu et al., 21 Jul 2025).