TL;DR
Modern AI compute has outpaced our supply of high-quality text, forcing engineers to train language models over the same scarce data repeatedly—where standard next-token prediction rapidly overfits. By mixing in classical "fill-in-the-blank" denoising tasks that randomly mask different spans of text on every pass, models get a fresh view of old documents each epoch. This zero-architecture-change tweak cuts the overfitting penalty nearly in half, allowing models to squeeze significantly more intelligence out of limited data.
What Problem Does This Paper Address?
For years, large language models have relied on Causal Language Modeling (CLM)—predicting the very next word in a sentence. CLM won out when the internet seemed infinite and models only ever read each training token once.
Today, compute grows much faster than the supply of clean, high-value text (especially in domains like math or code). Modern training recipes routinely loop over the same curated datasets for multiple epochs. Under repetition, CLM reveals an Achilles' heel: because it sees the exact same sequence of words every pass, it memorizes and overfits rapidly. How do we help standard autoregressive models keep learning from repeated data without memorizing it?
Methods
Instead of changing the model's decoder-only architecture, the authors change how the text is formatted in a fraction of each training batch. Alongside standard CLM sequences, they mix in denoising objectives—tasks where contiguous spans of text are replaced by sentinel tokens (like <x> and <y>) and moved to the end of the sequence to be reconstructed left-to-right. Crucially, these masks are resampled randomly on every epoch, turning static text into a moving target.
They test three denoising flavors mixed with CLM:
- Fill-in-the-Middle (FIM): Masks one random span per sequence.
- Span Masking (SM): Masks multiple short spans (mean length 3, corrupting 15% of tokens).
- Mixture-of-Denoisers (MoD): Randomly alternates between short/long spans and 15%/50% corruption rates.
To measure the exact trade-off without getting lost in hyperparameters, the authors extend an existing repeated-data Chinchilla scaling law. Remarkably, they show that every denoising recipe obeys the exact same scaling exponents as CLM, differing by just two numbers: a single-epoch premium ($\pi$) measuring the slight overhead of diverting compute away from pure next-token prediction, and an overfitting multiplier ($\rho$) measuring how much the repetition penalty shrinks.
Datasets
No new benchmarks were introduced. The authors used established datasets across three setups:
- FineWeb: A large-scale filtered web corpus used for the core pretraining scaling sweeps and perplexity validation.
- TinyGSM & Dolmino: Synthetic grade-school math problems paired with Python solutions (TinyGSM) and OLMo-2's multi-domain midtraining mixture (Dolmino) to simulate scarce, high-value domain repetition.
- GSM8k: Used for zero-shot downstream evaluation of mathematical reasoning.
Key Insights and Ideas
- FIM isn't enough; you need multi-span chaos. FIM is already widely used in code models, so you might assume you're already protected. Surprisingly, FIM barely dents overfitting (only a 10% penalty reduction) because leaving two big chunks intact preserves almost all adjacent token pairs across epochs. Breaking up text into many spans (SM and MoD) is what actually stops memorization.
- A linear tax buys an exponential discount. Varying the fraction of denoised sequences ($q$) reveals a clean mathematical trade-off: single-epoch overhead grows linearly with $q$, while the overfitting penalty decays exponentially. Tighter data budgets therefore warrant much higher denoising rates (up to 90%).
- It stacks with weight decay. Recent work showed that cranking up weight decay heavily curbs data-repetition overfitting. Denoising isn't redundant with weight decay—they are complementary, and combining them nearly doubles the perplexity gains of weight decay alone.
Key Results
Across Llama-2 style models from 15M to 1B parameters trained up to 16 epochs:
- Halving the overfitting penalty: At a 50% mix, SM and MoD add a negligible ~1.5% reducible-loss overhead on fresh data ($\pi \approx 1.015$), while slashing the overfitting penalty by 46% ($\rho = 0.54$) and 42% ($\rho = 0.58$), respectively.
- Lower final perplexity: Because overfitting grows much slower, SM and MoD can train for more epochs on the same token budget and reach lower validation perplexity across all tested configurations (e.g., for a 1B model on 200M tokens, SM reaches 23.22 perplexity vs. CLM's best of 23.97). Pushing SM to a 90% denoising fraction drops perplexity even further.
- Downstream math reasoning: When upsampling a 25M-token TinyGSM math pool during pretraining, pure CLM peaks at $8\times$ repetition and then degrades from overfitting. SM and MoD keep improving all the way to $20\times$–$50\times$ repetition, translating perplexity gains directly into higher GSM8k solve rates (a trend that also holds when midtraining off-the-shelf OLMo-2-1B checkpoints).
Limitations and Future Work
- Scale: The pretraining scaling sweeps stop at 1B parameters and 16 epochs. Confirming that the exact two-parameter scaling invariance holds at 7B–70B+ scales and higher repetition counts remains open.
- Domain breadth: Downstream validation focused exclusively on mathematical reasoning (GSM8k). Testing whether multi-span denoising yields similar gains for scarce code repositories or low-resource human languages is a natural next step.
Summary updated