Toward trustworthy clinical AI for obsessive-compulsive disorder: reliability, generalizability, and interpretability of a transformer model across the ENIGMA-OCD consortium
BACKGROUND: Studies applying machine learning to obsessive-compulsive disorder (OCD) typically report accuracy in homogeneous samples but rarely assess model reliability, generalizability, and interpretability needed for clinical use. METHODS: We applied a transformer-based deep learning model, the Multi-Band Brain Net, to the ENIGMA-OCD cohort - the largest available resting-state functional magnetic resonance imaging (rs-fMRI) dataset in OCD with 1,706 participants (869 cases with OCD, 837 controls) across 23 sites worldwide. We evaluated model reliability by calculating calibration - the model's ability to "know what it doesn't know". We assessed generalizability using leave-one-site-out validation to test performance on unseen sites with different scanners, acquisition protocols, and patient populations. Finally, we examined interpretability by analyzing model attention weights to identify the neural connectivity patterns that influence model predictions. RESULTS: The model achieved modest but competitive classification performance (AUROC = .653, SD = .039). Crucially, while large-scale pretraining on the UK Biobank (N = 40,783) did not boost accuracy, it significantly enhanced model calibration by reducing overconfident predictions. Leave-one-site-out validation showed a generalization gap across sites (AUROC = .427-.819). Pretraining did not close this gap but removed scanner manufacturer bias. Finally, attention-based mapping identified biologically plausible patterns of widespread hypoconnectivity in OCD relative to healthy controls, particularly in low-frequency bands involving the default mode, salience, and somatomotor networks. These findings aligned with known OCD neurobiology. CONCLUSIONS: This study provides a framework for developing more reliable and trustworthy clinical artificial intelligence for OCD.
Authors
- Christopher Pittenger (ORCID: https://orcid.org/0000-0003-2117-9321)
- J R Sato
- Alan Anticevic (ORCID: https://orcid.org/0000-0002-4324-0536)
- Federica Piras (ORCID: https://orcid.org/0000-0002-9546-7038)
- Pedro Morgado (ORCID: https://orcid.org/0000-0003-3880-3258)
- Lea L. Backhausen (ORCID: https://orcid.org/0000-0001-6482-1316)
- Yoshiyuki Hirano (ORCID: https://orcid.org/0000-0003-3844-3061)
- Ysbrand D. van der Werf (ORCID: https://orcid.org/0000-0003-2370-9584)
- Chris Vriend (ORCID: https://orcid.org/0000-0003-3111-1304)
- Sophia I. Thomopoulos (ORCID: https://orcid.org/0000-0002-0046-4070)
- S. Evelyn Stewart (ORCID: https://orcid.org/0000-0002-0994-6383)
- Nadža Džinalija (ORCID: https://orcid.org/0009-0001-8114-1299)
- Sara Bertolín (ORCID: https://orcid.org/0000-0003-1468-7862)
- Susanne Walitza (ORCID: https://orcid.org/0000-0002-8161-8683)
- Yoshinari Abe (ORCID: https://orcid.org/0000-0001-8348-0801)
- Jun Soo Kwon (ORCID: https://orcid.org/0000-0002-1060-1462)
- Emma Muñoz‐Moreno (ORCID: https://orcid.org/0000-0003-2104-7265)
- Clara Moreau (ORCID: https://orcid.org/0000-0001-6217-731X)
- Hirofumi Tomiyama (ORCID: https://orcid.org/0000-0002-8389-0541)
- Fabrizio Piras (ORCID: https://orcid.org/0000-0003-3566-5494)
- Silvia Brem (ORCID: https://orcid.org/0000-0002-8031-1305)
- Marcelo Q. Hoexter (ORCID: https://orcid.org/0000-0002-9302-4380)
- Jiook Cha (ORCID: https://orcid.org/0000-0002-5314-7992)
- Marcelo C. Batistuzzo (ORCID: https://orcid.org/0000-0003-1347-8241)
- Francesco Benedetti (ORCID: https://orcid.org/0000-0003-4949-856X)
- Yuki Ikemizu
- Jamie D. Feusner (ORCID: https://orcid.org/0000-0002-0391-345X)
- Nora C. Vetter (ORCID: https://orcid.org/0000-0003-1477-5395)
- Emily Stern (ORCID: https://orcid.org/0000-0001-7805-594X)
- Patricia Gruner (ORCID: https://orcid.org/0000-0002-3685-146X)
- Erika L Nurmi
- Ganesan Venkatasubramanian (ORCID: https://orcid.org/0000-0002-0949-898X)
- Chiang-Shan Ray Li (ORCID: https://orcid.org/0000-0002-9393-1212)
- Ana Daniela Costa (ORCID: https://orcid.org/0000-0003-0281-4254)
- Anders Lillevik Thorsen (ORCID: https://orcid.org/0000-0003-2836-5223)
- Venkataram Shivakumar (ORCID: https://orcid.org/0000-0003-0353-8597)
- Yuki Sakai (ORCID: https://orcid.org/0000-0003-2475-8548)
- Carles Soriano‐Mas (ORCID: https://orcid.org/0000-0003-4574-6597)
- Maria Picó‐Pérez (ORCID: https://orcid.org/0000-0002-1573-2445)
- Srinivas Balachander (ORCID: https://orcid.org/0000-0001-6729-6414)
- Kristen Hagen (ORCID: https://orcid.org/0000-0002-4286-1277)
- Goi Khia Eng (ORCID: https://orcid.org/0000-0001-7189-2868)
- Tokiko Yoshida (ORCID: https://orcid.org/0000-0002-4410-7163)
- Philip R. Szeszko (ORCID: https://orcid.org/0000-0002-6383-6142)
- Luisa Lázaro (ORCID: https://orcid.org/0000-0002-8425-5750)
- Hein J. F. van Marle (ORCID: https://orcid.org/0000-0003-3543-4135)
- José C. Pariente (ORCID: https://orcid.org/0000-0002-7358-7602)
- Joseph O’Neill (ORCID: https://orcid.org/0000-0003-2216-3903)
- Odile A. van den Heuvel (ORCID: https://orcid.org/0000-0002-9804-7653)
- Dan Joseph Stein (ORCID: https://orcid.org/0000-0001-7218-7810)
- Lea Waller (ORCID: https://orcid.org/0000-0002-3239-6957)
- Fern Jaspers‐Fayer (ORCID: https://orcid.org/0000-0002-5107-4945)
- Hanyang Ruan
- Ignacio Martínez‐Zalacaín (ORCID: https://orcid.org/0000-0002-4036-0284)
- Jonathan Ipser (ORCID: https://orcid.org/0000-0003-1272-0032)
- José M. Menchón (ORCID: https://orcid.org/0000-0002-6231-6524)
- Christine Löchner (ORCID: https://orcid.org/0000-0002-4766-3704)
- Kathrin Koch (ORCID: https://orcid.org/0000-0003-4664-8016)
- Je‐Yeon Yun (ORCID: https://orcid.org/0000-0002-5531-2410)
- Daniela Rodriguez-Manrique (ORCID: https://orcid.org/0000-0002-6867-0727)
- Pino Alonso (ORCID: https://orcid.org/0000-0002-5779-9111)
- Zhen Wang (ORCID: https://orcid.org/0000-0003-4319-5314)
- Paul M. Thompson (ORCID: https://orcid.org/0000-0002-4720-8867)
- Rachel Marsh (ORCID: https://orcid.org/0000-0003-1204-3844)
- Anouk van der Straten (ORCID: https://orcid.org/0000-0003-2436-4899)
- Y Rangaswami Reddy
- Maria Pak (ORCID: https://orcid.org/0009-0009-4153-6470)
- Daniela Vecchio
- Guido van Wingen
- Youngsun Cho
- Wieke van Leeuwen
- Willem Bruin
- H. Blair Simpson
- Nicole Beyer
- Eiji Shimizu (ORCID: https://orcid.org/0000-0002-6741-9338)
- Sangyoon Bae (ORCID: https://orcid.org/0000-0003-0411-5692)
- Youngchan Ryu
- Minah Kim (ORCID: https://orcid.org/0000-0001-8668-0817)
- Tomohiro Nakao
- ENIGMA-OCD Working Group
- Hao Hu
- Janardhanan C. Narayanaswamy
- Bjarne Hansen (ORCID: https://orcid.org/0000-0001-5659-1119)
- Federica Colombo (ORCID: https://orcid.org/0000-0001-5853-9912)
- Beatriz Couto (ORCID: https://orcid.org/0000-0002-3746-9959)
- Qing Zhao (ORCID: https://orcid.org/0009-0008-6253-5832)
- Benedetta Vai (ORCID: https://orcid.org/0000-0002-0748-4656)
Institutions
- Universitat Jaume I (ES)
- University of Southern California (US)
- Nathan Kline Institute for Psychiatric Research (US)
- Johnson & Johnson (United States) (US)
- Centre for Addiction and Mental Health (CA)
- Kyushu University (JP)
- Seoul National University (KR)
- University of British Columbia (CA)
- Vita-Salute San Raffaele University (IT)
- University of Cape Town (ZA)
- Kyoto Prefectural University (JP)
- American Academy of Child and Adolescent Psychiatry (US)
- Stellenbosch University (ZA)
- Columbia University Irving Medical Center (US)
- Haukeland University Hospital (NO)
- Bellvitge University Hospital (ES)
- Centre Hospitalier Universitaire Sainte-Justine (CA)
- New Generation University College (ET)
- Shanghai Mental Health Center (CN)
- Seoul National University Hospital (KR)
- Yale University (US)
- New York Psychoanalytic Society and Institute (US)
- Humboldt-Universität zu Berlin (DE)
- Kyoto Prefectural University of Medicine (JP)
- Institut d'Investigació Biomédica de Bellvitge (ES)
- MSB Medical School Berlin (DE)
- University Hospital of Zurich (CH)
- Amsterdam Neuroscience (NL)
- Hospital Clínic de Barcelona (ES)
- James J. Peters VA Medical Center (US)
- Monash Health (AU)
- IRCCS Ospedale San Raffaele (IT)
- Hanyang University Seoul Hospital (KR)
- Hospital das Clínicas da Faculdade de Medicina da Universidade de São Paulo (BR)
- Arkin (NL)
- Fondazione Santa Lucia (IT)
- Reinier van Arkel (NL)
- Consorci Institut D'Investigacions Biomediques August Pi I Sunyer (ES)
- Johnson & Johnson (Brazil) (BR)
- Clinical Academic Center of Braga (PT)
- Center for Forensic Mental Health, Chiba University (JP)
- Klinik und Poliklinik für Psychotherapie und Psychosomatik (DE)
- Technical University of Munich (DE)
- National Institute of Mental Health and Neurosciences (IN)
- Universidade Federal do ABC (BR)
- Universitat de Barcelona (ES)
- Technische Universität Dresden (DE)
- Vrije Universiteit Amsterdam (NL)
- University of Minho (PT)
Publication Details
- Journal
- medRxiv
- Published
- 2026-04-27
- DOI
- https://doi.org/10.64898/2026.04.24.26351711
- Primary Topic
- Obsessive-Compulsive Spectrum Disorders
- Type
- article
- Field-Weighted Citation Impact
- 0.00