Context-Guided BERT for Targeted Aspect-Based Sentiment Analysis

Zhengxuan Wu, Desmond C. Ong
10/15/2020
cs.CLcs.AI
transformer-attention

Official code: frankaging/Quasi-Attention-ABSA (47 stars, Python, MIT, last commit 2021-06-04).

Abstract

Aspect-based sentiment analysis (ABSA) and Targeted ASBA (TABSA) allow finer-grained inferences about sentiment to be drawn from the same text, depending on context. For example, a given text can have different targets (e.g., neighborhoods) and different aspects (e.g., price or safety), with different sentiment associated with each target-aspect pair.

Show full abstract

In this paper, we investigate whether adding context to self-attention models improves performance on (T)ABSA. We propose two variants of Context-Guided BERT (CG-BERT) that learn to distribute attention under different contexts. We first adapt a context-aware Transformer to produce a CG-BERT that uses context-guided softmax-attention. Next, we propose an improved Quasi-Attention CG-BERT model that learns a compositional attention that supports subtractive attention. We train both models with pretrained BERT on two (T)ABSA datasets: SentiHood and SemEval-2014 (Task 4). Both models achieve new state-of-the-art results with our QACG-BERT model having the best performance. Furthermore, we provide analyses of the impact of context in the our proposed models. Our work provides more evidence for the utility of adding context-dependencies to pretrained self-attention-based language models for context-based natural language tasks.

View on arXivView PDF

Code Implementations(1)

MIT

The Codebase for Quasi-Attention BERT Model for TABSA Tasks (AAAI '21)

4713Python, Jupyter NotebookNov 4, 20205 years agoMIT
aspect-based-sentiment-analysisbertquasi-attentionsemevalsentihood-dataset+1 more

Similar Papers

Cite this paper

@article{wu2020contextguided,
  title  = {Context-Guided BERT for Targeted Aspect-Based Sentiment Analysis},
  author = {Zhengxuan Wu and Desmond C. Ong},
  year   = {2020},
  eprint = {2010.07523},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.07523}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2010.07523.svg)](https://codeofpaper.com/paper/2010.07523)

Discussion