Capsule Network with Interactive Attention for Aspect-Level Sentiment Classification

Chunning Du, Haifeng Sun, Jingyu Wang, Qi Qi, Jianxin Liao, Tong Xu, Ming Liu

Introduction

Aspect-level sentiment classification (ALSC) is a fine-grained sentiment analysis task that aims to identify the sentiment polarity (positive, negative, or neutral) of specific targets within a sentence. A significant challenge in ALSC arises from multi-aspect sentences, where a single sentence expresses different sentiments for different targets. For instance, in the sentence "The food was definitely good, but the price was high," the sentiment for "food" is positive, while for "price" it is negative.

Traditional neural networks often struggle to disentangle these overlapping feature representations. Standard attention mechanisms or max-pooling operations frequently fail to correctly associate sentimental words with their corresponding targets, leading to classification errors.

Methodology: IACapsNet

To address the issue of overlapping features, this paper proposes IACapsNet (Capsule Network with Interactive Attention). Unlike traditional scalar-based neurons, IACapsNet utilizes vector-based capsules to encode multiple properties of words simultaneously.

Architecture of IACapsNet

The core components of the architecture include:

  • Vector-Based Representations: Capsules output vectors that capture rich semantic and sentiment features.
  • EM Routing-by-Agreement: The model employs an Expectation-Maximization (EM) routing algorithm. This iterative process clusters low-level features into high-level capsules, effectively separating overlapped sentiments for different aspects.
  • Interactive Attention Mechanism: To incorporate aspect-specific context, an interactive attention mechanism is integrated into the routing procedure. This dynamically adjusts the primary capsules' activation based on the relevance of context words to the specific aspect term.

Experimental Setup

The performance of IACapsNet was evaluated on three benchmark datasets:

  1. Laptop (SemEval 2014 Task 4): Customer reviews of laptops.
  2. Restaurant (SemEval 2014 Task 4): Customer reviews of restaurants.
  3. Twitter Dataset: A collection of target-dependent tweets.

To ensure a clean evaluation, the "conflict" category was removed from the SemEval datasets, focusing on positive, negative, and neutral polarities.

Key Results and Insights

IACapsNet achieved state-of-the-art (SOTA) performance across all three benchmarks, outperforming established models such as IAN, MGAN, and TNet.

Performance Comparison of IACapsNet against Baselines

Performance Highlights:

  • Laptop: 76.80% Accuracy.
  • Restaurant: 81.79% Accuracy.
  • Twitter: 75.01% Accuracy.

Key Insights:

  • Clustering vs. Pooling: The feature clustering capability of capsule networks via routing-by-agreement is superior to standard pooling for disentangling complex, multi-target text.
  • EM Routing Advantages: EM-based routing proved more effective and efficient than the original cosine-similarity routing. It achieved higher accuracy with approximately 10% fewer parameters and 36% faster execution.
  • Top-Down Attention: Iterative routing acts as a robust top-down attention mechanism, making the model more resilient to complex linguistic structures like irony.

Conclusion

IACapsNet demonstrates that combining capsule networks with interactive attention significantly improves aspect-level sentiment classification by better handling overlapping feature representations. While the iterative routing algorithm introduces some computational overhead compared to simple attention models, its parameter efficiency and superior accuracy make it a compelling choice for fine-grained NLP tasks. Future work may explore applying this interactive routing theory to other domains like machine translation and reading comprehension.

Summary updated

BibTeX
@inproceedings{du2019capsule,
  author = {Chunning Du and Haifeng Sun and Jingyu Wang and Qi Qi and Jianxin Liao and Tong Xu and Ming Liu},
  title = {{Capsule Network with Interactive Attention for Aspect-Level Sentiment Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1551},
}
Figure