Recognizing EEG responses to active TMS vs. sham stimulations in different TMS-EEG datasets: a machine learning approach - Keihani, Ahmadreza; Donati, Francesco L; Russo, Simone; Parmigiani, Sara; Solbiati, Michela; Casali, Adenauer G; Fecchio, Matteo; Chaichian, Omeed; Rothwell, John; Massimini, Marcello; Rocchi, Lorenzo; Rosanova, Mario; et al. (bioRxiv, 2025)
Transcranial Magnetic Stimulation (TMS) with simultaneous Electroencephalogram (TMS-EEG) allows assessing the neurophysiological properties of cortical neurons. However, TMS-evoked EEG potentials (TEPs) can be affected by components unrelated to TMS direct neuronal activation. Accurate, automatic tools are therefore needed to establish the quality of TEPs. To assess the discriminability of EEG responses to TMS vs. EEG responses to sham stimulations using sequence-to-sequence machine learning (ML). Two indipendent TMS-EEG datasets including TMS and several sham stimulation conditions were obtained from the left motor area of healthy volunteers (N=33 across datasets). A Bi-directional Long Short-Term Memory (BiLSTM) ML network was used to label each time point of the EEG signals as pertaining to TMS or sham conditions. Main outcome measures included accuracy at single-trial level and after averaging five to twenty trials. For TMS conditions, post-stimulus vs. baseline/pre-stimulus EEG comparisons yielded moderate (60%-75%) single-trial accuracy and high-accuracy (>75%) for 20 trials across datasets, while for sham conditions post- vs. baseline/pre-stimulus EEG comparisons yielded lower accuracy rates than for TMS conditions, except for unmasked auditory stimulation. Furthermore, baseline/pre-stimulus TMS vs. baseline/pre-stimulus sham EEG comparisons showed chance-level accuracy, whereas post-stimulus TMS vs. post-stimulus sham EEG comparisons had moderate (single trial) to high (20 trial) accuracy, except for TMS with and without the click noise masking. Single-subject findings were comparable to group-level results across datasets. TEPs after active TMS are discernible from various sham stimulations even after a handful of trials and at the single-subject level using a BiLSTM ML approach.