cs.CLApr 12, 2026

Dynamic Adaptive Attention and Supervised Contrastive Learning: A Novel Hybrid Framework for Text Sentiment Classification

Authors: Qingyang Li

Organizations: University of California, Los Angeles Los Angeles, USA

Abstract

The exponential growth of user-generated movie reviews on digital platforms has made accurate text sentiment classification a cornerstone task in natural language processing. Traditional models, including standard BERT and recurrent architectures, frequently struggle to capture long-distance semantic dependencies and resolve ambiguous emotional expressions in lengthy review texts. This paper proposes a novel hybrid framework that seamlessly integrates dynamic adaptive multi-head attention with supervised contrastive learning into a BERT-based Transformer encoder. The dynamic adaptive attention module employs a global context pooling vector to dynamically regulate the contribution of each attention head, thereby focusing on critical sentiment-bearing tokens while suppressing noise. Simultaneously, the supervised contrastive learning branch enforces tighter intra-class compactness and larger inter-class separation in the embedding space. Extensive experiments on the IMDB dataset demonstrate that the proposed model achieves competitive performance with an accuracy of 94.67%, outperforming strong baselines by 1.5--2.5 percentage points. The framework is lightweight, efficient, and readily extensible to other text classification tasks.

Figures & tables

Explore similar work

CardsList
  1. From TF-IDF to Transformers: A Comparative and Ensemble Approach to Sentiment Classification

    May 21, 2026Dip Biswas Shanto, Mitali Yadav, Prajwal Panth +1Sentiment AnalysisText Classification

  2. A Comparative Analysis of Classical Machine Learning and Deep Learning Approaches for Sentiment Classification on IMDb Movie Reviews

    May 8, 2026Erma Daniar Safitri, Lia Hana Ichisasmita, Citra Agustin +3Sentiment AnalysisSupport Vector Machines

  3. QTrans: A Quantum Transformer for Sentiment Classification

    Sep 10, 2026Ren-Xin Zhao, Xinjie Huang, Yahong Liu +4Sentiment AnalysisHybrid Quantum-Classical ML