Abstract
Neuroscience studies face challenges in gathering large datasets, which limits the use of machine learning (ML) approaches. One possible solution is to incorporate additional data from large public datasets; however, data collected in different contexts often exhibit systematic differences called dataset shifts. Various factors, e.g., site, device type, experimental protocol, or social characteristics, can lead to substantial divergence of brain signals that can hinder the success of ML across datasets. In this work, we focus on dataset shifts in recordings of brain activity using MEG and EEG. State-of-the-art predictive approaches on M/EEG signals classically represent the data by covariance matrices. Model-based dataset alignment methods can leverage the geometry of covariance matrices, leading to three steps: recentering, re-scaling, and rotation correction. This work explains theoretically how differences in brain activity, anatomy, or device configuration lead to certain shifts in data covariances. Using controlled simulations, the different alignment methods are evaluated. Their practical relevance is evaluated for brain age prediction on one MEG dataset (Cam-CAN, n = 646) and two EEG datasets (TUAB, n = 1385; LEMON, n = 213). This study demonstrates that the generalization of M/EEG-based regression models across datasets can be substantially enhanced by applying domain adaptation procedures that can statistically harmonize diverse datasets.
Introduction
Neuroscience is currently in a "big data" era, but brain activity data (MEG and EEG) is notoriously sensitive to recording conditions. If a machine learning model is trained to predict a person's age or health status using data from one lab, it often fails when applied to data from another. This failure is caused by dataset shift, stemming from physical differences (different EEG headsets), anatomical differences (head shapes), or protocol differences (resting vs. task-based recordings). Standard normalization techniques often ignore the complex, multi-dimensional interactions between brain regions that are critical for accurate modeling.
Methods: A Riemannian Geometry Framework
To address these shifts, this work proposes a model-based approach rooted in Riemannian geometry. Instead of raw signal voltages, brain activity is represented as Symmetric Positive Definite (SPD) covariance matrices, which capture the spatial interactions between sensors. The alignment process follows a hierarchical three-step transformation to harmonize a "source" and "target" dataset:
- Re-centering: The Riemannian equivalent of whitening. Each dataset is transformed so its geometric mean sits at the Identity matrix, compensating for broad differences in head anatomy or sensor positions.
- Re-scaling: This step equalizes the "spread" or dispersion of the data points around the mean.
- Rotation Correction: Using Procrustes analysis, the data is rotated in the "tangent space" to align the orientations of the two distributions.
Experimental Evaluation
The researchers validated their approach using three major real-world datasets:
- Cam-CAN (MEG): 646 subjects recorded during resting state and active tasks.
- TUAB (EEG): 1,385 subjects from a clinical hospital setting.
- LEMON (EEG): 213 subjects from a research-grade laboratory setting.
Key Results and Insights
- Re-centering as the "MVP": For independent datasets (e.g., moving from the clinical TUAB to the research-grade LEMON), re-centering provided the most significant and robust performance boost. It is unsupervised and does not require labels from the target dataset.
- Rotation for Paired Data: Rotation correction is highly effective when the same subjects are recorded across different tasks (paired data), increasing the $R^2$ score for age prediction by up to +0.17. However, it can be unstable for unpaired, noisy real-world data.
- Cross-Dataset Generalization: In the challenging task of training on TUAB and testing on LEMON, unaligned models performed poorly ($R^2 \approx 0.2$). Re-centering brought performance up to $R^2 \approx 0.49$, nearly matching the "gold standard" of within-dataset training ($R^2 \approx 0.54$).
Conclusion
This study demonstrates that dataset shifts in M/EEG have a specific geometric structure that can be corrected by respecting the manifold of SPD matrices. While re-centering is a robust tool for general harmonization, future work is needed to stabilize unsupervised rotation methods. Developing techniques to align datasets with different sensor layouts remains a vital next step for the field.
Summary updated