Using explainable machine learning to elucidate social and neurobehavioral risk factors linked to nonmedicinal opioid use in young adults

Sci Rep. 2025 Dec 18;16(1):2785. doi: 10.1038/s41598-025-32704-5.

Abstract

Nonmedicinal opioid use (here defined as > 5 lifetime uses of illicit opioids or nonmedical use of prescription opioids) can be a precursor to Opioid Use Disorder (OUD). The risk factors underlying opioid misuse are likely complex and have not been well-described empirically. Here, we generated an exploratory, highly dimensional model of risk factors for nonmedicinal opioid use. We hypothesized that factors from the triadic model of addiction, which links alterations in reward processing, cognitive function, and negative emotionality to high levels of substance use, will also be important in classifying lower levels of recurrent nonmedicinal opioid use. We combined two state-of-the-art machine learning methods, eXtreme Gradient Boosting (XGBoost) and Shapley Additive Explanations (SHAP), and applied them to the available phenotypic data from the Human Connectome Project (HCP) data (N = 1206, ages 22–35, 54% female). By doing so, we identified the phenotypic variables that were most important (highest ranked) for classifying individuals as a self-reported recurrent nonmedicinal opioid users. We found that factors linked to dysregulated reward processing (substance use history), altered cognitive function (working memory, language task), and higher negative emotionality (depressive symptoms) were among the top-ranked predictors of nonmedicinal recurrent opioid use. Additionally, several factors related to dysregulated social function (higher loneliness, altered social cognition) were highly ranked, contributing to the top 50% of the model’s predictive value. These findings provide empirical evidence that the triadic model of addiction indeed applies to nonmedicinal opioid use as a precursor of OUD, suggesting that this model may also be a ‘model of vulnerability’ for addiction. Furthermore, we found novel evidence that altered social function contributed to classification of opioid misuse, emphasizing the need to integrate social function into a model of risk factors.

Supplementary Information: The online version contains supplementary material available at 10.1038/s41598-025-32704-5.

Keywords: Cognition; Depression; Loneliness; Opioid use disorder; Reward; Social; Working memory.