Manuscript Offprint

arXiv:2611.02639

Where Is a Prediction Model Miscalibrated, and for Whom? Local Audits in Outcome-Learned Pockets

Bernardo Modenesi, Taoyi Chen, Sima Najafzadehkhoei, Lucia Wang, Ameya Diwan, Beatrice Knudsen

BERNARDO MODENESI, University of Utah, USA; TAOYI CHEN, Ohio State University, USA; SIMA NAJAFZADEHKHOEI, University of Utah, USA; LUCIA WANG, rpotential.ai, USA; AMEYA DIWAN, Google, USA; BEATRICE KNUDSEN, University of Utah, USA

Overall and group-level averages, and ranking metrics such as the AUC, can hide sets of observations for which a prediction model systematically over- or under-predicts, because concentrated errors barely move an average and opposite errors offset each other. We present an audit that asks where a model is miscalibrated (in which sets of similar observations it over- or under-predicts on average) and for whom (whether its average prediction error differs between demographic groups, such as by race or sex, within the same set). It groups observations into pockets, sets that are similar in how the outcome is predicted from their features, using random-forest similarity, which weighs each feature by its importance for predicting the outcome instead of relying on hand-chosen cuts of the data; a second set of pockets, built on features weighted by ridge-regression coefficients, catches errors that follow one strong predictor, and a combined audit uses both. Pockets are learned on one sample and tested on another, with confidence intervals that hold jointly across pockets and allow for correlation within units such as hospitals. For each pocket, the audit reports the average prediction error, its gaps between demographic groups, the error sizes ruled out, and whether the data suffice to test. It needs only features, outcomes and fixed predictions, not model internals, which can be proprietary or undisclosed. In 17 simulation scenarios (continuous and binary outcomes, nonlinear risk, missing values, dependent observations, real covariates) with an error planted for one demographic group (for whom), the combined audit located it better than the strongest alternative grouping in 15, with false-alarm rates near or below 5%. In 15 scenarios with an error planted for everyone in one feature region (where), it localized the error better than every available alternative in 12 (at the smaller of two error sizes), including errors that offset overall; it lost to a grouping learned from one model's residuals when the error was unrelated to the outcome, and with few units of correlated observations it needed a stricter threshold. We then audit two deployed scores with documented problems, asking what a local audit adds. First, in public synthetic data from the care-management algorithm studied by Obermeyer et al., with its cost-based score mapped to a prediction of chronic illness, we found no detectable overall error but under-prediction of illness in the sickest pockets and over-prediction in the others. The pockets distinguished Black patients' concentration where the score under-predicted for both groups from a Black–White gap within pockets. Second, an exploratory analysis located APACHE IVa's previously reported over-prediction of ICU mortality in a pocket of mostly ventilated stays and in a low-risk pocket holding half of the stays with an APACHE prediction, where predicted mortality was more than twice the observed rate; none was detected in a moderate-risk pocket. Two recalibrated chest X-ray classifiers also showed offsetting local errors behind no detectable overall error. Learning pockets with a forest trained on the outcome, not on any model's errors, needs no rescaling or imputation of numeric inputs, gives many models one frozen map, and compares groups within shared pockets, turning a reassuring average into evidence, with confidence intervals, of where and for whom a model is miscalibrated.

CCS Concepts: • Computing methodologies → Machine learning; • Applied computing → Health informatics; • Mathematics of computing → Hypothesis testing and confidence interval computation.

Additional Key Words and Phrases: model auditing, calibration, hidden stratification, algorithmic fairness, random forest proximity, simultaneous inference, clinical prediction

Authors' Contact Information: Bernardo Modenesi, bernardo.modenesi@utah.edu, University of Utah, Salt Lake City, UT, USA; Taoyi Chen, chen.15500@osu.edu, Ohio State University, Columbus, OH, USA; Sima Najafzadehkhoei, sima.njf@utah.edu, University of Utah, Salt Lake City, UT, USA; Lucia Wang, wang.luciay@gmail.com, rpotential.ai, USA; Ameya Diwan, ameyakdiwan@gmail.com, Google, USA; Beatrice Knudsen, beatrice.knudsen@path.utah.edu, University of Utah, Salt Lake City, UT, USA.

Modenesi et al.

1 Introduction

An AI model can be accurate on average yet systematically wrong for a particular kind of observation. Decisions act on the predicted value itself. For example, health systems use commercial algorithms to choose which patients enter care-management programs; such tools were estimated in 2019 to be applied to about 200 million people a year in the United States [31]. Intensive care units benchmark mortality with severity scores such as APACHE IVa [48]. When a model reports a 20% risk, about one in five such cases should have the event; a model with this property is calibrated, and a miscalibrated model systematically over- or under-predicts. A useful audit must locate where this happens, show whose predictions are affected, and distinguish a small error from too little data to tell.

Calibration is usually checked overall or within a few predefined groups, alongside ranking metrics such as the AUC. For where, these checks can miss unrecognized, poorly served subsets, known in medical imaging as hidden stratification [30], and errors of opposite sign that offset each other in any average. Slice-discovery methods search for such subsets, but several target one model's errors, so the subsets found can depend on the model audited (Section 2). For whom, audits have moved from predefined groups to their intersections [4] and to large classes of subgroups defined by combined attributes [6, 21], and ICU severity scores were found to over-predict mortality for Black and Hispanic patients [39]. Yet a gap between groups can arise in two ways: one group is concentrated where the model errs for everyone, or the model errs differently for members of the two groups who are alike in what predicts the outcome. The two call for different responses, and a group-level comparison cannot tell them apart. The algorithm studied by Obermeyer et al. [31] shows what is at stake: its score was approximately calibrated for costs across racial groups, but because Black patients incurred lower costs at the same level of illness, it understated their health needs, and an audit against costs alone could not see it. In public synthetic data from that study, with the score mapped to a prediction of illness, no overall error is detectable, yet our audit finds under-prediction for a third of patient-years and over-prediction elsewhere; Black patients are over-represented in that third, and a gap remains within it (Section 6).

We ask two questions of a model's predictions within pockets, sets of observations similar in how their features predict the outcome. Where is the model miscalibrated? And for whom: within a pocket, does the average signed prediction error differ between groups defined by a recorded attribute, such as race or sex? Following the literature on differential item functioning [17], we call the group under study the focal group and the group it is compared with the reference group. Answering both poses three practical challenges: (1) Where should we look? Checking every combination of features is intractable. (2) Is there enough data? A subpopulation with few observations, few positive outcomes or few focal-group members cannot support a comparison, and pretending otherwise produces false alarms. (3) How sure are we? Auditing many subpopulations multiplies the chances of a false alarm, and observations from the same unit, such as repeated records of one person or patients of one hospital, are not independent.

Our audit learns the pockets from the outcome on a discovery sample used for nothing else, and tests them on a separate audit sample. It estimates each pocket's local calibration error μ\mu, the average prediction error (predicted minus observed outcome), and local calibration gap δ\delta, the difference in that error between the focal and reference groups, with confidence intervals that hold simultaneously across pockets and allow for correlated observations within units; an estimate is flagged when its interval excludes zero. Keeping the samples apart costs data, but no pocket is tested on the outcomes that suggested it; whether the intervals then hold at their stated level is checked by simulation.

The main grouping comes from a random forest trained to predict the outcome: two observations are close when many trees send them to the same leaf [3]. Because trees split mostly on features that improve the prediction, observations that differ only in irrelevant features still share most leaves, so this similarity weighs each feature by its relevance to the outcome (a built-in feature selection), whereas K-means on standardized features weighs every feature equally. It needs no rescaling or imputation of numeric features and scales to large data through a sparse nearest-neighbor graph. Because it spreads over all outcome-relevant features, it can blur a failure that follows one strong predictor, so a simpler linear grouping clusters observations on features weighted by their coefficients in a ridge regression of the outcome, and our default, the combined audit, runs both. Neither grouping uses the group attribute or any model's errors as an input; group counts and predictions enter only the support check, which decides whether a pocket has enough data to test. The same pockets can therefore audit several models from their predictions alone, even when a model's internals are proprietary or undisclosed. Learning pockets from the outcome also makes the answers interpretable: a pocket's mean error checks calibration among cases grouped by what predicts the outcome, and a gap within it compares groups that share the pocket.

Our contributions are:

  • Reusable outcome-learned audit maps. A discovery-only procedure learns pockets from the outcome and freezes the rule that assigns observations to them, so several models can be compared, from their predictions alone, through each pocket's mean prediction error and its between-group gap (Sections 3 and 4).

  • Statistical evidence, not only flags. Simultaneous intervals that allow for correlated observations within units such as hospitals; when a pocket's simultaneous interval lies within (−t,t)(-t, t), a statement that pocket-average errors of size tt or larger are ruled out; and an explicit report of pockets too thin to test.

  • An evaluation that reports its losses (Section 5). The combined audit located gaps planted between demographic groups better than the strongest alternative grouping in 15 of 17 scenarios, and local miscalibration better than every available alternative in 12 of 15 at the smaller of two error sizes. It lost to groupings learned from the model's own errors when the error sat on an outcome-irrelevant feature or in one tail of a U-shaped feature. False-flag rates were near or below 5%, except for μ\mu under strong within-unit dependence, which needs a stricter level.

  • Three applications (Section 6), two of them deployed scores with documented problems, where we ask what a local audit adds. Synthetic care-management data show offsetting local errors behind a reassuring overall check, and separate Black patients' concentration in an under-predicted pocket from the gap within pockets; an exploratory ICU audit locates APACHE IVa's previously reported over-prediction in two of three testable pockets, under hospital dependence and limited support; a briefer audit finds offsetting local errors in two chest X-ray classifiers.

References (24)