应用科学学报 ›› 2026, Vol. 44 ›› Issue (1): 149-165.doi: 10.3969/j.issn.0255-8297.2026.01.010

• 计算机应用专辑 • 上一篇    下一篇

融合BERT编码层的多粒度语义方面级情感分析模型

徐凯1, 池明得1, 王崎2, 李建州3, 张辉1,3   

  1. 1. 贵州财经大学 信息学院, 贵州 贵阳 550025;
    2. 贵州大学 公共大数据国家重点实验室, 贵州 贵阳 550025;
    3. 世纪恒通科技股份有限公司 博士后科研工作站, 贵州 贵阳 550014
  • 收稿日期:2025-08-06 发布日期:2026-02-03
  • 通信作者: 张辉,高级工程师,CCF会员,研究方向为智能计算、自然语言处理。E-mail:zhanghui@mail.gufe.edu.cn E-mail:zhanghui@mail.gufe.edu.cn
  • 基金资助:
    国家自然科学基金项目(No.62162008);教育部供需对接就业育人项目(No.2023123092160);贵州省科技支撑计划项目(No.黔科合支撑[2023]一般372);贵州省高等学校自然科学研究项目(No.黔教技[2023]063号);贵州财经大学大数据技术认知仿真实验平台建设项目(No.2022XFB02);贵州财经大学创新探索及学术新苗项目(No.2022XSXMB11)

Multi-granularity Semantic Aspect-Based Sentiment Analysis Model with Fusion of BERT Encoding Layers

XU Kai1, CHI Mingde1, WANG Qi2, LI Jianzhou3, ZHANG Hui1,3   

  1. 1. School of Information, Guizhou University of Finance and Economics, Guiyang 550025, Guizhou, China;
    2. State Key Laboratory of Public Big Data, Guizhou University, Guiyang 550025, Guizhou, China;
    3. Postdoctoral Scientific Research Station, Shijihengtong Technology Co., Ltd., Guiyang 550014, Guizhou, China
  • Received:2025-08-06 Published:2026-02-03

摘要: 方面级情感分析旨在识别文本中针对特定方面的情感倾向,然而现有研究仍面临多重挑战:基于BERT的方面级情感分析研究存在语义过拟合、低层级语义利用不足的问题;自注意力机制存在局部信息丢失的问题;多编码层和多粒度语义的结构存在信息冗余问题。为此,提出一种融合BERT编码层的多粒度语义方面级情感分析模型(multi-granular semantic aspect-based sentiment analysis model with fusion of BERT encoding layers,MSBEL)。具体地,引入金字塔注意力机制,利用各个编码层的语义特征,并结合低层编码器以降低过拟合;通过多尺度门控卷积增强模型处理局部信息丢失的能力;使用余弦注意力突出与方面词相关的情感特征,从而减少信息冗余。t-SNE的可视化分析表明,MSBEL的情感表示聚类效果优于BERT。此外,在多个基准数据集上将本文模型与主流模型的性能进行了对比,结果显示:与LCF-BERT相比,本文模型在5个数据集上的F1分别提升了1.53%、3.94%、1.39%、6.68%、5.97%;与SenticGCN相比,本文模型的F1平均提升0.94%,最大提升2.12%;与ABSA-DeBERTa相比,本文模型的F1平均提升1.16%,最大提升4.20%,验证了本文模型在方面级情感分析任务上的有效性和优越性。

关键词: 方面级情感分析, 多粒度, BERT, 金字塔注意力机制, 多尺度门控卷积单元

Abstract: Aspect-based sentiment analysis (ABSA) aims to identify the sentiment polarity toward specific aspects within a text. However, existing research still faces multiple challenges: BERT-based approaches suffer from semantic overfitting and insufficient utilization of low-level semantic features; the self-attention mechanism is prone to losing local information; structures with multiple encoding layers and multi-granularity semantics lead to information redundancy. To address these issues, this paper proposed a multi-granularity semantic aspect-based sentiment analysis model with fusion of BERT encoding layers (MSBEL). The model introduced a pyramid attention mechanism to leverage semantic features from various encoding layers, and was combined with low-level encoders to mitigate overfitting. It employed multi-scale gated convolution to enhance its capability in handling local information loss and utilized cosine attention to highlight sentiment features relevant to aspect terms, thereby reducing information redundancy. t-SNE visualization demonstrates that the clustering effect of sentiment representations of MSBEL is superior to that of BERT. MSBEL was compared with mainstream models on multiple benchmark datasets. Compared with LCF-BERT, it achieves F1 improvements of 1.53%, 3.94%, 1.39%, 6.68%, and 5.97% on five datasets. In comparison with SenticGCN, it achieves an average increase of F1 by 0.94% and a maximum increase of 2.12%. Compared with ABSA-DeBERTa, MSBEL increases the F1 by 1.16% on average and achieves a maximum increase of 4.20%. These results validate the effectiveness and superiority of the proposed model for ABSA tasks.

Key words: aspect-based sentiment analysis, multi-granularity, BERT, pyramid attention mechanism, multi-scale gated convolutional unit

中图分类号: