Exploring the Linear Subspace Hypothesis in Gender Bias Mitigation (2020)

Abstract: Bolukbasi et al. (2016) presents one of the first gender bias mitigation techniques for word embeddings. Their method takes pre-trained word embeddings as input and attempts to isolate a linear subspace that captures most of the gender bias in the embeddings. As judged by an analogical evaluation task, their method virtually eliminates gender bias in the embeddings. However, an implicit and untested assumption of their method is that the bias subspace is actually linear. In this work, we generalize their method to a kernelized, non-linear version. We take inspiration from kernel principal component analysis and derive a non-linear bias isolation technique. We discuss and overcome some of the practical drawbacks of our method for non-linear gender bias mitigation in word embeddings and analyze empirically whether the bias subspace is actually linear. Our analysis shows that gender bias is in fact well captured by a linear subspace, justifying the assumption of Bolukbasi et al. (2016).

## introduction pre-trained word representations are a necessity for strong performance on modern nlp tasks. these embeddings now serve as input to neural methods @xcite , which recently have become the standard models in the field. however, because these representations are constructed from large, human-created corpora, they naturally contain societal biases encoded in that data; gender bias is among the most well studied of these biases @xcite . both a-contextual word embeddings @xcite and contextual word embeddings @xcite have been shown to encode gender bias @xcite @xcite @xcite . more importantly, the bias in those embeddings has been shown to influence models for downstream tasks where they are used as input, e.g. coreference resolution @xcite . @xcite present one of the first methods for detecting and mitigating gender bias in word embeddings. they provide a novel linear-algebraic approach that post-processes word embeddings in order to partially remove gender bias. under their evaluation, they find they can nearly perfectly remove bias in an analogical reasoning task. however, subsequent work @xcite has indicated that gender bias still lingers in the embeddings, despite @xcite 's strong experimental results. in the development of their method, @xcite make a critical and unstated assumption: gender bias forms a linear subspace of word embedding space. in mathematics, linearity is a strong assumption and there is no reason a-priori why one should expect complex and nuanced societal phenomena, such as gender bias, should be represented by a linear subspace. in this work, we present the first non-linear gender bias mitigation technique for a-contextual word embeddings. in doing so, we directly test the linearity assumption made by @xcite . our method is based on the insight that @xcite 's method bears a close resemblance to principal component analysis (pca). just as one can kernelize pca @xcite , we show that one can kernelize the method of @xcite . due to the kernelization, the bias is removed in the feature space, rather in the word embedding space. thus, we also explore preimage techniques @xcite to project the bias-mitigated vectors back into r d . as previously noted, there are now multiple bias removal methodologies @xcite @xcite that have succeed the method by @xcite . furthermore @xcite point out multiple flaws in @xcite 's bias mitigation technique and the aforementioned methods. nonetheless we believe that this method has received sufficient attention from the community such that research into its properties is both interesting and useful. we test our non-linear gender bias technique in several experiments. first, we consider the word embedding association test (weat; @xcite ; we notice that across five non-linear kernels and convex combinations thereof, there is seemingly no significant difference between the non-linear bias mitigation technique and the linear one. secondly, we consider the professions task @xcite that measures how word embeddings representing different professions are potentially genderstereotyped. again, as with the weat evaluation, we find that our non-linear bias mitigation technique performs on par with the linear method. we also consider whether the non-linear gender mitigation technique removes indirect bias from the vectors @xcite ); yet again, we find the non-linear method performs on par with the linear methods. as a final evaluation, we evaluate whether non-linear bias mitigation hurts semantic performance. on simlex-999 @xcite , we show that similarity estimates between the vectors remain on par with the linear methods. we conclude that much of the gender bias in word embeddings is indeed captured by a linear subspace, answering this paper's titular question. ## bias as a linear subspace the first step of @xcite 's technique is the discovery of a subspace b ⊂ r d that captures most of the gender bias. specifically, they stipulate that this space is linear. given word embeddings that live in r d , they provide a spectral method for isolating the bias subspace. in this section, we review their approach and show how it is equivalent to principal component analysis (pca) on a specific design (input) matrix. then, we introduce and discuss the implicit assumption made by their work; we term this assumption the linear subspace hypothesis and test it in §4. hypothesis 1. gender bias in word embeddings may be represented as a linear subspace. ## bias as a non-linear subspace we generalize the framework presented in @xcite and cast it to a non-linear setting by exploiting its relationship to pca. thus, the natural extension of @xcite is to kernelize it analogously to @xcite , which is the kernelized generalization of pca. our approach preserves all the desirable formal properties presented in the linear method of @xcite . ## computing the pre-image as mentioned in the previous section, a downfall of the metric correction approach is that it does not provide us embeddings that we can use in downstream tasks: the bias-mitigated embeddings only exist in feature space. thus, when it comes to transfer tasks such as classification we are limited to kernel methods such (i.e. support vector machines). one way to resolve this problem is by obtaining the pre-image of the corrected representations in the feature space. finding the pre-image is a well studied problem for kernel pca @xcite . the goal is to fine the pre-image mappings γ : and γ : h @xmath0, φ ⊥ p k (w i ) and φ p k (w i ), respectively. in our case, with the pre-image maping, the neutralize step from @xcite becomes in general, we will not have access to γ ⊥ so we discuss the following approximation scheme. ## experiments and results we carry out experiments across a range of benchmarks and statistical tests designed to quantify the underlying bias in word embeddings @xcite . our experiments focus on quantifying both direct and indirect bias as defined in @xcite ; hall @xcite . furthermore we also carry out word similarity experiments using the @xcite benchmark in order to asses that our new debiased spaces still preserve the original properties of word embeddings @xcite . ## conclusion we offer a non-linear extension to the method presented in @xcite by connecting its bias space construction to pca and subsequently applying kernel pca. we contend our extension is natural in the sense that it reduces to the method of @xcite in the special case when we employ a linear kernel and in the non-linear case it preserves all the desired linear properties in the feature space. this allows us to provide equivalent constructions of the neutralize and equalize steps presented. we compare the linear bias mitigation technique to our new kernelized non-linear version across a suite of tasks and datasets. we observe that our non-linear extensions of @xcite show no notable performance differences across a set of benchmarks designed to quantify gender bias in word embeddings. furthermore, the results in tab. 7(app. a) show that gradually increasing the degree of non-linearity has again no significant change in performance for the weat @xcite benchmark. thus, we provide empirical evidence for the linear subspace hypothesis; our results suggest representing gender bias as a linear subspace is a suitable assumption. we would like to highlight that our results are specific to our proposed kernelized extensions and does not imply that all non-linear variants of @xcite will yield similar results. there may very well exist a non-linear technique that works better, but we were unable to find one in this work.