## Introduction: What is a Duplicate? Norris: Welcome back to Mechanical Dreams, the podcast where we explore the gears, cogs, and sometimes the ghosts inside machine learning and natural language processing. I am Professor Norris, and joining me as always is my brilliant student, Linda. How are you doing today, Linda? Linda: I am doing fantastic, Professor! And I am incredibly excited about today's episode because the paper I brought is going to completely flip how we think about dataset curation. It is a brand new preprint titled Scale Dependent Data Duplication by Joshua Kazdan and a fantastic team from Stanford, EPFL, and ServiceNow. Norris: Now, Linda, I have to be honest. When you first told me we were doing an entire episode on dataset deduplication, I almost fell asleep in my office chair. Have we not solved this problem already? We use MinHash, we drop exact string matches, we remove the ten thousand copies of the MIT license from our web scrapes, and we call it a day. What is left to discuss? Linda: That is exactly the mindset this paper is challenging! You are talking about surface-form matching. Sure, if the text is literally the same, we can hash it and drop it. But what happens if you have a document in English, and its exact translation in French? Or what if a complex concept is just heavily paraphrased? Norris: Well, historically, those look like completely different sequences of tokens. The optimizer processes different token IDs, the embedding vectors are different, so to the model, it is fresh, novel data. Are you telling me that is no longer the case? Linda: Precisely! The core thesis of this paper is that what constitutes a duplicate is not just a static, mathematical property of your dataset. It actually depends on the model itself. Two documents that look distinct to a basic hashing algorithm, or even to a smaller model, might provide completely redundant training signals to a highly capable, massive language model. Norris: Wait, so you are saying the definition of a duplicate scales with the capability of the model? That is a fascinating proposition. If a model actually understands the underlying meaning, it does not learn anything new from reading the exact same thought in a different language. Linda: Exactly! The authors call these semantic duplicates. And their research shows that as models get larger and more capable, these semantic duplicates start acting exactly like exact string duplicates during pretraining. It is a hidden source of redundancy that can seriously degrade generalization and break our precious scaling laws. ## The Emergence of Semantics Norris: Alright Linda, I buy the premise. But as a scientist, I need proof. It is easy to philosophize that a smart model 'understands' a French translation is the same as the English original. But how on earth do Kazdan and his team actually measure what a model considers a duplicate? Linda: They do it by looking at the gradients, Professor. Specifically, they compute the full-parameter gradient of the per-document next-token cross-entropy loss. Norris: Ah, looking under the hood! That makes perfect sense. The gradient tells us exactly how the document wants to update the model's weights. If two documents produce gradients pointing in the same direction, meaning they have a high cosine similarity, then they are giving the model the exact same training signal. Linda: Exactly! So they took a thousand documents from the FineWeb-Edu-Dedup dataset, truncated them to a couple of thousand tokens to reduce variance, and then applied what they call semantic-preserving transformations to them. Norris: Like translating them to French, as you mentioned in our introduction? Linda: Yes! Translation to French, German, and Chinese using the Google Translate API. But they also did some really fun surface-level perturbations. They tried randomly swapping characters, dropping words with a five percent probability, and my personal favorite, 'Capitalize Humps', which is capitalizing every other character in the text. Norris: Ha! I can just imagine a multi-million dollar GPU cluster crunching full-parameter gradients on text formatted like a sarcastic internet meme. So, how do they establish a baseline to know if these gradients are actually aligned? Linda: They established a null baseline by measuring the gradient cosine similarity between completely unrelated English documents. As you would expect, that similarity is very low, hovering around zero. Then, they compared that baseline to the cosine similarity between an original document and its transformed version. Norris: Let me guess the results for the small models. A tiny model sees the English text and the French text, and the gradients are nowhere near each other. Linda: Spot on. They tested a suite of models, including the EleutherAI Pythia models, Gemma, and Meta-Llama. For the smaller and weaker models, the gradient direction is completely dominated by superficial features like language identity or casing. The similarity for the translations was comparable to, or even below, the baseline of totally unrelated documents. The small models literally cannot see past the surface tokens. Norris: Right, because the embedding vectors are different, and the shallow attention heads are just tracking local token co-occurrences. But what happens when we scale up to the larger parameters? Linda: It is like a lightbulb turns on. As model capability increases, the gradients for the transformed counterparts become consistently more aligned. The English text and the French text, or the normal text and the 'Capitalize Humps' text, start producing highly similar weight updates. The positive similarities clearly separate from the negative baseline. Norris: That is a phenomenal finding. It means the model's internal representation of the text's meaning has become so robust, so disentangled from the raw tokens, that the backward pass routes the error signal back to the exact same conceptual circuits. Linda: It really is! To quantify this separability, the authors calculated an AUC metric. They essentially tested how well you could distinguish a transformed gradient from an unrelated gradient just by looking at the cosine similarity score. Not only does this AUC increase as the model gets larger, but it also increases over the course of training for a fixed model. Larger models hit that high semantic sensitivity much earlier in their training runs. Norris: It is a brilliant way to quantify understanding. We throw that word around a lot in natural language processing, and I am usually the first to complain that models do not understand anything, they just match patterns. But if the loss landscape itself is invariant to whether the input is in English or German, that is a mathematically rigorous definition of semantic understanding. Early in training, the model is just memorizing syntax and vocabulary. But as it converges, it starts learning deep semantics, and suddenly, those translated documents you left in the dataset stop teaching it anything new. Linda: Precisely. The authors state it perfectly: if a model encodes meaning robustly, two semantically equivalent documents generate aligned weight updates. This provides a direct mechanism by which the exact same dataset actually has a smaller effective size for a more capable model. Norris: Which is a terrifying thought for the labs spending hundreds of millions of dollars on data collection. You think you have a trillion tokens of diverse data, but to a massive frontier model, it might look like a fraction of that. That naturally brings up the question of scale, just how many of these hidden semantic duplicates are lurking in our massive web scrapes? ## Semantic Collisions at Web Scale Linda: To answer your question, Professor, the authors did something really ambitious to find out just how much redundancy exists. They took 192 million documents from the FineWeb-Edu-Dedup dataset and embedded every single one of them. Norris: That is no small feat. What embedding model did they use? You need something extremely high quality to accurately judge semantic distance at that scale. Linda: They used EmbeddingGemma-300m. And what is really cool is that this model uses Matryoshka Representation Learning. So they could slice the embeddings into nested sizes, from the full 768 dimensions down to 512, 256, and even 128 dimensions, and re-normalize them. Norris: Ah, I love Matryoshka embeddings. It lets you analyze how the dimensionality of the latent space affects the collision rate. A smaller embedding space should naturally crowd faster. So, they have nearly 200 million embeddings. How do they track the collisions? Linda: They used the FAISS library to compute the nearest-neighbor cosine similarity across different subsets, scaling all the way from ten thousand documents up to a hundred million. And initially, the results were very comforting. For moderate corpus sizes, the nearest-neighbor distance follows a beautiful, predictable isotropic power law. Norris: As someone who loves a clean mathematical model, hearing the words 'predictable power law' makes me very happy. That means if you double your dataset, the density of the latent space increases by a predictable, marginal amount. Linda: Exactly. On a log-linear plot, the decrease in nearest-neighbor cosine similarity is just a straight line... until you hit about 10 million documents. Norris: And then what happens? Do we hit a semantic wall? Linda: The power law completely collapses. The curve steepens dramatically. The gaps between nearest neighbors start shrinking much faster than any isotropic baseline would predict. The authors call these 'semantic collisions'. Norris: So, you are saying we literally run out of unique things to say? Once you get past a few million educational web pages, every new document you scrape is just a slight variation of a concept already in the dataset? Linda: That is the direct implication. And remember our discussion from the previous chapter. This is a compound threat for frontier models. Highly capable models are the ones that actually recognize these semantic duplicates. In tandem, those same capable models require massive, compute-optimal training runs, meaning they are fed these huge corpora where the collision rate is exponentially higher! Norris: It is a double whammy. The model is smart enough to be bored, and the dataset is large enough to be boring. But surely, there is a modern solution to this. Everyone in the industry is talking about synthetic data right now. If the human web is running out of unique semantic diversity, why not just prompt a frontier model to generate highly diverse, novel text? Linda: Oh, Professor, you are going to love this part. The authors actually tested that exact hypothesis. They ran the same FAISS nearest-neighbor experiment on a fully synthetic pretraining corpus called Recycling-the-Web, which contains 44 million LLM-generated documents. Norris: Let me guess. The large language models are not quite as creative as their creators hope they are? Linda: Not even close. For the synthetic dataset, the divergence from the power law, that steep collapse where everything starts colliding, happened an entire order of magnitude earlier than it did for the real human data. Norris: An order of magnitude! So synthetic data is essentially a massive echo chamber. It has significantly lower semantic diversity than organic human text. We are just generating millions of documents that say the exact same things over and over again with slightly different phrasing. Linda: Precisely. The authors explicitly note this as a cautionary tale. Scaling the raw volume of synthetic tokens is easy, but scaling the semantic diversity of synthetic data is an entirely different, and much harder, problem. Norris: That is a massive blind spot for the 'just generate more data' crowd. If you try to train the next generation of models on trillions of synthetic tokens, and those tokens collapse into semantic collisions ten times faster than web data, your scaling ladder is going to break. Which, I believe, perfectly sets up the disaster scenarios for model training that we will discuss next. ## Breaking and Restoring Scaling Laws Norris: So, we left off with a rather terrifying cliffhanger for anyone writing a check for a massive GPU cluster. If semantic collisions happen earlier than we thought, especially in synthetic data, how does that actually impact the training loss? Do we have proof that it breaks scaling laws? Linda: The authors provide undeniable proof, but they had to be clever about it. Obviously, they do not have the compute budget to train a massive frontier model from scratch just to see it fail on semantic duplicates. So, they simulated the effect by using exact repeats. They sampled training streams with replacement from a finite pool of unique documents, which they call K. Norris: That makes sense. Since we established in chapter two that a highly capable model treats a semantic duplicate almost exactly like an exact string duplicate, sampling with replacement acts as a pessimistic, worst-case proxy for what happens at web scale. Linda: Exactly. They trained a scaling ladder of decoder-only transformers based on the Qwen architecture, ranging from 34 million to 344 million parameters, matched by compute. And they compared runs with limited unique data against an approximately infinite unique data baseline. Norris: And the results? Did the scaling ladder hold up? Linda: It held up beautifully for the small models! For the lower parameter counts, the training and validation losses followed the standard scaling extrapolations perfectly, even when the unique data pool K was very small. Norris: Oh, I see the trap. That is an absolute nightmare for a machine learning engineer. You train your small models, the scaling curves look completely normal, and you confidently predict the loss for your hundred-billion parameter flagship model. Linda: But when they scaled up the FLOP budgets, the larger models hit a redundancy wall. The finite pool of unique documents yielded rapidly increasing loss penalties. The naive scaling extrapolation completely broke down. The large models degraded in a strictly scale-dependent way. Norris: Because the larger models have the capacity to recognize the redundancy, so their effective dataset size shrinks, while the small models are still struggling to learn the basic syntax and do not even notice they are reading the same concepts over and over. Linda: Precisely! If you just blindly extrapolate from the small models, you will dramatically underestimate your main-run loss when effective uniqueness is limited. Norris: Well, it is one thing to point out that the bridge is collapsing, but it is another to engineer a structural fix. Did they figure out a way to restore predictability? Linda: They did! They developed a theoretical framework to account for this scale-dependent effective duplication. It all hinges on a variable they call K-eff, or the effective latent count. Norris: But how can you possibly measure the effective latent count? You cannot just run a word count on human semantics. The number of unique concepts in a dataset is practically unobservable. Linda: That is the genius of their approach. You do not need to observe the true pool size K. You can estimate K-eff directly from the mean nearest-neighbor cosine similarity that we discussed in the previous chapter. Norris: Let me make sure I follow. You take a fixed subsample of your training stream, embed it, and calculate the mean nearest-neighbor cosine distance? Linda: Yes! They use a two-component mixture model. A pair of documents is either a background neighbor with a baseline similarity, or a collision neighbor sharing the same latent semantic meaning. By looking at the ratio of those collisions in your subsample, you can mathematically invert that probability to find the Simpson effective size, which gives you K-eff. Norris: That is incredibly elegant. You do not need to process the entire dataset, you just take a sample, embed it, measure the latent density, and work backwards to the effective number of unique semantic ideas. So what do they do with K-eff once they have it? Linda: They plug it into a restored scaling law based on Hutter-style learning curve theory. The idea is that learning progress is driven by discovering previously unseen features. When you substitute the raw token count with this effective independent signal count, you get a three-parameter plane law. Norris: A plane law! So instead of a simple line predicting loss based on compute, you have a surface that models loss based on compute and effective semantic uniqueness. Does it actually work on their test runs? Linda: It works phenomenally well. On their controlled scaling ladders, replacing the true pool size with their estimated K-eff restored the predictability of the scaling curves. It achieved a mean absolute relative error of under one percent. Norris: That is a masterclass in empirical machine learning. They identified a massive, unstudied source of scale dependence, proved why it breaks standard extrapolations, and then handed the industry a mathematical tool to fix it using only a simple cosine similarity statistic. Linda: It really is. They transformed semantic diversity from an abstract linguistic concept into a rigorous, measurable parameter for scaling equations. It is going to change how every major lab plans their compute budgets. ## Conclusion: The Future of the Bitter Lesson Norris: So, Linda, we have a beautiful new plane law utilizing K-eff that saves our scaling predictions. But let us zoom out for a moment. This paper feels like a direct challenge to the industry's favorite gospel: Rich Sutton's Bitter Lesson. Linda: It absolutely is! The Bitter Lesson has convinced everyone that if you just scale parameters, compute, and data, super-intelligence will naturally follow. And until now, the only real obstacle was the finite number of words on the internet. Norris: Right, which is why everyone pivoted to synthetic data, hoping to infinitely print new training tokens. But as we discussed earlier, that synthetic data collapses into a semantic echo chamber ten times faster than human text. Linda: Exactly. The authors lay it out perfectly in their discussion. It turns out that scaling the raw volume of tokens is not enough if you are not scaling the semantic diversity along with it. If the sum total of distinct human thoughts is insufficient to train the next generation of models, labs cannot just brute-force their way out of it. Norris: We are literally running out of unique ideas to feed the machine. That is simultaneously profound and hilarious. So what is the path forward? We cannot just give up and go home. Linda: The authors suggest two distinct paths. First, if we are going to rely on synthetic corpora, we have to invent new ways to explicitly seed them with semantic diversity. It cannot just be the same concepts regurgitated. Second, and perhaps more importantly, labs must invest heavily in more data-efficient architectures and training methods. Norris: So the era of sloppy, brute-force scaling might finally be ending, forcing us to actually do some clever engineering again. I have to say, as an old-school researcher, I find that incredibly refreshing. Linda, this was a stellar paper choice today. You really brought the heat. Linda: Thank you, Professor! It was an absolute blast to dig into. I cannot wait to see how the frontier labs adapt to this new reality of semantic collisions. Norris: Neither can I. To our listeners, whether you are tuning hyperparameters or trying to synthetically generate a genuinely new thought, we wish you the best of luck. Until next week, keep dreaming mechanically.