Swapping 1% of a Pretraining Batch Can Inflate the Gradient ~300×

bremen79 · x · 2026-12-02

Blogger bremen79 published a new post, "How Much of a Batch Does It Take to Change the Gradient?" (with code), and broke down the experiments in a 9-part thread:

Takeaway: replacing just 1% of a pretraining batch can inflate the gradient 300× with almost no change in loss — an empirical, reproducible finding relevant to data mixing and gradient-spike debugging.

Related event: Orabona: Replacing 1% of a Batch Can Amplify Gradients ~300x(3 posts)→

Original post →

More from Research

Research channel →