Diagnosing failures of fairness transfer across distribution shift in real-world medical settings

Jessica Schrouff, Natalie Harris, Oluwasanmi Koyejo, Ibrahim Alabdulmohsin, Eva Schnider, Krista Opsahl-Ong, Alex Brown, Subhrajit Roy, Diana Mincu, Christina Chen, Awa Dieng, Yuan Liu, Vivek Natarajan, Alan Karthikesalingam, Katherine Heller, Silvia Chiappa, Alexander D'Amour

TL;DR

Machine learning models that satisfy fairness criteria during training often fail to maintain them when deployed in new environments due to distribution shifts. This paper introduces a causal framework and statistical testing procedure to diagnose the exact structure of these shifts. Applying this method to real-world medical datasets reveals that real-world shifts are highly complex "compound shifts," which can cause standard algorithmic fairness fixes to backfire and worsen performance disparities.

What Problem Does This Paper Address?

When deploying machine learning models in high-risk domains like healthcare—for instance, moving a diagnostic tool from "Hospital A" to "Hospital B"—changes in the data distribution can degrade both model accuracy and fairness across demographic subgroups.

While many algorithmic strategies exist to mitigate unfairness, their success depends heavily on the structure of the distribution shift (e.g., whether it is a change in patient demographics, imaging technology, or disease prevalence). Currently, practitioners lack empirical tools to diagnose the specific type of shift their models are encountering. This paper addresses this gap by providing a formal method to empirically assess and map out distribution shifts using causal graphs.

Methods

The authors leverage the Joint Causal Inference (JCI) framework, augmenting a standard causal Bayesian network with an environment variable ($S$) to represent the shift between source ($S=0$) and target ($S=1$) domains.

To determine which components of the data distribution are directly altered by the environment, they propose a statistical testing pipeline based on conditional independence tests. To isolate the direct effect of the shift on a specific variable (such as clinical features $X$ or labels $Y$), they use Inverse Probability Weighting (IPW) to balance out the variable's causal parents across both environments. They then perform a t-test on the reweighted distributions. For high-dimensional data like medical images, they train a proxy model to compress the features into a lower-dimensional summary before testing.

Datasets

The authors validate their approach on two real-world medical applications:

  • Teledermatology Dataset: Used to predict 26 common skin conditions. The Source data consists of 12,024 training cases from a US teledermatology service. Target 1 consists of 1,843 cases from Colombia, and Target 2 consists of 21,661 cases from skin cancer clinics in Australia and New Zealand.
  • MIMIC-III (Electronic Health Records): Used to predict prolonged ICU stays (>3 days). The Source data comprises 17,641 patients from generalist ICUs (Medical, Surgical, Trauma), while the Target data comprises 10,442 patients from specialized ICUs (Cardiac Surgery, Coronary Care).

Key Insights and Ideas

  • Real-World Shifts are "Compound": Theoretical machine learning literature often assumes isolated shifts (e.g., only covariate shift or only label shift). In real-world medical settings, shifts are compound—the environment simultaneously impacts demographics ($A$), clinical features ($X$), and disease prevalence ($Y$).
  • Blind Fairness Fixes Can Backfire: Enforcing fairness constraints (like demographic parity or equalized odds) purely on source data assumes a simple shift structure. Under compound shifts, these source-side fixes fail to transfer and can actively worsen fairness gaps in the deployment environment.
  • Causal Graphs as Diagnostic Tools: By framing distribution shift causally, researchers can mathematically read off whether fairness properties will transfer based on conditional independence conditions, guiding them toward appropriate mitigation strategies.

Key Results

  • Fairness Degradation: In the dermatology task, the maximum performance gap between age groups expanded drastically from 1.05% on the source data to 12.86% on the target Colombian data.
  • Mitigation Failure: For the EHR task, applying a popular post-processing method to enforce equalized odds successfully reduced the accuracy gap between age groups on the source data from 7% to 0.8%. However, when tested on the target data, this same "fix" caused the gap to skyrocket to 11.4% (see Figure 4).
Model performance across subgroups for EHR after post-processing for equalized odds.
  • Shift Characterization: The proposed testing framework successfully identified direct effects of the environment across all observed variables in both case studies, confirming the presence of compound shifts (illustrated in Figures 2 and 3).
Causal graph and distribution analysis showing a compound shift in the dermatology dataset.

Limitations and Future Work

  • Sample Size Dependency: The statistical power of the conditional independence tests depends heavily on having a sufficient number of target samples, which can be challenging for rare conditions or small subgroups.
  • Observed vs. Unobserved Variables: The method is limited to factors that are explicitly observed across both environments. It cannot account for unobserved confounders, such as unrecorded social determinants of health.
  • Beyond Algorithmic Solutions: Because purely algorithmic fixes fail under compound shifts, the authors emphasize looking beyond the model itself toward holistic pipeline remedies, including early target data collection, careful problem selection, manual feature engineering, and robust post-deployment surveillance.

Summary updated

BibTeX
@inproceedings{schrouff2022diagnosing,
  author = {Jessica Schrouff and Natalie Harris and Oluwasanmi Koyejo and Ibrahim Alabdulmohsin and Eva Schnider and Krista Opsahl-Ong and Alex Brown and Subhrajit Roy and Diana Mincu and Christina Chen and Awa Dieng and Yuan Liu and Vivek Natarajan and Alan Karthikesalingam and Katherine Heller and Silvia Chiappa and Alexander D'Amour},
  title = {{Diagnosing failures of fairness transfer across distribution shift in real-world medical settings}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ecWa1aCROvl},
}
Figure