Extracting Affect Aggregates from Longitudinal Social Media Data with Temporal Adapters for Large Language Models
This paper proposes temporally aligned Large Language Models (LLMs) as a tool for longitudinal analysis of social media data. We fine-tune Temporal Adapters for Llama 3 8B on full timelines from a panel of British Twitter users and extract longitudinal aggregates of emotions and attitudes with established questionnaires. We focus our analysis on the beginning of the COVID-19 pandemic that had a strong impact on public opinion and collective emotions. We validate our estimates against representative British survey data and find strong positive and significant correlations for several collective emotions. The estimates obtained are robust across multiple training seeds and prompt formulations, and in line with collective emotions extracted using a traditional classification model trained on labeled data. We demonstrate the flexibility of our method on questions of public opinion for which no pre-trained classifier is available. Our work extends the analysis of affect in LLMs to a longitudinal setting through Temporal Adapters. It enables flexible and new approaches to the longitudinal analysis of social media data.
Authors
- Max Pellert (ORCID: https://orcid.org/0000-0002-6557-7607)
- Georg Ahnert (ORCID: https://orcid.org/0009-0009-7286-3589)
- Markus Strohmaier (ORCID: https://orcid.org/0000-0002-5485-5720)
- David García (ORCID: https://orcid.org/0000-0002-2820-9151)
Institutions
- University of Mannheim (DE)
- University of Konstanz (DE)
- Barcelona Supercomputing Center (ES)
- GESIS - Leibniz Institute for the Social Sciences (DE)
- Universitat Politècnica de Catalunya (ES)
Publication Details
- Journal
- Proceedings of the International AAAI Conference on Web and Social Media
- Published
- 2025-06-07
- DOI
- https://doi.org/10.1609/icwsm.v19i1.35801
- Primary Topic
- Computational and Text Analysis Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00