BCI Classification

EEG motor imagery classification using DeWitt metric features on the SPD manifold GL+(n)/SO(n). 8 curvature features + tangent space projection.

The BCI Challenge

The Problem

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 Geometric Approach

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:

  • Geometric distance profile (proprietary metric family features)
  • V+ spectral gap — hemispheric lateralization signature
  • Log-eigenvalue kurtosis, mode entropy, channel Gini

The BCI-IV-2a Dataset

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.

DeWitt Metric Features

8 novel curvature-derived features that capture the geometry of EEG covariance matrices.

V+/V- Decomposition

Separates traceless shape modes (V+) from volume scaling (V-) using the DeWitt metric. Motor imagery lives primarily in V+.

Geometric Distance Profile

Multiple features derived from a parametric family of Riemannian metrics, capturing shape-scale tradeoffs.

Spectral Gap

Ratio of largest to second-largest shape mode eigenvalue — a motor imagery signature reflecting hemispheric lateralization.

Curvature Weighting

Tangent space features rescaled by Ricci curvature structure, amplifying geometrically significant directions.

Feature Separation

DeWitt curvature features tighten class clusters in tangent space, reducing overlap between motor imagery classes.

Method Comparison

4-class motor imagery accuracy on BNCI2014_001 (BCI Competition IV-2a, 9 subjects).

Brain State Interpolation

Riemannian geodesic vs Euclidean linear interpolation between EEG covariance matrices. Euclidean interpolation inflates eigenvalues (swelling artifact); Riemannian preserves spectral structure.

State A (Rest) State B (Focused)
t = 0.00
Max Eigenvalue Ratio
1.00
Euclidean / Riemannian
Swelling Factor
1.00x
max(eig_E) / max(eig_A, eig_B)
Det Preservation
100%
det(C_R) / det_geodesic
Euclidean Interpolation C(t) = (1-t)A + tB
Riemannian Interpolation Geodesic on SPD manifold
Eigenvalue Trajectories Dashed = Euclidean (swelling), Solid = Riemannian (bounded)

State of the Art

API Playground

Usage Example

Python
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