#  FITNESS: A Causal De-correlation Approach for Mitigating Bias in Machine
Learning Software

Ying Xiao<EMAIL_ADDRESS>Southern University of Science and
TechnologyChina ,  Shangwen Wang<EMAIL_ADDRESS>National
University of Defense TechnologyChina ,  Sicen Liu
<EMAIL_ADDRESS>Southern University of Science and
TechnologyChina ,  Dingyuan Xue<EMAIL_ADDRESS>Southern
University of Science and TechnologyChina ,  Xian Zhan<EMAIL_ADDRESS>HuaweiChina and  Yepang Liu<EMAIL_ADDRESS>Southern University of
Science and TechnologyChina

(2023)

###### Abstract.

Software built on top of machine learning algorithms is becoming increasingly
prevalent in a variety of fields, including college admissions, healthcare,
insurance, and justice. The effectiveness and efficiency of these systems
heavily depend on the quality of the training datasets. Biased datasets can
lead to unfair and potentially harmful outcomes, particularly in such critical
decision-making systems where the allocation of resources may be affected.
This can exacerbate discrimination against certain groups and cause
significant social disruption. To mitigate such unfairness, a series of bias-
mitigating methods are proposed. Generally, these studies improve the fairness
of the trained models to a certain degree but with the expense of sacrificing
the model performance. In this paper, we propose FITNESS, a bias mitigation
approach via de-correlating the causal effects between sensitive features
(e.g., the sex) and the label. Our key idea is that by de-correlating such
effects from a causality perspective, the model would avoid making predictions
based on sensitive features and thus fairness could be improved. Furthermore,
FITNESS leverages multi-objective optimization to achieve a better
performance-fairness trade-off. To evaluate the effectiveness, we compare
FITNESS with 7 state-of-the-art methods in 8 benchmark tasks by multiple
metrics. Results show that FITNESS can outperform the state-of-the-art methods
on bias mitigation while preserve the model’s performance: it improved the
model’s fairness under all the scenarios while decreased the model’s
performance under only 26.67% of the scenarios. Additionally, FITNESS
surpasses the Fairea Baseline in 96.72% cases, outperforming all methods we
compared.

Machine Learning Software, Fairness Bug, Bias Mitigation, Causality Analysis

††conference: The Web Conference; 30 April - 4 May 2023; United
States††copyright: none††journalyear: 2023††copyright:
rightsretained††conference: The ACM Joint European Software Engineering
Conference and Symposium on the Foundations of Software Engineering 2023;
November 11-17, 2023; San Francisco, California, United States††ccs: Software
and its engineering Software testing and debugging

##  1\. INTRODUCTION

Machine learning (ML)-based autonomous decision-making systems are critical
components of modern software service ecosystems. They are widely adopted in
various application scenarios such as junk mail sorting, personalizing
advertisements recommendations, autonomous vehicles, and so on (Kotary et al.,
2022; Tsioutsiouliklis et al., 2022; Li et al., 2021; LeCun et al., 2015;
Janai et al., 2020; Schwarting et al., 2018). The application for such
systems, however, requires a large-scale dataset for the adequate training of
the model, and it is challenging to collect enough high-quality and unbiased
data. Furthermore, the bias relating to natural human properties (e.g., race,
gender, age) can lead to unwanted discrimination in human-related tasks,
including college admission, health care, insurance and justice, which can do
harm to people’s critical benefit (Zhang et al., 2020; Chen et al., 2022;
Mehrabi et al., 2021). As a result, how to mitigate data bias or train a
discrimination-free model from a biased dataset is becoming a crucial problem
in both AI and Software Engineering domains.

Fairness is such a property that could be threatened by the bias in the
datasets.111We use “bias” and “unfairness” interchangeably, as the opposite of
“fairness”. From the machine learning perspective, fairness is a non-
functional property, but it is a fundamental right in the human society
(Kuipers and Kassirer, 1984; Zhang and Harman, 2021; Chen et al., 2022).
Obviously, people are not willing to be treated differently for different skin
colors, sexes, and nationalities by others or the ML-enabled systems (Zhang et
al., 2020; Mehrabi et al., 2021; Madaio et al., 2020). Despite that, if the
collected dataset is imbalanced, systems trained on it would give privilege to
a certain type of people (e.g., men against women), leading to the unfairness
in the prediction results of the systems. A typical example is that Amazon
scraped an automated recruiting tool in 2018 as it was found to discriminate
against women (Dastin, [n.d.]; Chakraborty et al., 2021).

Recent years have witnessed a growing number of approaches being proposed to
address the unfairness of ML-based models, from the Artificial Intelligence,
Human Computation and Software Engineering communities (Hube et al., 2019;
Sheng and Zhang, 2019; Hettiachchi et al., 2021; Mehrabi et al., 2021; Zhang
et al., 2020; Madaio et al., 2020; Li et al., 2021; Chen et al., 2022).
Generally, existing approaches use either over-sampling or under-sampling
techniques on the dataset, with the aim of balancing the data used for
training (Chakraborty et al., 2021, 2020; Zemel et al., 2013; Kamiran and
Calders, 2012). However, such approaches may have specific weaknesses. For
example, over-sampling could lead to the overfitting of the model to the over-
sampled data (Mohammed et al., 2020) while under-sampling may provide
inadequate data for model learning. Consequently, state-of-the-art approaches
could alleviate the model bias to a certain degree, but usually with the
expense of a sharp drop in model performance, which is an important functional
property reflecting the accuracy of the prediction from the model (Zhang et
al., 2018; Mehrabi et al., 2021; Zhang et al., 2020; Chakraborty et al., 2021,
2020; Chen et al., 2022). For instance, after applying Fair-SMOTE to protect
the sex feature, the accuracy of a logistic regression classifier decreases
from 0.83 to 0.73 in predicting whether someone is high-income in the Adult
Census Income dataset (mis, 1996; Chakraborty et al., 2021).

To tackle the unfairness problem, we propose a new causal de-correlation based
approach named FITNESS (For mItigating daTa aNd modEl biaSeS). Our basic
insight is that the unfair predictions from a model could be largely related
to the sensitive features (e.g., the sex and race) whose distributions are
imbalanced in a dataset. For instance, in a dataset to predict the income
(mis, 1996), around 80% of the high-income people are actually male, and thus
the difference between the contribution of males and females to a high-income
prediction could be very significant (Chakraborty et al., 2021; Peng et al.,
2021). That is, models trained on such a dataset could prefer to predict a
male as high-income instead of a female. Therefore, the core idea of our
approach is to eliminate the causal difference among various sensitive feature
values for specific data labels to alleviate the model bias better.
Specifically, we model the decision-making process as a structural causal
model (Pearl, 2009) and take the causal intervention to quantitatively
calculate the correlation between the sensitive feature values and the data
labels. And then, we eliminate the causal difference by de-correlation, which
involves mutating biased data instances. Consequently, we formulate the
fairness problem as a search process for which data instances should be
mutated to obtain an unbiased training dataset. To balance model performance
and fairness better, we apply the well-known Multi-Objective Optimization
(MOO) (Censor, 1977) that takes into consideration of both performance and
fairness metrics in the search process.

To evaluate FITNESS, we conduct experiments with 8 decision-making tasks using
3 different machine learning algorithms (i.e., LR, RF, SVM) and four benchmark
datasets from different domains (e.g., finance, justice, and economy). Our
experiments show that among all scenarios, FITNESS improves 100% models’
fairness and only decreases 26.67% models’ performance, which outperforms the
state-of-the-art method MAAT (Chen et al., 2022) that improves 94.44% models’
fairness and decreases 38.89% models’ performance. Regarding the state-of-the-
art benchmarking tool (Fairea Baseline) (Hort et al., 2021), FITNESS improved
the fairness and performance of 34.90% models simultaneously and outperforms
96.72% Fairea Baseline, surpassing all the existing methods we compared.

In summary, this paper makes the following contributions:

  * •

We first tackle the fairness problem from a causality perspective by de-
correlating the sensitive feature values and labels.

  * •

We propose a pre-processing approach named FITNESS that incorporates causal
intervention and multi-objective optimization to achieve the performance-
fairness trade-off.

  * •

We conducted large-scale experiments and the results demonstrate FITNESS
significantly surpasses the state-of-the-art.

  * •

We also release all data and code 222https://doi.org/10.5281/zenodo.7608487 to
the research community to facilitate follow-up studies or to replicate and
extend FITNESS.

##  2\. PRELIMINARIES

In this section, we introduce some background knowledge and related works to
this study.

###  2.1. Background

Integrating machine learning models into software is becoming more prevalent
as a way to improve effectiveness and efficiency by leveraging historical data
(Zhang et al., 2020; Zhang and Harman, 2021; Chen et al., 2022). Examples
include using machine learning software by employers to automatically select
the most suitable resumes, by doctors to aid in diagnoses, and by banks to
evaluate loan applications (Chakraborty et al., 2021, 2020; Chen et al.,
2022). Although machine learning software improves social efficiency, it faces
a significant risk of fairness bugs which can exacerbate discrimination and
inequality (Mehrabi et al., 2021; Assembly et al., 1948). This is because the
training dataset substantially influences the performance of the machine
learning model while the dataset from the real world is usually imbalanced in
the features class and labels class (LeCun et al., 2015). Thus, model
discrimination and bias are prevalent in actual application. Because of the
ethical duty of software engineers to develop fair and discrimination-free
software, research on fairness problems in machine learning software is needed
and meaningful.

As the problem of bias in machine learning algorithms is not only a hot issue
in Computer Science but also is a spotlight in the fields of Statistics and
Sociology (Mehrabi et al., 2021; Jobin et al., 2019), various definitions,
testing techniques, and evaluating metrics have been proposed regarding to the
fairness of machine learning algorithms and software (Zhang et al., 2020;
Zhang and Harman, 2021). In this paper, we focus on the group fairness, which
is widely studied in Software Engineering, and evaluate our approach with the
measurements and baselines from the Software Engineering community (Sun et
al., 2022; Chakraborty et al., 2020, 2021; Chen et al., 2022; Hort et al.,
2021).

###  2.2. Related Work

As mentioned above, the rise of data-driven algorithms has made fairness
issues widely studied. Some leading technology companies have also set up
dedicated teams to explore fairer AI algorithms, applications, and software
services. Where Microsoft created Fairlearn (Bird et al., 2020), an open-
source toolbox that provides some general unfairness mitigation methods, and
proposed an AI fairness list that determines the general requirements and
focus of AI fairness (Madaio et al., 2020). Google AI came up with a series of
studies (Hardt et al., 2016; Beutel et al., 2019; Sambasivan et al., 2021;
Lahoti et al., 2020; Prost et al., 2019) exploring the impact of the dataset,
threshold, ranking, and re-weighting on AI fairness with various perspectives
and methods.

Fairness testing and measure metrics: As fairness problems receive high
attention from many interdisciplinarities, how to test and evaluate model
fairness is becoming an emergency issue. Zhang _et al._ (Zhang et al., 2020)
investigated 144 machine learning software fairness papers that cover
attributes testing (fairness, robustness and correctness), testing components
(dataset, algorithms and framework), testing workflow (test generation and
evaluation) and application scenario (recommendation system, machine
translation and autonomous driving) to explore fairness testing techniques.

In terms of fairness testing, Galhotra _et al._ (Galhotra et al., 2017)
provided a definition of software fairness and discrimination and proposed
Themis, a method that can qualitatively test the fairness and bias degree;
Udeshi _et al._ (Udeshi et al., 2018) proposed an automated directed fairness
testing approach Aeqitas to test any given model’s fairness; Aggarwal _et al._
(Aggarwal et al., 2019) came up with a black box fairness testing approach for
a machine learning model via symbolic execution and local explainability for
effective test case generation.

As for fairness evaluation, Biswas _et al._ (Biswas and Rajan, 2020) performed
a comprehensive empirical study of the real-world machine learning model and
built a baseline for 40 top Kaggle models in 5 tasks; Hort _et al._ (Hort et
al., 2021) considered the problem of balancing model performance and fairness
and came up with a performance-fairness trad-off baseline (Fairea Baseline).

Bias mitigation: Zhang _et al._ (Zhang and Harman, 2021) found that extending
the feature set significantly improves fairness, while enlarging training data
does not improve fairness. According to different working mechanisms, existing
bias mitigation approaches can be divided into three classes: pre-processing,
in-processing, and post-processing (Mehrabi et al., 2021), where pre-
processing methods (Zemel et al., 2013; Kamiran and Calders, 2012; Chakraborty
et al., 2020, 2021; Peng et al., 2021) take effects before decision-making
algorithms via processing the dataset with data mutation or differentiated
sampling; in-processing methods (Beutel et al., 2019; Zhang et al., 2018;
Rastegarpanah et al., 2019; Wu et al., 2021; Chen et al., 2022) optimize the
decision-making algorithms via introducing the regular item, Constrained
Markov Decision Process (CMDP), or group selection; post-processing methods
(Li et al., 2021; Fu et al., 2020; Tsintzou et al., 2018; Kamiran et al.,
2012) do not modify the data or decision-making algorithm but adjust the
decision results with re-ranking, greedy algorithm, or bias disparity. IBM
developed the open-source toolbox AIF360 (Bellamy et al., 2019), which
integrated fairness metrics and some bias mitigation algorithms, including
pre-processing (Zemel et al., 2013; Kamiran and Calders, 2012), in-processing
(Zhang et al., 2018; Kamishima et al., 2012) and post-processing (Pleiss et
al., 2017; Hardt et al., 2016; Kamiran et al., 2012) methods.

Among various mitigation strategies, pre-processing methods are preferred in
most cases (Biswas and Rajan, 2020) because once the model is trained, users
can utilize the discrimination-free model to make decisions directly instead
of calling in/post-processing approaches in each decision-making task.
Compared with in/post-processing methods, pre-processing methods make all
complicated calculations and bias-mitigating operations before the trained
model and output a normal but fair machine learning model, which does not
increase the technical requirements and time or computation cost for the model
users. As a result, pre-processing bias-mitigating methods can be easily
deployed in real applications. That is why most machine learning fairness
studies from Software Engineering are pre-processing solutions in recent
years.

For instance, Chakraborty _et al._ proposed Fairway (Chakraborty et al.,
2020), which designs a pre-experiment to identify the biased data instances
and remove them to improve fairness. As removing too many data instances can
decrease model prediction performance, Chakraborty _et al._ introduced SMOTE
(Fernández et al., 2018) and proposed Fair-SMOTE (Chakraborty et al., 2021) in
their following work. Fair-SMOTE solves Fairway’s limitation by synthesizing
new data instances to compensate for data removal. Furthermore, Chen _et al._
came up with an ensemble approach MAAT (Chen et al., 2022), training the
fairness model and performance model separately and improving fairness by
combining two models to make the final decision. Existing bias-mitigating
approaches can work as the fairness model of MAAT.

###  2.3. Causality

Causality (Causation) denotes the impact that one event, process, state, or
object (a cause) contributes to the production of another event, process,
state, or object (an effect) (Bunge, 2017). At the same time, Causality can
either refers to a science studying the impact mentioned above with a solid
theoretical foundation or a technique processing the causation among variables
(Pearl and Mackenzie, 2018).

Due to mature theories (Causal Intervention, Counterfactual Inference) and
practical tools (Structural Causal Model, Causal Graph, Average Treatment
Effect and Randomized Control Trials), Causality is widely used in Physiology,
Biomedicine, and Economics, as there is a tremendous demand of processing data
correlation in such areas (Pearl, 2009; Gopnik et al., 2007; Imbens and Rubin,
2015; Varian, 2016). Likewise, as machine learning software encounters
challenges in handling complicated correlations and bias among variables in
datasets, Causality can be a potential direction to address such problems and
obtain fairer machine learning software.

####  2.3.1. Structural Causal Mode and Causal Graph

Structural Causal Model (SCM) is a mathematical model representing the
causation among features or variables, which can transform into a graph model
(Causal Graph) in the form of a Directed Acyclic Graph (DAG) (Pearl, 2009). As
a 4-tuple model $M(X,U,f,P_{u})$, Structural Causal Model consists of
endogenous variables $X$, exogenous variables $U$, mapping functions $f$, and
$P_{u}$ which is the probability distribution over $U$ (Pearl, 2009; Sun et
al., 2022). SCM and Causal Graph are essential tools of Causality Science to
deal with causation. Figure 1 shows a causal graph of smoking on lung cancer.

Figure 1. Causal Graph of Smoking on Lung Cancer.

####  2.3.2. Causal Intervention

Causal Intervention is a widely-used approach to calculate the potential
effect of an untaken action or strategy, which is broadly applied in medical
treatment, social affairs, and policy analysis (Pearl, 2009; Heckman, 2000;
Kuipers and Kassirer, 1984). In the following, We introduce Causal
Intervention through the example of the Smoking-Lung Cancer case.

Suppose $P_{m}$ is the modified probability distribution (i.e., the
probability after intervention). According to the definition of intervention
(Pearl, 2009), there are:

(1) $P(Y=y|do(X=x))=P_{m}(Y=y|X=x)$ (2) $P_{m}(Z=z)=P(Z=z)$ (3)
$P_{m}(Y=y|Z=z,X=x)=P(Y=y|Z=z,X=x)$

where $Y$ denotes lung cancer, $X$ denotes smoking, $Z$ denotes hidden factor,
$do(X=x)$ means taking intervention action of setting $X=x$. Then we can
obtain:

(4) $\displaystyle P(Y=y|do(X=x))=P_{m}(Y=y|X=x)$
$\displaystyle=\sum_{z}P_{m}(Y=y|X=x,Z=z)P_{m}(Z=z|X=x)$
$\displaystyle=\sum_{z}P_{m}(Y=y|X=x,Z=z)P_{m}(Z=z)$
$\displaystyle=\sum_{z}P(Y=y|X=x,Z=z)P_{m}(Z=z)$

Eq (LABEL:adjustment_formula) is the adjustment formula, and this operation is
named adjusting for Z, which facilitates us to use known probability
distribution to calculate unknown intervened probability distribution (Pearl,
2009). In the smoking-lung cancer case, it enables us to analyze the causal
effect of smoking on lung cancer quantitatively.

##  3\. APPROACH

In this section, we introduce FITNESS in detail.

Figure 2. Overview of FITNESS.

###  3.1. Overview

FITNESS is a pre-processing approach mitigating bias by causal de-correlation.
Many existing works (Chakraborty et al., 2020, 2021; Hort et al., 2021; Zhang
and Harman, 2021) mentioned mutating data instances, removing biased data
instances and synthesizing data instances can modify the bias degree of data.
However, what kinds of and how many data points should be mutated, removed or
synthesized are still intractable challenges. FITNESS can automatically
complete such processes and de-correlate the causal differences among various
sensitive feature values on labels to achieve a fairness-performance trade-
off.

FITNESS consists of two components, including bias identification and causal
de-correlation. Figure 2 shows the workflow of FITNESS. We first randomly
divide the dataset into the training set and testing set. Then FITNESS
conducts bias identification and causal de-correlation on the original
training set by causality analysis to generate a new training set for the
training model. Directed by the result of bias identification, the selected
multi-objective optimization algorithm can nudge the optimal training set for
training a fair and high-performance model by iterations.

Figure 3. Causal Graph of Sensitive Feature on Label.

###  3.2. Bias Identification

Figure 3 shows a causal graph of sensitive feature to label, where $T$ denotes
the sensitive feature, $C$ denotes hidden factors (all other features and
factors except the sensitive feature), and $Y$ represents the data label
(e.g., income ¡ 50k in Adult Dataset). In Figure 3, both sensitive feature and
hidden factors affect the label value causally. The label value $Y$ can be
represented by a binary function:

(5) $Y=f(C,T)$

Our goal is to make the causal effect of different sensitive feature values on
the label equal. We expect that after causal de-correlation, the binary
function Eq 5 can be rewritten as $Y=f(C,T_{c})$, where $T_{c}$ is a constant,
the value of $Y$ is not affected by different sensitive feature values (e.g.,
male or female). As a result, we can protect the sensitive feature and train
discrimination-free models. To achieve this, we first identify the bias.

In most cases, it is convenient and effective to determine bias by comparing
the percentage of feature and label classes. However, datasets may exist in
Simpson’s paradox (Pearl, 2009), a phenomenon in which the relationship
between two variables is reversed when they are analyzed in subgroup and
overall, making it unreliable to identify bias by simply comparing the
classes’ percentages within the dataset. To avoid this case, we take causality
analysis to identify the dataset’s bias correctly.

For the convenience of causality analysis, we define the effect of sensitive
feature $T$ on label $Y$ within the dataset as the Average Causal Effect
(ACE). According to literature (Pearl, 2009; Sun et al., 2022), ACE can be
represented as:

(6) $ACE^{y_{i}}_{t_{j}}=\mathbb{E}[Y=y_{i}|do(T=t_{j})]$

where $y_{i}$ denotes the $i$-th label (e.g., income ¿ 50K in the Adult
dataset), $t_{j}$ denotes the $j$-th sensitive feature value (e.g., female of
sex in the Adult dataset), $do(T=t_{j})$ denotes taking causal intervention.
$ACE^{y_{i}}_{t_{j}}$ means the average causal effect of $t_{j}$ against
$y_{i}$. Through comparing $ACE^{y_{i}}_{t_{j}}$ and $ACE^{y_{i}}_{t_{k}}$, we
can conveniently and correctly identify whether $t_{j}$ (e.g., female in Adult
Dataset) or $t_{k}$ (e.g., male in Adult Dataset) is the privileged sensitive
feature value on label $y_{i}$ (e.g., income ¿ 50K in Adult Dataset ).

###  3.3. Causal De-correlation

To automatically de-correlate sensitive feature values and data labels, we
first define the Average Causal Difference (ACD) to guide the searching
algorithm to determine which data instances should be mutated. According to Eq
6, ACD can be represented as:

(7) $ACD^{y_{i}}_{(t_{j},t_{k})}=ACE^{y_{i}}_{t_{j}}-ACE^{y_{i}}_{t_{k}}$

where $t_{j}$ and $t_{k}$ denote the different values (e.g., female or male in
Adult Dataset) of the same sensitive feature $T$ (e.g., sex in Adult Dataset).
If $ACD^{y_{i}}_{(t_{j},t_{k})}>0$, the causal effect of $t_{j}$ is higher
than $t_{k}$ on $y_{i}$, regarding $y_{i}$, $t_{j}$ will be the privileged
sensitive feature value and the group with $t_{k}$ is likely to be
disadvantaged. On the contrary, If $ACD^{y_{i}}_{(t_{j},t_{k})}<0$, the causal
effect of $t_{k}$ is higher than $t_{j}$ on $y_{i}$, regarding $y_{i}$,
$t_{k}$ will be the privileged sensitive feature value and the group with
$t_{j}$ is likely to be disadvantaged. An $ACD^{y_{i}}_{(t_{j},t_{k})}=0$
implies the training dataset is unbiased regarding corresponding sensitive
feature values, and this is exactly what we expect to achieve.

Many previous works (Pearl, 2009; Chakraborty et al., 2020, 2021; Hort et al.,
2021) demonstrate that pre-processing operations (e.g., reweighting, removing,
synthesizing or mutating) can change the bias degree of a dataset. We utilize
Average Causal Difference (ACD) to formulate this problem. For example,
consider the following mutation.

$Instance^{y_{i}}_{t_{j}}\longrightarrow Instance^{y_{l}}_{t_{k}}$

where the operation means a data instance with sensitive feature value $t_{j}$
and label $y_{i}$ is mutated to the data instance with sensitive feature value
$t_{k}$ and label $y_{l}$. According to the literature (Hort et al., 2021),
this mutation can lead to unknown effects on data bias degree. We use the
change of ACD as a metric to describe the change in data bias. So, the ACD in
the new training set after data instances mutation can be written as:

(8) $ACD^{y_{i}}_{m(t_{j},t_{k})}=ACD^{y_{i}}_{(t_{j},t_{k})}+\Delta_{ACD}$

where $\Delta_{ACD}$ is the change of the original average causal difference
caused by the mutation operation. Causal de-correlation is to make
$ACD^{y_{i}}_{m(t_{j},t_{k})}$ approach to zero via regulating $\Delta_{ACD}$.
To achieve causal de-correlation on the training dataset, we introduce a
parameter $\alpha$ defined as follow:

(9) $\alpha=\frac{n_{mutated}}{n_{totals}}$

where $n_{mutated}$ denotes the number of mutated instances and $n_{totals}$
denotes the totals of the original instances. When we make
$ACD^{y_{i}}_{m(t_{j},t_{k})}$ approach to zero by regulating $\alpha$, we
achieve the causal de-correlation operation on a single sensitive feature $T$.
At this point, different values of a specific sensitive feature have the same
effect on a particular label. The model trained from the causal de-correlated
training set will fit the function $Y=f(C,T_{c})$ where $T_{c}$ is a constant.

Regarding multiple sensitive features protection, we can introduce more
mutation parameters to extend our approach, which would not lead to unbearable
computation and time consumption.

####  3.3.1. Multi-Objective Optimization

According to the introduction above, we can find suitable parameters $\alpha$
(or combinations of $\alpha_{1},\alpha_{2},...,\alpha_{n}$) that achieve
causal de-correlation on the given training dataset. However, causal de-
correlation involves mutating data instances where there is a risk of unbiased
data instances being mutated. As a result, de-correlation may damage the
original dataset and further affect the model prediction performance. To
address this problem, we introduce Multi-Objective Optimisation (MOO) (Censor,
1977). The objective function, which combines fairness and performance
metrics, allows the optimization algorithm to mutate appropriate data
instances to achieve a trade-off between performance and fairness.

In this paper, we propose the following objective function $f(\alpha)$:

(10) $\displaystyle f(\alpha)$
$\displaystyle=f_{1}(\alpha)+f_{2}(\alpha)+f_{3}(\alpha)+f_{4}(\alpha),\alpha\in[0,1]$

where $f_{1}$ denotes the F1 Score metric, $f_{2}$ denotes the accuracy
metric, $f_{3}$ denotes the EOD metric, $f_{4}$ denotes the AOD metric.
Specifically, the F1 score and accuracy are metrics on the performance of the
model, while EOD and AOD are metrics on the fairness of the model (details of
these metrics will be introduced in the following section). It is worth
emphasizing that when necessary one can introduce more metrics or conditions
to the multi-objective function.

####  3.3.2. Particle Swarm Optimization (PSO)

In our previous introduction, we used MOO to find optimal mutation parameters
that balance fairness and model performance. It is worth noting that the
feasible mutation parameters have a vast search space, and enumerating all
possible solutions is computationally infeasible and inefficient. Therefore,
we need to use more efficient search algorithms to find the optimal solution
we need. Genetic Algorithms (GA) (Whitley, 1994), A* Search (Kohn and Shavell,
1974), Simulated Annealing (SA) (Van Laarhoven and Aarts, 1987), and Particle
Swarm Optimization (PSO) (Eberhart and Kennedy, 1995) are all excellent
optimization algorithms. In this paper, we use PSO as the search algorithm for
MOO because it has the characteristics of being simple, efficient, and easy to
implement. PSO, which was invented by Dr Eberhart and Dr Kennedy is a random
searching algorithm based on population cooperation. It simulates the foraging
behavior of bird flocks and adjusts the speed and granularity of the search by
setting parameters such as population size, the number of iterations,
individual factors, and group factors. Upon convergence to the optimal
solution that satisfies the exit criteria, PSO terminates the search process.

##  4\. EVALUATION

In this part, we mainly evaluate the performance and applicability of FITNESS.
We first present the benchmark datasets and evaluation metrics and then give
the detailed experiment results and analyses. All the experiments were
conducted on a Linux Server with environments of Ubuntu 20.04 focal, 256 GB
RAM, 3.7 GHz Intel Xeon Gold 6238, and Python 3.7.

###  4.1. Benchmark Datasets

To evaluate FITNESS, we select four widely-used datasets, including the Adult
Census Income (mis, 1996), Compas (mis, 2021), German Credit (mis, 2019), and
Bank Marketing (Moro, 2012), to conduct the experiment. All the four datasets
are class and sensitive features imbalanced, which makes decision-making
systems trained on them face the problem of fairness. The information of the
four datasets is presented in Table 1 (Chakraborty et al., 2021). Following
previous studies (Chen et al., 2022; Chakraborty et al., 2021), we introduce
the following terminologies to better analyze the effects of the biased data.
Given a label, if it benefits or indicates an advantage for an instance, we
call it a favorable label (e.g., high income). Otherwise, we call it an
unfavorable label (e.g., low income). According to the sensitive feature, data
samples can be divided into two groups. A group is called a privileged group
if the model prefers to give it a favorable label. A group is called an
unprivileged group if the model prefers to give it an unfavorable label. If
the privileged group and unprivileged group are treated equally or similarly
by the model, then the model is deemed to meet the group fairness requirement.

Table 1. Benchmark datasets.

Dataset | Features |  Sensitive Features | Size | Description
---|---|---|---|---
Adult Census Income | 14 | Sex, Race | 45,222 | Individual information from 1994 U.S. census. Goal is predicting income ¿$50,000.
Compas | 28 | Sex, Race | 6,167 | Contains criminal history of defendants. Goal is predicting re-offending in future.
German Credit | 20 | Sex | 1,000 | Personal information about individuals & predicts good or bad credit.
Bank Marketing | 16 | Age | 30,488 | Contains marketing data of a Portuguese bank. Goal is predicting term deposit.

###  4.2. Evaluation Metrics

In this paper, we use four metrics (i.e., precision ($\frac{TP}{TP+FP}$),
recall ($\frac{TP}{TP+FN}$) and F1 Score
($\frac{2*Precision*Recall}{Precision+Recall}$), Accuracy
($\frac{TP+TN}{TP+FP+TN+FN}$)) to evaluate model performance (Chakraborty et
al., 2020, 2021; Chen et al., 2022). In this part, we denote TP as True
Positives, TN as True Negatives, FP as False Negatives, FN as False Negatives,
$P$ as Precision, $R$ as Recall, $Acc$ as Accuracy.

For convenience, we encode the terminologies used in measuring model fairness
and evaluating our method. Supposing a given sensitive feature A, we encode
the privileged group to 1, encode the unprivileged group to 0 as well as
encode the favorable label to 1, unfavorable label to 0. Then according to the
literature (Chen et al., 2022; Chakraborty et al., 2021), the fairness metrics
can be calculated as follow, where $\hat{Y}$ demotes predicted label and $Y$
denotes real label.

  * •

EOD (Equal Opportunity Difference) indicates the TP rate difference between
privileged and unprivileged groups.

(11) $EOD=P[\hat{Y}=1|A=0,Y=1]-P[\hat{Y}=1|A=1,Y=1]$

  * •

AOD (Average Odds Difference) indicates the average of the FP rate difference
and the TP rate between privileged and unprivileged groups.

(12) $\displaystyle AOD=$ $\displaystyle
0.5[(P[\hat{Y}=1|A=0,Y=0]-P[\hat{Y}=1|A=1,Y=0])$
$\displaystyle+(P[\hat{Y}=1|A=0,Y=1]-P[\hat{Y}=1|A=1,Y=1])]$

  * •

SPD (Statistical Parity Difference)indicates the difference of probabilities
of favorable label gained by privileged and unprivileged groups.

(13) $SPD=P[\hat{Y}=1|A=0]-P[\hat{Y}=1|A=1]$

  * •

Fairness and Performance Trade-off Baseline. To measure the effectiveness of
the trade-off of the model fairness and performance, at ESEC/FSE 2021, Hort
_et al._ proposed Faireal (Hort et al., 2021), a trade-off baseline using the
AOD-Accuracy and SPD-Accuracy metrics. To make the baseline more
comprehensive, Chen _et al._ proposed MAAT (Chen et al., 2022), extending the
evaluation to fifteen fairness-performance metrics (combinations of three
fairness metrics and five performance metrics) at ESEC/FSE 2022. The baseline
divides the fairness-performance trade-off effectiveness into five levels,
including ”win-win” (improve both performance and fairness), ”good” (improve
fairness, reduce performance but surpass the Fairea Baseline ), ”inverted”
(improve performance but reduce fairness), ”poor” (improve fairness, reduce
performance but not surpass the Fairea Baseline) and ”lose-lose” (reduce both
fairness and performance). In this work, we adopted the extended Fairea
Baseline from MAAT to evaluate our approach.

###  4.3. Existing Approaches

We widely take the state-of-the-art bias mitigating methods from the ML
community and SE community for comparison. The baselines include pre-
processing, in-processing, and post-processing methods. Where REW (Kamiran and
Calders, 2012), ADV (Zhang et al., 2018), and ROC (Kamiran et al., 2012) come
from ML communities and were integrated into the IBM AIF360 toolkit. Fairway
(Chakraborty et al., 2020), Fair-SMOTE (Chakraborty et al., 2021) and MAAT
(Chen et al., 2022) come from reputable SE venue ESEF/FSE, and xFAIR (Peng et
al., 2021) comes from reputable SE journal TSE.

####  4.3.1. Pre-processing Bias-Mitigating Methods

  * •

REW (Kamiran and Calders, 2012): REW set different weights to varying
sensitive feature types to balance the weighted distribution of groups for
mitigating dataset bias.

  * •

Fairway (Chakraborty et al., 2020): Fairway designs a pre-experiment to
identify the biased data points and remove them to obtain an unbiased training
set for fairer ML models.

  * •

Fair-SMOTE (Biswas and Rajan, 2020): Fair-SMOTE synthesize some new data
points to re-balance the training set class distribution.

  * •

xFAIR (Peng et al., 2021): xFAIR mitigates model bias by replacing the
original sensitive feature vector of the testing set with a synthesized
sensitive feature vector.

####  4.3.2. In/Post-processing Bias-Mitigating Methods

  * •

ADV (Zhang et al., 2018): ADV introduces adversarial learning that hides the
sensitive features and label in the training and validation process and
simultaneously predicts the label and sensitive feature values simultaneously.
If the model predicts the sensitive features value correctly, the model will
be punished.

  * •

MAAT (Chen et al., 2022): MAAT is an ensemble approach training the fairness
and performance models separately. It generates the final decision by
combining the performance and fairness models with varying weights and
achieves a good trade-off between model fairness and performance.

  * •

ROC (Kamiran et al., 2012): ROC’s core idea is reversing the predicated result
when the model gives a favorable label to a privileged group or gives an
unfavorable label to an unprivileged group.

###  4.4. Experiment Settings

In order to comprehensively evaluate FITNESS and ensure the convenience of
reproducing our approach, we introduce our experimental settings in detail.

At first, we choose the four widely used benchmark datasets mentioned above.
These four datasets have been integrated into IBM AIF360 (Bellamy et al.,
2019) and broadly utilized in much bias-mitigating research (Kamiran and
Calders, 2012; Kamiran et al., 2012; Kamishima et al., 2012; Zhang et al.,
2018; Chakraborty et al., 2020, 2021; Chen et al., 2022; Peng et al., 2021),
which guarantees the reliability of our results. In addition, to evaluate the
applicability in different machine learning algorithms, we followed the
previous research (Chakraborty et al., 2020, 2021; Chen et al., 2022), and
conduct experiments in three typical ML algorithms including Logistic
Regression (LR) (Wright, 1995), Support Vector Machine (SVM) (Noble, 2006) and
Random Forest (RF) (Biau and Scornet, 2016). To eliminate the effect of random
confounds on the experimental results, we adopt the default configurations
from the scikit-learn (Pedregosa et al., 2011) library to realize each ML
algorithm. Similarly, we implement the PSO algorithm (population size = 10,
maximum iteration = 5) from the scikit-opt (guofei9987, 2021) library.

As for the implementation of baseline approaches, we call the library of IBM
AIF360 to realize the bias-mitigating methods of REW, ADV and ROC. For the
implementation of Fairway, Fait-SMOTE and MAAT, we use the source codes
released by the paper authors or the codes checked by the first authors
(Chakraborty et al., 2020, 2021; Chen et al., 2022). In each task, the
datasets will split into a 70% training set and a 30% testing set, and each
task will repeat 50 times and pick the means as the final result.

###  4.5. Research Questions

The effectiveness of FITNESS was evaluated via answering the following
research questions.

  * •

RQ1(Effectiveness of improving fairness):  How significant can FITNESS achieve
in improving fairness? We compare FITNESS with existing methods in four
performance metrics and three fairness metrics to demonstrate the bias-
mitigating effectiveness.

  * •

RQ2(Balancing model performance and fairness):  What fairness-performance
trade-off does FITNESS achieve? We compare FITNESS with existing methods by
Fairea Baseline to indicate the ability to achieve an excellent performance-
fairness trade-off.

  * •

RQ3(Multiple sensitive features protection):  Can FITNESS protect multiple
sensitive features simultaneously?In a real-world application, the dataset may
contain more than one sensitive feature need to be protected. This RQ explores
whether FITNESS can protect multiple sensitive features as effectively as a
single sensitive feature.

  * •

RQ4(Impact of multi-objective optimization strategies):  What is the impact of
varying MOO strategies on the effectiveness of FITNESS? In this research
question, we explore the impact of different MOO strategies on FITNESS
effectiveness by regulating the performance-fairness weight ratio.

##  5\. Results

In this section, we present and analyze the experiment results via answering
the research questions.

###  5.1. RQ1: Effectiveness of Improving Fairness

This research question evaluates whether FITNESS can significantly improve
model fairness in various scenarios. We design four experimental setups to
compare the existing state-of-the-art approaches in different datasets and
machine learning algorithms. The measurement consists of four performance
metrics (accuracy, recall, precision, F1 score) and three fairness metrics
(AOD, EOD, SPD). The setups include: (1) Compare with state-of-the-art pre-
processing methods in different datasets and tasks; (2) Compare with state-of-
the-art in/post-processing methods in different datasets and tasks; (3)
Compare with state-of-the-art pre-processing methods in different machine
learning algorithms; (4) Compare with state-of-the-art pre-processing methods
in different machine learning algorithms. Limited by space, we hand out the
result of comparing FITNESS with pre-processing methods and in/post-processing
methods in different datasets and tasks to display more results of our
approach on this paper. Plus, as mentioned in §1, we also release full
experimental results.

Table 2. (RQ1) Results of comparing FITNESS with existing pre-processing
methods in different tasks. ”Default” means without applying any bias-
mitigating operation; ”Adult-Sex” means protecting sex feature in Adult
dataset; ”R” means recall; ”P” means precision; ”Acc” means accuracy; ”F1”
means F1 score and regarding these performance metrics, the higher, the
better. As for fairness metrics AOD, EOD and SPD, the lower, the better. The
darker cells mean the top rank, the lighter cells indicate the better rank,
and the white cells mean worse rank. The value in each cell indicates the mean
value of 50 runs. The same as Table 3 to Table 6.

Alg. | Task | Method | Acc | R | P | F1 | SPD | AOD | EOD
---|---|---|---|---|---|---|---|---|---
Random Forest |  Adult-Sex | Default | 0.84 | 0.77 | 0.79 | 0.78 | 0.19 | 0.08 | 0.08
REW | 0.84 | 0.76 | 0.79 | 0.78 | 0.18 | 0.07 | 0.07
Fairway | 0.84 | 0.68 | 0.85 | 0.72 | 0.09 | 0.03 | 0.05
Fair SMOTE | 0.84 | 0.77 | 0.80 | 0.78 | 0.19 | 0.08 | 0.07
xFAIR | 0.83 | 0.56 | 0.67 | 0.61 | 0.10 | 0.02 | 0.06
FITNESS | 0.84 | 0.73 | 0.81 | 0.76 | 0.12 | 0.02 | 0.00
Adult-Race | Default | 0.84 | 0.77 | 0.79 | 0.78 | 0.10 | 0.05 | 0.04
REW | 0.84 | 0.77 | 0.79 | 0.78 | 0.10 | 0.04 | 0.04
Fairway | 0.85 | 0.76 | 0.82 | 0.79 | 0.08 | 0.03 | 0.04
Fair SMOTE | 0.85 | 0.78 | 0.80 | 0.79 | 0.10 | 0.04 | 0.04
xFAIR | 0.82 | 0.53 | 0.72 | 0.61 | 0.07 | 0.00 | 0.03
FITNESS | 0.84 | 0.77 | 0.79 | 0.78 | 0.08 | 0.02 | 0.01
German-Sex | Default | 0.76 | 0.66 | 0.73 | 0.67 | 0.07 | 0.07 | 0.04
REW | 0.75 | 0.65 | 0.72 | 0.66 | 0.07 | 0.07 | 0.04
Fairway | 0.70 | 0.64 | 0.67 | 0.63 | 0.05 | 0.07 | 0.05
Fair SMOTE | 0.75 | 0.68 | 0.71 | 0.69 | 0.06 | 0.06 | 0.04
xFAIR | 0.70 | 0.92 | 0.73 | 0.81 | 0.08 | 0.05 | 0.04
FITNESS | 0.77 | 0.67 | 0.74 | 0.68 | 0.03 | 0.02 | 0.01

Table 3. (RQ1) Results of comparing FITNESS with existing in/post-processing
methods in different tasks.

Alg. | Task | Method | Acc | R | P | F1 | SPD | AOD | EOD
---|---|---|---|---|---|---|---|---|---
Logistic Regression |  Compas-Sex | Default | 0.67 | 0.66 | 0.67 | 0.66 | 0.27 | 0.25 | 0.20
ADV | 0.66 | 0.65 | 0.66 | 0.65 | 0.28 | 0.26 | 0.20
ROC | 0.66 | 0.66 | 0.66 | 0.66 | 0.04 | 0.05 | 0.04
MAAT | 0.67 | 0.65 | 0.67 | 0.65 | 0.17 | 0.14 | 0.10
FITNESS | 0.67 | 0.66 | 0.66 | 0.66 | 0.07 | 0.05 | 0.04
Compas-Race | Default | 0.67 | 0.66 | 0.67 | 0.66 | 0.18 | 0.16 | 0.11
ADV | 0.66 | 0.65 | 0.66 | 0.65 | 0.13 | 0.11 | 0.09
ROC | 0.66 | 0.66 | 0.66 | 0.66 | 0.03 | 0.04 | 0.04
MAAT | 0.67 | 0.66 | 0.67 | 0.66 | 0.09 | 0.07 | 0.03
FITNESS | 0.67 | 0.66 | 0.67 | 0.66 | 0.05 | 0.04 | 0.02
Bank-Age | Default | 0.90 | 0.68 | 0.79 | 0.72 | 0.09 | 0.08 | 0.13
ADV | 0.90 | 0.72 | 0.78 | 0.74 | 0.11 | 0.07 | 0.13
ROC | 0.89 | 0.60 | 0.81 | 0.62 | 0.05 | 0.06 | 0.10
MAAT | 0.90 | 0.69 | 0.79 | 0.72 | 0.05 | 0.03 | 0.04
FITNESS | 0.90 | 0.68 | 0.80 | 0.72 | 0.04 | 0.04 | 0.06

####  5.1.1. Results of different benchmark tasks.

According to Table 2, we can obtain a general awareness that all FITNESS cells
are located in the ”good rank” area, and most FITNESS models realized the
”best” value of corresponding metrics. In terms of REW and Fair SMOTE,
although they can keep the model performance, their effectiveness in improving
model fairness is not evident. On the contrary, Fairway and xFAIR improved
model fairness but lost too much prediction performance in some tasks (Fairway
in Adult-Sex and German-Sex tasks; xFAIR in Adult-Sex and Adult-Race tasks).
Table 3 displays the result of comparison with in/post-processing methods.
FITNESS keeps excellent effectiveness in improving model fairness among all
datasets and tasks. As for the existing in/post-processing methods, ROC can
mitigate model bias in the Adult dataset, and MAAT can improve model fairness
in the Bank-Age task. ADV can not reduce any discrimination among the three
tasks.

####  5.1.2. Results of different machine learning algorithms.

According to Table 4 and Table 5, all bias-mitigating approaches achieve
similar effectiveness in guaranteeing model prediction performance while they
perform enormously vary in improving model fairness. In the Compas-Sex task,
REW significantly reduces model bias in LR and SVM algorithms but fails in the
RF. Fair SMOTE shows stable and good bias-mitigating effectiveness, but
FITNESS outperforms all existing methods. As for the in/post-processing
methods in Adult-Sex tasks, MAAT can significantly improve model fairness in
the three machine learning algorithms, while FITNESS is still the best.

Table 4. (RQ1) Results of comparing FITNESS with existing pre-processing
methods with different ML algorithms.

Task | Alg. | Method | Acc | R | P | F1 | SPD | AOD | EOD
---|---|---|---|---|---|---|---|---|---
Compas-Sex | LR | Default | 0.67 | 0.66 | 0.67 | 0.66 | 0.27 | 0.25 | 0.20
REW | 0.66 | 0.66 | 0.66 | 0.66 | 0.05 | 0.04 | 0.03
Fairway | 0.66 | 0.65 | 0.66 | 0.64 | 0.20 | 0.17 | 0.12
Fair SMOTE | 0.65 | 0.65 | 0.65 | 0.65 | 0.09 | 0.07 | 0.04
FITNESS | 0.67 | 0.66 | 0.66 | 0.66 | 0.07 | 0.05 | 0.04
RF | Default | 0.65 | 0.64 | 0.64 | 0.64 | 0.17 | 0.14 | 0.12
REW | 0.65 | 0.64 | 0.65 | 0.65 | 0.15 | 0.12 | 0.11
Fairway | 0.67 | 0.66 | 0.68 | 0.66 | 0.14 | 0.11 | 0.08
Fair SMOTE | 0.67 | 0.66 | 0.66 | 0.66 | 0.11 | 0.08 | 0.06
FITNESS | 0.65 | 0.64 | 0.64 | 0.64 | 0.05 | 0.03 | 0.02
SVM | Default | 0.66 | 0.66 | 0.66 | 0.66 | 0.26 | 0.24 | 0.18
REW | 0.66 | 0.65 | 0.66 | 0.65 | 0.06 | 0.05 | 0.03
Fairway | 0.62 | 0.61 | 0.64 | 0.60 | 0.16 | 0.15 | 0.12
Fair SMOTE | 0.65 | 0.64 | 0.64 | 0.64 | 0.09 | 0.06 | 0.04
FITNESS | 0.66 | 0.65 | 0.66 | 0.65 | 0.06 | 0.05 | 0.03

Table 5. (RQ1) Results of comparing FITNESS with existing in/post-processing
methods with different ML algorithms.

Task | Alg. | Method | Acc | R | P | F1 | SPD | AOD | EOD
---|---|---|---|---|---|---|---|---|---
Adult-Sex | LR | Default | 0.85 | 0.76 | 0.80 | 0.78 | 0.19 | 0.10 | 0.12
ADV | 0.83 | 0.72 | 0.80 | 0.75 | 0.03 | 0.14 | 0.27
ROC | 0.79 | 0.79 | 0.73 | 0.75 | 0.05 | 0.11 | 0.16
MAAT | 0.84 | 0.72 | 0.82 | 0.75 | 0.11 | 0.04 | 0.04
FITNESS | 0.84 | 0.75 | 0.80 | 0.77 | 0.14 | 0.03 | 0.01
RF | Default | 0.84 | 0.77 | 0.79 | 0.78 | 0.19 | 0.08 | 0.08
ADV | 0.83 | 0.72 | 0.80 | 0.75 | 0.03 | 0.14 | 0.27
ROC | 0.77 | 0.75 | 0.71 | 0.73 | 0.06 | 0.20 | 0.26
MAAT | 0.84 | 0.74 | 0.81 | 0.77 | 0.12 | 0.04 | 0.04
FITNESS | 0.84 | 0.73 | 0.81 | 0.76 | 0.12 | 0.02 | 0.00
SVM | Default | 0.85 | 0.76 | 0.81 | 0.78 | 0.18 | 0.08 | 0.09
ADV | 0.83 | 0.72 | 0.80 | 0.75 | 0.03 | 0.14 | 0.27
ROC | 0.78 | 0.79 | 0.73 | 0.75 | 0.05 | 0.11 | 0.16
MAAT | 0.84 | 0.72 | 0.82 | 0.75 | 0.09 | 0.05 | 0.09
FITNESS | 0.85 | 0.76 | 0.81 | 0.78 | 0.15 | 0.03 | 0.01

Answer to RQ1: Among all the experimental cases, FITNESS significantly
improves the model fairness without losing too much model performance. The
effectiveness is better than all the compared existing methods. Thus, we can
confidently claim that FITNESS can significantly improve model fairness in
various scenarios.

###  5.2. RQ2: Balancing Performance and Fairness

This research question explores whether FITNESS outperforms all the state-of-
the-art approaches in trade-off model performance and fairness. In RQ1, we
compared FITNESS with existing approaches in the effectiveness of mitigating
bias. According to the results of RQ1, we can have a general awareness that
FITNESS can significantly improve model fairness without losing too much model
performance. However, Table 2-5 can not evaluate how effective the bias-
mitigating approaches are in realizing the performance and fairness trade-off.
Plus, the tables show the means of fifty run results, which may erase many
details of a single run.

To comprehensively evaluate the effectiveness of FITNESS and existing methods
in balancing model performance and fairness, we introduce Faireal Baseline and
compare with 6,300 cases (7 approaches $\times$ 6 tasks $\times$ 3 ML
algorithms $\times$ 50 runs) in 15 metrics (5 performance metrics $\times$ 3
fairness metrics).

In terms of beating the Faireal Baseline, MAAT is the state-of-the-art method,
which realizes 34.59% ”win-win” and 56.69% ”good” trade-off and beats Faireal
Baseline in 91.28% cases. FITNESS outperforms MAAT with 34.90% ”win-win” and
61.82% ”good” trade-off and beats Faireal Baseline in 96.72% cases. In
addition, we adopt the MAAT strategy introducing non-parametric Mann Whitney
U-test (Mann and Whitney, 1947) to analyze the impact on model fairness and
performance by the bias-mitigating approaches. As for each method, we compare
50 original models with 50 models that applied the bias-mitigating method and
calculate the proportions of scenarios where it increases fairness and
decreases performance.

Figure 5 shows the result of the non-parametric Mann Whitney U-test among six
existing methods and FITNESS. FITNESS increases the model fairness among 100%
scenarios (task and algorithms combinations), which beats the state-of-the-art
method MAAT (increases model fairness among 94,44% scenarios). Only 26.67%
models that applied FITNESS decreased model performance, significantly
outperforming the state-of-the-art methods REW (36.67%) and MAAT (38.89%).

A detail that should be noticed is the result from Figure 4 and Figure 5 seems
to be conflict. The Mann Whitney U-test presents FITNESS increased model
fairness among all scenarios, but the Faireal Baseline shows a bit of FITNESS
models located in the ”inverted,” ”poor,” or ”lose-lose” domain, which means
some models that applied FITNESS decrease the fairness. This is because Mann
Whitney U-test considers three fairness metrics (SPD, AOD, EOD) integrally
while Faireal Baseline considers each fairness metric separately. The truth of
the false conflict is that certain fairness metrics of a specific case that
applied FITNESS decreased, but comprehensively considering three fairness
metrics, the model fairness of the case still increased.

Figure 4. (RQ2) Effectiveness level distribution of FITNESS and existing
approaches in benchmark tasks. Figure 5. (RQ2) Proportion of scenarios where
each approach significantly improves fairness and decreases performance.

Answer to RQ2: FITNESS beats the Faireal Baseline in 96.72% of all cases,
which is higher than the best existing technique. Plus, FITNESS improves model
fairness in 100% cases and only decreases model performance in 26.67% cases.
It is FITNESS that improves more cases fairness and decreases fewer cases
performance. Thus, we can answer this research question that FITNESS
outperforms the state-of-the-art techniques in trade-off model fairness and
performance.

###  5.3. RQ3: Multiple Sensitive Features Protection

We notice that a dataset may contain more than one sensitive feature that
needs to be protected. This research question evaluates whether FITNESS can
protect multiple sensitive features simultaneously. In our benchmark datasets,
the Adult and Compas datasets both contain ”sex” and ”race” that need to be
protected. To our best knowledge, Fair-SMOTE, MAAT and xFAIR are state-of-the-
art bias-mitigating approaches that can protect multiple sensitive features at
the same time. Thus, we compare FITNESS with these three approaches to
evaluate the effectiveness of protecting multiple sensitive features.

Table 6 presents the result of multiple sensitive features protection. In both
datasets, FITNESS effectively maintains high model performance and improves
model fairness. Almost all metrics values of the model that applied FITNESS
are located in the top ranks. MAAT realized excellent bias-mitigating
effectiveness in the Adult dataset but performed worse in the Compas dataset.
xFAIR can achieve the best value on specific metrics (e.g., AOD) but the worse
on other metrics (e.g., EOD in Adult-Sex and Compas-Race tasks). In addition,
the prediction performance of the model that applied xFAIR fluctuates in
different datasets, which reveals the instability of xFAIR.

Table 6. (RQ3) Results of comparing FITNESS with existing methods in
protecting multiple sensitive features.

Alg. | Task | Method | Acc | R | P | F1 | SPD | AOD | EOD
---|---|---|---|---|---|---|---|---|---
Random Forest |  Adult-Sex | Default | 0.84 | 0.77 | 0.80 | 0.78 | 0.19 | 0.08 | 0.08
MAAT | 0.85 | 0.74 | 0.81 | 0.77 | 0.13 | 0.03 | 0.02
Fair SMOTE | 0.83 | 0.78 | 0.78 | 0.78 | 0.22 | 0.11 | 0.10
xFAIR | 0.83 | 0.52 | 0.69 | 0.59 | 0.11 | 0.02 | 0.06
FITNESS | 0.84 | 0.73 | 0.81 | 0.76 | 0.12 | 0.03 | 0.03
Adult-Race | Default | 0.84 | 0.77 | 0.80 | 0.78 | 0.10 | 0.05 | 0.04
MAAT | 0.85 | 0.74 | 0.81 | 0.77 | 0.07 | 0.02 | 0.03
Fair SMOTE | 0.83 | 0.78 | 0.78 | 0.78 | 0.13 | 0.07 | 0.08
xFAIR | 0.83 | 0.52 | 0.69 | 0.59 | 0.06 | 0.00 | 0.02
FITNESS | 0.84 | 0.73 | 0.81 | 0.76 | 0.06 | 0.02 | 0.03
Compas-Sex | Default | 0.65 | 0.64 | 0.64 | 0.64 | 0.17 | 0.14 | 0.12
MAAT | 0.65 | 0.64 | 0.65 | 0.64 | 0.13 | 0.10 | 0.08
Fair SMOTE | 0.64 | 0.64 | 0.64 | 0.64 | 0.17 | 0.14 | 0.11
xFAIR | 0.65 | 0.73 | 0.67 | 0.70 | 0.09 | 0.01 | 0.05
FITNESS | 0.65 | 0.64 | 0.64 | 0.64 | 0.07 | 0.04 | 0.04
Compas-Race | Default | 0.65 | 0.64 | 0.64 | 0.64 | 0.14 | 0.12 | 0.09
MAAT | 0.65 | 0.64 | 0.65 | 0.64 | 0.11 | 0.09 | 0.06
Fair SMOTE | 0.64 | 0.64 | 0.64 | 0.64 | 0.12 | 0.10 | 0.07
xFAIR | 0.65 | 0.73 | 0.67 | 0.70 | 0.13 | 0.02 | 0.09
FITNESS | 0.65 | 0.64 | 0.64 | 0.64 | 0.04 | 0.04 | 0.03

Answer to RQ3: Among all the experimental cases, FITNESS significantly
improves the model fairness without losing too much model performance. The
effectiveness and stability are better than all the existing methods. Thus, we
can claim that FITNESS can simultaneously protect multiple sensitive features.

###  5.4. RQ4: Impact of Multi-Objective Optimization Strategies

In this research question, we explore the impact of different performance and
fairness weights on the effectiveness of FITNESS in improving model fairness
and keeping performance. We conduct the experiments with a total of 5,400
cases (6 MOO strategies $\times$ 6 benchmark tasks $\times$ 3 ML algorithms
$\times$ 50 runs).

Figure 6(a) presents the result that with the increasing of fairness weight,
FITNESS can significantly improve the proportion of models whose fairness is
enhanced from 70.37% to 100.00%. In terms of model performance, when
decreasing the performance weight, the proportion of models whose loss
prediction performance increases from 4.44% to 34.44%. In addition, when the
proportion of the model whose fairness improved reaches 100.00%, FITNESS can
not improve the proportion via increased fairness weight. Continuing to
increase the fairness weight can decrease more model prediction performance.
Figure 6(b) shows although a MOO strategy with a much higher performance
weight can make more models located in the ”win-win” domain, a similar weight
for model performance and fairness can achieve better effectiveness in beating
Faireal Baseline.

Figure 7 presents that with the increases of fairness weight in the MOO
strategy, the proportion of models beating the Faireal Baseline can increase
overall, but the proportion will reach the peak near the similar performance-
fairness weight strategy. Continuing to increase fairness can not increase the
proportion anymore. As for each benchmark task, the optimal performance-
fairness weight seems to vary.

(a) Proportion of scenarios where each MOO strategy significantly improves
fairness and decreases performance.

(b) Effectiveness level distribution of FITNESS with each MOO strategy.

Figure 6. (RQ4) Impact of different MOO strategies (weight ratio of
performance and fairness from 30:1 to 0.1:1). Figure 7. (RQ4) Proportion of
FITNESS surpassing Fairea Baseline with different MOO strategies (weight ratio
of performance and fairness from 30:1 to 0.1:1) in each benchmark and overall
task.

Answer to RQ4: The weight of fairness and performance can significantly affect
the effectiveness of balancing model fairness and performance. A higher
fairness weight can realize the better effectiveness in improving fairness,
but the optimal weight balancing model fairness and performance is more likely
near the equal performance-fairness weight. Plus, the optimal weight for each
benchmark task needs further exploration as they typically vary.

##  6\. DISCUSSION

Here we discuss the strength, threat of effectiveness of FITNESS.

###  6.1. Why FITNESS?

Low Performance Impact. FITNESS does not enhance model fairness by sacrificing
model performance as compared with previous work (Kamiran and Calders, 2012;
Kamiran et al., 2012; Chakraborty et al., 2020, 2021; Chen et al., 2022; Zhang
et al., 2018; Peng et al., 2021), FITNESS achieves the best fairness
improvement and minimum performance decreases among all our experiments.

Applicability. As a pre-processing method that reduces training data bias,
FITNESS does not require mitigating bias in every time the model is used,
unlike in-processing and post-processing methods. It also does not impact the
use of the original data in downstream applications. Furthermore, the use of
different ML algorithms does not affect the validity of FITNESS. This makes it
a practical and widely applicable solution for mitigating bias.

Flexibility. Because of multi-objective optimization, FITNESS is more flexible
than other methods. This optimization technique allows developers to adjust
the composition and weights of the optimization function freely, enabling
targeted optimization of the machine learning software. This added flexibility
makes FITNESS applicable in a broader range of scenarios.

###  6.2. Threats to Validity

Evaluation Bias. The selection of benchmark datasets, tasks, evaluation
criteria, and existing methods may threaten the validity of our results. To
mitigate these threats, we follow previous work (Chakraborty et al., 2020,
2021; Chen et al., 2022; Peng et al., 2021) and adopt widely used benchmark
datasets, and multiple metrics. Still, the results may change a bit if new
datasets, algorithms and evaluation metrics are utilized.

Selection of ML algorithms. As a pre-processing approach mitigating bias by
modifying training data, FITNESS can apply to any ML algorithm, including deep
learning (DL) algorithms. However, as DL algorithms are good at processing
complex unstructured (e.g., images) and easily overfit in small tabular data
tasks (Chen et al., 2022), following state-of-the-art studies (Chakraborty et
al., 2020, 2021; Chen et al., 2022), we adopt 3 broadly used classic ML
algorithms in our research. One could replicate our work with DL algorithms in
the future.

Internal Validity. The existing bias-mitigating approaches, including FITNESS,
require full access to the training data to process the sensitive features. If
policies (e.g., General Data Protection Regulation, GDPR (Voigt and Von dem
Bussche, 2017)) of protecting personal privacy prevent developer access to
such information, the validity of FITNESS will be affected. Still, FITNESS can
be applied to most scenarios. In the future, we would like to explore the
bias-mitigating methods that need not access such sensitive information.

External Validity. This work focuses on classification tasks and tabular data,
and it cannot mitigate bias in data mining and image processing as they are
out of the scope of this study.

##  7\. CONCLUSION

This paper proposed FITNESS, a data and model biases mitigation approach that
can significantly boost ML software fairness without decreasing too much
prediction performance. To our knowledge, FITNESS is the first method that
alleviates bias via causality analysis and de-correlation. As a pre-processing
approach, FITNESS can work independently for training discrimination-free
models or be combined with other strategies to obtain unbiased datasets in
various scenarios. In a nutshell, we devise an effective approach to address a
pain point issue in machine learning software. Furthermore, the successful
practice of de-correlation and multi-objective optimization in FITNESS opened
up potential research opportunities in the AI and SE communities, including
balancing ML software robustness, efficiency, privacy and performance.

##  8\. Data Availability

To facilitate future work and replication of our approach, we make the
replication package of FITNESS, including code, datasets, and other
supplementary materials available on the website (Anonymous, [n.d.]).

###### Acknowledgements.

This work was supported by the NATURAL project, which has received funding
from the European Research Council under the European Union’s Horizon 2020
research and innovation program (grant No. 949014). Kui Liu was also supported
by the National Natural Science Foundation of China (Grant No. 62172214), the
Natural Science Foundation of Jiangsu Province, China (Grant No. BK20210279),
and the Open Project Program of the State Key Laboratory of Mathematical
Engineering and Advanced Computing (No. 2020A06).

## References

  * (1)
  * mis (1996) 1996\.  The Adult Census Income dataset.  UCI Machine Learning Repository.  https://archive.ics.uci.edu/ml/datasets/adult.
  * mis (2019) 2019\.  The South German Credit dataset.  UCI Machine Learning Repository.  https://archive.ics.uci.edu/ml/datasets/statlog+(german+credit+data).
  * mis (2021) 2021\.  The Compas dataset.  ProPublica.  https://github.com/propublica/compas-analysis.
  * Aggarwal et al. (2019) Aniya Aggarwal, Pranay Lohia, Seema Nagar, Kuntal Dey, and Diptikalyan Saha. 2019.  Black box fairness testing of machine learning models. In _Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_. 625–635.
  * Anonymous ([n.d.]) Anonymous. [n.d.].  Replication Package, Experiments Results and Supplementary Material of FITNESS — doi.org.  https://doi.org/10.5281/zenodo.7608487.  [Accessed 06-Feb-2023].
  * Assembly et al. (1948) UN General Assembly et al. 1948\.  Universal declaration of human rights.  _UN General Assembly_ 302, 2 (1948), 14–25.
  * Bellamy et al. (2019) Rachel KE Bellamy, Kuntal Dey, Michael Hind, Samuel C Hoffman, Stephanie Houde, Kalapriya Kannan, Pranay Lohia, Jacquelyn Martino, Sameep Mehta, Aleksandra Mojsilović, et al. 2019\.  AI Fairness 360: An extensible toolkit for detecting and mitigating algorithmic bias.  _IBM Journal of Research and Development_ 63, 4/5 (2019), 4–1.
  * Beutel et al. (2019) Alex Beutel, Jilin Chen, Tulsee Doshi, Hai Qian, Li Wei, Yi Wu, Lukasz Heldt, Zhe Zhao, Lichan Hong, Ed H Chi, et al. 2019\.  Fairness in recommendation ranking through pairwise comparisons. In _Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 2212–2220.
  * Biau and Scornet (2016) Gérard Biau and Erwan Scornet. 2016.  A random forest guided tour.  _Test_ 25, 2 (2016), 197–227.
  * Bird et al. (2020) Sarah Bird, Miro Dudík, Richard Edgar, Brandon Horn, Roman Lutz, Vanessa Milan, Mehrnoosh Sameki, Hanna Wallach, and Kathleen Walker. 2020.  Fairlearn: A toolkit for assessing and improving fairness in AI.  _Microsoft, Tech. Rep. MSR-TR-2020-32_ (2020).
  * Biswas and Rajan (2020) Sumon Biswas and Hridesh Rajan. 2020.  Do the machine learning models on a crowd sourced platform exhibit bias? an empirical study on model fairness. In _Proceedings of the 28th ACM joint meeting on European software engineering conference and symposium on the foundations of software engineering_. 642–653.
  * Bunge (2017) Mario Bunge. 2017\.  _Causality and modern science_.  Routledge.
  * Censor (1977) Yair Censor. 1977\.  Pareto optimality in multiobjective problems.  _Applied Mathematics and Optimization_ 4, 1 (1977), 41–59.
  * Chakraborty et al. (2021) Joymallya Chakraborty, Suvodeep Majumder, and Tim Menzies. 2021\.  Bias in machine learning software: why? how? what to do?. In _Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_. 429–440.
  * Chakraborty et al. (2020) Joymallya Chakraborty, Suvodeep Majumder, Zhe Yu, and Tim Menzies. 2020.  Fairway: A way to build fair ml software. In _Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_. 654–665.
  * Chen et al. (2022) Zhenpeng Chen, Jie Zhang, Federica Sarro, and Mark Harman. 2022\.  MAAT: A Novel Ensemble Approach to Addressing Fairness and Performance Bugs for Machine Learning Software. In _The ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE)_.
  * Dastin ([n.d.]) Jeffrey Dastin. [n.d.].  Amazon scraps secret AI recruiting tool that showed bias against women — reuters.com.  https://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G.  [Accessed 01-Feb-2023].
  * Eberhart and Kennedy (1995) Russell Eberhart and James Kennedy. 1995.  Particle swarm optimization. In _Proceedings of the IEEE international conference on neural networks_ , Vol. 4. Citeseer, 1942–1948.
  * Fernández et al. (2018) Alberto Fernández, Salvador Garcia, Francisco Herrera, and Nitesh V Chawla. 2018.  SMOTE for learning from imbalanced data: progress and challenges, marking the 15-year anniversary.  _Journal of artificial intelligence research_ 61 (2018), 863–905.
  * Fu et al. (2020) Zuohui Fu, Yikun Xian, Ruoyuan Gao, Jieyu Zhao, Qiaoying Huang, Yingqiang Ge, Shuyuan Xu, Shijie Geng, Chirag Shah, Yongfeng Zhang, et al. 2020\.  Fairness-aware explainable recommendation over knowledge graphs. In _Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval_. 69–78.
  * Galhotra et al. (2017) Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou. 2017\.  Fairness testing: testing software for discrimination. In _Proceedings of the 2017 11th Joint meeting on foundations of software engineering_. 498–510.
  * Gopnik et al. (2007) Alison Gopnik, Laura Schulz, and Laura Elizabeth Schulz. 2007\.  _Causal learning: Psychology, philosophy, and computation_.  Oxford University Press.
  * guofei9987 (2021) guofei9987. 2021\.  Scikit-opt.  github.  https://scikit-opt.github.io/.
  * Hardt et al. (2016) Moritz Hardt, Eric Price, and Nati Srebro. 2016.  Equality of opportunity in supervised learning.  _Advances in neural information processing systems_ 29 (2016).
  * Heckman (2000) James J Heckman. 2000\.  Causal parameters and policy analysis in economics: A twentieth century retrospective.  _The Quarterly Journal of Economics_ 115, 1 (2000), 45–97.
  * Hettiachchi et al. (2021) Danula Hettiachchi, Mark Sanderson, Jorge Goncalves, Simo Hosio, Gabriella Kazai, Matthew Lease, Mike Schaekermann, and Emine Yilmaz. 2021\.  Investigating and Mitigating Biases in Crowdsourced Data. In _Companion Publication of the 2021 Conference on Computer Supported Cooperative Work and Social Computing_. 331–334.
  * Hort et al. (2021) Max Hort, Jie M Zhang, Federica Sarro, and Mark Harman. 2021\.  Fairea: A model behaviour mutation approach to benchmarking bias mitigation methods. In _Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_. 994–1006.
  * Hube et al. (2019) Christoph Hube, Besnik Fetahu, and Ujwal Gadiraju. 2019\.  Understanding and mitigating worker biases in the crowdsourced collection of subjective judgments. In _Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems_. 1–12.
  * Imbens and Rubin (2015) Guido W Imbens and Donald B Rubin. 2015.  _Causal inference in statistics, social, and biomedical sciences_.  Cambridge University Press.
  * Janai et al. (2020) Joel Janai, Fatma Güney, Aseem Behl, Andreas Geiger, et al. 2020\.  Computer vision for autonomous vehicles: Problems, datasets and state of the art.  _Foundations and Trends® in Computer Graphics and Vision_ 12, 1–3 (2020), 1–308.
  * Jobin et al. (2019) Anna Jobin, Marcello Ienca, and Effy Vayena. 2019\.  The global landscape of AI ethics guidelines.  _Nature Machine Intelligence_ 1, 9 (2019), 389–399.
  * Kamiran and Calders (2012) Faisal Kamiran and Toon Calders. 2012.  Data preprocessing techniques for classification without discrimination.  _Knowledge and information systems_ 33, 1 (2012), 1–33.
  * Kamiran et al. (2012) Faisal Kamiran, Asim Karim, and Xiangliang Zhang. 2012\.  Decision theory for discrimination-aware classification. In _2012 IEEE 12th International Conference on Data Mining_. IEEE, 924–929.
  * Kamishima et al. (2012) Toshihiro Kamishima, Shotaro Akaho, Hideki Asoh, and Jun Sakuma. 2012.  Fairness-aware classifier with prejudice remover regularizer. In _Joint European conference on machine learning and knowledge discovery in databases_. Springer, 35–50.
  * Kohn and Shavell (1974) Meir G Kohn and Steven Shavell. 1974.  The theory of search.  _Journal of Economic Theory_ 9, 2 (1974), 93–123.
  * Kotary et al. (2022) James Kotary, Ferdinando Fioretto, Pascal Van Hentenryck, and Ziwei Zhu. 2022.  End-to-End Learning for Fair Ranking Systems. In _Proceedings of the ACM Web Conference 2022_. 3520–3530.
  * Kuipers and Kassirer (1984) Benjamin Kuipers and Jerome P Kassirer. 1984.  Causal reasoning in medicine: analysis of a protocol.  _Cognitive Science_ 8, 4 (1984), 363–385.
  * Lahoti et al. (2020) Preethi Lahoti, Alex Beutel, Jilin Chen, Kang Lee, Flavien Prost, Nithum Thain, Xuezhi Wang, and Ed Chi. 2020\.  Fairness without demographics through adversarially reweighted learning.  _Advances in neural information processing systems_ 33 (2020), 728–740.
  * LeCun et al. (2015) Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. 2015\.  Deep learning.  _nature_ 521, 7553 (2015), 436–444.
  * Li et al. (2021) Yunqi Li, Hanxiong Chen, Zuohui Fu, Yingqiang Ge, and Yongfeng Zhang. 2021.  User-oriented fairness in recommendation. In _Proceedings of the Web Conference 2021_. 624–632.
  * Madaio et al. (2020) Michael A Madaio, Luke Stark, Jennifer Wortman Vaughan, and Hanna Wallach. 2020.  Co-designing checklists to understand organizational challenges and opportunities around fairness in AI. In _Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems_. 1–14.
  * Mann and Whitney (1947) Henry B Mann and Donald R Whitney. 1947.  On a test of whether one of two random variables is stochastically larger than the other.  _The annals of mathematical statistics_ (1947), 50–60.
  * Mehrabi et al. (2021) Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. 2021\.  A survey on bias and fairness in machine learning.  _ACM Computing Surveys (CSUR)_ 54, 6 (2021), 1–35.
  * Mohammed et al. (2020) Roweida Mohammed, Jumanah Rawashdeh, and Malak Abdullah. 2020\.  Machine learning with oversampling and undersampling techniques: overview study and experimental results. In _2020 11th international conference on information and communication systems (ICICS)_. IEEE, 243–248.
  * Moro (2012) Rita P. & Cortez P. Moro, S. 2012\.  The Bank Marketing dateset.  UCI Machine Learning Repository.  https://archive.ics.uci.edu/ml/datasets/bank+marketing.
  * Noble (2006) William S Noble. 2006\.  What is a support vector machine?  _Nature biotechnology_ 24, 12 (2006), 1565–1567.
  * Pearl (2009) Judea Pearl. 2009\.  _Causality_.  Cambridge university press.
  * Pearl and Mackenzie (2018) Judea Pearl and Dana Mackenzie. 2018.  _The book of why: the new science of cause and effect_.  Basic books.
  * Pedregosa et al. (2011) F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011.  Scikit-learn: Machine Learning in Python.  _Journal of Machine Learning Research_ 12 (2011), 2825–2830.
  * Peng et al. (2021) Kewen Peng, Joymallya Chakraborty, and Tim Menzies. 2021\.  xFAIR: Better Fairness via Model-based Rebalancing of Protected Attributes.  _arXiv preprint arXiv:2110.01109_ (2021).
  * Pleiss et al. (2017) Geoff Pleiss, Manish Raghavan, Felix Wu, Jon Kleinberg, and Kilian Q Weinberger. 2017.  On fairness and calibration.  _Advances in neural information processing systems_ 30 (2017).
  * Prost et al. (2019) Flavien Prost, Hai Qian, Qiuwen Chen, Ed H Chi, Jilin Chen, and Alex Beutel. 2019\.  Toward a better trade-off between performance and fairness with kernel-based distribution matching.  _arXiv preprint arXiv:1910.11779_ (2019).
  * Rastegarpanah et al. (2019) Bashir Rastegarpanah, Krishna P Gummadi, and Mark Crovella. 2019\.  Fighting fire with fire: Using antidote data to improve polarization and fairness of recommender systems. In _Proceedings of the twelfth ACM international conference on web search and data mining_. 231–239.
  * Sambasivan et al. (2021) Nithya Sambasivan, Shivani Kapania, Hannah Highfill, Diana Akrong, Praveen Paritosh, and Lora M Aroyo. 2021\.  “Everyone wants to do the model work, not the data work”: Data Cascades in High-Stakes AI. In _proceedings of the 2021 CHI Conference on Human Factors in Computing Systems_. 1–15.
  * Schwarting et al. (2018) Wilko Schwarting, Javier Alonso-Mora, and Daniela Rus. 2018\.  Planning and decision-making for autonomous vehicles.  _Annual Review of Control, Robotics, and Autonomous Systems_ 1 (2018), 187–210.
  * Sheng and Zhang (2019) Victor S Sheng and Jing Zhang. 2019.  Machine learning with crowdsourcing: A brief summary of the past research and future directions. In _Proceedings of the AAAI conference on artificial intelligence_ , Vol. 33. 9837–9843.
  * Sun et al. (2022) Bing Sun, Jun Sun, Long H Pham, and Jie Shi. 2022\.  Causality-based neural network repair. In _Proceedings of the 44th International Conference on Software Engineering_. 338–349.
  * Tsintzou et al. (2018) Virginia Tsintzou, Evaggelia Pitoura, and Panayiotis Tsaparas. 2018.  Bias disparity in recommendation systems.  _arXiv preprint arXiv:1811.01461_ (2018).
  * Tsioutsiouliklis et al. (2022) Sotiris Tsioutsiouliklis, Evaggelia Pitoura, Konstantinos Semertzidis, and Panayiotis Tsaparas. 2022\.  Link Recommendations for PageRank Fairness. In _Proceedings of the ACM Web Conference 2022_. 3541–3551.
  * Udeshi et al. (2018) Sakshi Udeshi, Pryanshu Arora, and Sudipta Chattopadhyay. 2018\.  Automated directed fairness testing. In _Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering_. 98–108.
  * Van Laarhoven and Aarts (1987) Peter JM Van Laarhoven and Emile HL Aarts. 1987.  Simulated annealing.  In _Simulated annealing: Theory and applications_. Springer, 7–15.
  * Varian (2016) Hal R Varian. 2016\.  Causal inference in economics and marketing.  _Proceedings of the National Academy of Sciences_ 113, 27 (2016), 7310–7315.
  * Voigt and Von dem Bussche (2017) Paul Voigt and Axel Von dem Bussche. 2017.  The eu general data protection regulation (gdpr).  _A Practical Guide, 1st Ed., Cham: Springer International Publishing_ 10, 3152676 (2017), 10–5555.
  * Whitley (1994) Darrell Whitley. 1994\.  A genetic algorithm tutorial.  _Statistics and computing_ 4, 2 (1994), 65–85.
  * Wright (1995) Raymond E Wright. 1995\.  Logistic regression.  (1995).
  * Wu et al. (2021) Chuhan Wu, Fangzhao Wu, Xiting Wang, Yongfeng Huang, and Xing Xie. 2021.  Fairness-aware news recommendation with decomposed adversarial learning. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , Vol. 35. 4462–4469.
  * Zemel et al. (2013) Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. 2013.  Learning fair representations. In _International conference on machine learning_. PMLR, 325–333.
  * Zhang et al. (2018) Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. 2018\.  Mitigating unwanted biases with adversarial learning. In _Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society_. 335–340.
  * Zhang and Harman (2021) Jie M Zhang and Mark Harman. 2021.  ” Ignorance and Prejudice” in Software Fairness. In _2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)_. IEEE, 1436–1447.
  * Zhang et al. (2020) Jie M Zhang, Mark Harman, Lei Ma, and Yang Liu. 2020\.  Machine learning testing: Survey, landscapes and horizons.  _IEEE Transactions on Software Engineering_ (2020).


# Real-time Autonomous Glider Navigation Software

Ruochu Yang, Mengxue Hou, Chad Lembke, Catherine Edwards, and Fumin Zhang  The
research work is supported by ONR grants N00014-19-1-2556 and
N00014-19-1-2266; AFOSR grant FA9550-19-1-0283; NSF grants GCR-1934836,
CNS-2016582 and ITE-2137798; and NOAA grant NA16NOS0120028. Ruochu Yang and
Fumin Zhang are with the School of Electrical and Computer Engineering,
Georgia Institute of Technology, Atlanta, USA. Mengxue Hou is with the College
of Engineering, Purdue university, West Lafayette, USA. Chad Lembke is with
the College of Marine Science, University of South Florida, St.Petersburg,
USA. Catherine Edwards is with the Skidaway Institute of Oceanography,
University of Georgia, Savannah, USA

###### Abstract

Underwater gliders are widely utilized for ocean sampling, surveillance, and
other various oceanic applications. In the context of complex ocean
environments, gliders may yield poor navigation performance due to strong
ocean currents, thus requiring substantial human effort during the manual
piloting process. To enhance navigation accuracy, we developed a real-time
autonomous glider navigation software, named GENIoS_Python, which generates
waypoints based on flow predictions to assist human piloting. The software is
designed to closely check glider status, provide customizable experiment
settings, utilize lightweight computing resources, offer stably communicate
with dockservers, robustly run for extended operation time, and quantitatively
compare flow estimates, which add to its value as an autonomous tool for
underwater glider navigation.

###### Index Terms:

autonomous underwater glider navigation, ocean flow prediction

##  I Introduction

Underwater gliders have been widely used in ocean fields for ocean sampling,
surveillance, and many other applications [1, 2, 3, 4, 5]. Usually, the glider
is navigated through waypoints manually generated by glider pilots.
Nonetheless, manual navigation performance might not be optimal, as the manual
waypoints fail to consider the strong and erratic ocean flow. Worse, the
glider can drift to an unexpected area where localization and rescue are
extremely tough. Additionally, manual glider navigation requires tremendous
human labor. In order to circumvent trajectory deviation or abort issues, the
glider needs to be closely monitored during the whole mission. Considering the
long duration of mission, up to ten glider pilots may take shifts each day,
including at midnight. Therefore, there is a pressing need for the development
of a glider navigation software that can generate real-time waypoints based on
flow predictions to improve navigation accuracy. The software should also
achieve autonomous functionality to significantly reduce the heavy human labor
of manual piloting.

Generally, underwater gliders use the global positioning system (GPS) to
localize themselves on the ocean surface [6]. However, considering that GPS
signals can not transmit in the deep ocean, the next waypoint of glider can
only be decided at surfacing events with GPS update, which makes it hard to
perform underwater glider navigation. Controlled by buoyancy and mass, low-
speed gliders are strongly affected by ocean currents, so this type of
navigation may lead to huge trajectory deviation as the mission is going on.
Some gliders try to estimate the flow between the last and current surfacing
events and utilize it to promote navigation accuracy [7]. This navigation
method based on glider-derived flow estimate may work well in a calm water
environment, but in the deep ocean with intense temporal and spatial flow
changes, the glider-derived flow estimate may differ from the actual flow a
lot, causing poor underwater navigation. So far, it is obvious that one main
limitation of glider navigation is insufficient knowledge of the ocean
environment, especially ocean currents. Recently in the robotics literature,
there has been active research on navigation of underwater gliders based on
flow predictions [8, 9, 10, 11, 12]. Some of them incorporated flow data from
ocean models to increase prediction accuracy [13, 14, 15, 16, 17, 18, 19, 20].
However, none of the authors have practically implemented a navigation system
for real underwater gliders or experimentally validated their navigation
algorithms in real-world scenarios.

The main contribution of this paper is to develop a real-time autonomous
glider navigation software based on the Glider-Environment Network Information
System (GENIoS) [21]. The software can generate waypoints in real time based
on flow predictions to better navigate gliders in the field of highly variable
ocean flow. The operation is meant to be autonomous in order to relieve a part
of heavy labor of glider pilots. Additionally, the software possesses the
following features

  * •

continuous monitoring of glider status.

  * •

customizable settings of gliders and deployments.

  * •

lightweight requirements of computing resources.

  * •

stable communication with dockservers.

  * •

robust operation for extended time.

  * •

quantitative comparison of flow predictions.

Herein, the software is officially named as GENIoS_Python. Please check the
project website https://sites.google.com/view/geniospython. We will release
our code soon.

##  II System Design

The prototype of GENIoS_Python is GCCS (Glider Coordinated Control System)
[2], which generates waypoints for a fleet of gliders so that gliders can
sample optimally distributed measurements, improving collective survey
performance. The navigation performance of GCCS was verified in the Adaptive
Sampling and Prediction (ASAP) project[22] in Monterey Bay, California (2004 -
2006). To deal with highly variable flow, we extended GCCS into GENIoS [21] by
incorporating real-time ocean flow data and glider surfacing data, which
supported the Long Bay missions in South Carolina (2012 - 2013). Building off
the success of GENIoS, here comes the newest software GENIoS_Python. As shown
in Fig. 1, GENIoS_Python consists of four main modules: glider simulator
(gsim), glider planner (gplan), environmental input manager, and dockserver
handler.

Figure 1: System design of GENIoS_Python

The gsim module supports two running modes: simulated and remote. In the
simulated mode, the module simulates the glider’s underwater trajectory and
surfacing positions according to the glider’s 3D kinematics model. Rather than
wait a long time (e.g., four hours) for gliders to surface in the real-time
deployment, the surfacing interval in the simulated mode can be adjusted as
short as possible (e.g., one minute). Therefore, it is effective to verify any
underwater navigation algorithm, which may not be practical for validation in
real life, with customized glider and deployment settings in an extremely fast
manner. In the remote mode, the module simply obtains the glider surfacing
positions through the dockserver handler module in real time.

The gplan module is composed of two classes: path tracking and path planning.
The path tracking class provides two tracking algorithms: virtual mooring and
line control. The virtual mooring algorithm keeps the glider moving towards
one single target position, while the line control algorithm keeps the glider
moving back and forth between multiple target positions. The core of the
tracking algorithms is a flow-cancelling controller, which computes the
desired glider heading to cancel out the predicted flow at the current glider
location. Then, by assuming the glider as a Newtonian particle [2] and
integrating its motion with the heading control, the gplan module can predict
the glider trajectory in the next 12 or 24 hours under the influence of flow.
Based on the predicted trajectory, the waypoints are computed for the next 12
or 24 hours as well. By following these waypoints, the glider can track the
expected trajectory. The path planning class offers a modified $A^{\ast}$
algorithm [23] that considers the entire flow field, as opposed to only one
single location in the path tracking class. The algorithm plans an optimal
path for the glider to avoid the strong flow field in advance, thus consuming
much more time or energy. The planned path can be viewed as a high-level path
for the path tracking algorithm to follow.

The environmental input manager module generates flow predictions for path
tracking class to compute waypoints or for path planning class to compute the
optimal path. The module supports two modes of predicting flow: simulated and
remote. In the simulated mode, the module incorporates the ADCIRC ocean flow
model to enable the simulation of glider movement in any flow field. In the
remote mode, the module utilizes predictive flow data from the oceanic data
model Advanced Circulation (ADCIRC) [14] in real time. A hybrid model
GliADCIRC, based on the ADCIRC model, is developed to produce more accurate
flow predictions by combining glider-estimated flow with ADCIRC predictive
flow.

The dockserver handler module interfaces with an onshore computer (dockserver)
to obtain the latest glider surfacing data and send waypoints to gliders in
real time. When the glider surfaces, it communicates with the dockserver
through the SFMC (Slocum Fleet Mission Control) terminal that records the
glider-transmitted data as log files. The module continuously monitors the log
files to check the latest surfacing event and grab the navigation information
for the gplan module to compute waypoints. Relied on fast performance of
Python SSH and SFTP packages, the module can check the SFMC terminal every 10
seconds, thus capturing every single surfacing event, even though the glider
surfaces for an extremely short time or uses mixed surfacing modes. Then, the
module sends the computed waypoints to the dockserver. It takes only 30
seconds out of 10-15 minute surfacing interval to accomplish the entire
process of checking surfacing information and transmitting waypoints.
Moreover, the module utilizes Linux grep packages to parse glider log files
and handle glider data without human interaction, enabling autonomous glider
status check.

##  III Experiments

The performance of GENIoS_Python was validated in both simulated and real
experiments. All the experiments were implemented in a Lenovo ThinkCentre
Desktop with Ubuntu 16.04 LTS, Intel Core i7-6700 CPU @ 3.40GHz × 8, 32 GB
Memory, and Intel HD Graphics 530 (Skylake GT2).

###  III-A Simulated Experiments

The simulated experiments were implemented in the simulated mode of gsim
module. The simulated glider setting was adjusted from the Slocum G3 glider
Franklin of Skidaway Institute of Oceanography, University of Georgia. The
deployment was set in Gray’s Reef near Savannah, Georgia, United States. The
ocean flow model was set as ADCIRC. We tested two tracking algorithms of the
gplan module: virtual mooring and line control.

####  III-A1 Virtual Mooring

In the virtual mooring mode, both the starting point and the target point were
pre-set for the glider Franklin. As seen from the video
https://www.youtube.com/watch?v=5KFjQUZV7rU, GENIoS_Python successfully
navigated the glider Franklin to move directly towards the red target point.

####  III-A2 Line Control

In the line control mode, two target points were given and the starting point
was set as one of them. As seen from the video
https://www.youtube.com/watch?v=ObHONQhCt04, GENIoS_Python successfully
navigated the glider to move back and forth between two red target points.

###  III-B Real Experiment

The real experiment was carried out on March in the remote mode of gsim
module. The Slocum G1 glider USF-SAM was provided by the glider team of
University of South Florida. The deployment field was in Gray’s Reef near
Savannah, Georgia, United States. The ocean flow model was set as GliADCIRC.
The tracking algorithm was set as virtual mooring. GENIoS_Python was set to
check the glider status (header) every ten seconds. During the whole
experiment, GENIoS_Python successfully detected every surfacing event and
transmitted the waypoints (goto file) to the dockserver. The experiment was
divided into two journeys with two different target points, respectively.

####  III-B1 Journey 1

The first journey happened from March 2nd, 2023 to March 4th, 2023 UTC. The
target point was 3118.0N, -8008.0E. As shown in Fig. 2, the real-time
trajectory of the glider USF-SAM was directly approaching the target point
under the navigation of GENIoS_Python. In terms of the full experimental
result, it can be seen from the video
https://www.youtube.com/watch?v=AcpguPaL5Ik that GENIoS_Python successfully
navigated the glider USF-SAM to achieve the red target point without twists
and turns, saving considerable glider power and mission time.

Figure 2: Real-time trajectory of glider USF-SAM in SFMC terminal. The red
lines represent the depth-averaged ocean current. The yellow dots represent
the real-time glider positions. The purple star represents the target point.

####  III-B2 Journey 2

The second journey happened from March 4th , 2023 to March 6th, 2023 UTC. The
target point was 3110.0N, -8000.00E. It is obvious from Fig. 3 that the glider
USF-SAM was approaching the target point under the navigation of
GENIoS_Python. In terms of the full experimental result, it can be seen from
the video https://www.youtube.com/watch?v=R75oJJ1-U7Q that GENIoS_Python
successfully navigated the glider USF-SAM to move towards the red target point
almost in a straight line.

Figure 3: Real-time trajectory of glider USF-SAM in SFMC terminal. The red
lines represent the depth-averaged ocean current. The yellow dots represent
the real-time glider positions. The purple star represents the target point.

In order to assist glider pilots with flow analysis, GENIoS_Python provides
the real-time comparison of glider-estimated flow, ADCIRC flow predictions and
GliADCIRC flow predictions. If both the glider-estimated flow and flow
predictions are larger than $0.3m/s$, it is most likely that the glider has
stepped into the strong flow field where the flow speed may exceed the maximum
glider speed, causing significant trajectory deviation. The flow comparison of
the whole USF-SAM deployment was shown in Fig. 4. For better visualization,
the flow is divided into alongshore component and crossshore component.
Considering that the gplan module relies on the GliADCIRC model to compute
waypoints for the next 12 or 24 hours in real life, the flow compassion
function offers GliADCIRC flow predictions for the upcoming 12 hours following
the end of deployment (green line behind the black dashed line of timestamp).

Figure 4: Comparison of glider-estimated flow, ADCIRC flow predictions and
GliADCIRC flow predictions. The red line represents the glider-estimated flow.
The blue line represents ADCIRC flow predictions. The green line represents
GliADCIRC flow predictions. The green line behind the black dashed line of
timestamp represents GliADCIRC flow predictions for the upcoming 12 hours
following the end of deployment.

##  IV Conclusion

In summary, underwater gliders play an important role in diverse oceanic
applications. Nevertheless, their navigation performance can be hindered by
strong ocean currents, leading to unexpected movement or severe abort. To
address this issue, the GENIoS_Python software has been developed as a real-
time autonomous glider navigation system. By employing flow predictions to
generate waypoints, the software improves navigation accuracy and relieves
heavy intervention of glider pilots. This software displays multiple
advantageous features, including close monitoring of glider status,
customizable experiment settings, light computing requirements, stable
communication with dockservers, extended operation time, and quantitative flow
estimate comparisons. Future work will focus on data visualization to better
interact with human pilots like plotting offset between the expected surfacing
position and the actual one in real time. We will also pay attention to
incorporating more ocean flow models such as HFRadar and WERA.

## References

  * [1] F. Zhang, D. M. Fratantoni, D. A. Paley, J. M. Lund, and N. E. Leonard, “Control of coordinated patterns for ocean sampling,” _International Journal of Control_ , vol. 80, no. 7, pp. 1186–1199, 2007. [Online]. Available: https://doi.org/10.1080/00207170701222947
  * [2] D. A. Paley, F. Zhang, and N. E. Leonard, “Cooperative control for ocean sampling: The glider coordinated control system,” _IEEE Transactions on Control Systems Technology_ , vol. 16, no. 4, pp. 735–744, 2008.
  * [3] M. Hou, S. Cho, H. Zhou, C. R. Edwards, and F. Zhang, “Bounded cost path planning for underwater vehicles assisted by a time-invariant partitioned flow field model,” _Frontiers in Robotics and AI_ , vol. 8, 2021.
  * [4] J. Nicholson and A. Healey, “The present state of autonomous underwater vehicle (auv) applications and technologies,” _Marine Technology Society Journal_ , vol. 42, no. 1, pp. 44–51, 2008.
  * [5] O. Schofield, J. Kohut, D. Aragon, L. Creed, J. Graver, C. Haldeman, J. Kerfoot, H. Roarty, C. Jones, D. Webb _et al._ , “Slocum gliders: Robust and ready,” _Journal of Field Robotics_ , vol. 24, no. 6, pp. 473–485, 2007.
  * [6] T. H. D.T. Meldrum, “Gps in autonomous underwater vehicles,” _IET Conference Proceedings_ , pp. 11–17(6), January 1994.
  * [7] L. Merckelbach, R. Briggs, D. Smeed, and G. Griffiths, “Current measurements from autonomous underwater gliders,” in _Current Measurement Technology, 2008. IEEE/OES 9th Working Conference on Current Measurement Technology_. Institute of Electrical and Electronics Engineers, March 2008, pp. 61–67.
  * [8] J. Witt and M. D. Dunbabin, “Go with the flow : optimal auv path planning in coastal environments,” in _IEEE International Conference on Robotics and Automation_ , 2009.
  * [9] M. Soulignac, “Feasible and optimal path planning in strong current fields,” _IEEE Transactions on Robotics_ , vol. 27, no. 1, pp. 89–98, 2010.
  * [10] E. Fernández Perdomo, J. Cabrera, D. Hernández-Sosa, J. Isern, A. Domínguez Brito, A. Redondo, J. Coca, A. Ramos, E. Alvarez Fanjul, and M. Garcia, “Path planning for gliders using regional ocean models: Application of pinzón path planner with the eseoat model and the ru27 trans-atlantic flight data,” 06 2010, pp. 1 – 10.
  * [11] A. A. Pereira, J. Binney, G. A. Hollinger, and G. S. Sukhatme, “Risk-aware path planning for autonomous underwater vehicles using predictive ocean models,” _Journal of Field Robotics_ , vol. 30, no. 5, pp. 741–762, 2013\.
  * [12] K. Szwaykowska and F. Zhang, “Trend and bounds for error growth in controlled lagrangian particle tracking,” _IEEE Journal of Oceanic Engineering_ , vol. 39, no. 1, pp. 10–25, 2013.
  * [13] G. Reikard and W. E. Rogers, “Forecasting ocean waves: Comparing a physics-based model with statistical models,” _Coastal Engineering_ , vol. 58, no. 5, pp. 409–416, 2011.
  * [14] C. Blain, J. Westerink, R. Luettich, Jr, and N. Scheffner, “Adcirc: An advanced three-dimensional circulation model for shelves, coasts, and estuaries. report 4. hurricane storm surge modeling using large domains,” p. 68, 08 1994.
  * [15] R. Bleck, “An oceanic general circulation model framed in hybrid isopycnic-cartesian coordinates,” _Ocean modelling_ , vol. 4, no. 1, pp. 55–88, 2002.
  * [16] A. F. Shchepetkin and J. C. McWilliams, “The regional oceanic modeling system (roms): a split-explicit, free-surface, topography-following-coordinate oceanic model,” _Ocean modelling_ , vol. 9, no. 4, pp. 347–404, 2005.
  * [17] D. B. Haidvogel, H. Arango, W. P. Budgell, B. D. Cornuelle, E. Curchitser, E. Di Lorenzo, K. Fennel, W. R. Geyer, A. J. Hermann, L. Lanerolle _et al._ , “Ocean forecasting in terrain-following coordinates: Formulation and skill assessment of the regional ocean modeling system,” _Journal of computational physics_ , vol. 227, no. 7, pp. 3595–3624, 2008\.
  * [18] S. Frolov, J. Paduan, M. Cook, and J. Bellingham, “Improved statistical prediction of surface currents based on historic hf-radar observations,” _Ocean Dynamics_ , vol. 62, no. 7, pp. 1111–1122, 2012.
  * [19] E. Kalnay, _Atmospheric modeling, data assimilation and predictability_. Cambridge university press, 2003.
  * [20] P. F. Lermusiaux, “Uncertainty estimation and prediction for interdisciplinary ocean dynamics,” _Journal of Computational Physics_ , vol. 217, no. 1, pp. 176–199, 2006.
  * [21] D. Chang, F. Zhang, and C. R. Edwards, “Real-time guidance of underwater gliders assisted by predictive ocean models,” _Journal of Atmospheric and Oceanic Technology_ , vol. 32, no. 3, pp. 562–578, 2015.
  * [22] N. E. Leonard, D. A. Paley, R. E. Davis, D. M. Fratantoni, F. Lekien, and F. Zhang, “Coordinated control of an underwater glider fleet in an adaptive ocean sampling field experiment in monterey bay,” _Journal of Field Robotics_ , vol. 27, no. 6, pp. 718–740, 2010.
  * [23] P. E. Hart, N. J. Nilsson, and B. Raphael, “A formal basis for the heuristic determination of minimum cost paths,” _IEEE transactions on Systems Science and Cybernetics_ , vol. 4, no. 2, pp. 100–107, 1968.