Identifying risk of opioid use disorder for patients taking opioid medications with deep learning

Xinyu Dong, Jianyuan Deng, Sina Rashidian, Kayley Abell-Hart, Wei Hou, Richard N. Rosenthal, Mary Saltz, Joel H. Saltz, Fusheng Wang

Research output: Contribution to journalArticlepeer-review

13 Scopus citations


Objective: The United States is experiencing an opioid epidemic. In recent years, there were more than 10 million opioid misusers aged 12 years or older annually. Identifying patients at high risk of opioid use disorder (OUD) can help to make early clinical interventions to reduce the risk of OUD. Our goal is to develop and evaluate models to predict OUD for patients on opioid medications using electronic health records and deep learning methods. The resulting models help us to better understand OUD, providing new insights on the opioid epidemic. Further, these models provide a foundation for clinical tools to predict OUD before it occurs, permitting early interventions. Methods: Electronic health records of patients who have been prescribed with medications containing active opioid ingredients were extracted from Cerner's Health Facts database for encounters between January 1, 2008, and December 31, 2017. Long short-term memory models were applied to predict OUD risk based on five recent prior encounters before the target encounter and compared with logistic regression, random forest, decision tree, and dense neural network. Prediction performance was assessed using F1 score, precision, recall, and area under the receiver-operating characteristic curve. Results: The long short-term memory (LSTM) model provided promising prediction results which outperformed other methods, with an F1 score of 0.8023 (about 0.016 higher than dense neural network (DNN)) and an area under the receiver-operating characteristic curve (AUROC) of 0.9369 (about 0.145 higher than DNN). Conclusions: LSTM-based sequential deep learning models can accurately predict OUD using a patient's history of electronic health records, with minimal prior domain knowledge. This tool has the potential to improve clinical decision support for early intervention and prevention to combat the opioid epidemic.

Original languageEnglish
Pages (from-to)1683-1693
Number of pages11
JournalJournal of the American Medical Informatics Association : JAMIA
Issue number8
StatePublished - Aug 2021
Externally publishedYes


  • deep learning
  • electronic health records
  • machine learning
  • opioid use disorder


Dive into the research topics of 'Identifying risk of opioid use disorder for patients taking opioid medications with deep learning'. Together they form a unique fingerprint.

Cite this