Mitigations#
In this section, we discuss the various mitigation techniques implemented in Fairlearn. One thing which should always be remembered: all the algorithms herein will provide mathematical guarantees as to how close they can drive some unfairness metric to zero. However, this does not mean that the results are fair.
Fairlearn contains the following algorithms for mitigating unfairness:
algorithm |
description |
binary classification |
regression |
supported fairness definitions |
---|---|---|---|---|
A wrapper (reduction) approach to fair classification described in A Reductions Approach to Fair Classification [1]. |
✔ |
✔ |
DP, EO, TPRP, FPRP, ERP, BGL |
|
A wrapper (reduction) approach described in Section 3.4 of A Reductions Approach to Fair Classification [1]. For regression it acts as a grid-search variant of the algorithm described in Section 5 of Fair Regression: Quantitative Definitions and Reduction-based Algorithms [2]. |
✔ |
✔ |
DP, EO, TPRP, FPRP, ERP, BGL |
|
Postprocessing algorithm based on the paper Equality of Opportunity in Supervised Learning [3]. This technique takes as input an existing classifier and the sensitive feature, and derives a monotone transformation of the classifier’s prediction to enforce the specified parity constraints. |
✔ |
✘ |
DP, EO, TPRP, FPRP |
|
Preprocessing algorithm that removes correlation between sensitive features and non-sensitive features through linear transformations. |
✔ |
✔ |
✘ |
|
An optimization algorithm based on the paper Mitigating Unwanted Biases with Adversarial Learning [4]. This method trains a neural network classifier that minimizes training error while preventing an adversarial network from inferring sensitive features. The neural networks can be defined either as a PyTorch module or TensorFlow2 model. |
✔ |
✘ |
DP, EO |
|
The regressor variant of the above |
✘ |
✔ |
DP, EO |
DP refers to demographic parity, EO to equalized odds, TPRP to true positive rate parity, FPRP to false positive rate parity, ERP to error rate parity, and BGL to bounded group loss. For more information on the definitions refer to Fairness in Machine Learning. To request additional algorithms or fairness definitions, please open a new issue on GitHub.
Note
Fairlearn mitigation algorithms largely follow the
conventions of scikit-learn,
meaning that they implement the fit
method to train a model and the predict
method
to make predictions. However, in contrast with
scikit-learn,
Fairlearn algorithms can produce randomized predictors. Randomization of
predictions is required to satisfy many definitions of fairness. Because of
randomization, it is possible to get different outputs from the predictor’s
predict
method on identical data. For each of our algorithms, we provide
explicit access to the probability distribution used for randomization.