In the early years of deep learning, the primary challenge for researchers was managing the gap between training performance and generalization. With limited datasets, models were cycled through the same data points multiple times, leading to the classic problem of overfitting: models would memorize the training set rather than learning the underlying patterns. To combat this, the "Bayesian toolkit"—including Bayesian Neural Networks (BNNs) and ensembles—was developed to smooth predictions and provide better uncertainty calibration.
However, the era of Large Language Models (LLMs) has introduced a paradigm shift. Models like GPT-4 and Llama 3 are trained on trillions of tokens, often for only a single epoch. Curiously, these models show very little overfitting and are remarkably well-calibrated right out of the box. In his paper, "Why you don’t overfit, and don’t need Bayes if you only train for one epoch," Laurence Aitchison provides a formal theoretical explanation for why modern training practices have rendered complex Bayesian methods largely redundant in the pre-training phase.
The Empirical Trap vs. The True Distribution
To understand why single-epoch training is so effective, we must first distinguish between two types of loss functions:
- Empirical Loss: This is the loss calculated on a finite, fixed dataset. In multi-epoch training, the mathematical optimum is simply to memorize every point in that set. This is the definition of overfitting.
- True DGP Loss: This is the loss relative to the "Data Generating Process" (DGP)—the actual underlying distribution of the universe from which data is drawn.
Aitchison argues that the goal of machine learning is not to minimize empirical loss, but to minimize the true DGP loss. Bayesian Model Averaging (BMA) was traditionally used to bridge this gap by accounting for the uncertainty inherent in having limited data.
The Single-Epoch Advantage
The paper proves that if a model only sees each data point once, the standard training objective (Maximum Likelihood) becomes an unbiased estimator of the true DGP loss.
The reason multi-epoch training fails this test is what Aitchison calls the "Dependency Problem." In a multi-pass regime, model weights at time t become dependent on the data points they have already seen. This dependency biases the gradient. In a single-pass regime, however, every new data point is independent of the current model weights. Consequently, the training loss is not just a proxy for performance; it is a direct, unbiased estimate of the test loss. In effect, the model is learning from the "universe" itself rather than a static, biased sample.
Why Bayes Becomes Redundant
Bayesian methods are designed to handle uncertainty induced by finite data. However, when data is effectively infinite—or at least larger than the compute budget available to process it—that uncertainty vanishes.
Aitchison demonstrates that single-epoch Stochastic Gradient Descent (SGD) already performs the heavy lifting that Bayesian inference was intended to do. Because the single-epoch objective targets the true DGP loss, the resulting models are naturally well-calibrated. They are trained to minimize the exact objective (log-likelihood on the true distribution) that leads to perfect calibration, making the additional complexity of BNNs unnecessary for large-scale pre-training.
Scope and Limitations
While this theory explains the success of foundation models, Aitchison notes that Bayesian methods are far from obsolete. Their utility is now defined by the data regime:
- Data-Poor Scenarios: In fields like medical imaging or specialized scientific tasks where datasets are small, multi-epoch training remains a necessity. In these cases, Bayesian methods are still essential to prevent overfitting.
- Post-Training and Fine-Tuning: During the alignment or fine-tuning phases of LLM development, datasets are significantly smaller than the pre-training corpus. Here, the risk of overfitting re-emerges, and Bayesian approaches may still offer value.
- Optimizer Efficiency: While we may not need Bayesian models, Aitchison suggests we may still benefit from "Bayes-inspired optimizers." These tools could help models converge faster, allowing them to extract even more information from their single pass over the data.
Conclusion
The shift toward single-epoch training on massive datasets represents more than just a change in scale; it is a fundamental shift in the mathematical nature of the learning process. By treating the training set as a continuous stream from the true data distribution, modern AI has bypassed the need for the complex regularization and Bayesian machinery that once defined the state of the art. In the regime of infinite data, the simplest training objective turns out to be the most theoretically sound.
Summary updated