A Hierarchical Model of Reviews for Aspect-based Sentiment Analysis

Sebastian Ruder, Parsa Ghaffari, John G. Breslin

Abstract: Opinion mining from customer reviews has become pervasive in recent years. Sentences in reviews, however, are usually classified independently, even though they form part of a review's argumentative structure. Intuitively, sentences in a review build and elaborate upon each other; knowledge of the review structure and sentential context should thus inform the classification of each sentence. We demonstrate this hypothesis for the task of aspect-based sentiment analysis by modeling the interdependencies of sentences in a review with a hierarchical bidirectional LSTM. We show that the hierarchical model outperforms two non-hierarchical baselines, obtains results competitive with the state-of-the-art, and outperforms the state-of-the-art on five multilingual, multi-domain datasets without any hand-engineered features or external resources.

The Challenge of Context in Reviews

In Aspect-Based Sentiment Analysis (ABSA), the goal is to identify the sentiment (positive, negative, or neutral) expressed toward specific attributes of an entity—for example, the "service" or "food quality" in a restaurant review.

Traditional models often suffer from "tunnel vision," treating each sentence as an isolated island. However, human language is inherently structured; sentences in a review build upon one another. A phrase like "No comparison" is ambiguous in isolation—is it uniquely great or uniquely terrible? By ignoring the surrounding discourse structure, flat models struggle to disambiguate these equivocal statements. This research addresses how to computationally capture these inter-sentence dependencies to improve sentiment accuracy.

The Hierarchical Bidirectional LSTM Architecture

To solve the problem of context-blindness, the authors propose a Hierarchical Bidirectional LSTM (H-LSTM). This architecture processes reviews in two distinct stages to capture both local and global context.

  1. Sentence-Level Representation: A bidirectional LSTM (Bi-LSTM) processes the word embeddings of a sentence, looking at words in both forward and reverse order. The final states are concatenated to create a single vector representing the sentence.
  2. Review-Level Representation: These sentence vectors are concatenated with aspect embeddings (e.g., FOOD#QUALITY). This combined vector is fed into a second Bi-LSTM that operates at the review level, allowing the model to track how sentiment evolves across the entire review sequence.
  3. Sequence Tagging: The model frames sentiment analysis as a sequence tagging task. The output layer provides a probability distribution over sentiment classes for every sentence in the review.
The H-LSTM architecture, showing the flow from word embeddings to sentence-level and review-level LSTMs.

Crucially, the model is "end-to-end," learning features directly from data rather than relying on pre-defined sentiment dictionaries or hand-engineered linguistic features.

Multi-Domain and Multi-Lingual Evaluation

The model was evaluated using the SemEval-2016 Aspect-based Sentiment Analysis datasets, a robust benchmark covering five domains (Restaurants, Hotels, Laptops, Phones, and Cameras) and eight languages (including English, Spanish, Russian, Arabic, and Chinese).

The authors utilized pre-trained GloVe embeddings for English and trained custom embeddings for other languages using large corpora like frWaC and the Leipzig Corpora Collection. This broad evaluation demonstrates the model's portability across vastly different linguistic structures.

Why Hierarchy Matters: Disambiguating Sentiment

The primary advantage of the H-LSTM is its ability to use context as a disambiguator. Sentiment is often relative; if a reviewer raves about a specific dish, a subsequent sentence like "Don't leave without it" is clearly positive. A flat model might misclassify the latter as negative due to the word "Don't," but the hierarchical model uses the preceding positive signal to inform its prediction.

Comparison of sentiment predictions between a flat LSTM and the hierarchical H-LSTM on ambiguous sentences.

As shown in the examples above, the H-LSTM correctly identifies the positive sentiment in idiomatic or context-dependent phrases where a standard LSTM fails. This structural knowledge allows the model to remain competitive even without the massive sentiment lexicons used by other top-performing systems.

Key Results and Conclusion

The H-LSTM consistently outperformed sentence-level CNNs and LSTMs across almost all domain-language pairs. It achieved state-of-the-art (SOTA) performance on 5 out of 11 datasets when using pre-trained embeddings.

While the model is highly effective, it does face challenges in low-resource settings where training data is extremely limited (e.g., the Turkish dataset). Future work may involve more sophisticated attention mechanisms to determine which sentences are most relevant to specific aspects, or finding ways to integrate external lexicons without sacrificing the model's end-to-end simplicity. Ultimately, this research proves that modeling the hierarchical structure of discourse is a powerful tool for understanding the nuances of human opinion.

Summary updated

BibTeX
@inproceedings{ruder2016hierarchical,
  author = {Sebastian Ruder and Parsa Ghaffari and John G. Breslin},
  title = {{A Hierarchical Model of Reviews for Aspect-based Sentiment Analysis}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  url = {https://openreview.net/forum?id=ByWelfGOWr},
}
Figure