Open Aspect Target Sentiment Classification with Natural Language Prompts

Ronald Seoh, Ian Birle, Mrinal Tak, Haw-Shiuan Chang, Brian Pinette, Alfred HoughEMNLP 2021

Introduction

Traditional sentiment analysis often evaluates a sentence as a whole. However, Aspect Target Sentiment Classification (ATSC) provides a more granular view by determining the sentiment toward specific features. For instance, in the review "The food was great but the service was slow," a model must correctly assign a positive sentiment to "food" and a negative one to "service."

The primary challenge in ATSC is the "data-hungry" nature of standard supervised models. These systems typically require thousands of hand-labeled examples to adapt to new domains (e.g., moving from restaurant to laptop reviews). They often fail in "zero-shot" or "few-shot" scenarios and struggle with implicit aspects—such as recognizing that a mention of "fajitas" refers to the "food" category.

Reformulating ATSC with Natural Language Prompts

To address these limitations, this research proposes reframing ATSC as a natural language prompting task. Instead of standard classification, the authors utilize two primary architectures:

  1. ATSC as Language Modeling (LM): The task is treated as a "cloze" (fill-in-the-blank) test. A prompt like The {aspect} is [MASK]. is appended to the review. The model (BERT or GPT-2) then predicts the probability of the masked word being "good," "bad," or "ok."
  2. ATSC as Natural Language Inference (NLI): The review serves as a "premise," and a sentiment statement acts as a "hypothesis" (e.g., "The front desk service is good"). The model determines if the premise entails the hypothesis.
Overview of LM and NLI prompting methods for ATSC.

To further enhance performance, the models undergo "domain-specific pretraining" using millions of unlabeled reviews from Amazon and Yelp before being fine-tuned on specific ATSC tasks.

Datasets and Evaluation

The models were evaluated using the SemEval 2014 Task 4 benchmark, covering Laptop and Restaurant domains. Unlabeled pretraining utilized approximately 21 million Amazon reviews and 2 million Yelp reviews. The NLI-based model was also pretrained on the Multi-Genre Natural Language Inference (MNLI) dataset.

Key Results and Insights

The prompting approach demonstrates a significant ability to tap into the latent knowledge of Large Language Models (LLMs). Because these models have already processed millions of reviews during initial training, prompts "nudge" them to apply existing knowledge rather than learning sentiment from scratch.

Few-Shot and Zero-Shot Performance

The NLI approach proved exceptionally powerful when data was scarce. In a 16-shot scenario within the laptop domain, the NLI-based method outperformed the state-of-the-art supervised baseline by 24.13 accuracy points and 33.14 macro F1 points.

Performance on the Laptop domain across different training sizes.

Furthermore, the models exhibited "zero-shot" capabilities, producing reasonable predictions without any training examples—a task impossible for traditional supervised classifiers.

Implicit Understanding and Robustness

The models also showed a remarkable "transfer" ability. Even when trained only on explicit terms, they could accurately predict sentiment for broad categories (like "food") that never appeared in the training set. Additionally, cross-domain testing (training on restaurants, testing on laptops) maintained high accuracy, highlighting the generalizability of natural language prompts.

Limitations and Future Directions

While the NLI model excels in few-shot settings, it is occasionally outperformed by the LM approach in "full-shot" (large data) scenarios. This suggests the NLI model may require more domain-specific pretraining to master niche vocabulary.

Future work may involve automated prompt generation to reduce sensitivity to manual wording and the development of unified models that perform both aspect extraction and sentiment classification simultaneously.

Summary updated

BibTeX
@inproceedings{seoh2021open,
  author = {Ronald Seoh and Ian Birle and Mrinal Tak and Haw-Shiuan Chang and Brian Pinette and Alfred Hough},
  title = {{Open Aspect Target Sentiment Classification with Natural Language Prompts}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.509},
}
Figure