An explainable, bias-audited machine learning model to detect hidden hepatitis C from region-wide real-world health records
Background: Although direct-acting antivirals have transformed hepatitis C virus (HCV) treatment, 25-30% of active infections in Spain remain undiagnosed. We aimed to develop and validate an interpretable machine-learning model to identify undiagnosed HCV infection using only data already recorded within the health system. Materials and Methods: We conducted a retrospective, population-based cohort study using the Andalusian Population Health Database (BPS). Individuals diagnosed with HCV between 2017 and 2024 (n=25,028) were matched, up to 10:1, to controls by birth year, sex, and health district. An Explainable Boosting Machine was trained on 2017-2022 data, with a threshold set in a 2023 validation set to guarantee ≥60% sensitivity, then evaluated unmodified in an independent, non-matched, population-representative 2024 sample approximating real-world screening. Predictors comprised chronic-disease diagnoses and laboratory summary statistics recorded ≥30 days before the index date; age and sex were excluded as matching variables. Predictors reflecting socioeconomic proxies or matching artefacts (pharmaceutical co-payment category, a zone-level deprivation index) were removed after explainability review. Results: In the independent test set, the model achieved an AUC of 0.837 (0.826 in validation), sensitivity 63.5%, specificity 91.8%, positive predictive value 7.0%, and negative predictive value 99.6%. Leading predictors were minimum alanine aminotransferase, HIV infection, dependence on non-tobacco substances, and platelet-count statistics, forming a clinically coherent, laboratory- and comorbidity-driven profile. Conclusion: An explainable model built exclusively from routine electronic health record data can identify undiagnosed HCV infection with discrimination comparable to previously published tools, evaluated under conditions approximating true population prevalence. Bias-auditing was feasible without sacrificing interpretability, supporting a scalable, equity-conscious instrument for the final phase of HCV elimination.
Authors
- Carlos Loucera (ORCID: https://orcid.org/0000-0001-9598-6965)
- Manuel Romero‐Gómez (ORCID: https://orcid.org/0000-0001-8494-8947)
- Joaquı́n Dopazo (ORCID: https://orcid.org/0000-0003-3318-120X)
- Alberto Esteban-Medina (ORCID: https://orcid.org/0000-0003-2265-0410)
Institutions
- Barcelonaβeta Brain Research Center (ES)
- Hospital Universitario Virgen del Rocío (ES)
- Universidad de Sevilla (ES)
Publication Details
- Journal
- medRxiv
- Published
- 2026-11-06
- DOI
- https://doi.org/10.64898/2026.11.05.26367298
- Primary Topic
- Hepatitis C virus research
- Type
- preprint