Towards Threshold Invariant Fair Classification

Mingliang Chen, Min Wu

Abstract

Effective machine learning models can automatically learn useful information from a large quantity of data and provide decisions in a high accuracy. These models may, however, lead to unfair predictions in certain sense among the population groups of interest, where the grouping is based on such sensitive attributes as race and gender. Various fairness definitions, such as demographic parity and equalized odds, were proposed in prior art to ensure that decisions guided by the machine learning models are equitable. Unfortunately, the "fair" model trained with these fairness definitions is threshold sensitive, i.e., the condition of fairness may no longer hold true when tuning the decision threshold. This paper introduces the notion of threshold invariant fairness, which enforces equitable performances across different groups independent of the decision threshold. To achieve this goal, this paper proposes to equalize the risk distributions among the groups via two approximation methods. Experimental results demonstrate that the proposed methodology is effective to alleviate the threshold sensitivity in machine learning models designed to achieve fairness.

Introduction: The Challenge of Threshold Sensitivity

In high-stakes domains such as criminal justice and lending, machine learning models are audited for fairness using metrics like Demographic Parity (DP) and Equalized Odds (EO). These metrics ensure that groups defined by protected attributes (e.g., race or gender) experience equitable selection rates or prediction accuracy.

However, traditional fairness constraints are often threshold sensitive. They are typically optimized for a single default decision threshold (e.g., 0.5). If a practitioner later adjusts this threshold to balance precision and recall, the model's fairness guarantees can collapse. This fragility occurs because the underlying risk score distributions for different groups are not aligned, meaning a shift in threshold affects each group differently.

Conceptual illustration of threshold sensitivity: different risk score distributions for groups A=0 and A=1 lead to disparate outcomes when a single threshold is applied.

Methodology: Distribution Matching

To achieve threshold-invariant fairness, the authors propose equalizing the entire probability distribution of risk scores across groups. If distributions are identical, any threshold applied will yield identical statistical rates for all groups.

Since direct distribution matching is non-differentiable, two regularization methods are introduced:

  1. Histogram Approximation (HA): Uses a Gaussian kernel to create a differentiable histogram, minimizing the Kullback-Leibler (KL) divergence between group distributions.
  2. Gaussian Assumption (GA): A computationally efficient approach that assumes scores follow a Gaussian distribution and minimizes the distance between group means and variances.

These regularizers were tested using Logistic Regression (LR), Linear SVM (LSVM), and Kernel SVM (KSVM) on the COMPAS risk assessment dataset, focusing on race (African-American vs. Caucasian) as the protected attribute.

Key Insights and Results

The core insight is that distribution matching is a sufficient condition for threshold-invariant DP and EO. As the weight of the fairness regularizer increases, the risk score distributions for different groups visually converge and overlap, providing an intuitive confirmation of bias removal.

Evolution of risk score distributions on the COMPAS dataset. As constraints strengthen (from top to bottom), the distributions for African-American and Caucasian groups become increasingly aligned under both HA and GA methods.

Performance Evaluation

  • Invariance: The proposed models showed significantly lower fluctuation in fairness metrics when varying thresholds from 0.3 to 0.7. For instance, the standard deviation of the Demographic Parity difference across thresholds dropped from 0.044 (baseline) to 0.023.
  • Trade-offs: Robust fairness reduced disparity scores (CV scores) from ~0.20 to ~0.05, though overall accuracy decreased from ~68.4% to ~58%.
  • Efficiency: Despite its simplicity, the GA method performed comparably to the more complex HA method while operating in $O(M)$ time.

Conclusion and Future Work

This work demonstrates that equalizing risk distributions effectively alleviates threshold sensitivity in fair classification. While the HA method is computationally intensive and the GA method relies on normality assumptions, both provide a path toward more robustly equitable AI. Future research will focus on handling multiple protected attributes and adapting these regularizers for mini-batch training in deep neural networks.

Summary updated

Abstract

Effective machine learning models can automatically learn useful information from a large quantity of data and provide decisions in a high accuracy. These models may, however, lead to unfair predictions in certain sense among the population groups of interest, where the grouping is based on such sensitive attributes as race and gender. Various fairness definitions, such as demographic parity and equalized odds, were proposed in prior art to ensure that decisions guided by the machine learning models are equitable. Unfortunately, the "fair" model trained with these fairness definitions is threshold sensitive, i.e., the condition of fairness may no longer hold true when tuning the decision threshold. This paper introduces the notion of threshold invariant fairness, which enforces equitable performances across different groups independent of the decision threshold. To achieve this goal, this paper proposes to equalize the risk distributions among the groups via two approximation methods. Experimental results demonstrate that the proposed methodology is effective to alleviate the threshold sensitivity in machine learning models designed to achieve fairness.
BibTeX
@inproceedings{chen2020towards,
  author = {Mingliang Chen and Min Wu},
  title = {{Towards Threshold Invariant Fair Classification}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2020},
  url = {https://openreview.net/forum?id=BKyjCUsO6n},
}
Figure