Transition-based Opinion Generation for Aspect-based Sentiment Analysis

Tianlai Ma, Zhongqing Wang, Guodong ZhouACL 2024 · DOI

Abstract

Aspect-Based Sentiment Analysis (ABSA) aims to extract fine-grained sentiment information from text, typically represented as sentiment quadruples. While generative models have shown promise, they often struggle with structural integrity and hallucination. This paper introduces a transition-based framework that treats ABSA as a structured tree-generation task. By combining a T5-large backbone with a formal transition system and constrained decoding, the proposed method ensures that generated outputs are always structurally valid. Experimental results demonstrate state-of-the-art performance across several benchmarks, particularly in maintaining the completeness of sentiment quadruples.

Introduction

Traditional sentiment analysis often focuses on document-level polarity. In contrast, Aspect-Based Sentiment Analysis (ABSA) seeks to extract a complete sentiment quadruple: the aspect term (e.g., "wine list"), its category (e.g., "Price"), the opinion term (e.g., "good"), and the sentiment polarity (e.g., "Positive").

Recent advancements have moved toward generative ABSA, where models like T5 are trained to output these quadruples as text strings. However, these models frequently suffer from "hallucinations" or malformed outputs because they lack an inherent mechanism to guarantee structural validity. To address this, we propose a transition-based approach that generates a sequence of actions to construct an Opinion Tree.

Methodology

The Opinion Tree and Transition System

The core of our approach is representing sentiment as a hierarchical tree. The root branches into individual quadruples, which further decompose into aspect and opinion nodes. To build this tree, the model employs a transition system with specific actions, such as initializing the root, creating non-terminal structural nodes, extracting strings from the source text, and establishing arcs (edges) between nodes.

Architecture and Constrained Decoding

The system utilizes a T5-large encoder-decoder architecture. The encoder processes the raw review sentence, while the decoder predicts the sequence of transition actions.

The overall architecture of the transition-based opinion tree generation system, highlighting the encoder-decoder framework and constrained decoding.

The critical innovation is constrained decoding. During inference, the transition system enforces rules that prune the model's vocabulary at each step. For instance, after generating an aspect node, the system restricts the next valid action to either an arc or a category node. This ensures that the final output is always a parseable, valid tree structure, achieving 100% structural validity out of the box.

Experimental Evaluation

Datasets and Metrics

The model was evaluated on three primary domains: Restaurant and Laptop reviews from the ACOS dataset, and a Phone dataset for broader domain testing. Performance was measured using F1-scores and a "Tree Structure Completeness" metric to assess how often the model produces valid quadruples.

Key Results

The proposed model achieved state-of-the-art (SOTA) results across all tested domains. For example, in the Restaurant domain, it achieved an F1-score of 0.6338, significantly outperforming the previous best of 0.6069. In the Laptop and Phone domains, it reached F1-scores of 0.4494 and 0.5523, respectively.

Beyond raw F1-scores, the model demonstrated superior structural reliability. As shown in the figure below, our approach consistently maintains near-perfect completeness across various quadruple components, whereas previous tree-based models like OTG struggled as the complexity of the sentiment quadruples increased.

Comparison of tree structure completeness across different sentiment components, showing the robustness of our proposed method.

Discussion and Conclusion

Our findings suggest that generating parsing actions is fundamentally more effective for structured tasks than generating raw text sequences. By learning the "grammar" of sentiment, the model avoids common pitfalls of standard sequence-to-sequence models. Interestingly, the authors found that T5-large outperformed much larger models like LLaMA-7b, likely because massive LLMs are optimized for natural language flow rather than the high precision required for specific "action languages."

Future work will explore cross-domain generalization and the application of these transition rules to morphologically diverse languages. Additionally, optimizing the action set could further improve parsing speed and accuracy.

Summary updated

BibTeX
@inproceedings{ma2024transition,
  author = {Tianlai Ma and Zhongqing Wang and Guodong Zhou},
  title = {{Transition-based Opinion Generation for Aspect-based Sentiment Analysis}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.182},
}
Figure