Extracting Affect Aggregates from Longitudinal Social Media Data with Temporal Adapters for Large Language Models

Authors

  • Georg Ahnert University of Mannheim
  • Max Pellert Barcelona Supercomputing Center
  • David Garcia University of Konstanz CSH Vienna
  • Markus Strohmaier University of Mannheim GESIS - Leibniz Institute for the Social Sciences CSH Vienna

DOI:

https://doi.org/10.1609/icwsm.v19i1.35801

Abstract

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.

Downloads

Published

2025-06-07

How to Cite

Ahnert, G., Pellert, M., Garcia, D., & Strohmaier, M. (2025). Extracting Affect Aggregates from Longitudinal Social Media Data with Temporal Adapters for Large Language Models. Proceedings of the International AAAI Conference on Web and Social Media, 19(1), 15-36. https://doi.org/10.1609/icwsm.v19i1.35801