Aspect-Based Sentiment Classification with Attentive Neural Turing Machines

Qianren Mao, Jianxin Li, Senzhang Wang, Yuanning Zhang, Hao Peng, Min He, Lihong Wang

Introduction

Aspect-Based Sentiment Analysis (ABSA) is a fine-grained task where the goal is to determine the sentiment (positive, negative, or neutral) toward a specific "target" or "aspect" within a sentence. For example, in the sentence "The food was great, but the service was slow," a model must identify "food" as positive and "service" as negative.

Existing models, primarily based on LSTMs or standard attention mechanisms, face two major hurdles:

  1. Multiple-Target-Different-Polarity: When a single sentence contains multiple aspects with conflicting sentiments, models often struggle to isolate the context relevant to just one target.
  2. Long-Sequential-Distance: In complex sentences, the sentiment-bearing word might be far away from the target word. Standard Recurrent Neural Networks (RNNs) suffer from "gradient vanishing," making it difficult to maintain a stable link over many tokens.

Methodology

The researchers propose the Attentive Neural Turing Machine (ANTM), which draws inspiration from the original Neural Turing Machine (NTM) architecture. The core innovation is the separation of storage and computation.

Architecture of the Attentive Neural Turing Machine (ANTM) showing the interaction between the controller, external memory, and target-dependent addressing.

The ANTM architecture consists of several key components:

  • External Memory Bank: Instead of relying solely on hidden states to "remember" the sentence, ANTM uses an external memory where each slot corresponds to a word representation.
  • Recurrent Controller: A Bidirectional Gated Recurrent Unit (Bi-GRU) acts as the "brain," managing read and write operations to the memory.
  • Target-Dependent Addressing (TDAM): This is the "Attentive" part. The model uses the specific aspect/target embedding as a query to determine which parts of the memory to read from or write to.
  • Read/Write Operations: The model "erases" irrelevant information and "adds" new contextual features to the memory at each step. This allows the model to adaptively keep track of the interaction history between the target and the rest of the sentence.
  • BERT Integration: The authors experimented with using pre-trained BERT (Base and Large) to initialize the memory slots, providing the model with rich, contextualized starting representations.

Experimental Setup

The model was evaluated on three standard benchmarks: SemEval 2014 Task 4 (Laptop Domain), SemEval 2014 Task 4 (Restaurant Domain), and a Twitter Dataset. The authors cleaned these datasets by removing sentences that contained both positive and negative sentiment toward the same target to ensure clear evaluation.

Results and Analysis

The ANTM model, particularly when paired with BERT-Large ($ANTM+BERT_L$), achieved state-of-the-art performance across all tested datasets:

  • Laptop: Achieved 75.84% accuracy, outperforming the previous RAM model (74.49%).
  • Restaurant: Achieved 82.49% accuracy, a significant jump over the RAM model (80.23%).
  • Twitter: Achieved 72.35% accuracy, compared to 69.36% for the baseline.
Attention visualizations for ANTM variants across different sentiment classification cases, highlighting the model's ability to isolate relevant context for specific targets.

Qualitative analysis through attention visualizations confirmed that the model successfully focused on the correct sentiment words even when they were separated by many tokens or when the sentence contained multiple conflicting targets. As shown in Figure 4, the model correctly identifies "better" for the target "coffee" and "overpriced" for "Cosi sandwiches" within the same sentence.

Key Insights

  • Memory as a Buffer Against Forgetting: By using an addressable external memory, the model doesn't have to compress the entire sentence into a single vector. It can "jump" to relevant words regardless of their position, effectively solving the long-distance dependency problem.
  • Interactive History: Unlike static attention, the NTM's write operation allows the model to update its understanding of the sentence as it processes each word in relation to the target.
  • BERT as a Foundation: While many models fine-tune BERT, this paper shows that using BERT outputs as the initial state for a more complex memory architecture (ANTM) yields better results for fine-grained tasks than using BERT or LSTMs alone.

Conclusion

While the ANTM demonstrates strong results, challenges remain regarding computational complexity, as NTMs are generally more expensive to train than simple LSTMs or Transformers due to memory addressing overhead. Future work could involve more sophisticated representations for multi-word targets and scaling the model to even longer sequences and broader sentiment analysis tasks.

Summary updated

BibTeX
@inproceedings{mao2019aspect,
  author = {Qianren Mao and Jianxin Li and Senzhang Wang and Yuanning Zhang and Hao Peng and Min He and Lihong Wang},
  title = {{Aspect-Based Sentiment Classification with Attentive Neural Turing Machines}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/714},
}
Figure