Linear Representations of Political Perspective Emerge in Large Language Models

Junsol Kim, James Evans, Aaron Schein

TL;DR

Large Language Models (LLMs) internally organize abstract concepts like political ideology along a simple, linear "liberal-conservative" axis within their activation space. By identifying specific attention heads in middle layers that encode this perspective, researchers can monitor the implicit political slant of text token-by-token and actively steer model outputs toward a desired political stance without any prompt engineering or fine-tuning.

What Problem Does This Paper Address?

While it is well-established that LLMs can generate text reflecting diverse human perspectives, understanding how they represent these complex, highly subjective viewpoints internally remains an open question in mechanistic interpretability. Previous work has shown that simpler concepts like time, space, and sentiment are represented linearly as directions in an LLM's activation space.

This paper tackles whether a high-level, multi-faceted social construct—specifically, American political ideology—is also encoded linearly, or if it requires more complex, non-linear representations. Uncovering this internal structure allows researchers to address critical challenges: monitoring implicit biases in open-ended generations and controlling the subjective stance of an LLM dynamically during inference.

Methods

The authors employ a supervised probing and activation engineering framework across three open-source transformer models: Llama-2-7b-chat, Mistral-7b-instruct, and Vicuna-7b.

  1. Linear Probing: The authors prompt the LLMs to generate statements in the persona of specific U.S. politicians. They extract the internal activations from every individual attention head across all layers. Using ridge regression (linear probing), they train a model to map these activations to a ground-truth continuous metric of political ideology.
  2. Robustness & Linearity Checks: To confirm the representation is truly linear, they compare the linear probes against non-linear Multilayer Perceptrons (MLPs) and test them against scrambled or non-monotonically transformed labels.
  3. Token-by-Token Monitoring: The trained linear probes are applied to the activations of models generating open-ended essays on controversial topics (e.g., abortion, immigration) to visualize the implicit political slant of individual tokens in real-time.
  4. Activation Steering: Using the methodology of Inference-Time Intervention (ITI), the authors use the probe's coefficients as "steering vectors." By adding or subtracting these vectors to the attention head activations during generation, they causally alter the model's political stance.
Overview of the probing and intervention workflow

Datasets

The study leverages three primary datasets to train and validate the probes:

  • DW-NOMINATE: A standard political science metric scaling U.S. lawmakers' ideologies from -1 (most liberal) to 1 (most conservative) based on voting records. The authors use scores for all 552 members of the 116th U.S. Congress.
  • Ad Fontes Media Bias Ratings: A dataset containing political slant scores for the 400 most popular U.S. news outlets, normalized to a -1 to 1 scale. This is used to test the generalization of the politician-trained probes.
  • The Manifesto Project: Ideological labels for 411 political parties worldwide, utilized for a cross-national generalizability analysis.

Key Insights and Ideas

  • Ideology is Linear: Surprisingly, flexible non-linear MLP probes do not outperform simple linear probes. This strongly supports the hypothesis that LLMs naturally map political ideology along a continuous, linear trajectory in activation space.
  • Localization in Middle Layers: The attention heads that best predict political ideology are heavily concentrated in the middle layers of the network (typically layers 14–24). Early and late layers show almost no predictive capability, aligning with the theory that middle layers handle high-level conceptual processing.
  • True Generalization vs. Memorization: Probes trained strictly on politician names successfully predict the political slant of news media outlets when the model simulates them.
  • Abstract Concept Mastery: The steering vectors successfully shift the model's perspective on events that occurred after the model's training data cutoff (e.g., the 2023 UAW strike). This proves the model is manipulating a generalized concept of "liberal vs. conservative" reasoning rather than just regurgitating memorized training text.

Key Results

  • High Predictive Accuracy: Individual middle-layer attention heads achieve a Spearman rank correlation of up to 0.84–0.86 in predicting the DW-NOMINATE scores of held-out politicians. Ensembling the top 32 heads boosts this cross-validated correlation up to 0.870 for Llama-2 and 0.885 for Vicuna-7b.
Predictive performance of linear probes across all attention heads and layers
  • Successful Zero-Shot Generalization: When evaluating news media outlets, the politician-trained ensemble probe achieves high Spearman correlations: 0.798 for Llama-2 and 0.764 for Mistral-7b.
Actual vs. predicted ideological scores for U.S. lawmakers and news outlets
  • Effective Output Steering: By varying the intervention magnitude ($\alpha$), the authors successfully steer text generation. For instance, negative $\alpha$ values yield highly liberal essays, while positive values yield conservative ones, as validated by both human annotators and a GPT-4o evaluator (achieving an evaluation correlation of 0.607 on Llama-2).
Impact of steering parameter alpha on generated text slant

Limitations and Future Work

  • Model Scale: The study is restricted to 7-billion-parameter models. Whether these linear properties hold or become more diffuse in frontier-scale models (e.g., Llama-3 405B, GPT-4) remains untested.
  • Geographic Bias: The linear representation is highly optimized for the polarized two-party system of the United States. Performance drops significantly when applying the same probes to multi-party international contexts (e.g., European politics), where political landscapes are better represented as multi-dimensional simplices rather than a single linear axis.
  • Granularity: The paper focuses on a single, broad left-right axis. Future work is needed to explore if more granular sub-dimensions of culture, gender, or socioeconomic class are similarly embedded.

Summary updated

BibTeX
@inproceedings{kim2025linear,
  author = {Junsol Kim and James Evans and Aaron Schein},
  title = {{Linear Representations of Political Perspective Emerge in Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=rwqShzb9li},
}
Figure