A Statistical Test for Probabilistic Fairness

Bahar Taskesen, Jose H. Blanchet, Daniel Kuhn, Viet Anh Nguyen · DOI

Introduction

Machine learning models are increasingly deployed in high-stakes domains like criminal justice, hiring, and lending. Unfortunately, these models often inherit and amplify historical biases present in their training data. While various mathematical definitions of "group fairness" (e.g., ensuring a model has the same true positive rate for different demographic groups) exist, simply checking if a model is fair on a specific test set is insufficient. Rigorous statistical hypothesis testing is required to determine if a model is fair across the underlying population.

This paper introduces a principled, multivariate statistical test to detect algorithmic bias in logistic regression classifiers. By leveraging optimal transport theory, specifically the Wasserstein distance, the authors provide a mathematically sound framework to measure how far a dataset is from a hypothetical world where the classifier is perfectly fair.

The Wasserstein Projection Framework

The core of the proposed method is framing fairness verification as a statistical hypothesis test where the null hypothesis ($H_0$) assumes the classifier is fair and the alternative ($H_1$) assumes it is not.

The Fair Manifold and Distance Measurement

The authors mathematically define a "fair manifold"—the set of all possible probability distributions under which a given classifier would be perfectly fair. They then measure the Wasserstein distance from the actual empirical test data to this fair set. This distance represents the minimum "cost" or "effort" required to perturb the data to achieve fairness.

Probabilistic Fairness Surrogates

Standard fairness definitions often rely on hard classification thresholds, which result in non-smooth step-functions that are difficult to optimize and test statistically. To address this, the authors employ probabilistic fairness surrogates. Instead of hard binary predictions, they evaluate the smooth, continuous outputs of a logistic regression classifier (the sigmoid function).

Comparison of standard equal opportunity (A) and the probabilistic surrogate (B) used in the testing framework. The probabilistic version smooths the objective function, enabling efficient optimization and rigorous testing.

The authors prove that for probabilistic equal opportunity and equalized odds, computing this Wasserstein distance can be reduced to a highly parallelizable 1D grid search, ensuring the test remains computationally efficient even for complex constraints.

Experimental Validation

The framework was validated using both synthetic and real-world datasets:

  • Synthetic Data: Using a 2D Gaussian mixture dataset, the authors demonstrated the asymptotic correctness of the test. Once the sample size exceeds 100, the test's rejection rate aligns perfectly with the desired statistical significance level ($\alpha$).
  • COMPAS Dataset: On the well-known COMPAS recidivism dataset, the test evaluated a regularized logistic regression model. The results clearly illustrated the accuracy-fairness trade-off: the test consistently flagged models tuned for high accuracy as unfair, only failing to reject the null hypothesis when significant fairness regularization was applied.

Key Insights: Interpretability and Flexibility

A significant advantage of this approach is its interpretability. The optimization process identifies the "most favorable distribution"—the minimal perturbation of the test data required to satisfy fairness constraints. By visualizing how data points are "moved" in this distribution, auditors can gain a visual understanding of the model's underlying bias.

Furthermore, the framework offers geometric flexibility. Because optimal transport relies on a ground metric, modelers can incorporate prior structural knowledge about the feature space directly into the statistical test. It also allows for joint testing of complex fairness definitions, like equalized odds, by encapsulating multiple constraints into a single geometric projection, avoiding the need for multiple decoupled tests.

Limitations and Future Directions

While robust, the test relies on probabilistic approximations. A model passing this test might still fail strict threshold-based criteria. Additionally, the outcome is sensitive to the chosen distance metric, which requires careful selection by the auditor to avoid "tuning" for favorable results. Future work aims to extend this framework to "approximate fairness" (where the fairness gap is bounded by a small tolerance $\epsilon$) and to improve robustness against adversarial attacks or missing data.

Summary updated

BibTeX
@inproceedings{taskesen2020statistical,
  author = {Bahar Taskesen and Jose H. Blanchet and Daniel Kuhn and Viet Anh Nguyen},
  title = {{A Statistical Test for Probabilistic Fairness}},
  booktitle = {FAccT},
  year = {2020},
  doi = {10.1145/3442188.3445927},
}
Figure