Mental Health

Predicting mental health risk in adolescents using interpretable machine learning: Evidence from SHAP analysis.

TL;DR

An interpretable XGBoost model using 2021 YRBS data from 16,946 U.S. high school students predicted elevated mental health risk with AUC 0.806, with sadness/hopelessness as the dominant predictor followed by sex, sleep duration, screen time, and breakfast frequency; because the data are cross-sectional and the predictor is conceptually close to the outcome, the model should be viewed as an auxiliary risk-stratification tool rather than a standalone clinical screening or diagnostic instrument.

Key Findings

28.0% of U.S. high school students in the 2021 YRBS sample were classified as having elevated mental health risk, with marked sex differences and an age peak at 16-17.

  • Sample comprised 16,946 U.S. high school students from the 2021 Youth Risk Behavior Survey.
  • Elevated risk was defined as reporting on item Q85 that mental health was not good most of the time or always during the past 30 days.
  • Prevalence was 39.9% among females vs. 16.9% among males.
  • Prevalence peaked at ages 16-17.

The primary XGBoost model achieved moderate-to-good discrimination for elevated mental health risk in the held-out test set.

  • AUC was 0.806 and PR-AUC was 0.603.
  • At the training-derived threshold of 0.285: accuracy 0.749, sensitivity 0.754, specificity 0.747, balanced accuracy 0.750.
  • The threshold was selected by maximizing the Youden index using five-fold out-of-fold predictions in the training set and locked before test-set evaluation.
  • Sensitivity and specificity were both above 0.700.

SHAP analysis identified sadness/hopelessness as the dominant predictor, followed by sex, sleep duration, screen time, and breakfast frequency.

  • The 12-month sadness/hopelessness item (Q25) was retained as a predictor in the primary model, distinct from the outcome item Q85.
  • SHAP was used to assess feature importance as well as directional and non-linear patterns.
  • Demographic and behavioral factors provided additional predictive information beyond sadness/hopelessness.

Excluding sadness/hopelessness reduced model discrimination but performance remained moderate.

  • In the sensitivity analysis without sadness/hopelessness, AUC fell to 0.736 from 0.806.
  • PR-AUC fell to 0.510 from 0.603.

The author cautions that the model is an auxiliary risk-stratification tool, not a standalone clinical screening or diagnostic instrument.

  • Sadness/hopelessness is conceptually close to the current mental health outcome, which may inflate predictive performance.
  • The data are cross-sectional, limiting causal or temporal inference.
  • The revised model's threshold was selected entirely within training data to avoid test-set leakage.

What This Means

This study used a large national survey of about 17,000 U.S. high school students from 2021 to build a computer model that estimates which teens report poor current mental health. About 28% of students reported that their mental health was not good most of the time or always in the past 30 days. This was much more common among girls (about 40%) than boys (about 17%), and was highest among 16- and 17-year-olds. The model correctly flagged about three out of four students who reported poor mental health, and correctly identified about three out of four who did not. The strongest predictor was feeling persistently sad or hopeless over the past year, followed by sex, sleep duration, screen time, and how often students ate breakfast. When the sadness/hopelessness question was removed, the model was less accurate but still had some predictive ability, suggesting that sleep, screen time, and other everyday factors carry useful information. This research suggests that survey-based models could help with broad risk-stratification, such as identifying groups who may benefit from support. However, the author stresses important limits. Sadness and hopelessness are closely related to the outcome being predicted, and the survey captures one moment in time, so it cannot show that sleep or screen time cause mental health problems. The model is not a diagnostic or screening tool for individual teens.

Have a question about this study?

Citation

He J. (2026). Predicting mental health risk in adolescents using interpretable machine learning: Evidence from SHAP analysis.. PloS one. https://doi.org/10.1371/journal.pone.0359233