EEG motor imagery classification using DeWitt metric features on the SPD manifold GL+(n)/SO(n). 8 curvature features + tangent space projection.
Brain-Computer Interfaces decode motor intention from EEG signals. A user imagines moving their left hand, right hand, feet, or tongue, and the BCI must classify which from scalp electrodes.
EEG covariance matrices are the standard feature representation (Riemannian BCI). Existing methods compute distances and tangent-space projections on the SPD manifold, but don't exploit the manifold's curvature structure — leaving geometric information on the table.
The DeWitt metric on GL+(n)/SO(n) provides a richer geometry than the standard affine-invariant metric. Its V+/V− decomposition separates shape (spatial pattern) from scale (overall power), and the Ricci curvature tensor provides 8 novel features:
PhysioNet benchmark (109 subjects, 64ch): +0.78pp over pyRiemann baseline (p=0.0048, Wilcoxon signed-rank). Win/loss/tie: 48/23/38 subjects. Strongest at low channel counts (n=3-8). Full results: DOI 10.5281/zenodo.19192338
BNCI2014_001 (9 subjects, 22ch, 4-class): TS+LR = 83.8%. Channel selection: +4.1% at n=5 channels. Cross-subject transfer: +8.5pp over standard MDM.
Honest assessment: Geometric advantage scales as ~1/n (strongest at low channel counts). Most relevant for consumer BCI devices (3-8 channels). Deep learning methods like FDCN-C achieve ~96% but require 100× more computation.
8 novel curvature-derived features that capture the geometry of EEG covariance matrices.
Separates traceless shape modes (V+) from volume scaling (V-) using the DeWitt metric. Motor imagery lives primarily in V+.
Multiple features derived from a parametric family of Riemannian metrics, capturing shape-scale tradeoffs.
Ratio of largest to second-largest shape mode eigenvalue — a motor imagery signature reflecting hemispheric lateralization.
Tangent space features rescaled by Ricci curvature structure, amplifying geometrically significant directions.
DeWitt curvature features tighten class clusters in tangent space, reducing overlap between motor imagery classes.
4-class motor imagery accuracy on BNCI2014_001 (BCI Competition IV-2a, 9 subjects).
Riemannian geodesic vs Euclidean linear interpolation between EEG covariance matrices. Euclidean interpolation inflates eigenvalues (swelling artifact); Riemannian preserves spectral structure.
from omni_toolkit.applications.eeg_bci import DeWittBCIClassifier
# Initialize with 8 EEG channels
clf = DeWittBCIClassifier(n_channels=8, n_classes=4)
# Fit on training covariance matrices
clf.fit(X_train_cov, y_train)
# Predict motor imagery class
predictions = clf.predict(X_test_cov)
accuracy = (predictions == y_test).mean()
print(f"Accuracy: {accuracy:.1%}")
# Accuracy: 75.2%
# Access curvature features
features = clf.extract_features(X_test_cov)
print(f"Features shape: {features.shape}")
# (n_trials, 8) — 8 DeWitt curvature features