Introduction
As machine learning (ML) algorithms are increasingly deployed in high-stakes applications, ensuring they are fair to all demographic groups is critical. However, most "Fairness in ML" research assumes that the data seen during training comes from the exact same distribution as the data encountered during deployment. In reality, this is rarely true.
When a model is deployed in a new, unseen environment, it often loses its fairness guarantees. This paper introduces FATDM (Fairness and Accuracy Transfer by Density Matching), a framework that provides theoretical bounds and a practical algorithm to ensure both high accuracy and group fairness (such as Equalized Odds) hold up even under significant domain shifts.
The Challenge: Domain Generalization Meets Fairness
Consider a diagnostic model trained on patient data from New York and California. It might perform poorly or exhibit entirely new biases when deployed in Ohio due to differences in local demographics or clinical practices.
While the field of Domain Generalization (DG) aims to build models that remain robust in unseen environments, it almost exclusively focuses on preserving accuracy. Conversely, most fairness techniques fail when the "domain" changes. This paper tackles this "double whammy": how do we guarantee a model remains both accurate and fair when it encounters a never-before-seen target domain?
Methodology: The FATDM Framework
The authors propose a two-stage learning framework grounded in a new theoretical analysis that uses Jensen-Shannon (JS) distance to bound both error and unfairness.
Stage 1: Density Matching
To transfer fairness, the model must understand how features relate to labels and sensitive attributes across different source domains. The authors use generative models (like StarGAN or CycleGAN) to learn "mapping functions." These functions can transform a sample from one source domain to look like it belongs to another, all while preserving its core label and sensitive attribute.
Stage 2: Invariant Representation Learning
Guided by their theoretical bounds, the model learns a representation space ($Z$) where the mapping functions from Stage 1 have no effect. Essentially, the model is trained to ignore the specific "style" or "noise" of a domain and focus only on the core features that predict the label fairly across all environments.
Unlike standard DG methods that try to align the marginal distributions (making all data look the same overall), FATDM aligns conditional distributions ($P(Z|Y,A)$). This ensures that the relationship between the representation, the label ($Y$), and the sensitive attribute ($A$) remains consistent.
Key Insights
- The Marginal Alignment Trap: The paper proves a "lower bound" theorem showing that standard DG methods—which only try to make the overall feature distributions look the same across domains—can actually increase the error in the target domain.
- Fairness Requires More Than Accuracy: The authors demonstrate that "accuracy transfer" does not imply "fairness transfer." A model can stay highly accurate in a new domain while its bias against a specific group (e.g., gender or race) spikes.
- Conditional Invariance is Key: For perfect transfer, the representation must be invariant given both the label and the sensitive attribute ($Z \perp D | Y, A$). This prevents the model from relying on domain-specific correlations that might act as biased proxies.
Experimental Validation
The authors evaluated FATDM on real-world medical imaging data from the MIMIC-CXR database, containing over 377,000 chest X-rays. They constructed two benchmarks:
- Cardiomegaly Disease: Predicting heart enlargement across domains defined by patient age groups, with gender as the sensitive attribute.
- Edema Disease: Predicting fluid in the lungs across domains created by artificially rotating images (simulating different hardware setups), with age as the sensitive attribute.
Results: * Pareto Optimality: FATDM consistently achieved a better trade-off between accuracy and fairness compared to baselines like Empirical Risk Minimization (ERM), Domain Adversarial Neural Networks (DANN), and Invariant Risk Minimization (IRM). In error-unfairness plots, FATDM consistently sat closest to the ideal bottom-left corner. * Quantitative Superiority: Measuring the "Area Under the Error-Unfairness Curve" (where lower is better), FATDM outperformed the best baselines by significant margins. On the Cardiomegaly dataset, FATDM achieved a score of 0.0935, while the next best baseline (IRM) lagged at 0.6784. * Robustness to Shift: While baseline models often saw their fairness metrics "blow up" in unseen domains, FATDM maintained stable and reliable fairness.
Limitations and Future Work
While highly effective, the FATDM framework has limitations. The two-stage process involves training complex generative models (GANs) in the first stage, which can be computationally expensive and harder to stabilize than end-to-end training. Furthermore, the theoretical proofs assume the existence of "invertible mappings" between domains; in highly complex or disparate datasets, such perfect mappings might be difficult to find. Finally, while adding more source domains generally helps, there is a point of diminishing returns where domain discrepancy becomes too difficult to minimize, highlighting a need for future research into optimal domain selection.
Summary updated