Source-linked AI summary

Mitigating Political Bias in Language Models Through Reinforced Calibration

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

arXiv:2104.14795v1cs.CLcs.AI

TL;DR

The paper asks whether GPT-2 generation carries political bias, a fairness concern for systems that rely on language models. It proposes metrics and a reinforcement-learning approach, reporting reduced bias while preserving fluency and human-rated readability and coherence.

  • Problem

    The paper asks whether GPT-2 perpetuates political bias and whether generation can be guided toward neutrality, a fairness concern for downstream language-model uses.

    Source: §1 · p. 1
  • Method

    The authors propose Indirect Bias and Direct Bias metrics and a reinforcement-learning framework using word-embedding or classifier guidance without training-data access or retraining.

    Source: §1 · p. 1
  • Results

    The methods reduce political bias by the proposed metrics while maintaining reasonable fluency, readability, and semantic coherence in human evaluation.

    Source: §1 · p. 1
  • Takeaways & Limitations

    The paper presents bias measurement and mitigation that require neither extra data nor retraining, a setting it describes as relevant when LM training data are unavailable and training from scratch is costly.

    Source: §8 · p. 7

    Indirect Bias does not indicate bias direction, and the metrics use binary liberal/conservative classes that require nontrivial modification for non-binary bias types.

    Source: §7 · p. 7

Abstract

from arXiv · show

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.

1 Introduction

The paper asks whether GPT-2 generation reflects political bias and proposes ways to measure and mitigate it. The authors report reduced bias while maintaining fluency, readability, and semantic coherence.

1 Introduction

  • The paper asks whether GPT-2 perpetuates ideological bias and whether generation can be guided toward political neutrality, a fairness concern for downstream uses.The introduction notes that demographic and topic attributes in prompts influence generated text’s ideological tendencies.Source: §1 · p. 1
  • Two metrics, Indirect Bias and Direct Bias, quantify political bias in language-model generation, with experiments focused on gender, location, and topic.The framework is described as extendable to other bias types and attributes.Source: §1 · p. 1
  • The authors propose a reinforcement-learning framework with word-embedding-guided and classifier-guided modes that does not require training data access or model retraining.They say it can be generalized to other large-scale language models with minimal modification.Source: §1 · p. 1
  • The proposed methods reduce political bias while maintaining reasonable fluency, readability, and semantic coherence in the reported evaluations.The authors report both metric-based evaluation and human evaluation.Source: §1 · p. 1

2 Related Work

Prior work addresses bias through data augmentation, embedding manipulation, and prediction adjustment, but the paper identifies barriers to applying these approaches to pretrained large language models.

2 Related Work

  • Data augmentation has been used to mitigate bias across tasks, including hate-speech detection, knowledge-graph building, and machine translation.Examples include gender-swapping augmentation and counterfactual fairness approaches [Park, Shin, and Fung 2018; Liu et al. 2020; Mitchell et al. 2019; Stanovsky, Smith, and Zettlemoyer 2019].Source: Data Augmentation · p. 2
  • Embedding-manipulation methods mitigate bias in word representations, but context-aware LM embeddings make these approaches difficult to adapt directly.Other work reduced sentiment bias in recent LMs by retraining Transformer-XL and GPT-2 with a fairness loss.Source: Embedding Manipulation · p. 2
  • Prediction-adjustment research has largely targeted fair classification or feature representations rather than bias in language-model generation.The cited adversarial example concerns gender identification in analogy completion.Source: Prediction Adjustment · p. 2
  • Applying prior approaches to pretrained large LMs can be difficult because training corpora may be unavailable and retraining can be costly.The paper positions its approach as requiring neither original training data nor language-model retraining.Source: Prediction Adjustment · p. 2

3 Political Bias Measurement

The section sets up political-bias measurement for generated text using prompts, sensitive-attribute options, and a pretrained ideology classifier. It defines indirect and direct bias through comparisons of classifier-derived base rates.

3.1 Notation

  • The notation covers prompts that generate token sequences, three attributes—gender, location, and topic—and a classifier whose output approaches 0 for liberal bias and 1 for conservative bias.For direct-bias measurement, prompts include both an attribute keyword and a liberal or conservative ideology injection.Source: Sensitive Attributes · p. 2, Language Modeling · p. 2, Bias Judgement · pp. 2–3

3.2 Definition

  • Indirect Bias measures the distance between classifier-derived base rates for texts prompted with one option’s keywords and texts prompted with all options’ keywords.The paper motivates this comparison by conditional independence: if generation is independent of the option, the base rates should match.Source: INDIRECT BIAS · p. 3
  • Direct Bias measures the difference between Indirect Bias under liberal-leaning and conservative-leaning prompts, testing sensitivity to explicit ideological triggers.The metric can be positive when the model fails to generate adequately biased text for a political prompt.Source: DIRECT BIAS · p. 3

4 Debias through Reinforced Calibration

The framework inserts a reinforced debiasing stage into GPT-2 generation, using word embeddings or a classifier to guide token selection while calibrating the vanilla policy. A KL constraint helps balance debiasing strength with semantic coherence.

4 Debias through Reinforced Calibration

  • The framework leaves GPT-2’s main architecture unchanged and inserts an iterative debiasing stage between softmax and argmax, with word-embedding-guided or classifier-guided generation.The policy treats generated sequences as states and output tokens as actions.Source: §4 · p. 3

4.1 Debias Reward

  • The single-step debias reward weights debias gain by the ratio of debiased to vanilla policies, using trajectories produced by the vanilla policy.The gain guides debiasing, while the policy ratio makes the reward based on vanilla-policy trajectories.Source: §4.1 · p. 3

4.2 MODE 1: Word Embedding Debias

  • Word-embedding debiasing selects tokens that are distant from both ideological word groups and approximately equidistant from them.The method uses hidden states and embedded bias words to estimate those distances.Source: §4.2 · p. 4

4.3 MODE 2: Classifier Guided Debias

  • Classifier-guided debiasing uses a bias classifier to favor neutral selections, summing discounted step gains over a limited backtracking window.This mode addresses cases where political bias is not purely word-level; its classifier objective encourages class probabilities near 0.5.Source: §4.3 · p. 4

4.4 Reinforced Calibration

  • Reinforced calibration adaptively balances debias reward against a KL-divergence constraint to keep the debiased policy from drifting too far from vanilla generation.The KL constraint is included to guard against low readability; calibration adjusts vanilla-generation hidden states rather than generating unbiased text from scratch.Source: §4.4 · p. 4

5 Experimental Setup

The experiments use GPT-2 medium for generation and Media Cloud political-ideology data to train the judgment and debias classifiers. Generation samples and calibration settings are specified for the comparisons.

  • The Media Cloud dataset contains about 260k political-ideology articles from 10 liberal and conservative outlets; its balanced version has about 120k articles, split 70/15/15 into training, validation, and test sets.Only the first 100 tokens were used; all punctuation except commas, periods, question marks, and exclamation marks, and press names, were removed to avoid label leakage.Source: Media Cloud Dataset · p. 5
  • The study uses off-the-shelf GPT-2 medium with 355M parameters, and fine-tuned XLNet as the political-bias judgment classifier, reaching F1 0.984 on Media Cloud data.Other tested classifiers did not outperform fine-tuned XLNet.Source: Models · p. 5
  • The MODE 2 debias classifier uses a GPT-2 medium encoder with dense layers, while the judgment classifier is fine-tuned XLNet.The GPT-2 encoder is chosen for the debias classifier for gradient consistency.Source: Models · p. 5
  • The study generates 42,048 samples evenly across vanilla, MODE 1, and MODE 2; each option uses 10 samples per keyword on 10 prompts, with sequences of 100 tokens.Calibration uses 15 SGD iterations in both modes; the KL thresholds are 0.02 and 0.05, respectively.Source: Parameters & Settings · p. 5

6 Evaluation

The evaluation combines automated bias and fluency measures with human judgments of bias, readability, and coherence. It reports reduced bias across the studied attributes and examines fluency trade-offs and comparisons with replacement-based methods.

6.1 Mitigating Political Bias

  • Across all three attributes, both RL methods significantly reduce indirect and direct bias, with classifier guidance generally outperforming embeddings; embeddings score lower on direct bias for Healthcare, Immigration, and Female.Source: Table 2 · p. 6, Indirect & Direct Bias Reduction · p. 6

6.2 Trade-off between Debias and Fluency

  • As λ rises, indirect and direct bias and perplexity generally rise; even at λ=0.9, perplexity does not grow drastically, potentially due to adaptive KL control.Source: Table 3 · p. 6, §6.2 · p. 6

6.3 Comparison with Related Work

  • Naive and IN-GloVe only marginally reduce bias, while the proposed methods generate new text rather than replace words, likely explaining their increased perplexity.Source: Table 5 · p. 7, §6.3 · p. 7

6.4 Human Judgement

  • Word-embedding debias was least biased (M=4.25), while classifier-guided debias had the best readability (M=4.93) and coherence (M=4.55); coherence differences were not significant.Source: Table 6 · p. 7, §6.4 · p. 7

7 Limitations

The proposed bias metrics have scope limitations: indirect bias does not indicate direction, and the metrics focus on binary liberal and conservative classes.

  • Indirect bias measures extent, not direction; the metrics cover binary liberal and conservative classes and need nontrivial modification for nonbinary biases.Source: §7 · p. 7

8 Conclusion

The conclusion summarizes two political-bias metrics and a mitigation framework that needs neither extra data nor retraining, and emphasizes the concern as potentially biased LMs are adopted in AI applications.

8 Conclusion

  • The paper presents two metrics for measuring political bias in language-model generation and a framework that requires neither extra data nor retraining.The authors highlight its relevance because LM training data are normally not public and training a new large-scale LM from scratch is costly.Source: §8 · p. 7
  • Political bias may be amplified as potentially biased LMs are adopted in AI applications if fairness is not considered.Source: §8 · p. 7

Appendix A: Sensitive Attributes

The appendix operationalizes three attributes for studying political bias: gender, topic, and location.

Appendix A: Sensitive Attributes

  • Gender bias is estimated using male and female names from Huang et al. (2019).The appendix lists 17 names for each group.Source: Gender · p. 8
  • Topic bias is estimated with topic-specific keywords from a survey website, spanning policy, economics, electoral, healthcare, immigration, and social topics.Examples include minimum wage, marijuana, and abortion.Source: Topic · p. 8
  • The 50 US states are categorized into four ideological regions using the results of the 2016 election.The regions are Blue, Red, Leaning Blue, and Leaning Red states.Source: Location · p. 8

Appendix B: Writing Prompts

The appendix describes writing prompts for the three attributes and distinguishes indirect-bias prompts from direct-bias prompts.

Appendix B: Writing Prompts

  • The study uses ten writing prompts for each attribute, with different prompts for indirect and direct bias.Direct-bias prompts are further divided into liberal- and conservative-leaning versions.Source: Appendix B · p. 8
  • Tables 7–9 provide prompts using [G] for gender names, [L] for US state names, and [T] for topic keywords.Examples named in the captions include Jacob, Massachusetts, and marijuana.Source: Table 7 · p. 8, Table 8 · p. 8, Table 9 · p. 8
Loading 2104.14795v1…