On the Generalization of Projection-Based Gender Debiasing in Word Embedding (2023)

Abstract: Gender bias estimation and mitigation techniques in word embeddings lack an understanding of their generalization capabilities. In this work, we complement prior research by comparing in a systematic way four gender bias metrics (Word Embedding Association Tes, Relative Negative Sentiment Bias, Embedding Coherence Test and Bias Analogy Test), two types of projection-based gender mitigation strategies (hard- and soft-debiasing) on three well-known word embedding representations (Word2Vec, FastText and Glove). The experiments have shown that the considered word embeddings are consistent between them but the debiasing techniques are inconsistent across the different metrics, also highlighting the potential risk of unintended bias after the mitigation strategies.

## introduction a recent body of work in natural language processing (nlp) has focused attention on quantifying different types of bias through various approaches, spanning from psychological tests and performance differences for various tasks to the geometry of vector spaces @xcite . defining the type of bias is essential to estimate and mitigate it. several forms of biases specific to nlp application have been introduced in the literature during the last 5 years @xcite @xcite . in @xcite the authors defined gender bias in a text as the use of words or syntactic constructs that connote or imply an inclination or prejudice against one gender, highlighting that gender bias can evidence itself structurally, contextually, or in both forms. structural bias occurs when the construction of sentences shows patterns closely tied to the presence of gender bias. on the other hand, contextual bias can happen in the tone, words, or context of a sentence. unlike structural bias, this type of bias is not evident in grammatical structure but requires contextual background information and human perception. therefore, gender bias can be discovered using both linguistic and extra-linguistic cues and can manifest itself in subtle or explicit ways, with differing degrees of intensity @xcite @xcite . furthermore, gender bias can easily propagate to models and downstream tasks, causing harm to the end-users @xcite . these forms of bias can emerge as representational harms and gender gaps. the current literature about gender bias estimation and mitigation related to word embeddings lacks an understanding of their generalization capabilities. therefore, this work complements prior research by providing the first systematic evidence on the generalization of estimating gender bias and debiasing techniques, including comprehensive quantitative and qualitative analyses. in particular, we compared in a systematic way four gender bias metrics (word embedding association test @xcite , relative negative sentiment bias @xcite , embedding coherence test @xcite and bias analogy test @xcite ), two types of projection-based gender mitigation strategies (hard-and soft-debiasing @xcite ) on three well-known word embedding representations (word2vec @xcite , fasttext @xcite and glove @xcite ). the main findings of the systematic comparison can be summarized as follows: the paper is organized as follows. in section 2, the most relevant bias estimation metrics are presented. in section 3 hard and soft debiasing strategies are reported. in section 4, a systematic comparison is performed, detailing the main findings about the generalization capabilities in debiasing word embeddings. finally, in section 5 conclusions are reported and future work is discussed. ## measuring gender bias in recent years numerous investigations have been focused on the development of measures to estimate gender bias in embedding methods. the most widely used techniques are: word embedding association test @xcite , relative negative sentiment bias @xcite , embedding coherence test @xcite and bias analogy test @xcite . ## debiasing methods given the potential risk of using machine learning algorithms that amplify gender stereotypes contained in pre-trained word embeddings, the main challenge in debiasing tasks is to strike a balance between maintaining model performance on downstream tasks while reducing the encoded gender bias @xcite . to this purpose, projection-based debiasing methods are exploited and compared to determine their generalization capabilities. in this work, we consider two main mitigation strategies, hard-and softdebiasing. hard-debiasing. hard-debiasing @xcite , also known as neutralize and equalize, ensures that genderneutral words are zero in the gender subspace and equalizes sets of words outside the subspace. in order to accomplish this task, hard-debiasing has the goal to satisfy the constraint that any neutral word should be equidistant to all words in each equality set (i.e., a set of words which differ only in the gender component). for instance, taking (grandmother, grandfather) and (guy, gal) as two equality sets, after equalization, babysit would result to be equidistant from (grandmother, grandfather) and (gal, guy), closer to grandparent and further away from the gal and guy. instead of completely removing gender information, the approach is aimed at shifting word embeddings to be equally male and female in terms of their vector direction and proposes to modify the embedding space by removing the gender component only from gender-neutral words. this approach is appropriate for applications where one does not wish to display any bias in any such pair with respect to neutral words. the disadvantage of equalizing sets of words outside the subspace is that it removes certain specific distinctions that may be of value in specific applications. for instance, bolukbasi et al. highlight that one may wish a language model to assign a higher probability to the phrase such as grandfather a regulation since it is an idiom, unlike grandmother a regulation. ## generalization capabilities: a systematic comparison in order to perform a deep analysis of bias measures and mitigation techniques on word embeddings, we selected three of the most well-known and adopted models: in order to understand and evaluate unintentional gender bias in word embeddings from a comprehensive point of view, we adopted the framework reported in figure 1 . in particular, given the considered word embeddings, the systematic comparison for understanding the generalization capabilities of the examined gender-debiasing techniques is performed according to the following three main steps: (1) estimation of the gender-bias metrics, (2) exploiting both hard-and soft-debiasing methods and (3) evaluating the debiased embeddings using the same bias measures before and after the mitigation strategy. to evaluate the pre-trained word embeddings, we use the four metrics, comparing the results before and after the mitigation strategies. we report in tables 1, 2 and 3 the corresponding values according to seven sets of different target words and multiple male and female attribute words. for each metric, we computed the values obtained by the considered models according to the (o)original embedding, the (s)oft debiased, and the (h)ard debiased ones. the first measure we evaluate is the word embedding association test (weat) where, for each target group we computed the association with the set of male and female attribute words (pronouns). in regarding the relative negative sentiment bias (rnsb) metric, it can be interpreted as the distance between the current distribution of negative sentiment and the fair, uniform distribution. therefore, the fairer a word embedding model is with respect to sentiment bias, the lower the rnsb metric should be. the results in for what concerns the relative negative sentiment bias metric, it can be interpreted as the dis-tance between the current distribution of negative sentiment and the fair, uniform distribution. therefore, the fairer a word embedding model is with respect to sentiment bias, the lower the rnsb metric should be. the results in regarding the embedding coherence test (ect), it quantifies the amount of explicit bias and returns the spearman's rank correlation between the vectors of similarity scores between the attribute word set and the gender target sets. the results in word2vec fasttext glove o s h o s h o s h career .714 1.00 1.00 .952 .929 .952 .976 .976 1.00 family .762 .833 1.00 .952 .976 .976 .905 .976 1.00 science .571 .857 1.00 .976 .976 1.00 .976 1.00 1.00 arts .810 .952 .976 .833 .929 1.00 .929 .952 .952 appearance .363 .879 .904 .507 .833 .858 .448 .952 .965 intelligence .744 .976 .998 .841 .943 .991 .916 .990 .999 pleasant .733 .978 .983 .943 966 .989 .938 .978 .997 unpleasant .800 .962 .984 .872 .912 .976 .900 .976 .985 positive words .771 .972 .994 .925 .982 .997 .936 .992 .999 negative words .791 .964 .993 .939 .981 .997 .954 .992 .999 man roles .972 .986 .993 .979 .972 1.00 .958 .958 .993 woman roles .747 .956 .879 .780 .885 .901 .511 .923 .736 we report in figure 2(a) , 2(b) and 2(c) the gender direction for different occupations for each pre-trained model according to the original embeddings and the two debiasing techniques. although there is an improvement for all models from the original to the hard debiased embedding, we can observe a few potentially biased representations in the she direction. in particular terms such as maid, waitress and housewife do not constitute a form of directly observable bias, but the absence of male equivalent terms is a potential warning. although the analysis carried out to this point seems to confirm that the embeddings have been successfully debiased, the qualitative evaluation of the results has brought out some concerns regarding the actual presence of bias. to this purpose, we evaluated the embeddings adopting the bias analogy test reporting the results in in particular, for the word pairs definition, stereotype and none, for each pre-trained model, the only improvement from the original embedding appears to be in the stereotype values of the soft embedding. ## conclusions and future work in this paper, a systematic comparison of different bias estimation metrics, mitigation strategies and word embeddings has been performed. the computational investigation highlighted analogies and dissimilarities among metrics, pointing out the importance of using different types of measures to have a wider overview of the generalization capabilities of the two most important debiasing techniques. the experiments have shown that the considered word embeddings are consistent between them but inconsistent across the different metrics. although weat, rnsb and ect values are coherent, the gender direction of occupations and the bat values are signals reflecting the presence of bias in the supposed debiased models. a future research investigation relates to the evaluation of multiple bias metrics not only on word embeddings but also on transformer-based representations as contextualized word embeddings. finally, a generalization of the proposed investigation should be pursued on generative language models.