Synthetic Data (Almost) from Scratch: Generalized Instruction Tuning for Language Models

Haoran Li, Qingxiu Dong, Zhengyang Tang, Chaojun Wang, Xingxing Zhang, Haoyang Huang, Shaohan Huang, Xiaolong Huang, Zeqiang Huang, Dongdong Zhang, Yuxian Gu, Xin Cheng, Xun Wang, Si-Qing Chen, Li Dong, Wei Lu, Zhifang Sui, Benyou Wang, Wai Lam, Furu Wei · Submission to ICLR 2025 · Rejected

TL;DR

GLAN (Generalized Instruction Tuning) is a novel method for training Large Language Models (LLMs) using synthetic data generated from a systematic taxonomy of human knowledge. By mimicking the structure of a formal education system—progressing from broad disciplines down to specific syllabi and individual class sessions—the researchers generated 10 million high-quality instruction-response pairs. This expansive dataset allowed a 7B parameter model to outperform much larger, specialized models across math, coding, and academic benchmarks.

The "Coverage Gap" in Instruction Tuning

Instruction tuning is the critical process that transforms a raw "next-token predictor" into a helpful, conversational assistant. Traditionally, this process relies on high-quality human-written "seed" examples or existing NLP datasets. However, these sources are often narrow in scope, expensive to scale, or limited by the diversity of the original human input.

The authors identify a critical "coverage gap": if training data does not systematically cover the vast landscape of human knowledge, the resulting model will inevitably have "blind spots." They pose a fundamental question: Can we generate a truly universal instruction-tuning dataset from scratch, without relying on pre-existing human examples?

The GLAN Methodology: A Top-Down Approach

To solve this, the researchers introduced GLAN, which utilizes a "top-down" approach inspired by human education systems.

Comparison of instruction tuning methods, highlighting GLAN's taxonomy-based approach.
  1. Taxonomy Building: They used GPT-4 to create a massive, hierarchical tree of human knowledge. This tree breaks down into broad fields (e.g., Natural Sciences), sub-fields (e.g., Physics), and ultimately 126 distinct disciplines.
  2. Subject & Syllabus Generation: For every discipline, an LLM acts as an "education expert" to list relevant subjects and design a detailed syllabus for each. This syllabus includes specific class sessions and "atomic" key concepts.
  3. Instruction Generation: Instead of simply asking an LLM to "write a prompt," GLAN samples specific concepts from the syllabus and asks the LLM to write a "homework question" requiring an understanding of those exact concepts. This ensures the data is both highly diverse and structurally grounded.
  4. Answer Generation: While questions were generated by GPT-4, the answers were generated by GPT-3.5-turbo (to optimize costs) utilizing Chain-of-Thought reasoning.
  5. Model Training: The team fine-tuned a Mistral 7B base model on 10 million of these synthetic pairs over three epochs.

Datasets and Evaluation

  • Training Data: 10 million synthetic instruction-response pairs generated via the GLAN pipeline.
  • Evaluation Benchmarks:
  • Math: GSM8K and MATH.
  • Coding: HumanEval and MBPP.
  • Reasoning: Big-Bench Hard (BBH).
  • Academic Exams: ARC (Easy/Challenge) and MMLU.
  • Instruction Following: IFEval and Evol-Instruct.
  • New Benchmark: The authors also introduced GLAN-Test, a held-out set of 6,300 instructions spanning the 126 disciplines to test broad generalization.

Key Insights

  • The "Syllabus" Advantage: By anchoring generation to a syllabus, the model isn't exposed to random facts; it sees knowledge presented in a logical, pedagogical order. This prevents the "data repetition" common in other synthetic generation methods.
  • Combinatorial Diversity: By sampling 1–5 key concepts from different class sessions to create a single question, the system generates complex, multi-step problems that go far beyond simple fact-retrieval.
  • STEM Synergy: GLAN performs exceptionally well in STEM fields. The authors hypothesize that the highly structured nature of STEM subjects is particularly well-suited to this syllabus-based generation method.
  • Synthetic Generalization: Remarkably, the model excelled at specific tasks (like coding or math competitions) even though it was never explicitly trained on those specific datasets. The "generalist" synthetic data provided enough foundational logic to generalize to specialized domains.

Key Results and Scaling Laws

The GLAN-trained Mistral 7B model demonstrated massive improvements over its base version, frequently beating models twice its size:

  • Mathematics: Scored 80.8 on GSM8K, dwarfing the original Mistral Instruct (24.4) and beating specialized models like MetaMath-7B (77.7).
  • Academic Exams: On the ARC-Challenge, GLAN hit 81.1, significantly outperforming Orca 2 (78.4) and Mistral Instruct (52.0).
  • Coding: Achieved 57.6 on MBPP, surpassing Mistral CodeAlpaca (50.2).
  • Scaling: The authors found a clear scaling law. Performance on coding and reasoning tasks saw a massive "jump" when moving from 1 million to 10 million training examples, suggesting that scaling synthetic data continues to yield dividends.
Scaling laws demonstrating performance improvements across HumanEval, BBH, GSM8K, and MATH as the GLAN dataset size increases to 10 million.

Limitations and Future Work

  • Teacher Bias: Because the data is generated by GPT-4 and GPT-3.5, GLAN models may inherit the biases, stylistic quirks, or factual inaccuracies of those "teacher" models.
  • Evaluation Scope: The paper focuses heavily on "exam-style" benchmarks. While the model follows instructions well, its performance in long-form creative writing or multi-turn chat was not the primary focus.
  • Cost: While significantly cheaper than human labeling, generating 10 million high-quality GPT-4 prompts remains expensive (estimated at ~$360k USD at the time of the study).
  • Future Directions: The authors plan to extend the GLAN methodology to encompass multi-turn conversations and much longer document processing.

Summary updated

BibTeX
@misc{li2024synthetic,
  author = {Haoran Li and Qingxiu Dong and Zhengyang Tang and Chaojun Wang and Xingxing Zhang and Haoyang Huang and Shaohan Huang and Xiaolong Huang and Zeqiang Huang and Dongdong Zhang and Yuxian Gu and Xin Cheng and Xun Wang and Si-Qing Chen and Li Dong and Wei Lu and Zhifang Sui and Benyou Wang and Wai Lam and Furu Wei},
  title = {{Synthetic Data (Almost) from Scratch: Generalized Instruction Tuning for Language Models}},
  year = {2024},
  eprint = {2402.13064},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.13064},
}
Figure