Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

DA_VAE_MI-BCI

This repository contains the code and resources for my bachelor's thesis, "Riemannian Geometry-Preserving Variational Autoencoder for MI-BCI Data Augmentation." supervised by Ivo De Jong MSc & Dr Andreea Sburlea.

The project addresses the challenge of generating synthetic electroencephalogram (EEG) covariance matrices for Motor Imagery Brain-Computer Interface (MI-BCI) data augmentation. Standard generative models like Variational Autoencoders (VAE)fail at this task because they operate in Euclidean space, while EEG covariance matrices are Symmetric Positive-Definite (SPD) and thus reside on a non-Euclidean, Riemannian manifold. A naive application of a VAE generates a high percentage of invalid matrices, rendering them unusable for Riemannian-based classifiers.

This project introduces a novel Riemannian Variational Autoencoder (RVAE) architecture that explicitly respects the geometry of the SPD manifold. The core of the architecture involves:

  • Geometric mappings
  • Data alignment for cross-subject setting
  • Composite loss function

Key Findings

The RVAE successfully generates 100% valid SPD matrices that are faithful representations of the original data. The paper concludes that its effectiveness as an augmentation tool is directly linked to the algorithm of the classifier it is paired with.

Results 'results_data' structure

results_data (dict)
|
|-- 'experiment_info' (dict)
|   |-- 'type': 'loso'
|   +-- 'dataset': 'BNCI2015_001'
|
|-- 'baseline_results' (dict)
|   |-- 'average_metrics' (dict)
|   |   |-- 'mdm': 0.6248
|   |   |-- 'knn': 0.5779
|   |   +-- 'svc': 0.5645
|   |
|   |-- 'std_metrics' (dict)
|   |   |-- 'mdm': 0.0287
|   |   +-- ...
|   |
|   +-- 'fold_scores' (dict)
|       |-- 'mdm': [score_subj1, score_subj2, score_subj3]
|       |-- 'knn': [score_subj1, score_subj2, score_subj3]
|       +-- ...
|
|-- 'per_generator_results' (dict)
|   |
|   |-- 'prior' (dict)
|   |   |-- 'average_metrics' (dict) -> 'aug'/'synthetic' -> 'mdm'/'knn'/'svc'
|   |   |-- 'std_metrics' (dict)     -> 'aug'/'synthetic' -> 'mdm'/'knn'/'svc'
|   |   |-- 'fold_scores' (dict)     -> 'aug'/'synthetic' -> 'mdm'/'knn'/'svc' -> [scores]
|   |   |-- 'quality_and_integrity_analysis' (dict) -> 'test_subject_1' -> 'statistical_variance' -> ...
|   |   +-- 'scrambled_label_test' (dict)         -> 'test_subject_1' -> ...
|   |
|   +-- 'posterior' (dict)
|       |-- (Same structure as 'prior')
|
+-- 'subject_performance' (dict)
    |
    |-- 'baseline' (dict)
    |   |-- '1' (dict) -> 'mdm'/'knn'/'svc' -> score
    |   |-- '2' (dict) -> 'mdm'/'knn'/'svc' -> score
    |   +-- ...
    |
    |-- 'prior' (dict)
    |   |-- '1' (dict) -> 'mdm'/'knn'/'svc' -> score
    |   +-- ...
    |
    +-- 'posterior' (dict)
        |-- '1' (dict) -> 'mdm'/'knn'/'svc' -> score
        +-- ...

note: to run the code on Habrok use: module load Python/3.11.5-GCCcore-13.2.0

About

Riemannian Geometry-Preserving Variational Autoencoder for MI-BCI Data Augmentation.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages