Generalisation under gradient descent via deterministic PAC-Bayes

Eugenio Clerico, Tyler Farghly, George Deligiannidis, Benjamin Guedj, Arnaud Doucet · DOI

Abstract

We establish disintegrated PAC-Bayesian generalisation bounds for models trained with gradient descent methods or continuous gradient flows. Contrary to standard practice in the PAC-Bayesian setting, our result applies to optimisation algorithms that are deterministic, without requiring any de-randomisation step. Our bounds are fully computable, depending on the density of the initial distribution and the Hessian of the training objective over the trajectory. We show that our framework can be applied to a variety of iterative optimisation algorithms, including stochastic gradient descent (SGD), momentum-based schemes, and damped Hamiltonian dynamics.

Introduction: The Deterministic Gap in PAC-Bayes

Statistical learning theory seeks to provide rigorous guarantees on a model's performance on unseen data. The PAC-Bayesian framework has emerged as a powerful tool for this purpose, often yielding "non-vacuous" (meaningful) bounds even for high-dimensional models. However, a significant gap exists between theory and practice: standard PAC-Bayesian results typically require the learning algorithm to be stochastic, outputting a distribution over weights.

In practice, most deep learning models are trained using deterministic Gradient Descent (GD). To bridge this gap, researchers often resort to "de-randomization"—adding artificial noise to weights post-training to satisfy theoretical requirements. This paper introduces a novel approach that leverages the randomness inherent in the model's initialization to bound the generalization error of the final deterministic weights, eliminating the need for artificial noise.

Methodology: Disintegrated PAC-Bayesian Bounds

The core innovation lies in the use of disintegrated PAC-Bayesian bounds. Rather than analyzing the average performance of a distribution of models, this framework tracks the specific trajectory of a single model instance.

1. Change of Variables and the Continuity Equation

The authors treat the optimization process (whether continuous Gradient Flow or discrete GD) as a transformation of the initial probability density. By applying the continuity equation, they track how the probability density evolves from the prior (initialization) to the posterior (final weights). This allows for the calculation of the "information cost" of the training process without requiring the final state to be a distribution.

2. The Hessian Connection

The resulting bounds are intrinsically linked to the geometry of the loss landscape.

  • For continuous gradient flows, the bound depends on the Laplacian (the trace of the Hessian) of the training objective.
  • For discrete Gradient Descent, the complexity term involves: $-\sum \text{tr log}(I - \eta \nabla^2 C_s)$, where $\eta$ is the learning rate and $\nabla^2 C_s$ is the Hessian at step $s$.

3. Algorithmic Versatility

The framework is not limited to simple GD. It extends to include Stochastic Gradient Descent (SGD), momentum-based schemes, and damped Hamiltonian dynamics, providing a broad theoretical umbrella for common optimization practices.

Theoretical Evaluation

The paper validates these bounds using mathematical toy models that allow for closed-form analysis:

  • Random Feature Models: These demonstrate that the bounds remain meaningful even as the parameter dimension $d$ approaches infinity, suggesting the theory captures properties beyond simple parameter counting.
  • Wide Neural Networks: Analyzed within the Neural Tangent Kernel (NTK) regime, these models show how the bounds scale favorably with the number of training samples $m$.

Key Insights

Flatness as a Rigorous Metric

The "flat minima" hypothesis—that models in flatter regions of the loss landscape generalize better—is a common intuition in deep learning. This work provides a formal PAC-Bayesian justification for this intuition. The Hessian term in the bound explicitly penalizes "sharpness." In a flat landscape, the probability density does not concentrate excessively, keeping the PAC-Bayesian complexity low and the generalization guarantee strong.

Initialization as the Source of Truth

By proving that the "noise" provided by a random seed at the start of training is sufficient to anchor the theory, the authors show that deterministic algorithms can be studied within the PAC-Bayesian framework without modification. This aligns the theory more closely with how practitioners actually train models.

Computability

Unlike many theoretical bounds involving unobservable constants, these bounds are, in principle, computable. They depend on the density of the starting point and the curvature (Hessian) of the loss along the training trajectory, making them potentially useful for monitoring model health.

Results and Comparison

The authors demonstrate that for well-behaved target functions, their bound achieves a generalization error rate of $O(\sqrt{\log m / m})$. Under conditions where training error is minimized effectively, this can improve to a "fast rate" of $O(\log m / m)$.

Compared to "Uniform Stability" bounds, this PAC-Bayesian approach often yields sharper rates relative to dataset size and exhibits slower growth as the number of training iterations increases. Furthermore, the dimension-independent nature of the bounds in Random Feature Models supports the observation that over-parameterized models can generalize effectively.

Limitations and Future Directions

Despite the theoretical breakthrough, several challenges remain:

  • Training Time Divergence: The bounds currently diverge as training time $T \to \infty$. As a deterministic algorithm converges to a single point, the "posterior" approaches a Dirac delta function, which has infinite information complexity in this framework.
  • Computational Overhead: Calculating the trace or log-determinant of the Hessian at every training step is computationally prohibitive for large-scale neural networks.
  • Smoothness Requirements: The discrete-time bounds assume the objective function is twice differentiable. Extending this to non-smooth activations like ReLU requires further theoretical refinement.

Summary updated

BibTeX
@inproceedings{clerico2025generalisation,
  author = {Eugenio Clerico and Tyler Farghly and George Deligiannidis and Benjamin Guedj and Arnaud Doucet},
  title = {{Generalisation under gradient descent via deterministic PAC-Bayes}},
  booktitle = {ALT},
  year = {2025},
  url = {https://openreview.net/forum?id=Ix4CeKMtoc},
}
Figure