Transferring Fairness under Distribution Shifts via Fair Consistency Regularization

Bang An, Zora Che, Mucong Ding, Furong Huang

Abstract

Machine learning models deployed in high-stakes environments often face distribution shifts that cause previously established fairness guarantees to collapse. While subpopulation shifts (changes in group proportions) are relatively manageable, domain shifts (changes in underlying feature distributions) pose a significant threat to algorithmic equity. This paper introduces Fair Consistency Regularization (FCR), a self-training framework designed to transfer fairness from a labeled source domain to an unlabeled target domain. By enforcing group-balanced consistency across data transformations, FCR ensures that models remain both accurate and fair in novel environments.

Introduction

The deployment of machine learning in sensitive areas such as healthcare, hiring, and finance has necessitated the development of algorithmic fairness techniques. However, a critical limitation of existing methods is the "i.i.d. assumption"—the requirement that training and testing data share the same distribution. In practice, models are frequently trained in one environment (e.g., a specific hospital or geographic region) and deployed in another. This transition often leads to fairness collapse, where a model that was equitable during training becomes biased in the target domain.

The Challenge of Distribution Shifts

To address this, the authors conduct a fine-grained analysis of how different types of distribution shifts affect model performance. They categorize shifts into two primary types:

  1. Subpopulation Shifts: Changes in the proportions of demographic groups or labels (e.g., a higher percentage of a specific group in the test set).
  2. Domain Shifts: Changes in the "nuisance factors" or environmental conditions (e.g., different lighting in images or varying economic conditions in tabular data).

A key finding of the research is that models are surprisingly robust to subpopulation shifts. The real catalyst for fairness collapse is domain shift, where the model encounters feature variations it has not learned to associate with the target task in a group-invariant manner.

Fair Consistency Regularization (FCR)

The proposed solution, Fair Consistency Regularization (FCR), leverages the success of self-training and consistency regularization in semi-supervised learning. The method is built on three core pillars:

1. Intra-group Expansion Assumption

The authors propose that within any demographic group (e.g., "Group A" with "Label 1"), data points are connected through a series of transformations (such as rotation, noise, or cropping). If a model can maintain consistent predictions across these transformations, it effectively "expands" its knowledge from the labeled source domain to the unlabeled target domain.

2. Group-Balanced Consistency Loss

Unlike standard consistency methods that treat all data points equally, FCR calculates consistency loss independently for each demographic group. This prevents the model from favoring majority groups and ensures that the stability of the model is distributed equitably across the population.

3. Dynamic Reweighting

To further refine the process, FCR employs a dynamic reweighting mechanism. The algorithm assigns higher importance to groups where the model exhibits lower confidence or higher error. This forces the model to prioritize learning "stable" features for the most vulnerable or difficult-to-classify groups.

Experimental Evaluation

The efficacy of FCR was tested across a diverse set of benchmarks:

  • Synthetic Benchmark (3dshapes): Using 480,000 images of 3D objects, the authors simulated four distinct types of shifts (nuisance, correlation, domain, and hybrid). This allowed for precise measurement of how FCR handles specific distributional changes.
  • Image Classification (UTKFace to FairFace): A gender classification task where race served as the sensitive attribute. The model was trained on the UTKFace dataset and transferred to the more diverse FairFace dataset.
  • Tabular Data (NewAdult): Utilizing US Census data, the model was trained on data from California and tested on its ability to maintain fairness across all other US states, representing a real-world geographic distribution shift.

Key Results

The experiments demonstrated that FCR consistently outperforms state-of-the-art fair learning baselines when subjected to distribution shifts.

  • Superior Accuracy and Fairness: In the UTKFace-to-FairFace transfer, FCR achieved 85.5% accuracy with an unfairness score ($\Delta_{odds}$) of 5.70. In contrast, the standard fair model (Laftr) saw its accuracy drop to 74.3% and its unfairness rise to 9.79.
  • Pareto Frontier: Across all datasets, FCR achieved a better Pareto frontier, meaning it provided a superior trade-off between accuracy and fairness compared to existing methods.
  • Stability in Tabular Data: On the NewAdult dataset, FCR reduced the variance of group accuracy by 70% and decreased equalized odds (a common fairness metric) by 30% compared to baselines.

Conclusion

"Transferring Fairness under Distribution Shifts via Fair Consistency Regularization" provides both a theoretical and practical roadmap for maintaining algorithmic equity in the real world. By identifying domain shifts as the primary driver of fairness collapse and introducing a group-balanced consistency framework, the authors offer a robust method for deploying fair models across diverse environments.

While the current reliance on pre-defined transformations presents a challenge for non-image data, the success of FCR suggests that future integration with generative models could further broaden the applicability of this approach, ensuring that AI remains a tool for equity regardless of the environment in which it operates.

Summary updated

Abstract

The increasing reliance on ML models in high-stakes tasks has raised a major concern on fairness violations. Although there has been a surge of work that improves algorithmic fairness, most of them are under the assumption of an identical training and test distribution. In many real-world applications, however, such an assumption is often violated as previously trained fair models are often deployed in a different environment, and the fairness of such models has been observed to collapse. In this paper, we study how to transfer model fairness under distribution shifts, a widespread issue in practice. We conduct a fine-grained analysis of how the fair model is affected under different types of distribution shifts and find that domain shifts are more challenging than subpopulation shifts. Inspired by the success of self-training in transferring accuracy under domain shifts, we derive a sufficient condition for transferring group fairness. Guided by it, we propose a practical algorithm with a fair consistency regularization as the key component. A synthetic dataset benchmark, which covers all types of distribution shifts, is deployed for experimental verification of the theoretical findings. Experiments on synthetic and real datasets including image and tabular data demonstrate that our approach effectively transfers fairness and accuracy under various distribution shifts.
BibTeX
@inproceedings{an2022transferring,
  author = {Bang An and Zora Che and Mucong Ding and Furong Huang},
  title = {{Transferring Fairness under Distribution Shifts via Fair Consistency Regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=zp_Cp38qJE0},
}
Figure