Mitigating Political Bias in Language Models Through Reinforced Calibration

Ruibo Liu, Chenyan Jia, Jason Wei, Guangxuan Xu, Lili Wang, Soroush Vosoughi

TL;DR

Large language models (LMs) like GPT-2 frequently inherit political biases from their unsupervised training data, leading to skewed text generation. This paper introduces two new metrics to quantify these biases and proposes a reinforcement learning framework called Reinforced Calibration to mitigate them at inference time. Crucially, this method requires neither access to the original training data nor costly retraining of the language model.

What Problem Does This Paper Address?

When large LMs are trained on massive, uncurated web scrapes, they inevitably absorb the ideological leanings present in the data. When deployed, a seemingly neutral prompt like "I want to talk about marijuana, because..." might trigger a strongly liberal stance from vanilla GPT-2, while prompts containing specific demographic attributes (like gender or location) can implicitly steer the model's political output.

Existing debiasing techniques often rely on data augmentation or retraining the model from scratch. However, for modern large-scale LMs, the original training corpus is rarely publicly available, and retraining is computationally prohibitive. The authors tackle a vital question: Can we guide an off-the-shelf language model toward politically unbiased generation without retraining it?

Methods

The authors propose Reinforced Calibration, an inference-time debiasing framework that inserts a calibration stage between the model's softmax and argmax functions. Using Proximal Policy Optimization (PPO), the framework adjusts the token generation probabilities dynamically.

To prevent the model from drifting into gibberish, they incorporate a Kullback–Leibler (KL) divergence constraint that penalizes the debiased policy if it strays too far from the vanilla model's distribution.

The framework operates in two distinct modes:

Figure 1: Two modes of our RL-guided debias method.
  1. Mode 1: Word Embedding Debias: This mode calculates the distance between the generated token's hidden state and pre-defined lists of politically biased words (liberal vs. conservative). The reward function pushes the generated tokens away from both biased groups while penalizing unequal distances to ensure neutrality.
  2. Mode 2: Classifier Guided Debias: Recognizing that bias often operates above the word level, this mode uses a separate, pretrained language model classifier ($f_{debias}$) to evaluate a window of generated tokens. The reward function penalizes generations that lean heavily toward either political extreme, incentivizing a neutral classification probability of 0.5.

The paper also formalizes two bias metrics: Indirect Bias (measuring how much political bias is implicitly triggered by neutral keywords like a specific state or gendered name) and Direct Bias (measuring the model's sensitivity when explicitly fed ideological triggers like "democrat" or "republican").

Datasets

The authors utilized and curated several datasets for training and evaluation:

  • Media Cloud Dataset: A large-scale political ideology dataset containing ~260k news articles from 10 liberal and conservative media outlets. A balanced subset of ~120k articles was used to train the political ideology classifiers ($f_{judge}$ and $f_{debias}$).
  • Attribute Keywords: The authors curated specific keyword lists for three sensitive attributes: Gender (common male/female names), Location (50 US states categorized into Blue, Red, Leaning Blue, and Leaning Red based on the 2016 election), and Topic (keywords across domains like Domestic Policy, Foreign Policy, Economics, Healthcare, and Immigration).

Key Insights and Ideas

  • Inference-Time Intervention Works: The biggest takeaway is that political bias can be successfully mitigated on-the-fly during decoding. This bypasses the need to alter the underlying model weights or access proprietary training data.
  • The Fluency Trade-off: There is an inherent tension between aggressive debiasing and language fluency. As the debiasing strength ($\lambda$) increases, text perplexity rises. However, by using an adaptive KL-divergence constraint, the authors managed to keep this degradation minimal.
  • Context Beats Word Lists: While word-embedding debiasing (Mode 1) is computationally lighter, classifier-guided debiasing (Mode 2) is generally more robust because political bias is often structural and contextual rather than tied to isolated keywords.

Key Results

The authors evaluated their framework on GPT-2 Medium across gender, location, and topic attributes:

  • Quantifiable Bias Reduction: Both modes significantly reduced political bias. For instance, in the highly contentious category of Immigration, the baseline indirect bias score dropped from 4.272 to 0.795 (Mode 1) and 0.326 (Mode 2).
  • Classifier vs. Embedding: Quantitatively, the Classifier Guided approach (Mode 2) consistently outperformed the Word Embedding approach (Mode 1) in reducing both direct and indirect bias across almost all attributes.
  • Human Validation: A study involving 170 Amazon Mechanical Turk participants confirmed that the debiased models generated significantly less biased text. Interestingly, human evaluators rated the Classifier Guided model (Mode 2) as having the highest readability and coherence, even beating the vanilla GPT-2 baseline.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Binary Simplification: The metrics and classifiers treat political ideology as a strict binary (liberal vs. conservative), failing to capture nuanced political spectrums or non-binary viewpoints.
  • Directionality Blindness: The proposed Indirect Bias metric measures the extent of the bias but does not explicitly indicate which direction (liberal or conservative) the model is leaning.
  • Generalization to Other Biases: While the framework can theoretically be adapted to other non-binary biases (like emotional bias), doing so would require non-trivial modifications to the reward structures and classifiers.

Summary updated

Abstract

Current large-scale language models can be politically biased as a result of the data they are trained on, potentially causing serious problems when they are deployed in real-world settings. In this paper, we describe metrics for measuring political bias in GPT-2 generation and propose a reinforcement learning (RL) framework for mitigating political biases in generated text. By using rewards from word embeddings or a classifier, our RL framework guides debiased generation without having access to the training data or requiring the model to be retrained. In empirical experiments on three attributes sensitive to political bias (gender, location, and topic), our methods reduced bias according to both our metrics and human evaluation, while maintaining readability and semantic coherence.
BibTeX
@inproceedings{liu2021mitigating,
  author = {Ruibo Liu and Chenyan Jia and Jason Wei and Guangxuan Xu and Lili Wang and Soroush Vosoughi},
  title = {{Mitigating Political Bias in Language Models Through Reinforced Calibration}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i17.17744},
}
Figure