Learning Fairer Representations with FairVIC

## Abstract

Abstract Mitigating bias in automated decision-making systems, specifically deep learning models, is a critical challenge in achieving fairness. This complexity stems from factors such as nuanced definitions of fairness, unique biases in each dataset, and the trade-off between fairness and model accuracy. To address such issues, we introduce FairVIC, an innovative approach designed to enhance fairness in neural networks by addressing inherent biases at the training stage. FairVIC differs from traditional approaches that typically address biases at the data preprocessing stage. Instead, it integrates variance, invariance and covariance into the loss function to minimise the model’s dependency on protected characteristics for making predictions, thus promoting fairness. Our experimentation and evaluation consists of training neural networks on three datasets known for their biases, comparing our results to state-of-the-art algorithms, evaluating on different sizes of model architectures, and carrying out sensitivity analysis to examine the fairness-accuracy trade-off. Through our implementation of FairVIC, we observed a significant improvement in fairness across all metrics tested, without compromising the model’s accuracy to a detrimental extent. Our findings suggest that FairVIC presents a straightforward, out-of-the-box solution for the development of fairer deep learning models, thereby offering a generalisable solution applicable across many tasks and datasets.

## 1 Introduction

In the rapidly evolving landscape around the utilisation of Artificial Intelligence (AI) in everyday applications, Neural Networks (NNs) have emerged as pivotal tools for Automated Decision Making (ADM) systems in industries such as healthcare [], finance [], and recruitment []. However, the inherent bias embedded in datasets and subsequently learned by these models pose significant challenges to fairness. These biases can lead to adverse decisions affecting real lives. For instance, several studies have shown how bias in facial recognition technologies disproportionately misidentify individuals of certain ethnic backgrounds [, ], leading to potential discrimination in law enforcement and hiring practices.

Real-world consequences exemplify the urgent need to address these challenges at the core of AI development. Ensuring fairness in deep learning models presents complex challenges, primarily due to the black-box nature of these models which often complicates understanding and interpreting decisions. Moreover, the dynamic and high-dimensional nature of the data involved, combined with nuances in fairness definitions, further complicates the detection and correction of bias. This complexity necessitates the development of more sophisticated and inherently fair algorithms.

Prior work on improving the fairness of machine learning models has targeted various stages of the model pipeline. At the pre-processing stage, methods such as causal modelling [, , ] or relabelling the target variables [, ] modify the original dataset in some way, potentially inducing new types of bias. This also may require extensive prior knowledge regarding the data which may not always be available []. Works that focus on the post-processing stage adjust the model predictions to balance classification rates among subgroups, improving fairness [, ]. While effective, this technique impacts the integrity of recorded results as classifications do not reflect the model’s capabilities, but rather the user’s requirements. At the in-processing stage, the majority of techniques have focused on adapting the model’s loss function to penalise biased/unfair decisions [, , ]. Although these methods show promise, they do not uniformly improve all fairness metrics [], they often define bias too narrowly, and they require intricate tuning that is not intuitive. Therefore, there exists a need for a method that defines bias broadly, allowing the model to independently interpret bias and significantly improve upon all statistical fairness measures.

Figure: Figure 1: A high-level overview of the FairVIC loss function in a neural network training loop.

We introduce FairVIC (Fairness through Variance, Invariance, and Covariance), a novel approach that embeds fairness directly into neural networks by optimising a custom loss function, see Figure 1. This function is designed to minimise the correlation between decisions and protected characteristics while maximising overall prediction performance. FairVIC integrates fairness through the concepts of variance, invariance, and covariance during the training process, making it less intrusive, more intuitive, and adaptable to diverse datasets and varying definitions of fairness. Our experimental evaluations demonstrate FairVIC’s ability to significantly improve performance in all fairness metrics without comprising prediction accuracy. We compare our proposed method against state-of-the-art in-processing bias mitigation techniques, such as adversarial and constraint approaches, and highlight improved, robust performance in the FairVIC model.

Our contributions in this paper are multi-fold:

- •
A novel in-processing bias mitigation technique for neural networks.
- •
A comprehensive experimental evaluation, comparing a multitude of state-of-the-art methods on a variety of metrics across a handful of tabular datasets.
- •
An extended analysis of our proposed method to examine its robustness.

This paper is structured as follows: Section 2 discusses current approaches to mitigating bias throughout each processing stage. Section 3 describes the original inspiration of this work, alongside the fairness metrics used in the evaluation. Section 4 outlines our method, including how each term in our loss function is calculated and an algorithm detailing how these terms are applied. Section 5 describes the experiments carried out, Section 6 outlines the results with discussion, and Section 7 concludes this work.

## 2 Related Work

Many prior works aiming to mitigate bias and improve fairness in machine learning focus on the pre-processing stage, recognising that bias is primarily an issue with the data itself []. Previous pre-processing approaches have utilised causal methods to delineate relationships between sensitive attributes and target variables within the data [, , ]. Creating a causal model requires extensive background knowledge of the data, and this may not always be available []. Another approach involves relabelling the target variable to balance the number of positive instances across subgroups [, ]. However, both relabelling and using causal models involve modifying or tampering with the original dataset, thus potentially introducing a new type of bias as decisions about what constitutes fairness are inherently subjective.

An alternative theme of work recognises that it is the output of the model itself that is biased to particular subgroups, and therefore aims to transform the model output to improve fairness. An effective approach is to observe the posterior probability distribution of the model and find regions where subgroups are both positively and negatively classified, thus denoting ambiguity in the model [, ]. Where this ambiguity is observed, positive and negative rates can be equalised to improve fairness. However, a significant concern with such thresholding methods is their impact on the integrity of performance metrics. Since classifications are manipulated to achieve fairness, the metrics reported may not truly reflect the model’s raw predictive ability as classifications have been manipulated by the user.

The final stage of the machine learning pipeline where attempts have been made to mitigate bias is at the in-processing stage, where work in this theme believes the relationships derived by the model are biased. One notable approach involves incorporating an adversarial component during model training that penalises the model if protected characteristics can be predicted from its outputs [, , ]. While effective in helping the model learn a fairer representation, these approaches often suffer from performance instability.

The main body of literature for fairness at in-processing focuses on extending the model’s loss function as to penalise bias representations that the model might want to learn. For example, fairness metrics (e.g., false positive rate, true positive rate, etc.) can be incorporated into the model’s loss functions to force the model to minimise/maximise against them respectively [, ]. This approach requires defining what constitutes bias, thereby introducing a potential for expert bias. An alternative involves replacing the fairness metric with a Lagrangian multiplier, which reduces expert bias but introduces challenges due to its sensitivity and complexity in tuning [].

An overarching problem with altering the loss function is that not all fairness metrics improve equally. For example, optimising for the false positive rate may improve this and related measures, but it does not significantly impact unrelated fairness metrics [, ]. This issue highlights the need for a fair loss function with a broader definition of bias, which could enhance the model’s fairness across a more comprehensive range of statistical measures. Ideally, such an approach would allow the model to independently interpret bias, rather than requiring user-induced definitions, thus keeping both the predictions and input data unmodified. We propose FairVIC as a potential solution.

## 3 Preliminaries

### 3.1 VICReg

The inspiration for this method was taken from VICReg [], Variance-Invariance-Covariance Regularization, which is an approach in self-supervised learning. It aims to address two main challenges: feature collapse, where different inputs map to the same output, thus making the model unable to distinguish between the two, and redundant features, which do not contribute new information.

Variance: VICReg maximises the variance between features across the data, helping to avoid feature collapse by discouraging the model from outputting the same features for same or similar inputs.

Invariance: The method promotes invariance in the model’s output by minimising the variance between representations of augmented versions of the same input, enhancing the reliability and stability of the learnt features.

Covariance: Lastly, VICReg minimises the covariance among different features, ensuring the model captures a broader range of information from the data.

A combination of these objectives is integrated into VICReg to optimise the learning process, enabling it to learn diverse and robust representations from unlabelled data. We take the idea of incorporating Variance, Invariance, and Covariance during NN training, but the problem that each solves, and the way in which they are carried out, are very different. VICReg is a regularisation term for self-supervised learning on images to solve feature collapse, while FairVIC is a custom loss function in supervised learning on tabular data to enhance fairness in NNs.

### 3.2 Fairness Metrics

In this section, we introduce notation and state the fairness measures that we use to quantify bias.

Definition 1: (Equalized Odds Difference (EO)) requires that both the True Positive Rate (TPR) and False Positive Rate (FPR) are the same across groups defined by the protected attribute, where $TPR=\frac{TP}{TP+FN}$ and $FPR=\frac{FP}{FP+TN}$ []. Therefore, we calculate $\max\left(\left|FPR_{p}-FPR_{u}\right|,\left|FNR_{p}-FNR_{u}\right|\right)$, where ${u}$ represents the unprivileged groups and ${p}$ the privileged group and 0 signifies fairness.

Definition 2: (Average Absolute Odds Difference (AO)) averages the absolute differences in the false positive rates and true positive rates between groups, defined as $\frac{1}{2}(|FPR_{D_{u}}-FPR_{D_{p}}|+|TPR_{D_{u}}-TPR_{D_{p}}|)$, where ${D_{u}}$ represents the unprivileged groups and ${D_{p}}$ the privileged group, 0 signifies fairness.

Definition 3: (Demographic Parity Difference (DP)) evaluates the difference in the probability of a positive prediction between groups, aiming for 0 to signify fairness. Formally, $DP=|P(\hat{Y}=1|D=1)-P(\hat{Y}=1|D=0)|$, where $D$ denotes the protected attribute [].

Definition 4: (Disparate Impact (DI)) compares the proportion of positive outcomes for the unprivileged group to that of the privileged group, with a ratio of 1 indicating no disparate impact, and therefore fairness. Denoted as $DI=\frac{P(\hat{Y}=1|D=1)}{P(\hat{Y}=1|D=0)}$ [].

## 4 Approach

We propose FairVIC (Fairness through Variance, Invariance, and Covariance), a novel loss function that enables a model’s ability to learn fairness in a robust manner. FairVIC is comprised of three terms: variance, invariance, and covariance. Minimising for these three terms encourages the model to be stable and consistent across protected characteristics, therefore reducing bias during training. By adopting this broad, generalised approach to defining bias, FairVIC significantly improves performance across a range of fairness metrics. This makes it an effective strategy for reducing bias across various applications, ensuring more equitable outcomes in diverse settings.

To understand how FairVIC operates, it is crucial to define variance, invariance, and covariance within the context of fairness:

Variance: This aims to stop stereotyping by decreasing the reliance upon an individual’s protected characteristic as a trivial solution, instead looking for more unique relations. The loss equation therefore penalises deviation in the protected attribute from its mean, encouraging the model to be fair by minimising these variations.

$$ $L_{\text{var}}=\max\left(0,1-\sqrt{\mathbb{E}\left[\left(P-\mathbb{E}[P]\right )^{2}+\varepsilon\right]}\right)$ (1) $$

where $P$ is the protected attribute, and $\varepsilon=1\mathrm{e}{-4}$ to ensure numerical stability.

Invariance: This ensures consistent results for similar inputs, e.g. if two candidates have the same qualifications and skills, but are from different religions, this variation should not influence the decision. The loss term here should directly penalise the variance of the protected attribute, promoting invariance with respect to it.

$$ $L_{\text{inv}}=\mathbb{E}\left[\left(P-\mathbb{E}[P]\right)^{2}\right]$ (2) $$

where $P$ is the protected attribute.

Covariance: This aims to reduce the model’s dependency on protected characteristics to make predictions, and to ensure decisions are made independently of them. The loss equation therefore minimises this covariance.

$$ $L_{\text{cov}}=\frac{\sqrt{\sum\left(\left(\hat{y}-\mathbb{E}[\hat{y}]\right)^ {\top}\cdot P\right)^{2}}}{N}$ (3) $$

where $\hat{y}$ is the model’s prediction, $P$ is the protected attribute, and $N$ is the number of samples.

Figure: Algorithm 1 FairVIC Loss Function

During the training of a deep learning model, the model iterates over epochs $E$. Data is shuffled into batches, upon which the model predicts to produce a set of predictions $\hat{Y}$. Typically, the true labels $Y$ and predictions $\hat{Y}$ are then passed into a suitable accuracy loss function (e.g., binary cross-entropy, hinge loss, Huber loss, etc.) and the resulting loss attempts to be minimised by an optimiser.

In the case of FairVIC, in addition to computing a suitable accuracy loss $L_{acc}$, we also calculate our three novel terms $L_{var},L_{inv},\text{and}\;L_{cov}$ using Equations 1, 2, and 3 respectively. Each of these individual loss terms is then multiplied by its respective weighting factor $\lambda$ and summed to form the total loss $L_{total}$. Subsequently, gradients are computed, and the optimiser adjusts the model parameters with respect to this combined loss. Further details are provided in Algorithm 1.

The multipliers $\lambda$ enable users to balance the trade-off between fairness and predictive performance, which is typical in bias mitigation techniques. Assigning a higher weight to $\lambda_{acc}$ directs the model to prioritise accuracy while increasing the weights of $(\lambda_{var},\lambda_{inv},\lambda_{cov})$ shifts the focus towards enhancing fairness in the model’s predictions.

## 5 Experiments

In our experimental evaluation, we evaluate the performance of FairVIC against a set of state-of-the-art in-processing bias mitigation methods on a series of datasets known for their bias. Here, we describe the datasets used and the configuration of the neural network we use for the core evaluation.

### 5.1 Datasets

We evaluate FairVIC on three tabular datasets that are used in bias mitigation evaluation due to their known biases towards certain subgroups of people within their sample population. These datasets allow for highlighting the generalisable capabilities of FairVIC across different demographic disparities.

Dataset 1: Adult Income.
This is the primary dataset we use for our evaluation. The classification task is to predict whether an individual’s income is $>\$50$K or $\leq\$50$K. It is particularly known for its gender and racial biases in economic disparity [].

Dataset 2: COMPAS.
The Correctional Offender Management Profiling for Alternative Sanctions (COMPAS) dataset is frequently used for evaluating debiasing techniques. It has a classification goal of predicting recidivism risks and is infamous for its racial biases [].

Dataset 3: German Credit.
This final dataset is used to assess creditworthiness by classification of individuals into bad or good credit risks, with known biases related to age and gender [, ].

Detailed metadata for each dataset, including the number of samples and attributes, can be found in Table 1.

**Table 1: Metadata on experimental datasets.**
| Dataset | Adult | COMPAS | German |
| --- | --- | --- | --- |
| No. of Features | 11 | 8 | 20 |
| No. of Rows | 48,842 | 5,278 | 1,000 |
| Target Variable | income | two_year_recid | credit |
| Favourable Label | >50K (1) | False (0) | Good (1) |
| Unfavourable Label | <=50K (0) | True (1) | Bad (0) |
| Protected Characteristic | sex | race | age |
| Privileged Group | male (1) | Caucasian (1) | >25 (1) |
| Unprivileged Group | female (0) | African-American (0) | <=25 (0) |

### 5.2 State-of-the-Art Comparisons

To highlight the performance of FairVIC, we compare against four state-of-the-art in-processing bias mitigation methods. These are:

Adversarial Debiasing.
This method leverages an adversarial network that aims to predict protected characteristics based on the predictions of the main model. The primary model seeks to maximise its own prediction accuracy while minimising the adversary’s prediction accuracy [].

Meta Fair Classifier.
This classifier allows a fairness metric as an input and optimises the model with respect to regular performance and to the chosen fairness metric [].

Exponentiated Gradient Reduction.
This technique reduces fair classification to a sequence of cost-sensitive classification problems, returning a randomised classifier with the lowest empirical error subject to a chosen fairness constraint [].

Grid Search Reduction.
This approach involves a systematic search over a predefined grid of hyperparameters, evaluating each combination and selecting the approach with the lowest empirical error subject to a chosen fairness constraint [].

Alongside this, a baseline-biased model was established that was a neural network with binary cross-entropy loss only.

### 5.3 Configuration

To enable a fair comparison, we use the same network architecture and hyperparameters for all bias mitigation methods where relevant in our evaluation. These are:

- •
Neural Network Architecture: Two dense hidden layers of size (128, 64)
- •
Number of Epochs: 200
- •
Batch Size: 256
- •
Optimiser: Adam
- •
Learning Rate: 0.01
- •
Dropout Rate: 0.25
- •
Regularisation: L2 (1e-4)

## 6 Evaluation

### 6.1 Core Results

To assess the prediction and fairness performance of FairVIC and state-of-the-art approaches, we test all methods across three datasets to enable a fair baseline comparison. Table 2 shows these results. In terms of prediction performance, we measure accuracy and F1 score to gauge a general snapshot of the model’s effectiveness at the base task. In terms of fairness, we measure equalized odds and absolute odds to evaluate if the model can predict subgroups fairly in terms of accuracy. If a model is leaning towards being fair, these two metrics should be closer to 0 0. We also measure demographic parity and disparate impact to assess if the model can achieve equal positive predictions between subgroups. A demographic parity closer to 0 0 and a disparate impact closer to $1$ shows that a model is not biased towards any particular group.

The Adversarial Debiasing model is the most comparable approach to FairVIC due to factors such as it being a deep learning model, and it offers the most competitive results in terms of performance. To compare the two, we illustrate the core results for all three datasets between a baseline neural network, Adversarial Debiasing, and FairVIC in Figure 2.

**Table 2: FairVIC accuracy and fairness metric results, compared with the base biased model, and four other state-of-the-art methods for bias mitigation in-processing.**
| Dataset | Model | Accuracy | F1 Score | Equalized Odds | Absolute Odds | Demographic Parity | Disparate Impact |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  | Baseline (Biased) | 0.8482 $\pm$ 0.0048 | 0.6692 $\pm$ 0.0084 | 0.1026 $\pm$ 0.0313 | 0.0883 $\pm$ 0.0263 | -0.1918 $\pm$ 0.0182 | 0.3273 $\pm$ 0.0346 |
|  | Adversarial Debiasing | 0.8065 $\pm$ 0.0048 | 0.4773 $\pm$ 0.0708 | 0.2127 $\pm$ 0.0828 | 0.1172 $\pm$ 0.0443 | -0.0405 $\pm$ 0.0679 | 0.7874 $\pm$ 0.2185 |
|  | Meta Fair Classifier | 0.5171 $\pm$ 0.0602 | 0.4744 $\pm$ 0.0219 | 0.4826 $\pm$ 0.0894 | 0.2935 $\pm$ 0.0497 | -0.2098 $\pm$ 0.0542 | 0.7140 $\pm$ 0.0812 |
|  | Exponentiated Gradient Reduction | 0.8027 $\pm$ 0.0026 | 0.4056 $\pm$ 0.0052 | 0.0238 $\pm$ 0.0115 | 0.0167 $\pm$ 0.0061 | -0.0601 $\pm$ 0.0026 | 0.4602 $\pm$ 0.0237 |
|  | Grid Search Reduction | 0.7999 $\pm$ 0.0032 | 0.3807 $\pm$ 0.0214 | 0.1041 $\pm$ 0.0275 | 0.0586 $\pm$ 0.0179 | -0.0392 $\pm$ 0.0302 | 0.6359 $\pm$ 0.1994 |
| Adult | FairVIC | 0.8366 $\pm$ 0.0062 | 0.5910 $\pm$ 0.0251 | 0.2501 $\pm$ 0.055 | 0.1374 $\pm$ 0.034 | -0.0310 $\pm$ 0.031 | 0.8363 $\pm$ 0.1684 |
|  | Baseline (Biased) | 0.6472 $\pm$ 0.0147 | 0.6016 $\pm$ 0.0301 | 0.2566 $\pm$ 0.0821 | 0.2116 $\pm$ 0.0708 | -0.2369 $\pm$ 0.0823 | 0.6738 $\pm$ 0.0823 |
|  | Adversarial Debiasing | 0.6581 $\pm$ 0.0185 | 0.6253 $\pm$ 0.0124 | 0.1707 $\pm$ 0.0694 | 0.1363 $\pm$ 0.0504 | -0.0902 $\pm$ 0.1367 | 0.8982 $\pm$ 0.2614 |
|  | Meta Fair Classifier | 0.3471 $\pm$ 0.0147 | 0.4312 $\pm$ 0.0380 | 0.2951 $\pm$ 0.1038 | 0.2257 $\pm$ 0.1095 | 0.2526 $\pm$ 0.1070 | 2.5876 $\pm$ 0.6627 |
|  | Exponentiated Gradient Reduction | 0.5574 $\pm$ 0.0169 | 0.2981 $\pm$ 0.0407 | 0.0630 $\pm$ 0.0333 | 0.0432 $\pm$ 0.0231 | -0.0393 $\pm$ 0.0257 | 0.9545 $\pm$ 0.0293 |
|  | Grid Search Reduction | 0.6401 $\pm$ 0.0233 | 0.5770 $\pm$ 0.0293 | 0.1865 $\pm$ 0.0389 | 0.1406 $\pm$ 0.0294 | -0.1681 $\pm$ 0.0316 | 0.7660 $\pm$ 0.0411 |
| COMPAS | FairVIC | 0.6437 $\pm$ 0.0176 | 0.6004 $\pm$ 0.0351 | 0.0991 $\pm$ 0.0636 | 0.0693 $\pm$ 0.0488 | -0.0780 $\pm$ 0.0687 | 0.8867 $\pm$ 0.0981 |
|  | Baseline (Biased) | 0.7050 $\pm$ 0.0372 | 0.7907 $\pm$ 0.0347 | 0.2253 $\pm$ 0.1118 | 0.1615 $\pm$ 0.0807 | -0.1672 $\pm$ 0.1090 | 0.7885 $\pm$ 0.1528 |
|  | Adversarial Debiasing | 0.5815 $\pm$ 0.1513 | 0.6302 $\pm$ 0.2581 | 0.1020 $\pm$ 0.0418 | 0.0737 $\pm$ 0.0404 | -0.0657 $\pm$ 0.0335 | 0.8084 $\pm$ 0.2130 |
|  | Meta Fair Classifier | 0.7575 $\pm$ 0.0260 | 0.8291 $\pm$ 0.0229 | 0.2215 $\pm$ 0.1112 | 0.1444 $\pm$ 0.0810 | -0.1052 $\pm$ 0.1315 | 0.8601 $\pm$ 0.1755 |
|  | Exponentiated Gradient Reduction | 0.7465 $\pm$ 0.0300 | 0.8321 $\pm$ 0.0208 | 0.1232 $\pm$ 0.0631 | 0.0796 $\pm$ 0.0348 | -0.1084 $\pm$ 0.0746 | 0.8692 $\pm$ 0.0896 |
|  | Grid Search Reduction | 0.7510 $\pm$ 0.0310 | 0.8335 $\pm$ 0.0247 | 0.1268 $\pm$ 0.0707 | 0.0938 $\pm$ 0.0661 | -0.1278 $\pm$ 0.0821 | 0.8468 $\pm$ 0.0977 |
| German | FairVIC | 0.7290 $\pm$ 0.0219 | 0.8125 $\pm$ 0.0184 | 0.1340 $\pm$ 0.0736 | 0.0898 $\pm$ 0.0434 | -0.0773 $\pm$ 0.0780 | 0.9005 $\pm$ 0.1029 |

Figure: Figure 2: Comparisons of results for all metrics between the baseline biased model, Adversarial Debiasing, and FairVIC.
Refer to caption: extracted/2404.18134v1/Images/core-results.png

Starting with the adult income dataset, the baseline model is shown to be the most biased of all compared approaches, this is expected. The baseline model will serve to be our baseline for all three datasets and will measure the size of the trade-off that bias mitigation approaches have in terms of prediction performance, but also how fairer they make the model in terms of fairness performance. On the adult income dataset, the baseline model achieves $0.8482\pm 0.0048$ in accuracy and $0.6692\pm 0.0084$ in F1 score. This dataset, and also subsequent ones we evaluate, are shown to be heavily imbalanced. Evidently, these results indicate the model to be a good baseline. However, it also shows this model’s bias as it measures a disparate impact of $0.3273\pm 0.0346$. Even though it performs well in equalized odds, absolute odds, and demographic parity, such a low disparate impact clearly indicates a heavy bias of favourable outcomes to a particular subgroup.

For the state-of-the-art methods (e.g., adversarial debiasing, meta fair, exponentiated gradient reduction, and grid search reduction) the accuracy of the model doesn’t drop significantly, apart from the meta fair classifier which shows a drop of $0.3311$. However, if we look at the F1 score, the trade-off becomes more evident as the average drop is $0.2347$. All the state-of-the-art methods perform well in the fairness metrics. Equalized odds, absolute odds, and demographic parity are either reduced or on par with the baseline model. For disparate impact, the average increase is $0.3221$, which clearly indicates that the models that attempt to mitigate bias perform as expected. The meta fair classifier and exponentiated gradient reduction models show interesting results. For the fairness metrics, they both only perform well in one particular metric and poorly in the rest. For example, the exponentiated gradient reduction model performs well in equalized odds, absolute odds and demographic parity but shows a disparate impact of $0.4602\pm 0.0237$, the lowest of all bias mitigation techniques. Inversely, the meta fair classifier model performs well in disparate impact but has large values for equalized odds, absolute odds, and demographic parity. This can be partly due to both methods optimising to specific fairness metrics defined within the algorithm itself. The meta fair classifier model and the exponentiated gradient reduction model optimise for disparate impact and equalised odds respectively, of which they perform well in one but not the other.

The FairVIC model shows a reduced trade-off in terms of prediction performance boasting an accuracy and F1 score of $0.8366\pm 0.0062$ and $0.5910\pm 0.0251$ respectively. Of all the bias mitigation techniques, this performs the best and achieves results closer to the baseline model. In Figure 2, the small trade-off in prediction performance can be visualised easier. In the equalised odds, absolute odds, and demographic parity, FairVIC performs on par with the state-of-the-art methods. It is in disparate impact where FairVIC shines, measuring the closest disparate impact to $1$ of all the models at $0.8363\pm 0.1684$. FairVIC also performs equally well on all metrics, which is a current challenge within bias mitigation []. The closest method, in terms of results and comparison, is the adversarial debiasing model which FairVIC outperforms. In Figure 2, the common instability of this model can be seen, something that FairVIC does not have, boasting a much lower standard deviation.

Moving to the results for the COMPAS dataset, we observe that the baseline performance for prediction accuracy is $0.6472\pm 0.0147$ and the F1 score is $0.6016\pm 0.0301$. In this dataset, the baseline model performs poorly in all fairness metrics. For example, the disparate impact is measured at $0.6738\pm 0.0823$ showing bias similar to the adult income dataset.

For the state-of-the-art methods, we see similar trade-offs to those observed in the adult dataset. The meta fair classifier has a poor prediction performance with a decrease in accuracy of $0.3068$ and an equally poor F1 score. The adversarial debiasing, exponentiated gradient reduction, and grid search reduction approaches show a more moderate decrease in accuracy and F1 score, with the average decrease in accuracy here being $0.1020$. In all fairness metrics, the state-of-the-art methods outperform the baseline model. The only outlier here is the meta fair classifier model measuring a disparate impact of $2.5876\pm 0.6627$, seemingly overshooting and heavily favouring the unprivileged subgroup, resulting in positive discrimination.

The FairVIC model achieves an accuracy of $0.6437\pm 0.0176$ and an F1 score of $0.6004\pm 0.0351$. This shows very little to no reduction in prediction performance. In equalized odds, absolute odds, and demographic parity, FairVIC measures a significant reduction to the baseline model and is one of the lower-scoring bias mitigation techniques. It manages a disparate impact of $0.8867\pm 0.0981$ falling just behind the exponentiated gradient reduction model and adversarial debiasing model. However, the exponentiated gradient reduction model has a very poor F1 score in comparison to FairVIC, and the adversarial debiasing model is more unstable. Evidently, it is clear that our model performs the best of all bias mitigation techniques due to achieving the same prediction performance as the baseline model, and significantly improving all fairness metrics equally.

The final dataset in the core results table is the German credit dataset. As seen in the other two benchmarks, the baseline model measures a respectable prediction performance with an F1 score of $0.7907\pm 0.0347$. It performs poorly in equalized odds, absolute odds, and demographic parity, but performs respectably well in disparate impact measuring $0.7885\pm 0.1528$. Again, this highlights the need to measure models in multiple metrics to encompass the full scope of fairness.

All state-of-the-art approaches improve in both accuracy and F1 score in comparison to the baseline model with an average increase in F1 score of $0.0409$, apart from the adversarial debiasing model which shows a moderate decrease in both metrics. However, in terms of fairness, all state-of-the-art approaches perform better than the baseline. This indicates that for this specific dataset, the techniques were not only beneficial for fairness but for prediction performance also. We observe very similar findings to those found in both the adult income and COMPAS datasets.

Finally, the FairVIC model also improves prediction performance in both metrics and significantly improves fairness across the board. It measures a disparate impact of $0.9005\pm 0.1029$, the closest to $1$ of any model. We also see significantly reduced measures in equalized odds, absolute odds, and demographic parity. The adversarial debiasing model does manage to perform better in these three metrics, but the reduction is marginal.

In summary, in all three datasets and across a myriad of performance and fairness measures, FairVIC significantly outperforms baseline and state-of-the-art approaches. It equally improves all fairness metrics measured, a feat the state-of-the-art approaches could not achieve. We now move on to further extend our analysis of FairVIC.

Figure: Figure 3: Importance of features used for predictions in both the baseline biased model (top) and FairVIC (bottom) on the COMPAS dataset according to LIME values.

To validate our claims that FairVIC reduces the importance of the protected characteristic when making its predictions, we plot the mean feature importances for the baseline and FairVIC models on the COMPAS dataset in Figure 3. Here, the protected characteristic that FairVIC aims to minimise the influence of on the predictions is race. The baseline model is shown to rely upon this feature as its third most important feature, using only the number of priors and the number of other types of juvenile offences more. Our FairVIC model succeeds in decreasing its reliance upon the protected characteristic, as importance drops from $0.0232$ in the baseline to $0.0058$ in FairVIC.

Another effect of FairVIC is that it aims to increase variance in the relationships that it finds within the classifier. This is seen in Figure 3 through the increased importance of under-utilised features, such as age-cat. This, while also being a protected characteristic, had an importance of $0.0033$, and $0.0300$ in the FairVIC model. We would suggest that FairVIC could be improved in the future to apply the loss terms to all protected characteristics within the dataset, but this utilisation of new features means the variance term has succeeded in its goal.

### 6.2 Model Architecture Size

To test how well FairVIC performs when applied to any size model, we apply our approach to nine different neural networks with the architectures described in Figure 4.

Figure: Figure 4: Neural network architecture sizes tested with FairVIC loss.

The chosen neural networks were formed by the combination of different widths and depths of layers. All hyperparameters specified in Section 5.3 remained the same for each NN, alongside weights for each term in FairVIC of $0.5$.
The results of applying FairVIC to these neural network architectures can be seen in Table 3.

**Table 3: Analysis on the results of changing the model architecture size on the COMPAS dataset.**
|  | Evaluation Metrics |  |  |
| --- | --- | --- | --- |
| Model Sizes | Accuracy | F1 Score | Disparate Impact |
| (8, 4) | 0.6540 $\pm$ 0.0136 | 0.6094 $\pm$ 0.0392 | 0.7906 $\pm$ 0.1104 |
| (32, 16) | 0.6635 $\pm$ 0.0135 | 0.6209 $\pm$ 0.0236 | 0.7991 $\pm$ 0.0807 |
| (128, 64) | 0.6477 $\pm$ 0.0130 | 0.6038 $\pm$ 0.0200 | 0.8444 $\pm$ 0.0689 |
| (16, 8, 4) | 0.6581 $\pm$ 0.0091 | 0.6205 $\pm$ 0.0181 | 0.7634 $\pm$ 0.0647 |
| (64, 32, 16) | 0.6540 $\pm$ 0.0172 | 0.6065 $\pm$ 0.0273 | 0.8471 $\pm$ 0.0893 |
| (256, 128, 64) | 0.6540 $\pm$ 0.0136 | 0.6052 $\pm$ 0.0205 | 0.8570 $\pm$ 0.0879 |
| (32, 16, 8, 4) | 0.6628 $\pm$ 0.0107 | 0.6105 $\pm$ 0.0424 | 0.8352 $\pm$ 0.0763 |
| (128, 64, 32, 16) | 0.6543 $\pm$ 0.0152 | 0.6125 $\pm$ 0.0146 | 0.8241 $\pm$ 0.0552 |
| (512, 256, 128, 64) | 0.6436 $\pm$ 0.0146 | 0.5977 $\pm$ 0.0165 | 0.8690 $\pm$ 0.0932 |

The results show that model architecture sizes largely have little effect on the success of FairVIC, once again showing that FairVIC’s approach can be easily integrated within any neural network. There are some minor trends that we can explore, however. For the COMPAS dataset, the larger architectures performed slightly better. As the depth increases, the disparate impact also increases, and the accuracy sees a small decrease. This is a similar pattern for the width where as the width increases, the disparate impact increases and the accuracy slightly decreases. This shows that FairVIC can be applied successfully, as all models saw improvements upon the baseline’s disparate impact where the average increase was $\approx 0.1517$. Therefore users can apply FairVIC to the NN model that performs best upon their data.

### 6.3 Weight Sensitivity Analysis

Our FairVIC loss was combined with binary cross entropy for training the NN to enable optimisation of both accuracy and fairness, minimising the trade-off. The effect of FairVIC on the overall loss function can be increased and decreased by changing the weight $\lambda$ of each FairVIC term. To evaluate this effect, we train six neural networks with the architecture described in Section 5.3, with a different $\lambda$ each time, where $\lambda_{\text{acc}}$ is fixed at $\lambda_{\text{acc}}=1$. The accuracy and disparate impact for each model are seen in Table 4.

**Table 4: Sensitivity analysis on the effect of changing the weight $\lambda$ of variance, invariance, and covariance in the loss function where $L_{\text{total}}=L_{\text{acc}}+\lambda L_{\text{var}}+\lambda L_{\text{inv}}+ \lambda L_{\text{cov}}$ on the adult dataset.**
|  | Evaluation Metrics |  |  |
| --- | --- | --- | --- |
| FairVIC Weights | Accuracy | F1 Score | Disparate Impact |
| 0.0 | 0.8482 $\pm$ 0.0048 | 0.6692 $\pm$ 0.0084 | 0.3273 $\pm$ 0.0346 |
| 0.5 | 0.8476 $\pm$ 0.0040 | 0.6535 $\pm$ 0.0172 | 0.4236 $\pm$ 0.0406 |
| 1.0 | 0.8457 $\pm$ 0.0034 | 0.6385 $\pm$ 0.0166 | 0.5428 $\pm$ 0.0603 |
| 1.5 | 0.8407 $\pm$ 0.0046 | 0.6205 $\pm$ 0.0196 | 0.6896 $\pm$ 0.0810 |
| 2.0 | 0.8351 $\pm$ 0.0047 | 0.6098 $\pm$ 0.0096 | 0.7964 $\pm$ 0.0746 |
| 2.5 | 0.8369 $\pm$ 0.0042 | 0.6153 $\pm$ 0.0107 | 0.7803 $\pm$ 0.0621 |
| 3.0 | 0.8366 $\pm$ 0.0062 | 0.5910 $\pm$ 0.0251 | 0.8363 $\pm$ 0.1684 |

As $\lambda$ increases, the fairness of model predictions increases, and the accuracy of results has a slight decrease. There is, therefore, a small, but negligible, trade-off for the accuracy, while fairness is boosted to a greater effect. One other effect seen is that, with greater $\lambda$, the standard deviation on the disparate impact increases, indicating that the loss functions introduce greater complexity, making the optimisation process more sensitive. The trade off can be visualised in Figure 5.

Figure: Figure 5: The trade-off between accuracy (top), F1-score (middle), and disparate impact (bottom) with different values of $\lambda$ on the adult dataset.
Refer to caption: extracted/2404.18134v1/Images/fairvic_pareto.png

## 7 Conclusion and Future Work

In this paper, we introduced FairVIC, an innovative approach embedded directly into the training of neural networks to enhance fairness by minimising the dependency on protected characteristics for making predictions. Our experimental results across three biased datasets demonstrate that FairVIC not only significantly improves scores for many fairness metrics but also balances the trade-off between prediction accuracy and fairness. This balance showcases FairVIC’s strength in providing a robust and generalisable solution applicable across various tasks and datasets.

Our experimental results highlight the effectiveness of FairVIC in enhancing fairness across all metrics measured without significantly compromising accuracy. The approach is robust, seen by the consistently low standard deviations in its performance metrics across different datasets. This stability is crucial for practical applications where reliability in varied operational environments is essential. Additionally, FairVIC’s adaptability is shown through its ability to generalise across different tasks.

Moreover, FairVIC is designed to be intuitive and easy to use, offering an out-of-the-box solution that can be seamlessly integrated into existing workflows without requiring extensive modifications or deep technical knowledge. This user-friendly aspect is likely to encourage wider adoption and application in diverse settings, further aiding the development of fair machine learning practices.

Future work would look to extend the capabilities of FairVIC, such as exploring its application to multi-classification and regression tasks, and expanding its utility beyond the current datasets to include more complex and varied types of data, such as images and textual data.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: - [Fairness Through Unawareness] This sounds like fairness behind a "veil of ignorance" where the claim is that removing sensitive attribute will prevent all kinds of downstream unfairness. However, for a long time it has been known in the fairness community that this approach is only one of the possible definitions [1] and in some cases might not be enough since there can be correlated non-sensitive attributes due to historical discrimination (eg: zipcodes can predict race in large part due to redlining laws in mid 1900s) [2]. 

 - [Missing comparison to constrained fairness methods] Especially on tabular datasets considered in the paper, there have been many prior works (eg [5]) that use traditional ML models to achieve a much better fairness / accuracy tradeoff. I would have liked to see some comparison to such works.

 - [Missing discussion of conflicts of fairness definitions] Given many well studied cases of inherent conflicts in fairness definitions [3], I found the claims of achieving fairness along multiple definitions simultaneously a bit concerning. Generally there's a lack of discussion in the paper about possible conflicts in these definitions and when such conflicts happen which definition will prevail under FairVIC.

 - [DI and DP are the same definition] The paper presents Disparate Impact and Demographic Parity as different definitions but these are the same definition of fairness (see [5]). Thus, I'm also not super sure how to interpret Table 1 and Figure 1 results since some methods show reduction in DI but not in DP and vice versa.

 - [More datasets where deep learning models shine] Since the proposed method should work especially well on deep neural nets, I would have liked to see some datasets where deep learning models are really necessary (traditional ML models perform very well already on the considered tabular datasets). Some examples would be CheXpert and CelebA which have been used in prior fair deep learning literature.

[1] https://arxiv.org/abs/1908.09635

[2] https://arxiv.org/abs/1808.00023

[3] https://arxiv.org/abs/1609.05807

[4] https://fairmlbook.org

[5] https://www.jmlr.org/papers/v20/18-262.html
soundness: 2
strengths: - The method is broadly applicable to reduce a variety of biases at the same time
- Weights on new loss terms can be dynamically balanced
- The additional loss terms do not introduce a large computational overhead on the forward or backward passes
summary: The paper proposes FairVIC, a method to learn fair representations by adding terms for variance invariance and covariance, to remove any correlation between sensitive attributes and outcomes. FairVIC borrows principles from self supervised learning and applies it to reduce bias in outcomes of a neural network. FairVIC adds 3 new terms (variance, invariance, and covariance) to the traditional empirical risk minimization objective which can be balanced dynamically. Empirical results show that FairVIC is effective at reducing a variety of biases all at once, while also being more robust than existing methods.
weaknesses: See questions

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. Could the authors please clarify the differences between the variance and covariance terms in terms of their impact on the model? Both seem to reduce the model's reliance on the protected attribute, but a more detailed explanation would be helpful.

2. The regularization terms in FairVIC appear to optimize demographic parity by reducing the model's dependence on the sensitive attribute, as well as individual fairness. How does the model also learn to optimize for the Equalized Odds metric?

3. I am particularly interested in seeing if FairVIC outperforms a model that combines demographic parity and equalized odds fairness regularizers added to the loss objective.
soundness: 2
strengths: 1. This paper introduces a novel fairness regularizer that simultaneously optimizes for both group and individual fairness.

2. The proposed method is evaluated across two modalities, demonstrating optimal performance in terms of the fairness-accuracy trade-off when compared to baseline methods.

3. Additionally, the paper presents a method for automatically tuning the weights of the regularizer.
summary: The paper introduces a novel approach called FairVIC for learning fair representations to mitigate bias in classification models. Inspired by Variance-Invariance-Covariance Regularization from self-supervised learning, FairVIC incorporates a regularizer with three key terms: the variance term, which reduces reliance on the protected attribute as a trivial solution; the invariance term, which ensures consistent predictions for similar individuals; and the covariance term, which minimizes dependence on the protected attribute. Consequently, the FairVIC loss function optimizes for both group and individual fairness simultaneously. Additionally, the paper presents an adaptive multi-objective gradient descent method to dynamically adjust the penalty weights. The authors demonstrate FairVIC's effectiveness by empirically evaluating it on three tabular classification problems and one text classification problem, comparing it against five baseline methods.
weaknesses: 1. The evaluation is limited by the number of datasets used. It would be beneficial to test the proposed method on a wider range of tabular and text classification datasets [1, 2, 3].

2. FairVIC shares similarities with both fair representation learning methods and fairness penalty approaches; however, the authors only compare it with the adversarial debiasing algorithm by Zhang et al. It would be helpful to compare FairVIC with other fairness regularizers, such as those addressing equalized odds [4], disparate impact [5], and individual fairness.

3. The presentation of the tables could be improved by highlighting the best-performing algorithm for each dataset and calculating the average rank of each method.


[1] Ding, F., Hardt, M., Miller, J. and Schmidt, L., 2021. Retiring adult: New datasets for fair machine learning. Advances in neural information processing systems, 34, pp.6478-6490.

[2] De-Arteaga, M., Romanov, A., Wallach, H., Chayes, J., Borgs, C., Chouldechova, A., Geyik, S., Kenthapadi, K. and Kalai, A.T., 2019, January. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In proceedings of the Conference on Fairness, Accountability, and Transparency (pp. 120-128).

[3] https://www.kaggle.com/c/jigsaw-unintended-bias-in-toxicity-classification

[4] Hardt, M., Price, E. and Srebro, N., 2016. Equality of opportunity in supervised learning. Advances in neural information processing systems, 29.

[5] Zafar, M.B., Valera, I., Rogriguez, M.G. and Gummadi, K.P., 2017, April. Fairness constraints: Mechanisms for fair classification. In Artificial intelligence and statistics (pp. 962-970). PMLR.

[6] Dwork, C., Hardt, M., Pitassi, T., Reingold, O. and Zemel, R., 2012, January. Fairness through awareness. In Proceedings of the 3rd innovations in theoretical computer science conference (pp. 214-226).

---

confidence: 5
contribution: 1
initial_rating: 3
presentation: 2
questions: Additional questions/comments:
* [L015-019] Seems to me like grounding the ("user-defined") fairness definitions in normative/philosophical/legal arguments for when differential treatment is acceptable [https://proceedings.mlr.press/v81/binns18a.html, https://proceedings.mlr.press/v81/binns18a.html] could actually be a strength of current fair ML approaches. I understand that this implies ambiguity over which metric is appropriate, but from what I see in the FAccT space practitioners seem to be relatively comfortable with this, so long as domain experts can be found to provide guidance on the choice of metric. To put it another way, the authors claim such approaches are “ad-hoc” [L051]; I would agree they are ad-hoc if implemented carelessly, but can be intentional and interpretable when integrated into a thoughtful design process that includes non-technologists.
* [L053] The cited Berk paper seems like an odd choice to substantiate the claim about the issues with post-processing methods; to my knowledge those authors don't compare their in-processing method against post-processing baselines. Setting the citation aside, if you care about the final predictions/decisions then a good post-processing method should be fine in principle, right? I sort of understand the appeal to go beyond post-processing and "[address] the underlying biases in the data and model", but I think that argument makes the most sense if you approach the problem from a representation learning angle, where a single model must accomplish multiple downstream tasks or be transferred to some new setting, which doesn't seem to match the experimental setting considered here. If the authors really believe this argument then they should compare against a post-processing method empirically.
* Since the proposed approach uses concepts like variance and invariance to encode fairness, I feel that prior work attempting to regularize fair classifiers/representations using information theory-inspired priors should be acknowledged [https://proceedings.neurips.cc/paper/2018/hash/415185ea244ea2b2bedeb0449b926802-Abstract.html, https://proceedings.mlr.press/v89/song19a, https://proceedings.mlr.press/v97/creager19a.html].
* [L058] Why are the concepts of variance, invariance and covariance "more principles" than alternative?
* [L196, L205] Is P not a random variable which is a component of the dataset? How are Eqn 1 and Eqn 2 dependent on the model? For Eqn 3 the dependence (through $\hat y$) is clear.
* The variance and invariance terms seem structurally quite similar. Are the authors sure both are needed? If yes, please provide an intuition as to why. I appreciate that many configurations of lambdas (including zero values) are tried in the appendix, but I wasn't able to find a straightforward ablation where, for each regularizer R in {variance, invariance, covariance}, drop R from the loss, tune other hyperparameters the best you can, and report FairVIC-minus-R results for all datasets, ideally in an easy-to-interpret format (like Fig 1).
* [Sec 4.2] Tuning hyperparameters from training data seems like a dangerous game to play. Also now you need to introduce a hyperprior $R$ (I couldn't find discussion of how this is selected), which means the practitioner needs an intuitive understanding of what scale is appropriate for lambda. If that is the case, why not just do a standard hyperparameter search over a reasonable range (which must be known, otherwise $R$ is misspecified) using validation data?
* [L269] How is the regularization term $R$ implemented?
* [Table 1] These tables contain a lot of information. Formatting the best results (respecting the uncertainty estimates from the std devs) in bold would help readability. I do think the visualization in Figure 1 also helps interpret the results, for what it's worth.
* [Table 2] If the lambdas are tuned adaptively, why are the final results such clean numbers? Was some sort of quantization applied?
* [L1002] the authors show the effect of optimizing with just one term at a time. I hesitate to ask this because the experiments are already rather broad, but I was curious what would happen if only one term was *omitted* at a time.
soundness: 2
strengths: The authors propose fairness regularizers that aim to satisfy notions of group, individual, and counterfactual fairness simultaneously

For the chosen datasets, the method is evaluated extensively against the chosen baselines. While there are a few additions and ablations I hope to see, the results are already considerable. I like the visualization provided by Figure 1.
summary: The authors introduce an in-processing method that attempts to control how the predictions vary w.r.t. sensitive attributes. The proposed approach introduces three regularizers aimed at encouraging both group and individual notions of fairness simultaneously. They show how the proposed approach compares favorably with other in-processing approaches on tabular data.
weaknesses: The introduction of the regularizers is somewhat instructable. Basic questions like how do they regularizers depend on the model’s predictions are left unanswered.

The dismissal of prior approaches (e.g. regularizing using a metric grounded in legal precedent, post-processing methods at large) was rather uncharitable, in my opinion. What the authors do is describe potential limitations of these methods, but I think the claims are not properly substantiated, and a more detailed account for how the proposed method contrasts with these approaches would help.

The method is quite complex, and (despite the many experiments and ablations) I wasn’t convinced that all components are necessary. To handle this complexity, the authors propose a way to adaptively choose hyperparameters, but it seems flawed to me.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 3
questions: Please refer to the identified weaknesses; I have no further questions regarding this manuscript.
soundness: 1
strengths: This method is straightforward and comprehensible. 

The writing style is clear and easy to follow. 

Figure 1 effectively illustrates the distinctions among various methods.
summary: This paper introduces three loss terms designed to regulate the learning process and enhance fairness, without specifying the fairness metrics to be optimized during the training stage. The paper conducts experiments on both tabular data and one NLP dataset to demonstrate its effectiveness.
weaknesses: **Technical flaw:** My primary concern pertains to this point. The author introduces three loss terms in equations (1), (2), and (3). However, terms (1) and (2) *have no direct dependence on the network parameters*. Therefore, the gradient of the parameters with respect to those losses is always zero, making optimization of these terms nonsensical. This constitutes a significant technical flaw.

**Lack of evaluation:**  Given the plethora of in-processing methods available in fairness and robustness research, the criteria for selecting the baseline model remain unclear. I recommend the inclusion of a representative method, such as GroupDRO, for comparison, along with Min-max fairness for a more comprehensive evaluation.

**Experiment flaw:** How can Demographic Parity attain a negative value? (line 157)