Next Article in Journal
Associative Ternary Algebras and Ternary Lie Algebras at Cube Roots of Unity
Previous Article in Journal
Lie Symmetry, Conservation Laws, and Dynamical Analysis of Ionic Currents in the Microtubule Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

AGF-HAM: Adaptive Gated Fusion Hierarchical Attention Model for Explainable Sentiment Analysis

1
Department of Computer Science, Mir Chakar Khan Rind University (MCKRU), Sibi 82000, Pakistan
2
Department of AI and SW, Gachon University, Seongnam 13120, Republic of Korea
3
Department of Computer Science and Information, Taibah University Madinah, Madinah 42353, Saudi Arabia
4
Department of Computer Sciences, College of Computer and Information Sciences, Princess Nourah bint Abdulrahman University, P.O. Box 84428, Riyadh 11671, Saudi Arabia
*
Authors to whom correspondence should be addressed.
Mathematics 2025, 13(24), 3892; https://doi.org/10.3390/math13243892
Submission received: 7 November 2025 / Revised: 24 November 2025 / Accepted: 28 November 2025 / Published: 5 December 2025
(This article belongs to the Section E1: Mathematics and Computer Science)

Abstract

The rapid growth of user-generated content in the digital space has increased the necessity of properly and interpretively analyzing sentiment and emotion systems. This research paper presents a new hybrid model, HAM (Hybrid Attention-based Model), a Transformer-based contextual embedding model combined with deep sequential modeling and multi-layer explainability. The suggested framework integrates the BERT/RoBERTa encoders, Bidirectional LSTM, and Graph Attention that can be used to embrace semantic and aspect-level sentiment correlation. Additionally, an enhanced Explainability Module, including Attention Heatmaps, Aspect-Level Interpretations, and SHAP/Integrated Gradients analysis, contributes to the increased model transparency and interpretive reliability. Four benchmark datasets, namely GoEmotions-1, GoEmotions-2, GoEmotions-3, and Amazon Cell Phones and Accessories Reviews, were experimented on in order to have a strong cross-domain assessment. The 28 emotion words of GoEmotions were merged into five sentiment-oriented classes to harmonize the dissimilarity in the emotional granularities to fit the schema of the Amazon dataset. The proposed HAM model had a highest accuracy of 96.4% and F1-score of 94.9%, which was significantly higher than the state-of-the-art baselines like BERT (89.8%), RoBERTa (91.7%), and RoBERTa+BiLSTM (92.5%). These findings support the idea that HAM is a better solution to finer-grained emotional details and is still interpretable as a vital move towards creating open, exposible, and domain-tailored sentiment intelligence systems. Future endeavors will aim at expanding this architecture to multimodal fusion, cross-lingual adaptability, and federated learning systems to increase the scalability, generalization, and ethical application of AI.
Keywords: hierarchical attention mechanism (HAM); aspect-based sentiment analysis (ABSA); explainable AI (XAI); transformer-based models; deep learning; emotion and sentiment classification hierarchical attention mechanism (HAM); aspect-based sentiment analysis (ABSA); explainable AI (XAI); transformer-based models; deep learning; emotion and sentiment classification

Share and Cite

MDPI and ACS Style

Kumar, M.; Khan, L.; Khan, M.Z.; Alhussan, A.A. AGF-HAM: Adaptive Gated Fusion Hierarchical Attention Model for Explainable Sentiment Analysis. Mathematics 2025, 13, 3892. https://doi.org/10.3390/math13243892

AMA Style

Kumar M, Khan L, Khan MZ, Alhussan AA. AGF-HAM: Adaptive Gated Fusion Hierarchical Attention Model for Explainable Sentiment Analysis. Mathematics. 2025; 13(24):3892. https://doi.org/10.3390/math13243892

Chicago/Turabian Style

Kumar, Mahander, Lal Khan, Mohammad Zubair Khan, and Amel Ali Alhussan. 2025. "AGF-HAM: Adaptive Gated Fusion Hierarchical Attention Model for Explainable Sentiment Analysis" Mathematics 13, no. 24: 3892. https://doi.org/10.3390/math13243892

APA Style

Kumar, M., Khan, L., Khan, M. Z., & Alhussan, A. A. (2025). AGF-HAM: Adaptive Gated Fusion Hierarchical Attention Model for Explainable Sentiment Analysis. Mathematics, 13(24), 3892. https://doi.org/10.3390/math13243892

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop