Averaging Trajectories on the Manifold of Symmetric Positive Definite Matrices

Thibault de Surrel, Florian Yger, Sylvain Chevallier, Fabien LotteEUSIPCO 2024

Abstract

Traditional Brain-Computer Interface (BCI) classification often collapses temporal EEG data into static covariance matrices, losing critical dynamical information. This paper introduces two novel algorithms, Pointwise Trajectory Minimum Distance to Mean (PT-MDM) and Dynamic Time Warping Minimum Distance to Mean (DTW-MDM), which represent EEG trials as trajectories on the Symmetric Positive Definite (SPD) manifold. By leveraging Riemannian geometry and temporal alignment, these methods demonstrate superior performance over state-of-the-art static classifiers across multiple synthetic and real-world datasets.

Introduction

In BCI research, the covariance of EEG signals is frequently modeled as points on the Symmetric Positive Definite (SPD) manifold. The Minimum Distance to Mean (MDM) algorithm is a standard approach, classifying trials by comparing a single aggregated covariance matrix to class-specific Riemannian means. However, EEG signals are inherently non-stationary; factors such as fatigue and electrode shifts cause brain states to evolve over time. Collapsing a multi-second trial into a single matrix ignores these temporal dynamics. This work proposes moving beyond static points to classify trajectories on the manifold, capturing the "temporal story" of the brain signal.

Methods

The authors propose representing an EEG trial as a sequence of covariance matrices calculated over sliding windows, forming a trajectory on the SPD manifold. To classify these, they define a "mean trajectory" for each class using two distinct approaches:

  1. PT-MDM (Pointwise Trajectory MDM): Assumes trajectories are temporally aligned and calculates a Riemannian mean at each discrete time step across training samples.
  2. DTW-MDM (Dynamic Time Warping MDM): Utilizes a version of Dynamic Time Warping adapted for the curved geometry of the SPD manifold. This aligns trajectories by accounting for time shifts, dilations, and contractions before averaging.
Illustration of trajectory alignment and averaging on the SPD manifold.

Both methods utilize the affine-invariant Riemannian metric to respect the manifold's curvature. While DTW-MDM is theoretically more robust to temporal warping, PT-MDM offers a computationally efficient alternative that assumes consistent temporal patterns.

Experimental Results

The algorithms were evaluated on synthetic data and six real-world motor imagery datasets via the MOABB framework (e.g., BNCI2014001, Zhou2016).

Synthetic Validation

On synthetic datasets, DTW-MDM consistently outperformed both PT-MDM and standard MDM, particularly as the dimensionality of the matrices increased. This confirms the theoretical advantage of temporal alignment when the underlying signal contains warping noise.

Classification accuracy as a function of matrix dimension $c$ for the proposed algorithms.

Real-World EEG Performance

On real-world data, both trajectory-based methods outperformed the state-of-the-art FgMDM baseline. Interestingly, PT-MDM often performed slightly better than DTW-MDM on real EEG. This suggests that for current motor imagery tasks, temporal alignment may be sufficiently consistent, or that EEG noise levels make precise warping difficult.

Significant gains were observed in inter-subject classification—a major BCI challenge. For instance, on the BNCI2014004 dataset, PT-MDM reached 69.1% accuracy compared to 65.6% for FgMDM. While DTW-MDM is more computationally intensive to train (e.g., 61.7s vs 1.17s for PT-MDM on the Zhou2016 set), both methods provide millisecond-level inference suitable for real-time applications.

Conclusion

Treating EEG trials as trajectories on the SPD manifold provides a more nuanced representation of brain dynamics than static covariance matrices. The proposed PT-MDM and DTW-MDM algorithms offer significant accuracy improvements, particularly in challenging inter-subject scenarios. Future work will explore differentiable warping (Soft-DTW) to reduce training overhead and investigate trajectories indexed by frequency to further enhance discriminative power.

Summary updated

BibTeX
@inproceedings{surrel2024averaging,
  author = {Thibault de Surrel and Florian Yger and Sylvain Chevallier and Fabien Lotte},
  title = {{Averaging Trajectories on the Manifold of Symmetric Positive Definite Matrices}},
  booktitle = {EUSIPCO},
  year = {2024},
}
Figure