# Detection of Movement and Lead-Popping Artifacts in Polysomnography EEG Data
## 1 Introduction  
Electroencephalography (EEG) measures the electrical activity of the brain by attaching electrode leads to the surface of the scalp. Electrical signals generated in the brain travel through the skull and are channeled by leads to electronic recording devices. The electric potentials of EEG signals are low, measured in micro volts (\(\mu\)V), and subject to distortion caused by extraneous signals. Such EEG artifacts can come from other intrinsic/physiological activities within the body or extrinsic/non-physiological electric signals from the environment [1, 2]. Physiological artifacts include electric signals generated from organs or muscles associated with pumping blood, breathing, or eye movements. Non-physiological artifacts include signals from electric currents in nearby electric circuits and power lines. EEG artifacts can also arise when the recoding electrode leads become loose or detached (often referred to as \"popped\"), perhaps from head movements. Depending on their source, artifacts may occur in only one channel or in several channels simultaneously, and they may distort an EEG signal over a brief or prolonged period. Loose leads tend to result in artifacts that last from seconds to minutes and to be present in individual EEG channels. Although physiological artifacts are largely unavoidable, researchers have developed methods to identify and/or minimize their effects (for reviews, see [1, 2, 3]). Notable approaches include independent component analysis (ICA) [4, 5], canonical correlation analysis [6], and empirical mode decomposition [7]. Most artifact detection methods were designed for high-density routine EEGs that use 21-128 scalp electrodes to monitor subjects for 20-120 min; however, methods designed for routine EEGs may not always be suitable for overnight polysomnography (PSG) EEGs. PSG EEGs monitor subjects during an overnight sleep of, typically, 7-8 h but use a lower density of scalp electrodes--typically six channels. The longer duration during sleep opens a PSG EEG to additional physiological artifacts not seen in routine EEGs, such as those from bruxism and chewing. In addition, methods for outlier removal in routine EEGs that assume stationary brain activity may not work for PSG EEGs because sleep cycles render brain-wave activity during sleep inherently non-stationary. Among the artifact detection methods specifically designed for PSG EEG [8, 9, 10, 11, 12, 13, 14, 15, 16], several subdivide the time axis into epochs, each of which contains multiple readings, and use epoch-specific measures of correlation [10, 11, 13, 14]. [PERSON] and colleagues [10, 11] proposed the elimination of eye movement artifacts based, in part, on the correlation of EEG potentials with electro-oculogram (EOG) potentials, with epochs with high correlations evidencing contaminated signals. [PERSON] et al. [13] similarly used correlation between electromyography (EMG) potentials and EEG potentials and between EOG and EEG potentials to detect EMG- or EOG-related artifacts in EEG signals. Although these methods were designed to detect epoch-specific EOG- or EMG-induced artifacts, they do not explicitly address specific channels. Only three works in the literature with respect to PSG EEG methods [14, 15, 16] explicitly state how their proposed method can identify both channel-specific and epoch-level artifacts. Of these three methods, some base artifact detection on the time sequence of EEG potentials, while others process the sequence of potentials into a spectrogram that represents the EEGs as epoch-specific power spectra covering a range of frequency bands, then use both potentials and power spectra. [PERSON] et al. [16] proposed a two-step method for artifact detection applied to 30-s epochs containing 128 samples/s of the EEG potential. The first step removes epochs containing high-amplitude EEG potentials.