Unrestricted Attention May Not Be All You Need-Masked Attention Mechanism Focuses Better on Relevant Parts in Aspect-Based Sentiment Analysis

被引:18
|
作者
Feng, Ao [1 ]
Zhang, Xuelei [1 ]
Song, Xinyu [1 ]
机构
[1] Chengdu Univ Informat Technol, Sch Comp Sci, Chengdu 610225, Peoples R China
来源
IEEE ACCESS | 2022年 / 10卷
关键词
Task analysis; Sentiment analysis; Bit error rate; Deep learning; Data mining; Transformers; Semantics; attention mechanism; pre-trained language model; masked attention; NETWORKS;
D O I
10.1109/ACCESS.2022.3142178
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Aspect-Based Sentiment Analysis (ABSA) is one of the highly challenging tasks in natural language processing. It extracts fine-grained sentiment information in user-generated reviews, as it aims at predicting the polarities towards predefined aspect categories or relevant entities in free text. Previous deep learning approaches usually rely on large-scale pre-trained language models and the attention mechanism, which applies the complete computed attention weights and does not place any restriction on the attention assignment. We argue that the original attention mechanism is not the ideal configuration for ABSA, as for most of the time only a small portion of terms are strongly related to the sentiment polarity of an aspect or entity. In this paper, we propose a masked attention mechanism customized for ABSA, with two different approaches to generate the mask. The first method sets an attention weight threshold that is determined by the maximum of all weights, and keeps only attention scores above the threshold. The second selects the top words with the highest weights. Both remove the lower score parts that are assumed to be less relevant to the aspect of focus. By ignoring part of input that is claimed irrelevant, a large proportion of input noise is removed, keeping the downstream model more focused and reducing calculation cost. Experiments on the Multi-Aspect Multi-Sentiment (MAMS) and SemEval-2014 datasets show significant improvements over state-of-the-art pre-trained language models with full attention, which displays the value of the masked attention mechanism. Recent work shows that simple self-attention in Transformer quickly degenerates to a rank-1 matrix, and masked attention may be another cure for that trend.
引用
收藏
页码:8518 / 8528
页数:11
相关论文
共 50 条
  • [1] An Adaptive Masked Attention Mechanism to Act on the Local Text in a Global Context for Aspect-Based Sentiment Analysis
    Lin, Te
    Joe, Inwhee
    IEEE ACCESS, 2023, 11 : 43055 - 43066
  • [2] GRAPH ATTENTION NETWORKS WITH STRUCTURAL ATTENTION MECHANISM FOR ASPECT-BASED SENTIMENT CLASSIFICATION
    Li, Xiaowen
    Lu, Ran
    Liu, Peiyu
    Zhu, Zhengfang
    JOURNAL OF NONLINEAR AND CONVEX ANALYSIS, 2021, 22 (09) : 1805 - 1819
  • [3] Attention-based Sentiment Reasoner for aspect-based sentiment analysis
    Liu, Ning
    Shen, Bo
    Zhang, Zhenjiang
    Zhang, Zhiyuan
    Mi, Kun
    HUMAN-CENTRIC COMPUTING AND INFORMATION SCIENCES, 2019, 9 (01)
  • [4] Transformer Based Multi-Grained Attention Network for Aspect-Based Sentiment Analysis
    Sun, Jiahui
    Han, Ping
    Cheng, Zheng
    Wu, Enming
    Wang, Wenqing
    IEEE ACCESS, 2020, 8 : 211152 - 211163
  • [5] Knowledge Guided Capsule Attention Network for Aspect-Based Sentiment Analysis
    Zhang, Bowen
    Li, Xutao
    Xu, Xiaofei
    Leung, Ka-Cheong
    Chen, Zhiyao
    Ye, Yunming
    IEEE-ACM TRANSACTIONS ON AUDIO SPEECH AND LANGUAGE PROCESSING, 2020, 28 : 2538 - 2551
  • [6] Using Dependency Information to Enhance Attention Mechanism for Aspect-Based Sentiment Analysis
    Pu, Luwen
    Zou, Yuexian
    Zhang, Jian
    Huang, Shilei
    Yao, Lin
    NATURAL LANGUAGE PROCESSING AND CHINESE COMPUTING (NLPCC 2019), PT I, 2019, 11838 : 672 - 684
  • [7] Aspect-based sentiment analysis for online reviews with hybrid attention networks
    Yuming Lin
    Yu Fu
    You Li
    Guoyong Cai
    Aoying Zhou
    World Wide Web, 2021, 24 : 1215 - 1233
  • [8] Aspect-Based Sentiment Analysis with New Target Representation and Dependency Attention
    Yang, Tao
    Yin, Qing
    Yang, Lei
    Wu, Ou
    IEEE TRANSACTIONS ON AFFECTIVE COMPUTING, 2022, 13 (02) : 640 - 650
  • [9] Lightweight multilayer interactive attention network for aspect-based sentiment analysis
    Zheng, Wenjun
    Zhang, Shunxiang
    Yang, Cheng
    Hu, Peng
    CONNECTION SCIENCE, 2023, 35 (01)
  • [10] Aspect-based sentiment analysis for online reviews with hybrid attention networks
    Lin, Yuming
    Fu, Yu
    Li, You
    Cai, Guoyong
    Zhou, Aoying
    WORLD WIDE WEB-INTERNET AND WEB INFORMATION SYSTEMS, 2021, 24 (04): : 1215 - 1233