DAIL: Data Augmentation for In-Context Learning via Self-Paraphrase

Dawei Li, Yaxuan Li, Dheeraj Mekala, Shuyao Li, Yulin Wang, Xueqi Wang, William Hogan, Jingbo ShangarXiv 2023 · DOI

Introduction

In-Context Learning (ICL) has emerged as a dominant paradigm for utilizing Large Language Models (LLMs), allowing them to perform tasks by following a few demonstrations without explicit parameter updates. However, ICL faces significant challenges in low-resource settings where annotated data is scarce and context window limitations prevent the inclusion of numerous examples, especially in fine-grained classification tasks. This paper introduces DAIL (Data Augmentation for In-Context Learning), a novel approach that leverages the model's own generative capabilities to enhance performance and provide reliable confidence estimates through self-paraphrasing.

Methodology

The core innovation of DAIL is the Self-Paraphrase mechanism, which shifts the focus from varying prompts or reasoning paths to augmenting the input text itself. The process is structured into four distinct phases:

  1. Augmentation: For a given test sample $s$, the LLM is first prompted to generate $n$ distinct paraphrases. This step creates a set of semantically equivalent but linguistically varied inputs.
  2. Individual Inference: The original sample and its $n$ paraphrases are independently combined with the same set of demonstrations and instructions. The LLM then performs inference on each of these $n+1$ inputs, yielding a set of predicted labels.
  3. Majority Voting: A final prediction is determined through a majority vote across the $n+1$ outputs. This ensemble approach over input variations helps mitigate the impact of specific phrasing that might lead to model confusion.
  4. Confidence Estimation: DAIL utilizes "voting consistency"—the ratio of the winning label's votes to the total number of inferences—as a proxy for confidence. This is particularly valuable for black-box models where internal probability distributions (logits) are inaccessible.
Overview of the DAIL framework compared to standard In-Context Learning.

Experimental Setup

The effectiveness of DAIL was evaluated across several classification benchmarks, including sentiment analysis (SST2, SST5, CR), topic classification (AG News, TREC, Yahoo Answer Topics), and emotion detection (Emotion, Empathetic Dialogues). The study primarily focused on the "low-resource" setting, providing only one demonstration per label.

Results and Discussion

Experimental results indicate that DAIL-4 (using four paraphrases) consistently outperforms standard ICL across nearly all tested datasets. Notable improvements were observed in fine-grained tasks; for instance, accuracy on the 10-class Yahoo dataset increased from 64.3% to 70.3% using ChatGPT.

A key insight from the study is the "Self-Generated Advantage." Ablation studies revealed that LLMs perform better on paraphrases they generated themselves compared to those generated by other models (e.g., ChatGPT vs. PaLM). This suggests that models possess a degree of "familiarity" with their own linguistic patterns, which DAIL successfully exploits. Furthermore, paraphrasing allows the model to capture semantic nuances that might be obscured in the original phrasing. In the SST5 dataset, a "Neutral" misclassification was corrected to "Negative" when a paraphrase introduced the word "Although," clarifying the sentence's internal logic.

Correlation between voting confidence and prediction accuracy across multiple datasets.

The proposed confidence metric also showed a strong positive correlation with actual model accuracy, as illustrated in the experimental data. This provides a practical mechanism for filtering uncertain outputs in production environments.

Conclusion

DAIL presents a simple yet effective strategy for boosting LLM performance in data-constrained environments. By utilizing self-paraphrasing and majority voting, it overcomes some of the inherent limitations of standard ICL. While the method increases inference costs and latency, the gains in accuracy and the provision of a reliable confidence score make it a compelling choice for high-stakes classification tasks. Future research may extend this self-augmentation principle to more complex generative and reasoning-heavy domains.

Summary updated

BibTeX
@misc{li2023dail,
  author = {Dawei Li and Yaxuan Li and Dheeraj Mekala and Shuyao Li and Yulin Wang and Xueqi Wang and William Hogan and Jingbo Shang},
  title = {{DAIL: Data Augmentation for In-Context Learning via Self-Paraphrase}},
  year = {2023},
  eprint = {2311.03319},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.03319},
}
Figure