Multi-grained Attention Network for Aspect-Level Sentiment Classification

Feifan Fan, Yansong Feng, Dongyan Zhao

Introduction

Aspect-level sentiment classification aims to identify the sentiment polarity (e.g., positive, negative, or neutral) of specific aspects within a sentence. For instance, in the sentence "The battery life is great but the screen is too small," a model must distinguish between the positive sentiment for "battery life" and the negative sentiment for "screen."

Existing approaches often suffer from two primary limitations. First, they typically employ coarse-grained attention mechanisms that average aspect word vectors into a single representation, leading to significant information loss—especially for long or complex aspects. Second, they treat multiple aspects within the same sentence as independent instances, failing to leverage the potential for "partitioning" attention between different targets.

Methodology: The Multi-grained Attention Network (MGAN)

To address these issues, the authors propose the Multi-grained Attention Network (MGAN). This architecture integrates fine-grained word-level interactions with traditional coarse-grained attention to capture nuanced sentiment cues.

The architecture of the Multi-grained Attention Network (MGAN), illustrating the flow from input embeddings to the final aspect sentiment prediction.

The MGAN framework consists of several key components:

  • Fine-Grained Attention: Unlike coarse-grained methods, MGAN computes an alignment matrix between every word in the aspect and every word in the context. This allows the model to capture precise word-to-word interactions.
  • Multi-Grained Integration: The model fuses the fine-grained representation with coarse-grained bidirectional attention (Aspect-to-Context and Context-to-Aspect) to provide a comprehensive view of the sentence.
  • Position Encoding: Recognizing that words physically closer to an aspect are often more relevant, the model weights context words based on their distance from the target aspect.
  • Aspect Alignment Loss: A novel contribution of this work is the aspect alignment loss. For sentences containing multiple aspects, this loss encourages the model to produce distinct attention weights for different aspects, particularly when their sentiment polarities differ. This forces the model to focus on the relevant parts of the sentence for each specific target.

Experimental Setup

The MGAN model was evaluated on three widely used benchmarks:

  1. Laptop: Reviews from the SemEval 2014 Task 4.
  2. Restaurant: Reviews from the SemEval 2014 Task 4.
  3. Twitter: A dataset of tweets collected by Dong et al. (2014).

These datasets provide labels for positive, neutral, and negative sentiment polarities across various domains.

Key Results and Discussion

MGAN demonstrates superior performance compared to several state-of-the-art baselines, including IAN, MemNet, and RAM.

Comparison of MGAN against baseline methods across Laptop, Restaurant, and Twitter datasets. MGAN achieves the highest accuracy and Macro-F1 scores.

As shown in the results table, MGAN consistently achieves the highest accuracy and Macro-F1 scores across all three datasets. Specifically, on the Laptop dataset, MGAN reached an accuracy of 75.39%, outperforming the previous best model (RAM) by nearly 1%.

Ablation studies further highlighted the importance of the proposed components. The Aspect Alignment Loss proved particularly effective for the Laptop and Restaurant datasets, which contain a higher frequency of multi-aspect sentences. By modeling the relationships between aspects, MGAN learns a more contrastive and precise representation of the context.

Conclusion

The Multi-grained Attention Network (MGAN) advances aspect-level sentiment classification by bridging the gap between coarse and fine-grained attention. By incorporating word-level interactions and a novel aspect alignment loss, the model effectively handles complex sentences with multiple targets. Future work may explore graph-based methods to further refine the interactions between aspects in highly "conflicted" sentences.

Summary updated

BibTeX
@inproceedings{fan2018multi,
  author = {Feifan Fan and Yansong Feng and Dongyan Zhao},
  title = {{Multi-grained Attention Network for Aspect-Level Sentiment Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1380},
}
Figure