Potential pitfalls of widely used implementations of common spatial patterns

We have uncovered serious flaws in handling EEG signals with a decreased rank in implementations of the common spatial patterns (CSP). The CSP algorithm assumes covariance matrices of the signal to have full rank. However, preprocessing techniques, such as artifact removal using independent component analysis, may decrease the rank of the signal, leading to potential errors in the CSP decomposition. We inspect what could go wrong when CSP implementations do not take this into consideration on a binary motor imagery classification task. We review CSP implementations in open-source toolboxes for EEG signal analysis (FieldTrip, BBCI Toolbox, BioSig, EEGLAB, BCILAB, and MNE). We show that unprotected implementations decreased mean classification accuracy by up to 32%, with spatial filters resulting in complex numbers, for which corresponding spatial patterns do not have a clear interpretation. We encourage researchers to check their implementations and analysis pipelines.

[1]  T. Sejnowski,et al.  Removing electroencephalographic artifacts by blind source separation. , 2000, Psychophysiology.

[2]  Stefan Haufe,et al.  The Berlin Brain-Computer Interface: Progress Beyond Communication and Control , 2016, Front. Neurosci..

[3]  Amir Rastegarnia,et al.  Methods for artifact detection and removal from scalp EEG: A review , 2016, Neurophysiologie Clinique/Clinical Neurophysiology.

[4]  Ernst Fernando Lopes Da Silva Niedermeyer,et al.  Electroencephalography, basic principles, clinical applications, and related fields , 1982 .

[5]  Arnaud Delorme,et al.  EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis , 2004, Journal of Neuroscience Methods.

[6]  Carmen Vidaurre,et al.  BioSig: The Free and Open Source Software Library for Biomedical Signal Processing , 2011, Comput. Intell. Neurosci..

[7]  Martin Luessi,et al.  MEG and EEG data analysis with MNE-Python , 2013, Front. Neuroinform..

[8]  Constantinos Gavriel,et al.  Data-efficient hand motor imagery decoding in EEG-BCI by using Morlet wavelets & Common Spatial Pattern algorithms , 2015, 2015 7th International IEEE/EMBS Conference on Neural Engineering (NER).

[9]  Scott Makeig,et al.  BCILAB: a platform for brain–computer interface development , 2013, Journal of neural engineering.

[10]  G. Pfurtscheller,et al.  Designing optimal spatial filters for single-trial EEG classification in a movement task , 1999, Clinical Neurophysiology.

[11]  Lucas C. Parra,et al.  Recipes for the linear analysis of EEG , 2005, NeuroImage.

[12]  G. Pfurtscheller,et al.  The BCI competition III: validating alternative approaches to actual BCI problems , 2006, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[13]  Robert Oostenveld,et al.  FieldTrip: Open Source Software for Advanced Analysis of MEG, EEG, and Invasive Electrophysiological Data , 2010, Comput. Intell. Neurosci..

[14]  K.-R. Muller,et al.  Optimizing Spatial filters for Robust EEG Single-Trial Analysis , 2008, IEEE Signal Processing Magazine.

[15]  M. Tangermann,et al.  Automatic Classification of Artifactual ICA-Components for Artifact Removal in EEG Signals , 2011, Behavioral and Brain Functions.

[16]  S P Fitzgibbon,et al.  Removal of EEG Noise and Artifact Using Blind Source Separation , 2007, Journal of clinical neurophysiology : official publication of the American Electroencephalographic Society.

[17]  Yijun Wang,et al.  Classifying Single-Trial EEG during Motor Imagery with a Small Training Set , 2013, ArXiv.