Scaling Domain Data Repetition in LLM Pretraining
This paper investigates the trade-off between data repetition and overfitting in large language model pretraining, revealing that optimal repetition counts for high-quality domain data mildly increase with model size at a fixed tokens-per-parameter ratio and are strongly negatively correlated with a domain's validation loss, suggesting that tuning on smaller proxy models can effectively guide scaling strategies for larger models.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a super-smart robot how to speak, write, and think. To do this, you feed it a massive library of text, a process called "pretraining." But here's the catch: the robot gets bigger and smarter as you add more "brain cells" (parameters), and to keep it from getting confused or underperforming, you have to feed it even more words. This is the world of Large Language Models (LLMs). The problem is that while you can easily find endless amounts of generic internet text (like random forum posts or news articles), finding truly high-quality, specialized knowledge (like advanced math, coding, or medical facts) is like finding a needle in a haystack. There just isn't enough of it to feed a giant robot.
So, what do you do when you run out of the good stuff? You start repeating it. You take that precious math textbook and feed it to the robot again and again. But this is a delicate balancing act. If you repeat the good stuff too much, the robot might just memorize the book word-for-word and fail to understand the actual concepts, a problem called "overfitting." If you don't repeat it enough, the robot gets drowned out by the sea of generic internet noise and never learns the hard stuff. The big question is: How many times should you repeat the good data before the robot starts to get confused?
This paper, titled "Scaling Domain Data Repetition in LLM Pretraining," dives deep into that exact question. The researchers from Tsinghua University and ByteDance Seed wanted to figure out the perfect recipe for mixing high-quality data with general data as robots get bigger. They tested this on four special "flavors" of data: Code, Math, Wikipedia, and Medical records.
Here is what they discovered, and it's a bit of a plot twist. For a long time, people thought that as robots got bigger, they became more fragile and would overfit (memorize) data faster. The old advice was: "Don't repeat the good stuff too much, or the big robot will break." But the authors found something surprising when they kept the training budget proportional to the robot's size (a rule called a fixed "tokens-per-parameter" ratio). They found that bigger robots can actually handle more repetition than smaller ones. It's like a giant athlete who can run more laps without getting tired compared to a smaller one, provided they are both training with the same intensity.
However, the most important rule they found isn't about the size of the robot, but about the quality of the data itself. They discovered a strong link between how well a robot learns a specific topic and how much it can repeat that topic. If the robot learns a domain (like Math) very well and gets a low "error score" (validation loss), it can handle repeating that data many times without breaking. But if the robot struggles with a topic and has a high error score, it will overfit very quickly, so you should repeat that data very few times.
Interestingly, the amount of unique data you start with doesn't seem to matter much for deciding how many times to repeat it. Whether you have a tiny pile of unique math problems or a huge one, the "sweet spot" for repetition stays roughly the same. The researchers suggest that if you want to train a massive robot, you don't need to guess. You can train a smaller "proxy" robot first, see how well it learns the math or code, and use that result to safely guess how many times to repeat the data for the giant robot.
They also tested what happens if you swap unique data for repeated data while keeping the total amount of "good stuff" the same. They found that for some topics, like Math, repeating the data is almost as good as having more unique data. But for others, like Wikipedia, repeating the data is a bad idea; the robot learns much worse if it just hears the same Wikipedia sentences over and over instead of reading new ones.
Finally, they looked at how the robot's "learning speed" (learning rate) changes during training. They found that if you slow the robot down early in training, it gets more sensitive to repetition and overfits sooner. But if you keep the learning speed high for longer, the robot can tolerate more repetition before it starts to memorize instead of learning.
In short, this paper suggests that there is no single magic number for how many times to repeat data. Instead, the best strategy depends on how well the robot is already learning that specific subject. If it's a fast learner, repeat the data more. If it's a slow learner, stop repeating it sooner. And surprisingly, bigger robots are actually more robust to repetition than we thought, as long as we feed them the right amount of data for their size.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.