Learning Flexible and Fair Data Representations

In this paper, we consider the problem of learning fair data representations that can be used for some downstream utility task in the vendor-user setting. We propose splitting the latent space between sensitive and non-sensitive latent variables where maximum mean discrepancy (MMD) is used to induce statistical independence between sensitive and non-sensitive latent variables. The non-sensitive latent representations can then be used for utility task by the user and achieve group and sub-group fairness with respect to multiple sensitive attributes. We perform extensive experiments and compare the proposed method against various representation learning methods proposed earlier in the literature. Our quantitative results and visualizations show that the proposed method produces representations that are able to achieve better or comparable performance at the utility task while simultaneously achieving sub-group and group fairness.

where the vendor is responsible for giving fair data represen-23 tations to the user. The fair representations can be used by the 24 user to perform some downstream utility task. Therefore, the 25 vendor can be optimized to yield fair representations based 26 on some fairness objective and user can be independently 27 optimized to maximize the performance at the utility task. 28 In this work, we study the problem of learning repre- 29 sentations of data that can be used for downstream utility 30 tasks. To achieve this, we use the variational inference set-31 ting where the latent space is divided into two subspaces: 32 sensitive and non-sensitive latents. To optimize for fairness 33 The associate editor coordinating the review of this manuscript and approving it for publication was Li He . objective, we induce statistical independence between sen-34 sitive and non-sensitive latents by utilizing the maximum 35 mean discrepancy (MMD). This way the information about 36 sensitive attributes is limited to sensitive latents only and 37 the non-sensitive latents are subsequently used for down-38 stream utility tasks by the user in our vendor-user approach. 39 We perform extensive empirical study and compare the pro-40 posed approach to various representation learning methods 41 proposed earlier in the literature. We conduct extensive exper-42 iments on real-world image. Our results show that fair data 43 representations learned using the proposed method matches 44 or exceeds the fairness-accuracy trade-off for groups as well 45 as subgroups against the studied baseline works. In fair classification, we consider labeled data examples of 49 the form x, a, t ∼ p data where x ∈ X is the data sample, 50 a ∈ A are the sensitive attributes and t ∈ Y is the data label 51 that we wish to predict in the utility task. Our goal is to learn 52 a classifier that is predictive of t and satisfies some fairness 53 criteria with respect to the sensitive attribute a, i.e. we want 54 predictions that are accurate but not biased in favor of one 55 group or the other. Many where X ∼ p. The MMD is given as In the form of kernel function, we can write (2) 108 This means that we can compute MMD between distri-109 butions p and q merely with access to samples X ∼ p and 110 Y ∼ q. For the empirical calculation of MMD given in (2), 111 for x i ∈ X ∀i = i, 1, . . . , m and y i ∈ Y ∀i = i, 1, . . . , m, 112 we use the following formula: Gaussian kernels have the property that MMD(p, q) = 0 iff 117 p = q. In our experiments, we use a Gaussian kernel called 118 Radial Basis Function (RBF). For

122
The interest in the field of fairness in machine learning has 123 been increasing in the recent years.

199
In this section, we present the details of our proposed method.

200
The proposed method is conceptually presented in Figure 1. b ∈ R s . Both encoder and decoder are parameterized as 207 neural networks with parameters φ and θ , respectively. The 208 ELBO that we maximize that learn the parameters φ and θ is 209 given as, The encoder outputs the parameters of the joint distribu-213 tion of variables z and b, i.e. q(z, b). We want to ensure 214 that the non-sensitive latent variable z is independent of any 215 information related to the sensitive attributes a while useful 216 enough to be used for downstream utility task. To achieve 217 this, we induce the statistical independence between the ran-218 dom variables z and b by minimizing the maximum mean 219 discrepancy (MMD) between the joint distribution q(z, b) and 220 the product of their marginals, i.e. q(z) j q(b j ). Note that we 221 use the product of marginals to represent the distribution of 222 Using q(b) as given in (5) ensures that we can chose 225 which sensitive attributes we care about at the test time. For 226 example, we can achieve fairness with respect to a subset of 227 sensitive attributes a i ∧ a j ∧ a k simply by removing the corre-228 sponding sensitive latents from the latent representation and 229 using the representation The non-sensitive or fair latent representation z for corre-232 sponding input x is used to to predict the target variable t. This 233 is achieved by maximizing the probability p ζ (t|z) parameter-234 ized by parameters ζ . More details about the implementation 235 are presented in Section V.

236
To make the sensitive latent b informative about sensitive 237 attributes a, we maximize the likelihood of a given b, i.e. 238 p λ (a|b) with parameters λ. 239 The final objective that we maximize is given as In this section, we discuss the implementation details of 246 our proposed method to learn fair data representations. The 247 representations are learned using a variational autoencoder 248 (VAE) [3], as shown in Figure 1, where we use convolu-249 tional neural networks to implement both the encoder and the 250 decoder. Similar to [12], we assume a variaitonal posterior 251 that factorizes across z and b, i.e.
The encoder outputs the parameters for the vari-254 ational posterior distribution for some input x, i.e. 255 VOLUME 10, 2022   and Uniform distribution for p(b). 284 We maximize the probability p λ (a|b) to make the sensitive 285 latent b informative about sensitive attribute a, see Section IV 286 for details. The implementation is based on an MLP which is 287 used to predict the sensitive attributes a while taking sensitive 288 latent b as the input, i.e.  The parameters λ for MLP are learned in an end-to-end fash-291 ion by minimizing the loss function L λ sensitive (a,â). L sensitive 292 depends on the nature of a, for example we can use cross 293 entropy loss for binary sensitive attributes and mean squared 294 error (MSE) loss to regress a continuous sensitive attribute 295 (for example age). If there are multiple sensitive attributes, 296 say m, then we model b ∈ R s such that s = m and b i wherei = 297 1, 2, . . . , m corresponds to a i wherei = 1, 2, . . . , m. To pre-298 dict each a i , we use a seperate MLP such thatâ i = 299 MLP i (b i )wherei = 1, 2, . . . , m. This way we can ensure that 300 the user can decide which sensitive attribute is of concern at 301 the test time and can use the representation [z, b] \ {b i } for 302 the utility task. We present the development for the case of 303 a single sensitive attribute, m = 1, but the case for multiple 304 sensitive attributes is straight forward to generalize.

305
The final objective, given in equation (6), can now be given 306 in terms of loss functions as, where ELBO(φ, θ) is given in equation (4). We use ADAM 312 optimization algorithm [18] to maximize the objective given 313 in equation (8).

315
In this section, we provide the details about our experimental 316 settings and the experimental results.

317
A. TRAINING DATA

318
The goal of this study is to learn fair data representations. 319 We perform extensive experiments on a dataset consisting of   Likewise, to learn the parameters λ of the MLP network 361 which is used to predict the sensitive attributes, see Figure 1 362 and Section V, we use cross entropy loss, i.e.
where a ∈ R |A| is the vector encoding the ground truth labels 365 for |A| number of sensitive attributes andâ contains their 366 predicted probabilities.

367
The final objective given in equation (8) is maximized to 368 learn the representations.

370
The fundamental evaluation metric that we use is the accuracy 371 of the predicted target. The higher the accuracy, the better the 372 model performance. Since there are multiple groups for each 373 experiment, we also take the mean and the variance of the 374 accuracies across all groups. The higher the mean accuracy 375 and the lower the variance, the better the model performance. 376

377
We have two sensitive attributes, gender and skin tone. 378 We trained models to predict the target variable t (whether 379 an image contains human face). At the test time, we test the 380 trained models under three different settings depending on 381 which sensitive attribute is considered. i.e.

382
• skin tone: only skin tone is considered as the sensitive 383 attribute,

384
• gender: only gender is considered as the sensitive 385 attribute,

386
• skin tone and gender: both skin tone and gender are 387 considered as sensitive attributes.

388
First we consider only the skin tone as the sensitive 389 attribute and test the performance of the trained models 390 on PPB test dataset. For this experiment, we use [z, b] \ 391 {b skin tone } as our representations. The results of this exper-392 iment are shown in Table 1. We can see that the proposed 393 VOLUME 10, 2022 for light faces images and dark faces groups. 150 randomly sampled images are used for both groups. Skin tone is used as the sensitive attribute in these experiments. Dark blue and dark red dots represent the centroids of dark faces and light faces groups, respectively, and the green line joining them represents the distance between them. Each subfigure also shows the c value. We can see that c value is the lowest for our representations as compared to the other three baselines. This shows that the representations learned using the proposed method contain the least amount of sensitive information while simultaneously useful for the utility task, as shown in the results presented in Section VI-E.  Table 2. Our method perform better than all the baselines for 403 both ''Male'' and ''Female'' faces. The proposed method also 404 shows higher mean accuracy and lower variance as compared 405 to the baseline methods.

406
In the third experiment, we consider both the skin tone 407 and the gender as the sensitive attributes. We now have four 408 groups: dark male, dark female, light male and light female. 409 The results for this experiment are given in Table 3. We can 410 see that the proposed method achieves better accuracy for 411 To visualize the learned representations, we use t-SNE [22] 417 algorithm to visualize the quality of the learned representa-      464 Our results showed that the proposed method performs better 465 or comparable to the baselines in all three settings. 466 We also visualized the learned representations using 467 t-SNE [22] algorithm. We showed in Section VI-F that the our 468 method produces representations that have the least content of 469 sensitive information embedded into them as compared to the 470 baseline methods. However, the experiment results presented 471 in Section VI-E show that our representations are informative 472 about the utility task as they perform better or comparable 473 than the baseline methods at performing the utility task. This 474 shows that our method produces representations that retain 475 the useful content about the utility task while minimizing the 476 information about sensitive attributes. Adversarial training is difficult and suffers from stability 480 issues [17]. This makes training the networks difficult and it 481 also affects the performance of the resultant representations. 482 Our method, however, does not use any adversarial objective 483 in the training which makes the training process simpler.

485
In this work, we presented a method to learn fair data repre-486 sentations that can be used for down stream utility tasks, such 487 as classification. The learned data representations are flexible 488 with respect to the sensitive attributes, i.e. it can be chosen at 489 the test time which attributes are to be treated as sensitive 490 attributes. We have performed extensive experiments to com-491 pare the proposed method against other fair representation 492 learning methods in literature. Our experimental results show 493 that the representations learned using the proposed method 494 perform better or comparable to other studied methods on 495 classification tasks. Note that we use the same representations 496 for different sets of sensitive attributes for the classification 497 experiments. This shows that our representations are flexible 498 and can be used to achieve fairness objectives for different 499 sensitive attributes at the test time. We also visualize the 500 VOLUME 10, 2022 representations achieves greater independence with respect 502 to the sensitive attributes.