Source-based artifact-rejection techniques available in TESA, an open-source TMS–EEG toolbox
Tuomas P. Mutanen, Mana Biabani, Jukka Sarvas, Risto J. Ilmoniemi, Nigel C. Rogasch
Abstract
Two recently published artifact-rejection techniques [[1]Mutanen T.P. Kukkonen M. Nieminen J.O. Stenroos M. Sarvas J. Ilmoniemi R.J. Recovering TMS-evoked EEG responses masked by muscle artifacts.Neuroimage. 2016; 139: 157-166https://doi.org/10.1016/j.neuroimage.2016.05.028Crossref PubMed Scopus (27) Google Scholar,[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar]; designed for analyzing electroencephalography (EEG) data following transcranial magnetic stimulation (TMS), are now included in an open-source data-analysis toolbox TESA [[3]Rogasch N.C. Sullivan C. Thomson R.H. Rose N.S. Bailey N.W. Fitzgerald P.B. et al.Analysing concurrent transcranial magnetic stimulation and electroencephalographic data: a review and introduction to the open-source TESA software.Neuroimage. 2017; 147: 934-951https://doi.org/10.1016/j.neuroimage.2016.10.031Crossref PubMed Scopus (86) Google Scholar]. The new implementations of signal-space-projection–source-informed-reconstruction (SSP–SIR) [[1]Mutanen T.P. Kukkonen M. Nieminen J.O. Stenroos M. Sarvas J. Ilmoniemi R.J. Recovering TMS-evoked EEG responses masked by muscle artifacts.Neuroimage. 2016; 139: 157-166https://doi.org/10.1016/j.neuroimage.2016.05.028Crossref PubMed Scopus (27) Google Scholar] and source-utilized noise-discarding algorithm (SOUND) [[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar] (see Fig. 1) are computationally efficient and easy to use, allowing the TMS–EEG researchers to suppress unwanted signal components, such as the TMS-evoked muscle artifact and TMS-pulse-elicited auditory or somatosensory responses [[1]Mutanen T.P. Kukkonen M. Nieminen J.O. Stenroos M. Sarvas J. Ilmoniemi R.J. Recovering TMS-evoked EEG responses masked by muscle artifacts.Neuroimage. 2016; 139: 157-166https://doi.org/10.1016/j.neuroimage.2016.05.028Crossref PubMed Scopus (27) Google Scholar,[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar,[4]Biabani M. Fornito A. Mutanen T.P. Morrow J. Rogasch N.C. Characterizing and minimizing the contribution of sensory inputs to TMS-evoked potentials.Brain Stimul. 2019; 12: 1537-1552https://doi.org/10.1016/j.brs.2019.07.009Abstract Full Text Full Text PDF PubMed Scopus (21) Google Scholar] . TMS–EEG is a powerful, non-invasive technique to study, e.g., effective connectivity, reactivity, or inhibitory and excitatory mechanisms in vivo in the human cortex (for review see, e.g. Ref. [[5]Tremblay S. Rogasch N.C. Premoli I. Blumberger D.M. Casarotto S. Chen R. et al.Clinical utility and prospective of TMS–EEG.Clin Neurophysiol. 2019; 130: 802-844https://doi.org/10.1016/j.clinph.2019.01.001Crossref PubMed Scopus (67) Google Scholar]). Unfortunately, the fully flexible use of TMS–EEG is still hindered by the TMS-evoked muscle artifacts, which are particularly prominent when lateral brain regions are targeted [[6]Korhonen R.J. Hernandez-Pavon J.C. Metsomaa J. Mäki H. Ilmoniemi R.J. Sarvas J. Removal of large muscle artifacts from transcranial magnetic stimulation-evoked EEG by independent component analysis.Med Biol Eng Comput. 2011; 49: 397-407https://doi.org/10.1007/s11517-011-0748-9Crossref PubMed Scopus (74) Google Scholar]. Moreover, auditory and somatosensory responses to TMS may mask the genuine TMS-evoked EEG activity, causing a risk of misinterpretation of the data [[7]Conde V. Tomasevic L. Akopian I. Stanek K. Saturnino G.B. Thielscher A. et al.The non-transcranial TMS-evoked potential is an inherent source of ambiguity in TMS-EEG studies.Neuroimage. 2019; 185: 300-312https://doi.org/10.1016/j.neuroimage.2018.10.052Crossref PubMed Scopus (84) Google Scholar,[8]Belardinelli P. Biabani M. Blumberger D.M. Bortoletto M. Casarotto S. David O. et al.Reproducibility in TMS–EEG studies: a call for data sharing, standard procedures and effective experimental control.Brain Stimul. 2019; 12: 787-790https://doi.org/10.1016/j.brs.2019.01.010Abstract Full Text Full Text PDF PubMed Scopus (34) Google Scholar]. Additionally, TMS–EEG suffers from other noise sources, including electrode-polarization-decay artifacts, line noise, DC drifts, and constant muscle tension [[3]Rogasch N.C. Sullivan C. Thomson R.H. Rose N.S. Bailey N.W. Fitzgerald P.B. et al.Analysing concurrent transcranial magnetic stimulation and electroencephalographic data: a review and introduction to the open-source TESA software.Neuroimage. 2017; 147: 934-951https://doi.org/10.1016/j.neuroimage.2016.10.031Crossref PubMed Scopus (86) Google Scholar]. The standard approach to tackle these disturbances is to reject the contaminated data segments or bad channels, based on heuristic visual inspection [[3]Rogasch N.C. Sullivan C. Thomson R.H. Rose N.S. Bailey N.W. Fitzgerald P.B. et al.Analysing concurrent transcranial magnetic stimulation and electroencephalographic data: a review and introduction to the open-source TESA software.Neuroimage. 2017; 147: 934-951https://doi.org/10.1016/j.neuroimage.2016.10.031Crossref PubMed Scopus (86) Google Scholar]. The popularity of visual rejection methods and independent component analysis (ICA) [[6]Korhonen R.J. Hernandez-Pavon J.C. Metsomaa J. Mäki H. Ilmoniemi R.J. Sarvas J. Removal of large muscle artifacts from transcranial magnetic stimulation-evoked EEG by independent component analysis.Med Biol Eng Comput. 2011; 49: 397-407https://doi.org/10.1007/s11517-011-0748-9Crossref PubMed Scopus (74) Google Scholar] might be partially explained by their prevalence in several open source analysis toolboxes (e.g., Ref. [[9]Delorme A. Makeig S. EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis.J Neurosci Methods. 2004; 134: 9-21https://doi.org/10.1016/j.jneumeth.2003.10.009Crossref PubMed Scopus (11286) Google Scholar]). However, both using heuristics to reject data and applying ICA to TMS-evoked EEG have their shortcomings [[10]Metsomaa J. Sarvas J. Ilmoniemi R.J. Multi-trial evoked EEG and independent component analysis.J Neurosci Methods. 2014; 228: 15-26https://doi.org/10.1016/j.jneumeth.2014.02.019Crossref PubMed Scopus (16) Google Scholar], suggesting that more objective data-cleaning methods are needed. Recently, SSP–SIR was developed to suppress TMS-evoked muscle artifacts, while controlling the level of distortions in the neuronal signals of interest [[1]Mutanen T.P. Kukkonen M. Nieminen J.O. Stenroos M. Sarvas J. Ilmoniemi R.J. Recovering TMS-evoked EEG responses masked by muscle artifacts.Neuroimage. 2016; 139: 157-166https://doi.org/10.1016/j.neuroimage.2016.05.028Crossref PubMed Scopus (27) Google Scholar]. In short, SSP rejects topographies (signal-space directions) that are estimated to best capture the artifact. Because SSP also distorts the brain-signal topographies, an additional SIR step is needed; SIR uses inverse and forward calculations to reconstruct the original artifact-free EEG signals. After SSP–SIR, a closely related method SOUND was developed to automatically detect and remove noise or artifacts from TMS–EEG signals [[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar]. SOUND uses an iterative minimum-norm-estimate-based cross-validation across the channels to find a spatial Wiener filter that provides optimal 1Optimal in the sense that the expectation value of the root-mean-square differences between the estimated and the true noiseless neuronal signals are minimized.1Optimal in the sense that the expectation value of the root-mean-square differences between the estimated and the true noiseless neuronal signals are minimized. estimates for the neuronal EEG signals. SOUND filters out those signal components that are not likely to originate from intracranial post-synaptic currents, e.g., electrode-polarization, line-noise, and electrode-movement artifacts. SSP–SIR and SOUND provide complementary tools and flexibility to conventional TMS–EEG preprocessing. For instance, unlike with ICA, the assumption for statistical independence between the artifacts and brain signal is not needed. As semiautomatic methods, SSP–SIR and SOUND can substantially enhance data analysis. Both methods are now available in TESA, a TMS–EEG data analysis plugin, which works inside the well-established EEG-analysis toolbox EEGLAB [[9]Delorme A. Makeig S. EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis.J Neurosci Methods. 2004; 134: 9-21https://doi.org/10.1016/j.jneumeth.2003.10.009Crossref PubMed Scopus (11286) Google Scholar]. The EEGLAB platform enables a flexible use of completely graphical user interface (GUI) and/or MATLAB (The Mathworks Inc., Natick, MA, USA) scripting with the researcher’s own custom code. Furthermore, because of EEGLAB’s extensive input–output functionality, TESA and its SSP–SIR and SOUND functions can now be used with a wide range of EEG systems. SSP–SIR and SOUND utilize inverse and forward modelling of the neuronal EEG signals (see Refs. [[1]Mutanen T.P. Kukkonen M. Nieminen J.O. Stenroos M. Sarvas J. Ilmoniemi R.J. Recovering TMS-evoked EEG responses masked by muscle artifacts.Neuroimage. 2016; 139: 157-166https://doi.org/10.1016/j.neuroimage.2016.05.028Crossref PubMed Scopus (27) Google Scholar,[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar] for details). For this, a lead-field matrix, which describes the sensitivity of the EEG channels to all possible cortical sources, is needed. If the lead field is not available, the SSP–SIR and SOUND functions (tesa_sspsir and tesa_sound) automatize this process by computing a lead field based on a spherical three-layer model and the theoretical channel locations on the standard 10–20 layout. Both tesa_sspsir and tesa_sound functions are very efficient, requiring only seconds of processing time for a standard TMS–EEG dataset (e.g., consisting of 140 x 2-s epochs, measured with 62 channels and 1000-Hz sampling rate) on a standard desktop computer. For SOUND, this means over a fivefold decrease in the computation time compared to the original implementation [[2]Mutanen T.P. Metsomaa J. Liljander S. Ilmoniemi R.J. Automatic and robust noise suppression in EEG and MEG: the SOUND algorithm.Neuroimage. 2018; 166: 135-151https://doi.org/10.1016/j.neuroimage.2017.10.021Crossref PubMed Scopus (23) Google Scholar]. In addition to muscle-artifact rejection, SSP–SIR appears to be able to recover genuine TMS-evoked EEG signals under the TMS-related sensory responses [[4]Biabani M. Fornito A. Mutanen T.P. Morrow J. Rogasch N.C. Characterizing and minimizing the contribution of sensory inputs to TMS-evoked potentials.Brain Stimul. 2019; 12: 1537-1552https://doi.org/10.1016/j.brs.2019.07.009Abstract Full Text Full Text PDF PubMed Scopus (21) Google Scholar]. Using control data consisting of only somatic and auditory responses to TMS, the most significant sensory-response topographies were estimated and suppressed from the actual TMS–EEG data. We provide the implementation of this process in the new tesa_sspsir function. The process can be easily generalized to suppress other artifacts, provided the artifacts can be captured in additional control data and the topographies are uncorrelated from the TMS-evoked neural sources. To conclude, TESA now includes new source-based spatial filtering methods, SSP–SIR and SOUND, allowing a more flexible removal of some of the most-challenging, unwanted TMS-evoked signals (e.g., muscle and multisensory responses), as well as other common recording artifacts. Additional upgrades with the latest TESA version include improvements to the ICA visualization tool, extended filtering options, and capacity to remove TMS-pulse artifacts from continuous data. Alongside with this publication, we provide comprehensive documentation for the new methods and an example script, showing how the functions can be incorporated in practice inside a TMS–EEG preprocessing pipeline. In the future, the TESA developers aim to keep publishing TMS–EEG-analysis tools from voluntary contributors, to make novel methods more accessible to a wide range of TMS–EEG researchers. Further information on TESA, including code and training manual, is available from: https://nigelrogasch.github.io/TESA/ Risto Ilmoniemi is an advisor and a minority shareholder of Nexstim Plc. He has received funding from Business Finland to prepare commercialization of TMS technologies. This work was supported by the Academy of Finland (Grant No. 321631 ) and the Australian Research Council ( DE180100741 ).