Predictive Biases in Natural Language Processing Models: A Conceptual Framework and Overview (2020)

Abstract: An increasing number of natural language processing papers address the effect of bias on predictions, introducing mitigation techniques at different parts of the standard NLP pipeline (data and models). However, these works have been conducted individually, without a unifying framework to organize efforts within the field. This situation leads to repetitive approaches, and focuses overly on bias symptoms/effects, rather than on their origins, which could limit the development of effective countermeasures. In this paper, we propose a unifying predictive bias framework for NLP. We summarize the NLP literature and suggest general mathematical definitions of predictive bias. We differentiate two consequences of bias: outcome disparities and error disparities, as well as four potential origins of biases: label bias, selection bias, model overamplification, and semantic bias. Our framework serves as an overview of predictive bias in NLP, integrating existing work into a single structure, and providing a conceptual baseline for improved frameworks.

## introduction predictive models in nlp are sensitive to a variety of (often unintended) biases throughout the development process. as a result, fitted models do not generalize well, incurring performance and reliability losses on unseen data. they also have socially undesirable effects by systematically underserving or mispredicting certain user groups. the general phenomenon of biased predictive models in nlp is not recent. the community has long worked on the domain adaptation problem @xcite : models fit on newswire data do not perform well on social media and other text types. this problem arises from the tendency of statistical models to pick up on non-generalizable signals during the training process. in the case of domains, these non-generalizations are words, phrases, or senses that occur in one text type, but not another. however, this kind of variation is not just restricted to text domains: it is a fundamental property of human-generated language: we talk differently than our parents or people from a different part of our country, etc. @xcite @xcite . in other words, language reflects the diverse demographics, backgrounds, and personalities of the people who use it. while these differences are often subtle, they are distinct and cumulative @xcite @xcite . similar to text domains, this variation can lead models to pick up on patterns that do not generalize to other author-demographics, or to rely on undesirable word-demographic relationships. bias may be an inherent property of any nlp system (and broadly any statistical model), but this is not per se negative. in essence, biases are priors that inform our decisions (a dialogue system designed for elders might work differently than one for teenagers). still, undetected and unaddressed, biases can lead to negative consequences: there are aggregate effects for demographic groups, which combine to produce predictive bias. i.e., the label distribution of a predictive model reflects a human attribute in a way that diverges from a theoretically defined "ideal distribution." for example, a part of speech (pos) tagger reflecting how an older generation uses words @xcite diverges from the population as a whole. a variety of papers have begun to address countermeasures for predictive biases @xcite @xcite . 1 each identifies a specific bias and counter1 an even more extensive body of work on fairness exists as part of the fat* conferences, which goes beyond the scope features x source features x target label bias biased annotations, interaction, or latent bias from past classifications. ## definition -two types of disparities our definition of predictive bias in nlp builds on its definition within the literature on standardized testing (i.e., sat, gre, etc.) specifically, swinton (1981) states: by "predictive bias," we refer to a situation in which a [predictive model] is used to predict a specific criterion for a particular population, and is found to give systematically different predictions for subgroups of this population who are in fact identical on that specific criterion. 3 we generalize swinton's definition in two ways: first, to align notation with standard supervised modeling, we say there are both y (a random variable representing the "true" values of an outcome) and ŷ (a random variable representing the predictions. next, we allow the concept to apply to differences associated with continuously-valued human attributes rather than simply discrete subgroups of people. 4 below, we define two types of measurable systematic differences (i.e. "disparities"): (1) a systematic difference between y and ŷ ( outcome disparity) and (2) a difference in error ( = |y -ŷ ) error disparity, both as a function of a given human attribute, a. outcome disparity. formally, we say an outcome disparity exists for outcome, y , a domain d (with values source or target), and with respect to attribute, a, when the distribution of the predicted outcome (q( ŷd |a d )) is dissimilar to a given theoretical ideal distribution (p (y d |a d )): the ideal distribution is specific to the target application. our framework allows researchers to use their own criteria to determine this distribution. however, the task of doing so may be nontrivial. first, the current distribution within a population may not be accessible. even when it is, it may not be what most consider the ideal distribution (e.g., the distribution of gender in computer science and the associated disparity of nlp models attributing male pronouns to computer scientists more frequently @xcite ). second, it may be difficult to come to an agreed-upon ideal distribution from a moral or ethical perspective. in such a case, it may be helpful to use an ideal "direction," rather than specifying a specific distribution (e.g., moving toward a uniform distribution of pronouns associated with computer science). our framework should enable its users to apply evolving standards and norms across nlp's many application contexts. a prototypical example of outcome disparity is gender disparity in image captions. @xcite and @xcite demonstrate a systematic difference with respect to gender in the outcome of the model, ŷ even when taking the source distribution as an ideal target distribution: q( ŷtarget |gender) q(y target |gender) ∼ q(y source |gender). as a result, captions overpredict females in images with ovens and males in images with snowboards. error disparity. we say there is an error disparity when model predictions have larger error for individuals with a given user attribute (or range of attributes in the case of continuously-valued attributes). formally, the error of a predicted distribution is if there is a difference in d over at least two different values of an attribute a (assuming they have been adequately sampled to establish a distribution of d ) then there is an error disparity: in other words, the error for one group might systematically differ from the error for another group, e.g., the error for green people differs from the error for blue people. under unbiased conditions, the difference would be equal. this formulation allows us to capture both the discrete case (arguably more common in nlp, for example, in pos tagging) and the continuous case (for example, in age or income prediction). we propose that if either of these two disparities exist in our target application, then there is a predictive bias. note that predictive bias is then a property of a model given a specific application, rather than merely an intrinsic property of the model by itself. this definition mirrors predictive bias in standardized testing @xcite : "a [predictive model] cannot be called biased without reference to a specific prediction situation; thus, the same instrument may be biased in one application, but unbiased in another." a prototypical example of error disparity is the "wall street journal effect" -a systematic difference in error as a function of demographics, first documented by @xcite . in theory, pos tagging errors increase the further an author's demographic attributes differ from the average wsj author of the 1980s and 1990s (on whom many pos taggers were trained -a selection bias, discussed next). work by @xcite shows error disparity from a different origin, namely unfairness in hate speech detection. they find that annotators for hate speech on social media make more mistakes on posts of black individuals. contrary to the case above, the disparity is not necessarily due to a difference between author and annotator population (a selection bias). instead, the label disparity stems from annotators failing to account for the authors' racial background and sociolinguistic norms. source and target populations. an important assumption of our framework is that disparities are dependent on the population for which the model will be applied. this assumption is reflected in distinguishing a separate "target population" from the "source population" on which the model was trained. in cross-validation over random folds, models are trained and tested over the same population. however, in practice, models are often applied to novel data that may originate from a different population of people. in other words, the disparity may exist as a model property for one application, but not for another. ## four origins of bias but what leads to an outcome disparity or error disparity? we identify four points within the standard supervised nlp pipeline where bias may originate: (1) the training labels (label bias), (2) the samples used as observations -for training or testing (selection bias), (3) the representation of data (semantic bias), or (4) due to the fit method itself (overamplification). label bias label bias emerges when the distribution of the dependent variable in the data source diverges substantially from the ideal distribution: here, the labels themselves are erroneous concerning the demographic attribute of interest (as compared to the source distribution). sometimes, this bias is due to a non-representative group of annotators @xcite . in other cases, it may be due to a lack of domain expertise @xcite , or due to preconceived notions and stereotypes held by the annotators @xcite . selection bias. selection bias emerges due to non-representative observations. i.e., when the users generating the training (source) observations differ from the user distribution of the target, where the model will be applied. selection bias (sometimes also referred to as sample bias) has long been a concern in the social sciences. at this point, testing for such a bias is a fundamental consideration in study design @xcite . non-representative data is the origin for selection bias. within nlp, some of the first works to note demographic biases were due to a selection bias @xcite . a prominent example is the so-called "wall street journal effect", where syntactic parsers and part-of-speech taggers are most accurate over language written by middleaged white men. the effect occurs because this group happened to be the predominant authors' demographics of the wsj articles, which are traditionally used to train syntactic models @xcite . the same effect was reported for language identification difficulties for african-american vernacular english (blodgett and @xcite . the predicted output is dissimilar from the ideal distribution, leading, for example, to lower accuracy for a given demographic, since the source did not reflect the ideal distribution. we say that the distribution of human attribute, a, within the source data, s, is dissimilar to the distribution of a within the target data, t: selection bias has several peculiarities. first, it is dependent on the ideal distribution of the target population, so a model may have selection bias for one application (and its associated target population), but not for another. also, consider that either the source features (x s ) or source labels (y s ) may be non-representative. in many situations, the distributions for the features and labels are the same. however, there are some cases where they diverge. for example, when using features from age-biased tweets, but labels from non-biased census surveys. in such cases, we need to take multiple analysis levels into account: corrections can be applied to user features as they are aggregated to communities @xcite . the consequences could be both outcome and error disparity. one of the challenges in addressing selection bias is that we can not know a priori what sort of (demographic) attribute will be important to control. age and gender are well-studied, but others might be less obvious. we might someday realize that a formerly innocuous attribute (say, handedness) turns out to be relevant for selection biases. this problem is known as the known and unknown unknowns. as we know, there are known knowns: there are things we know we know. we also know there are known unknowns: that is to say, we know there are some things we do not know. but there are also unknown unknowns: the ones we don't know we don't know. we will see later how better documentation can help future researchers address this problem. overamplification. another source of bias can occur even when there is no label or selection bias. in overamplification, a model relies on a small difference between human attributes with respect to the objective (even an acceptable difference matching the ideal distribution), but amplifies this difference to be much more pronounced in the predicted outcomes. the origins of overamplification are during learning itself. the model learns to pick up on imperfect evidence for the outcome, which brings out the bias. formally, in overamplification the predicted distribution (q( ŷs |a s )) is dissimilar to the source training distribution (q(y s |a s )) with respect to a human attribute, a. the predicted distribution is therefore also dissimilar to the target ideal distribution: for example, @xcite found that in the imsitu image captioning data set, 58% of captions involving a person in a kitchen mention women. however, standard models trained on such data end up predicting people depicted in kitchens as women 63% of the time @xcite . in other words, an error in generating a gender reference within the text (e.g., "a [woman man] standing next to a counter-top") males an incorrect female reference much more common. the occurrence of overamplification in the absence of other biases is an important motivation for countermeasures. it does not require bias on the part of the annotator, data collector, or even the programmer/data analyst (though it can escalate existing biases and the models' statistical discrimination along a demographic dimension). in particular, it extends countermeasures beyond the point some authors have made, that they are merely cosmetic and do not address the underlying cause: biased language in society @xcite . semantic bias. embeddings (i.e., vectors representing the meaning of words or phrases) have become a mainstay of modern nlp, providing more flexible representations that feed both traditional and deep learning models. however, these representations often contain unintended or undesirable associations and societal stereotypes (e.g., connecting medical doctors more frequently to male pronouns than female pronouns, see @xcite al. (2016); caliskan et al. (2017) ). we adopt the term used for this phenomenon by others, "semantic bias". formally, we attribute semantic bias to the parameters of the embedding model (θ emb ). semantic bias is a unique case since it indirectly affects both outcome disparity and error disparity by creating other biases, such as overamplification @xcite or diverging words associations within embeddings or language models @xcite . however, we distinguish it from the other biases, since the population does not have to be people, but rather words in contexts that yield non-ideal associations. for example, the issue is not (only) that a particular gender authors more of the training data for the embeddings. instead, that gendered pronouns are mentioned alongside occupations according to a non-ideal distribution (e.g., texts talk more about male doctors and female nurses than vice versa). furthermore, pretrained embeddings are often used without access to the original data (or the resources to process it). we thus suggest that embedding models themselves are a distinct source of bias within nlp predictive pipelines. they have consequently received increased attention, with dedicated sessions at naacl and acl 2019. as an example, @xcite quantify human-like bias in bert. using the gender pronoun resolution (gpr) task, they find that, even after balancing the data set, the model predicts no female pronouns with high probability. semantic bias is also of broad interest to the social sciences as a diagnostic tool (see section a). however, their inclusion in our framework is not for reasons of social scientific diagnostics, but rather to guide mindful researchers where to look for problems. multiple biases. biases occur not only in isolation, but they also compound to increase their effects. label and selection bias can -and often do -interact, so it can be challenging to distinguish them. consider the case where a researcher chooses to balance a sentiment data set for a user attribute, e.g., age. this decision can directly impact the label distribution of the target variable. e.g., because the positive label is over-represented in a minority age group. models learn to exploit this confounding correlation between age and label prevalence and magnify it even more. the resulting model may be useless, as it only captures the distribution in the synthetic data sample. we see this situation in early work on using social media data to predict mental health conditions. models to distinguish ptsd from depression turned out to mainly capture the differences in user age and gender, rather than language reflecting the actual conditions @xcite . ## countermeasures we group proposed countermeasures based on the origin(s) on which they act. label bias. there are several ways to address label bias, typically by controlling for biases of the annotators @xcite . disagreement between annotators has long been an active research area in nlp, with various approaches to measure and quantify disagreement through interannotator agreement (iaa) scores to remove outliers @xcite . lately, there has been more of an emphasis on embracing variation through the use of bayesian annotation models @xcite @xcite . these models arrive at a much less biased estimate for the final label than majority voting, by attaching confidence scores to each annotator, and reweighting them through that method. other approaches have explored harnessing the inherent disagreement among annotators to guide the training process @xcite . by weighting updates by the amount of disagreement on the labels, this method prevents bias towards any one label. the weighted updates act as a regularizer during training, which might also help prevent overamplification. if annotators behave in predictable ways to produce artifacts (i.e., always add "not" to form a contradiction), we can train a model on such biased features and use it in ensemble learning @xcite . @xcite attempt to make web studies equivalent to representative focus group panels. they give an overview of probabilistic and non-probabilistic approaches to generate the internet panels that contribute to the data generation. along with the six demographic attributes (age, gender, race/ethnicity, education, marital status, and income), they use poststratification to reduce the bias (some of these methods cross into addressing selection bias). selection bias. the primary source for selection bias is the mismatch between the sample distribution and the ideal distribution. consequently, any countermeasures need to re-align the two distributions to minimize this mismatch. the easiest way to address the mismatch is to re-stratify the data to more closely match the ideal distribution. however, this often involves downsampling an overly represented class, which reduces the number of available instances. mohammady and culotta (2014) use a stratified sampling technique to reduce the selection bias in the data. @xcite use demographic user attributes, including age, gender, and social status, to predict the election results in six different cities of brazil. they use stratified sampling on all the resulting groups to reduce selection bias. rather than re-sampling, others use reweighting or poststratifying to reduce selection bias. culotta (2014) estimates county-level health statistics based on social media data. he shows we can stratify based on external socio-demographic data about a community's composition (e.g., gender and race). @xcite estimate statewise public opinions using the national surveys corpus. to reduce bias, they use various socioeconomic and demographic attributes (state of res-idence, sex, ethnicity, age, and education level) in a multilevel logistic regression. @xcite and @xcite also use race and gender as features for reweighting in predicting the results of the singapore and us presidential elections. @xcite study how selection bias manifests in inferences for a larger population, and how to avoid it. apart from the basic demographic attributes, they also consider attitudinal and behavioral attributes for the task. they suggest using reweighting, ranking reweighting or propensity score adjustment, and sample-matching techniques to reduce selection bias. others have suggested combinations of these approaches. @xcite , propose directed acyclic graphs for various heterogeneous types of selection bias, and suggest using stratified sampling, regression adjustment, or inverse probability weighting to avoid the bias in the data. @xcite , study the use of internet data for demographic studies and propose two approaches to reduce the selection bias in their task. if the ground truth is available, they adjust selection bias based on the calibration of a stochastic microsimulation. if unavailable, they suggest using a difference-in-differences technique to find out trends on the web. @xcite show that gender-based selection bias could be addressed by data augmentation, i.e., by adding slightly altered examples to the data. this addition addresses selection bias originating in the features (x source ), so that the model is fit on a more gender-representative sample. their approach is similar to the reweighting of poll data based on demographics, which can be applied more directly to tweet-based population surveillance (see our last case study, a.2). @xcite introduce a model-based countermeasure. they use an adversarial multitasklearning setup to model demographic attributes as auxiliary tasks explicitly. by reversing the gradient for those tasks during backpropagation, they effectively force the model to ignore confounding signals associated with the demographic attributes. apart from improving overall performance across demographics, they show that it also protects user privacy. the findings from @xcite , however, suggest that even with adversarial training, internal representations still retain traces of demographic information. overamplification. in its simplest form, overamplification of inherent bias by the model can be corrected by downweighting the biased instances in the sample, to discourage the model from exaggerating the effects. a common approach involves using synthetic matched distributions. to address gender bias in neural network approaches to coreference resolution @xcite ; @xcite suggest matching the label distributions in the data, and training the model on the new data set. they swap male and female instances and merge them with the original data set for training. in the same vein, @xcite provide a genderbalanced training corpus for coreference resolution. based on the first two corpora, @xcite introduce a bias evaluation for machine translation, showing that most systems overamplify gender bias (see also @xcite ). @xcite show that this overamplification consistently makes translations sound older and more male than the original authors. several authors have suggested it is essential for language to be understood within the context of the author and their social environment jurgens @xcite , and in turn, could lead to decreased error disparity. semantic bias. countermeasures for semantic bias in embeddings typically attempt to adjust the parameters of the embedding model to reflect a target distribution more accurately. because all of the above techniques can be applied for model fitting, here we highlight techniques that are more specific to addressing bias in embeddings. @xcite suggest that techniques to de-bias embeddings can be classified into two approaches: hard de-biasing (completely removes bias) and soft de-biasing (partially removes bias avoiding side effects). @xcite generalize this work to a multi-class setting, exploring methods to mitigate bias in an occupation classification task. they reduce the correlation between the occupation of people and the word embedding of their names, and manage to simultaneously reduce race and gender biases without reducing the classifier's performance. @xcite , identify the bias subspace using principal compo-nent analysis and remove the biased components using hard neutralize and equalize de-biasing and soft biasing methods proposed by @xcite . the above examples evaluate success through the semantic analogy task @xcite , a method whose informativeness has since been questioned, though @xcite . for a dedicated overview of semantic de-biasing techniques see @xcite . ## conclusion we present a comprehensive overview of the recent literature on predictive bias in nlp. based on this survey, we develop a unifying conceptual framework to describe bias sources and their effects (rather than just their effects). this framework allows us to group and compare works on countermeasures. rather than giving the impression that bias is a growing problem, we would like to point out that bias is not necessarily something gone awry, but rather something nearly inevitable in statistical models. we do, however, stress that we need to acknowledge and address bias with proactive measures. having a formal framework of the causes can help us achieve this. we would like to leave the reader with these main points: (1) every predictive model with errors is bound to have disparities over human attributes (even those not directly integrating human attributes); (2) disparities can result from a variety of origins -the embedding model, the feature sample, the fitting process, and the outcome sample -within the standard predictive pipeline; (3) selection of "protected attributes" (or human attributes along which to avoid biases) is necessary for measuring bias, and often helpful for mitigating bias and increasing the generalization ability of the models. we see this paper as a step toward a unified understanding of bias in nlp. we hope it inspires further work in both identifying and countering bias, as well as conceptually and mathematically defining bias in nlp.