Riemannian geometry for combining functional connectivity metrics and covariance in BCI

Brain–computer interfaces allow interactions based on brain activities detected in electroencephalography. Despite important improvements in the last decade, some subjects still achieve poor performances without any identified cause. On the one hand, State-of-the-art methods for online decoding are based on covariance matrices seen as elements of a Riemann manifold. On the other hand, functional connectivity is a powerful method to characterize the brain activity. The proposed software combines functional connectivity and covariance within a Riemannian framework to increase the robustness of brain–computer interfaces.


Introduction
Brain-computer interfaces allow to communicate without requiring any muscular capabilities and is therefore widely investigated for assisting people with motor deficiencies.The electroencephalography (EEG), as a low-cost and light-weight technology, is a very common choice for recording the electric potential generated by brain activities [1].Despite the large range of clinical applications, BCI fails in being used outside the laboratory.One of the main challenges to overcome is the high inter-subject variability, referred in the literature as the ''BCI inefficiency'' phenomenon, associated with a non-negligible percentage of the users who cannot control the BCI device even after several training sessions.Among the promising approaches to tackle this issue is the improvement of the neural decoders [2].For this purpose, studies have elicited new features that relied on covariance matrices, like  = 1  −1  ⊤ for an EEG signal  of  signal samples, and on adjacency matrices.Those adjacency matrices are based on specific functional connectivity estimators, in particular the imaginary coherence and the instantaneous coherence.They result from the coherency defined for a given frequency bin  as, ℎ  ( ) = , where   ( ) is the cross-spectral density and   ( ) the auto-spectral density.The imaginary coherence (ImCoh) corresponds to the imaginary part of the coherency [3].The instantaneous coherence (Instantaneous) corresponds to the real part of the coherency [4].The software described hereafter proposes an original solution that takes advantage of complementary features to improve the decoder's performance.

A Riemannian take on functional connectivity for braincomputer interfaces
Riemannian geometry-based methods are now the gold standard in motor imagery-based BCI [5].matrices that are symmetric and positive-definite matrices (SPD) and obtained from EEG signals.Here, in order to take into account the user's specificity and more particularly the interconnected nature of brain functioning, we considered, in addition to covariance matrices, connectivity information extracted from functional connectivity estimators [6].Our solution tackle the inter-subject variability by combining multiple feature space to extract robust representation (see Fig. 1-A).
We follow the FAIR principles to ensure the reproducibility of your work, grounding the open science inside our software production.We develop a Python code, hosted and versioned on GitHub, that follow the scikit-learn API [7] for designing machine learning pipelines.Our approach is built upon existing open source libraries, such as PyRiemann 1 for Riemannian geometry tools, MNE [8] for handling EEG files and MOABB2 to conduct the benchmark.
In this software, we introduce three novel developments: (i) new functional connectivity estimators, (ii) new projection method on Riemannian manifold and (iii) new evaluation for benchmarks.For (i), MNE already propose connectivity estimators, but they are suited to offline analysis and not online decoding.We adapt these existing estimators to handle trial-based estimation.The connectivity matrices yield by these estimators are positive semi-definite, meaning that they are not necessarily full rank, and thus could fail to be SPD.We compute the projection on the manifold of SPD matrices of the instantaneous coherence (Instantaneous) and the imaginary coherence (ImCoh) to ensure that consistency of our processing steps.With (ii), we develop a projection method on the manifold of SPD matrices to ensure that we could apply Riemannian approaches on these matrices.At last, we develop in (iii) a new benchmark method based on MOABB classes for facilitating the selection of model parameters (see Fig. 1-B).

Impact overview
The developed software has already been used in several studies.In [9], the diversity of the classifiers based on connectivity and covariance is highlighted, indicating that it is a good candidate for ensemble learning.This approach won a competition on clinical BCI data [10] and its application to another dataset is shown in [11].A thorough analysis of connectivity estimators, preprocessing step and ensemble learning method developed in [11] along with a complete evaluation on multiple datasets and different experimental conditions.
There are several research questions that can be pursued as a result of our software.First, we introduce new features in BCI, by demonstrating that it is possible to apply Riemannian classifiers on functional connectivity matrices.There are several estimators, like non-linear or robust ones, that could be evaluated.Next, we rely on an ensemble method to combine multiple classifiers for improving the robustness of our decoding.It is possible to improve this ensemble method by incorporating domain-specific knowledge.Last, dimensionality reduction methods could be applied to project connectivity and covariance in lower dimensional manifold.
It should be noted that our software development is a work in progress.We want to improve the replicability of our approach by contributing to the libraries that help to build our software.We will contribute to pyRiemann 3 and MOABB 4 to integrate the development made in our work.Brain-computer interfaces is a multidisciplinary topic that requires advanced signal processing techniques, state-of-theart machine learning classifiers and good knowledge in neuroscience.This requires joint efforts to ensure a high software quality and open contributions to allows for replicable studies.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 1 .
Fig. 1. (A) Overview of the proposed approach.Cov stands for covariance, Instantaneous stands for instantaneous coherence and ImCoh stands for imaginary coherence, and EN stands for Elastic-net.(B) Replicability assessments and comparison with state-of-the-art pipelines.Analysis performed with 2-class datasets.lhrh stands for left-vs right-hand.