Roadblocks in Gender Bias Measurement for Diachronic Corpora (2022)

Abstract: The use of word embeddings is an important NLP technique for extracting meaningful conclusions from corpora of human text. One important question that has been raised about word embeddings is the degree of gender bias learned from corpora. Bolukbasi et al. (2016) proposed an important technique for quantifying gender bias in word embeddings that, at its heart, is lexically based and relies on sets of highly gendered word pairs (e.g., mother/father and madam/sir) and a list of professions words (e.g., doctor and nurse). In this paper, we document problems that arise with this method to quantify gender bias in diachronic corpora. Focusing on Arabic and Chinese corpora, in particular, we document clear changes in profession words used over time and, somewhat surprisingly, even changes in the simpler gendered defining set word pairs. We further document complications in languages such as Arabic, where many words are highly polysemous/homonymous, especially female professions words.

## introduction natural language processing (nlp) plays a significant role in many powerful applications such as speech recognition, text translation, and autocomplete and is at the heart of many critical automated decision systems making crucial recommendations about our future world. word embedding systems are widely used to represent text data as vectors and enable nlp computation. systems such as word2vec @xcite , glove @xcite , and bert @xcite ingest large corpora of human text and can be used to learn semantic and syntactic relationships between words. at the same time, it has been demonstrated that these systems learn a wide variety of societal biases embedded in human text including racial bias, gender bias, and religious bias @xcite . in a widely cited paper, @xcite demonstrated that a system trained with a corpora of google news would complete the word comparison "man is to computer programmer as woman is to what?" with the response "homemaker" suggesting an alarming level of gender bias when used in tasks such as sorting resumes for computer programming jobs. @xcite extended these techniques beyond english to eight other languages (chinese, spanish, arabic, german, french, farsi, urdu, and wolof) and applied them to wikipedia corpora in each of these languages. they documented persistent gender bias and lack of representation in the modern nlp pipeline. nlp research often uses large, modern datasets like google news and wikipedia. developers of a wide variety of nlp-based applications begin with large pre-trained models that are also based on large corpora of human text @xcite . these pre-trained models also largely reflect the speech/writing of modern english speakers producing digital text. the speech/writing of speakers of the more than 7,000 languages spoken worldwide is often under-represented @xcite . similarly, historical speech/writing is often under-represented despite the fact that historical speech/writing is often considered foundational to cultural identity. investments in multilingual nlp and processing of diachronic corpora are essential if we want our nlp-based automated decision making systems to more widely reflect foundational cultural norms and identity from around the world. the inspiration for this paper was to re-examine bolukbasi et al.'s popular nlp-technique for quantifying gender bias from the perspective of applying it to diachronic corpora in arabic and chinese. specifically, @xcite s method begins with identifying a set of profession words and a set of highly gendered word pairs (defining set). in this paper, we explore the degree to which these words might change over time. we document ways in which this method is fundamentally fragile for diachronic corpora because of the way these sets of words would change over time. in section 2, for background, we elaborate on @xcite .'s multilingual extensions and some other relevant related work. section 3 describes our experience with two different diachronic arabic corpora, especially the impact on changes in profession set words over time. in section 4, we discuss changes in some defining set words in chinese using the google ngram viewer. we conclude and discuss future work in section 5. bolukbasi et al.'s original method is based on two sets of words. the first set (the defining set) consists of 10 highly gendered word pairs (she-he, daughter-son, her-his, mother-father, woman-man, gal-guy, mary-john, girl-boy, herself-himself, and female-male) and the second (profession set) consists of 327 profession words such as nurse, teacher, writer, engineer, scientist, manager, driver, banker, musician, artist, and chef. they used the difference between the defining set word pairs to define a gendered vector space and then evaluated the relationship of the profession words relative to this gendered vector space. ideally, profession words would not reflect a strong gender bias. however, in practice, they often do. according to such a metric, the word doctor might be male biased or the word nurse female biased based on how these words are used in the corpora from which the word embedding model was produced. @xcite uses these two sets of words to compute a gender bias metric for each word and from there to express the gender bias of a corpora. specifically, each word is expressed as a vector by word2vec and then the center of the vectors for each defining set pair is calculated. for example, to calculate the center of the definitional pair woman/man, they average the vector for "woman" with the vector for "man". then, they calculate the distance of each word in the definitional pair from the center by subtracting the center from each word in the pair (e.g., "woman" -center). they then apply principal component analysis (pca) to the matrix of these distances. pca is an approach that compresses multiple dimensions into fewer dimensions, ideally in a way that the information within the original data is not lost. usually, the number of reduced dimensions is 1-3 as it allows for easier visualization of a dataset. @xcite used the first eigenvalue from the pca matrix (i.e. the one that is larger than the rest). because the defining set pairs were chosen to be highly gendered, they expected this dimension to be related primarily to gender and therefore called it the gender direction or the g direction. finally, the g direction is a vector, and there is a vector representing each word. therefore, they used cosine similarity between the vector for each word, w, and the g direction vector as the measure of gender bias for that word. for a corpora or other collection of words, one can average the gender bias of words contained in the corpora as a measure of gender bias in the corpora using the equation of @xcite for the direct gender bias of an embedding: in this work, we build on both @xcite and focus on the unique challenges that arise when applying these techniques to diachronic corpora. specifically, we examined changes in both the profession set and defining set over time in arabic and chinese. certainly, professions have changed drastically over that amount of time and so a method based on profession set words like bolukbasi et al.'s method will have substantial challenges. we explored this using corpora including a database of arabic poems spanning 11 eras from the pre-islamic period (before 610) to modern day. while we saw less change over time in the usage of the simpler defining set words than in the profession set words, we did observe some interesting changes in even the defining set words over time, especially in chinese. in the process of this work, we also documented further complications in languages such as arabic, where many words are highly polysemous/homonymous, especially female professions words. @xcite also used word embeddings to examine gender bias over time. they used a collection of dutch newspaper articles spanning over four eras , training four embedding models per newspaper, one per era, using the gensim implementation of word2vec to demonstrate how word embeddings can be used to examine historical language change. they observed clear differences in gender bias and changes within and between newspapers over time. slight shifting of bias was observed in some themes like shifting towards female bias in themes related to sexuality and leisure (mostly seen in newspapers with religious background). shifting towards male bias in themes related 'money', 'grooming', and negative emotions, especially in newspapers with a liberal background, was also observed. @xcite developed dynamic embeddings building on exponential family embeddings to capture the language evolution or how the meanings of words change over time. they used three datasets of the u.s. senate speeches from 1858 to 2009, the history of computer science acm abstracts from 1951 to 2014, and machine learning papers on the arxiv from 2007 to 2015. they demonstrated how words like intelligence, iraq, computer, bush, data change their meaning over time. they observed that the dynamic embeddings provided a better fit than classical embeddings and captured interesting patterns about how language changes. for example, a word's meaning can change (e.g., computer); its dominant meaning can change (e.g., values); or its related subject matter can change (e.g., iraq). @xcite demonstrated the characterization of the semantic weights of subword units in the composition of word meanings. they used a subword-incorporated or a word embedding model variant for the evaluation and revealed interesting patterns change in multiple languages. their training datasets consist of wikimedia dumps for 6 languages (up until july 2017) consisting of chinese and other indo-european languages like english, french, german, and italian. the results revealed major differences in the long-term temporal patterns of semantic weights between chinese and five indo-european languages. for example, in chinese, the weights on subword units (characters) show a decreasing trend, i.e., individual characters play less semantic roles in newer words than older ones whereas the opposite trend was observed in other languages. therefore, chinese words are treated more as a whole semantic unit "synthetically", while words in indo-european languages require more attention into the subword units "analytically". these results provide evidence towards word formations to the linguistic theories. for example, the notion of "word" in chinese is always changing: modern chinese has multiple characters as a whole semantic unit opposite to its older counterpart. the semantic weight carried by a single character is decreasing over time. this is strong evidence in support of the claim that chinese has been evolving towards more detailed multisyllabic words from concise and monosyllabic words. we begin by describing two diachronic datasets that we used and how we processed these datasets, then we describe the changes in the profession word usage over time. ## conclusion and future work in order for nlp to reflect the rich multilingual, multicultural, and historical heritage of human text, it is essential that nlp techniques be extended beyond modern digital english text to multilingual and diachronic corpora. in this paper, we have explored the challenges of applying an important technique for measuring the gender bias learned by word embedding systems to diachronic corpora. we also have shown how techniques like those pioneered by @xcite and extended by @xcite have fundamental limitations when analyzing corpora spanning large periods of time. we showed that their technique based on analyzing the gender bias of profession words would have difficulty because professions change drastically over hundreds of years. interestingly, we also documented changes in defining and profession set words over time and also challenges with polysemous/homonymous profession words especially female profession words in arabic. in this paper, we have focused mostly on identifying the problems with techniques applied successfully to measure gender bias in modern corpora like google news or wikipedia. in the future work, we plan to focus more on modifying profession sets and defining sets over time to overcome these problems. our results indicate that as languages evolve over time, defining sets and profession sets would have to evolve to measure gender bias. in this study, we focused on arabic and chinese, but we would like to extend our work to more languages. adding an english corpora may be our next step. although we like to actively focus on languages besides english, english can serve as an important comparison point because so much of the modern nlp tool chain has been optimized for english. we may be able to study the impact of changes in profession sets and defining sets over time with fewer complicating factors. we would also like to experiment with different advanced arabic nlp techniques like stemming and lemmatization @xcite and see how applying such techniques could improve the results and reduce arabic's orthographical ambiguity or even other arabic nlp-related current issues like correcting spelling errors, especially in arabic dialects, where there are no official orthography rules @xcite .