{"title":"Enhancing Antidiabetic Drug Selection Using Transformers: Machine-Learning Model Development.","authors":"Hisashi Kurasawa, Kayo Waki, Tomohisa Seki, Eri Nakahara, Akinori Fujino, Nagisa Shiomi, Hiroshi Nakashima, Kazuhiko Ohe","doi":"10.2196/67748","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Diabetes affects millions worldwide. Primary care physicians provide a significant portion of care, and they often struggle with selecting appropriate medications.</p><p><strong>Objective: </strong>This study aimed to develop a model that accurately predicts what drug an endocrinologist would prescribe based on the current measurements. The goal was to create a system that would assist nonspecialists in choosing medications, thereby potentially improving diabetes treatment outcomes. Based on the performance of previous studies, we set a performance target of achieving a receiver operating characteristic area under the curve (ROC-AUC) above 0.95.</p><p><strong>Methods: </strong>A transformer-based encoder-decoder model predicts whether 44 types of diabetes drugs will be prescribed. The model uses sequences of age, sex, history for 12 laboratory tests, and prescribed drug history as inputs. We assessed the model using the electronic health records from 7034 patients with diabetes seeing endocrinologists between 2012 and 2022 at the University of Tokyo Hospital. We assessed model performance trained on data subsets spanning different time periods (2, 5, and 10 years) using micro- and macro-averaged ROC-AUC on a hold-out test set comprising data solely from 2022. The model's performance was compared against LightGBM.</p><p><strong>Results: </strong>The model trained on data from the past 5 years (2017-2021) yielded the best predictive performance, achieving a microaverage (95% CI) ROC-AUC of 0.993 (0.992-0.994) and a macroaverage (95% CI) ROC-AUC of 0.988 (0.980-0.993). The model achieved an ROC-AUC above 0.95 for 43 out of 44 drugs. These results surpassed the predefined performance target and outperformed both previous studies and the LightGBM model's microaverage ROC-AUC of 0.988 (0.985-0.990) in terms of prediction accuracy. Furthermore, training the model with short-term data from the past 5 years yielded high accuracy compared to using data from the past 10 years, suggesting that learning from more recent prescribing patterns might be advantageous.</p><p><strong>Conclusions: </strong>The proposed model demonstrates the feasibility of accurately predicting the next prescribed drugs. This model, trained from the past prescriptions of endocrinologists, has the potential to provide information that can assist nonspecialists in making diabetes-treatment decisions. Future studies will focus on incorporating important factors such as prescription contraindications and constraints to enhance safety, as well as leveraging large-scale clinical data across multiple hospitals to improve the generalizability of the model.</p>","PeriodicalId":56334,"journal":{"name":"JMIR Medical Informatics","volume":"13 ","pages":"e67748"},"PeriodicalIF":3.1000,"publicationDate":"2025-06-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12148250/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"JMIR Medical Informatics","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.2196/67748","RegionNum":3,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"MEDICAL INFORMATICS","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Diabetes affects millions worldwide. Primary care physicians provide a significant portion of care, and they often struggle with selecting appropriate medications.
Objective: This study aimed to develop a model that accurately predicts what drug an endocrinologist would prescribe based on the current measurements. The goal was to create a system that would assist nonspecialists in choosing medications, thereby potentially improving diabetes treatment outcomes. Based on the performance of previous studies, we set a performance target of achieving a receiver operating characteristic area under the curve (ROC-AUC) above 0.95.
Methods: A transformer-based encoder-decoder model predicts whether 44 types of diabetes drugs will be prescribed. The model uses sequences of age, sex, history for 12 laboratory tests, and prescribed drug history as inputs. We assessed the model using the electronic health records from 7034 patients with diabetes seeing endocrinologists between 2012 and 2022 at the University of Tokyo Hospital. We assessed model performance trained on data subsets spanning different time periods (2, 5, and 10 years) using micro- and macro-averaged ROC-AUC on a hold-out test set comprising data solely from 2022. The model's performance was compared against LightGBM.
Results: The model trained on data from the past 5 years (2017-2021) yielded the best predictive performance, achieving a microaverage (95% CI) ROC-AUC of 0.993 (0.992-0.994) and a macroaverage (95% CI) ROC-AUC of 0.988 (0.980-0.993). The model achieved an ROC-AUC above 0.95 for 43 out of 44 drugs. These results surpassed the predefined performance target and outperformed both previous studies and the LightGBM model's microaverage ROC-AUC of 0.988 (0.985-0.990) in terms of prediction accuracy. Furthermore, training the model with short-term data from the past 5 years yielded high accuracy compared to using data from the past 10 years, suggesting that learning from more recent prescribing patterns might be advantageous.
Conclusions: The proposed model demonstrates the feasibility of accurately predicting the next prescribed drugs. This model, trained from the past prescriptions of endocrinologists, has the potential to provide information that can assist nonspecialists in making diabetes-treatment decisions. Future studies will focus on incorporating important factors such as prescription contraindications and constraints to enhance safety, as well as leveraging large-scale clinical data across multiple hospitals to improve the generalizability of the model.
背景:糖尿病影响着全世界数百万人。初级保健医生提供了很大一部分的护理,他们经常在选择合适的药物方面挣扎。目的:本研究旨在建立一个模型,根据目前的测量结果准确预测内分泌学家会开什么药。其目标是创建一个系统,帮助非专业人士选择药物,从而潜在地改善糖尿病的治疗效果。在前人研究的基础上,我们设定了一个性能目标,即实现接受者曲线下工作特征面积(ROC-AUC)大于0.95。方法:基于变压器的编码器-解码器模型预测44种糖尿病药物是否会被开处方。该模型使用年龄、性别、12项实验室测试的历史序列和处方药历史作为输入。我们使用2012年至2022年在东京大学医院(University of Tokyo Hospital)就诊的7034名糖尿病患者的电子健康记录来评估该模型。我们评估了在跨越不同时间段(2年、5年和10年)的数据子集上训练的模型性能,在一个仅包含2022年数据的保留测试集上使用微观和宏观平均ROC-AUC。将该模型的性能与LightGBM进行比较。结果:基于过去5年(2017-2021)数据训练的模型预测效果最好,微平均(95% CI) ROC-AUC为0.993(0.992-0.994),宏观平均(95% CI) ROC-AUC为0.988(0.980-0.993)。该模型对44种药物中的43种的ROC-AUC达到0.95以上。这些结果超过了预定的性能目标,在预测精度方面优于以往的研究和LightGBM模型的微平均ROC-AUC 0.988(0.985-0.990)。此外,与使用过去10年的数据相比,使用过去5年的短期数据训练模型获得了更高的准确性,这表明学习最近的处方模式可能是有利的。结论:该模型具有准确预测下一个处方药物的可行性。这个模型是从内分泌学家过去的处方中训练出来的,有可能提供信息,帮助非专业人士做出糖尿病治疗的决定。未来的研究将侧重于纳入处方禁忌症和限制等重要因素以提高安全性,并利用多家医院的大规模临床数据来提高模型的可泛化性。
期刊介绍:
JMIR Medical Informatics (JMI, ISSN 2291-9694) is a top-rated, tier A journal which focuses on clinical informatics, big data in health and health care, decision support for health professionals, electronic health records, ehealth infrastructures and implementation. It has a focus on applied, translational research, with a broad readership including clinicians, CIOs, engineers, industry and health informatics professionals.
Published by JMIR Publications, publisher of the Journal of Medical Internet Research (JMIR), the leading eHealth/mHealth journal (Impact Factor 2016: 5.175), JMIR Med Inform has a slightly different scope (emphasizing more on applications for clinicians and health professionals rather than consumers/citizens, which is the focus of JMIR), publishes even faster, and also allows papers which are more technical or more formative than what would be published in the Journal of Medical Internet Research.