Skip to content
Detection methodsSpread & networks llmunsupervised learningelection

Evaluating large language models for user stance detection on X (Twitter)

Machine Learning · 2024

In brief

This paper introduces Tweets2Stance (T2S), an unsupervised framework for detecting user stance on political statements from social media timelines. T2S combines topic filtering with agreement detection to classify users' stances across five levels and demonstrates strong generalization to diverse political elections using zero-shot and large language model approaches, achieving an F1 of 0.29 and MAE of 1.56 across nine election datasets from 2019–2021.

Contributions

  • Proposes Tweets2Stance, an unsupervised content-based framework leveraging LLMs for user-level stance detection on specific political targets
  • Demonstrates that advanced language models like GPT-4 significantly improve multi-level stance classification over baseline approaches
  • Evaluates framework on nine diverse political election datasets (2019–2021) across multiple countries, showing generalization capabilities
  • Addresses domain-specific challenges including topic relevance, multilingualism, and vocabulary variation in political discourse
  • Shows that integrating advanced LLMs into existing unsupervised methods improves overall accuracy and handles fine-grained stance distinctions

Method

The T2S framework operates in two stages:

Topic Filtering: Given a user's social media timeline and a target political statement with an associated topic, the framework first extracts tweets relevant to that topic. A Language Model (LM) or zero-shot classifier identifies which tweets discuss the specified topic.

Agreement Detection: For the filtered topic-relevant tweets, the framework detects the user's agreement level with the statement across five categorical labels: completely agree, agree, neither disagree nor agree, disagree, completely disagree. The framework employs algorithms that aggregate tweet-level scores to produce a five-level user-level stance label.

The authors test two approaches:

  1. Zero-shot classification (ZSC) with BART
  2. State-of-the-art LLMs (GPT-4 and Mixtral) with zero-shot prompting

Both approaches avoid requiring labeled training data, making the framework adaptable across different political contexts and languages.

Results

Evaluated on nine election datasets from 2019–2021 (Alberta, Australian Federal, Canadian Federal, Great Britain, British Columbia, Saskatchewan, Newfoundland and Labrador, Nova Scotia, Canada federal elections), the framework achieved:

  • Average F1 score: 0.29 (ranging 0.19–0.41 across configurations)
  • Average Mean Absolute Error (MAE): 1.56 (ranging 1.07–1.54 across configurations)
  • Best performance: Topic Filtering with Agreement Detector using GPT-4 achieved F1 of 0.62 and MAE of 0.54

The results show that GPT-4 generally outperforms Mixtral and zero-shot approaches for stance detection, particularly in distinguishing between fine-grained stance levels. Performance varies across different political contexts, with language-specific vocabulary and domain-specific terminology affecting generalization.

Notes

The paper makes a timely contribution by demonstrating that modern LLMs can effectively tackle unsupervised stance detection without task-specific fine-tuning, a capability not available in earlier work. The framework's flexibility (supporting both ZSC and advanced LLMs) and demonstrated generalization across diverse political elections strengthen its practical applicability. However, the modest F1 scores reflect the inherent difficulty of multi-level stance classification on naturally noisy social media text. Multilingual tweets and domain-specific vocabulary remain challenges. The paper represents progress in adapting transformer-era language models to political information analysis without labeled data.

How it connects

Similar papers

Summarized from the full text. Added 2026-11-27 from a submission by reza. Every statement on this page traces back to the source.