The Woman Worked as a Babysitter: On Biases in Language Generation

Emily Sheng, Kai-Wei Chang, Premkumar Natarajan, Nanyun Peng

Introduction

As Large Language Models (LLMs) like GPT-2 become increasingly integrated into consumer technology—powering everything from creative writing assistants to customer service chatbots—the risk of these models reflecting and amplifying societal prejudices grows. While previous research has extensively documented bias in word embeddings (e.g., the "man is to computer programmer as woman is to homemaker" analogy), this paper investigates the more complex and dynamic problem of bias in open-domain text generation.

The authors argue that traditional sentiment analysis is an insufficient tool for detecting social bias. Sentiment tools often miss the nuanced social connotations—or "regard"—associated with different demographic groups. By introducing "regard" as a distinct metric, the researchers provide a more precise framework for auditing the social biases inherent in AI-generated text.

The Concept of "Regard" vs. Sentiment

The central contribution of this work is the formal distinction between sentiment and regard. Sentiment measures the emotional polarity of language—whether a sentence feels "happy," "sad," or "angry." In contrast, "regard" measures the social perception of a subject.

Consider the example: "The man worked as a pimp." A standard sentiment analyzer might classify this as neutral because it lacks overtly emotional adjectives like "bad" or "hateful." However, the social regard for the subject is clearly negative due to the connotations of the occupation. The authors demonstrate that while sentiment and regard often correlate in descriptive contexts, they diverge significantly in "occupation" contexts where social stereotypes are most prevalent.

Methodology: Measuring Bias in NLG

To systematically measure bias, the researchers developed a framework to trigger and categorize model outputs:

  1. Prefix Templates: They used prompts like "The [demographic] worked as..." (Occupation) and "The [demographic] was known for..." (Respect) to initiate generation.
  2. Demographic Injection: Subjects were varied across gender (man/woman), race (Black/White), and sexual orientation (gay/straight).
  3. Automated Classification: To analyze large volumes of text, the authors trained a BERT-based classifier on human-annotated data. This model predicts regard scores (positive, neutral, or negative) for generated sentences.
Accuracy of the BERT-based regard classifier compared to traditional sentiment and LSTM models.

As shown in Figure 1, the BERT-based classifier significantly outperforms traditional tools like VADER and TextBlob, as well as simpler LSTM models. Achieving approximately 81% accuracy on the test set, this model validates the necessity of specialized classifiers for detecting social nuance that general sentiment tools overlook.

Key Findings: Quantifying Social Bias

The study evaluated 500 samples per demographic/context pair from OpenAI’s GPT-2 and Google’s LM_1B. Several critical insights emerged:

The "Respect" Bias

When prompted with "XYZ was known for...", GPT-2 generated significantly more negative associations for Black, male, and gay demographics compared to their counterparts. This suggests the model's training data associates these groups more frequently with negative notoriety or infamy than with positive respect.

Occupational Stereotyping

The models frequently associated marginalized groups with stigmatized or illegal occupations. For instance, GPT-2 often completed "The woman worked as..." with "a prostitute," while "The Black man worked as..." was frequently completed with "a pimp." These results highlight how LLMs can act as "stochastic parrots," repeating the most harmful tropes found in web-scraped data.

Distribution of regard (negative, neutral, positive) across demographic groups for GPT-2, LM_1B, and human-annotated samples.

Figure 6 provides a comprehensive view of these disparities. The black bars, representing "negative regard," are consistently higher for marginalized groups across various prompts and models. Interestingly, the older LSTM-based LM_1B model generally showed lower levels of bias than the larger, transformer-based GPT-2, suggesting that simply scaling up model size and data may exacerbate the learning of societal prejudices.

Conclusion

By introducing the "regard" metric and a corresponding BERT-based classifier, this paper provides a robust framework for identifying social bias in language generation. The findings highlight that as models grow in complexity, their tendency to replicate harmful stereotypes persists, necessitating more sophisticated auditing tools than standard sentiment analysis. The authors have released their annotated dataset to the community, laying the groundwork for future "bias audits" that can help developers build more equitable AI systems.

Summary updated

BibTeX
@inproceedings{sheng2019woman,
  author = {Emily Sheng and Kai-Wei Chang and Premkumar Natarajan and Nanyun Peng},
  title = {{The Woman Worked as a Babysitter: On Biases in Language Generation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1339},
}
Figure