AugGPT: Leveraging ChatGPT for Text Data Augmentation

Haixing Dai, Zhengliang Liu, Wenxiong Liao, Xiaoke Huang, Yihan Cao, Zihao Wu, Lin Zhao, Shaochen Xu, Fang Zeng, Wei Liu, Ninghao Liu, Sheng Li, Dajiang Zhu, Hongmin Cai, Lichao Sun, Quanzheng Li, Dinggang Shen, Tianming Liu, Xiang Li · DOI

TL;DR

This paper introduces AugGPT, a novel method for text data augmentation that leverages ChatGPT to generate semantically similar yet distinct paraphrases of existing text. AugGPT significantly improves performance on few-shot learning tasks, particularly in scenarios with limited and low-quality data, by producing more accurate and diverse augmented samples than existing methods.

What Problem Does This Paper Address?

Training effective Natural Language Processing (NLP) models often requires large amounts of high-quality labeled data. However, acquiring such data can be challenging due to privacy concerns, annotation costs, and the inherent difficulty of obtaining data in specific domains. This problem is particularly acute in few-shot learning (FSL) scenarios, where models must generalize from very few examples in a new target domain. While data augmentation is a common strategy to mitigate this data scarcity, existing methods often struggle with either maintaining the original label's accuracy (faithfulness) or ensuring sufficient diversity in the generated data (compactness). This paper aims to address these limitations by proposing a more robust and effective data augmentation technique.

Methods

The core of AugGPT lies in its use of ChatGPT, a powerful large language model (LLM), for data augmentation. The process involves:

  1. Prompting ChatGPT: The authors designed specific prompts to guide ChatGPT in rephrasing input sentences. These prompts aim to generate multiple conceptually similar but semantically different versions of the original text, preserving the original label's meaning. They explored both single-turn and multi-turn dialogue prompts.
  2. Generating Augmented Samples: For each sentence in the training data, AugGPT generates a specified number of augmented samples (e.g., six per class).
  3. Fine-tuning with Augmented Data: The augmented samples are then used to fine-tune a pre-trained BERT model. The authors also investigated the impact of adding a contrastive loss function alongside the standard cross-entropy loss during fine-tuning, aiming to improve the compactness and discriminative power of the augmented data.

This approach differs from traditional methods by leveraging the advanced language understanding and generation capabilities of LLMs like ChatGPT, which are trained on vast amounts of data and fine-tuned with human feedback, leading to more nuanced and high-quality paraphrases.

Datasets

The authors evaluated AugGPT on three datasets:

  • Amazon Dataset: A large, open-domain dataset of customer reviews, sampled to 300 instances per category for the experiments.
  • Symptoms Dataset: A dataset derived from Kaggle, containing audio data of common medical symptom descriptions. The text transcripts were used after de-duplication, resulting in 231 samples across 7 symptom categories.
  • PubMed20K Dataset: A widely used benchmark in NLP research, comprising approximately 20,000 annotated scientific abstracts from the biomedical field. Sentences are categorized into five labels: background, objective, method, result, or conclusion.

Key Insights and Ideas

  • LLMs as Powerful Augmentation Tools: The success of AugGPT highlights the potential of large language models like ChatGPT to go beyond simple text transformations and generate semantically rich, diverse, and faithful augmented data.
  • Faithfulness and Compactness Trade-off: The paper emphasizes the importance of both faithfulness (semantic similarity to the original label) and compactness (distinctiveness within a class) for effective data augmentation. AugGPT aims to balance these.
  • Contrastive Loss Enhancement: Incorporating a contrastive loss alongside cross-entropy during fine-tuning further improved the model's ability to discriminate between classes, suggesting that the augmented data leads to more separable latent representations.
  • Domain-Specific Adaptation is Key: While ChatGPT shows promise, the authors acknowledge that adapting general LLMs to specific domains (like medical texts) is crucial for optimal performance, suggesting future work in fine-tuning or domain-specific prompting.

Key Results

  • Superior Accuracy: AugGPT consistently achieved the highest accuracy across all three datasets (Amazon, Symptoms, and PubMed20K) when compared to various baseline data augmentation methods, both with and without a contrastive loss.
  • Significant Improvements on Symptoms Dataset: For the Symptoms dataset, AugGPT boosted accuracy from around 60-63% (without augmentation) to 88.9% (BERT) and 89.9% (BERT with contrastive loss).
  • PubMed20K Performance: On the PubMed20K dataset, AugGPT achieved 83.5% accuracy, outperforming the raw BERT model (79.2% / 79.8%).
  • High-Quality Augmented Data: Evaluation using cosine similarity and TransRate metrics indicated that AugGPT generates high-quality augmented data that is both faithful to the original samples and compact within classes, leading to better learnability.
  • Direct ChatGPT Classification Limitations: While ChatGPT can perform classification tasks directly with few-shot prompts, fine-tuning with AugGPT-generated data generally yielded better results, especially for more complex tasks like those in the PubMed20K dataset.

Limitations and Future Work

  • Domain-Specific Knowledge: The authors acknowledge that AugGPT, using a general-domain ChatGPT, may produce incorrect augmentations for highly specialized domains (e.g., medical texts) due to a lack of domain-specific knowledge.
  • Future Work:
    • Adapting LLMs like ChatGPT to domain-specific data through fine-tuning, in-context learning, knowledge distillation, or style transfer.
  • Investigating AugGPT's effectiveness on a wider range of downstream NLP tasks, such as text summarization.
  • Exploring the use of AugGPT for generating augmented data in other modalities, like images, by guiding generative models.

Summary updated

BibTeX
@article{dai2025auggpt,
  author = {Haixing Dai and Zhengliang Liu and Wenxiong Liao and Xiaoke Huang and Yihan Cao and Zihao Wu and Lin Zhao and Shaochen Xu and Fang Zeng and Wei Liu and Ninghao Liu and Sheng Li and Dajiang Zhu and Hongmin Cai and Lichao Sun and Quanzheng Li and Dinggang Shen and Tianming Liu and Xiang Li},
  title = {{AugGPT: Leveraging ChatGPT for Text Data Augmentation}},
  journal = {IEEE Trans. Big Data},
  year = {2025},
  doi = {10.1109/tbdata.2025.3536934},
}
Figure