A Data-Driven Multi-Granularity Attention Framework for Sentiment Recognition in News and User Reviews
Sentiment analysis plays a crucial role in domains such as financial news, user reviews, and public opinion monitoring, yet existing approaches face challenges when dealing with long and domain-specific texts due to semantic dilution, insufficient context modeling, and dispersed emotional signals. To address these issues, a multi-granularity attention-based sentiment analysis model built on a transformer backbone is proposed. The framework integrates sentence-level and document-level hierarchical modeling, a different-dimensional embedding strategy, and a cross-granularity contrastive fusion mechanism, thereby achieving unified representation and dynamic alignment of local and global emotional features. Static word embeddings combined with dynamic contextual embeddings enhance both semantic stability and context sensitivity, while the cross-granularity fusion module alleviates sparsity and dispersion of emotional cues in long texts, improving robustness and discriminability. Extensive experiments on multiple benchmark datasets demonstrate the effectiveness of the proposed model. On the Financial Forum Reviews dataset, it achieves an accuracy of 0.932, precision of 0.928, recall of 0.925, F1-score of 0.926, and AUC of 0.951, surpassing state-of-the-art baselines such as BERT and RoBERTa. On the Financial Product User Reviews dataset, the model obtains an accuracy of 0.902, precision of 0.898, recall of 0.894, and AUC of 0.921, showing significant improvements for short-text sentiment tasks. On the Financial News dataset, it achieves an accuracy of 0.874, precision of 0.869, recall of 0.864, and AUC of 0.895, highlighting its strong adaptability to professional and domain-specific texts. Ablation studies further confirm that the multi-granularity transformer structure, the different-dimensional embedding strategy, and the cross-granularity fusion module each contribute critically to overall performance improvements.
Authors
- Yan Zhang (ORCID: https://orcid.org/0000-0002-2428-9211)
- Wenjie Hong (ORCID: https://orcid.org/0000-0002-8864-1747)
- Yiyan Wang (ORCID: https://orcid.org/0000-0001-9734-3111)
- Yanyi Huang (ORCID: https://orcid.org/0000-0002-7297-1266)
- Siyuan Zhang (ORCID: https://orcid.org/0000-0003-0220-1423)
- Zhengyang Li (ORCID: https://orcid.org/0009-0006-3976-7139)
- Xiangjun Dong (ORCID: https://orcid.org/0000-0002-5364-5844)
- Shuqiong Ling
Institutions
- Peking University (CN)
- Beijing Academy of Artificial Intelligence (CN)
Publication Details
- Journal
- Applied Sciences
- Published
- 2025-10-25
- DOI
- https://doi.org/10.3390/app152111424
- Citations
- 1
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 2.48