Abstract
Electroencephalographic (EEG) data is typically contaminated with non-neural artifacts which can confound the results of experiments. Artifact cleaning approaches are available, but often require time-consuming manual input and significant expertise. Advancements in artifact cleaning often only address a single artifact, are only compared against a small selection of pre-existing methods, and seldom assess whether a proposed advancement improves experimental outcomes. To address these issues, we developed RELAX (the Reduction of Electroencephalographic Artifacts), an automated EEG cleaning pipeline implemented within EEGLAB that reduces all artifact types. RELAX cleans continuous data using Multiple Wiener filtering [MWF] and/or wavelet enhanced independent component analysis [wICA] applied to artifacts identified by ICLabel [wICA_ICLabel]). Several versions of RELAX were tested using three datasets containing a mix of cognitive and resting recordings (N = 213, 60 and 23 respectively). RELAX was compared against six commonly used EEG cleaning approaches across a wide range of artifact cleaning quality metrics, including signal-to-error and artifact-to-residue ratios, measures of remaining blink and muscle activity, and the amount of variance explained by experimental manipulations after cleaning. RELAX with MWF and wICA_ICLabel showed amongst the best performance for cleaning blink and muscle artifacts while still preserving neural signal. RELAX with wICA_ICLabel (and no MWF) may perform better at detecting the effect of experimental manipulations on alpha oscillations in working memory tasks. The pipeline is easy to implement in MATLAB and freely available on GitHub. Given its high cleaning performance, objectivity, and ease of use, we recommend RELAX for data cleaning across EEG studies.
Competing Interest Statement
PBF has received equipment for research from MagVenture A/S, Nexstim, Neuronetics and Brainsway Ltd and funding for research from Neuronetics. He is a founder of TMS Clinics Australia and Resonance Therapeutics. MB, ATH, NWB, AM, MB, NCR and OWM reported no biomedical financial interests or potential conflicts of interest.
Footnotes
The MATLAB code, the supplementary materials, and a simple instruction manual explaining how to implement the RELAX pipeline can be downloaded from: https://github.com/NeilwBailey/RELAX/releases. A condition of use of the pipeline is that the version of the pipeline used is referred to as RELAX_[pipeline], for example “RELAX_MWF_wICA” or “RELAX_wICA_ICLabel”, and that the current paper be cited, as well as the dependencies used. These dependencies are likely to include: EEGLAB (Delorme & Makeig, 2004), fieldtrip (Oostenveld et al., 2011), the MWF toolbox (Somers et al., 2019), fastICA (Hyvarinen, 1999), wICA (Castellanos & Makarov, 2006), ICLabel (Pion-Tonachini et al., 2019), and PREP (Bigdely-Shamlo et al., 2015).
The application of RELAX to studies of ERPs is reported in our companion paper (Bailey et al., 2022)