Journal of Computer Applications
Next Articles
Received:
Revised:
Online:
Published:
梁一鸣1,范菁2,柴汶泽2
通讯作者:
基金资助:
Abstract: Abstract: This paper focuses on key challenges in fine-grained sentiment classification, addressing limitations in deep sentiment understanding in existing models, the unidirectional constraints of traditional attention mechanisms, and class imbalance issues in natural language processing. To tackle these challenges, a sentiment classification model that integrates multi-scale BERT features with a bidirectional cross-attention mechanism (M-BCA) is proposed. The model first extracts multi-scale features from the lower, middle, and upper layers of BERT, representing surface information, syntactic information, and deep semantic information, respectively. Then, a three-channel GRU is used to further extract deep semantic features. To enhance the interaction between multi-scale features, a bidirectional cross-attention mechanism is introduced, promoting interaction and learning across different scales of features. Additionally, to address the class imbalance issue, a data augmentation strategy and a hybrid loss function are designed to optimize the model’s learning of minority class samples. Experimental results demonstrate that M-BCA performs notably well in fine-grained sentiment classification tasks, particularly in classifying minority class samples, providing new research perspectives and technical pathways for the field of sentiment classification.
Key words: BERT, Fine-grained Sentiment Classification, Multi-scale Feature Fusion, Data Augmentation, Mixed Loss Function, Bidirectional Cross Attention
摘要: 摘 要: 文章聚焦于细粒度情感分类中的关键问题,针对现有模型在深层情感理解上的局限性、传统注意力机制的单向性束缚及自然语言处理中的类别不平衡等挑战,提出了一种融合多尺度BERT特征和双向交叉注意力机制的情感分类模型(Multi-scale BERT features with Bidirectional Cross Attention,M-BCA)。首先,模型从BERT的低层、中层、高层提取多尺度特征,分别代表表面信息、语法信息和深层语义信息。接着,利用三通道GRU进一步提取深层语义特征。为增强多尺度特征之间的交互性,文章引入了双向交叉注意力机制,促进了不同尺度特征之间的交互与学习。此外,为应对不平衡数据问题,设计了数据增强策略与混合损失函数,以优化模型对少数类别样本的学习。实验结果显示,M-BCA在细粒度情感分类任务中性能显著,尤其在少数类别样本分类上表现突出,为情感分类领域提供了新的研究视角和技术途径。
关键词: BERT, 细粒度情感分类, 多尺度特征融合, 数据增强, 混合损失函数, 双向交叉注意力
梁一鸣 范菁 柴汶泽. 基于双向交叉注意力的多尺度特征融合情感分类[J]. 《计算机应用》唯一官方网站, DOI: 10.11772/j.issn.1001-9081.2024081193.
0 / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2024081193