Introduction
Understanding long-term shifts in political discourse is a cornerstone of political science, yet it traditionally relies on "manual coding"—a process where human researchers read and label thousands of documents. This method is notoriously slow, expensive, and difficult to scale. While basic computational tools like sentiment analysis offer speed, they often fail to capture the theoretical nuance required for complex sociological constructs such as "solidarity."
This paper presents a novel approach using Large Language Models (LLMs) to automate the annotation of a sophisticated sociological framework: Thijssen’s typology of solidarity. By analyzing over 150 years of German parliamentary debates (1867–2025), the study tracks the evolution of rhetoric regarding migration, identifying a dramatic historical pivot in the last decade.
Methodology: Automating Sociological Typologies
The researchers developed a multi-step NLP pipeline to categorize parliamentary rhetoric. They adopted a four-part typology of (anti-)solidarity to move beyond simple positive/negative sentiment:
- Group-based: Shared identity versus "us vs. them" exclusion.
- Compassionate: Helping the vulnerable versus denying support.
- Exchange-based: Valuing contributions versus framing migrants as a "burden" on the system.
- Empathic: Respecting versus disregarding diversity.
To implement this, the team benchmarked several models—including GPT-4, Llama-3.3-70B, and Mistral-2-Large—against a gold-standard dataset of nearly 3,000 human-annotated instances. They utilized a "Chain-of-Thought" prompting strategy, first determining the high-level stance (Solidarity, Anti-solidarity, Mixed, or None) before identifying specific subtypes.
Dataset: The DeuParl Corpus
The analysis was conducted on the DeuParl corpus, a massive collection of German plenary protocols spanning from the Imperial era in 1867 to June 2025. To ensure accuracy across different eras, the researchers also created a "Historical Test Set" of 756 instances from the pre-1950 period to evaluate how models handle archaic political language.
Key Findings: The Historical Pivot
The longitudinal data reveals a significant shift in how German politicians discuss migration.
The Post-War Era and "Deservingness"
In the 1950s, solidarity rhetoric was extremely high but highly selective. It was primarily "group-based," aimed at ethnic German expellees. In contrast, non-ethnic "foreigners" (Ausländer) were frequently framed through an exchange-based lens as economic burdens, highlighting early roots of anti-solidarity rhetoric.
The 2015 "Solidarity Fatigue"
The data captures a massive spike in "compassionate solidarity" during the 2014 Syrian refugee crisis. However, this was followed by a rapid collapse and a subsequent surge in "group-based anti-solidarity."
The 2020s Anti-Solidarity Surge
Most strikingly, the period between 2015 and 2025 marks the first time in the 150-year dataset that anti-solidarity statements frequently exceed expressions of solidarity. While the far-right AfD party is a primary driver of this volume, the researchers noted a broader "right-wing shift" in the rhetoric of mainstream conservative (CDU/CSU) and liberal (FDP) parties.
Model Performance and Economic Viability
GPT-4 (zero-shot) emerged as the top-performing model, achieving a Macro F1 of 0.73 on migrant classification, which closely approaches the human upper bound of 0.75. Interestingly, the open-weight Llama-3.3-70B proved to be a highly cost-effective alternative, showing a 0.96 correlation with GPT-4’s temporal trends.
The economic implications are profound: manual annotation for 3,500 instances cost over €29,000, whereas GPT-4 could annotate a third of the entire 63,000-sentence dataset for approximately €500. However, all models showed a "historical decay" in performance when processing text from before the 1920s, likely due to the contemporary nature of their training data.
Conclusion and Future Work
This study demonstrates that LLMs are highly effective "distant readers," capable of mapping complex longitudinal trends that would be impossible to analyze manually. While challenges remain—such as the models' occasional inability to distinguish between a speaker's own stance and a quote from an opponent—the pipeline offers a scalable way to study political discourse. Future research will expand this analysis to other marginalized groups, including women and LGBTQ+ communities, to further explore the dynamics of solidarity in democratic societies.
Summary updated