Emotion-Aware RoBERTa enhanced with emotion-specific attention and TF-IDF gating for fine-grained emotion recognition

被引:0
|
作者
Fatimah Alqarni [1 ]
Alaa Sagheer [1 ]
Amira Alabbad [1 ]
Hala Hamdoun [1 ]
机构
[1] King Faisal University,Department of Computer Science, College of Computer Sciences and Information Technology
关键词
Natural language processing; Transformers; Deep learning; Emotion recognition; Attention mechanism; Text classification; Attention heatmaps; FP16 and AMP; McNemar test;
D O I
10.1038/s41598-025-99515-6
中图分类号
学科分类号
摘要
Emotion recognition in text is a fundamental task in natural language processing, underpinning applications such as sentiment analysis, mental health monitoring, and content moderation. Although transformer-based models like RoBERTa have advanced contextual understanding in text, they still face limitations in identifying subtle emotional cues, handling class imbalances, and processing noisy or informal input. To address these challenges, this paper introduces Emotion-Aware RoBERTa, an enhanced framework that integrates an Emotion-Specific Attention (ESA) layer and a TF-IDF based gating mechanism. These additions are designed to dynamically prioritize emotionally salient tokens while suppressing irrelevant content, thereby improving both classification accuracy and robustness. The model achieved 96.77% accuracy and a weighted F1-score of 0.97 on the primary dataset, outperforming baseline RoBERTa and other benchmark models such as DistilBERT and ALBERT with a relative improvement ranging from 9.68% to 10.87%. Its generalization capability was confirmed across two external datasets, achieving 88.03% on a large-scale corpus and 65.67% on a smaller, noisier dataset. An ablation study revealed the complementary impact of the ESA and TF-IDF components, balancing performance and inference efficiency. Attention heatmaps were used to visualize ESA’s ability to focus on key emotional expressions, while inference-time optimizations using FP16 and Automatic Mixed Precision (AMP) reduced memory consumption and latency. Additionally, McNemar’s statistical test confirmed the significance of the improvements over the baseline. These findings demonstrate that Emotion-Aware RoBERTa offers a scalable, interpretable, and deployment-friendly solution for fine-grained emotion recognition, making it well-suited for real-world NLP applications in emotion-aware systems.
引用
收藏
相关论文
共 12 条
  • [1] Fine-grained emotion recognition: fusion of physiological signals and facial expressions on spontaneous emotion corpus
    Setiawan, Feri
    Prabono, Aria Ghora
    Khowaja, Sunder Ali
    Kim, Wangsoo
    Park, Kyoungsoo
    Yahya, Bernardo Nugroho
    Lee, Seok-Lyong
    Hong, Jin Pyo
    INTERNATIONAL JOURNAL OF AD HOC AND UBIQUITOUS COMPUTING, 2020, 35 (03) : 162 - 178
  • [2] MPAF-CNN: Multiperspective aware and fine-grained fusion strategy for speech emotion recognition
    Li, Guoyan
    Hou, Junjie
    Liu, Yi
    Wei, Jianguo
    APPLIED ACOUSTICS, 2023, 214
  • [3] A fine-grained human facial key feature extraction and fusion method for emotion recognition
    Shiwei Li
    Jisen Wang
    Linbo Tian
    Jianqiang Wang
    Yan Huang
    Scientific Reports, 15 (1)
  • [4] CorrNet: Fine-Grained Emotion Recognition for Video Watching Using Wearable Physiological Sensors
    Zhang, Tianyi
    El Ali, Abdallah
    Wang, Chen
    Hanjalic, Alan
    Cesar, Pablo
    SENSORS, 2021, 21 (01) : 1 - 25
  • [5] Weakly-Supervised Learning for Fine-Grained Emotion Recognition Using Physiological Signals
    Zhang, Tianyi
    El Ali, Abdallah
    Wang, Chen
    Hanjalic, Alan
    Cesar, Pablo
    IEEE TRANSACTIONS ON AFFECTIVE COMPUTING, 2023, 14 (03) : 2304 - 2322
  • [6] Few-Shot Learning for Fine-Grained Emotion Recognition Using Physiological Signals
    Zhang, Tianyi
    El Ali, Abdallah
    Hanjalic, Alan
    Cesar, Pablo
    IEEE TRANSACTIONS ON MULTIMEDIA, 2023, 25 : 3773 - 3787
  • [7] Research on Emotion Recognition Method Based on Adaptive Window and Fine-Grained Features in MOOC Learning
    Shen, Xianhao
    Bao, Jindi
    Tao, Xiaomei
    Li, Ze
    SENSORS, 2022, 22 (19)
  • [8] A Fine-Grained Approach for EEG-Based Emotion Recognition Using Clustering and Hybrid Deep Neural Networks
    Zhang, Liumei
    Xia, Bowen
    Wang, Yichuan
    Zhang, Wei
    Han, Yu
    ELECTRONICS, 2023, 12 (23)
  • [9] EMCNN: Fine-Grained Emotion Recognition based on PPG using Multi-scale Convolutional Neural Network
    Han, Jiyang
    Li, Hui
    Zhang, Xi
    Zhang, Yu
    Yang, Hui
    BIOMEDICAL SIGNAL PROCESSING AND CONTROL, 2025, 105
  • [10] Integrating personalized and contextual information in fine-grained emotion recognition in text: A multi-source fusion approach with explainability
    Ngo, Anh
    Kocon, Jan
    INFORMATION FUSION, 2025, 118