Interpretable competing-risk prediction of hepatocellular carcinoma in cirrhosis from region-wide routine health data
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Background
Short-term prediction of hepatocellular carcinoma (HCC) in cirrhosis is complicated by the competing risk of death from liver disease. We aimed to develop an interpretable model on region-wide routine data that predicts HCC while separating competing mortality, and to compare it with established risk scores.
Methods
From a region-wide cohort of adults with cirrhosis in the Andalusian Population Health Database, we trained the model on 17,177 patients with a prediction date set 12 months before their outcome, between 2020 and 2023. From one year of electronic health records before that date (demographics, liver and chronic disease codes, and eight routine laboratory tests), an Explainable Boosting Machine without interaction terms classified the following 12 months as HCC, death or liver transplantation without HCC, or event-free. We evaluated it in 20 repeats of 5-fold cross-validation against a binary model, a model with pair interactions and a model using the full health record, all on the same folds. We then applied the cross-validated models, without retraining, at the first routine encounter at which aMAP or the Toronto HCC Risk Index could be computed, and compared them with the scores in patients followed forward under competing risks, with and without a 6-month washout and with each province left out of training in turn.
Findings
771 patients (4.5%) developed HCC within 12 months and 3,314 (19.3%) died or underwent liver transplantation without HCC (3,061 deaths, 253 transplants). In cross-validation, the area under the receiver operating characteristic curve (AUROC) for HCC was 0.734 (SD 0.018). A binary formulation, pairwise interactions and the full health record (more than 3,000 features) did not improve it; the full record lowered it by 0.024. At routine encounters the model discriminated 12-month HCC better than aMAP (time-dependent AUC 0.790 vs 0.688; difference +0.102, 95% CI +0.071 to +0.132) and the Toronto HCC Risk Index (0.761 vs 0.703; +0.057, +0.032 to +0.081), and remained better after excluding HCC diagnosed within 6 months (concordance difference +0.055 and +0.040) and when each of the eight provinces was left out of training. At equal group size, its high-risk group held as much HCC as the scores’ high-risk categories, with 20–28% fewer competing deaths. Its shape functions separated cancer-specific signal (AFP rising from 2 to 20 µg/L, platelets below 150 ×10 9 /L) from liver failure (bilirubin above 51 µmol/L, albumin below 35 g/L); a binary model showed only the first.
Interpretation
An interpretable three-class model on routine data outperformed established scores for short-term HCC risk in cirrhosis, while showing whether each abnormal value points to cancer or to competing death.
Funding
This work was supported by grants PID2023_152380OB and PRTR-C17.I1 from the Spanish Ministry of Science and Innovation; grant PMP24/00005 from the Instituto de Salud Carlos III (ISCIII); grant IE19_259 FPS from Consejería de Salud y Consumo, Junta de Andalucía; and Horizon Europe (HORIZON), Marie Skłodowska-Curie Actions Doctoral Networks (101226456-MLCARE). The funders had no role in study design, data collection, data analysis, data interpretation or writing of the report.
Research in context
Evidence before this study
We searched PubMed to October 2026 for HCC risk prediction in cirrhosis with machine learning or risk scores. Machine-learning models usually outperform aMAP and the Toronto HCC Risk Index (THRI) in development data. They are mostly specific to one etiology (HBV or HCV), built on inputs not routinely available (elastography), black boxes explained post hoc, and evaluated without competing risks. A meta-analysis of models for non-viral liver disease found only one developed with a competing-risk approach, and rated all 14 included studies at high risk of bias (1). In prospective French cohorts analysed under competing risks, machine learning did not outperform aMAP (2).
Added value of this study
In a region-wide population of 17,177 adults with cirrhosis of all etiologies, we developed an interpretable three-class model on routine records: HCC, death or transplant, or event-free. Under competing risks, at the first encounter where each score could be computed, it ranked HCC better than aMAP and THRI, including after a 6-month washout. At the same group size it flagged as much HCC with 20–28% fewer patients who died first. The advantage held when each province was left out of training. Its shape functions are the whole model, not a post-hoc approximation, and separate markers of cancer from markers of liver failure. A binary model on the same data ranks HCC as well but folds the death signal into its single curve, as we show analytically.
Implications of all the available evidence
Surveillance programmes can rank patients from data they already hold, with a model whose every contribution can be inspected. Modelling death as an outcome keeps patients unlikely to benefit off the high-risk list. External validation in other health systems, with local recalibration, is the next step.