Generative Aspect-Based Sentiment Analysis with Contrastive Learning and Expressive Structure

Joseph J. Peper, Lu Wang

TL;DR

Researchers at the University of Michigan have introduced GEN-SCL-NAT, a new framework that significantly improves the extraction of sentiment quadruples (Aspect, Category, Opinion, Sentiment) from text. By combining a novel "natural" generation format with supervised contrastive learning, the model excels at identifying "implicit" sentiments—cases where the reviewer doesn't explicitly name the aspect or opinion (e.g., "it took an hour to be seated" implying slow service).

What Problem Does This Paper Address?

Traditional Sentiment Analysis often looks at a whole sentence, but Aspect-Based Sentiment Analysis (ABSA) gets granular. The current frontier is extracting ACOS quadruples: identifying the Aspect term (e.g., "pizza"), the Aspect Category (e.g., "food quality"), the Opinion term (e.g., "undercooked"), and the Sentiment polarity (e.g., "negative").

The major hurdle is implicit language. Over 30% of sentiment expressions are implicit. If a user writes "The price was high," the aspect ("price") and opinion ("high") are explicit. But if they write "It costs an arm and a leg," the aspect and opinion are implicit. Generative models, like T5, often struggle here because they lack clear indicative keywords to latch onto.

Methods

The authors propose two main enhancements to the standard T5-based generative approach:

1. GEN-NAT: Expressive Target Structure

Generative models perform better when the output they are asked to produce looks like natural language. The authors modified the target output format in three ways:

  • Natural Descriptions: Instead of raw labels like FOOD#QUALITY, they use human-readable descriptions like "the food quality."
  • Scan-based Ordering: When a sentence has multiple quadruples, the model is trained to output them in the order they appear in the text ("scan-based"), reducing the complexity of the generation task.
  • Causal Intra-quadruple Ordering: They arrange the quadruple components in a logical flow: (Category | Aspect is Opinion | Sentiment). This aligns with how autoregressive models decode, conditioning the sentiment on the previously generated aspect and opinion.
Figure 1: Overview of the GEN-SCL-NAT ACOS approach. GEN-NAT uses natural category descriptions and intuitive quadruple ordering to align the target output with the encoder-decoder’s pre-training and auto-regressive nature. GEN-SCL trains the model to discriminably represent three sentiment characteristics during training: (1) sentiment polarity, (2) aspect term type, and (3) opinion term type. For each characteristic, we project the summed encoder final hidden states into a 1024-dimension characteristic representation via a simple fully-connected layer.

2. GEN-SCL: Supervised Contrastive Learning

To help the model "understand" the underlying structure of a review, they added an auxiliary Supervised Contrastive Learning (SCL) objective. During training, this forces the encoder to group similar examples together in the latent space based on three characteristics: sentiment polarity, the presence of implicit aspects, and the presence of implicit opinions. This makes the input representations much more discriminable for the decoder.

Datasets

The model was evaluated on three standard ACOS benchmarks:

  • REST: Restaurant reviews.
  • LAPTOP: E-commerce reviews for laptops.
  • LAPTOP-L1: A version of the laptop dataset using higher-level category labels.

These datasets are particularly useful because they include specific labels for implicit aspects and opinions, allowing for a detailed breakdown of performance.

Key Insights and Ideas

  • Naturalness Matters: Replacing cryptic tags with natural language descriptions allows the model to leverage the semantic knowledge it gained during pre-training. A model already knows what "food quality" means; it has to learn what FOOD#QUALITY means from scratch.
  • Structure as a Signal: By forcing the model to distinguish between implicit and explicit examples via contrastive learning, the researchers effectively "taught" the model to recognize the subtle linguistic patterns of implicit sentiment without needing explicit keywords.
  • Ordering is not Arbitrary: The "scan-based" inter-quadruple ordering was the most impactful part of the GEN-NAT component, especially for complex reviews with multiple sentiments.

Key Results

GEN-SCL-NAT achieved state-of-the-art (SOTA) results across all three datasets, with an average F1 improvement of 1.48%.

The most impressive gains were in the "implicit" categories. On the REST dataset, the model saw a 2.56% increase in F1 for cases with implicit aspects and explicit opinions (IAEO). The t-SNE visualizations below demonstrate how the GEN-SCL objective successfully clusters representations by sentiment and implicit/explicit types, creating a much cleaner latent space for the model to work with.

t-SNE visualizations showing how GEN-SCL creates more discriminable clusters for sentiment, aspect, and opinion characteristics.

Limitations and Future Work

  • Sentence-Level Focus: The current work focuses on concise, sentence-level tasks. The authors note that for document-level analysis or very "sentiment-dense" inputs, the single-output sequence approach might face validity issues.
  • Generative Constraint: The GEN-SCL component was only tested on generative sequence-to-sequence models. Its generalizability to other architectures (like pure encoders) remains an open question.
  • Implicit Opinion Localization: While the model improved on implicit opinions, these remain the most challenging split, as there is no specific text span for the model to "anchor" to. Future work could explore better ways to localize these "hidden" opinions.

Summary updated

BibTeX
@inproceedings{peper2022generative,
  author = {Joseph J. Peper and Lu Wang},
  title = {{Generative Aspect-Based Sentiment Analysis with Contrastive Learning and Expressive Structure}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.451},
}
Figure