Synthetic and Rephrased Data

Dive into Deep Learning · §20.5

Synthetic and Rephrased Data
rewriting · checking · generating from seeds · equal budgets · collapse · licences

A 2B Model Rewrites a Page in Seconds. Train on a Million?

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.
  • Every fact kept, yet number fidelity 0.67: “30” became “thirty”.
  • Nine samples of the same prompt: fewer than half of their 4-grams distinct.

Fluent is not faithful, and many samples are not many documents.

By the End of This Deck You Can

Goals

  • build a rephrasing pipeline: chunk, prompt, generate, filter;
  • check rewrites cheaply (copy rate, numbers, length) and with a judge;
  • compare training data at equal tokens and bound the gain in advance;
  • derive model collapse in a Gaussian refit;
  • say who may train on generated text.

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.

Synthesis Comes After Mixing and Before Cutting

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
  • Here: generated and rewritten documents as pretraining data.
  • Skips: post-training data written by models.

A Rewrite Changes the Form; a Generation Can Change the Content

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.

Rephrasing Has Reached the Scale of Whole Crawls

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
  • WRAP: about 3× faster pretraining on C4; perplexity over 10% lower at equal compute.
  • FinePhrase: generators above about 1B parameters add nothing.

Four Steps, Two Drop Rules, Two Flags

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.

Style Sets the Length: Conversations Run Out of Tokens

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: Which of These Rewrites Is Good Data?

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.

A Strict 27B Judge Finds an Added Claim in 70% of Rewrites

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.

At One Temperature, Format and Audience Raise Diversity

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.

Five Arms Fill the Same 2²⁴ Tokens Differently

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.

The Repeated-Data Law Caps B’s Gain at 12.5%

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)

  • Lower: rewrites teach nothing new. Upper: rewrites as good as fresh text.
  • 6.62\,U \le D'_B \le 7.45\,U; with the measured rewrite size, 11.9%.

Check: What Should Arm B Gain over A?

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.

Rewrites Alone Win on Rewrites and Lose on the Web

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.

Training on a Generator’s Output Shifts the Distribution

Reading the result

  • A model that read the rephraser’s style finds that style easy.
  • Evaluating only on rewrites would make C the best arm.
  • B gains on rewritten text (−0.05) and nothing on real text; WRAP, too, measured its gain on text other than its source.
  • That is the pattern WRAP’s “style matches the evaluation” predicts.

Report: equal tokens, both validation sets, a noise threshold fixed in advance, a bound computed before the runs.

Replacing Data with Samples Shrinks the Variance Geometrically

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.

A Bigram Model Loses Its Rare Words Type by Type

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: How Many Generations Halve the Variance?

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.

Rights Follow Both the Source and the Generator

Licences and disclosure

  • Source: a rewrite keeps the source’s licence (FineWeb-Edu: ODC-By, plus Common Crawl’s terms).
  • Generator: Qwen3.5 is Apache-2.0; Llama 3’s licence asks for “Llama” in the name of a model trained with its outputs.
  • Hosted models: read the weights’ licence and the service’s terms.
  • Record generator, revision, prompt hash, seed, drops; state the synthetic share (here 48%).

Descriptive, not legal advice.

Recap

Recap

  • Cheap checks: 70% of rewrites keep every number; “thirty” counts as lost.
  • A strict 27B judge: 70% of rewrites add a claim; agreement with numbers 50%.
  • Prompt conditioning at one temperature: distinct 4-grams 0.76 → 0.995.
  • At T1 scale: B = A within noise (bound 12.5%); C loses 0.07 on real, wins 0.06 on rewrites.
  • Replace collapses (q^T), accumulate stays bounded; rare words go first.

Next: cutting text into tokens at scale.