Full text
43,861 characters
· extracted from
preprint-html
· click to expand
Identifying Key Predictive Features for Opioid Use Disorder Using Machine Learning | medRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-P4HH5NV'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search Identifying Key Predictive Features for Opioid Use Disorder Using Machine Learning View ORCID Profile Suraiya Akhter , John H. Miller doi: https://doi.org/10.1101/2025.07.12.25331446 Suraiya Akhter 1 School of Business and Technology, Emporia State University , Emporia, Kansas, USA Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Suraiya Akhter For correspondence: sakhter1{at}emporia.edu John H. Miller 2 School of Engineering and Applied Sciences, Washington State University , Richland, Washington, USA Find this author on Google Scholar Find this author on PubMed Search for this author on this site Abstract Full Text Info/History Metrics Supplementary material Data/Code Preview PDF Abstract Background Opioid Use Disorder (OUD) continues to pose a pressing public health challenge across the United States, highlighting the critical need for early and accurate risk assessment tools that facilitate prompt prevention and intervention efforts. Machine learning methods have emerged as valuable tools for parsing complex medical datasets and aiding in clinical decisions. However, their effectiveness and interpretability largely rely on the appropriateness and quality of selected input features. Objective In this work, we conducted a comprehensive comparison of three distinct feature selection strategies—Alternating Decision Tree (ADT)-based scoring, Cross-Validated Feature Evaluation (CVFE), and Hypergraph-Based Feature Evaluation (HFE)— to identify the most predictive indicators of OUD. Methods The analysis was performed using data from the 2023 National Survey on Drug Use and Health (NSDUH), a dataset compiled by RTI International under the direction of the Substance Abuse and Mental Health Services Administration (SAMHSA). This dataset encompasses a broad spectrum of features related to demographics, behavior, mental health, and substance usage. Each feature selection method yielded a set of important predictors, which were subsequently used to train eXtreme Gradient Boosting (XGBoost) classification models. To enhance model transparency and interpretability, SHapley Additive exPlanations (SHAP) was employed to illustrate the influence of individual variables on model predictions. Results The performance of the models was evaluated and compared, with the model informed by CVFE-selected features achieving the best outcomes—demonstrating a predictive accuracy of 79.11% and an area under the curve (AUC) of 0.8652. The top 10 most influential features, based on SHAP value rankings from the best-performing model, included past-year misuse of pain relievers, recent alcohol use disorder, age group, history of asthma, receipt of substance use treatment in the past year, educational attainment, household size, total household income, marital status, and race/ethnicity. The web application, accessible via https://shiny.tricities.wsu.edu/oud-prediction/ , offers prediction outcomes, probability metrics, and a SHAP visualization generated from the best model built using cross-validation-based approach. Conclusions The findings highlight the crucial importance of effective feature selection in enhancing both model accuracy and interpretability, ultimately supporting the development of practical, data-driven approaches that may help healthcare providers assess OUD risk and tailor prevention strategies to individual needs. Trial registration Not applicable as this research is not a clinical trial. Introduction Since the early 2000s, the United States has experienced a dramatic escalation in both opioid use disorder (OUD) and overdose-related fatalities, culminating in the declaration of a nationwide public health emergency in 2017 [ 1 , 2 ]. In that year alone, over 70,000 drug overdose deaths occurred, with a significant rise in cases involving fentanyl and its analogs [ 3 ]. Although opioid prescription rates have steadily declined since 2012, many individuals continue to receive long-term opioid treatments, which are strongly linked to heightened OUD risk [ 4 – 6 ]. In primary care, a substantial proportion of patients on chronic opioid therapy meet diagnostic criteria for OUD [ 5 ], and a nontrivial percentage of pain patients develop prescription-related OUD [ 6 ]. In the United States, millions are affected by OUD across both prescription and non-prescription opioid use [ 7 , 8 ]. Traditional tools for identifying OUD risk—such as screening questionnaires and urine drug screens (UDS)—have important limitations. UDS can fail to detect drug use, especially when not directly observed, and self-reports are often inaccurate [ 9 – 11 ]. Consequently, many patients with OUD remain undiagnosed, leading to elevated risks for overdose and poor outcomes. Despite weak evidence supporting the long-term benefits of opioid therapy, healthcare providers frequently continue prescribing opioids for chronic pain conditions [ 12 ]. However, accurately identifying individuals vulnerable to OUD before starting opioid treatment remains a significant challenge. Established tools like the Opioid Risk Tool (ORT) and SOAPP-R have shown only limited utility [ 13 ]. Regression-based studies have attempted to identify predictive factors [ 14 – 19 ], but these approaches often struggle with issues such as class imbalance and poor generalizability [ 20 , 21 ]. The application of machine learning techniques has gained considerable attention in the prediction of OUD, largely due to their ability to analyze and interpret high-dimensional datasets derived from electronic health records. These algorithms have been increasingly utilized to identify individuals at elevated risk by drawing from diverse data environments, including clinical records and commercial data repositories, and by modeling patterns across medical history, healthcare utilization, and behavioral attributes [ 3 , 22 – 27 ]. A broad array of factors—such as gender, racial or ethnic background, educational attainment, household income, marital and employment status, geographic context, history of substance use, psychiatric conditions, prior engagement with treatment services, chronic diseases, criminal justice interactions, and type of health insurance—can all influence patient outcomes. However, the intricate relationships among demographic, behavioral, and clinical variables continue to pose challenges for reliable risk differentiation. To date, limited research has systematically assessed the significance or comparative influence of these individual factors. There is a clear demand for advanced machine learning models capable of evaluating feature importance across heterogeneous population groups. We hypothesize that a machine learning framework can be effectively used to autonomously discern and prioritize critical variables for accurate risk estimation, thereby enabling more customized and data-informed approaches to care. Such models could inform tailored treatment decisions and improve care for patients with—or at risk of—OUD and associated comorbidities. To address this, we used data from the 2023 National Survey on Drug Use and Health (NSDUH), conducted by RTI International for the Substance Abuse and Mental Health Services Administration (SAMHSA). We built a foundational machine learning pipeline aimed at forecasting OUD risk, with a strong emphasis on comprehensive feature selection methodologies. By systematically investigating both the individual impact of predictor variables, our goal is to optimize the relevance of clinical and behavioral information in guiding effective, person-centered care. This work aspires to contribute to the growing field of precision medicine and reinforce the role of machine learning in addressing public health challenges. Accessible at https://shiny.tricities.wsu.edu/oud-prediction/ , the web-based platform delivers a robust prediction framework that incorporates the cross-validation driven feature selection method. It provides SHAP-based explanations, supports batch processing of multiple samples, and allows integration of additional data to continuously enhance the model’s predictive accuracy. Materials and methods An overview of the proposed methodology is depicted in Figure 1 . The workflow begins with the collection of data for two groups—individuals diagnosed with opioid use disorder (positive cases) and those without the condition (negative cases). From this data, a wide range of potential features is generated. Feature evaluation techniques are then applied, including Alternating Decision Tree (ADT) [ 28 , 29 ], Cross-Validated Feature Elimination (CVFE) [ 30 ], and hypergraph-based feature evaluation (HFE) [ 31 ], to systematically eliminate features that contribute minimal or no predictive value. The refined feature subsets are subsequently utilized to train a machine learning algorithm, enabling the evaluation of model performance in predicting OUD outcomes. Download figure Open in new tab Figure 1 Workflow illustrating the procedure for opioid use disorder detection. Study population and features This study employed data from the 2023 edition of the National Survey on Drug Use and Health (NSDUH), administered by RTI International on behalf of the Substance Abuse and Mental Health Services Administration (SAMHSA) [ 32 ]. The dataset comprises an extensive set of variables covering demographic details, behavioral patterns, mental health indicators, and substance use information. The final dataset included 791 participants diagnosed with opioid use disorder and 42,607 participants without the condition. To mitigate the issue of class imbalance, random undersampling was applied to the non-OUD group, reducing it to 791 cases and achieving a balanced dataset across both classes. To build the predictive model, 80% of the dataset was allocated for training purposes, and the remaining 20% was set aside for performance evaluation. A detailed breakdown of the variables, their categorical groupings, associated demographic distributions, and statistical significance values is presented in Table 1 . Features exhibiting a p -value below 0.05 were regarded as statistically significant indicators. The target outcome—opioid use disorder—was defined based on the variable UD5OPIANY (Opioid Use Disorder - Past Year Users), where a value of 1 (Yes) indicated classification as an OUD case. In total, 32 features were shortlisted for analysis, all of which are listed in Supplementary Table S1 (Supplementary Material) . View this table: View inline View popup Table 1 Overview of participants’ demographic and clinical profiles. Evaluation of features Prior to model development, removing irrelevant or low-importance features is critical to enhance predictive accuracy. In this study, we applied three distinct feature selection methods—Alternating Decision Tree (ADT) [ 28 , 29 ], Cross-Validated Feature Elimination (CVFE) [ 30 ], and Hypergraph-based Feature Evaluation (HFE) [ 31 ]—to systematically discard less informative variables. The ADT algorithm combines the straightforward interpretability of a traditional decision tree with the superior prediction capability afforded by boosting methods. It encodes knowledge as a tree structure composed of interconnected decision stumps, a technique often employed in boosting frameworks. Unlike conventional trees where branches are mutually exclusive, ADTs allow overlapping branches, enabling more flexible decision paths. The model’s root is a prediction node that assigns a numerical score, followed by layers of decision nodes representing predicate conditions or tests. These layers alternate between prediction and decision nodes throughout the tree. Importantly, prediction nodes appear both as the root and as terminal nodes (leaves), distinguishing ADTs from classic decision trees and highlighting their unique architecture and operational logic. The ADT constructs a collection of rules, each comprising a prerequisite, a condition, and two corresponding scores. Conditions take the form of predicates structured as “attribute <COMPARISON= value,” while prerequisites are logical conjunctions of such conditions. Rule evaluation proceeds through nested conditional statements, using the associated scores to generate predictions for individual data points. The process begins with a root rule, whose prerequisite and condition are both set to “true,” and whose scores are computed based on the weighted distribution of training samples. Initially, all training instances are assigned equal weights, calculated as the reciprocal of the total number of samples. The algorithm then proceeds iteratively, generating new rules by selecting the optimal pairing of prerequisites and conditions that minimize a specific objective function, denoted as z . This function quantifies how effectively a rule separates positive from negative instances, guiding the search for the best rule to add. At each step, the scores for the newly created rule are updated using a boosting strategy, and the weights of training samples are adjusted in accordance with the accuracy of the new rule’s predictions. The training cycle continues until a stopping criterion is met, which may be a predetermined maximum number of iterations or a threshold for minimal accuracy improvement. The ensemble of rules produced by the ADT forms an alternating decision tree, characterized by prediction nodes containing numeric values, and structured according to the logical prerequisites defined by each successive rule. Notably, the ADT model employs only a subset of the total available features in its construction. In our implementation, we evaluated 50 randomly chosen values for the boosting iteration parameter, B . The resulting ADT-derived decision tree is displayed in Supplementary Figure S1, highlighting the subset of 32 candidate features selected. This process yielded a final set of 10 features, detailed in Supplementary Table S2 ( Supplementary Material ). In addition, we incorporated the CVFE approach together with a hypergraph-based technique to refine the initial pool of features. The step-by-step process of the CVFE method is illustrated in Figure 2 . Initially, the dataset was randomly divided into c distinct subsets. For each subset, the XGBoost algorithm was applied to determine the most influential features, with model hyperparameters optimized through a grid search strategy. Feature selection was conducted separately on every subset, after which an intersected feature set—comprising features common across all subsets—was identified. This entire procedure was repeated e times, generating e intersected feature sets in total. To finalize the feature selection, any feature appearing in at least ( p × 100)% of these intersected sets was included in the ultimate chosen feature set. Table 2 presents the count of features identified in these subsets across various configurations of the parameters c , e , and p . The detailed lists of these key features can be found in Supplementary Tables S3-S7, located in the Supplementary Material . Download figure Open in new tab Figure 2 llustration of the feature selection process employing the cross-validated feature evaluation method. View this table: View inline View popup Table 2 Performance evaluation on the test set, detailing the count of selected features and associated metrics: accuracy, precision, recall, F1 score, and AUC for each feature selection method. The HFE technique involves generating a hypergraph structure from the set of input features. Unlike standard graphs, which are denoted as G( V , E ) with vertices ( V ) connected by binary edges ( E ), a hypergraph generalizes this concept by permitting each edge—referred to as a hyperedge—to link multiple vertices simultaneously. Formally, a hypergraph is represented as G( V , E ), where V is the set of nodes and E comprises the hyperedges, each of which is a subset of V . Figure 3 provides a visual comparison between a traditional graph and a hypergraph, while Supplementary Figure S2 ( Supplemetary Material ) presents the hypergraph structure derived from the full training dataset used in this study. In the HFE framework, feature relevance is determined by assigning weights to the hyperedges associated with specific feature values. These importance scores are computed using the principle of hypergraph cut conductance minimization [ 31 ], resulting in a feature rating vector that reflects the relative influence of each feature. The scores in this vector are ranked, and the top z features are selected. The value of z is defined as β × m , where m is the total number of features and β represents the desired proportion of features to retain. In our analysis, the resulting number of selected features for different values of β are listed in Table 2 . Supplementary Tables S8-S10 ( Supplementary Material ) provide the specific feature subsets obtained for β values of 25, 50, and 75, respectively. Download figure Open in new tab Figure 3 Visualization comparing the structural differences between a standard graph and a hypergraph. Web application Figure 4 illustrates the integration of cross-validation-based feature assessment method within a machine learning-driven web application. This platform provides classification results along with probability estimates. The user interface guides users through dataset upload, binary classification execution, and probability calculation. Users can download output files and add new training samples to enhance the model’s accuracy. Additionally, the application enables exporting a SHAP plot to explore the impact of key features on predictions. The web application can be accessed publicly at https://shiny.tricities.wsu.edu/oud-prediction/ . Download figure Open in new tab Figure 4 The web application for opioid use disorder prediction. Code and data availability All experimental datasets and the corresponding code are available in the repository at https://github.com/suraiya14/OUDP , as also referenced in the Supplementary Material . Results Following the reduction of the original feature set using three independent feature selection strategies, we developed individual predictive models based on the refined subsets, utilizing the XGBoost algorithm [ 33 ]. To interpret and quantify the impact of each feature on model outcomes, we applied the Shapley Additive Explanations (SHAP) method [ 34 ]. SHAP assigns values that measure the marginal contribution of each variable to the prediction outputs produced by the machine learning model. Evaluation of model performance The XGBoost algorithm was trained using multiple feature subsets obtained through ADT, CVFE and HFE methodologies in conjunction with the training data. Model performance on the test dataset was measured using the metrics defined in Equations 1 - 4 , where TP, TN, FP, and FN represent true positives, true negatives, false positives, and false negatives, respectively. Among the evaluation criteria, accuracy reflects the ratio of correctly predicted cases to the overall number of observations in the dataset, serving as a key indicator of the classifier’s predictive capability. In addition, we evaluated the model using recall and precision metrics. Recall assesses how effectively the model identifies genuine positive instances, whereas precision represents the ratio of correctly predicted positives to the total number of positive predictions made by the model. To provide a balanced measure of both recall and precision, we computed the F1 score, which is the harmonic mean of the two. We also assessed the model’s binary classification performance using the Area Under the Curve (AUC). Higher AUC values indicate stronger discriminative capability, with a score of 1 representing perfect classification and 0.5 corresponding to performance no better than random guessing. Table 2 presents a comparative assessment of XGBoost model performance using feature subsets derived from ADT, CVFE, and HFE selection methods. Correspondingly, Supplementary Figure S3 ( Supplementary Material ) displays the confusion matrices associated with each reduced feature configuration. Among the evaluated models, the subset generated through CVFE with parameters c = 4, e = 10, and p = 0.6 yielded superior predictive outcomes relative to the ADT- and HFE-based models. Notably, the highest-performing model correctly identified 124 out of 156 individuals diagnosed with OUD. Features selected via the CVFE method The highest-performing model in our analysis was the XGBoost classifier trained using the feature subset identified by the CVFE method, configured with parameters c = 4, e = 10, and p = 0.6. Figure 5 presents a SHAP summary bar chart, which ranks the importance of the selected features based on SHAP value analysis applied to this specific model. From an initial set of 32 candidate variables, the CVFE approach retained 29 features. Among them, the top 10 most influential features—ranked by their SHAP values—were: EDUD5PNRMIS (past-year misuse of pain relievers), PYUD5ALC (alcohol use disorder within the last year), CATAG6 (age group), ASTHMAEVR (history of asthma), SUTRTPY (receipt of substance use treatment in the past year), IREDUHIGHST2 (educational attainment), IRHHSIZ2 (number of household members), INCOME (total household income), IRMARIT (marital status), and NEWRACE2 (race/ethnicity). Download figure Open in new tab Figure 5 The ranking of feature relevance as identified by the XGBoost framework. The horizontal axis represents the average magnitude of SHAP values for each variable, reflecting their typical influence on prediction outcomes. Features are arranged in decreasing order of predictive contribution. Analysis of feature contributions Figure 6 presents boxplots illustrating the distribution of SHAP values for the categories within the top 10 categorical features identified in Figure 5 . Since elevated SHAP values correspond to an increased opioid risk for patients, these plots allow direct interpretation of risk levels across feature categories. For instance, as shown in Figure 6(a) , individuals who have never misused pain relievers exhibit a low opioid risk, whereas those classified as “Yes (misused)” show a substantially higher risk. Similarly, Figure 6(b) reveals that patients without an alcohol use disorder have a reduced opioid risk. The SHAP values for age categories, displayed in Figure 6(c) , indicate that older individuals carry a higher opioid risk. Surprisingly, Figure 6(d) shows that a history of asthma is linked to a lower opioid risk. Recent substance use treatment correlates with an elevated opioid risk as demonstrated in Figure 6(e) . Educational attainment at the college graduate level or above is associated with decreased risk ( Figure 6(f) ). Finally, factors such as larger household size, lower family income, widowed marital status, and being Non-Hispanic Native American or Alaska Native correspond to increased opioid risk, as shown in Figures 6(g) - 6(j) . Download figure Open in new tab Download figure Open in new tab Figure 6 SHAP value distribution for the top 10 categorical features selected by the model. Discussion and conclusions Tailoring predictions to individual patients is critical for enhancing care in those vulnerable to OUD. To meet this goal, we constructed a machine learning prediction framework built on a selectively refined set of features. By removing unnecessary and redundant variables, we improved the model’s clarity and interpretability. Utilizing this streamlined feature set, we assessed the performance of the XGBoost algorithm. Our approach effectively pinpointed important predictors linked to OUD, offering valuable insights for personalized risk evaluation, clinical decision-making, and the development of focused therapeutic strategies. The developed web application integrates the best feature selection method, CVFE, and allows users to apply this approach for predicting OUD risk on new external datasets. Additionally, users have the option to augment the training data with extra samples and perform SHAP-driven analysis to investigate the impact of important features. Aligning with prior research, our model recognized age and ethnicity as among the most significant predictors. For example, a study utilizing a hierarchical attention transformer model also emphasized these features within the top 10 predictors [ 3 ]. However, that analysis lacked a detailed hierarchy of feature importance, which limited its explanatory power. Similarly, Hasan et al. [ 22 ] employed several machine learning approaches—including logistic regression, random forest, decision trees, and gradient boosting—on extensive healthcare claims data. Their highest-performing random forest model identified age, heroin poisoning, and drug abuse as key predictors. Our results are consistent with these observations; notably, younger age was linked to a decreased estimated risk for OUD, indicating a potential protective effect in specific scenarios. Additionally, Banks et al. [ 23 ] constructed a personalized prediction model for opioid-related outcomes, where age, substance use, and alcohol consumption ranked as the most influential features. The convergence of these findings supports the robustness and clinical relevance of our predictive model. Importantly, our model highlighted pain reliever misuse as the foremost predictor for OUD. This finding is consistent with prior research underscoring the pivotal influence of prescription opioid misuse in the onset of OUD [ 35 – 37 ]. Recognizing such critical predictor is of great clinical importance, as it can guide early detection efforts, improve risk assessment, and shape targeted intervention plans. Additionally, the other key features identified by our model carry substantial potential to enhance individualized patient management and improve the efficient distribution of healthcare resources. While our results are encouraging, there are important limitations to consider. The models were developed using historical datasets, some of which contained missing data that were addressed through imputation methods [ 32 ]. This preprocessing step may have introduced bias, potentially affecting the calculated feature importance values. Furthermore, features with limited representation due to small sample sizes might have disproportionately influenced the findings. Additionally, the current model does not support time-to-event or longitudinal prediction tasks, limiting its application for monitoring the progression of OUD over time. Future work should focus on enhancing the model to accommodate these types of analyses. In conclusion, we established and validated a machine learning framework to pinpoint critical determinants of OUD using data from the NSDUH survey. While the model shows encouraging predictive capability, there remains room for refinement, especially regarding improvements in AUC and other performance indicators. Future efforts will aim to integrate more detailed, high-dimensional datasets—such as multi-omics profiles and behavioral health metrics—to boost the model’s accuracy. This research advances the development of personalized strategies for opioid misuse prevention and treatment, ultimately aiming to enhance patient care outcomes. Supporting information The supplementary material for this article is provided herewith the manuscript. (DOCX) Authors’ contributions SA: Conceptualization, data collection, formal analysis, software implementation, validation, visualization, and writing manuscript. JHM: Conceptualization, supervision, reviewing analyses, and editing the manuscript. All authors read and approved the final manuscript. Competing interests The authors declare that they have no competing interests. Ethical approval statement The study was conducted in accordance with the Declaration of Helsinki. Data Availability All data produced are available online at https://github.com/suraiya14/OUDP. Footnotes The manuscript has been updated to include a discussion of the recently developed web application (https://shiny.tricities.wsu.edu/oud-prediction/). References 1. ↵ Garbin C , Marques N , Marques O . Machine learning for predicting opioid use disorder from healthcare data: a systematic review . Computer Methods and Programs in Biomedicine . 2023 ; 236 : 107573 . 2. ↵ Services USDoHaH . What is the U.S. Opioid Epidemic? 2017 [June 27, 2025]. Available from: https://www.hhs.gov/opioids/index.html . 3. ↵ Kashyap A , Callison-Burch C , Boland MR . A deep learning method to detect opioid prescription and opioid use disorder from electronic health records . International journal of medical informatics . 2023 ; 171 : 104979 . 4. ↵ Bohnert AS , Guy Jr GP , Losby JL . Opioid prescribing in the United States before and after the Centers for Disease Control and Prevention’s 2016 opioid guideline . Annals of internal medicine . 2018 ; 169 ( 6 ): 367 – 75 . OpenUrl CrossRef PubMed 5. ↵ Guy GP , Zhang K , Schieber LZ , Young R , Dowell D. County-level opioid prescribing in the United States, 2015 and 2017 . JAMA internal medicine . 2019 ; 179 ( 4 ): 574 – 6 . OpenUrl PubMed 6. ↵ Higgins C , Smith BH , Matthews K . Incidence of iatrogenic opioid dependence or abuse in patients with pain who were exposed to opioid analgesic therapy: a systematic review and meta-analysis . British journal of anaesthesia . 2018 ; 120 ( 6 ): 1335 – 44 . OpenUrl CrossRef PubMed 7. ↵ Keyes KM , Rutherford C , Hamilton A , Barocas JA , Gelberg KH , Mueller PP , et al. What is the prevalence of and trend in opioid use disorder in the United States from 2010 to 2019? Using multiplier approaches to estimate prevalence for an unknown population size . Drug and alcohol dependence reports . 2022 ; 3 : 100052 . 8. ↵ Kirson NY , Shei A , Rice JB , Enloe CJ , Bodnar K , Birnbaum HG , et al. The burden of undiagnosed opioid abuse among commercially insured individuals . Pain medicine . 2015 ; 16 ( 7 ): 1325 – 32 . OpenUrl CrossRef PubMed 9. ↵ Katz NP , Sherburne S , Beach M , Rose RJ , Vielguth J , Bradley J , et al. Behavioral monitoring and urine toxicology testing in patients receiving long-term opioid therapy . Anesthesia & Analgesia . 2003 ; 97 ( 4 ): 1097 – 102 . OpenUrl PubMed Web of Science 10. Heit HA , Gourlay DL . Urine drug testing in pain medicine . Journal of pain and symptom management . 2004 ; 27 ( 3 ): 260 – 7 . OpenUrl CrossRef PubMed Web of Science 11. ↵ Mallya A , Purnell AL , Svrakic DM , Lovell AM , Freedland KE , Gott BM , et al. Witnessed versus unwitnessed random urine tests in the treatment of opioid dependence . The American Journal on Addictions . 2013 ; 22 ( 2 ): 175 – 7 . OpenUrl PubMed 12. ↵ Chapman CR , Lipschitz DL , Angst MS , Chou R , Denisco RC , Donaldson GW , et al. Opioid pharmacotherapy for chronic non-cancer pain in the United States: a research guideline for developing an evidence-base . The Journal of Pain . 2010 ; 11 ( 9 ): 807 – 29 . OpenUrl PubMed 13. ↵ Jones T , Moore T . Preliminary data on a new opioid risk assessment measure: the Brief Risk Interview . Journal of Opioid Management . 2013 ; 9 ( 1 ): 19 – 27 . OpenUrl PubMed 14. ↵ Ciesielski T , Iyengar R , Bothra A , Tomala D , Cislo G , Gage BF . A tool to assess risk of de novo opioid abuse or dependence . The American journal of medicine . 2016 ; 129 ( 7 ): 699 – 705 . e4. OpenUrl CrossRef PubMed 15. Dufour R , Mardekian J , Pasquale MK , Schaaf D , Andrews GA , Patel NC . Understanding predictors of opioid abuse: predictive model development and validation . Am J Pharm Benefits . 2014 ; 6 ( 5 ): 208 – 16 . OpenUrl 16. Edlund MJ , Martin BC , Fan M-Y , Devries A , Braden JB , Sullivan MD . Risks for opioid abuse and dependence among recipients of chronic opioid therapy: results from the TROUP study . Drug and alcohol dependence . 2010 ; 112 ( 1-2 ): 90 – 8 . OpenUrl CrossRef PubMed Web of Science 17. Ives TJ , Chelminski PR , Hammett-Stabler CA , Malone RM , Perhac JS , Potisek NM , et al. Predictors of opioid misuse in patients with chronic pain: a prospective cohort study . BMC health services research . 2006 ; 6 : 1 – 10 . OpenUrl PubMed 18. Rice JB , White AG , Birnbaum HG , Schiller M , Brown DA , Roland CL . A model to identify patients at risk for prescription opioid abuse, dependence, and misuse . Pain Medicine . 2012 ; 13 ( 9 ): 1162 – 73 . OpenUrl PubMed 19. ↵ Turk DC , Swanson KS , Gatchel RJ . Predicting opioid misuse by chronic pain patients: a systematic review and literature synthesis . The Clinical journal of pain . 2008 ; 24 ( 6 ): 497 – 508 . OpenUrl CrossRef PubMed Web of Science 20. ↵ Chawla NV , Bowyer KW , Hall LO , Kegelmeyer WP . SMOTE: synthetic minority over-sampling technique . Journal of artificial intelligence research . 2002 ; 16 : 321 – 57 . OpenUrl CrossRef 21. ↵ Japkowicz N , editor The class imbalance problem: Significance and strategies. Proc of the Int’l Conf on artificial intelligence ; 2000 . 22. ↵ Hasan MM , Young GJ , Patel MR , Modestino AS , Sanchez LD , Noor-E-Alam M . A machine learning framework to predict the risk of opioid use disorder . Machine Learning with Applications . 2021 ; 6 : 100144 . 23. ↵ Banks TJ , Nguyen TD , Uhlmann JK , Nair SS , Scherrer JF . Predicting opioid use disorder before and after the opioid prescribing peak in the United States: A machine learning tool using electronic healthcare records . Health informatics journal . 2023 ; 29 ( 2 ): 14604582231168826 . OpenUrl PubMed 24. Warren D , Marashi A , Siddiqui A , Eijaz AA , Pradhan P , Lim D , et al. Using machine learning to study the effect of medication adherence in Opioid Use Disorder . PLoS One . 2022 ; 17 ( 12 ): e0278988 . OpenUrl PubMed 25. Dong X , Deng J , Rashidian S , Abell-Hart K , Hou W , Rosenthal RN , et al. Identifying risk of opioid use disorder for patients taking opioid medications with deep learning . Journal of the American Medical Informatics Association . 2021 ; 28 ( 8 ): 1683 – 93 . OpenUrl CrossRef PubMed 26. Ellis RJ , Wang Z , Genes N , Ma’ayan A . Predicting opioid dependence from electronic health records with machine learning . BioData mining . 2019 ; 12 : 1 – 19 . OpenUrl PubMed 27. ↵ Burgess-Hull AJ , Brooks C , Epstein DH , Gandhi D , Oviedo E . Using machine learning to predict treatment adherence in patients on medication for opioid use disorder . Journal of Addiction Medicine . 2023 ; 17 ( 1 ): 28 – 34 . OpenUrl PubMed 28. ↵ Akhter S , Miller JH . BPAGS: a web application for bacteriocin prediction via feature evaluation using alternating decision tree, genetic algorithm, and linear support vector classifier . Frontiers in Bioinformatics . 2024 ; 3 : 1284705 . 29. ↵ Freund Y , Mason L , editors. The alternating decision tree learning algorithm . icml; 1999 . 30. ↵ Yang M-R , Wu Y-W . A Cross-Validated Feature Selection (CVFS) approach for extracting the most parsimonious feature sets and discovering potential antimicrobial resistance (AMR) biomarkers . Computational and Structural Biotechnology Journal . 2023 ; 21 : 769 – 79 . OpenUrl 31. ↵ Misiorek P , Janowski S . Hypergraph-based importance assessment for binary classification data . Knowledge and Information Systems . 2023 ; 65 ( 4 ): 1657 – 83 . OpenUrl 32. ↵ Quality CfBHSa . 2023 National Survey on Drug Use and Health Public Use File Codebook, Substance Abuse and Mental Health Services Administration 2024 [updated June 27, 2025]. Available from: https://www.samhsa.gov/data/system/files/media-puf-file/NSDUH-2023-DS0001-info-codebook_v1.pdf . 33. ↵ Chen T , Guestrin C , editors. Xgboost: A scalable tree boosting system. Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining ; 2016 . 34. ↵ Lundberg SM , Erion G , Chen H , DeGrave A , Prutkin JM , Nair B , et al. From local explanations to global understanding with explainable AI for trees . Nature machine intelligence . 2020 ; 2 ( 1 ): 56 – 67 . OpenUrl PubMed 35. ↵ Ferguson E , Lewis B , Teitelbaum S , Reisfield G , Robinson M , Boissoneault J . Longitudinal associations between pain and substance use disorder treatment outcomes . Journal of substance abuse treatment . 2022 ; 143 : 108892 . 36. Wei Y-JJ , Schmidt S , Fillingim RB , Brock G , Schmidt S , Winterstein AG . Unrelieved pain and risk of opioid use disorder or overdose in older adults prescribed opioids . Pain . 2022 : 10 . 1097 . 37. ↵ Rudolph KE , Williams NT , Diaz I , Forrest S , Hoffman KL , Samples H , et al. Pain management treatments and opioid use disorder risk in medicaid patients . American Journal of Preventive Medicine . 2024 ; 67 ( 6 ): 878 – 86 . OpenUrl PubMed View the discussion thread. Back to top Previous Next Posted August 07, 2025. Download PDF Supplementary Material 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. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Identifying Key Predictive Features for Opioid Use Disorder Using Machine Learning Message Subject (Your Name) has forwarded a page to you from medRxiv Message Body (Your Name) thought you would like to see this page from the medRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Identifying Key Predictive Features for Opioid Use Disorder Using Machine Learning Suraiya Akhter , John H. Miller medRxiv 2025.07.12.25331446; doi: https://doi.org/10.1101/2025.07.12.25331446 Share This Article: Copy Citation Tools Identifying Key Predictive Features for Opioid Use Disorder Using Machine Learning Suraiya Akhter , John H. Miller medRxiv 2025.07.12.25331446; doi: https://doi.org/10.1101/2025.07.12.25331446 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 (569) Allergy and Immunology (863) Anesthesia (300) Cardiovascular Medicine (4442) Dentistry and Oral Medicine (444) Dermatology (383) Emergency Medicine (609) Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1511) Epidemiology (15230) Forensic Medicine (30) Gastroenterology (1126) Genetic and Genomic Medicine (6610) Geriatric Medicine (668) Health Economics (998) Health Informatics (4542) Health Policy (1370) Health Systems and Quality Improvement (1613) Hematology (543) HIV/AIDS (1266) Infectious Diseases (except HIV/AIDS) (15923) Intensive Care and Critical Care Medicine (1103) Medical Education (623) Medical Ethics (147) Nephrology (668) Neurology (6607) Nursing (346) Nutrition (999) Obstetrics and Gynecology (1146) Occupational and Environmental Health (957) Oncology (3338) Ophthalmology (974) Orthopedics (369) Otolaryngology (420) Pain Medicine (436) Palliative Medicine (130) Pathology (665) Pediatrics (1693) Pharmacology and Therapeutics (692) Primary Care Research (712) Psychiatry and Clinical Psychology (5448) Public and Global Health (9239) Radiology and Imaging (2202) Rehabilitation Medicine and Physical Therapy (1370) Respiratory Medicine (1196) Rheumatology (596) Sexual and Reproductive Health (714) Sports Medicine (530) Surgery (712) Toxicology (99) Transplantation (289) Urology (265) (function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a01f34b85a0573de',t:'MTc3OTgyMzk0Nw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.