A longitudinal observational study with ecological momentary assessment and deep learning to predict non-prescribed opioid use, treatment retention, and medication nonadherence among persons receiving medication treatment for opioid use disorder

J Subst Use Addict Treat. 2025 Jun:173:209685. doi: 10.1016/j.josat.2025.209685. Epub 2025 Mar 22.

Abstract

Background: Despite effective treatments for opioid use disorder (OUD), relapse and treatment drop-out diminish their efficacy, increasing the risks of adverse outcomes, including death. Predicting important outcomes, including non-prescribed opioid use (NPOU) and treatment discontinuation among persons receiving medications for OUD (MOUD) can provide a proactive approach to these challenges. Our study uses ecological momentary assessment (EMA) and deep learning to predict momentary NPOU, medication nonadherence, and treatment retention in MOUD patients.

Methods: Study participants included adults receiving MOUD at a large outpatient treatment program. We predicted NPOU (EMA-based), medication nonadherence (Electronic Health Record [EHR]- and EMA-based), and treatment retention (EHR-based) using context-sensitive EMAs (e.g., stress, pain, social setting). We used recurrent deep learning models with 7-day sliding windows to predict the next-day outcomes, using Area Under the ROC Curve (AUC) for assessment. We employed SHapley additive ExPlanations (SHAP) to understand feature latency and importance.

Results: Participants comprised 62 adults with 14,322 observations. Model performance varied across EMA subtypes and outcomes with AUCs spanning 0.58-0.97. Recent substance use was the best performing predictor for EMA-based NPOU (AUC = 0.97). Life-contextual factors were best performers for EMA-based medication nonadherence (AUC = 0.68) and retention (AUC = 0.89), and substance use risk factors (e.g., nicotine and alcohol use) and self-reported MOUD adherence performed best for predicting EHR-based medication nonadherence (AUC = 0.79). SHAP revealed varying latencies between predictors and outcomes.

Conclusions: Findings support the effectiveness of EMA and deep learning for forecasting actionable outcomes in persons receiving MOUD. These insights will enable the development of personalized dynamic risk profiles and just-in-time adaptive interventions (JITAIs) to mitigate high-risk OUD outcomes.

Keywords: Deep learning; Dense longitudinal time series; EMA; Ecological momentary assessment; Opioid addiction; Opioid relapse; Opioid treatment; Opioid use disorder; Relapse prediction.

Publication types

  • Observational Study

MeSH terms

  • Adult
  • Analgesics, Opioid / therapeutic use
  • Deep Learning*
  • Ecological Momentary Assessment*
  • Electronic Health Records
  • Female
  • Humans
  • Longitudinal Studies
  • Male
  • Medication Adherence*
  • Middle Aged
  • Opiate Substitution Treatment*
  • Opioid-Related Disorders* / drug therapy

Substances

  • Analgesics, Opioid