Skip to main content
medRxiv
  • Home
  • About
  • Submit
  • ALERTS / RSS
Advanced Search

Sex-Specific Diagnostic Subtypes in Adolescents Hospitalized for Substance Use Disorders Revealed by Transformer-Based Clustering

View ORCID ProfileManuel Corpas, Hilario Blasco, Lucía Gallego, José Manuel Ramos-Rincón, Víctor Moreno-Torres, Vicente Soriano
doi: https://doi.org/10.1101/2025.08.06.25333108
Manuel Corpas
1School of Life Sciences, University of Westminster, London, UK
2UNIR Health Sciences School, Universidad Internacional de La Rioja (UNIR), Madrid, Spain
3The Alan Turing Institute, London, UK
4Cambridge Precision Medicine, London, UK
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Manuel Corpas
Hilario Blasco
2UNIR Health Sciences School, Universidad Internacional de La Rioja (UNIR), Madrid, Spain
5Emooti Clinic, Madrid, Spain
6UNIR-itei, Logroño, Spain
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Lucía Gallego
2UNIR Health Sciences School, Universidad Internacional de La Rioja (UNIR), Madrid, Spain
5Emooti Clinic, Madrid, Spain
6UNIR-itei, Logroño, Spain
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
José Manuel Ramos-Rincón
7University Miguel Hernández, Elche, Spain
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Víctor Moreno-Torres
2UNIR Health Sciences School, Universidad Internacional de La Rioja (UNIR), Madrid, Spain
8Puerta de Hierro University Hospital, Majadahonda, Madrid, Spain
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Vicente Soriano
2UNIR Health Sciences School, Universidad Internacional de La Rioja (UNIR), Madrid, Spain
6UNIR-itei, Logroño, Spain
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • Abstract
  • Full Text
  • Info/History
  • Metrics
  • Data/Code
  • Preview PDF
Loading

Abstract

Substance use disorders (SUD) are a leading cause of psychiatric hospitalization among adolescents, yet the underlying diagnostic profiles and comorbidities remain poorly characterized. Here, we applied a transformer-based language model to 4,849 hospital discharge records from adolescents (aged 11–18) admitted with mental health and SUD in Spain between 2016 and 2020. We generated dense clinical embeddings and identified sex-specific diagnostic clusters using unsupervised learning. Male subgroups were primarily defined by externalizing disorders such as conduct disorder, ADHD, and psychosis, often associated with cannabis and alcohol use. Female subgroups exhibited higher rates of borderline personality traits, mood instability, suicidal ideation, and stress-related conditions. A unified embedding space revealed a clear sex-based separation in diagnostic patterns. These findings highlight the potential of transformer-based embeddings to uncover latent clinical phenotypes and inform precision approaches to adolescent mental health care. These sex-specific subtypes could enhance early intervention strategies and support the development of tailored treatment programmes for youths with SUD.

Competing Interest Statement

MC is currently associated with Cambridge Precision Medicine Limited.

Funding Statement

Yes

Author Declarations

I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.

Not Applicable

The details of the IRB/oversight body that provided approval or exemption for the research described are given below:

The study was approved by the Clinical Research Ethics Committee of the Universidad Internacional de La Rioja (UNIR) (ref. PI-022/2023 4/27/2023).

I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.

Not Applicable

I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).

Not Applicable

I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.

Not Applicable

Data Availability

All the data and code developed for this research are publicly available in the GitHub repository https://github.com/manuelcorpas/LLM-Mental-Health-Clustering. The repository provides Python scripts for data preprocessing, fine-tuning DeBERTa-v3, contrastive embedding, unsupervised clustering, and PCA/UMAP visualization, along with instructions for replicating each step. The data for males and females are available as CSV files with the corresponding predicted cluster pipeline result. Licensed under the MIT License, the code may be freely used and adapted for academic or other purposes, thereby promoting reproducible research and collaborative improvement of the pipeline.

https://github.com/manuelcorpas/LLM-Mental-Health-Clustering

Copyright 
The copyright holder for this preprint is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. It is made available under a CC-BY 4.0 International license.
Back to top
PreviousNext
Posted August 10, 2025.
Download PDF
Data/Code
Email

Thank you for your interest in spreading the word about medRxiv.

NOTE: Your email address is requested solely to identify you as the sender of this article.

Enter multiple addresses on separate lines or separate them with commas.
Sex-Specific Diagnostic Subtypes in Adolescents Hospitalized for Substance Use Disorders Revealed by Transformer-Based Clustering
(Your Name) has forwarded a page to you from medRxiv
(Your Name) thought you would like to see this page from the medRxiv website.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Share
Sex-Specific Diagnostic Subtypes in Adolescents Hospitalized for Substance Use Disorders Revealed by Transformer-Based Clustering
Manuel Corpas, Hilario Blasco, Lucía Gallego, José Manuel Ramos-Rincón, Víctor Moreno-Torres, Vicente Soriano
medRxiv 2025.08.06.25333108; doi: https://doi.org/10.1101/2025.08.06.25333108
Twitter logo Facebook logo LinkedIn logo Mendeley logo
Citation Tools
Sex-Specific Diagnostic Subtypes in Adolescents Hospitalized for Substance Use Disorders Revealed by Transformer-Based Clustering
Manuel Corpas, Hilario Blasco, Lucía Gallego, José Manuel Ramos-Rincón, Víctor Moreno-Torres, Vicente Soriano
medRxiv 2025.08.06.25333108; doi: https://doi.org/10.1101/2025.08.06.25333108

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Subject Area

  • Health Informatics
Subject Areas
All Articles
  • Addiction Medicine (576)
  • Allergy and Immunology (867)
  • Anesthesia (306)
  • Cardiovascular Medicine (4480)
  • Dentistry and Oral Medicine (449)
  • Dermatology (385)
  • Emergency Medicine (614)
  • Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1528)
  • Epidemiology (15276)
  • Forensic Medicine (31)
  • Gastroenterology (1133)
  • Genetic and Genomic Medicine (6644)
  • Geriatric Medicine (671)
  • Health Economics (1006)
  • Health Informatics (4603)
  • Health Policy (1378)
  • Health Systems and Quality Improvement (1623)
  • Hematology (544)
  • HIV/AIDS (1275)
  • Infectious Diseases (except HIV/AIDS) (15960)
  • Intensive Care and Critical Care Medicine (1111)
  • Medical Education (626)
  • Medical Ethics (147)
  • Nephrology (674)
  • Neurology (6693)
  • Nursing (346)
  • Nutrition (1006)
  • Obstetrics and Gynecology (1152)
  • Occupational and Environmental Health (961)
  • Oncology (3369)
  • Ophthalmology (988)
  • Orthopedics (370)
  • Otolaryngology (421)
  • Pain Medicine (437)
  • Palliative Medicine (131)
  • Pathology (668)
  • Pediatrics (1703)
  • Pharmacology and Therapeutics (699)
  • Primary Care Research (717)
  • Psychiatry and Clinical Psychology (5494)
  • Public and Global Health (9285)
  • Radiology and Imaging (2223)
  • Rehabilitation Medicine and Physical Therapy (1375)
  • Respiratory Medicine (1201)
  • Rheumatology (598)
  • Sexual and Reproductive Health (720)
  • Sports Medicine (535)
  • Surgery (720)
  • Toxicology (100)
  • Transplantation (290)
  • Urology (267)