Retrieval-Augmented Data Augmentation for Low-Resource Domain Tasks

Minju Seo, Jinheon Baek, James Thorne, Sung Ju Hwang

TL;DR

When fine-tuning language models on specialized, low-resource domains (like healthcare or law), traditional LLM-based data augmentation struggles because generating new samples from only a few seed examples leads to repetitive, low-diversity data. Retrieval-Augmented Data Augmentation (RADA) solves this by retrieving relevant contexts and examples from large external corpora to seed the generation prompt. This allows LLMs to synthesize synthetic training data that is simultaneously domain-relevant and semantically diverse, significantly outperforming existing augmentation baselines.

What Problem Does This Paper Address?

Fine-tuning language models on domain-specific tasks (e.g., technical troubleshooting, medical query resolution, legal policies) is notoriously difficult because labeled training data is scarce and expensive to acquire.

While Large Language Models (LLMs) are frequently used to synthesize artificial training data, standard augmentation techniques rely almost entirely on the available seed data. In low-resource regimes—where only 10 to 100 labeled instances might exist—LLMs quickly exhaust variations, producing repetitive or trivial samples. Bootstrapping approaches like Self-Instruct attempt to feed generated samples back into the seed pool, but this risks compounding errors and generating low-quality data cascades.

Methods

The authors introduce RADA (Retrieval-Augmented Data Augmentation), which connects LLM data generation to external, open-domain data pools (like MS MARCO or Natural Questions) using a dense retriever (DistilBERT TAS-B).

Instead of prompting the LLM exclusively with seed examples, RADA splits retrieval into two key roles:

  1. Retrieval for In-Context Learning: Rather than using the few available seed demonstrations, the retriever fetches relevant input-output examples from external data stores based on similarity to the seed set. This expands the space of possible demonstration combinations from $\mathcal{O}(|D|^3)$ to $\mathcal{O}((k \times |D|)^3)$, exposing the generator to diverse task formats.
  2. Retrieval for Target Sample Generation: The retriever identifies relevant external documents or passages to serve as grounding context. The LLM is then prompted to synthesize new question-answer pairs or inputs grounded in these retrieved external contexts.

Synthetic samples are generated using Llama-2-7B-Chat (with experiments also verifying transfer to ChatGPT), and downstream models (T5-base and Llama-2-7B) are fine-tuned on the combined seed and augmented dataset.

External Data Store ──(Dense Retriever)──> Relevant Contexts + Demonstrations
                                                          │
Seed Data (Scarce)  ──────────────────────────────────────┼──> Prompt ──> LLM Generator ──> Diverse Synthetic Data

Datasets

The authors evaluated RADA across both training-time and test-time augmentation scenarios:

  • Target Domain-Specific Datasets:
  • Covid QA: Medical question answering annotated by physicians.
  • Policy QA: Specialized questions focused on website privacy policies.
  • Tech QA: Technical QA derived from IT public forums.
  • (Low-resource simulations evaluated subsets of 10, 30, and 100 training seed examples).
  • Multi-task General Benchmark:
  • MMLU (Massive Multitask Language Understanding): Specifically evaluating Computer Science, Biology, and Law subsets for zero-training, test-time data augmentation.
  • External Retrieval Stores:
  • Natural Questions (NQ) and a labeled subset of MS MARCO for open-domain QA.
  • MMLU auxiliary datasets for MMLU evaluations.

Key Insights and Ideas

  • Diversity Without Semantic Drift: Visualizing sentence embeddings via t-SNE and tracking ROUGE-L overlap shows that seed-only augmentation clusters tightly around original seed points. RADA spreads significantly further in representation space, yet maintains domain alignment because retrieved external contexts share topical relevance.
  • Target Context Is Critical: In ablation studies on Tech QA, removing the in-context retriever dropped F1 from 44.41 to 41.24, but removing the target-context retriever dropped F1 to 34.42 (and down to 30.38 without any retriever). Grounding generation in retrieved text provides far greater utility than simply altering prompt examples.
  • Filtering Offers Diminishing Returns: The authors tested post-generation filtering (pruning synthetic samples with high ROUGE or embedding similarity to existing data). Filtering did not noticeably improve performance, indicating that RADA naturally avoids redundant generation without heuristic filtering pipelines.
  • Smaller Base Models Can Beat Larger Ones in Specialized Domains: Counterintuitively, fine-tuned T5-base outperformed fine-tuned Llama-2-7B (e.g., 67.49 F1 vs. 56.50 F1 on Covid QA with 10 seeds). General-domain pre-training in massive LLMs does not automatically guarantee superior sample efficiency on extreme domain-specific distributions.

Key Results

  • Training Data Augmentation: Across 10, 30, and 100 seed configurations, RADA achieved top average F1 scores of 45.61, 46.87, and 47.68, consistently outperforming:
  • Using seed data alone (25.20 / 33.59 / 43.65)
  • Non-LLM systems like PAQ (37.88 / 39.36 / 41.36)
  • LLM baselines like Self-Instruct (41.34 / 42.84 / 43.09) and Augment w/ Seed Data (43.67 / 44.75 / 44.44).
  • Test-Time Augmentation (Zero Training Samples): When generating synthetic samples strictly at test time, RADA attained 58.24% average accuracy on MMLU subdomains (surpassing standard 5-shot learning at 48.07%) and 41.45 F1 on domain-specific QA (outperforming raw external data training at 28.77 F1).
  • Scaling Robustness: Increasing augmented data volume from $1\times$ to $100\times$ the seed size provided steady gains for RADA, whereas baseline methods plateaued early due to lack of diversity.

Limitations and Future Work

  • Retrieval Pool Dependency: RADA hinges on having an external data store that contains topically relevant information. If the retrieval pool lacks sufficient coverage of the target domain, augmentation quality degrades.
  • Fine-Tuning Efficiency: While RADA successfully scales synthetic dataset volume, fine-tuning larger downstream models remains computationally heavy. Developing smarter sample-efficiency strategies to train on smaller subsets of synthetic data remains an open challenge.
  • Hallucinations in High-Stakes Domains: The generator may still produce factually flawed questions or answers, requiring careful verification before deploying in sensitive environments like medicine or law.

Summary updated

BibTeX
@inproceedings{seo2024retrieval,
  author = {Minju Seo and Jinheon Baek and James Thorne and Sung Ju Hwang},
  title = {{Retrieval-Augmented Data Augmentation for Low-Resource Domain Tasks}},
  booktitle = {AFM @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=rV1xeaaIKh},
}
Figure