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

被引:22
作者
Feng, Ao [1 ]
Zhang, Xuelei [1 ]
Song, Xinyu [1 ]
机构
[1] Chengdu Univ Informat Technol, Sch Comp Sci, Chengdu 610225, Peoples R China
关键词
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
相关论文
共 56 条
[1]   Traffic accident detection and condition analysis based on social networking data [J].
Ali, Farman ;
Ali, Amjad ;
Imran, Muhammad ;
Naqvi, Rizwan Ali ;
Siddiqi, Muhammad Hameed ;
Kwak, Kyung-Sup .
ACCIDENT ANALYSIS AND PREVENTION, 2021, 151
[2]   An intelligent healthcare monitoring framework using wearable sensors and social networking data [J].
Ali, Farman ;
El-Sappagh, Shaker ;
Islam, S. M. Riazul ;
Ali, Amjad ;
Attique, Muhammad ;
Imran, Muhammad ;
Kwak, Kyung-Sup .
FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF ESCIENCE, 2021, 114 :23-43
[3]   Fuzzy Ontology and LSTM-Based Text Mining: A Transportation Network Monitoring System for Assisting Travel [J].
Ali, Farman ;
El-Sappagh, Shaker ;
Kwak, Daehan .
SENSORS, 2019, 19 (02)
[4]  
Bahdanau D, 2016, Arxiv, DOI arXiv:1409.0473
[5]  
Bakshi RK, 2016, PROCEEDINGS OF THE 10TH INDIACOM - 2016 3RD INTERNATIONAL CONFERENCE ON COMPUTING FOR SUSTAINABLE GLOBAL DEVELOPMENT, P452
[6]   ABCDM: An Attention-based Bidirectional CNN-RNN Deep Model for sentiment analysis [J].
Basiri, Mohammad Ehsan ;
Nemati, Shahla ;
Abdar, Moloud ;
Cambria, Erik ;
Acharya, U. Rajendra .
FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF ESCIENCE, 2021, 115 :279-294
[7]  
Brun C., 2014, P 8 INT WORKSHOP SEM, P838
[8]  
Chen P., 2017, P 2017 C EMP METH NA, P452, DOI [10.18653/v1/D17-1047, DOI 10.18653/V1/D17-1047]
[9]  
Devlin J, 2019, Arxiv, DOI [arXiv:1810.04805, 10.48550/arXiv.1810.04805]
[10]  
Dong YH, 2021, PR MACH LEARN RES, V139