Related Experiment Video
Updated: May 1, 2026

A Multimodal Imaging- and Stimulation-based Method of Evaluating Connectivity-related Brain Excitability in Patients with Epilepsy
Published on: November 13, 2016
Effective correction of extreme capacitive artifacts in TMS-EEG via windowed detrending
Alberto Arturo Vergani1,2, Giulio Peroni3, Camilla Bruscagli3
1Department of Brain and Behavioral Sciences, University of Pavia, Pavia, Italy.
Abstract:
Objective.transcranial magnetic stimulation (TMS) combined with electroencephalography enables non-invasive assessment of cortical excitability and connectivity through TMS-evoked potentials (TEPs), but it is highly susceptible to artifacts that can obscure genuine neural activity. Among these, capacitive artifacts at the electrode-scalp interface are particularly challenging as they can dominate the post-stimulus signal with sharp voltage deflections and long-lasting drifts. This study evaluated the effectiveness of windowed detrending methods for correcting capacitive artifacts, especially when online hardware mitigation is insufficient.Approach.we systematically compared non-windowed detrending models against windowed approaches that separately model the rise (charging) and decay (discharging) phases of the artifact. We applied these methods to multiple datasets acquired across two centers using different hardware configurations. Performance was benchmarked against a cleaning strategy based on independent component analysis (ICA), spanning mild to extreme capacitive artifact conditions.Main results.ICA effectively corrected mild artifacts but was inadequate in moderate-to-severe cases, often suppressing physiological components or leaving substantial residual contamination. In contrast, model-based detrending, particularly windowed methods, robustly corrected extreme artifacts. Temporal segmentation improved parameter estimation and removal of nonlinear trends. Among the tested methods, windowed polynomial detrending showed a slight advantage, likely due to its greater flexibility in capturing complex artifact shapes.Significance.although optimal TMS-compatible hardware and rigorous online prevention remain essential, windowed detrending provides a robust offline correction strategy when severe capacitive artifacts persist. This approach improves data quality and supports more reliable interpretation of TEPs in studies where ideal acquisition conditions cannot be fully achieved.

