When a clinical risk score is audited only across broad census categories such as "Asian" or "White," it can look fair while failing badly for particular communities inside those categories. The most careful demonstration of this problem, on emergency department data, found that differences in performance within a coarse category often exceed differences between categories (Coarse race data conceals disparities in clinical risk score performance). There is a catch. Finer groups are smaller, and a performance number computed on a few hundred patients is noisy. Some of the "within-group" spread reported in such audits is therefore sampling noise rather than real disparity. Neither audits nor mitigation methods currently separate the two.
This note proposes borrowing the logic of hierarchical variance partitioning from population genetics. Analysis of molecular variance, usually shortened to AMOVA, splits total variation into nested layers, for example within populations, among populations within a region, and among regions. We apply the same split to model performance, with one change: an explicit correction for sampling noise in each small group, the way random-effects meta-analysis separates true between-study heterogeneity from within-study error. The corrected decomposition yields a calibrated "masking index," which measures how much true performance variation hides below the coarse level. The same shrunken group estimates then drive a robust training procedure that targets granular groups without overreacting to the smallest, noisiest ones.
Core Claim
Granular subgroup masking should be measured as noise-corrected variance at the within-coarse level of a nested hierarchy, not as raw spread of per-group metrics. We make two testable claims. The first is that on MIMIC-IV-ED a meaningful share of the apparent within-coarse spread is sampling noise, but real heterogeneity remains for hospitalization and critical outcomes. This is what the likelihood ratio tests in the Movva et al. audit imply: they found feature-outcome relationships differ across granular groups at $p < 10^{-6}$ for those two outcomes. The second is that partially pooled group-loss estimates, which pull each granular group toward its coarse parent in proportion to its noise, give a better weighting signal for worst-group training than either coarse groups or flat granular groups. The payoff is better held-out performance on the worst true granular group, at small cost to average accuracy.
The decomposition is a three-level random-effects model on a group-level performance metric. Write $m_g$ for the observed metric of granular group $g$ (for example AUROC or mean log loss), nested in coarse category $c(g)$:
$$m_g = \mu + a_{c(g)} + b_g + e_g,\quad a_c \sim N(0,\sigma_a^2),\; b_g \sim N(0,\sigma_b^2),\; e_g \sim N(0, s_g^2).$$
Here $\mu$ is the overall mean. $a_c$ is the coarse-category effect and $b_g$ is the granular deviation within its category. $e_g$ is sampling error, whose variance $s_g^2$ is estimated per group by patient-level bootstrap and treated as known. The masking index is $M = \sigma_b^2/(\sigma_a^2+\sigma_b^2)$, the fraction of true performance variance invisible to a coarse audit. The naive version, which drops $e_g$, inflates $\sigma_b^2$ by roughly the average $s_g^2$. That is exactly the bias we expect in raw audits. With site as an additional top level, the same model separates hospital-level variance from demographic variance.
Relation to Prior Work
The motivating evidence comes from Coarse race data conceals disparities in clinical risk score performance. That work audits NEWS, CART, logistic regression and XGBoost across 26 self-reported granular groups mapped to four coarse categories in MIMIC-IV-ED. It reports that within-coarse variation often exceeds between-coarse variation, for instance Brazilian patients within "White." It treats variance descriptively, does not separate noise from heterogeneity, and explicitly offers no algorithmic fix. We supply both.
How Fair are Medical Imaging Foundation Models? audits six pretrained chest X-ray models on CheXpert using a flat best-minus-worst AUC gap over coarse race and sex. It notes that "Asian" is too heterogeneous to evaluate as one group. Its best-minus-worst gap is the kind of statistic that is most sensitive to small-group noise, which is why it is our contrast for the imaging extension.
Two papers supply method pieces. The partial-pooling mixed-effects machinery in Estimating Racial Disparities When Race is Not Observed stabilizes sparse geographic strata, but it is used there for disparity estimation under unobserved coarse race. We reuse partial pooling for performance estimation and training over observed granular race. The nested decomposition logic comes from AMOVA applications such as Genetic population structure of the pen shell Atrina pectinata along the coastlines of China revealed by microsatellites, which found 93.389% of variation within populations. It also comes from the variance-components analysis in Neurodevelopmental milestones and associated behaviours are similar among healthy children across diverse geographical locations, where between-site variance was at most 9.2% across 14 of 16 domains. Both are descriptive. We make the decomposition noise-aware and use it to drive training.
Two mitigation methods constrain the design. FairPOT: Balancing AUC Performance and Fairness with Proportional Optimal Transport post-processes scores for one advantaged/disadvantaged pair. Fairer AI in ophthalmology via implicit fairness learning for mitigating sexism and ageism needs 67 dense pathology annotations. Neither handles nested granular groups, and our method needs neither pairwise structure nor extra annotation.
Research Program
The work has three parts, and the audit comes first because the mitigation depends on it.
The first part is the estimator. We fit the model above by restricted maximum likelihood on per-group metrics, with bootstrap $s_g^2$, and report $M$ with a confidence interval from a parametric bootstrap over the fitted model. We validate it on semi-synthetic data built from MIMIC-IV-ED. We take the real features and permute granular labels within coarse categories, which sets true $\sigma_b^2$ to roughly zero. We then inject controlled shifts in the outcome model, either the feature-outcome relationship or the outcome rate, into chosen granular groups. This tells us whether the estimator recovers known masking and whether the naive estimator reports masking where none exists.
The second part is the re-audit. We refit the Movva et al. risk scores, report naive versus corrected $M$ per outcome and metric, and list which granular groups have posterior performance credibly below their coarse mean once shrinkage is applied.
The third part is hierarchical-shrinkage Group DRO. Group DRO (distributionally robust optimization over groups) normally upweights whichever groups currently have the highest loss. In our variant, each training round computes per-granular-group losses on a held-out slice of the training data and shrinks them toward their coarse-category mean using the fitted $\sigma_b^2$ and each group's noise. The group weights are then set proportional to $\exp(\eta \hat{\ell}_g)$, where $\hat{\ell}_g$ is the shrunken loss for group $g$ and $\eta$ is a step size. Small groups therefore earn high weight only when their excess loss survives pooling. The model is XGBoost or logistic regression on triage features, which matches the original audit.
Baselines
The naive reference is ordinary training on pooled data with no group information. It shows how large the masked failures are before any intervention. For the audit itself, the naive reference is the uncorrected spread of per-group metrics, which is the descriptive statistic in the Movva et al. audit. Beating it means showing on semi-synthetic data that our $M$ has lower bias and correct interval coverage where the naive estimator does not.
The strongest competing training method is flat Group DRO over all 26 granular groups. It directly targets the worst granular group, so it is the obvious competitor to our claim. No reported result was found on Lacuna for Group DRO on MIMIC-IV-ED, and the file reports no per-group numerical AUROC for MIMIC-IV-ED either. We will therefore run every method ourselves, on identical patient-level splits stratified by granular group, with the same model class. Every method gets the same hyperparameter search of fixed size, selected by the same validation criterion: shrunken worst-group validation loss. That criterion is applied to all methods, so selection does not favor ours.
Coarse-group Group DRO, the version of standard robust training available when only census categories are recorded, is the second competitor. It isolates the value of granular labels.
The key ablation is our method with the shrinkage switched off. That is exactly flat Group DRO, and comparing the two isolates the contribution of partial pooling. A second ablation shrinks every group toward the global mean instead of its coarse parent, which tests whether the nesting itself matters. Both hold everything else fixed.
To count as a success, our method must raise the held-out worst-granular-group AUROC beyond the bootstrap confidence interval of flat Group DRO, and pooled AUROC must drop by no more than about one point. Worst-group performance is evaluated with the same noise-corrected posterior, among groups above a minimum size that we fix in advance.
For the imaging extension, the reference number is the roughly 81.4 AUC that How Fair are Medical Imaging Foundation Models? reports for medical-pretrained models on CheXpert. It comes with a flat coarse fairness gap, against which we compare our site-plus-race decomposition.
Why not just…?
Why not just report per-group metrics with bootstrap confidence intervals? This is the most serious alternative for the audit half. Bootstrap intervals tell you each group's uncertainty, but they do not answer the question practitioners ask: how much true variation does a coarse audit miss? Answering that requires estimating $\sigma_b^2$ net of $s_g^2$, which per-group intervals alone do not do. Scanning 26 intervals for one that excludes the coarse mean also multiplies false alarms. The semi-synthetic experiment with labels permuted within categories settles this. If eyeballing bootstrap intervals flags masking as reliably and as rarely falsely as $M$, the audit contribution reduces to presentation, and we will say so.
Why not just run flat Group DRO on the granular groups? Flat Group DRO chases the highest observed loss, and in a group of 50 patients the highest observed loss is often noise. The research file notes that flat robust training over dozens of tiny cells overfits the smallest ones. The no-shrinkage ablation tests this directly. Our prediction is that flat Group DRO wins on training-set worst group and loses on held-out worst group. If it does not lose, partial pooling is unnecessary and the mitigation claim fails.
Why not just recalibrate thresholds per granular group after training? This is a real threat, because some of the disparity in the Movva et al. audit comes from different outcome rates, which recalibration fixes cheaply. It cannot repair a different ranking caused by shifted feature-outcome relationships. That limit is why FairPOT targets ranking metrics with transport rather than thresholds, and even FairPOT handles only two groups. We include per-granular-group Platt recalibration, shrunk toward coarse parents, as a baseline and score it on both AUROC (ranking) and FNR (error at a threshold). If recalibration matches our method on worst-group AUROC, we narrow the claim to the audit and to FNR-type metrics.
Why not just rebalance training data across groups? How Fair are Medical Imaging Foundation Models? found that balanced fine-tuning reduced but did not remove bias. Balancing also cannot address feature-outcome shifts. We nonetheless include granular importance reweighting as a cheap baseline.
Proposed Experiments and Decisive Checks
The first decisive check is the semi-synthetic recovery study on MIMIC-IV-ED. Across injected shift sizes and group sizes, the corrected $M$ should track the true masking with intervals of nominal coverage. With granular labels permuted within categories, it should be near zero, while the naive estimator should report substantial masking. If the naive and corrected estimators agree everywhere, sampling noise is not a real problem at these sample sizes, and the proposal collapses to the Movva et al. finding.
The second check is the real re-audit across the three outcomes and the AUROC, AUPRC, FPR and FNR metrics. We predict a corrected $M$ smaller than the naive value but clearly above zero for hospitalization and critical outcomes. We make no prediction for revisits, where the original likelihood ratio evidence was not reported as equally strong.
The third check is the training comparison against the baselines above, run with five random seeds and reporting held-out worst-group AUROC, pooled AUROC, and the post-training $M$. A method that truly addresses masking should lower $M$, not only raise the minimum.
The fourth check addresses population-specific bias and is exploratory. We add site as a top level by training a chest X-ray classifier on one hospital's data and testing on CheXpert, then partition test performance into site, coarse-race and, where available, granular components. Granular race for chest X-rays depends on linking those images to MIMIC-IV patient records, which we must verify before relying on it. This tells us whether, after noise correction, institutional variance dominates demographic variance, which is the confound the population-bias literature raises but has not quantified.
References
- Coarse race data conceals disparities in clinical risk score performance
- How Fair are Medical Imaging Foundation Models?
- Estimating Racial Disparities When Race is Not Observed
- Genetic population structure of the pen shell Atrina pectinata along the coastlines of China revealed by microsatellites
- Neurodevelopmental milestones and associated behaviours are similar among healthy children across diverse geographical locations
- FairPOT: Balancing AUC Performance and Fairness with Proportional Optimal Transport
- Fairer AI in ophthalmology via implicit fairness learning for mitigating sexism and ageism