arXiv:2504.09896cs.CL2025-04被引 18

融合多种Transformer模型,提升社交媒体情感分析准确率。

TWSSenti: A Novel Hybrid Framework for Topic-Wise Sentiment Analysis on Social Media Using Transformer Models

  • 组合BERT、GPT-2等5种Transformer模型,取长补短增强表达能力。
  • 在Sentiment140和IMDB数据集上分别达到94%和95%准确率。
  • 适合需要高精度情感分析的舆情监控与客户反馈场景。

情感分析是自然语言处理中的关键任务,可从动态平台如Twitter和IMDB的文本中提取洞察。本文提出一种混合框架,结合BERT、GPT-2、RoBERTa、XLNet和DistilBERT等基于Transformer的模型,以提升情感分类的准确性与鲁棒性。该框架通过利用各模型优势应对噪声数据、语境歧义及跨数据集泛化难题:BERT捕捉双向上下文,GPT-2增强生成能力,RoBERTa通过更大语料与动态掩码优化理解,XLNet采用置换学习建模依赖关系,DistilBERT则在降低计算开销的同时保持高精度。研究采用TF-IDF与BoW进行文本清洗、分词与特征提取,确保输入质量。在Sentiment140和IMDB基准数据集上,混合方法分别取得94%和95%的准确率,优于单一模型。结果验证了多模型集成在克服单个架构局限性方面的有效性。该方法适用于社交媒体监测、客户情绪分析与民意追踪等实际应用,为未来混合NLP框架发展提供路径。

原文摘要 · Abstract (English)

Sentiment analysis is a crucial task in natural language processing (NLP) that enables the extraction of meaningful insights from textual data, particularly from dynamic platforms like Twitter and IMDB. This study explores a hybrid framework combining transformer-based models, specifically BERT, GPT-2, RoBERTa, XLNet, and DistilBERT, to improve sentiment classification accuracy and robustness. The framework addresses challenges such as noisy data, contextual ambiguity, and generalization across diverse datasets by leveraging the unique strengths of these models. BERT captures bidirectional context, GPT-2 enhances generative capabilities, RoBERTa optimizes contextual understanding with larger corpora and dynamic masking, XLNet models dependency through permutation-based learning, and DistilBERT offers efficiency with reduced computational overhead while maintaining high accuracy. We demonstrate text cleaning, tokenization, and feature extraction using Term Frequency Inverse Document Frequency (TF-IDF) and Bag of Words (BoW), ensure high-quality input data for the models. The hybrid approach was evaluated on benchmark datasets Sentiment140 and IMDB, achieving superior accuracy rates of 94\% and 95\%, respectively, outperforming standalone models. The results validate the effectiveness of combining multiple transformer models in ensemble-like setups to address the limitations of individual architectures. This research highlights its applicability to real-world tasks such as social media monitoring, customer sentiment analysis, and public opinion tracking which offers a pathway for future advancements in hybrid NLP frameworks.

情感分析Transformer混合模型社交媒体

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。