# Detection of Movement and Lead-Popping Artifacts in Polysomnography EEG Data
## 1 Introduction
The second step probes whether the distribution of potentials within each remaining epoch approximates a Gaussian distribution using a chi-square goodness-of-fit statistic with a heuristically determined cutoff. The procedure removes any epochs declared non-Gaussian as artifacts. [PERSON] et al. [14] developed procedures to identify specific artifacts, such as those from eye movement, breathing, muscle movement, or a popped electrode. They estimated different functions of a spectrogram, each focusing on one type of artifact. For example, to detect eyeblink artifacts in 1.5 s epochs, the function that the authors chose is pairwise correlation in EEG power between certain pairs of leads; they declared epochs to contain artifacts when the correlation was below a heuristic threshold. For other types of artifacts, the authors defined the relevant threshold either heuristically or statistically. Although designed for high-density, routine EEGs, FASTER (Fully Automated Statistical Thresholding for EEG artifact Rejection) [17] employs correlations in an interesting way for the detection of artifactual channels [17]. The algorithm identifies artifacts, epoch by epoch and channel by channel, using five steps. In one of the steps, FASTER uses the mean of the channel's correlation coefficients with other channels as one of several criteria to identify artifactual channels. The premise is that signals (e.g., total EEG power) from neighboring channels should be highly correlated, and deviation from the presumed high correlation is indicative of the presence of outlier channels [17]. [PERSON] et al. [15] followed a complex multi-module strategy promoted by [PERSON] et al. [17] for the detection of artifacts in routine EEGs; however, [PERSON] et al. used different component modules because their focus was on PSG EEGs. In their method, after preprocessing, a first module screens for channels that are unusually flat or unusually noisy within 30 s epochs, a second module extracts features of the power spectrum, and the final module focuses on three types of artifacts--popping, movement, and arousal--within 1 s epochs. For the popping artifacts, the authors employed an approach that looks for rapid changes of large amplitude in potential [14]. To detect movement and arousal artifacts, the authors used an approach, like that proposed by [PERSON] [9] that focuses on power in the beta band (16-30 Hz) with an adaptive threshold. Normal sleep includes cycles with alternating periods of non-rapid eye movement (NREM) and rapid eye movement (REM) sleep. None of the above-mentioned approaches appear to explicitly consider sleep cycles when using correlation between channels to detect sleep-stage-specific artifacts--at least, in part, because their goal is to remove artifacts as a preparation for automated sleep-stage classification [10, 11, 13]. Moreover, none of them unifies the correlation-based approaches for both channel- and epoch-specific artifacts. Instead, a correlation-based approach is considered either for the identification of epochs containing a specific type of artifact or for the detection of problematic channels. In this study, we propose an iterative procedure to identify artifacts in PSEGEG signals from individual channels. Based on the premise that signals from neighboring channels should be highly correlated [10, 11, 13, 17], we reasoned that the EEG power spectra at each time stamp should also be highly correlated between channels and that a pattern of low correlations suggests that lead popping or movement artifacts may have occurred during a given period. The algorithm uses the spectrogram for every channel to create a time series of average correlations between power spectra for each channel. Segments of time where a channel's average correlation lies below data-based thresholds are declared artifacts. This manuscript describes the algorithm in detail. We compared its performance in identifying artifacts with artifacts detected by an expert using the overnight EEG trace from a real PSG study.