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

Georg Ahnert, Max Pellert, David Garcia, Markus Strohmaier
9/26/2024
cs.CYcs.CL

No official code found. Best implementation: dess-mannheim/temporal-adapters (3 stars, MIT, last commit 2024-12-13).

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, significant correlations for several collective emotions. The obtained estimates 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, new approaches towards the longitudinal analysis of social media data.

View on arXivView PDF

Code Implementations(1)

MIT

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

31PythonSep 26, 20241 years agoMIT

Similar Papers

Cite this paper

@article{ahnert2024extracting,
  title  = {Extracting Affect Aggregates from Longitudinal Social Media Data with Temporal Adapters for Large Language Models},
  author = {Georg Ahnert and Max Pellert and David Garcia and Markus Strohmaier},
  year   = {2024},
  eprint = {2409.17990},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.17990v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.17990.svg)](https://codeofpaper.com/paper/2409.17990)

Discussion