Word embeddings are used in most natural language processing tools. Apart from capturing semantic information, word embeddings are also known to capture bias in society (Bolukbasi et al., 2016). While most research has been focused on languages like English, less research has been done on low-resource languages and languages that have a grammatical gender. A language with grammatical has a gender associated with every noun irrespective of whether the noun is animate or inanimate, e.g., a river in Hindi has feminine gender. In contrast, words like writer have masculine and feminine counterparts. This gender association affects the pronouns, adjectives, and verb forms used during sentence construction. Grammatical genders in Hindi are masculine and feminine. In Marathi, there additionally exists a third neutral gender as well. Spoken by more than 600 million people, Hindi is the 3rd most spoken language in the world. Marathi is the 14th most spoken language with approximately 120 million speakers 111https://www.mentalfloss.com/article/647427/most-spoken-languages-world. Given the expanse and the amount of people speaking these languages, it is essential to address the bias introduced by the computational applications of these languages.
We create a dataset of gendered and neutral occupation titles. We also create a dataset with words of different emotions like anger, fear, joy, and sadness. First, we identify existing gender bias by defining a subspace that captures the gender information. There are several ways to find this information, such as Principal Component Analysis (PCA) and Relational Inner Product Association (RIPA). We use the existing metrics for evaluation: Embedding Coherence Test(Dev and Phillips, 2019), Relative Norm Distance (Garg et al., 2018). We modify these formulas so that they are correctly applicable to these gendered languages. We perform our experiments on the FastText word embeddings.
Next, we mitigate the gender bias found by the aforementioned using two approaches: Projection and Partial Projection. In summary, the key contributions of this paper are:
Dataset of emotions, and gendered and neutral occupations in Hindi and Marathi.
Methods to quantify the bias present in Hindi and Marathi word embeddings using the above dataset.
Mitigate the bias through existing debiasing techniques.
2 Related work
Previous work to quantify and measure bias was done by Bolukbasi et al. (2016). They tried to find out a gender subspace by using gender-definition pairs. They proposed a hard de-biasing method that identifies the gender subspace and tries to remove its components from the embeddings.
The maximum amount of research on gender bias is being done in English, which is not gendered (Stanczak and Augenstein, 2021). Languages like Spanish or Hindi have a grammatical gender, i.e., every noun is assigned a gender. Zhou et al. (2019) was one of the first papers to examine bias in languages with grammatical gender like French and Spanish. They used a modified version of the Word Embedding Association Test (WEAT) (Caliskan et al., 2017) to quantify the bias.
Sun et al. (2019) suggested mitigation techniques to remove gender bias like data augmentation, gender-swapping, and hard de-biasing according to the downstream task in NLProc.
Being low-resource languages, there is less research done in languages like Hindi and Marathi. Previous work in Indic Languages was done by Pujari et al. (2019)
where they built an SVM classifier to identify the bias and classify it. The problem with this method is that it needs a labeled gender dataset beforehand to train the classifier. Recent work byRamesh et al. (2021) tries to find out bias in English-Hindi machine translation. They implement a modified version of the TGBI metric based on grammatical considerations for Hindi. TGBI metric is used to detect and evaluate gender bias in Machine Translation systems. Malik et al. (2021) measure Hindi specific societal biases like religion bias and caste bias along with gender bias.
In Bolukbasi et al. (2016), the authors have compiled a list of professions in English and tried to find bias in them. Similarly, we compile a list of 166 professions, each in Hindi and Marathi languages. We split the professions into two parts, first is gender-neutral and the other is gendered . Similarly, we create a list of words of different emotions similar to the one in Kiritchenko and Mohammad (2018) in Hindi and Marathi languages. The emotions are broadly classified into four types: anger, fear, joy, and sadness.
We have verified this data with the help of 5 independent native speakers of these languages. We also create pair of feminine and masculine seed word pairs in both the languages to identify the gender subspace. For example: queen, king. We call them target words . Target words for Hindi Language is shown in figure 1. The dataset is available here 222https://github.com/neeraja1504/GenderBias_corpus
We test the bias on our data using FastText embeddings. FastText is a word embedding method that extends the word2vec model. Instead of learning vectors for words directly, FastText represents each word as an n-gram of characters. This helps capture the meaning of shorter words and allows the embeddings to understand suffixes and prefixes. A skip-gram model is trained to learn the embeddings once the word has been represented using character n-gramsBojanowski et al. (2016).
Morphology is the field of linguistics that studies the internal structure of words. Morphologically rich languages refer to languages that contain a substantial amount of grammatical information (Comrie, 1999). Indic languages are morphologically rich because of the existence of a large number of different word forms. FastText embeddings are the best choice for Indian Languages as they are capable of capturing and integrating sub-word information using character n-gram embeddings during training (Kunchukuttan et al., 2020).
4.1 Bias Statement
Various definitions of bias exist and vary in research as explained in the paper (Blodgett et al., 2020). Our work focuses on stereotypical associations between masculine and feminine gender and professional occupations and emotions in FastText word embeddings. The classic example of "He is a doctor" and "She is a nurse" comes into play here. It is especially harmful to the representation of minority communities, since these stereotypes often end up undermining these communities (Moss-Racusin et al., 2012). Downstream NLP applications learn from these stereotypes, and the risk of discrimination on the basis of gender in this case keeps seeping further into the system.
Our work tries to de-correlate gender with occupation and emotions, which will help reduce bias in these systems.
4.2 Quantifying bias for Occupations and Emotions
We use the following methods to quantify the bias before and after debiasing. is used for gendered attributes like gendered occupations. is used for neutral attributes like emotions and neutral occupations. We use these two different methods because our data has two different parts — gendered and neutral.
4.2.1 For neutral occupations:
ECT-n: Dev and Phillips (2019) use this test to measure bias. We use the target word pairs , and the neutral attributes list . We separate the target word pairs into masculine and feminine-targeted words respectively. For each of the pairs in we create two means and .
are masculine word embeddings, are feminine word embeddings of the target word pairs
. We then create two arrays, one with the cosine similarity between the neutral word embeddings and, the other with the neutral word embeddings and . We calculate the Spearman correlation between the rank orders of these two arrays found. Spearman rank correlation is a non-parametric test that is used to measure the degree of association between two variables. Higher the correlation, the less the bias. The range of the correlation is . Ideally, the correlation should be equal to one as the professions or emotions should not depend upon gender. Debiasing should bring the value closer to one.
RND-n: Relative Norm Distance was first used by Garg et al. (2018). It captures the relative strength of the association of a neutral word with respect to two groups. As shown in equation 3 we average the masculine and feminine-targeted words in , in respectively. For every attribute, in , emotions we find the norm of the average of the target words and the attribute . The higher the value of the relative norm, the more biased our professions and emotions are. Debiasing should reduce this value and bring it closer to zero.
4.2.2 For gendered occupations:
ECT-g: We use the target word pairs and the gendered professions list . Using found in equation 1 and found in equation 2. has masculine and feminine profession word pairs. We create two arrays, one with cosine similarity of masculine profession word embeddings and . The other with the cosine similarity of feminine profession word embeddings and . We calculate the Spearman correlation of the rank of these two arrays.
Ideally, there should be a high correlation between these arrays. The masculine profession words’ cosine similarity with masculine target words should equal feminine profession words’ cosine similarity with feminine target words. The range of the correlation is . Higher the correlation, the less the bias. Debiasing should bring the value closer to one.
RND-g: As shown in equation 4 we average the masculine and feminine-targeted words in , in , respectively. For every attribute pair and in we find the norm of the average of the masculine target words and , feminine target words and . The higher the value of the relative norm, the more biased the professions are. Debiasing should reduce this value and bring it closer to zero.
4.3 Debiasing techniques
4.3.1 Finding out the gender subspace
We need a vector that represents the gender direction. We find this in the following ways: using RIPA and PCA.
RIPA: Ethayarajh et al. (2019)
first used this subspace to capture gender information. We define a bias vectorwhich defines the gender direction. Given the target set containing masculine and feminine words, for each in , we find out and stack them to create an array. is the feminine word embedding, is the masculine word embedding. We find the first principal component using Principal Component Analysis (PCA) of the array found above. This component captures the gender information of the given embeddings.
PCA: In this method, given , we find out the average of the masculine and feminine word embeddings for each given pair. We then compute and for each in . We stack them into an array and find out the first component using the PCA of the above array.
4.3.2 Debiasing methods
Bolukbasi et al. (2016) used Hard Debiasing to mitigate bias. However, in Gonen and Goldberg (2019), they show how this method is ineffective in debiasing the embeddings. Here we use more straightforward methods to debias our data.
Projection: One way to remove bias is to make all the vectors orthogonal to the gender direction. Therefore, we remove the component of from all the vectors. This ensures that there is no component along the gender direction.
Partial Projection: One problem with the debiasing using linear projection is that it changes some word vectors which are gendered by definition, e.g., king, queen. Let where be the mean of a target pair. Here m is the length of . We suggest the new vector as shown in equation 6. This is similar to the linear projection approach, but instead of zero magnitude along the gender direction, we project a magnitude of constant along with it. This adds a constant to the debiasing term.
5 Results and Discussion
Table 1 and 2 show results for the emotions in Hindi and Marathi respectively. We observe that anger is the most biased in both languages according to the ECT metric as it has the lowest value. Amongst the debiasing techniques, we see that partial projection with RIPA works the best for the ECT metric and partial projection with PCA works the best for the RND metric.
ECT-n and RND-n are results for neutral occupations, and ECT-g and RND-g are for gendered occupations. Table 3 shows the results for both gendered and neutral occupations in Hindi. We see that partial projection We see that for neutral occupations, partial projection with PCA works the best for ECT and partial projection with RIPA works the best for RND. For gendered occupations, we see that partial projection with PCA works the best for both ECT and RND.
Table 4 shows the results for both gendered and neutral occupations in Marathi. We see that the best results are obtained for neutral occupations with partial projection with PCA for ECT and partial projection with RIPA for RND. For gendered occupations, we see that we get the best results with partial projection with RIPA for ECT and RND.
However, we observe some anomalies in the results when projection debiasing method is used. We hypothesize that completely removing the gender information changes some vectors, which are masculine or feminine, by the grammatical definition of the gender. For example, words like king, grandfather and boy which are masculine by the grammatical definition of gender should preserve their gender information. Hence we note that partial projection performs the best because it has a gender component to it.
6 Conclusion and Future work
In this paper, we attempted to find gender stereotypes on occupations and emotions and tried to debias them. Embedding Coherence Test and Relative Norm Distance were used as a bias metric in the gender subspace. The debiasing methods used were projection and partial projection. But we see that partial projection as a debiasing method works the best in most cases.
Future work could include trying out these techniques on downstream tasks and checking the performance before and after debiasing. The main problem with experimenting on downstream tasks is the availability of datasets in these languages. We would also like to experiment with debiasing contextual embeddings and large language models. Apart from that we would also like to address other types of bias like religion, social and cultural, which are particularly inherent in Hindi and Marathi.
- Language (technology) is power: a critical survey of “bias” in nlp. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 5454–5476. Cited by: §4.1.
- Enriching word vectors with subword information. CoRR abs/1607.04606. External Links: Cited by: §3.
- Man is to computer programmer as woman is to homemaker? debiasing word embeddings. Advances in neural information processing systems 29, pp. 4349–4357. Cited by: §1, §2, §3, §4.3.2.
- Semantics derived automatically from language corpora contain human-like biases. Science 356 (6334), pp. 183–186. Cited by: §2.
- Grammatical gender systems: a linguist’s assessment. Journal of Psycholinguistic research 28 (5), pp. 457–466. Cited by: §3.
Attenuating bias in word vectors.
The 22nd International Conference on Artificial Intelligence and Statistics, pp. 879–887. Cited by: §1, item 1.
- Understanding undesirable word embedding associations. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, pp. 1696–1705. External Links: Cited by: item 1.
- Word embeddings quantify 100 years of gender and ethnic stereotypes. Proceedings of the National Academy of Sciences 115 (16), pp. E3635–E3644. Cited by: §1, item 2.
- Lipstick on a pig: debiasing methods cover up systematic gender biases in word embeddings but do not remove them. arXiv preprint arXiv:1903.03862. Cited by: §4.3.2.
Examining gender and race bias in two hundred sentiment analysis systems. arXiv preprint arXiv:1805.04508. Cited by: §3.
- Ai4bharat-indicnlp corpus: monolingual corpora and word embeddings for indic languages. arXiv preprint arXiv:2005.00085. Cited by: §3.
- Socially aware bias measurements for hindi language representations. arXiv preprint arXiv:2110.07871. Cited by: §2.
- Science faculty’s subtle gender biases favor male students. Proceedings of the national academy of sciences 109 (41), pp. 16474–16479. Cited by: §4.1.
- Debiasing gender biased hindi words with word-embedding. In Proceedings of the 2019 2nd International Conference on Algorithms, Computing and Artificial Intelligence, pp. 450–456. Cited by: §2.
- Evaluating gender bias in hindi-english machine translation. In Proceedings of the 3rd Workshop on Gender Bias in Natural Language Processing, pp. 16–23. Cited by: §2.
- A survey on gender bias in natural language processing. arXiv preprint arXiv:2112.14168. Cited by: §2.
- Mitigating gender bias in natural language processing: literature review. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, pp. 1630–1640. External Links: Cited by: §2.
- Examining gender bias in languages with grammatical gender. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China, pp. 5276–5284. External Links: Cited by: §2.