Background and aim: Discriminating between idiosyncratic drug-induced liver injury (DILI) and autoimmune hepatitis (AIH) is critical yet challenging. We aim to develop and validate a machine learning (ML)-based model to aid in this differentiation.
Methods: This multicenter cohort study utilised a development set from Beijing Friendship Hospital, with retrospective and prospective validation sets from 10 tertiary hospitals across various regions of China spanning January 2009 to May 2023. Different ML algorithms were tested using 24 routine laboratory parameters. The Shapley Additive exPlanations (SHAP) analysis was used to evaluate the contribution of each parameter in the ML model.
Results: A total of 2554 patients (1750 for DILI and 804 for AIH) were included. Using Gradient Boost Decision Tree algorithm, five key parameters-aspartate transaminase, globulin, prealbumin, creatinine and platelet count-were selected to construct the ML model. Consequently, a web-based tool named Beijing-AID (BJ-AID) was developed (http://43.143.153.225:5000/). The BJ-AID model demonstrated excellent discrimination performance, with an area under the receiver operating characteristic curve (AUROC) of 0.94 (95% CI, 0.902-0.975) in the development set, 0.91 (95% CI, 0.900-0.928) in all external validation sets and 0.93 (95% CI, 0.889-0.974) in a prospective validation set. Notably, the BJ-AID model also effectively discriminated atypical cases, including drug-induced autoimmune-like hepatitis and AIH with the history of drug consumption, achieving an AUROC = 0.85 (95% CI, 0.742-0.949).
Conclusions: We successfully developed and validated a machine learning-based model, BJ-AID, which exhibits a strong discrimination performance. BJ-AID can assist practitioners and hepatologists in diagnosing both typical and atypical cases of DILI and AIH.
Trial registration: ClinicalTrials.gov identifier: NCT05532345.
Keywords: artificial intelligence; autoimmune liver diseases; differentiate diagnosis; drug toxicity.
© 2025 John Wiley & Sons A/S. Published by John Wiley & Sons Ltd.