Evaluating Short-Term Temporal Fluctuations of Social Biases in Social Media Data and Masked Language Models (2024)

Abstract: Social biases such as gender or racial biases have been reported in language models (LMs), including Masked Language Models (MLMs). Given that MLMs are continuously trained with increasing amounts of additional data collected over time, an important yet unanswered question is how the social biases encoded with MLMs vary over time. In particular, the number of social media users continues to grow at an exponential rate, and it is a valid concern for the MLMs trained specifically on social media data whether their social biases (if any) would also amplify over time. To empirically analyse this problem, we use a series of MLMs pretrained on chronologically ordered temporal snapshots of corpora. Our analysis reveals that, although social biases are present in all MLMs, most types of social bias remain relatively stable over time (with a few exceptions). To further understand the mechanisms that influence social biases in MLMs, we analyse the temporal corpora used to train the MLMs. Our findings show that some demographic groups, such as male, obtain higher preference over the other, such as female on the training corpora constantly.

## introduction despite their usage in numerous nlp applications, mlms such as bert @xcite and roberta @xcite tend to encode discriminatory social biases expressed in human-written texts in the training corpora @xcite @xcite . for example, if a model is given "[mask] is a nurse." as the input, a gender biased mlm would predict "she" with a higher likelihood score than for "he" when filling the @xcite . such social biases can result 1 an anonymised version of the code is submitted to arr and will be publicly released upon paper acceptance. note that we are mainly using existing evaluation code in this submission (which is referred to in the paper), and thus we do not present a new model or evaluation metric. in unfavourable experiences for some demographic groups in certain applications. continuous use of biased models has the potential to amplify biases and unfairly discriminate against users belonging to particular demographic groups. mlms are increasingly used in real-world applications such as text generation @xcite , recommendation systems @xcite , search engines @xcite and dialogue systems @xcite . therefore, it is crucial to study how mlms potentially shape social biases. on the other hand, social biases may change due to societal changes, cultural shifts and technological advancements. mlms have been trained on ever-increasing massive corpora, often collected from the web. in particular, posts on social media, such as but not limited to reddit and x (former twitter), have been used to train mlms. social biases contained in the training data are inadvertently learned and perpetuated by mlms. at the time of writing, there are 5.07 billion social media users worldwide with 259 million new users joining since this time in 2023. to answer this question, we investigate multiple mlms pretrained on snapshots of corpora collected from x at different points in time and evaluate the social biases in those mlms using multiple benchmark datasets. we evaluate different types of social biases and observe that the overall bias tends to be stable over time, however, certain types of biases, such as race, skin color, religion, and sexual orientation, exhibit fluctuation over time. based on the experimental results, we note that relying exclusively on the overall bias score can be misleading when evaluating social bias in mlms, which high-lights the importance of evaluating individual bias scores before deploying a model in downstream applications. note that we primarily investigate whether language models (lms) trained on social media data exhibit increasing levels of social biases over time in this paper. our focus is on examining the trends in temporal variations of social biases in both models and datasets. exploring the underlying causes could lead to sociologically oriented experiments and research questions, which are beyond the scope of this nlp-focused study. in contrast, alternative research focuses on social biases in various downstream applications. @xcite assessed gender and racial biases across 219 automatic sentiment analysis systems, revealing statistically significant biases in several of these systems. @xcite investigated age-related biases in sentiment classification and found that many sentiment analysis systems, as well as word embeddings, encode significant age bias in their outputs. @xcite studied gender biases and sentiment biases associated with person name translations in neural machine translation systems. current bias evaluation methods use different approaches, including pseudo-likelihood. @xcite , cosine similarity @xcite , inner-product @xcite , among others. independently of any downstream tasks, intrinsic bias evaluation measures @xcite @xcite assess social biases in mlms on a standalone basis. nevertheless, considering that mlms serve to represent input texts across various downstream tasks, several prior studies have suggested that the evaluation of social biases should be conducted in relation to those specific tasks @xcite . @xcite demonstrated that there is only a weak correlation between intrinsic and extrinsic social bias evaluation measures. in this paper, we use aula which is an intrinsic measure for evaluating social biases in mlms. various debiasing methods have been proposed to mitigate social biases in mlms. @xcite proposed a debiasing method by swapping the gender of female and male words in the training data. @xcite showed that dropout regularisation can reduce overfitting to gender information, thereby can be used for debiasing pretrained language models. @xcite proposed a method for debiasing by orthogonalising the vectors representing gender information with the hidden layer of a language model given a sentence containing a stereotypical word. our focus in this paper is the evaluation of social biases rather than proposing bias mitigation methods. temporal variations in mlms. diachronic language models that capture the meanings of words at a specific timestamp have been trained using historical corpora @xcite . @xcite introduced a temporal attention mechanism by extending the self-attention mechanism in transformers. they took into account the time stamps of the documents when calculating the attention scores. @xcite proposed an unsupervised method to learn dynamic contextualised word embeddings via time-adapting a pretrained mlm using prompts from manual and automatic templates. @xcite proposed a method to predict the semantic change of words by comparing the distributions of contextualised embeddings for the word between two corpora sampled at different timestamps. @xcite used word sense distributions to predict semantic changes of words in english, german, swedish and latin. on the other hand, zeng et al. (2017) learned socialised word embeddings by taking into account both the personal characteristics of language used by a social media user and the social relationships of that user. @xcite learned demographic word embeddings, covering attributes such as age, gender, location and religion. @xcite demonstrated that temporal factors exert a more significant influence than socio-cultural factors in determining the semantic variations of words. however, to the best of our knowledge, the temporal changes of social biases in mlms remains understudied, and our focus in this paper is to fill this gap. ## temporal data and models to investigate the temporal variant of social biases appearing in the corpora, we retrieve the posts on x with different timestamps. furthermore, we take into account the mlms trained on those temporal corpora to study how mlms potentially shape social biases from these corpora. in this section, we describe the temporal data and the mlms that we used in the paper. ## experimental setting our goal in this paper is to study whether mlms capture temporal changes in social biases, following the same patterns observed in the biases present in training corpora. for this purpose, we evaluate social biases in mlms and compare the biases observed in training corpora. ## temporal variation of social biases in this section, we describe the key findings of our paper, presenting a comprehensive analysis and interpretation of the results. ## conclusion we studied the temporal variation of social biases appearing in the data as well as in mlms. we conducted a comprehensive study using various pretrained mlms trained on different snapshots of datasets collected at different points in time. while social biases associated with some demographic groups undergo changes over time, the results show that the overall social biases, as captured by language models and as analysed on the underlying corpora, remain relatively stable. therefore, using the overall bias score without considering different bias types to indicate social biases present in mlms can be misleading. we encourage future research to consider different types of biases for study, where these biases can be more pronounced.