From Pretraining Data to Language Models to Downstream Tasks: Tracking the Trails of Political Biases Leading to Unfair NLP Models

Shangbin Feng, Chan Young Park, Yuhan Liu, Yulia Tsvetkov

Abstract

Language models (LMs) are pretrained on diverse data sources, including news, discussion forums, books, and online encyclopedias. A significant portion of this data includes opinions and perspectives which, on one hand, celebrate democracy and diversity of ideas, and on the other hand are inherently socially biased. Our work develops new methods to (1) measure political biases in LMs trained on such corpora, along social and economic axes, and (2) measure the fairness of downstream NLP models trained on top of politically biased LMs. We focus on hate speech and misinformation detection, aiming to empirically quantify the effects of political (social, economic) biases in pretraining data on the fairness of high-stakes social-oriented tasks. Our findings reveal that pretrained LMs do have political leanings that reinforce the polarization present in pretraining corpora, propagating social biases into hate speech predictions and misinformation detectors. We discuss the implications of our findings for NLP research and propose future directions to mitigate unfairness.

Introduction

Large Language Models (LLMs) are often treated as neutral mathematical engines, yet they act as mirrors of the massive, often polarized datasets they consume. While previous research has extensively documented stereotypical associations (e.g., gender and professions), political bias remains a more complex and insidious challenge. This study provides a rigorous "trail map" of how political leanings propagate from raw pretraining data into the models themselves, and ultimately into downstream tasks such as hate speech and misinformation detection.

The central argument is that no model is truly neutral; "clean" data does not exist—only data with varying flavors of bias. By understanding how naturally occurring media biases in pretraining data (like news and forums) influence the machine learning pipeline, we can better evaluate the fairness of the "neutral" tools we build on top of them.

Measuring Political Leaning in Language Models

To quantify political orientation, the researchers adapted the Political Compass Test, a 62-statement survey that maps ideology onto two axes: Social (Authoritarian vs. Libertarian) and Economic (Left vs. Right).

The methodology for measurement varies by architecture:

  • Encoders (e.g., BERT, RoBERTa): A "mask filling" approach was employed. Models were presented with statements like "I [MASK] with this statement," and the researchers analyzed the relative probability of positive vs. negative tokens (e.g., "agree" vs. "disagree").
  • Decoders (e.g., GPT-4, LLaMA): Models were prompted to respond directly to statements. These responses were then categorized using a high-accuracy stance detector.
Political compass mapping of various pretrained language models along social and economic axes.

Initial findings revealed that architecture significantly influences inherent bias. BERT-style models tend to cluster in the socially conservative/authoritarian and economically left quadrant. In contrast, GPT-style models generally lean more liberal/libertarian. This divergence likely stems from the training data: BERT relied heavily on the older BookCorpus, while GPT models utilize more recent, libertarian-leaning web text. Furthermore, models trained on data post-2017 (the "Trump Effect") showed significantly higher polarization compared to their predecessors.

Partisan Continued Pretraining and Bias Propagation

To establish a causal link between data and model bias, the researchers conducted "partisan continued pretraining." They took base models (RoBERTa and GPT-2) and further trained them on six distinct partisan corpora derived from the POLITICS news dataset and partisan subreddits.

Shifts in political leaning (Δ) for RoBERTa and GPT-2 after continued pretraining on partisan news and Reddit corpora.

The results confirmed that continued pretraining successfully shifts a model's coordinates on the political compass. For instance, RoBERTa’s social score shifted from a conservative 2.97 to a liberal -3.03 after pretraining on "Left Reddit" data. These shifts demonstrate that the political "flavor" of the pretraining corpus is directly inherited by the model.

Downstream Impact on Fairness and Performance

The most critical finding involves how these inherited biases affect downstream tasks like hate speech and misinformation detection. The study revealed a fundamental "fairness trade-off":

  1. Hate Speech Detection: Left-leaning models were found to be more accurate at identifying hate speech directed at minority groups (e.g., LGBTQ+ and Black communities). Conversely, right-leaning models were more sensitive to hate speech against "dominant" groups, such as Christians or White people.
  2. Misinformation Detection: Models exhibited "partisan stringency." A left-leaning model was significantly more effective at catching misinformation from right-leaning sources (e.g., Fox News) but was more "forgiving" toward misinformation from left-leaning sources (e.g., CNN).

These results suggest that a model's "worldview" creates blind spots. However, the researchers found that a Partisan Ensemble—combining models with different leanings—outperformed any single model. For example, an ensemble achieved a 90.21 BACC on the Hate-Identity task, compared to 88.78 for the best single model, suggesting that "viewpoint diversity" is a viable path toward more robust NLP systems.

Conclusion

This research highlights that political neutrality in AI is a myth. Since bias is inevitable, the focus should shift from seeking a non-existent "neutral" model to Strategic Pretraining—tailoring models for specific contexts—or utilizing Partisan Ensembles to ensure multiple perspectives are considered. Future work must expand beyond the U.S. political spectrum to understand how these dynamics play out in different cultural and linguistic contexts.

Summary updated

BibTeX
@inproceedings{feng2023from,
  author = {Shangbin Feng and Chan Young Park and Yuhan Liu and Yulia Tsvetkov},
  title = {{From Pretraining Data to Language Models to Downstream Tasks: Tracking the Trails of Political Biases Leading to Unfair NLP Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.656},
}
Figure