Iterative Data Augmentation with Large Language Models for Aspect-based Sentiment Analysis

Haiyun Li, Qihuang Zhong, Ke Zhu, Juhua Liu, Bo Du, Dacheng TaoarXiv 2024

Abstract

Aspect-based Sentiment Analysis (ABSA) is an important sentiment analysis task, which aims to determine the sentiment polarity towards an aspect in a sentence. Due to the expensive and limited labeled data, data generation (DG) has become the standard for improving the performance of ABSA. However, current DG methods usually have some shortcomings: 1) poor fluency and coherence, 2) lack of diversity of generated data, and 3) reliance on some existing labeled data, hindering its applications in real-world scenarios. With the advancement of large language models (LLMs), LLM-based DG has the potential to solve the above issues. Unfortunately, directly prompting LLMs struggles to generate the desired pseudo-label ABSA data, as LLMs are prone to hallucinations, leading to undesired data generation. To this end, we propose a systematic Iterative Data Generation framework, namely IDG, to boost the performance of ABSA. The core of IDG is to make full use of the powerful abilities (i.e., instruction-following, in-context learning and self-reflection) of LLMs to iteratively generate more fluent and diverse pseudo-label data, starting from an unsupervised sentence corpus. Specifically, IDG designs a novel iterative data generation mechanism and a self-reflection data filtering module to tackle the challenges of unexpected data generation caused by hallucinations. Extensive experiments on four widely-used ABSA benchmarks show that IDG brings consistent and significant performance gains among five baseline ABSA models. More encouragingly, the synthetic data generated by IDG can achieve comparable or even better performance against the manually annotated data.

Introduction

Aspect-Based Sentiment Analysis (ABSA) represents a fine-grained approach to sentiment analysis, identifying specific sentiments toward distinct aspects within a text. For example, a review might praise the "food" while criticizing the "service." The primary bottleneck in developing robust ABSA models is the requirement for high-quality labeled data, which is both expensive and time-consuming to produce manually.

Traditional data generation methods often rely on Small Language Models (SLMs) and existing labeled datasets. As shown in Figure 1, these methods typically produce augmented corpora with limited diversity and potentially poor fluency. While Large Language Models (LLMs) offer a powerful alternative for generating synthetic data from unlabeled corpora, they are susceptible to hallucinations, which can introduce noise into the training set. To mitigate these issues, we introduce the Iterative Data Generation (IDG) framework.

Comparison between traditional SLM-based data generation and the proposed LLM-based IDG framework.

Methodology

The IDG framework is a systematic three-stage pipeline designed to transform an unlabeled sentence corpus into a high-quality pseudo-labeled dataset for ABSA training.

The three-stage IDG pipeline: Aspect Extraction and Extension, Pseudo Data Generation, and Evaluating and Filtering.

1. Aspect Extraction and Extension

In the first stage, an LLM extracts potential aspects (e.g., "pizza," "ambiance") from raw text. To ensure the generated dataset is not repetitive, the framework extends this aspect set using synonyms and homonyms, broadening the linguistic variety of the training data.

2. Pseudo Data Generation (ITAT Prompt)

The core innovation of IDG is the Iteration Teaching Analysis Prompt (ITAT). Rather than a static generation process, ITAT employs an iterative loop where high-quality samples from previous rounds are used as in-context examples for the next. This mechanism "teaches" the LLM to generate more complex and diverse sentences, including those with multiple aspects and mixed sentiment polarities.

3. Evaluating and Filtering (The Discriminator)

To address the challenge of hallucinations, IDG incorporates a self-reflection module that acts as a discriminator. This module scores each generated sample based on domain relevance, sentiment accuracy, and syntactic richness. Only samples that exceed a specific quality threshold (e.g., $T=6$) are retained, ensuring that the final training data is both accurate and fluent.

Experiments and Results

We evaluated IDG across four widely recognized ABSA benchmarks: Laptop14, Restaurant14, Restaurant15, and Restaurant16. In our experiments, we treated the training sets of these benchmarks as unlabeled to simulate real-world data scarcity.

Key Results

  • Zero-Shot Performance: Models trained exclusively on IDG-generated synthetic data achieved performance comparable to those trained on original human-annotated labels.
  • Significant Model Gains: Integrating IDG data into the training of five baseline ABSA architectures resulted in consistent performance improvements. Notably, the ASGCN model saw an F1 score increase of up to 4.01% on the Restaurant16 dataset.
  • Handling Complexity: By specifically generating multi-aspect samples, IDG significantly improved the ability of models to handle complex real-world sentences with conflicting sentiments.

Conclusion

The IDG framework demonstrates that iterative, LLM-driven data generation can effectively bypass the need for expensive manual annotation in ABSA. By combining in-context learning with a rigorous self-reflection filtering mechanism, IDG produces synthetic data that is both diverse and highly accurate. Future research will explore extending this iterative generation approach to other complex NLP tasks such as Named Entity Recognition and Relation Extraction.

Summary updated

BibTeX
@misc{li2024iterative,
  author = {Haiyun Li and Qihuang Zhong and Ke Zhu and Juhua Liu and Bo Du and Dacheng Tao},
  title = {{Iterative Data Augmentation with Large Language Models for Aspect-based Sentiment Analysis}},
  year = {2024},
  eprint = {2407.00341},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.00341},
}
Figure