Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2026 Jan 16;10(1):1-17.
doi: 10.5334/cpsy.149. eCollection 2026.

Classifying Obsessive-Compulsive Disorder from Resting-State EEG Using Convolutional Neural Networks: A Pilot Study

Affiliations

Classifying Obsessive-Compulsive Disorder from Resting-State EEG Using Convolutional Neural Networks: A Pilot Study

Brian Zaboski et al. Comput Psychiatr. .

Abstract

Objective: Identifying obsessive-compulsive disorder (OCD) using brain data remains challenging. Resting-state electroencephalography (EEG) offers an affordable and noninvasive approach, but identifying predictive signals in EEG data has met with little success, even with the application of traditional machine learning methods. We explored whether convolutional neural networks (CNNs) applied to EEG time-frequency representations can distinguish individuals with OCD from healthy controls.

Method: We collected resting-state EEG data from 20 unmedicated participants (10 with OCD, 10 healthy controls). Four-second EEG segments were transformed into time-frequency representations. We then trained a 2D CNN using a leave-one-subject-out cross-validation framework to perform subject-level classification and compared its performance to a more traditional support vector machine (SVM) approach. Next, using multimodal fusion, we examined whether adding clinical and demographic information improved classification.

Results: The CNN classifier achieved high subject-level performance, distinguishing individuals with an accuracy of 85.0% and an area under the curve (AUC) of 0.88. This significantly outperformed the SVM baseline, which performed no better than chance (45.0% accuracy, AUC: 0.47). A subsequent multimodal analysis revealed that clinical and demographic variables did not contribute any additional independent information.

Conclusion: CNNs applied to resting-state EEG show promise for identifying OCD, outperforming traditional machine learning methods. These findings highlight the potential of deep learning to uncover complex, diagnostically relevant patterns in neural data. While limited by sample size, this work supports further investigation into multimodal models for psychiatric classification, warranting replication in larger, more diverse samples.

Keywords: Convolutional Neural Networks; Deep Learning; Electroencephalography; Obsessive-Compulsive Disorder; Precision Psychiatry.

PubMed Disclaimer

Conflict of interest statement

In the past three years, BZ has consulted with Biohaven Pharmaceuticals and received royalties from Oxford University Press; these relationships are not related to the work described here. SKF has consulted for Boehringer Ingelheim International GMBH, atai Life Sciences, and Oryzon Genomics in the last three years. In the past three years, CP has consulted for Biohaven Pharmaceuticals, Freedom Biosciences, Transcend Therapeutics, UCB BioPharma, Mind Therapeutics, Ceruvia Biosciences, F-Prime Capital Partners, and Madison Avenue Partners; has received research support from Biohaven Pharmaceuticals, Freedom Biosciences, and Transcend Therapeutics; owns equity in Alco Therapeutics, Mind Therapeutics, and Lucid/Care; receives royalties from Oxford University Press and UpToDate; and holds patents on pathogenic antibodies in pediatric OCD and on novel mechanisms of psychedelic drugs. None of these relationships are related to the current paper.

Figures

Confusion matrix: 90% recall for OCD; ROC showing 0.88 AUC
Figure 1
Subject-Level CNN Performance. (Left) The confusion matrix for subject-level predictions (N = 20). (Right) The Receiver Operator Curve (ROC) for the subject-level EEG scores, with an Area Under the Curve (AUC) of 0.88.
SVM model performs at chance (0.47 AUC)
Figure 2
Subject-Level SVM Performance. (Left) The confusion matrix for subject-level predictions (N = 20). (Right) The receiver operator curve for the subject-level EEG scores, with an area under the curve (AUC) of 0.47, indicating chance-level performance.

References

    1. Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., … Zheng, X. (2015). TensorFlow: Large-scale machine learning on heterogeneous systems [White paper]. Google Research. https://download.tensorflow.org/paper/whitepaper2015.pdf
    1. Ablin, P., Cardoso, J.-F., & Gramfort, A. (2018). Faster independent component analysis by preconditioning with Hessian approximations. IEEE Transactions on Signal Processing, 66(15), 4040–4049. 10.1109/TSP.2018.2844203 - DOI
    1. Abramowitz, J. S., & Deacon, B. J. (2006). Psychometric properties and construct validity of the Obsessive–Compulsive Inventory—Revised: Replication and extension with a clinical sample. Journal of Anxiety Disorders, 20(8), 1016–1035. 10.1016/j.janxdis.2006.03.001 - DOI - PubMed
    1. Abramowitz, J. S., Deacon, B. J., Olatunji, B. O., Wheaton, M. G., Berman, N. C., Losardo, D., Timpano, K. R., McGrath, P. B., Riemann, B. C., Adams, T., Björgvinsson, T., Storch, E. A., & Hale, L. R. (2010). Assessment of obsessive-compulsive symptom dimensions: Development and evaluation of the Dimensional Obsessive-Compulsive Scale. Psychological Assessment, 22(1), 180–198. 10.1037/a0018260 - DOI - PubMed
    1. Baltrušaitis, T., Ahuja, C., & Morency, L.-P. (2019). Multimodal machine learning: A survey and taxonomy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2), 423–443. 10.1109/TPAMI.2018.2798607 - DOI - PubMed

LinkOut - more resources