Fair learning with Wasserstein barycenters for non-decomposable performance measures

Solenne Gaucher, Nicolas Schreuder, Evgenii Chzhen

Abstract

This work provides several fundamental characterizations of the optimal classification function under the demographic parity constraint. In the awareness framework, akin to the classical unconstrained classification case, we show that maximizing accuracy under this fairness constraint is equivalent to solving a corresponding regression problem followed by thresholding at level $1/2$. We extend this result to linear-fractional classification measures (e.g., F-score, AM measure, balanced accuracy, etc.), highlighting the fundamental role played by the regression problem in this framework. Our results leverage recently developed connection between the demographic parity constraint and the multi-marginal optimal transport formulation. Informally, our result shows that the transition between the unconstrained problems and the fair one is achieved by replacing the conditional expectation of the label by the solution of the fair regression problem. Finally, leveraging our analysis, we demonstrate an equivalence between the awareness and the unawareness setups in the case of two sensitive groups.

Introduction

In standard machine learning, the relationship between classification and regression is well-established: to minimize misclassification error, one simply thresholds the conditional expectation of the label (the regression function) at 0.5. However, when introducing Demographic Parity (DP)—the requirement that a model's predictions be independent of a sensitive attribute $S$—this relationship becomes less clear. Historically, fair regression and fair classification have been treated as separate problems.

Furthermore, many real-world applications prioritize "non-decomposable" performance measures, such as the F-score, Jaccard index, or Balanced Accuracy. In these cases, the utility of the model cannot be calculated by simply summing individual losses, making the optimization problem significantly more complex under fairness constraints. This paper addresses these challenges by establishing a rigorous mathematical link between fair regression and fair classification.

The Wasserstein Barycenter Approach

The authors leverage Optimal Transport (OT) theory, specifically the concept of Wasserstein barycenters, to construct optimal fair classifiers. The core idea is that a "fair" regression function ($f^*$) can be derived by taking the distributions of the standard regression function for each sensitive group and "pushing" them toward their Wasserstein barycenter—the mathematical "average" distribution that minimizes the sum of squared Wasserstein distances.

Comparison of unconstrained Bayes classifier (left) and fair optimal classifiers (middle, right). The fair classifier achieves demographic parity by thresholding the Wasserstein barycenter of group distributions, which corresponds to group-specific thresholds in the original space.

As shown in the figure above, the standard Bayes classifier (left) results in different prediction rates for different groups ($s=1$ and $s=2$) when using a fixed threshold of 0.5. By thresholding the barycenter (middle), the model ensures a uniform prediction rate across groups. This is equivalent to applying group-wise thresholds (right) to the original regression functions.

Optimal Thresholding for Complex Metrics

A major contribution of this work is the Thresholding Principle. The authors prove that for any "linear-fractional" performance measure, the optimal fair classifier is obtained by thresholding the fair regression function $f^*$. While the threshold for accuracy remains 0.5, for other metrics like the F-score, the optimal threshold $\theta^*$ is a specific value that can be found via a simple one-dimensional search or a fixed-point equation.

Linear-fractional performance measures and their corresponding coefficients used to determine the optimal fair classifier.

This result identifies the fair regression function $f^*$ as a "sufficient statistic" for fair classification. Once $f^*$ is computed, it can be used to optimize a wide range of performance metrics by simply adjusting the threshold. This provides a theoretical justification for "order-preserving" fairness interventions, where the ranking of individuals within a group is maintained while adjusting the group-level decision boundaries.

Unawareness and Theoretical Equivalence

The paper also addresses the "unawareness" setup, where the sensitive attribute $S$ is hidden at prediction time. Using the Hahn decomposition theorem, the authors transform the unawareness problem into a synthetic "awareness" problem. For binary sensitive attributes, they prove that the awareness framework (using $S$ at test time) and the unawareness framework (inferring $S$ from other features) are mathematically equivalent at the optimum. This explains why removing sensitive attributes from a dataset often fails to eliminate bias, as models can implicitly learn the underlying distributions.

Conclusion and Future Work

This work provides a unifying framework for fair learning using optimal transport. However, some limitations remain. The reduction from unawareness to awareness currently relies on the Hahn decomposition, which is well-defined for only two groups ($K=2$). Extending these results to multiple sensitive groups is a key area for future research. Additionally, while the current work focuses on Demographic Parity, future studies could explore whether similar Wasserstein-based links exist for other fairness notions, such as Equalized Odds or Predictive Parity.

Summary updated

Abstract

This work provides several fundamental characterizations of the optimal classification function under the demographic parity constraint. In the awareness framework, akin to the classical unconstrained classification case, we show that maximizing accuracy under this fairness constraint is equivalent to solving a corresponding regression problem followed by thresholding at level $1/2$. We extend this result to linear-fractional classification measures (e.g., ${\rm F}$-score, AM measure, balanced accuracy, etc.), highlighting the fundamental role played by the regression problem in this framework. Our results leverage recently developed connection between the demographic parity constraint and the multi-marginal optimal transport formulation. Informally, our result shows that the transition between the unconstrained problems and the fair one is achieved by replacing the conditional expectation of the label by the solution of the fair regression problem. Finally, leveraging our analysis, we demonstrate an equivalence between the awareness and the unawareness setups in the case of two sensitive groups.
BibTeX
@inproceedings{gaucher2023fair,
  author = {Solenne Gaucher and Nicolas Schreuder and Evgenii Chzhen},
  title = {{Fair learning with Wasserstein barycenters for non-decomposable performance measures}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
  url = {https://openreview.net/forum?id=GwwstZqGva},
}
Figure