Aspect-based Sentiment Analysis based on Local Context Focus Mechanism and Talking-Head Attention
Zhengchao Lin, Bicheng Li · 2022
Aspect-based Sentiment Analysis is an important research direction in the field of natural language processing, and its purpose is to predict the sentiment polarity of different aspects in sentences. In the existing Aspect-based Sentiment Analysis usually ignores the relationship between sentiment polarity and local context, and the operation of each attention head in the multi-head attention used is independent of each other. To this end, an Aspect-based Sentiment Analysis model based on the local context focus mechanism and talking-head attention is proposed. First, preliminary features of local context and global context are captured by a BERT pretrained model. Then in the feature extraction layer, the local contextual focus mechanism is used, and the local contextual features are further extracted through the contextual feature dynamic mask layer combined with the talking-head attention. In the feature extraction layer, talking-head attention is used to further extract global context features. Finally, in the feature learning layer, the local and global information are fused and input to the nonlinear layer to obtain sentiment analysis results. Experiments are conducted on three public datasets. Comparative experiments show that compared with multiple existing baseline models, the MF1 value and Accuracy of the new model are improved.