The Easy and Proven Techniques for In-Processing Fairness in AI
In previous posts, we have covered:
- the problems of defining fairness in AI
- what can we do in terms of data pre-processing to mitigate fairness issues
This post covers the next set of tools in our toolbox, in-processing strategies and techniques, which can broadly be divided in several categories: 1) adversarial debiasers, 2) prejudice removers
Adversarial Debiasing
Increasing model capacity may help in some cases, but perfromance gaps tent to remain.
Using an adversary to try to infer a protected attribute from the predictions/classifications/clusters is also a common approach to detect unfairness. Several different teams train additional head taking as an input the last hidden layer of the model and trying to predict the sensitive attributes, while the model tries to learn a represen-tation that is independent of the sensitive attribute. One way of mitigating this is by adding adversarial noise to reduce the predictive power of protected attributes.
Regulation (see below) can prevent the capture of protected attributes to start with and this can force us to lose valuable information to detect unfairnes across groups. How can we detect unfairness on groups we do not even know exist? While this can be approached using prejudice removers andusing proxy features or assuming that the attribute is slightly perturbed (see below), Adversarially Reweighted Learning (ARL) show that non-protected features and task labels are valuable for identifying fairness issues, and can be used to co-train an adversarial reweighting approach for improving fairness.
Adversarial training has strong performance, but from an engineering maintainability perspective it is challenging due to its instability during training.
Prejudice Removers
There are many ways to alter the training of the algorithm to remove bias during training.
1- Heuristic-based
One of the simples methods is to apply Rooney Rule-like constraints, which has proven useful to increase fairness in ranking problems.
2- Small Algorithmic Changes Affecting Training/Learning
These small changes can be made in every single step of the callibration process of an algorithm: Input, Output, and model structure. Let's have a quick look at each of them:
Output
For instance, the output of the model can be slightly altered by adding a minimal error decision boundary shift that achieves statistical parity. Some authors have reported how we can measure fairness based on pairwise comparisons and regularise models from randomised experiments or absolute correlation regularisation to keep a bounded gap of false positive rates between groups.
Core Structure
We can also modify the optimisation function, which is one of the core elements of the algorithm. Surrogate loss functions and constraints have also been used to preserve fairness in scenarios where training labels are corrupted and where the error rates of corruption depend both on the label class and on the membership function for a protected subgroup.
Full deconstruction approaches are also possible, for instance decoupling classifiers train a separate classifier for each group and the overall output is built by minimising a joint loss function to reduce differences in classification statistics between groups (conceptually similar techniques have been used for fair clustering).
Dynamic Input
The input features can also be weighted to learn fair representations and avoid the unfair interference of sensitive attributes has been introduced in many different research papers (e.g. variational autoencoders with maximum mean discrepancy). Similarly, practitioners can also decorrelate demographic identity term word vectors with positive or negative sentiment, and re-embed them into the word embeddings
Ssmall perturbations to the training data (sampling from binomial distributions): known as fairness warnings algorithm. These techniques are similar to a pre-processing technique, although the changes in the features are done dynamically. Adding noise to input features can reduce fairness in some scenarios, so watch out!
3- Reusing Trained Models
Madras et al. wondered of there is transfer learning of fairness across groups. By relying on the wealth of available and varied pre-trained models and combining them to do transfer learning to reduce bias, provided the trained models were built on diverse data.
4- Counterfactual and Causal Reasoning
Counterfactual explanations -- "how the world would have (had) to be different for a desirable outcome to occur"
Models are trained based on the available data gathered under historical circumstances, rather than under different/fairer decision options. Counterfactual analogues of common predictive performance and algorithmic fairness metrics can be better for decision-making. Thus, some authors have explored causal analytics in the context of building appropriate model constraints that validate fairness constraints and are hypothesis-driven and theoretically provable. Also, social categories may not admit counterfactual manipulation, and they cannot, therefore, be used to evaluate the truth or falsity of counterfactuals.
Causal reasoning [can be used] to caution against the use of counterfactual explanations as a recommendable set of actions --
Classic causal path reasoning can be applied on causal models to discover different types of discrimination such as unresolved or proxy discrimination. Recommender systems are one of the most ubiquitous applications of ML in industry. Unbiased offline evaluation can prove extremely complex due to the large number of items to be recommended, extreme sparsity of feedback, and evolving user preferences and items.
Fairness sometimes boils down to learning fair prediction models for data that follows a different distribution. Using a causal graph describing the data and the anticipated shifts, conditional independencies on features can be used to estimate accuracy and fairness metrics for the shifted test. This approach works well for data sets with a reduced number of variables that allow humans to reason in depth about them and the effects of shifts.
------------
Chasing our asymptotic goal, in the next article, we will explore techniques that can be applied at the post-processing stage.
Head of Portfolio Performance
4 年Thanks Luis, found this an insightful set of posts. Enjoying reading!