1 RGP-VAE
RGP-VAE is a class-specific variational autoencoder that generates MI-EEG covariance matrices by encoding and decoding in a Fréchet-mean tangent space while mapping outputs back to the SPD manifold.
Date of publication: 11/03/2026
Code at: https://641e16.github.io/RGP-VAE/
This isn’t exactly a Deep Riemannian Network since the authors don’t really use the usual layers, just the log and exp mapping. But it is still related to it.
The following is the schematic of the proposed model:

Overview
RGP-VAE generates synthetic covariance matrices for cross-subject MI-BCI augmentation while preserving positive definiteness and reducing subject-specific geometry.
- Dataset: the Faller et al. two-class motor-imagery dataset, corresponding to BNCI2015_001.
- Participants and task: 12 subjects (BCI novices), right-hand vs both-feet imagery.
- Data: 13 EEG channels, 5,572 trials total; subjects contributed either 398 or 597 trials. Raw acquisition per the BNCI2015_001 note: 512 Hz, g.USBamp + g.GAMMAsys active electrodes with Laplacian derivations around C3/Cz/C4, participants 1-7 and 12 with two sessions and 8-11 with three, MOABB epochs of 5 s. (The dataset note’s “approximately 400 trials/session” wording conflicts with the paper’s per-subject totals - unresolved.)
- Band-pass: 8-30 Hz. Scaling: microvolts. Standardization: exponential moving standardization.
- Covariance: oracle-approximating shrinkage estimator, producing well-conditioned SPD matrices.
- Alignment: subject-specific covariance distributions are parallel-transported from their subject reference means to a global class reference mean.
- Protocol: leave-one-subject-out CV; one class-specific RGP-VAE is trained on the aligned matrices from 11 subjects and evaluated through classifiers on the held-out subject.
“Geometry-preserving” means the VAE does not reconstruct directly in the ambient matrix space. It uses a Riemannian logarithmic map to enter a tangent space and an exponential map to return to the manifold, corresponding conceptually to LogEig and ExpEig.
Architecture
For each class, a reference point is the affine-invariant Fréchet mean of its training covariances.
- Map aligned covariance to the tangent space:
- Vectorize the upper triangle of : with channels, .
- Encode to the mean and log-variance of a 64-dimensional Gaussian latent distribution and sample:
- Decode to a 91-dimensional tangent vector, unvectorize, and explicitly symmetrize the matrix.
- Return to the SPD manifold:
The loss is
where is the mean affine-invariant Riemannian reconstruction distance, the normalized Euclidean error between original and decoded tangent vectors, the KL divergence to , and .
Model Parameters
- Input SPD dimension: ; vectorized tangent dimension: 91.
- Encoder: five
Linear → BatchNorm → LeakyReLUblocks; dimensions . - Latent dimension: 64; separate linear heads for and .
- Decoder: mirrored encoder MLP ending in 91 tangent-space values.
- Batch size: 128.
- Matrix exponential eigenvalue threshold: (scale eigenvalues by if ).
- Positive-definiteness threshold: (shift matrices with ).
- Diversity regularizer: , .
- Generation noise scale: .
Training Parameters
- Optimizer: AdamW.
- Epochs: 100.
- Learning rate: ; weight decay: .
- Gradient clipping: maximum norm 1.0.
- LR reduction: factor 0.5 after 20 epochs without improvement.
- KL annealing: increases linearly from 0.0001 to 0.2.
- Posterior generation: five synthetic samples per real covariance.
- Prior generation: 5,000 samples per class from .
- Classifiers: MDM, KNN, and SVC; conditions: real-only baseline, real plus synthetic, synthetic-only.
- Metric: mean balanced accuracy over 12 LOSO folds. Classifier hyperparameters not reported.
Results
All prior and posterior samples passed symmetry and positive-definiteness checks. Fidelity averaged across folds:
| Generator | Original variance | Synthetic variance (ratio) | Original distance | Synthetic distance |
|---|---|---|---|---|
| Prior | 0.208 | 0.221 (1.061) | 2.032 | 1.946 |
| Posterior | 0.208 | 0.221 (1.063) | 2.032 | 1.918 |
Balanced accuracy across 12 subjects:
| Generator | Classifier | Baseline | Augmented | Improvement | Synthetic-only | Improvement | ||
|---|---|---|---|---|---|---|---|---|
| Prior | MDM | 59.52 ± 5.52 | 58.92 ± 5.40 | −0.59% | 0.092 | 58.36 ± 5.03 | −1.16% | 0.043 |
| Prior | KNN | 53.19 ± 4.00 | 55.38 ± 4.17 | +2.19% | 0.003 | 56.19 ± 4.19 | +3.00% | <0.001 |
| Prior | SVC | 60.67 ± 5.33 | 57.43 ± 6.32 | −3.24% | 0.016 | 56.75 ± 6.37 | −3.92% | 0.002 |
| Posterior | MDM | 59.52 ± 5.52 | 58.83 ± 5.29 | −0.69% | 0.092 | 58.95 ± 5.51 | −0.57% | 0.151 |
| Posterior | KNN | 53.19 ± 4.00 | 55.64 ± 4.13 | +2.45% | 0.002 | 56.68 ± 4.06 | +3.49% | 0.002 |
| Posterior | SVC | 60.67 ± 5.33 | 57.18 ± 6.57 | −3.48% | 0.007 | 56.66 ± 6.25 | −4.01% | 0.002 |
Wilcoxon signed-rank tests with Bonferroni-corrected significance at . A standard Euclidean VAE produced more than 40% non-SPD outputs in every fold; using its valid outputs degraded MDM by 9.49% ().
Their results on the BNCI2015_001 dataset:
