Comparing Manual and Automatic Artifact Detection in Sleep EEG Recordings
Psychophysiology, 2025; 62:e70016
https://doi.org/10.1111/psyp.70016
Peter P. Ujma1, Martin Dresler2, Robert Bodizs1
1 Institute of Behavioural Sciences, Semmelweis University, Budapest, Hungary
2Donders Institute, Radboud University Medical Center, Nijmegen, the Netherlands
Abstract
Sleep electroencephalogram (EEG) recordings can be contaminated by artifacts. Visual and automatic methods have been developed to mark such erroneous segments of EEG data. Here, we systematically explored the effect of artifacts on the sleep EEG power spectrum density (PSD), and we compared gold-standard visual detections to a simple automatic detector using Hjorth parameters to identify artifacts. We found that most distortions in the all-night average PSD occur because of a small minority of highly anomalous artifacts, which mainly affect the beta and gamma frequency ranges and NREM delta. Visual and automatic detections only showed moderate agreement in which data segments are artifactual. However, the resulting all-night average PSD is highly similar across all methods, and PSDs calculated with all methods successfully recover the known correlations of PSD with age and sex. No parameter settings of the automatic detector clearly outperformed others. Additionally, we showed that accurate average PSD estimates can be recovered from just a fraction of available data epochs. Our results suggest that artifacts represent a minor and easily solvable problem in sleep EEG recordings. Most visually identified artifacts do not seriously distort estimates of mid-frequency activity in the sleep EEG spectrum, and distortions to low and high frequencies can be eliminated using a simple automatic detection method nearly as well as with visual detections. These findings show that the visual inspection of EEG data is not necessary to eliminate the effects of artifacts, which is encouraging for the expected performance of automatic preprocessing in large sleep EEG databases.
Keywords:
artifacts, automatic data processing, data quality, EEG, sleep