Detection-Guided Artifact Removal for Clinical EEG: A Deep Learning Framework
Journal:
medRxiv
Published Date:
Feb 14, 2026
Abstract
Objective: We developed and validated a detection-guided artifact removal framework for clinical electroencephalography (EEG). The framework applies artifact correction only to the contaminated segments and preserves artifact-free data without modification. Approach: The framework uses convolutional neural network (CNN) detectors trained on the Temple University Hospital (TUH) Artifact Corpus (150 recordings, 105 patients). For eye movement artifacts (20 s windows), the framework applies independent component analysis (ICA) and canonical correlation analysis (CCA). For muscle artifacts (5 s windows), the framework applies wavelet thresholding and empirical mode decomposition (EMD). For non-physiological artifacts (1 s windows), the framework applies spherical spline interpolation and artifact subspace reconstruction (ASR). Removal methods were applied only to detector-flagged artifact windows. For windows that are not flagged as artifacts, the output signal is equal to the input signal. In a test set held-out (21 patients, 30 recordings), we compared detection-guided selective removal with global removal, which applies the same method to all windows. We evaluated the preservation of artifact-free windows using correlation, root mean squared error (RMSE), and peak signal-to-noise ratio (PSNR). Main results: Selective removal outperformed global removal in all six methods and 18 metric comparisons (p < 10-105). Selective processing maintained a clean-segment correlation above 0.987 for all methods. Global removal reduced the correlation to values as low as 0.39 (CCA) and 0.47 (ASR). The framework achieved artifact suppression in detector-flagged windows. CCA removed 74.6% of the amplitude of the eye movement artifact. EMD removed 99.8% of high-frequency (30-40 Hz) muscle contamination. ASR reduced the non-physiological artifact amplitude by 37.1% in detector-flagged windows. Preservation of artifact-free windows remained high in all methods, indicating minimal distortion of clean EEG. Significance: Detection-guided selective removal addresses a key limitation of pipelines that apply correction globally and that can remove clean electroencephalography (EEG) signals. The framework enables automated artifact removal without manual review and preserves signal fidelity for clinical interpretation. The modular design supports integration into real-time monitoring systems for acute and perioperative care applications.