# Detection of Movement and Lead-Popping Artifacts in Polysomnography EEG Data
## 7 Conclusions  
Methods for artifact identification in PSG EEGs are needed. We presented an approach that is based on the premise that normal EEG power spectra at the same time should be highly correlated between any two channels, whereas a substantial reduction in correlation may be indicative of an artifact. Using this approach, we showed that individual outliers at each time segment or longer-duration artifactual regions can be identified using an iterative approach. We evaluated the performance of our method using an expert-annotated EEG recording. We showed that our method achieved a sensitivity and specificity of 80% and 91%, respectively. We also developed a software package for the tool for public use, which is deposited on GitHub ([[https://github.com/nishanthCACS/EEG_PSG_loose_lead_test](https://github.com/nishanthCACS/EEG_PSG_loose_lead_test)]([https://github.com/nishanthCACS/EEG_PSG_loose_lead_test](https://github.com/nishanthCACS/EEG_PSG_loose_lead_test)), accessed on 13 October 2024)and Docker ([[https://hub.docker.com/r/nishyanand/loose_lead_test](https://hub.docker.com/r/nishyanand/loose_lead_test)]([https://hub.docker.com/r/nishyanand/loose_lead_test](https://hub.docker.com/r/nishyanand/loose_lead_test)), accessed on 13 October 2024). [PERSON] conceived and designed the initial study. [PERSON] modified the study and carried out the analysis. [PERSON], [PERSON], [PERSON] and [PERSON] developed the EEG processing pipeline. [PERSON], [PERSON] and [PERSON] provided clinical and statistical support. [PERSON] and [PERSON] wrote the initial draft. All authors contributed to writing, review, and editing of the manuscript. All authors have read and agreed to the published version of the manuscript. This research was supported by the Intramural Research Program of the National Institutes of Health, National Institute of Environmental Health Sciences (ZIA ES101765). Data Availability StatementData will be released with the written request to [EMAIL_ADDRESS] (L.L.). We are grateful to the NIEHS Office of Scientific Computing for computing support. The authors declare no conflicts of interest. The following abbreviations are used in this manuscript: \begin{tabular}{l l} EEG & Electroencephalography \\ PSG & Polysomnography \\ ICA & Independent component analysis \\ EOG & Electro-oculogram \\ EMG & Electromyography \\ NREM & Non-rapid eye movement \\ \end{tabular}   
**Figure A2. ** Spectrograms for each of the six channels for one subject, together with graphical depictions of sleep stage (NREM vs. REM or, more finely, Wake, REM, N1, N2, and N3). **Table A1. ** Number of segments declared outliers out of 46,422 for each of the six channels using nine different tuning parameter settings with three local window sizes and three local thresholds, without invoking the global threshold. \begin{tabular}{c c c c c c c c c c} \hline \hline
**Local Window (min)** & **Local 1** & \multicolumn{6}{c}{**Number of Declared Outlier Segments by Channel**} \\ \cline{3-10}  & **Threshold** & **F3** & **F4** & **C3** & **C4** & **O1** & **O2** & **Total** \\ \hline
60 & 2/3 & 353 & 122 & 1242 & 204 & 178 & 184 & 184 \\
60 & 1/2 & 93 & 15 & 703 & 78 & 41 & 36 & 36 \\
60 & 1/4 & 11 & 0 & 282 & 8 & 4 & 4 & 4 \\
90 & 2/3 & 372 & 123 & 1251 & 207 & 179 & 189 & 189 \\
90 & 1/2 & 101 & 16 & 715 & 77 & 41 & 38 & 38 \\
90 & 1/4 & 12 & 0 & 290 & 8 & 4 & 4 & 4 \\
180 & 2/3 & 372 & 129 & 1257 & 217 & 183 & 188 & 188 \\
180 & 1/2 & 99 & 16 & 716 & 78 & 41 & 38 & 38 \\
180 & 1/4 & 13 & 0 & 288 & 9 & 4 & 4 & 4 \\ \hline \hline \end{tabular}   
* \({}^{\dagger}\) Thresh (threshold) is set at the stated fraction of the median of the average correlation for all segments in the window window for the channel.