Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Phys.

Sec. Social Physics

Volume 13 - 2025 | doi: 10.3389/fphy.2025.1674949

FEAM: A Dynamic Prompting Framework for Sentiment Analysis with Hierarchical Convolutional Attention

Provisionally accepted
Ziqian  LinZiqian Lin1Dongze  WuDongze Wu2Xiangbeng  YangXiangbeng Yang2Lingying  LiLingying Li2Zhenkai  QinZhenkai Qin2*
  • 1School of Public Administration, Guangxi Police College, nanning, China
  • 2School of Information Technolog, Guangxi Police College, nanning, China

The final, formatted version of the article will be published soon.

Sentiment analysis is a key task in natural language processing, supporting applications such as opinion mining, customer feedback interpretation, and social media monitoring. With the rise of pretrained language models, prompt-based tuning has become a popular paradigm due to its efficiency and adaptability. However, most existing approaches rely on static or handcrafted prompt templates, which often fail to generalize across diverse domains and nuanced sentiment expressions. To address this limitation, we propose FEAM (Fused Emotion-aware Attention Model), a dynamic prompting framework that selects input-specific soft prompts from a learnable prompt pool using a query-aware controller. These prompts are fused with contextual representations obtained via a pretrained BERT encoder, and further refined through a sentiment modulation layer, a multi-scale convolutional module, and a topic-aware attention mechanism. Experiments on four benchmark datasets show that FEAM achieves strong and consistent performance, reaching F1-scores of91.55% on Rest16, 92.83% on Laptop, 93.10% on Twitter, and 90.11% on FinancialPhraseBank. Extensive ablation and robustness studies further validate the contribution of each component and highlight FEAM's effectiveness in handling sentiment classification across varied and noisy textual domains.

Keywords: Dynamic prompting, Soft prompts, Sentiment classification, Prompt selection, Emotion-aware modeling, Domaingeneralization

Received: 28 Jul 2025; Accepted: 24 Sep 2025.

Copyright: © 2025 Lin, Wu, Yang, Li and Qin. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Zhenkai Qin, qinzhenkai@gxjcxy.edu.cn

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.