# fair_representations_by_compression__7bbef354.pdf Fair Representations by Compression Xavier Gitiaux, Huzefa Rangwala George Mason University xgitiaux@gmu.edu, rangwala@gmu.edu Organizations that collect and sell data face increasing scrutiny for the discriminatory use of data. We propose a novel unsupervised approach to transform data into a compressed binary representation independent of sensitive attributes. We show that in an information bottleneck framework, a parsimonious representation should filter out information related to sensitive attributes if they are provided directly to the decoder. Empirical results show that the proposed method, FBC, achieves state-of-the-art accuracyfairness trade-off. Explicit control of the entropy of the representation bit stream allows the user to move smoothly and simultaneously along both rate-distortion and rate-fairness curves. Introduction A growing body of evidence has questioned the fairness of machine learning algorithms across a wide range of applications, including judicial decisions (Pro Publica 2016), face recognition (Buolamwini and Gebru 2018), degree completion (Gardner, Brooks, and Baker 2019) or medical treatment (Pfohl et al. 2019). Of particular concerns are potential discriminatory uses of data on the basis of racial or ethnic origin, political opinion, religion, or gender. Therefore, organizations that collect and sell data are increasingly liable if future downstream uses of the data are biased against protected demographic groups. One of their challenges is to anticipate and control how the data will be processed by downstream users. Unsupervised fair representation learning approaches (Madras et al. (2018), Zemel et al. (2013), Gitiaux and Rangwala (2020), Moyer et al. (2018)) offers a flexible fairness solution to this challenge. A typical architecture in fair representation learning includes an encoder that maps the data into a representation and a decoder that reconstructs the data from its representation. The objective of the architecture is to extract from a data X the underlying latent factors Z that correlate with unobserved and potentially diverse task labels, while remaining independent of sensitive factors S. This paper asks whether an encoder that filters out information redundancies could generate fair representations. Intuitively, if sensitive attributes S are direct inputs to the de- Copyright c 2021, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. coder, an encoder that aims for conciseness would not waste code length to encode information related to S in the latent factors Z. We show that in an information bottleneck framework (Tishby, Pereira, and Bialek 2000), this intuition is theoretically founded: constraining the information flowing from the data X to the representation Z forces the encoder to control the dependencies between sensitive attributes S and representations Z. It is sufficient to constraint the mutual information I(Z, X) between Z and X in order to minimize the mutual information I(Z, S) between Z and S. Therefore, instead of directly penalizing I(Z, S), we recast fair representation learning as a rate distortion problem that controls explicitly the bit rate I(Z, X) encoded in the latent factors Z. We model the representation Z as a binary bit stream, which allows us to monitor the bit rate more effectively than floating point representations that may maintain redundant bit patterns. We estimate the entropy of the code Z with an auxiliary auto-regressive network that predicts each bit in the latent code Z conditional on previous bits in the code. One advantage of the method is that the auxiliary network collaborates with the encoder to minimize the cross-entropy of the code. Empirically, we demonstrate that the resulting method, Fairness by Binary Compression (henceforth, FBC) is competitive with state-of-the art methods in fair representation learning. Our contributions are as follows: 1. We show that controlling for the mutual information I(Z, X) is an effective way to remove dependencies between sensitive attributes and latent factors Z, while preserving in Z, the information useful for downstream tasks. 2. We find that compressing the data into a binary code as in FBC generates a better accuracy-fairness trade-off than limiting the information channel capacity by adding noise (as in variants of β-VAE, (Higgins et al. 2017)). 3. We show that increasing the value of the coefficient on the bit rate constraint I(Z, X) in our information bottleneck framework allows to move smoothly along both ratedistortion and rate-fairness curves. Related work. The machine learning literature increasingly explores how algorithms can adversely impact protected demographic groups (e.g individuals self-identified as Female or African-American) (see Chouldechova and Roth (2018) for a review). Research questions revolve around how The Thirty-Fifth AAAI Conference on Artificial Intelligence (AAAI-21) to define fairness (Dwork et al. (2012)), how to enforce fairness in standard classification algorithms (e.g. Agarwal et al. (2018), Kim, Reingold, and Rothblum (2018), Kearns et al. (2018)) or audit a black box classifier for its fairness (e.g Feldman et al. (2015), Gitiaux and Rangwala (2019)). This paper relates to recent efforts towards transforming data into fair and general purpose representations that are not tailored to a pre-specified specific downstream task. Many contributions use a supervised setting where the downstream task label is known while training the encoder-decoder architecture (e.g Madras et al. (2018), Edwards and Storkey (2015), Moyer et al. (2018) Song et al. (2018) or Jaiswal et al. (2019)). However, Zemel et al. (2013), Gitiaux and Rangwala (2020) and Locatello et al. (2019) argue that in practice, an organization that collects data cannot anticipate what the downstream use of the data will be. In this unsupervised setting, the literature has focused on penalizing approximations of the mutual information between representations and sensitive attributes: maximum mean discrepancy penalty (Gretton et al. (2012)) for deterministic (Li, Swersky, and Zemel (2014)) or variational (Louizos et al. (2015)) autoencoders (see Table 1); cross-entropy of an adversarial auditor that predicts sensitive attributes from the representations (Madras et al. (2018), Edwards and Storkey (2015), Zhang, Lemoine, and Mitchell (2018) or Xu et al. (2018)). Our approach contrasts with existing work since it does not control directly for the leakage between sensitive attributes and representations. FBC obtains fair representations only by controlling its bit rate. In a supervised setting, Jaiswal et al. (2019) show that nuisance factors can be removed from a representation by over-compressing it. We extend their insights to unsupervised settings and show the superiority of bit stream representations over noisy ones to remove nuisance factors. Our insights could offer an effective alternative to methods that learn representations invariant to nuisance factors (e.g. (Achille and Soatto 2018), (Jaiswal et al. 2020), (Jaiswal et al. 2018)). Our paper borrows soft-quantization techniques when backpropagating through the model (Agustsson et al. 2017) and hard quantization techniques during the forward pass (Mentzer et al. 2018). We find that in our fair representation setting, explicit control of the bit rate of the representation leads to better accuracy-fairness trade-off than floating point counterpart. We estimate the entropy of the code as in Mentzer et al. (2018) by computing the distribution P(Z) of Z as an auto-regressive product of conditional distributions, and by modeling the auto-regressive structure with a Pixel CNN architecture (Oord, Kalchbrenner, and Kavukcuoglu (2016), Van den Oord et al. (2016)). Fair Information Bottleneck Consider a population of individuals represented by features X X [0, 1]dx and sensitive attributes in S S {0, 1}ds, where dx is the dimension of the feature space and ds is the dimension of the sensitive attributes space. In this paper, we do not restrict ourselves to binary sensitive attributes and we allow ds > 1. The objective of fair representation learning is to map the features space X into a m dimensional representation space Z [0, 1]m, such that (i) Z maximizes the information related to X, but (ii) minimizes the information related to sensitive attributes S. We can express this as max Z I(X, {Z, S}) γI(Z, S) (1) where I(X, S) and I(X, {Z, S}) denote the mutual information between Z and S and between X and (Z, S), respectively; and γ 0 controls the fairness penalty I(Z, S). Existing methods focus on solving directly the problem (1) by approximating the mutual information I(Z, S) between Z and S via the cross-entropy of an adversarial auditor that predicts S from Z (Madras et al. (2018), Edwards and Storkey (2015), Gitiaux and Rangwala (2020)) or via the maximum mean discrepancy between Z and S (Louizos et al. (2015)). In this paper, we instead reduce the fair representation learning program (1) to an information bottleneck problem that consists of encoding X into a parsimonious code Z, while ensuring that this code Z along with a side channel S allows a good reconstruction of X. The mutual information between X and S can be written as I(Z, S) (a) = I(Z, {X, S}) I(Z, X|S) (b) = I(Z, X) + I(Z, S|X) I(Z, X|S) (c) = I(Z, X) I(Z, X|S) (d) = I(Z, X) I(X, {Z, S}) + I(X, S). where (a), (b) and (d) use the chain rule for mutual information; and, (c) uses the fact that Z is only encoded from X, so H(Z|X, S) = H(Z|X) and I(Z, S|X) = H(Z|X) H(Z|X, S) = 0. Since the mutual information between X and S does not depend on the code Z, the fair representation learning (1) is equivalent to the following fair information bottleneck: max Z (1 + γ)I(X, {Z, S}) γI(Z, X). (2) Intuitively, compressing information about X forces the code Z to avoid information redundancy, particularly redundancy related to the sensitive attribute S, since the decoder has direct access to S. Note that there is no explicit constraint in (2) to impose independence between Z and S. If the representation Z is obtained by a deterministic function of the data X, once X is known, Z is known and H(Z|X) = 0. Therefore, the mutual information I(Z, X) is equal to the entropy H(Z) of the representation Z. Since the entropy of the data X does not depend on the representation Z, we can replace I(X, {Z, S}) = H(X) H(X|Z, S) by Ez,s,x log(P(x|z, s) in the information bottleneck (2) and solve for: min Z Ex,z,s[ log(P(X|Z, S)] + βH(Z), (3) where β = γ/(γ + 1). Therefore, the fair representation problem, in its information bottleneck interpretation, can be recast as a rate-distortion trade-off. A lossy compression of the data into a representation Z forces the independence Methods Fairness by controlling: Examples I(Z, S) I(Z, X) Adversarial Minimizing auditor s Madras et al. (2018), Edwards and Storkey (2015), cross-entropy Creager et al. (2019) MMD Mimizing maximum Li, Swersky, and Zemel (2014), Louizos et al. (2015) mean discrepancy β VAE Noisy Z Higgins et al. (2017), This paper FBC Binary Z This paper Table 1: Methods in unsupervised fair representation learning organized by whether the fairness properties of the learned representations is obtained by minimizing the mutual information between sensitive attributes S and representations Z; or by minimizing the mutual information between data X and representations Z; and whether Z is modelled as a binary bit stream or is convolved with Gaussian noise. between sensitive attribute and representation but increases the distortion cost measured by the negative log-likelihood of the reconstructed data Ex,z,s[ log(P(X|Z, S)]. The parameter β in equation (3) controls the competitive objectives of low distortion and fairness-by-compression: the larger β, the fewer the dependencies between Z and S. Proposed Method There are two avenues to control for I(Z, X) in the information bottleneck (2) (see Figure 1): (i) adding noise to Z to control the capacity of the information channel between X and Z; or, (ii) storing Z as a bit stream whose entropy is explicitly controlled. The noisy avenue (i) is a variant of variational autoencoders, so called β VAE (Higgins et al. 2017), that models the posterior distribution P(Z|X) of Z as Gaussian distributions (see Figure 1a). The channel capacity and thus the mutual information between X and Z is constrained by minimizing the Kullback divergence between these posterior distributions and an isotropic Gaussian prior (Braithwaite and Kleijn (2018)). In the context of fair representation learning, (Louizos et al. 2015) and (Creager et al. 2019) use variants of β VAE, but do not focus on how limiting the channel capacity I(Z, X) could lead to fair representations. Instead, they add further constraints on I(Z, S). We implement the binary avenue with a method FBC (see Figure 1b) that consists of an encoder F : X Rm, a binarizer B : Rm {0, 1}m and a decoder G : {0, 1}m S X. The encoder F maps each data point x into a latent variable e = F(x). The binarizer B binarizes the latent variable e into a bit stream z of length m. The decoder G reconstructs a data point ˆx = G(z, s) from the bitstream z and the sensitive attribute s. We model encoder and decoder as neural networks whose architecture varies with the type of data at hand. The binarization layer controls explicitly the bit allowance of the learned representation and thus forces the encoder to strip redundancies including sensitive attributes. Binarization is a two step process: (i) mapping the latent variable e into [0, 1]m; (ii) converting real values into 0-1 bit. We achieve the first step by applying a neural network layer with an activation function z = (tanh(e) + 1)/2. We achieve the second step by rounding z to the closest integer 0 or 1. One issue with this approach is that the result- ing binarizer B is not differentiable with respect to z. To sidestep the issue, we follow Mentzer et al. (2018) or Theis et al. (2017) and rely on soft binarization during backward passes through the neural network. Formally, during a backward pass we replace z by a soft-binary variable z: z = exp( σ||z 1||2 2) exp( σ||z 1||2 2) + exp( σ||z||2 2), where σ is an hyperparameter that controls the softbinarization. During the forward pass, we use the binary variable z instead of its soft-binary counterpart z to control the bitrate of the binary representation Z 1. To estimate the entropy H(z), we factorize the distribution P(z) over {0, 1}m by writing z = (z1, ..., zm) (Mentzer et al. (2018)) and by computing P(z) as the product of conditional distributions: i=1 p(zi|zi 1, zi 2, ..., z1) i=1 p(zi|z.