Introduction
Machine learning models that appear "fair" in one hospital often lose those properties when deployed in another due to distribution shifts. In healthcare, a model trained on data from "Hospital A" might perform equitably across different demographic groups, but once it is moved to "Hospital B," those fairness guarantees often evaporate. This phenomenon is known as a failure of fairness transfer.
While researchers have spent years studying how distribution shifts hurt model accuracy, we still lack tools to understand how these shifts specifically break fairness. Most existing fairness fixes assume a very simple type of shift—for example, that only the ratio of age groups changed. However, if the shift is more complex (e.g., the way doctors label diseases also changed), a standard fix might actually make the model less fair in the new environment. This paper introduces a causal framework and statistical tests to diagnose the specific structure of these shifts, revealing that real-world medical data shifts are often "compound" and more complex than current fairness mitigation strategies can handle.
Diagnosing Shifts with Causal Framing
To tackle this, the authors adopt a Causal Framing using the Joint Causal Inference (JCI) framework. They represent the clinical problem as a Causal Bayesian Network and add a special "environment" variable ($S$) that represents the shift between the source and target datasets.
The core contribution is a statistical testing procedure that assesses:
- Direct Effects: Does the environment $S$ directly change a specific variable (like age, the disease label, or the image features)?
- Conditional Independence Tests: Using re-weighting techniques to isolate whether a variable’s distribution changes after accounting for its causal parents. For example, if we see more "eczema" in the target hospital, is it just because the patients are older (demographic shift), or is it because the diagnostic criteria changed (label shift)?
By identifying which "arrows" from $S$ exist in the graph, researchers can categorize the shift as demographic, covariate, label, or "compound" (a mix of several).
Real-World Medical Applications
The study evaluates two high-stakes medical applications:
- Dermatology: Predicting 26 common skin conditions. The source data consists of retrospective cases from 17 US sites, while the target data comprises labelled teledermatology cases from Colombia.
- Electronic Health Records (EHR): Predicting prolonged ICU stays (>3 days) using the MIMIC-III dataset. The shift is from generalist ICUs (source) to specialized ICUs (target).
Key Insights
- Real-world shifts are "Compound": In both cases, shifts weren't just about one variable. In dermatology, the shift simultaneously affected demographics, how labels were assigned, and even the image features (due to different camera types and lighting).
- The "Fairness Paradox": Applying a fairness mitigation strategy (like post-processing for equalized odds) on the source data can be counterproductive. In the EHR task, "fixing" the model on the source data reduced the fairness gap to near zero there, but doubled the unfairness gap when moved to the target hospital.
- Causality is the Compass: Diagnosing a shift requires a simplified causal graph of the domain to distinguish between "fair" changes (e.g., more disease because patients are older) and "unfair" changes (e.g., different diagnostic standards).
Key Results: Failures of Fairness Transfer
The empirical results highlight significant drops in fairness across subgroups when models are transferred to new environments.
- Dermatology: The model was relatively fair on US data, but the maximum accuracy gap between age groups jumped from 1.05% to 12.86% when moved to the Colombia dataset. The diagnostic tool correctly identified this as a compound shift involving demographics, labels, and features.
- EHR: In the transfer from general to cardiac ICUs, the performance gap between sex groups increased from 1% to 2.7%.
- Mitigation Failure: When researchers tried to enforce "Equalized Odds" on the EHR source data, the gap in the target data grew from 5% to 11.4%. This proves that without diagnosing the shift first, standard "robust" algorithms can fail dangerously.
Limitations and Future Directions
The statistical power of these diagnostic tests depends on having a sufficient number of samples from the target environment, which may not always be available during early deployment. Furthermore, the method relies on a pre-defined causal graph; major unobserved variables (e.g., social determinants of health) could lead to an incomplete diagnosis.
Ultimately, algorithmic fixes are not enough. Remedies must happen across the entire pipeline, including better data collection in anticipated deployment environments and more thoughtful outcome definitions that are less sensitive to shift.
Summary updated