Abstract
In this work, we propose an Implicit Regularization Enhancement (IRE) framework to accelerate the discovery of flat solutions in deep learning, thereby improving generalization and convergence. Specifically, IRE decouples the dynamics of flat and sharp directions, which boosts the sharpness reduction along flat directions while maintaining the training stability in sharp directions. We show that IRE can be practically incorporated with generic base optimizers without introducing significant computational overload. Experiments show that IRE consistently improves the generalization performance for image classification tasks across a variety of benchmark datasets (CIFAR-10/100, ImageNet) and models (ResNets and ViTs). Surprisingly, IRE also achieves a 2× speed-up compared to AdamW in the pre-training of Llama models (of sizes ranging from 60M to 229M) on datasets including Wikitext-103, Minipile, and Openwebtext. Moreover, we provide theoretical guarantees, showing that IRE can substantially accelerate the convergence towards flat minima in Sharpness-aware Minimization (SAM).
Introduction
In deep learning, the geometry of the loss landscape significantly impacts model performance. It is widely observed that "flat minima"—regions where the loss function changes slowly with respect to parameter perturbations—tend to generalize much better than "sharp minima." While standard optimizers like Stochastic Gradient Descent (SGD) exhibit a natural tendency to drift toward these flat regions (implicit regularization), this process is often too slow for practical efficiency.
A primary bottleneck is that the global learning rate is constrained by the sharpest directions in the loss landscape to prevent training instability. Consequently, progress along the flatter, more beneficial directions is unnecessarily sluggish. While explicit methods like Sharpness-Aware Minimization (SAM) address this, they often double the computational cost per step.
The IRE Framework
The proposed Implicit Regularization Enhancement (IRE) framework is a lightweight modification for standard optimizers designed to accelerate the discovery of flat minima. IRE decouples the dynamics of flat and sharp directions, allowing for larger updates in flat regions without compromising stability in sharp ones.
Decoupling Dynamics
IRE modifies the standard update rule by adding an enhancement term: $$\theta_{t+1} = \theta_t - \eta(g_t + \kappa P_t g_t)$$ where $g_t$ is the gradient, $\kappa$ is an enhancement factor, and $P_t$ is a projection onto the flat directions. By boosting the learning rate specifically along these flat directions, IRE reaches flatter solutions much earlier in the training process.
Efficient Implementation
To maintain efficiency, IRE utilizes a "diagonal Fisher" estimator as a proxy for the Hessian, requiring only the square of mini-batch gradients. The algorithm identifies the "flattest" coordinates and applies the enhancement $\kappa$ only to them. By updating this "flatness mask" periodically (e.g., every 10 steps), IRE incurs only a 10% computational overhead, making it significantly more efficient than SAM.
Experimental Results
The authors evaluated IRE across diverse benchmarks, including computer vision (CIFAR, ImageNet) and large language model (LLM) pre-training (Wikitext, Openwebtext).
Generalization in Vision Tasks
IRE consistently improves test accuracy across various architectures. For instance, on CIFAR-100 with a ViT-S model, combining SAM with IRE (SAM-IRE) improved accuracy by 3.54% over standard SAM. On ImageNet, IRE provided a consistent +0.3% to +0.45% Top-1 accuracy boost for both SGD and SAM baselines.
Acceleration in LLM Pre-training
One of the most surprising findings is IRE's impact on convergence speed. In pre-training Llama models (60M to 229M parameters), AdmIRE (AdamW + IRE) achieved a 2.1× speedup over a well-tuned AdamW baseline, reaching the same validation loss in half the steps.
The framework also demonstrates high robustness to its hyperparameters. As shown in the sensitivity analysis, performance remains stable across a range of values for the enhancement factor $\kappa$ and the flatness ratio $\gamma$.
Conclusion
IRE offers a practical, "plug-and-play" solution to enhance implicit regularization in deep learning. By selectively boosting updates in flat directions, it achieves superior generalization and dramatic convergence speedups with minimal computational cost. Future work will explore the mechanisms behind the LLM speedup and scale the method to multi-billion parameter models.
Summary updated