Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Models writing training data for other models
When there isn’t enough good human-written text, a strong model can write practice material for a weaker one: explanations, questions and answers, code with tests. The weaker model learns a lot from it, because the teacher knows things the student doesn’t. But if a model keeps training on its own writing, generation after generation, errors pile up and it slowly drifts away from real language, like a photocopy of a photocopy. Mixing in real data keeps it grounded. The demo shows how sampling temperature changes what a model writes.
Synthetic data is valuable where real data is scarce or sensitive (rare failure modes, classified procedures, edge-case dialogues), but generated examples must be verified against engineering ground truth before training on them.
- 1. Synthetic data is text written by…
- 2. A student learns most from synthetic data written by…
- 3. Training repeatedly on a model's own outputs can cause…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Uses: pretraining data (Phi’s ‘textbooks’, rephrased web text), instruction tuning (Self-Instruct, Alpaca, Evol-Instruct), reasoning traces filtered by correctness (STaR, rejection sampling), code with unit tests, preference pairs for alignment (F7).
- Generation knobs: prompts with diverse seeds, personas and topics; temperature or top-p for diversity; deduplication of generated items.
- Verification: keep only examples that pass checks: unit tests, maths answer checkers, schema validation, reward models, or a second model’s judgement. Pass rates drive the cost.
- Cost: generating costs 2·N_teacher FLOPs per token (10⁶ examples × 500 tokens from a 70B teacher ≈ 7 × 10¹⁹ FLOPs), often small next to pretraining.
- Risks:
- errors and biases of the teacher are copied;
- lack of diversity;
- benchmark contamination;
- licence terms;
- model collapse when generated data replaces real data recursively (Shumailov et al., 2024).
- Safeguards: keep a floor of real data, accumulate rather than replace, verify, and measure diversity.
- 1. Generation FLOPs per token for a 70B teacher:
- 2. A common safeguard against collapse:
- 3. Self-Instruct generates…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Synthetic data in code
Exercise 1.
- Sample with temperature (low temperature concentrates on the mode).
- Score the diversity of a set of samples.
- Filter synthetic examples with a verifier.
Practice.
- Use a strong model with varied prompts and seeds; deduplicate near-identical outputs (F5-2).
- Verify automatically where possible (tests for code, exact answers for maths, schemas for structured output); spot-check the rest by hand.
- Decontaminate against evaluation sets, and track which teacher produced each example and under what licence.
- Mix synthetic with real data, and watch for drops in diversity (distinct n-grams, embedding spread) across rounds.
import random
seeds = ["hydraulic leak", "sensor drift", "software reset", "bird strike"]
prompts = [f"Write a short maintenance log entry about a {random.choice(seeds)} and the corrective action." for _ in range(1000)]
# outputs = teacher.generate(prompts, temperature=0.9, top_p=0.95)
# keep = [o for o in dedup(outputs) if schema_ok(o) and not in_eval_set(o)]- 1. Code synthetic data is best verified by…
- 2. Synthetic data must be decontaminated against…
- 3. Across rounds of generation, watch…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Information view. A student trained on samples from a teacher learns (an approximation of) the teacher’s distribution. If the teacher was trained on more or better data, that distribution is closer to the truth, so the student gains. A model’s own samples carry no information beyond the model itself: training on them re-estimates the same distribution with extra sampling noise.
Why recursion degrades. Each generation fits a finite sample from the previous model, adding estimation error and the model’s systematic biases. With smoothing, mass spreads to implausible events (blurring); with truncated sampling (low temperature, top-p), rare events disappear (tail loss). Either way the distribution drifts, and errors compound without real data to anchor them (Shumailov et al., 2024).
Accumulating helps. Keeping the original real data in every round bounds the drift: Gerstgrasser and colleagues (2024) showed accumulating real and synthetic data avoids collapse in settings where replacing it does not.
- 1. A model's own samples carry…
- 2. With truncated sampling, recursive training loses…
- 3. Accumulating real data each round…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.When does synthetic data help, and when does it hurt?
History.
- Y. Wang et al., “Self-Instruct” (ACL 2023).
- S. Gunasekar et al., “Textbooks are all you need” (2023), Phi-1.
- I. Shumailov et al., “AI models collapse when trained on recursively generated data” (Nature, 2024).
- M. Gerstgrasser et al., “Is model collapse inevitable?” (2024).
Exercise 2.
- Source: the language-like trigram source from F1-2 (V = 50; true perplexity on test text 5.05).
- Models: vectorised Kneser–Ney trigram models.
- Part 1: a student with 5000 real tokens, alone or with 50,000 synthetic tokens, sampled from a teacher (trained on 100,000 real tokens) or from the student itself.
- Part 2: generation 0 trains on 20,000 real tokens; each later generation trains on 20,000 tokens sampled from the previous model, either replacing the data or adding to it (accumulating).
| student training data | test perplexity |
|---|---|
| 5000 real tokens | 7.05 |
| + 50,000 teacher-generated tokens | 5.57 |
| + 50,000 self-generated tokens | 7.42 |
| (teacher itself) | 5.28 |
| generation | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| replace (samples only) | 5.87 | 6.48 | 7.03 | 7.50 | 7.99 | 8.47 |
| accumulate (real + samples) | 5.87 | 6.02 | 6.12 | 6.18 | 6.22 | 6.26 |
- Teacher data transfers knowledge: the student nearly reaches the teacher (5.57 against 5.28) with only 5000 real tokens.
- Self-generated data hurts: it repeats the student’s own errors as if they were facts.
- Recursive training collapses steadily: each generation inherits the previous one’s errors plus fresh sampling noise; perplexity rises 44% in five generations.
- Accumulating anchors the model: drift is about six times smaller.
- How the collapse looks here: the number of distinct trigrams in the training data rose across replaced generations (2979 → 3504), because the smoothed model spreads probability to trigrams the source rarely uses (blurring). With truncated sampling the opposite (tail loss) is typical; both are drift away from the real distribution.
- Seed 1: student 7.26 → 5.62 (teacher data), 7.71 (self); replace 5.90 → 8.55; accumulate 5.90 → 6.22.
Synthetic data in AI, robotics and aerospace
- Rare scenarios: generating plausible but verified fault reports and dialogues for under-represented failure modes.
- Code and procedures: synthetic tasks with automatic checks for flight-software assistants.
- Simulation: physics simulators are the original synthetic-data engine for robotics; the same anchoring-to-reality lesson applies.
- Design lesson: synthetic data helps when it brings new information and is verified; always keep real data in the loop.
References
- Y. Wang et al. (2023). “Self-Instruct: aligning language models with self-generated instructions.” Proc. ACL.
- S. Gunasekar et al. (2023). “Textbooks are all you need.” arXiv:2306.11644.
- I. Shumailov et al. (2024). “AI models collapse when trained on recursively generated data.” Nature 631.
- M. Gerstgrasser et al. (2024). “Is model collapse inevitable? Breaking the curse of recursion by accumulating real and synthetic data.” arXiv:2404.01413.