Abstract
Understanding social cohesion requires tracking "solidarity"—how societies support or exclude marginalized groups. This research introduces FairGer, a framework leveraging Large Language Models (LLMs) to analyze 155 years of German parliamentary debates (1867–2022). By applying a fine-grained sociological lens, the study reveals that while solidarity with migrants generally outweighs anti-solidarity, the underlying justifications have shifted from national identity toward humanitarian compassion and economic pragmatism.
Introduction
Tracking shifts in political discourse over a century is a monumental challenge. Traditional manual annotation is deep but prohibitively expensive, while standard NLP methods like sentiment analysis often lack the nuance required to distinguish between different motivations for support. For instance, supporting a group because of a "shared identity" is fundamentally different from support based on "universal human rights." FairGer addresses this by testing whether modern LLMs can replicate the nuanced framing analysis used by sociologists to study discourse regarding women and migrants.
Methodology: A Sociological Typology for LLMs
The researchers adopted Thijssen’s (2012) framework, which categorizes solidarity and anti-solidarity into four distinct subtypes:
- Group-based: Rooted in shared identity or "being like us."
- Exchange-based: Focused on reciprocity, contribution, or economic burden.
- Compassionate: Driven by the recognition of vulnerability and suffering.
- Empathic: Based on respect for diversity and universal rights.
To implement this, the study compared various models, including BERT, Llama-3-70B, GPT-3.5, and GPT-4. They utilized a "Chain-of-Thought" prompting strategy where the model first identifies a high-level category (Solidarity, Anti-solidarity, Mixed, or None) before drilling down into specific subtypes.
Data and Historical Context
The analysis was performed on DeuParl, a massive longitudinal dataset containing 19.1 million sentences from German parliamentary protocols spanning 1867 to 2022. To ensure historical accuracy, the researchers used Word2Vec to expand keyword lists for "Migrant" (32 keywords) and "Woman" (18 keywords), capturing archaic and context-specific terms like Vertriebene (post-war expellees). A "Gold Standard" dataset of 2,864 manually annotated snippets served as the benchmark for model evaluation.
Key Findings: The Evolution of Solidarity
The longitudinal analysis uncovered significant shifts in how politicians frame support for marginalized groups.
From Identity to Humanity
Historically, solidarity was predominantly "Group-based," with politicians supporting migrants perceived as ethnically or culturally German. In the modern era, this has transitioned toward "Compassionate" solidarity, emphasizing universal human rights and the vulnerability of refugees.
The Rise of Economic Pragmatism
Conversely, anti-solidarity rhetoric has shifted toward an "Exchange-based" frame. Modern opposition to migration in parliament frequently centers on perceived lack of economic contribution or the "burden" on the state, rather than overt claims of cultural difference. This trend has intensified since 2015, largely driven by the rise of the far-right AfD.
Model Performance and Scalability
GPT-4 demonstrated remarkable capability, achieving a Macro F1 score of 0.73 for migrant solidarity, closely approaching the human performance benchmark of 0.78. The scalability of this approach is transformative: the authors annotated 18,000 additional instances using GPT-4 for approximately €500, a task that would have cost an estimated €110,000 using human annotators.
Conclusion and Future Directions
While LLMs like GPT-4 show "human-like" reasoning in identifying subtle sociological cues, challenges remain. Models can still miss deep historical sarcasm or highly specific cultural references. Future work involves applying this framework to other national contexts and using LLM-generated explanations to discover emergent frames of solidarity that may not yet be captured in existing sociological literature.
Summary updated