Erasure of Unaligned Attributes from Neural Representations (2023)

Abstract: We present the Assignment-Maximization Spectral Attribute removaL (AMSAL) algorithm, which erases information from neural representations when the information to be erased is implicit rather than directly being aligned to each input example. Our algorithm works by alternating between two steps. In one, it finds an assignment of the input representations to the information to be erased, and in the other, it creates projections of both the input representations and the information to be erased into a joint latent space. We test our algorithm on an extensive array of datasets, including a Twitter dataset with multiple guarded attributes, the BiasBios dataset, and the BiasBench benchmark. The latter benchmark includes four datasets with various types of protected attributes. Our results demonstrate that bias can often be removed in our setup. We also discuss the limitations of our approach when there is a strong entanglement between the main task and the information to be erased.1

## introduction developing a methodology for adjusting neural representations to preserve user privacy and avoid encoding bias in them has been an active area of research in recent years. previous work shows it is possible to erase undesired information from representations so that downstream classifiers cannot use that information in their decision-making process. this previous work assumes that this sensitive information (or guarded attributes, such as gender or race) is available for each input instance. these guarded attributes, however, are sensitive, and obtaining them on a large scale is often challenging and, in some cases, not feasible @xcite . for example, @xcite figure 1 : a depiction of the problem setting and solution. the inputs are aligned to each guarded sample, based on strength using two projections u and v . we solve a bipartite matching problem to find the blue edges, and then recalculate u and v . our contributions are as follows: (1) we propose a new setup for removing guarded information from neural representations where there are few or no labeled guarded attributes; (2) we present a novel two-stage coordinate-ascent algorithm that iteratively improves (a) an alignment between guarded attributes and neural representations; and (b) information removal projections. using an array of datasets, we perform extensive experiments to assess how challenging our setup is and whether our algorithm is able to remove information without having aligned guarded attributes ( §4). we find in several cases that little information is needed to align between neural representations and their corresponding guarded attributes. the consequence is that it is possible to erase the information such guarded attributes provide from the neural representations while preserving the information needed for the main task decision-making. we also study the limitations of our algorithm by experimenting with a setup where it is hard to distinguish between the guarded attributes and the downstream task labels when aligning the neural representations with the guarded attributes ( §4.5). ## problem formulation and notation for an integer n we denote by [n] the set {1, . . . , n}. for a vector v, we denote by ||v|| 2 its ℓ 2 norm. for two vectors v and u, by default in column form, v, @xmath0. matrices and vectors are in boldface font (with uppercase or lowercase letters, respectively). random variable vectors are also denoted by boldface uppercase letters. for a matrix a, we denote by a ij the value of cell (i, j). the frobenius norm of a matrix a is a @xmath1,j a 2 ij . the spectral norm of a matrix is a 2 = max x 2 =1 ax 2 . the expectation of a random variable t is denoted by e @xcite . in our problem formulation, we assume three random variables: @xmath2, @xmath3, and @xmath4, such that @xmath5. samples of x are the inputs for a classifier to predict corresponding samples of y. the random vector z represents the guarded attributes. we want to maintain the ability to predict y from x, while minimizing the ability to predict z from x. we assume n samples of (x, y) and m samples of z, denoted by (x (i) , y (i) ) for @xmath6, and z (i) for @xmath7. while originally, these samples were generated jointly from the underlying distribution p(x, y, z), we assume a shuffling of the z samples in such a way that we are only left with m samples that are unique (no repetitions) and an underlying unknown many-to-one mapping π : [n] → [m] that maps each x (i) to its original z (j) . the problem formulation is such that we need to remove the information from the xs in such a way that we consider the samples of zs as a set. in our case, we do so by iterating between trying to infer π, and then using standard techniques to remove the information from xs based on their alignment to the corresponding zs. ## methodology we view the problem of information removal with unaligned samples as a joint optimization problem of: (a) finding the alignment; (b) finding the projection that maximizes the covariance between the alignments, and using its complement to project the inputs. such an optimization, in principle, is intractable, so we break it down into two coordinate-ascent style steps: a-step (in which the alignment is identified as a bipartite graph matching problem) and m-step (in which based on the previously identified alignment, a maximal-covariance projection is calculated). formally, the maximization problem we solve is: ## experiments in our experiments, we test several combinations of algorithms. we use the k-means (kmeans) as a substitute for the am steps as a baseline for the assignment step of xs to zs. in addition, for the removal step (once an assignment has been identified), we test two algorithms: sal @xcite ; resulting in amsal) and inlp @xcite . we also compare these two algorithms in oracle mode (in which the assignment of guarded attributes to inputs is known), to see the loss in performance that happens due to noisy assignments from the am or k-means algorithm (oraclesal and oracleinlp). when running the am algorithm or k-means, we execute it with three random seeds (see also §4.6) for a maximum of a hundred iterations and choose the projection matrix with the largest objective value over all seeds and iterations. for the slack variables (b 0j and b 1j variables in eq. 3), we use 20%-30% above and below the baseline of the guarded attribute priors according to the training set. with the sal methods, we remove the number of directions according to the rank of the ω matrix (between 2 to 6 in all experiments overall). in addition, we experiment with a partially supervised assignment process, in which a small seed dataset of aligned xs and zs is provided to the am steps. we use it for model selection: rather than choosing the assignment with the highest svd objective value, we choose the assignment with the highest accuracy on this seed dataset. we refer to this setting as partial (for ''partially supervised assignment''). finally, in the case of a gender-protected attribute, we compare our results against a baseline in which the input x is compared against a list of words stereotypically associated with the genders of male or female. 2 based on the overlap with these two lists, we heuristically assign the gender label to x and then run sal or inlp (rather than using the am algorithm). while this wordlist heuristic is plausible in the case of gender, it is not as easy to derive in the case of other protected attributes, such as age or race. we give the results for this baseline using the marker wl in the corresponding tables. main findings our overall main finding shows that our novel setting in which guarded infor mation is erased from individually unaligned representations is viable. we discovered that am methods perform particularly well when dealing with more complex bias removal scenarios, such as when multiple guarded attributes are present. we also found that having similar priors for the guarded attributes and downstream task labels may lead to poor performance on the task at hand. in these cases, using a small amount of supervision often effectively helps reduce bias while maintaining the utility of the representations for the main classification of the regression problem. finally, our analysis of alignment stability shows that our am algorithm often converges to suitable solutions that align x with z. due to the unsupervised nature of our problem setting, we advise validating the utility of our method in the following way. once we run the am algorithm, we check whether there is a high-accuracy alignment between x and y (rather than z, which is unavailable). if this alignment is accurate, then we run the risk of significantly damaging task performance. an example is given in §4.5. ## related work there has been an increasing amount of work on detecting and erasing undesired or protected information from neural representations, with standard software packages for this process having been developed @xcite . for example, in their seminal work, @xcite showed that word embeddings exhibit gender stereotypes. to mitigate this issue, they projected the word embeddings to a neutral space with respect to a ''he-she'' direction. influenced by this work, @xcite proposed a customized training scheme to reduce the gender bias in word em-beddings. @xcite examined the effectiveness of the methods mentioned above and concluded they remove bias in a shallow way. for example, they demonstrated that classifiers can accurately predict the gender associated with a word when fed with the embeddings of both debiasing methods. another related strand of work uses adversarial learning @xcite , where an additional objective function is added for balancing undesired-information removal and the main task @xcite @xcite . @xcite have also demonstrated that an ad-hoc classifier can easily recover the removed information from adversarially trained representations. since then, methods for information erasure such as inlp and its generalization @xcite , sal @xcite and methods based on similarity measures between neural representations @xcite have been developed. with a similar motivation to ours, @xcite aimed to ease the burden of obtaining guarded attributes at a large scale by decoupling the adversarial information removal process from the main task training. they, however, did not experiment with debiasing representations where no guarded attribute alignments are available. @xcite experimented with the removal of features in a scenario in which a low number of protected attributes is available. additional previous work showed that methods based on causal inference @xcite , train-set balancing @xcite , and contrastive learning @xcite effectively reduce bias and increase fairness. in addition, there is a large body of work for detecting bias, its evaluation @xcite and its implications in specific nlp applications. @xcite detected a gender bias in speech translation systems for gendered languages. gender bias is also discussed in the context of knowledge base embeddings by @xcite ; @xcite , and multilingual text classification @xcite . ## conclusions and future work we presented a new and challenging setup for removing information, with minimal or no available sensitive information alignment. this setup is crucial for the wide applicability of debiasing methods, as for most applications, obtaining such sensitive labels on a large scale is challenging. to ease this problem, we present a method to erase information from neural representations, where the guarded attribute information does not accompany each input instance. our main algorithm, amsal, alternates between two steps (assignment and maximization) to identify an assignment between the input instances and the guarded information records. it then completes its execution by removing the information by minimizing covariance between the input instances and the aligned guarded attributes. our approach is modular, and other erasure algorithms, such as inlp, can be used with it. experiments show that we can reduce the unwanted bias in many cases while keeping the representations highly useful. future work might include extending our technique to the kernelized case, analogously to the method of @xcite .