Who Does the Model Miss? Auditing Territorial and Ethnic Equity in Hospital-Mortality Prediction with One Million Ecuadorian Discharge Records
Abstract
Machine-learning risk scores are entering health decision-making, but a model that is accurate on average can still fail systematically for specific populations. We study in-hospital mortality prediction on the complete 2024 Ecuadorian hospital-discharge registry (1,132,667 records, 17,724 deaths, 1.56% prevalence), openly published by the national statistics institute. Because the registry codes the ICD-10 cause as the definitive discharge diagnosis, we exclude it from the deployable model and report a strictly admission-time specification. Every discharge receives an out-of-fold prediction, so the audit rests on hundreds of events per subgroup rather than tens. Class-weighted gradient boosting proves severely miscalibrated (expected calibration error 0.275, calibration intercept $$-4.02$$ ); isotonic recalibration fixes this (ECE 0.0001) and lets us select an operating point from a declared review budget instead of an arbitrary 0.5 cut. The calibrated model reaches ROC-AUC 0.854 and PR-AUC 0.100, about six times the prevalence floor. Our contribution is the equity audit with uncertainty. Detection differs by 9.7 points between mestizo and Indigenous patients (95% CI 5.3–13.9, $$p<0.001$$ ) and by 8.0 points by insurance status, whereas the urban–rural gap is not significant (0.7 points, CI $$-1.4$$ –2.7). Across provinces of residence, recall ranges from 0.09 to 0.60. Gaps concentrate intersectionally—Indigenous rural patients are the least well detected group—and persist when ethnicity and province are removed from the features, so they are not an artefact of encoding protected attributes. Group-specific thresholds, selected on held-out data, cut the ethnic gap to 1.6 points at a quantified cost in review workload. We release all code and use only public data, and argue that subgroup and territorial equity auditing, reported with confidence intervals, must be a first-class result in health AI built on open national data.
The paper
Universidad Internacional del Ecuador
Communications in Computer and Information Science, Oct 13, 2026, Open access, CC BY