Journal of Frontiers of Computer Science and Technology ›› 2025, Vol. 19 ›› Issue (5): 1302-1312.DOI: 10.3778/j.issn.1673-9418.2408074

• Artificial Intelligence·Pattern Recognition • Previous Articles     Next Articles

Social Media Text Stance Detection Based on Large Language Models

LI Juhao, SHI Lei, DING Meng, LEI Yongsheng, ZHAO Dongyue, CHEN Long   

  1. 1. College of Investigation, People’s Public Security University of China, Beijing 100038, China
    2. State Key Laboratory of Media Convergence and Communication, Communication University of China, Beijing 100024, China
    3. Public Security Behavioral Science Lab, People’s Public Security University of China, Beijing 100038, China
  • Online:2025-05-01 Published:2025-04-28

基于大语言模型的社交媒体文本立场检测

李居昊,石磊,丁锰,雷永升,赵东越,陈泷   

  1. 1. 中国人民公安大学 侦查学院,北京 100038
    2. 中国传媒大学 媒体融合与传播国家重点实验室,北京 100024
    3. 中国人民公安大学 公共安全行为科学实验室,北京 100038

Abstract: Stance detection aims to analyze the attitude expressed in a text towards a given target. Social media texts are often short and evolve rapidly, which poses challenges for traditional stance detection methods due to sparse semantic information and inadequate representation of stance features. Additionally, many existing approaches overlook the role of sentiment information in stance detection. To address these issues, this paper proposes a stance detection method for social media texts leveraging large language models. A specially designed prompt template with explicit task instructions is employed to utilize the model’s pre-trained knowledge related to stance detection, mitigating the challenge of sparse semantic information. Furthermore, sentiment analysis tasks are integrated into the prompt instructions to guide the model’s focus on sentiment information, enriching the semantic cues for stance detection and addressing the underutilization of sentiment data. To enhance the model’s ability to extract and represent stance features, a task-specific adapter is integrated into the model. This improves the representation of stance features and enhances the overall performance of the model in stance detection tasks. Finally, the results from large language models with different architectures are integrated through ensemble voting to improve the stability of prediction results. To validate the method proposed in this paper, comparative experiments are constructed. The experiments conducted on the SemEval-2016 Task 6A dataset demonstrate that the proposed method achieves significantly better performance compared with existing benchmark methods.

Key words: stance detection, large language models, natural language processing, multi-strategy optimization

摘要: 立场检测旨在分析文本对给定目标的态度。当前社交媒体的文本通常简短且话题演变迅速,传统立场检测方法面临着语义信息稀少和立场特征表示不充分等挑战,且许多现有方法往往忽略了情感信息对立场检测的影响。为了应对上述两方面挑战,提出了一种基于大语言模型的社交媒体文本立场检测方法。通过设计包含明确任务指令的立场检测提示模板,调用模型在预训练阶段获得的与立场检测相关的知识,解决语义信息稀少的问题;通过在任务指令中加入情感分析任务,引导模型关注情感信息,为立场检测提供更多的语义线索,解决情感信息利用不足的问题。在此基础上,在模型内部添加针对立场检测任务的适配器,专注于提取和表示立场特征,增强模型对立场特征的表示能力,实现了更好的立场检测效果;将不同架构的大语言模型的结果进行集成投票提高预测结果的稳定性。为验证该方法,构建多组对比实验,实验结果表明该方法在SemEval-2016 Task 6A数据集上的有效性显著优于现有基准方法。

关键词: 立场检测, 大语言模型, 自然语言处理, 多策略优化