Algorithmic Opacity in Opioid Risk Scoring and the Need for Transparent AI Regulation | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (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],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Short Report Algorithmic Opacity in Opioid Risk Scoring and the Need for Transparent AI Regulation Sherry Yun Wang, Ryan Stofer, Zhouzhou Chu, Xiao Huang, Ang Li This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7368491/v2 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 24 Feb, 2026 Read the published version in npj Digital Medicine → Version 2 posted 10 You are reading this latest preprint version Show more versions Abstract NarxCare®, a proprietary opioid risk scoring system embedded in Prescription Drug Monitoring Programs (PDMPs), has generated significant patient complaints. We adhered to the technical specifications and applied them to PDMP and IQVIA PharMetrics® Plus claims. Despite adding socioeconomic covariates, precision (0.01–0.32) was far below the reported benchmark of 0.75, and F1 scores (0.02–0.39) were also substantially lower than the benchmark value of 0.65, across all our reconstructed models. Biological sciences/Computational biology and bioinformatics Health sciences/Diseases Biological sciences/Drug discovery Health sciences/Health care Health sciences/Medical research Figures Figure 1 Main Text Machine learning (ML) tools are increasingly embedded in U.S. clinical workflows, yet their opacity raises persistent concerns about fairness, transparency, and regulatory oversight. One such class of tools, opioid risk scoring (ORS) systems, has become central to opioid stewardship strategies across the United States 1 . Among them, NarxCare®, a proprietary algorithm developed by Bamboo Health, is the most widely adopted and currently integrated into statewide Prescription Drug Monitoring Programs (PDMPs) in over 20 states 2 . Despite this broad integration and its growing influence over treatment decisions, NarxCare® remains a black box. In April 2024, Bamboo Health released technical documentation 3 revealing that NarxCare®’s ORS calculates risk scores using a basic logistic regression model, with predictive features such as the number of prescribers, the number of dispensing pharmacies, and thresholds of daily Morphine Milligram Equivalents (MMEs) over varying time windows. This raises the question of whether models trained on a single-state dataset 3 can generalize to diverse real-world populations when predicting opioid misuse. Reconstructing NarxCare’s Published Model To explore this, we attempted to approximate NarxCare®’s ORS using two independent datasets: the IQVIA PharMetrics Plus for Academics (2006–2022) and California’s PDMP (2010–2023). We engineered features consistent with NarxCare®’s documentation 3 , including cumulative opioid dosage, prescriber count, and pharmacy switching behavior, and trained supervised ML models (logistic regression, random forest, XGBoost, and neural networks). Models were trained to predict either receipt of medication for opioid use disorder (MOUD), as a proxy for opioid use disorder (OUD) in PDMP data 4 – 6 , or broader opioid-related adverse events defined by International Classification of Diseases (ICD) codes 7 in the IQVIA dataset (Supplementary Table 1–3). We used stratified 5-fold cross-validation, applied a range of class balancing techniques 8 [Synthetic Minority Oversampling Technique (SMOTE), random undersampling (RUS), and edited nearest neighbors (ENN)]. We also incorporated expanded feature sets, including individual-level characteristics (e.g., age, gender, and payment type) and neighborhood-level social determinants of health (SDoH), e.g., median age, income, education, disability, and racial/ethnic composition. This study was deemed exempt from institutional review board approval because it involved unidentifiable data. Benchmark Performance Discrepancies Since NarxCare® trained its model on PDMP data from a Midwestern state 3 , we anticipated comparable, or even improved performance when applying the same approach to our PDMP dataset. However, despite reproducing the published feature set, adding expanded SDoH covariates, and testing multiple modeling strategies (logistic regression, XGBoost, neural networks) with class-balancing techniques (SMOTE, RUS, ENN), all models showed only modest performance across both datasets. For each metric, we report the best-performing value within each model family across all hyperparameter configurations (Fig. 1 ). The NarxCare® baseline model is shown for reference, with its missing F1 value manually derived from its reported precision and recall. Full results are available in Supplementary Table 3. Our precision values were consistently far lower than those reported by NarxCare®. This discrepancy raises the possibility that NarxCare®’s performance metrics may rely on additional engineered features, undocumented preprocessing steps, or proprietary training optimizations that are not publicly disclosed, complicating direct comparison. Our analysis does not assert causal inference or offer definitive conclusions regarding the incorrectness of Narxcare’s outputs or training methods. Instead, it highlights the broader risks associated with opaque clinical algorithms that influence high-stakes decisions without external validation. NarxCare® exemplifies broader challenges related to unregulated clinical algorithms, particularly in the context of transparency and validation. Our goal is not to assert impropriety, but rather to highlight the structural problem: because the model is proprietary, independent researchers, state agencies, or clinicians can't determine the sources of the discrepancy. Consequences for Clinical Algorithm Oversight The U.S. Food and Drug Administration (FDA) has historically struggled to delineate its authority over Clinical Decision Support (CDS) tools that do not make explicit treatment recommendations. Tools like NarxCare® fall outside the current definition of Software as a Medical Device (SaMD), allowing them to bypass premarket review. Yet their influence is undeniable: reports of patients being denied pain treatment due to ORS flags are mounting, particularly in marginalized communities 2 , 9 – 11 . When the FDA cleared the Apple Watch in 2018 for detecting irregular heart rhythms, many worried the agency would get stuck trying to reverse-engineer the device 12 . Instead, Apple provided extensive firm-based validation data: large-scale clinical studies, clear descriptions of the underlying datasets, transparent reporting of model performance across demographic groups, and evidence that the device performed reliably in real-world conditions. This allowed the FDA to evaluate not only the product but also the company’s development process, documentation practices, and data integrity, consistent with how the agency assesses Software as a Medical Device (SaMD 12 . A similar framework would benefit high-stakes Clinical Decision Support (CDS) systems like NarxCare®, which currently fall outside device regulation under section 520(o)(1)(E) of the FD&C Act 13 because they provide a risk score, i.e., a specific diagnostic or treatment-relevant output that clinicians may rely on, without enabling users to “independently review the basis for the recommendation,” a key requirement for non-device CDS. In fact, the FDA explicitly states that software functions that provide a risk probability or risk score for a disease or condition do not meet Criterion 3 and are therefore device functions requiring oversight. This mismatch highlights the regulatory gap: NarxCare® has a device-like influence on clinical care, yet it is not necessary to demonstrate the type of transparent, evidence-based validation or a replicable evidence base that would enable independent assessment of safety, fairness, or generalizability. While the 21st Century Cures Act of 2016 and the FDA’s 2022 guidance attempted to clarify regulatory boundaries, ambiguity remains, and some developers have reportedly designed their tools to avoid triggering regulatory thresholds 14 , 15 . Meanwhile, federal policy is shifting. A January 2025 executive order directed agencies to remove barriers to AI innovation, and the White House’s “Winning the AI Race: America’s AI Action Plan 16 ” now places healthcare at the center of national AI transformation efforts. Its provisions 16 include FDA regulatory sandboxes, healthcare AI testbeds, and Centers of Excellence designed to vet AI tools in real-world clinical environments. This moment presents a critical opportunity. A modernized, risk-based regulatory framework is needed to calibrate oversight to clinical impact and align with the SaMD model. Regulatory sandboxes should enable iterative development while ensuring transparency, reproducibility, and safety. Without such mechanisms, tools like NarxCare® may continue to influence clinical decision-making without sufficient transparency unless oversight mechanisms are implemented., raising concerns about potential algorithmic harm in the absence of transparent oversight, even when implemented as part of innovation efforts. Healthcare AI should not be exempt from scrutiny. As national infrastructure evolves to support innovation, we must also build the regulatory and ethical frameworks necessary to protect patients and uphold the integrity of clinical practice. Methods Dataset This study leveraged two independent large-scale healthcare datasets to replicate and evaluate the NarxCare® opioid risk scoring algorithm: California’s PDMP and the IQVIA PharMetrics® Plus Academic claims database. The California PDMP, accessed via the Controlled Substance Utilization Review and Evaluation System (CURES), comprises de-identified patient-level dispensing records for all Schedule II–V controlled substances, including opioids, from 2015 to 2023. It captures prescription-level details such as drug name, strength, quantity dispensed, days’ supply, prescriber and dispensing pharmacy identifiers, fill date, and patient demographics (age, gender, payment type, ZIP5). The IQVIA PharMetrics® Plus Academic dataset contains longitudinal adjudicated medical and pharmacy claims from a national sample of commercially insured and Medicare Advantage enrollees, with information on National Drug Codes (NDCs), fill dates, quantities dispensed, prescriber identifiers, ICD-9/10 diagnostic codes, procedure codes, and insurance type. Unlike PDMP, IQVIA does not include pharmacy identifiers. For contextual enrichment, IQVIA ZIP3 codes were mapped to ZIP5 using the SimpleMaps crosswalk 17 , and ZIP5-level socioeconomic indicators (i.e., median age, socioeconomic status, housing, education, employment, disability, and racial/ethnic composition) were appended from the SimpleMaps crosswalk 17 . This enabled integration of neighborhood-level SDoH as a proxy for individual SDoH 18 into predictive modeling (Supplementary Table 1 and Fig. 1 ). Following data cleaning and preprocessing, the CURES dataset yielded 17.9 million training observations, 8.9 million validation observations, and 6.7 million testing observations. The IQVIA dataset yielded 1.03 million training, 256,122 validation, and 322,652 testing observations (Supplementary Table 2). Feature Construction Feature construction was aligned with Bamboo Health’s published NarxCare Application Overview (2023) 3 , implementing temporal-aggregate measures that mirror the original model’s inputs. Core features 3 included cumulative MME over the past 365 days and 2 years; total MME dosage in the past 2 years and ≥ 1 year before the index date; the number of prescriptions with daily MME > 120; and counts of unique prescribers over 2 years and the past 180 days. In the PDMP dataset, an additional behavioral feature, the number of distinct pharmacies dispensing opioids in the prior 2 years, was incorporated. All features were engineered relative to an index date defined as the most recent opioid prescription before the observation window, with sliding-window aggregation implemented using optimized, vectorized routines in Python. ZIP5-linked SDoH variables were appended to capture contextual socioeconomic influences. Continuous features underwent z-score normalization, while categorical variables were one-hot encoded before model training. NarxCare’s baseline model, as disclosed in its technical documentation 3 , was trained via logistic regression on a case-control dataset comprising over 5,000 autopsy-adjudicated unintentional overdose deaths matched by age and gender to 500,000 patients prescribed controlled substances who did not die from overdose in a Midwestern state’s PDMP data. We defined proxy outcomes to align with the data structure of each source. In the PDMP dataset, OUD was defined as any initiation of medication for OUD (MOUD; e.g., buprenorphine, methadone) occurring after the index opioid prescription date. In the IQVIA dataset, opioid-related adverse event labels were assigned based on the presence of ICD-9/10 diagnosis codes 7 for opioid-related adverse events recorded at any time following the index prescription. Our study cannot determine why NarxCare’s reported performance exceeds what can be reproduced using the publicly stated feature set. Across both datasets, our results show that, even after incorporating additional covariates (e.g., SDoH), conducting extensive hyperparameter optimization, and applying multiple imbalance-mitigation strategies, no reasonable reconstruction of the published feature space achieves performance close to NarxCare’s benchmarks. These discrepancies highlight the possibility that (a) additional, undisclosed features or preprocessing steps could have influenced NarxCare’s reported performance, (b) preprocessing steps or transformations that are not documented, or (c) potential data leakage arising from the internal construction of case–control sets or temporal windows. To ensure a rigorous evaluation, we first trained models using PDMP data, where MOUD initiation served as a proxy for opioid use disorder due to the absence of ICD-based diagnostic information. We then trained models on the IQVIA dataset, which includes ICD codes for opioid-related adverse events, allowing us to evaluate the same feature family under a more clinically specific outcome definition. In both datasets, we implemented multiple strategies to address class imbalance and maximize model performance within the limits of the available information. Despite these efforts, the performance of all reconstructed models remained far below NarxCare’s self-reported metrics. California’s PDMP is not currently integrated with electronic health records (EHR), which limits its capacity to ascertain clinically validated opioid-related adverse events accurately. Given these limitations in outcome ascertainment, we retrained the model using the IQVIA dataset, which contains structured ICD-coded diagnostic data, enabling more robust and clinically grounded labeling of opioid-related adverse events. However, both datasets demonstrated significant class imbalance in the outcome. MOUD initiation can contribute to an underestimation of the actual probability of opioid-related adverse events. In the PDMP dataset, initiation occurred in approximately 1% of patients, indicating a highly imbalanced class distribution. The IQVIA dataset exhibited a more moderate imbalance, with a positive-to-negative case ratio of approximately 1:8. To address this, we employed a range of strategies, including class rebalancing techniques (e.g., oversampling of the minority class, under-sampling of the majority class), as well as deep learning models optimized for imbalanced data. Despite these efforts, model precision did not approach the reported NarxCare® benchmarks, though contextual differences in datasets and outcome definitions limit direct comparability. Model Training Following the NarxCare baseline design, a logistic regression model with L2 regularization was implemented as the primary replication model (Supplementary Table 3), providing methodological comparability to the original algorithm. To investigate whether alternative architectures could better capture non-linear interactions, we also trained Random Forests, Extreme Gradient Boosting (XGBoost), feedforward neural networks, wide and deep hybrid architectures, and self–attention–augmented networks. Training and testing sets were generated by randomly splitting the entire dataset to evaluate model performance. Hyperparameter optimization was conducted using grid search with Optuna as the primary tuning strategy, integrated with nested cross-validation within the training partition to ensure reliable and generalizable parameter estimates. We evaluated both hard voting (majority class selection) and soft voting (probability averaging) ensemble strategies, ultimately adopting soft voting due to its superior performance and finer discrimination from aggregating predicted probabilities rather than binary class outputs. Evaluation Metrics Model performance was assessed using precision, recall, specificity, negative predictive value (NPV), and F1 score (Supplementary Table 3). All metrics were selected to enable direct comparison with the baseline model reported by NarxCare®. Both datasets exhibited outcome class imbalance, particularly PDMP, where MOUD initiation occurred in approximately 1% of patients and IQVIA, with a more moderate imbalance for opioid-related adverse events (~ 1:8). To address this, we implemented multiple imbalance-mitigation strategies, including Synthetic Minority Oversampling Technique SMOTE, RUS, and ENN. Declarations Competing Interests The authors declare no competing interests. Funding: This project was supported by funding from the National Institute of Health (NIH) AIM-AHEAD program. Author Contribution S.Y.W. conceptualized the research idea, designed the study, authored the primary manuscript, and secured funding as the Principal Investigator (PI). R. S. conducted the data analysis. A.L., C. Z., and X. H. contributed to the major revision. All authors edited and reviewed the manuscript. Acknowledgement We extend our heartfelt gratitude to the California Department of Justice for their invaluable support in providing the data and their unwavering assistance throughout our research journey. We acknowledge that CURES is not associated with the NarxCare platform, and any opinions, findings, conclusions, or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of the California Department of Justice CURES Program or IQVIA Inc. Data Availability The CURES dataset is available upon request from the Department of Justice. The census data can be obtained from the US Zip Codes Database (Pareto SoftwareTM, version 2023). Concerning access to and use of the IQVIA PharMetrics® Plus for Academics dataset, which is licensed to Chapman University under the terms of its agreement with IQVIA Inc. The code is publicly accessible at https://github.com/Sherry-Yun-Wang/Algorithmic-Opacity-in-Opioid-Risk-Scoring-Need-for-Transparent-AI-Regulation-in-Healthcare. References Ardeljan, L. D. et al. Current state of opioid stewardship. American journal of health-system pharmacy 77, 636–643 (2020). Bhagwat, A. M., Ferryman, K. S. & Gibbons, J. B. Mitigating algorithmic bias in opioid risk-score modeling to ensure equitable access to pain relief. Nature medicine 29, 769–770 (2023). Bamboo Health. NarxCare Application Overview , %3Chttps://dopl.idaho.gov/wp-content/uploads/2024/03/BOP-PDMP-Overview-NarxCare.pdf%3E (2023). Larochelle, M. R. et al. Medication for opioid use disorder after nonfatal opioid overdose and association with mortality: a cohort study. Annals of internal medicine 169, 137–145 (2018). Wakeman, S. E. et al. Comparative effectiveness of different treatment pathways for opioid use disorder. JAMA network open 3, e1920622-e1920622 (2020). Biondi, B. E., Zheng, X., Frank, C. A., Petrakis, I. & Springer, S. A. A literature review examining primary outcomes of medication treatment studies for opioid use disorder: what outcome should be used to measure opioid treatment success? The American journal on addictions 29, 249–267 (2020). Acharya, M. et al. Comparative study of opioid initiation with tramadol, short-acting hydrocodone, or short-acting oxycodone on opioid-related adverse outcomes among chronic noncancer pain patients. The Clinical journal of pain 39, 107–118 (2023). Xu, Z., Shen, D., Nie, T. & Kou, Y. A hybrid sampling algorithm combining M-SMOTE and ENN based on Random forest for medical imbalanced data. Journal of Biomedical Informatics 107, 103465 (2020). Buonora, M. J., Axson, S. A., Cohen, S. M. & Becker, W. C. Paths forward for clinicians amidst the rise of unregulated clinical decision support software: our perspective on NarxCare. Journal of general internal medicine 39, 858–862 (2024). Siegel, Z. In a World of Stigma and Bias, Can a Computer Algorithm Really Predict Overdose Risk?: A Machine-Learning Algorithm Is Being Deployed Across America to Prevent Overdose Deaths. But Could It Be Causing More Pain? Annals of Emergency Medicine 79, A16-A19 (2022). Szalavitz, M. The pain was unbearable. So why did doctors turn her away. Wired. August 11 (2021). Gottlieb, S. in JAMA Health Forum. e242691-e242691 (American Medical Association). Clinical Decision Support Software: Guidance for Industry and Food and Drug Administration Staff. (U.S. Food and Drug Administration, 2022). Harvey, H. B. & Gowda, V. How the FDA regulates AI. Academic radiology 27, 58–61 (2020). Boubker, J. When medical devices have a mind of their own: the challenges of regulating artificial intelligence. American Journal of Law & Medicine 47, 427–454 (2021). House, T. W. Winning the AI Race: America’s AI Action Plan , < https://www.whitehouse.gov/wp-content/uploads/2025/07/Americas-AI-Action-Plan.pdf%3E (2025). SimpleMaps. United States ZIP Code Database (Version 2025) , %3Chttps://simplemaps.com/data/us-zip-codes%3E (2025). Li, C. et al. Realizing the potential of social determinants data in EHR systems: A scoping review of approaches for screening, linkage, extraction, analysis, and interventions. Journal of Clinical and Translational Science 8, e147 (2024). Additional Declarations No competing interests reported. Supplementary Files SupplementaryTablesnpjDigitalHealth.pdf Cite Share Download PDF Status: Published Journal Publication published 24 Feb, 2026 Read the published version in npj Digital Medicine → Version 2 posted Editorial decision: Revision requested 29 Jan, 2026 Reviews received at journal 27 Jan, 2026 Reviewers agreed at journal 22 Jan, 2026 Reviews received at journal 18 Dec, 2025 Reviewers agreed at journal 09 Dec, 2025 Reviewers agreed at journal 08 Dec, 2025 Reviewers invited by journal 06 Dec, 2025 Editor assigned by journal 04 Dec, 2025 Submission checks completed at journal 04 Dec, 2025 First submitted to journal 01 Dec, 2025 You are reading this latest preprint version Show more versions Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7368491","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[{"code":1,"date":"2025-08-21 03:56:50","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"articleType":"Short Report","associatedPublications":[],"authors":[{"id":575187706,"identity":"da02ab1c-6202-491b-ae88-9bb4fb7fe341","order_by":0,"name":"Sherry Yun Wang","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA10lEQVRIiWNgGAWjYBADOQYJODuBOC3GpGtJbCBai8GN3GMSP3fUpvfPbn726EbNHQZ+9hwDAlry0iR7zxzPnXHnmLlxzrFnDJI9bwhpyTG7wdt2LHeDRIKZdA7bYZAIYS03/7YdSzeQSP8mnfPvMIM9MVpu87bVJBhI5JhJ57YBbZEgoEXyzBvz37JtBwxn3MgpN87tO8wjceZZAV4tfMdzjA3fttXJ889I3/Y459thOf725A14tSgcAFOHQQQbiODBqxwE5BvAVB1cyygYBaNgFIwCDAAAOvBMGhoGzgAAAAAASUVORK5CYII=","orcid":"","institution":"Chapman University","correspondingAuthor":true,"prefix":"","firstName":"Sherry","middleName":"Yun","lastName":"Wang","suffix":""},{"id":575187707,"identity":"b818a835-23d8-45b9-99e8-bf3066200fc5","order_by":1,"name":"Ryan Stofer","email":"","orcid":"","institution":"Chapman University","correspondingAuthor":false,"prefix":"","firstName":"Ryan","middleName":"","lastName":"Stofer","suffix":""},{"id":575187708,"identity":"2bc6046d-b6aa-47af-bc4e-9bc8c061c054","order_by":2,"name":"Zhouzhou Chu","email":"","orcid":"","institution":"Chapman University","correspondingAuthor":false,"prefix":"","firstName":"Zhouzhou","middleName":"","lastName":"Chu","suffix":""},{"id":575187709,"identity":"67291abe-b738-4baa-8e16-4bf9807be858","order_by":3,"name":"Xiao Huang","email":"","orcid":"","institution":"Emory University","correspondingAuthor":false,"prefix":"","firstName":"Xiao","middleName":"","lastName":"Huang","suffix":""},{"id":575187710,"identity":"6d3763f8-d91d-4601-86d7-9707d82385a7","order_by":4,"name":"Ang Li","email":"","orcid":"","institution":"University of Maryland","correspondingAuthor":false,"prefix":"","firstName":"Ang","middleName":"","lastName":"Li","suffix":""}],"badges":[],"createdAt":"2025-08-13 23:53:15","currentVersionCode":2,"declarations":"","doi":"10.21203/rs.3.rs-7368491/v2","doiUrl":"https://doi.org/10.21203/rs.3.rs-7368491/v2","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1038/s41746-026-02491-y","type":"published","date":"2026-02-24T15:58:23+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":100566727,"identity":"2765292c-30cb-48f3-833a-892f3ce7b615","added_by":"auto","created_at":"2026-01-19 09:09:16","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":608393,"visible":true,"origin":"","legend":"","description":"","filename":"NPJDigitalMedicinerevisedclean.docx","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/70e8970c110abd7b162ffaff.docx"},{"id":100566809,"identity":"1a8d50aa-0441-45b8-b196-045f4eac2f52","added_by":"auto","created_at":"2026-01-19 09:09:23","extension":"json","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":6544,"visible":true,"origin":"","legend":"","description":"","filename":"703cc5638f834396b78891bea8d0b2f2.json","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/5a9efd57387acf5921adf2e2.json"},{"id":100804003,"identity":"4844f71a-54b0-458b-89c6-f72d3a8445bd","added_by":"auto","created_at":"2026-01-21 14:34:04","extension":"pdf","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":142915,"visible":true,"origin":"","legend":"","description":"","filename":"SupplementaryTablesnpjDigitalHealth.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/f0f6c86bb4bb6d45633d9841.pdf"},{"id":100566796,"identity":"7f6c60fe-9956-4714-ac81-14ad0d0851fa","added_by":"auto","created_at":"2026-01-19 09:09:20","extension":"xml","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":46062,"visible":true,"origin":"","legend":"","description":"","filename":"703cc5638f834396b78891bea8d0b2f21enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/38f92c5ea41f2108f6c09fc4.xml"},{"id":100566790,"identity":"9a41e3dd-8e38-4889-a674-a71dab6410e8","added_by":"auto","created_at":"2026-01-19 09:09:19","extension":"pdf","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2679484,"visible":true,"origin":"","legend":"","description":"","filename":"Figure1.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/404a2597c6dde3b42ba4bdcb.pdf"},{"id":100566801,"identity":"15c35932-1876-472c-a2fc-c9f4920f0295","added_by":"auto","created_at":"2026-01-19 09:09:20","extension":"emf","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2174212,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.emf","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/d115f7033d8f6690c3bb83fb.emf"},{"id":100566734,"identity":"959b90f4-f848-43f1-b9fb-82aacad81aa5","added_by":"auto","created_at":"2026-01-19 09:09:17","extension":"png","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":50812,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/a9a9b6ede04e7d880fb811b6.png"},{"id":100594857,"identity":"ff1e109b-9623-4f50-ba06-8dd1851422d5","added_by":"auto","created_at":"2026-01-19 13:45:43","extension":"xml","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":46092,"visible":true,"origin":"","legend":"","description":"","filename":"703cc5638f834396b78891bea8d0b2f21structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/7482c434333747842a1d8138.xml"},{"id":100566742,"identity":"8622df9a-db09-41ac-8b58-fa949eb0e319","added_by":"auto","created_at":"2026-01-19 09:09:19","extension":"html","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":50898,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/15b75ff036bf3cdf1027d5ac.html"},{"id":100566792,"identity":"6b3c5548-cea1-4c45-b29e-5028609d0fc0","added_by":"auto","created_at":"2026-01-19 09:09:19","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":733622,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eComparative performance of reconstructed models across PDMP and claims datasets.\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis figure compares precision, recall, specificity, NPV, and F1 scores across logistic regression, XGBoost, neural networks, and ensemble models trained on PDMP and IQVIA datasets using the NarxCare®-aligned feature set, with class-balancing methods including SMOTE, RUS, and ENN. Each panel shows the best-performing model per family, enabling direct comparison with the NarxCare® benchmark metrics.\u003c/p\u003e","description":"","filename":"Figure1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/45a20494e515842c0e76bb6d.jpg"},{"id":103765642,"identity":"cd0ab55d-8056-4800-b50a-43160446526f","added_by":"auto","created_at":"2026-03-02 16:06:29","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":3759172,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/f0bd54bb-4507-476b-b018-bda55e585c88.pdf"},{"id":100595282,"identity":"fbf62dff-3913-4a05-b317-d63b3e31ddb4","added_by":"auto","created_at":"2026-01-19 13:48:07","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":142915,"visible":true,"origin":"","legend":"","description":"","filename":"SupplementaryTablesnpjDigitalHealth.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7368491/v2/c0005c1974b399c6cab3a788.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Algorithmic Opacity in Opioid Risk Scoring and the Need for Transparent AI Regulation","fulltext":[{"header":"Main Text","content":"\u003cp\u003eMachine learning (ML) tools are increasingly embedded in U.S. clinical workflows, yet their opacity raises persistent concerns about fairness, transparency, and regulatory oversight. One such class of tools, opioid risk scoring (ORS) systems, has become central to opioid stewardship strategies across the United States\u003csup\u003e\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e\u003c/sup\u003e. Among them, NarxCare\u0026reg;, a proprietary algorithm developed by Bamboo Health, is the most widely adopted and currently integrated into statewide Prescription Drug Monitoring Programs (PDMPs) in over 20 states\u003csup\u003e\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e\u003c/sup\u003e. Despite this broad integration and its growing influence over treatment decisions, NarxCare\u0026reg; remains a black box.\u003c/p\u003e \u003cp\u003eIn April 2024, Bamboo Health released technical documentation\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e revealing that NarxCare\u0026reg;\u0026rsquo;s ORS calculates risk scores using a basic logistic regression model, with predictive features such as the number of prescribers, the number of dispensing pharmacies, and thresholds of daily Morphine Milligram Equivalents (MMEs) over varying time windows. This raises the question of whether models trained on a single-state dataset\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e can generalize to diverse real-world populations when predicting opioid misuse.\u003c/p\u003e\n\u003ch3\u003eReconstructing NarxCare’s Published Model\u003c/h3\u003e\n\u003cp\u003eTo explore this, we attempted to approximate NarxCare\u0026reg;\u0026rsquo;s ORS using two independent datasets: the IQVIA PharMetrics Plus for Academics (2006\u0026ndash;2022) and California\u0026rsquo;s PDMP (2010\u0026ndash;2023). We engineered features consistent with NarxCare\u0026reg;\u0026rsquo;s documentation\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e, including cumulative opioid dosage, prescriber count, and pharmacy switching behavior, and trained supervised ML models (logistic regression, random forest, XGBoost, and neural networks). Models were trained to predict either receipt of medication for opioid use disorder (MOUD), as a proxy for opioid use disorder (OUD) in PDMP data \u003csup\u003e\u003cspan additionalcitationids=\"CR5\" citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e\u003c/sup\u003e, or broader opioid-related adverse events defined by International Classification of Diseases (ICD) codes\u003csup\u003e\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e\u003c/sup\u003e in the IQVIA dataset (Supplementary Table\u0026nbsp;1\u0026ndash;3). We used stratified 5-fold cross-validation, applied a range of class balancing techniques\u003csup\u003e\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e\u003c/sup\u003e [Synthetic Minority Oversampling Technique (SMOTE), random undersampling (RUS), and edited nearest neighbors (ENN)]. We also incorporated expanded feature sets, including individual-level characteristics (e.g., age, gender, and payment type) and neighborhood-level social determinants of health (SDoH), e.g., median age, income, education, disability, and racial/ethnic composition. This study was deemed exempt from institutional review board approval because it involved unidentifiable data.\u003c/p\u003e \u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003eBenchmark Performance Discrepancies\u003c/h2\u003e \u003cp\u003eSince NarxCare\u0026reg; trained its model on PDMP data from a Midwestern state\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e, we anticipated comparable, or even improved performance when applying the same approach to our PDMP dataset. However, despite reproducing the published feature set, adding expanded SDoH covariates, and testing multiple modeling strategies (logistic regression, XGBoost, neural networks) with class-balancing techniques (SMOTE, RUS, ENN), all models showed only modest performance across both datasets. For each metric, we report the best-performing value within each model family across all hyperparameter configurations (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). The NarxCare\u0026reg; baseline model is shown for reference, with its missing F1 value manually derived from its reported precision and recall. Full results are available in Supplementary Table\u0026nbsp;3.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eOur precision values were consistently far lower than those reported by NarxCare\u0026reg;. This discrepancy raises the possibility that NarxCare\u0026reg;\u0026rsquo;s performance metrics may rely on additional engineered features, undocumented preprocessing steps, or proprietary training optimizations that are not publicly disclosed, complicating direct comparison. Our analysis does not assert causal inference or offer definitive conclusions regarding the incorrectness of Narxcare\u0026rsquo;s outputs or training methods. Instead, it highlights the broader risks associated with opaque clinical algorithms that influence high-stakes decisions without external validation. NarxCare\u0026reg; exemplifies broader challenges related to unregulated clinical algorithms, particularly in the context of transparency and validation. Our goal is not to assert impropriety, but rather to highlight the structural problem: because the model is proprietary, independent researchers, state agencies, or clinicians can't determine the sources of the discrepancy.\u003c/p\u003e \u003c/div\u003e\n\u003ch3\u003eConsequences for Clinical Algorithm Oversight\u003c/h3\u003e\n\u003cp\u003eThe U.S. Food and Drug Administration (FDA) has historically struggled to delineate its authority over Clinical Decision Support (CDS) tools that do not make explicit treatment recommendations. Tools like NarxCare\u0026reg; fall outside the current definition of Software as a Medical Device (SaMD), allowing them to bypass premarket review. Yet their influence is undeniable: reports of patients being denied pain treatment due to ORS flags are mounting, particularly in marginalized communities\u003csup\u003e\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e,\u003cspan additionalcitationids=\"CR10\" citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e\u003c/sup\u003e. When the FDA cleared the Apple Watch in 2018 for detecting irregular heart rhythms, many worried the agency would get stuck trying to reverse-engineer the device\u003csup\u003e\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e\u003c/sup\u003e. Instead, Apple provided extensive firm-based validation data: large-scale clinical studies, clear descriptions of the underlying datasets, transparent reporting of model performance across demographic groups, and evidence that the device performed reliably in real-world conditions. This allowed the FDA to evaluate not only the product but also the company\u0026rsquo;s development process, documentation practices, and data integrity, consistent with how the agency assesses Software as a Medical Device (SaMD\u003csup\u003e\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e\u003c/sup\u003e. A similar framework would benefit high-stakes Clinical Decision Support (CDS) systems like NarxCare\u0026reg;, which currently fall outside device regulation under section 520(o)(1)(E) of the FD\u0026amp;C Act\u003csup\u003e\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e\u003c/sup\u003e because they provide a risk score, i.e., a specific diagnostic or treatment-relevant output that clinicians may rely on, without enabling users to \u0026ldquo;independently review the basis for the recommendation,\u0026rdquo; a key requirement for non-device CDS. In fact, the FDA explicitly states that software functions that provide a risk probability or risk score for a disease or condition do not meet Criterion 3 and are therefore device functions requiring oversight. This mismatch highlights the regulatory gap: NarxCare\u0026reg; has a device-like influence on clinical care, yet it is not necessary to demonstrate the type of transparent, evidence-based validation or a replicable evidence base that would enable independent assessment of safety, fairness, or generalizability.\u003c/p\u003e \u003cp\u003eWhile the 21st Century Cures Act of 2016 and the FDA\u0026rsquo;s 2022 guidance attempted to clarify regulatory boundaries, ambiguity remains, and some developers have reportedly designed their tools to avoid triggering regulatory thresholds\u003csup\u003e\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e,\u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e\u003c/sup\u003e. Meanwhile, federal policy is shifting. A January 2025 executive order directed agencies to remove barriers to AI innovation, and the White House\u0026rsquo;s \u0026ldquo;Winning the AI Race: America\u0026rsquo;s AI Action Plan\u003csup\u003e\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e\u003c/sup\u003e\u0026rdquo; now places healthcare at the center of national AI transformation efforts. Its provisions\u003csup\u003e\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e\u003c/sup\u003e include FDA regulatory sandboxes, healthcare AI testbeds, and Centers of Excellence designed to vet AI tools in real-world clinical environments. This moment presents a critical opportunity. A modernized, risk-based regulatory framework is needed to calibrate oversight to clinical impact and align with the SaMD model. Regulatory sandboxes should enable iterative development while ensuring transparency, reproducibility, and safety. Without such mechanisms, tools like NarxCare\u0026reg; may continue to influence clinical decision-making without sufficient transparency unless oversight mechanisms are implemented., raising concerns about potential algorithmic harm in the absence of transparent oversight, even when implemented as part of innovation efforts. Healthcare AI should not be exempt from scrutiny. As national infrastructure evolves to support innovation, we must also build the regulatory and ethical frameworks necessary to protect patients and uphold the integrity of clinical practice.\u003c/p\u003e"},{"header":"Methods","content":"\u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003eDataset\u003c/h2\u003e \u003cp\u003eThis study leveraged two independent large-scale healthcare datasets to replicate and evaluate the NarxCare\u0026reg; opioid risk scoring algorithm: California\u0026rsquo;s PDMP and the IQVIA PharMetrics\u0026reg; Plus Academic claims database. The California PDMP, accessed via the Controlled Substance Utilization Review and Evaluation System (CURES), comprises de-identified patient-level dispensing records for all Schedule II\u0026ndash;V controlled substances, including opioids, from 2015 to 2023. It captures prescription-level details such as drug name, strength, quantity dispensed, days\u0026rsquo; supply, prescriber and dispensing pharmacy identifiers, fill date, and patient demographics (age, gender, payment type, ZIP5). The IQVIA PharMetrics\u0026reg; Plus Academic dataset contains longitudinal adjudicated medical and pharmacy claims from a national sample of commercially insured and Medicare Advantage enrollees, with information on National Drug Codes (NDCs), fill dates, quantities dispensed, prescriber identifiers, ICD-9/10 diagnostic codes, procedure codes, and insurance type. Unlike PDMP, IQVIA does not include pharmacy identifiers. For contextual enrichment, IQVIA ZIP3 codes were mapped to ZIP5 using the SimpleMaps crosswalk\u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u003c/sup\u003e, and ZIP5-level socioeconomic indicators (i.e., median age, socioeconomic status, housing, education, employment, disability, and racial/ethnic composition) were appended from the SimpleMaps crosswalk\u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u003c/sup\u003e. This enabled integration of neighborhood-level SDoH as a proxy for individual SDoH\u003csup\u003e\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e into predictive modeling (Supplementary Table\u0026nbsp;1 and Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). Following data cleaning and preprocessing, the CURES dataset yielded 17.9\u0026nbsp;million training observations, 8.9\u0026nbsp;million validation observations, and 6.7\u0026nbsp;million testing observations. The IQVIA dataset yielded 1.03\u0026nbsp;million training, 256,122 validation, and 322,652 testing observations (Supplementary Table\u0026nbsp;2).\u003c/p\u003e \u003c/div\u003e\n\u003ch3\u003eFeature Construction\u003c/h3\u003e\n\u003cp\u003eFeature construction was aligned with Bamboo Health\u0026rsquo;s published NarxCare Application Overview (2023)\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e, implementing temporal-aggregate measures that mirror the original model\u0026rsquo;s inputs. Core features\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e included cumulative MME over the past 365 days and 2 years; total MME dosage in the past 2 years and \u0026ge;\u0026thinsp;1 year before the index date; the number of prescriptions with daily MME\u0026thinsp;\u0026gt;\u0026thinsp;120; and counts of unique prescribers over 2 years and the past 180 days. In the PDMP dataset, an additional behavioral feature, the number of distinct pharmacies dispensing opioids in the prior 2 years, was incorporated. All features were engineered relative to an index date defined as the most recent opioid prescription before the observation window, with sliding-window aggregation implemented using optimized, vectorized routines in Python. ZIP5-linked SDoH variables were appended to capture contextual socioeconomic influences. Continuous features underwent z-score normalization, while categorical variables were one-hot encoded before model training. NarxCare\u0026rsquo;s baseline model, as disclosed in its technical documentation\u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e, was trained via logistic regression on a case-control dataset comprising over 5,000 autopsy-adjudicated unintentional overdose deaths matched by age and gender to 500,000 patients prescribed controlled substances who did not die from overdose in a Midwestern state\u0026rsquo;s PDMP data. We defined proxy outcomes to align with the data structure of each source. In the PDMP dataset, OUD was defined as any initiation of medication for OUD (MOUD; e.g., buprenorphine, methadone) occurring after the index opioid prescription date. In the IQVIA dataset, opioid-related adverse event labels were assigned based on the presence of ICD-9/10 diagnosis codes\u003csup\u003e\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e\u003c/sup\u003e for opioid-related adverse events recorded at any time following the index prescription. Our study cannot determine why NarxCare\u0026rsquo;s reported performance exceeds what can be reproduced using the publicly stated feature set. Across both datasets, our results show that, even after incorporating additional covariates (e.g., SDoH), conducting extensive hyperparameter optimization, and applying multiple imbalance-mitigation strategies, no reasonable reconstruction of the published feature space achieves performance close to NarxCare\u0026rsquo;s benchmarks. These discrepancies highlight the possibility that (a) additional, undisclosed features or preprocessing steps could have influenced NarxCare\u0026rsquo;s reported performance, (b) preprocessing steps or transformations that are not documented, or (c) potential data leakage arising from the internal construction of case\u0026ndash;control sets or temporal windows. To ensure a rigorous evaluation, we first trained models using PDMP data, where MOUD initiation served as a proxy for opioid use disorder due to the absence of ICD-based diagnostic information. We then trained models on the IQVIA dataset, which includes ICD codes for opioid-related adverse events, allowing us to evaluate the same feature family under a more clinically specific outcome definition. In both datasets, we implemented multiple strategies to address class imbalance and maximize model performance within the limits of the available information. Despite these efforts, the performance of all reconstructed models remained far below NarxCare\u0026rsquo;s self-reported metrics. California\u0026rsquo;s PDMP is not currently integrated with electronic health records (EHR), which limits its capacity to ascertain clinically validated opioid-related adverse events accurately. Given these limitations in outcome ascertainment, we retrained the model using the IQVIA dataset, which contains structured ICD-coded diagnostic data, enabling more robust and clinically grounded labeling of opioid-related adverse events. However, both datasets demonstrated significant class imbalance in the outcome. MOUD initiation can contribute to an underestimation of the actual probability of opioid-related adverse events. In the PDMP dataset, initiation occurred in approximately 1% of patients, indicating a highly imbalanced class distribution. The IQVIA dataset exhibited a more moderate imbalance, with a positive-to-negative case ratio of approximately 1:8. To address this, we employed a range of strategies, including class rebalancing techniques (e.g., oversampling of the minority class, under-sampling of the majority class), as well as deep learning models optimized for imbalanced data. Despite these efforts, model precision did not approach the reported NarxCare\u0026reg; benchmarks, though contextual differences in datasets and outcome definitions limit direct comparability.\u003c/p\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003eModel Training\u003c/h2\u003e \u003cp\u003eFollowing the NarxCare baseline design, a logistic regression model with L2 regularization was implemented as the primary replication model (Supplementary Table\u0026nbsp;3), providing methodological comparability to the original algorithm. To investigate whether alternative architectures could better capture non-linear interactions, we also trained Random Forests, Extreme Gradient Boosting (XGBoost), feedforward neural networks, wide and deep hybrid architectures, and self\u0026ndash;attention\u0026ndash;augmented networks. Training and testing sets were generated by randomly splitting the entire dataset to evaluate model performance. Hyperparameter optimization was conducted using grid search with Optuna as the primary tuning strategy, integrated with nested cross-validation within the training partition to ensure reliable and generalizable parameter estimates. We evaluated both hard voting (majority class selection) and soft voting (probability averaging) ensemble strategies, ultimately adopting soft voting due to its superior performance and finer discrimination from aggregating predicted probabilities rather than binary class outputs.\u003c/p\u003e \u003c/div\u003e\n\u003ch3\u003eEvaluation Metrics\u003c/h3\u003e\n\u003cp\u003eModel performance was assessed using precision, recall, specificity, negative predictive value (NPV), and F1 score (Supplementary Table\u0026nbsp;3). All metrics were selected to enable direct comparison with the baseline model reported by NarxCare\u0026reg;. Both datasets exhibited outcome class imbalance, particularly PDMP, where MOUD initiation occurred in approximately 1% of patients and IQVIA, with a more moderate imbalance for opioid-related adverse events (~\u0026thinsp;1:8). To address this, we implemented multiple imbalance-mitigation strategies, including Synthetic Minority Oversampling Technique SMOTE, RUS, and ENN.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e \u003ch2\u003eCompeting Interests\u003c/h2\u003e \u003cp\u003eThe authors declare no competing interests.\u003c/p\u003e \u003c/p\u003e\u003ch2\u003eFunding:\u003c/h2\u003e \u003cp\u003eThis project was supported by funding from the National Institute of Health (NIH) AIM-AHEAD program.\u003c/p\u003e\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eS.Y.W. conceptualized the research idea, designed the study, authored the primary manuscript, and secured funding as the Principal Investigator (PI). R. S. conducted the data analysis. A.L., C. Z., and X. H. contributed to the major revision. All authors edited and reviewed the manuscript.\u003c/p\u003e\u003ch2\u003eAcknowledgement\u003c/h2\u003e\u003cp\u003eWe extend our heartfelt gratitude to the California Department of Justice for their invaluable support in providing the data and their unwavering assistance throughout our research journey. We acknowledge that CURES is not associated with the NarxCare platform, and any opinions, findings, conclusions, or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of the California Department of Justice CURES Program or IQVIA Inc.\u003c/p\u003e\u003ch2\u003eData Availability\u003c/h2\u003e\u003cp\u003eThe CURES dataset is available upon request from the Department of Justice. The census data can be obtained from the US Zip Codes Database (Pareto SoftwareTM, version 2023). Concerning access to and use of the IQVIA PharMetrics\u0026reg; Plus for Academics dataset, which is licensed to Chapman University under the terms of its agreement with IQVIA Inc. The code is publicly accessible at https://github.com/Sherry-Yun-Wang/Algorithmic-Opacity-in-Opioid-Risk-Scoring-Need-for-Transparent-AI-Regulation-in-Healthcare.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eArdeljan, L. D. \u003cem\u003eet al.\u003c/em\u003e Current state of opioid stewardship. \u003cem\u003eAmerican journal of health-system pharmacy\u003c/em\u003e 77, 636\u0026ndash;643 (2020).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBhagwat, A. M., Ferryman, K. S. \u0026amp; Gibbons, J. B. Mitigating algorithmic bias in opioid risk-score modeling to ensure equitable access to pain relief. \u003cem\u003eNature medicine\u003c/em\u003e 29, 769\u0026ndash;770 (2023).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBamboo Health. \u003cem\u003eNarxCare Application Overview\u003c/em\u003e, \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e%3Chttps://dopl.idaho.gov/wp-content/uploads/2024/03/BOP-PDMP-Overview-NarxCare.pdf%3E\u003c/span\u003e\u003cspan address=\"http://%3Chttps://dopl.idaho.gov/wp-content/uploads/2024/03/BOP-PDMP-Overview-NarxCare.pdf%3E\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e (2023).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLarochelle, M. R. \u003cem\u003eet al.\u003c/em\u003e Medication for opioid use disorder after nonfatal opioid overdose and association with mortality: a cohort study. \u003cem\u003eAnnals of internal medicine\u003c/em\u003e 169, 137\u0026ndash;145 (2018).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWakeman, S. E. \u003cem\u003eet al.\u003c/em\u003e Comparative effectiveness of different treatment pathways for opioid use disorder. \u003cem\u003eJAMA network open\u003c/em\u003e 3, e1920622-e1920622 (2020).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBiondi, B. E., Zheng, X., Frank, C. A., Petrakis, I. \u0026amp; Springer, S. A. A literature review examining primary outcomes of medication treatment studies for opioid use disorder: what outcome should be used to measure opioid treatment success? \u003cem\u003eThe American journal on addictions\u003c/em\u003e 29, 249\u0026ndash;267 (2020).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAcharya, M. \u003cem\u003eet al.\u003c/em\u003e Comparative study of opioid initiation with tramadol, short-acting hydrocodone, or short-acting oxycodone on opioid-related adverse outcomes among chronic noncancer pain patients. \u003cem\u003eThe Clinical journal of pain\u003c/em\u003e 39, 107\u0026ndash;118 (2023).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eXu, Z., Shen, D., Nie, T. \u0026amp; Kou, Y. A hybrid sampling algorithm combining M-SMOTE and ENN based on Random forest for medical imbalanced data. \u003cem\u003eJournal of Biomedical Informatics\u003c/em\u003e 107, 103465 (2020).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBuonora, M. J., Axson, S. A., Cohen, S. M. \u0026amp; Becker, W. C. Paths forward for clinicians amidst the rise of unregulated clinical decision support software: our perspective on NarxCare. \u003cem\u003eJournal of general internal medicine\u003c/em\u003e 39, 858\u0026ndash;862 (2024).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSiegel, Z. In a World of Stigma and Bias, Can a Computer Algorithm Really Predict Overdose Risk?: A Machine-Learning Algorithm Is Being Deployed Across America to Prevent Overdose Deaths. But Could It Be Causing More Pain? \u003cem\u003eAnnals of Emergency Medicine\u003c/em\u003e 79, A16-A19 (2022).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSzalavitz, M. The pain was unbearable. So why did doctors turn her away. \u003cem\u003eWired. August\u003c/em\u003e 11 (2021).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGottlieb, S. in \u003cem\u003eJAMA Health Forum.\u003c/em\u003e e242691-e242691 (American Medical Association).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eClinical Decision Support Software: Guidance for Industry and Food and Drug Administration Staff. (U.S. Food and Drug Administration, 2022).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHarvey, H. B. \u0026amp; Gowda, V. How the FDA regulates AI. \u003cem\u003eAcademic radiology\u003c/em\u003e 27, 58\u0026ndash;61 (2020).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBoubker, J. When medical devices have a mind of their own: the challenges of regulating artificial intelligence. \u003cem\u003eAmerican Journal of Law \u0026amp; Medicine\u003c/em\u003e 47, 427\u0026ndash;454 (2021).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHouse, T. W. \u003cem\u003eWinning the AI Race: America\u0026rsquo;s AI Action Plan\u003c/em\u003e, \u0026lt;\u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://www.whitehouse.gov/wp-content/uploads/2025/07/Americas-AI-Action-Plan.pdf%3E\u003c/span\u003e\u003cspan address=\"https://www.whitehouse.gov/wp-content/uploads/2025/07/Americas-AI-Action-Plan.pdf%3E\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e (2025).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSimpleMaps. \u003cem\u003eUnited States ZIP Code Database (Version 2025)\u003c/em\u003e, \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e%3Chttps://simplemaps.com/data/us-zip-codes%3E\u003c/span\u003e\u003cspan address=\"http://%3Chttps://simplemaps.com/data/us-zip-codes%3E\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e (2025).\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLi, C. \u003cem\u003eet al.\u003c/em\u003e Realizing the potential of social determinants data in EHR systems: A scoping review of approaches for screening, linkage, extraction, analysis, and interventions. \u003cem\u003eJournal of Clinical and Translational Science\u003c/em\u003e 8, e147 (2024).\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":true,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-7368491/v2","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7368491/v2","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eNarxCare\u0026reg;, a proprietary opioid risk scoring system embedded in Prescription Drug Monitoring Programs (PDMPs), has generated significant patient complaints. We adhered to the technical specifications and applied them to PDMP and IQVIA PharMetrics\u0026reg; Plus claims. Despite adding socioeconomic covariates, precision (0.01\u0026ndash;0.32) was far below the reported benchmark of 0.75, and F1 scores (0.02\u0026ndash;0.39) were also substantially lower than the benchmark value of 0.65, across all our reconstructed models.\u003c/p\u003e","manuscriptTitle":"Algorithmic Opacity in Opioid Risk Scoring and the Need for Transparent AI Regulation","msid":"","msnumber":"","nonDraftVersions":[{"code":"","date":"2026-02-11 08:57:14","doi":"","editorialEvents":[{"type":"decision","content":"Revision requested","date":"2026-02-11T08:57:14+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-02-10T03:02:29+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"174523102357838377163171218660283475161","date":"2026-02-09T21:36:06+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-02-07T21:16:23+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-02-06T05:40:15+00:00","index":"","fulltext":""},{"type":"submitted","content":"npj Digital Medicine","date":"2026-01-29T20:39:58+00:00","index":"","fulltext":""},{"type":"notPreprinted","content":""}],"status":"timeline","journal":{"display":true,"email":"
[email protected]","identity":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true}},{"code":2,"date":"2026-01-19 09:08:17","doi":"10.21203/rs.3.rs-7368491/v2","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-01-29T09:16:09+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-01-27T18:17:40+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"174523102357838377163171218660283475161","date":"2026-01-22T16:40:40+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-18T11:22:43+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"241216920889932891002738677146275055089","date":"2025-12-09T16:41:35+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"37544145464864599918278463187231539442","date":"2025-12-09T03:36:53+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-12-06T21:31:25+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-12-04T16:43:15+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-12-04T07:28:24+00:00","index":"","fulltext":""},{"type":"submitted","content":"npj Digital Medicine","date":"2025-12-01T07:41:39+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"c0e52615-8477-44eb-a035-95339b0347b2","owner":[],"postedDate":"January 19th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[{"id":61202881,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":61202882,"name":"Health sciences/Diseases"},{"id":61202883,"name":"Biological sciences/Drug discovery"},{"id":61202884,"name":"Health sciences/Health care"},{"id":61202885,"name":"Health sciences/Medical research"}],"tags":[],"updatedAt":"2026-03-02T16:03:14+00:00","versionOfRecord":{"articleIdentity":"rs-7368491","link":"https://doi.org/10.1038/s41746-026-02491-y","journal":{"identity":"npj-digital-medicine","isVorOnly":false,"title":"npj Digital Medicine"},"publishedOn":"2026-02-24 15:58:23","publishedOnDateReadable":"February 24th, 2026"},"versionCreatedAt":"2026-01-19 09:08:17","video":"","vorDoi":"10.1038/s41746-026-02491-y","vorDoiUrl":"https://doi.org/10.1038/s41746-026-02491-y","workflowStages":[]},"version":"v2","identity":"rs-7368491","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7368491","identity":"rs-7368491","version":["v2"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
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.