Robust Fairness Under Covariate Shift

Ashkan Rezaei, Anqi Liu, Omid Memarrast, Brian D. Ziebart

Introduction

Standard fairness-aware machine learning models typically rely on the independent and identically distributed (i.e.d.) assumption, where training and testing data are drawn from the same distribution. However, in real-world deployments, this assumption is frequently violated due to covariate shift—changes in the input feature distribution ($P(x)$) while the relationship between features and labels ($P(y|x)$) remains constant. When such shifts occur, models that were fair on the source training data often exhibit significant bias on the target test data. This problem is exacerbated by the lack of labels in the target domain, making it impossible to directly measure or enforce fairness metrics like Equalized Opportunity (DEO).

Impact of covariate shift on fairness metrics for baseline methods.

Methodology: Robust Adversarial Framework

To address this, we introduce a robust adversarial framework framed as a minimax game between a predictor and an adversary. The predictor ($P$) seeks to minimize predictive log-loss while satisfying fairness constraints, while the adversary ($Q$) attempts to maximize this loss by selecting a worst-case conditional label distribution for the unlabeled target data.

Key Components

  • Moment-Matching Constraints: To ensure the adversary's label assignments are realistic, they are constrained to match the feature statistics observed in the source data. This prevents the adversary from being "unrealistically" difficult.
  • Expected Fairness Penalty: Since ground-truth labels are unavailable for the target set, fairness is incorporated as a $\mu$-weighted penalty term. This term evaluates fairness based on the adversary’s worst-case label assignments, allowing the model to estimate and penalize potential unfairness even when labels are missing.
  • Optimization: The resulting convex optimization problem is solved using batch gradient descent. A binary search is employed to determine the optimal penalty weight ($\mu$) that minimizes expected fairness violations.

Experimental Setup

The framework was evaluated on four standard fairness benchmarks: COMPAS (recidivism), UCI German (credit risk), UCI Drug (consumption), and UCI Arrhythmia (cardiac diagnosis). To simulate varying intensities of covariate shift, we used Principal Component Analysis (PCA) to identify the primary axis of variation and sampled source and target sets from different regions of the distribution.

Results and Discussion

The proposed method demonstrates significant improvements in maintaining fairness under distribution shift. As shown in the experimental results, our approach consistently achieves a lower Difference of Equalized Opportunity (DEO) compared to baselines across various datasets and shift intensities.

Performance comparison across four datasets showing Target Error vs. Target DEO.

Key Findings

  • Stability: While baseline methods (e.g., standard Logistic Regression or post-processing) show highly variable fairness performance as shift intensity increases, the robust approach remains stable and consistently closer to the fairness target.
  • Fairness-Accuracy Trade-off: The model maintains competitive predictive accuracy. In several instances, such as the Drug dataset, it achieves the lowest prediction error while simultaneously being the fairest, suggesting that robustness to shift can enhance both performance and ethical alignment.
  • Superiority: The proposed method achieved the lowest DEO in 11 out of 12 experimental settings across the four datasets.

Conclusion and Future Work

This work highlights the fragility of existing fairness-aware models under covariate shift and provides a robust alternative. However, the method assumes $P(y|x)$ invariance; future work should address "concept drift" where the underlying label relationship changes. Additionally, the sensitivity to density ratio estimation ($P_{src}/P_{trg}$) remains a technical challenge. Extending this framework to non-binary classification and naturally occurring shifts are promising directions for future research.

Summary updated

BibTeX
@inproceedings{rezaei2021robust,
  author = {Ashkan Rezaei and Anqi Liu and Omid Memarrast and Brian D. Ziebart},
  title = {{Robust Fairness Under Covariate Shift}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i11.17135},
}
Figure