# Local Data Debiasing for Fairness Based on Generative Adversarial Training
## 4 Adversarial Training for Data Debiasing
### Generative Adversarial Network Sanitization  
_High-level overview._ Formally, given a dataset \(D\), the objective of GANSan is to learn a function \(S_{an}\), called the _sanitizer_ that perturbs individual profiles of the dataset \(D\), such that a distance measure called the fidelity \(fid\) (in our case we will use the \(L_{2}\) norm) between \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Approach** & **Local San.** & **Data Pub.** & **Complex Corr.** & **Simple P.** & **Meningful P.** & **Dt. Compr.** & **Data Type** \\ \hline LFR [26] & ✓ & ✓ & ✓ & ✕ & ✕ & ✓ & Tabular \\ DIRM [22] & ✓ & ✓ & ✕ & ✓ & ✓ & ✓ & Tabular \\ GANSan & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Tabular \\ VFAE [25] & ✓ & ✓ & ✓ & ✕ & ✕ & ✕ & Tabular \\ FVAE [32] & ✓ & ✓ & ✓ & ✓ & ✕ & ✕ & Tabular/Images \\ ALFR [24] & ✓ & ✓ & ✓ & ✓ & ✕ & ✕ & Tabular/Images \\ COPP [8] & ✓ & ✓ & ✓ & - & ✓ & Location \\ MUBAL [36] & - & - & ✓ & ✓ & ✓ & - & Tabular \\ FairnessGAN [38] & ✕ & ✓ & ✓ & - & ✓ & Images \\ FairGan+ [40] & ✕ & ✓ & ✓ & ✕ & ✕ & ✓ & Tabular \\ OPDP [41] & ✓ & ✓ & ✓ & ✕ & ✕ & ✓ & Tabular \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparative table of preprocessing methods for fairness enhancement in which _Data Pub._ refers to the ability to published the transformed dataset while _Local San._ concerns the ability to transform a profile on-the-fly. In addition, _Simple P._ indicates the number of hyper-parameters (the lower the better), _Manningful P._ refer to the ease of comprehension and usage of the hyper-parameters to achieve a chosen objective, _Dt. Compr._ refers to whether or not the input data space is preserved. the original and the sanitized datasets (\(\bar{D}=S_{an}(D)=\{\bar{A},\bar{Y}\}\)), is minimal, while ensuring that \(S\) cannot be recovered from \(\bar{D}\). Our approach differs from classical conditional GAN [48] by the fact that the objective of our discriminator is to reconstruct the hidden sensitive attribute from the generator output, whereas the discriminator in classical conditional GAN has to discriminate between the generator output and samples from the true distribution. Figure 1 presents the high-level overview of the training procedure, while Algorithm 1 describes it in detail. The first step corresponds to the training of the sanitizer \(S_{an}\) (Algorithm 1, Lines 7-17). The sanitizer can be seen as a generator similarly to standard GAN but with a different purpose. In a nutshell, it learns the empirical distribution of the sensitive attribute and generates a new distribution that concurrently respects two objectives: (1) finding a perturbation that will fool the discriminator in predicting \(S\) while (2) minimizing the damage introduced by the sanitization. More precisely, the sanitizer takes as input the original dataset \(D\) (including \(S\) and Y) plus some noise \(P_{z}\). The noise introduced is used to prevent the over-specialization of the sanitizer on the training set while making the reverse mapping of sanitized profiles to their original versions more difficult as the mapping will be probabilistic. As a result, even if the sanitizer is applied twice on the same profile, it can produce two different modified profiles. The second step consists in training the discriminator \(D_{isc}\) for predicting the sensitive attribute from the data produced by the sanitizer \(S_{an}\)(Algorithm 1, Lines 18-24). The rationale of our approach is that the better the discriminator is at predicting the sensitive attribute \(S\), the worse the sanitizer is at hiding it and thus the higher the potential risk of discrimination. These two steps are run iteratively until convergence of the training. Figure 1: Overview of the framework of GANSan. The objective of the discriminator is to predict \(S\) from the output of the sanitizer \(D\). The two objective functions that the framework aims at minimizing are, respectively, the discriminator and sanitizer losses, namely \(J^{D_{isc}}\) and \(J^{S_{an}}\).