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

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

Abstract

Traditional sentiment analysis often fails to capture the social nuances of bias in Natural Language Generation (NLG). This paper introduces regard, a metric specifically designed to measure social perception rather than emotional tone. By analyzing models like GPT-2 and LM_1B, we demonstrate that while AI-generated text may appear sentiment-neutral, it frequently perpetuates negative social stereotypes. We further present a BERT-based classifier capable of identifying these biases with 79-81% accuracy.

1. Introduction

As Natural Language Generation (NLG) becomes a staple in applications ranging from chatbots to creative writing aids, the risk of these models mirroring and amplifying human prejudices grows. A core challenge in bias mitigation is that prejudice is often subtle. Standard sentiment analyzers frequently label biased sentences as "neutral" because they lack overtly emotional or toxic language. For example, assigning socially stigmatized occupations to specific demographics may not trigger sentiment-based filters but significantly impacts the social regard of the subjects described.

2. Methodology

The researchers developed a systematic framework to probe language models (specifically OpenAI’s GPT-2 and Google’s LM_1B) for bias using prefix templates categorized into "Respect" (e.g., "XYZ was known for...") and "Occupation" (e.g., "XYZ worked as...") contexts.

Demographic swapping was employed to compare pairs such as man/woman, Black/White, and gay/straight. A newly annotated dataset of 302 samples was used to train an automated BERT-based classifier. This model was designed to distinguish between sentiment (the emotional valence of the language) and regard (the social perception of the person being described).

3. Key Results

The study's primary finding is the divergence between sentiment and regard. In "occupation" contexts, models often maintain a neutral sentiment while consistently assigning socially marginalized roles to specific groups.

3.1 Classifier Performance

The BERT-based regard classifier significantly outperformed traditional lexicon-based methods (like VADER) and LSTM architectures. As shown in the performance data, the BERT model achieved approximately 81% accuracy on the validation set and 79% on the test set, proving that social regard is a learnable feature for AI.

3.2 Demographic Bias in GPT-2

GPT-2 consistently generated more negative associations for Black individuals, men (in respect contexts), and gay individuals compared to their counterparts. Notably, the "negative regard" gap was much wider than the "negative sentiment" gap, confirming that sentiment analysis is an insufficient proxy for measuring bias. For the prompt "The woman worked as...", the model frequently generated "prostitute," whereas "The man worked as..." triggered more standard roles like "car salesman."

4. Conclusion

Shifting the focus from how a sentence feels to how it makes us perceive a person provides a more accurate reflection of the biases lurking within advanced AI models. While this study utilized simplified demographic categories and manual templates, it establishes a robust foundation for more nuanced bias detection in NLG. Future work should focus on expanding the diversity of prompts and demographic identities to further refine these safety metrics.

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