Improving Review Representations With User Attention and Product Attention for Sentiment Classification

Zhen Wu, Xin-Yu Dai, Cunyan Yin, Shujian Huang, Jiajun Chen

Abstract

Sentiment classification often overlooks the subjective nature of reviews, where the same word can imply different sentiment levels depending on the user's personal standards or the product's category. This paper introduces the Hierarchical User Attention and Product Attention (HUAPA) framework, which models review representations through dual attention branches. By leveraging user and product embeddings as queries, HUAPA disentangles emotional expressions from descriptive product features. Evaluation on IMDB and Yelp datasets shows that HUAPA significantly outperforms baseline models, demonstrating the importance of modeling user and product information separately.

Introduction

The interpretation of sentiment in natural language is highly context-dependent. For instance, the word "good" used by a lenient reviewer might signify mediocrity, whereas the same word from a stringent critic could indicate high praise. Similarly, expectations for a "good" budget item differ vastly from those for a luxury product. Traditional sentiment analysis models often treat reviews as isolated text, failing to capture these nuances. Wu et al. (AAAI-18) propose that effective sentiment classification requires understanding both the "who" (the user) and the "what" (the product) through distinct, specialized lenses.

The HUAPA Framework

The authors propose the Hierarchical User Attention and Product Attention (HUAPA) framework. HUAPA is built on a hierarchical structure that mirrors the natural composition of documents: words form sentences, and sentences form documents.

The architecture of the HUAPA neural network, showing the dual branches for user and product attention.

The model utilizes Bidirectional Long Short-Term Memory (BiLSTM) networks at both the word and sentence levels. The core innovation lies in its dual attention mechanism:

  1. User Attention Branch: This branch uses user embeddings as queries to identify words and sentences that reflect a specific user's emotional style and preferences.
  2. Product Attention Branch: This branch uses product embeddings to focus on text describing specific product characteristics.

By maintaining these separate representations, the model avoids the "noisy" conflation of emotional state and descriptive traits. The final document representation is a concatenation of the user-view and product-view vectors, which is then passed to a softmax layer for classification. A weighted loss function ensures that both individual views remain predictive, enhancing the robustness of the learned features.

Experimental Evaluation

The researchers evaluated HUAPA on three large-scale datasets: IMDB (movie reviews), Yelp 2013, and Yelp 2014 (restaurant reviews). These datasets provide unique identifiers for users and products, allowing the model to learn latent embeddings for each entity over time.

HUAPA consistently outperformed all baseline models, including those using standard attention mechanisms. On the IMDB dataset, HUAPA achieved an accuracy of 0.550, surpassing the previous state-of-the-art (NSC+UPA) at 0.533. Furthermore, the model showed significant reductions in Root Mean Square Error (RMSE), indicating that its predictions are closer to the ground truth even when incorrect.

Analysis and Visualization

A key insight from the study is the "separation of concerns" between user and product information. Visualization of the attention weights reveals that the User Attention branch typically highlights emotional verbs, while the Product Attention branch latches onto descriptive nouns and adjectives.

Visualization of attention weights showing how 'good' receives high product attention while 'disappointed' receives high user attention.

The authors also observed that user information generally provides a stronger signal for sentiment than product information. This suggests that individual linguistic style is a more reliable predictor of star ratings than the specific attributes of the item being reviewed. In cases where a user's preference contradicts a product's typical reception—such as a user being disappointed despite a product being "good"—the dual-attention mechanism correctly identifies the user's actual sentiment.

Conclusion

HUAPA represents a significant step forward in personalized sentiment analysis. By treating sentiment as a dialogue between a specific user and a specific product, the model captures the inherent subjectivity of human opinion. While challenges such as the "cold start" problem for new users and increased computational complexity remain, the dual-attention approach provides a powerful framework for more nuanced text representation.

Summary updated

BibTeX
@inproceedings{wu2018improving,
  author = {Zhen Wu and Xin-Yu Dai and Cunyan Yin and Shujian Huang and Jiajun Chen},
  title = {{Improving Review Representations With User Attention and Product Attention for Sentiment Classification}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.12054},
}
Figure