The Hidden Clock Inside Diffusion Models
Early Stopping Isn’t a Hack, It’s the Theory
In this series, we review NeurIPS, ICLR, AAAI, ICML, and CVPR papers in an approachable way. Our main tool is NotebookLM, which is hacking into our human desire for narratives (improve recall and comprehension). To supplement, I provide brief commentary drawn from my experience as a Senior Research Scientist at Nvidia.
Today’s paper:
NeurIPS 2025 presented as an oral in December 2025. Giulio Biroli and Marc Mézard are world-renowned figures in statistical physics and its applications to ML.
Commentary
This is somehow a very important paper, because it suggests that dataset size is countered by early stopping, and this has implications for training custom generative models on fine-tuned datasets. The paper shows that using fewer training steps explains why it does so well. On the other hand, it seems to suggest that there is sort of a ticking time bomb in terms of dataset size against better architecture and model expressivity. So, sort of a perplexing paper.
NotebookLM podcast and transcript (AI generated, lightly edited)
“We are cutting straight to the core of one of the biggest mysteries in modern generative AI.
We really are.
Today we’re doing a deep dive into the mechanics of diffusion models, the tech that’s powering, you know, all this incredible image, audio, and video creation.
And we are tackling a central paradox with these models. You see, on one hand, they are absolutely state-of-the-art. They generate novel, stunning stuff, right?
But on the other hand, all the traditional machine learning theory tells us that these models which are super expressive, overparameterized. They should just memorize their training data
if you train them long enough.
Exactly. They should become parrots, not artists.
That’s the puzzle. I mean, if you train a perfect machine down to zero loss, why doesn’t it just spit back the exact images it was trained on?
Uh-huh.
Our source material for this, a really insightful technical paper, argues that the answer isn’t just hidden in the architecture, it’s actually in a race against time.
Precisely. The core finding here is that generalization in these models is really sustained by the timing of the training itself.
So the training duration is its own regulator.
That’s it. So our mission today is to pull this dynamic apart. We’re going to focus on two absolutely critical fundamentally distinct points in time.
Good job.
The generalization time which they call TIGN and the memorization time or TM
TGEN and Telm.
And understanding the gap between these two is the key to preventing you know catastrophic data replication. Okay, let’s unpack this. Maybe we can set the scene with just a quick review of how these generative machines actually work.
Good idea.
So, at the highest level, a diffusion model is all about two processes. First, you have the forward process. This is where the model slowly adds noise,
right?
Think of it like gradually blurring or just dissolving a clean image into pure static using a formula, usually a stochastic differential equation.
And then the magic is in the second stage, the reverse process. This is where the model learns how to take that static,
that pure noise systematically denoise it step by step all the way back into a coherent image. But to do that, the network needs a very precise directional map.
And that map is what you called the score function.
Exactly. The score function, it approximates the gradient of the data distribution. It basically tells the model the fastest way to move from a noisy sample back toward a clean real image.
And that’s what it learns during training.
Yeah. It learns this directional map by minimizing what we call a score matching loss.
Okay, so here’s where the trouble starts. The so-called memorization trap.
Mhm.
If the network is incredibly powerful, and we know modern DMs are famously huge, these overparameterized models
and it manages to drive that training loss all the way down to zero.
It has perfectly learned the data,
every last detail.
And when it perfectly learns the data, it learns what we call the empirical score. So this is the directional map tailored precisely point for point to every single sample in the training set.
And this is where the theory predicts total failure.
It does. We know that this training set specific solution, it just it inevitably leads to the recreation of training samples. The only way out is if your data set size n grows exponentially with the dimension of the data d
which I mean in the real world of high-res images or audio. That just never happens. No one has an exponentially large training set.
Not even close. So if we just follow the theory, every diffusion model should eventually just become a master copier.
It’s like a student studying for a test. Yeah.
Right. Generalization is when the student learns the concepts and can solve new problems.
Exactly. And memorization is when the student just copies the answer key.
They can reproduce the answers perfectly, but they haven’t actually learned the rules.
Right. And the fact that DMs generalize so well, even when they’re powerful enough to memorize everything suggests something dynamic is holding back that copy button.
So if the architecture isn’t the whole answer, where did the paper look next?
The stopwatch.
The clock.
They tracked the training progression. on UNET architectures using a downscaled version of the Celeb data set and they found these two specific points in time that defined the fate of the model.
Okay, so what’s the first one?
The first one is what they label teen the generalization time. This happens relatively early.
And what happens at that point?
It’s the moment the model suddenly figures out how to generate highquality novel samples. They can measure this empirically when the fresh inception distance, the FID score quickly drops to its minimum value.
Okay, wait. Let’s pause there for our listeners. What exactly is the FID score?
So FID is just a standard metric we use to evaluate these generative models. Think of it as a score that measures two things. How realistic the generated images look.
So quality.
Quality, right? And also how diverse those generated images are.
So variety.
Exactly. A rapidly dropping FID means the model has gone from generating garbage to generating really realistic and varied output. And it did it quickly.
Okay. So that’s tongue in the quick learning. phase. What about the dangerous point, the memorization time?
That’s me, the memorization time. And this is a much much later point in time. It’s measured when the fraction of generated samples that are essentially duplicates of the training data,
the memorization fraction,
right? When that starts to climb sharply. This is the cliff edge.
What really stands out to me here is the relationship between these two moments and the size of the data set n.
This is where it gets really interesting. They found that ten, the generalization time, it was constant. constant.
In their experiments, it was around 100,000 steps. And crucially, it was independent of the training set size.
Wow. So whether the data set was small or huge, the model figured out how to generalize just as fast.
That’s right. The model’s initial learning speed seems to be fixed regardless of how many examples you feed it.
But the failure point PM, that one moves.
It moves dramatically. They found that TM grows approximately linearly with the training set size N.
So if you double your data set,
you basically double the amount of safety time you have before the model starts just replicating its inputs. The size of the data set acts like this massive shield against memorization.
That is a surprisingly clean result for something so complex. It means the window of time where the model is safe and effective. That sweet spot between TEG and its mem, it’s not static,
right? As you increase your training data, that safe zone just expands, giving you a much larger buffer.
And this dynamic itself is acting like a break on the memorization process. That’s it. This phenomenon where the training duration itself regulates the model away from overfitting is what the researchers termed implicit dynamical regularization.
The training process is just biased toward the general solution first
for a very long time.
And they had some pretty compelling evidence to back up that clean linear scaling of TEM with N. How did they actually confirm that?
Well, they showed that if you took all their experimental results from models trained on data sets of different sizes, And you plotted the memorization curve against a rescaled time divided by n.
So training steps per data sample.
Exactly. All the different curves collapsed onto a single universal line.
And that collapse is powerful evidence, right? It means it doesn’t matter if I trained on a thousand images or 100,000. The critical factor isn’t the absolute time.
It’s the time per data sample.
That’s incred.
Yeah. And the researchers found that memorization consistently emerges around a constant point of over being roughly 300. Can you translate that into a concrete example for us?
Sure. Let’s say a model was trained on a pretty small data set, like 1,024 images.
Okay.
At 100,000 steps, it was totally safe. 0% memorization. But if they pushed that same model with that same small data set way past that limit, up to 1.62 million steps.
Wow.
The memorization rate just skyrocketed. It went up to over 34%. The generated samples were verifiably near duplicates of images in the training. set
that shift is amazing. It really confirms that the model’s ability to memorize isn’t the problem.
No,
the problem is having the patience or I guess the compute to wait for the training process to actually find those exact solutions.
And you also have to factor in model capacity. They tested different size units measuring capacity by the network’s base channel with let’s call it W.
Okay, so a bigger W means a bigger model.
A wider more powerful network. And as you’d probably expect, higher capacity networks are better at finding those quick solutions. So a wider network should start generalizing faster, but it also hits that memorization cliff sooner.
And that’s exactly what the scaling law showed. Scan is inversely proportional to W. So wider models generalize faster.
Makes sense.
And same scales linearly with N but inversely with W. A wider network effectively shrinks that safety window you have per data sample.
This means for anyone out there designing or training a custom diffusion model, especially on a smaller niche data set.
This constraint is incredibly tight.
It is
stopping before FIMM isn’t just good practice. It’s mandatory if you want novel content.
It is absolutely non-negotiable. Unless you know your data set N is so astronomically large that it surpasses some model specific threshold. Only then do you enter a world where overfitting kind of disappears even if you train forever.
But for 99% of real world applications,
for 99% of us where N is smaller than that architectural limit, early stopping is your only defense.
So if we look back back. We have this massive growing time gap between learning the general shape of the data at Dean.
Mhm.
And learning the precise location of every single data point at Dean. What’s the underlying reason for that huge delay? What’s going on under the hood?
It’s driven by the difference in the complexity of the two things the network is trying to learn.
Okay,
the true underlying distribution of the data is actually relatively smooth, but the training set specific ution, the empirical score that is extremely irregular and complex, especially with lots of data points.
And this brings us to a really foundational concept in neural network theory, right? Something called spectral bias.
Absolutely. Spectral bias describes this tendency that neural networks have to prioritize things.
What do they prioritize?
They naturally favor learning smooth, simple, low frequency functions first. Think of it like a radio. It’s always going to tune in to the strongest, clearest signal first before it finds the faint, staticky ones.
So the network starts it training process just looking for the easiest path.
The easiest path is approximating that smooth low frequency part of the score function and that’s the part that corresponds to the true population distribution
which is why taken happens so fast. The network quickly locks on to the general principles. Exactly.
And all the nasty irregular highly specific details, the highfrequency parts that encode the exact location of every training point and lead to memorization. Those are much harder to learn.
Oh, they’re exponentially harder because of spectral bias. The network has to spend an enormous amount of training time to drive the loss down enough to finally accommodate those highly irregular highfrequency components.
And only then does it finally converge that weird unstable minimum that corresponds to the empirical score
and that huge time delay.
Yeah,
And to back this up, they didn’t just rely on the unit experiments, did they? They also built a simpler, more theoretical model,
right? A random features neural network. And that theoretical analysis gave analytical support for what they were seeing empirically. It showed that the two time scales are related to the inverse eigenvalues of a correlation matrix.
So the math checked out.
It did and importantly the analysis confirmed that chyen is only associated with the characteristics of the population data itself which explains why it’s constant.
While me is tied to those training set specific really complex components
which is why mem scales linearly with the data set size noun the simplified model gave the clean mathematical justification for the dynamic they observed.
So this enormous widening gap between generalization and memorization is directly caused by the high irregularity of that empirical score solution.
An irregularity that the network avoids until very very late in its training.
So if you are taking away one core insight from this deep dive, it has to be this. Generalization in modern diffusion models isn’t some inherent property of the architecture alone.
Not at all. It’s significantly sustained by the amazing widening window of implicit dynamical regularization.
The practical mandate then for everyone working in generative AI is pretty unambiguous.
It is early stopping gets elevated from just an optimization trick to a fundamental mechanism. It’s required to ensure you get novelty and highquality generation.
If you train too long, the machine eventually forgets the principles and just becomes a copier.
That’s the bottom line.
Now, the researchers did point out a few practical caveats. For example, The absolute numbers for T’s and TEM, they shift around a lot depending on which optimizer you use.
Right? If you use atom, the model converges much faster than with say stocastic gradient descent. So you hit both of those checkpoints sooner.
So the relationship holds, but the clock speeds up.
Exactly. They also noted that the precise effect of conditioning like using classifier free guidance, which is what lets you use a text prompt to guide the image generation.
Yeah.
The effect of that on the location of Teague and TM is still an open question. It needs more exploration.
But let’s zoom out for our final thought here. We’ve established that T scales linearly with T’s.
Yeah.
And we know that some massive industrial models, even the biggest foundation models like stable diffusion, have been shown to exhibit some partial memorization.
This raises a profound I think sustainability question. If every sufficiently expressive model is ticking down toward its MEM limit, a limit defined by its data set size, does generalization have an inherent shelf life.
Interesting.
You know, for the developers of these trillion parameter models, if you just keep training indefinitely, does the enormous compute cost required to perpetually push that mem limit forward, does that make the whole paradigm fundamentally unsustainable
because you’re always working against the clock to ensure novelty?
Always. And eventually, the cost of adding enough new data just to delay memorization, it could become astronomical. That’s certainly something to ponder as these models continue to scale.”