# Local Data Debiasing for Fairness Based on Generative Adversarial Training
## 2 Preliminaries
### Fairness Metrics  
First, we would like to point out that there are many different definitions of fairness existing in the literature [7; 14; 15; 16; 17; 18] and that the choice of the appropriate fairness metric is highly dependent on the context considered.  
For instance, one natural approach for defining fairness is the concept of _individual fairness_[14], which states that individuals that are similar except for the sensitive attribute should be treated similarly (i.e., receive similar decisions). This notion relates to the legal concept of _disparate treatment_[19], which occurs if the decision process was made based on sensitive attributes. This definition is relevant when discrimination is caused by the decision process. Therefore, it cannot be used in the situation in which the objective is to directly redress biases in the data.  
In contrast to individual fairness, _group fairness_ relies on statistic of outcomes of the subgroups indexed by \(S\) and can be quantified in several ways, such as _demographic parity_[20] and _equalized odds_[21]. More precisely, the demographic parity corresponds to the absolute difference of rates of positive outcomes in the sensitive and privileged groups (for which, respectively, \(S=0\) and \(S=1\)).:  
\[DemoParity=|P(\hat{Y}|S=0)-P(\hat{Y}|S=1)|, \tag{1}\]  
while _equalized odds_ is the absolute difference of odds in each subgroup:  
\[EqOddGap_{y}= |Pr(\hat{Y}=1|S=0,Y=y)-Pr(\hat{Y}=1|S=1,Y=y)|, \tag{2}\]  
in which \(\hat{Y}\) refers to the prediction made on the decision attribute made by a trained classifier. Compared to the demographic parity, the equalized odds is more suitable when the base rates in both groups differ (\(P(Y=1|S=0)\
eq P(Y=1|S=1)\)). Other fairness metrics such as the calibration are also appropriate in the situation of different base rates. However, we will limit ourselves to equalized odds in this paper. Note that these definitionsare agnostic to the cause of the discrimination and are based solely on the assumption that statistics of outcomes should be similar between subgroups.  
In our work, we follow a different line of research by defining fairness in terms of _the inability to infer \(S\) from other attributes_([PERSON] and [PERSON], 2018; [PERSON] et al., 2018). This approach stems from the observation that it is impossible to discriminate based on the sensitive attribute if the latter is unknown and cannot be predicted from other attributes. Thus, our approach aims at sanitizing the data in such a way it should not be possible to infer the sensitive attribute from the sanitized data.  
The inability to infer the attribute \(S\) can be measured by the accuracy of a predictor _Adv_ trained to recover the hidden \(S\) (\(sAcc\)), as well as the _balanced error rate (BER)_ introduced in ([PERSON] and [PERSON], 2018) as the basis for the \(\epsilon\)_-fairness_:  
\[BER(Adv(A,Y),s)=\frac{1}{2}(\sum_{s=0}^{1}P(Adv(A,Y)\
eq s|S=s)). \tag{3}\]  
The BER captures the predictability of both classes and a value of \(\frac{1}{2}\) can be considered optimal for protecting against inference in the sense that it means that the inferences made by the predictor are not better than a random guess. A dataset \(D\), (\(A\), \(A\), Y) is said to be \(\epsilon-\)fair if for any classification algorithm \(f:A\to S\), \(BER(f(A),S)>\epsilon\). The BER is more relevant than the accuracy of a classifier \(sAcc\) at predicting the sensitive attribute for datasets with imbalanced proportions of sensitive and privileged groups. Thus, a successful sanitization would lead to a significant drop of the accuracy while raising the BER close to its optimal value of 0.5.