How iteration composition influences convergence and stability in deep learning

Benoit Dherin, Benny Avelin, Anders Karlsson, Hanna Mazzawi, Javier Gonzalvo, Michael MunnTMLR 2025

Abstract

Despite exceptional achievements, training neural networks remains computationally expensive and is often plagued by instabilities that can degrade convergence. While learning rate schedules can help mitigate these issues, finding optimal schedules is time-consuming and resource-intensive. This work explores theoretical issues concerning training stability in the constant-learning-rate and small-batch-size regime. Surprisingly, we show that the composition order of gradient updates affects stability and convergence in gradient-based optimizers. We illustrate this new line of thinking using backward-SGD, which produces parameter iterates at each step by reverting the usual forward composition order of batch gradients. Our theoretical analysis shows that in contractive regions (e.g., around minima) backward-SGD converges to a point while the standard forward-SGD generally only converges to a distribution. This leads to improved stability and convergence which we demonstrate experimentally. While full backward-SGD is computationally intensive in practice, it highlights that the extra freedom of modifying the usual iteration composition by reusing creatively previous batches at each optimization step may have important beneficial effects in improving training. To our knowledge, this represents a new and unexplored avenue in deep learning optimization.

Introduction

Training deep neural networks is notoriously finicky. Practitioners often encounter "training instabilities"—jagged, oscillating loss curves that can lead to sub-optimal models. Traditionally, these issues are addressed using complex learning rate schedules or massive batch sizes. However, this paper identifies a fundamental mathematical reason for this noise: standard Stochastic Gradient Descent (SGD) is a "forward" process of random operators. Because these operators do not commute, the model "forgets" its initial state and is dominated by recent batches, leading to a stationary distribution rather than a single optimal point.

Methods: Reversing the Composition Order

The core proposal is to reverse the order of gradient compositions to achieve point-wise convergence.

  • Forward Trajectory (Standard): At each step $n$, the current parameters are updated by the next batch. Mathematically: $\theta_n = T_n(T_{n-1}(\dots T_1(\theta_0)\dots))$.
  • Backward Trajectory: At each step $n$, the process starts from the initial parameters and applies all batches received so far in reverse order: $\theta_n = T_1(T_2(\dots T_n(\theta_0)\dots))$.
Comparison of Forward and Backward Iteration Composition. In forward iterations, the optimizer (Pac-Man) moves forward through the data sequence. In backward iterations, the composition order is reversed, effectively "anchoring" the trajectory to the starting point.

Using the Banach Fixed Point Theorem, the authors prove that if gradient updates are "contractions" (which happens near local minima), the backward order is guaranteed to converge to a specific point. In contrast, the forward order typically only converges to a distribution. To bridge the gap to practicality, they explore approximate backward-SGD using "Lie brackets" (a tool from differential geometry) to correct the standard forward path so it mimics the stability of the backward path.

Key Insights and Results

The theory was validated across several benchmarks, including synthetic regression, Fashion-MNIST, CIFAR-10, and CIFAR-100 using architectures like ResNet-18 and VGG-19. The phenomenon held for both vanilla SGD and AdamW.

  • Memory vs. Noise: Forward-SGD is "forgetful" and dominated by recent stochastic noise. Backward-SGD "remembers," anchoring the trajectory to the starting point and causing the influence of new, noisy batches to decay exponentially.
  • Point vs. Distribution: Backward-SGD converges to a single point that represents a "representative sample" from the noisy distribution where forward-SGD wanders.
  • Visual Stability: In every experiment, backward learning curves (loss and accuracy) were significantly smoother and exhibited much lower variance than their forward counterparts.
  • Implicit Regularization: The difference in composition orders acts as a form of implicit regularization, similar to the benefits seen when using very small batch sizes.

Conclusion

While pure backward-SGD has $O(n^2)$ computational complexity, making it a "proof of concept" rather than a direct replacement for Adam, it serves as a theoretical "North Star." Future work focuses on efficient approximations, such as "windowed" updates or Lie bracket corrections, to bring these stability benefits to large-scale training. This represents a new and unexplored avenue in deep learning optimization.

Summary updated

BibTeX
@article{dherin2025how,
  author = {Benoit Dherin and Benny Avelin and Anders Karlsson and Hanna Mazzawi and Javier Gonzalvo and Michael Munn},
  title = {{How iteration composition influences convergence and stability in deep learning}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=GZCBM2Yo3a},
}
Figure