Dive into Deep Learning · §20.5
Synthetic and Rephrased Data
rewriting · checking · generating from seeds · equal budgets · collapse · licences
The problem
| source (FineWeb-Edu) | rewrite (Qwen3.5-2B) |
|---|---|
| … approximately 30 minutes before and after meals … | … approximately thirty minutes before and after each meal … |
| Relief of oral pain was reported in 48 of the 50 patients. | Reports of relief of oral pain were recorded in 48 out of the 50 patients. |
Fluent is not faithful, and many samples are not many documents.
Goals
Running example: FineWeb-Edu chunks (S1, S2: 2^{21} tokens each), Qwen3.5-2B as rephraser, 8.1M-parameter proxies trained on 2^{24} tokens.
Where this fits
| step | section |
|---|---|
| get text | Document Extraction from Web Crawls |
| choose text | Quality Filtering |
| Deduplication and Decontamination | |
| mix text | Data Mixtures |
| Synthetic and Rephrased Data | |
| cut text | Tokenizers at Scale |
Four kinds
| kind | adds | example |
|---|---|---|
| generate from a seed | new content, from the generator’s memory | Cosmopedia, phi-1 |
| rewrite a document | form, not facts | WRAP, Nemotron-CC, FinePhrase |
| demonstrations | instruction following | post-training sets |
| labels | a signal to train on | educational scores |
Judge generated data by its effect on held-out data at equal cost, never by fluency.
Rephrased corpora
| corpus | generator | generated tokens | licence |
|---|---|---|---|
| Nemotron-CC-v2 (rewrites, QA) | Mistral-NeMo-12B, Qwen3-30B-A3B | about 2.5T | NVIDIA Data Agreement |
| FinePhrase (rewrites of FineWeb-Edu) | SmolLM2-1.7B-Instruct | 486B | ODC-By |
| Cosmopedia (from seeds) | Mixtral-8x7B-Instruct | 25B | Apache-2.0 |
The pipeline
chunk (≤ 400 tokens, at sentence ends) → prompt → generate → filter
| rule | effect |
|---|---|
| reply ran out of tokens | dropped |
| length ratio outside [0.5, 1.5] | dropped |
| copy rate > 0.8 (5-gram Jaccard) | flagged, kept |
| a digit string lost | flagged, kept |
Prompt: “Preserve every fact, name and number; add nothing.” Chat template with thinking off; any <think> in a reply fails an assertion.
Live rewrites, 60 chunks per style, one sampled run
| encyclopedia | questions and answers | |
|---|---|---|
| kept | 59 | 34 |
| ran out of 512 tokens | 0 | 16 |
| length ratio outside range | 1 | 10 |
| every number kept | 63% | 50% |
| mean copy rate | 0.53 | 0.47 |
Live counts move by a few on other hardware. Registered corpus, 14,305 chunks: 13,809 kept, about 70% keep every number, 9% fewer tokens for the same characters.
Check
Rewrite 1: copy rate 0.95, number fidelity 1.0.
Rewrite 2: copy rate 0.05, number fidelity 0.5.
Answer. Neither, as far as the numbers say. The first is nearly a copy and adds nothing; the second shares no phrasing and lost half its numbers, or only rewrote them as words. The flags raise questions; reading answers them.
The judge
Qwen3.8-27B (4-bit), thinking on, no thinking budget, 12,000 new tokens; median reply about 2,800 tokens; 56 verdicts of 60.
| number lost | every number kept | |
|---|---|---|
| judge: adds a claim | 14 | 25 |
| judge: no added claim | 3 | 14 |
39 of 56 add a claim (95% interval 57% to 80%); agreement with the number check: 50%.
The number check sees losses, the judge sees additions. Run both. No person has checked the verdicts: 70% is one strict reader’s rate.
Generating from seeds
Nine outputs from one seed, temperature 0.7, each cut to 70 words:
| prompt | distinct 4-grams | mean 5-gram Jaccard |
|---|---|---|
| rewrite, same prompt | 0.44 | 0.19 |
| “write about the topic” | 0.76 | 0.05 |
| 3 formats × 3 audiences | 0.995 | 0.00 |
Diversity of form, not of truth: the children’s version moved the pain from the mouth to the stomach.
Equal budgets
| arm | data | epochs |
|---|---|---|
| A | real S1 | 8 |
| B | S1 + rewrites of S1 | 4 + 4.4 |
| C | rewrites of S1 | 8.7 |
| D | fresh real text | 1 |
| E | S1 + rewrites of S2 | 4 + 4.4 |
Three data-order seeds per arm; bits per byte on real and on rephrased validation text.
Bound before running
Effective tokens of U unique tokens read E times:
D'(U, E) = U + U R^* \bigl(1 - e^{-(E-1)/R^*}\bigr), \quad R^* \approx 15.4
D'(U, 8) \le D'_B \le D'(2U, 4)
Check
Fresh text (D) holds about 21% more effective tokens than A and is lower by about 0.03 bits per byte. Seed noise: 2\sigma \approx 0.014. What do you expect for B?
Answer. At most a little over half of D’s gain, near the edge of what three seeds resolve; a null result is likely. Measured: +0.002, seeds disagree on the sign.
Results at T1 scale: 8.1M parameters, 2²⁴ tokens
Bits per byte; arm A, then each arm’s difference from A:
| arm | real validation | rephrased validation |
|---|---|---|
| A real S1, repeated | 1.92 | 1.80 |
| B + rewrites of S1 | 0.00 | −0.05 |
| C rewrites only | +0.07 | −0.06 |
| D fresh real text | −0.03 | −0.03 |
| E + rewrites of S2 | −0.01 | −0.05 |
Resolved: 2\sigma \approx 0.014, all three seeds one sign. B − A and E − B: no difference detected. B − C on real: −0.06.
Reading the result
Report: equal tokens, both validation sets, a noise threshold fixed in advance, a bound computed before the runs.
Gaussian refit
Fit t draws n points from fit t-1; maximum likelihood; q = (n-1)/n.
| replace | accumulate | |
|---|---|---|
| \mathbb{E}[\hat\sigma_T^2] | q^T\sigma^2 | \approx \sigma^2 |
| \operatorname{Var}(\hat\mu_T) | \sigma^2(1 - q^T) | < \frac{\pi^2}{6}\frac{\sigma^2}{n} |
| n = 100, T = 20, simulated | 0.80 and 0.17 | 0.99 and 0.0157 |
Replace: a narrow distribution around a random point. Accumulate: the mean’s steps shrink as 1/t.
Discrete toy: 200,000 words, 20,000 types
| generation | types (replace) | rarest 10% alive | their mass | types (accumulate) |
|---|---|---|---|---|
| 0 | 20,000 | 100% | 1.0% | 20,000 |
| 1 | 16,001 | 62% | 1.0% | 20,000 |
| 5 | 10,238 | 27% | 1.0% | 20,000 |
| 10 | 7,655 | 17% | 1.1% | 20,000 |
The rarest words occur once; a singleton misses a resample with probability about e^{-1}, and a type with count 0 never returns.
Check
Replace mode, n = 100. After how many generations is \mathbb{E}[\hat\sigma_T^2] = \sigma^2/2?
Answer. q^T = 1/2, so T = \ln 2 / \ln(100/99) \approx 69. Slow per step, certain in the end: \hat\sigma_T^2 \to 0 almost surely.
Licences and disclosure
Descriptive, not legal advice.
Recap
Next: cutting text into tokens at scale.