PANGEA: Projection-Based Augmentation with Non-Relevant General Data for Enhanced Domain Adaptation in LLMs

Seungyoo Lee, Giung Nam, Moonseok Choi, Hyungi Lee, Juho LeeNeurIPS 2025

TL;DR

PANGEA is a novel framework designed to solve the "data scarcity" problem in domain adaptation. It turns unrelated, general-purpose text into high-quality, diverse synthetic training data. By projecting the inherent diversity of massive general datasets onto the specific structure of a target domain, PANGEA allows smaller models to achieve massive performance gains, even when domain-specific examples are extremely rare.

The Challenge of Domain Adaptation

Large Language Models (LLMs) are generalists by nature, but they often stumble on specialized tasks in fields like medicine, law, or finance. To address this, researchers typically fine-tune models on domain-specific data. However, high-quality specialized data is often locked behind privacy walls (such as patient records) or is prohibitively expensive to annotate.

A common workaround is synthetic data generation: using a powerful LLM to generate more examples based on a few seed examples. The problem with this approach is that if you only have a small number of seed examples (e.g., 100), the LLM tends to generate repetitive, simplistic data that fails to capture the true complexity of the domain. This lack of diversity can lead to overfitting, where the model learns the repetitive patterns of the synthetic data but fails to generalize to real-world scenarios.

The PANGEA Framework

To overcome these limitations, the authors introduce PANGEA (Projection-Based Augmentation with Non-Relevant General Data). PANGEA is a three-stage pipeline designed to extract diversity from general data and "project" it into a specific target domain.

Overview of the PANGEA framework showing the three-stage process: Synth-Profiling, Prompt-Writer, and Projection.

The framework operates in three distinct stages:

  1. Synth-Profiling: A highly capable model analyzes the small set of available domain-specific source data to create a "Specific Profile." This profile identifies the core structural elements of the domain. For example, in a medical context, it might note the necessity of patient demographics, lab values, and underlying pathophysiologic principles.
  2. Prompt-Writer: Using the generated profile, the framework scans large-scale, entirely unrelated general data. It extracts "Synth-Guide Blocks"—structured snippets that capture the rich diversity of the general data (e.g., a sci-fi story about space explorers) but organizes it according to the target domain's structural requirements.
  3. Projection: Finally, the framework takes these guide blocks and "projects" them into the final domain format, such as a USMLE-style medical multiple-choice question. This ensures the resulting synthetic data inherits the vast vocabulary and scenario diversity of the general-purpose corpus while remaining strictly relevant to the target domain's logic.

Evaluated Datasets

The authors evaluated PANGEA across four distinct benchmarks to test its versatility:

  • GSM8K: Grade school math word problems.
  • MedQA: Standardized medical exam questions (USMLE style).
  • FinQA: Complex financial reasoning based on earnings reports.
  • CDSL (Custom Domain-Specific Language): A new, "extreme" benchmark introduced by the authors. It involves an artificially constructed programming language with zero presence in the LLM's pre-training data, serving as a stress test for learning a completely new domain from scratch.

Key Insights

  • Diversity from Irrelevance: The most counter-intuitive finding of this research is that unrelated data serves as a better source for synthetic augmentation than domain-similar data. Because general data covers a near-infinite range of scenarios, it prevents the synthetic dataset from becoming skewed or repetitive.
  • Structure vs. Content: PANGEA treats domain adaptation as a mapping problem. It views the target domain as a structure (how to reason) and the general data as content (what to reason about).
  • Superior Scaling: Traditional synthetic methods (like "Naive" prompting or "Evol-Instruct") often see diminishing returns as the dataset size grows because the generated data becomes redundant. In contrast, PANGEA's performance continues to climb sharply as more data is added because it continuously pulls fresh "content" from the massive general corpus.

Key Results

PANGEA consistently outperformed baseline methods across all benchmarks and data scales, proving the efficacy of its projection-based approach.

Performance comparison on the CDSL benchmark, showing PANGEA's superior scaling compared to Naive and Evol-Instruct methods.
  • Massive Gains in Extreme Scenarios: On the challenging CDSL benchmark at the 120k data scale, PANGEA achieved 35.36% accuracy, whereas the Naive baseline managed only 6.96% and Evol-Instruct reached 13.04%.
  • Average Performance: Across all four benchmarks at the 120k scale, PANGEA improved the average accuracy by +34.54% over the base model, significantly higher than the +21.80% improvement seen with Evol-Instruct.
  • Data Quality and Diversity: Using an advanced model as an evaluator, PANGEA's synthetic data was rated as having significantly higher problem-solving potential and mathematical soundness. Furthermore, embedding visualizations confirmed that PANGEA's data points were much more widely dispersed than baselines, successfully capturing the intended diversity.

Limitations and Future Work

While highly effective, the PANGEA framework has a few current limitations:

  • Prompt Engineering: The three-stage process relies on carefully designed, domain-specific prompts for the profiling and projection stages. Automating this prompt generation is a critical next step for broader usability.
  • Inference Cost: Generating hundreds of thousands of high-quality samples using large models for the Prompt-Writer and Projection stages is computationally expensive.
  • Factuality Risks: While structural integrity and diversity are high, there is a risk of "semantic drift," where the projected data might contain factual inaccuracies. This is particularly concerning in high-stakes domains like medicine. Future iterations could integrate external knowledge bases to verify the generated content.

Summary updated

BibTeX
@inproceedings{lee2025pangea,
  author = {Seungyoo Lee and Giung Nam and Moonseok Choi and Hyungi Lee and Juho Lee},
  title = {{PANGEA: Projection-Based Augmentation with Non-Relevant General Data for Enhanced Domain Adaptation in LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=7EjdHkOwc4},
}
Figure