Attention Transfer Network for Aspect-level Sentiment Classification

Fei Zhao, Zhen Wu, Xinyu Dai

Introduction

Aspect-level Sentiment Classification (ASC) is a fine-grained natural language processing task that aims to identify the sentiment expressed toward specific targets within a sentence. For example, in the sentence "The food was great, but the service was dreadful," an ASC model must distinguish the positive sentiment for "food" from the negative sentiment for "service."

While attention mechanisms are the state-of-the-art approach for linking sentiment words to targets, their performance is often hindered by the scarcity of labeled ASC data. Annotating fine-grained targets is expensive and time-consuming, leading to small datasets where attention mechanisms frequently "lose focus." In contrast, Document-level Sentiment Classification (DSC) datasets, such as Yelp or Amazon reviews, are abundant but lack the target-specific labels required for ASC.

The Attention Transfer Network (ATN)

To address the data scarcity problem, we propose the Attention Transfer Network (ATN). The core idea is to leverage "attention knowledge" from massive DSC datasets to guide the attention mechanism of an ASC model. By teaching the model where to look using insights gained from millions of general reviews, ATN significantly improves the accuracy of identifying sentiment for specific targets.

The architecture of the Attention Transfer Network, illustrating the DSC and ASC modules along with Attention Guidance (AG) and Attention Fusion (AF) mechanisms.

The ATN architecture consists of two primary components:

  1. Pre-trained DSC Module: A BiLSTM model with attention trained on millions of document-level reviews. This model learns a "global" sense of which words carry heavy sentiment weight.
  2. Base ASC Module: A BiLSTM model that incorporates position embeddings to account for the physical distance between words and the target aspect.

Knowledge transfer is achieved through two distinct methods:

  • Attention Guidance (AG): The DSC module acts as a teacher. During training, the ASC model's attention distribution is regularized via KL Divergence to align with the DSC's refined attention. This method improves internal logic without adding computational overhead during inference.
  • Attention Fusion (AF): A fusion gate dynamically blends attention weights from both modules in real-time to generate the final sentiment representation, offering a more powerful but computationally heavier alternative to AG.

To bridge the gap between global document sentiment and local aspect sentiment, a heuristic distance transformation is applied. This ensures that the transferred attention prioritizes words physically closer to the target aspect being analyzed.

Experimental Setup

The model was evaluated on the SemEval 2014 Task 4 datasets, covering the Restaurant and Laptop domains. The source DSC knowledge was extracted from Yelp Reviews (for restaurants) and Amazon Reviews (for laptops), totaling nearly one million reviews.

Results and Analysis

The ATN models consistently outperformed state-of-the-art baselines, including TNet and MGAN. On the Laptop dataset, ATN-AF achieved an accuracy of 76.48%, a significant improvement over the base model's 73.52%. This demonstrates that explicitly transferring attention is more effective than implicit feature sharing.

Experimental results showing the impact of DSC data size on performance and the sensitivity of the model to the transfer weight parameter λ.

Key findings from the experimental analysis include:

  • Data Scaling: As shown in the figures, performance improves steadily as the amount of DSC data used for pre-training increases from 0% to 100%, confirming the value of large-scale "attention knowledge."
  • Parameter Sensitivity: The hyperparameter $\lambda$, which controls the weight of the transferred attention knowledge, shows an optimal range around 0.4. Beyond this point, the "global" knowledge may begin to overshadow the target-specific context of the ASC task.
  • Robustness: Case studies indicate that ATN is particularly effective at handling complex linguistic structures like negation (e.g., "did not enjoy") and identifying low-frequency sentiment words (e.g., "reliable") that are underrepresented in small ASC datasets.

Conclusion

The Attention Transfer Network demonstrates that explicitly transferring attention distributions is a highly effective strategy for overcoming data scarcity in fine-grained sentiment analysis. By teaching models "where to look" using insights from massive general datasets, ATN achieves superior performance and robustness. Future work will explore more sophisticated transformation functions, such as those based on dependency trees, to further refine the alignment between global and local sentiment signals.

Summary updated

BibTeX
@inproceedings{zhao2020attention,
  author = {Fei Zhao and Zhen Wu and Xinyu Dai},
  title = {{Attention Transfer Network for Aspect-level Sentiment Classification}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.70},
}
Figure