Navigating Potholes with Geometry-Aware Sharpness Minimization

Simon Dufort-Labbé, Mehrab Hamidi, Razvan Pascanu, Ioannis Mitliagkas, Damien Scieur, Aristide BaratinarXiv 2026

TL;DR

The paper introduces LLQR+SAM, a novel optimization framework that pairs Sharpness-Aware Minimization (SAM) with a learned, slowly-updated preconditioner from the Layerwise Linear-Quadratic Regulator (LLQR) framework. By operating at two distinct timescales—tracking global loss geometry slowly while correcting local sharpness quickly—the method amplifies the escape signal from poor local minima ("potholes") and consistently improves generalization across vision and sequence modeling tasks with minimal computational overhead.

What Problem Does This Paper Address?

Deep learning loss landscapes are complex, combining large-scale smooth structures (wide basins) with small-scale sharp features (narrow valleys, localized potholes) that lead to poor generalization. Optimization research typically tackles this at two independent scales: geometry-aware methods (like natural gradient or K-FAC) reshape the descent direction to fix global ill-conditioning, while sharpness-aware methods (like SAM) perturb parameters to bias optimization toward flatter minima.

However, vanilla SAM treats all parameter directions uniformly, completely ignoring the underlying global loss geometry. Conversely, global preconditioners are insensitive to sharp, localized potholes. This paper bridges the gap by combining both approaches into a unified, synergistic framework.

Methods

The authors propose LLQR+SAM. It leverages the recently introduced Layerwise Linear-Quadratic Regulator (LLQR) framework to learn a structured inverse preconditioner ($U$). Crucially, $U$ is updated sparsely (e.g., every 500 steps) and smoothed via an exponential moving average (EMA), capturing a low-resolution, stable picture of the global loss landscape.

On top of this slow geometry, a fast SAM perturbation is applied at every minibatch step. Instead of using a standard Euclidean ball for the perturbation, LLQR+SAM evaluates the worst-case sharpness in the geometry-induced norm defined by $U$. The outer gradient descent step then uses the exact same inverse metric to transport the update:

$$\theta^+ = \theta + \rho \frac{U g(\theta)}{\|g(\theta)\|_U}, \quad \theta \leftarrow \theta - \eta U g(\theta^+)$$

This coupling ensures that both the adversarial probing and the optimization step adapt dynamically to the landscape's global curvature.

Datasets

The method was rigorously evaluated on standard vision and sequence modeling benchmarks:

  • CIFAR-10 and CIFAR-100 (using VGG16-BN, ResNet-18, WRN-28-10, and PyramidNet-110)
  • TinyImageNet-200 (ResNet-18, WRN-28-10)
  • ImageNet (ResNet-50)
  • IWSLT14 German-to-English (Transformer sequence modeling)
  • ImageNet-scale Vision Transformers (ViTs) (ViT-Tiny to ViT-Large for scalability testing)

Key Insights and Ideas

  • Two-Timescale Synergy: The combination is synergistic, not just additive. The slow preconditioner ($U$) scales the fast SAM probe. In wide basins, the iterate remains stable. Around a sharp "pothole," the hovering scale exceeds the pothole's attraction basin, forcing the optimizer to escape.
  • Pothole-Escape Amplification: Theoretically, LLQR+SAM amplifies the escape signal relative to vanilla SAM by a factor that grows as the surrounding basin becomes flatter ($\lambda_i^{-1/2}$). This means it selectively targets sharp potholes precisely where preconditioning matters most.
  • Direction-Adaptive Contraction: Unlike simply increasing SAM's radius ($\rho$), which blows up the perturbation uniformly in all directions, LLQR+SAM uses the learned geometry to perform direction-adaptive probing and contraction.

Key Results

  • Consistent Performance Gains: LLQR+SAM consistently outperformed both SAM and LLQR alone. For instance, on CIFAR-100 with a PyramidNet-110 architecture, LLQR+SAM achieved a top-1 accuracy of 86.67% compared to SAM's 86.20% and SGDM's 83.96%.
  • ImageNet Scaling: Paired with a SAM variant (F-SAM) on ResNet-50/ImageNet, the combined method achieved a top-1 accuracy of 78.61%, outperforming F-SAM alone (77.92%). It also demonstrated faster convergence early in training.
Figure 1: Interaction between FSAM and LLQR on ResNet-50/ImageNet. Left: Top-1 error for SGDM and FSAM, a SAM variant, with and without LLQR. Although both SAM-style methods and LLQR can be interpreted as curvature-correcting mechanisms, their combination yields gains over either component alone, suggesting complementary effects. Right: Test loss versus elapsed training time. Despite the usual concern that second-order methods are prohibitively expensive, LLQR remains efficient enough not to become the bottleneck: whenever the slowdown of SAM is acceptable, topping it with LLQR likely preserves affordability.
  • Computational Efficiency: Despite using a second-order method, the sparse update cadence ensures that LLQR does not become a bottleneck. As shown in the scalability study on ViTs, the preconditioner update time scales nearly linearly ($O(P^{1.27})$ to $O(P^{1.28})$) with the number of parameters $P$, far better than the typical quadratic scaling of second-order methods.
LQR Time-Complexity Scaling Across ViT Sizes

Limitations and Future Work

  • Idealized Theoretical Model: The theoretical proof of the pothole-escape mechanism relies on a simplified, two-timescale quadratic loss model. While intuitive, it doesn't fully capture the highly non-convex, stochastic nature of deep neural networks.
  • Finite Empirical Scope: The empirical validation is restricted to standard supervised vision tasks and one sequence-to-sequence task. The authors note that large language model (LLM) pre-training or fine-tuning was not explored.
  • Hyperparameter Dependency: Finding the optimal block structure (e.g., E-KFAC vs. diagonal), update cadence, and memory budget remains a scale-dependent design challenge that requires manual tuning for new architectures.

Summary updated

Abstract

Sharpness-aware minimization (SAM) encourages flat minima by perturbing parameters along directions of high loss curvature, but treats all parameter directions uniformly, ignoring the underlying loss geometry. We introduce LLQR+SAM, which combines SAM with a learned preconditioner obtained from the recently proposed LLQR framework, a second-order method that recasts steepest descent as a layerwise linear-quadratic regulator problem. The preconditioner is updated sparsely and maintained as a slow exponential moving average, so it captures a smoothed, low-resolution picture of the loss landscape geometry. The SAM perturbation then operates on top of this learned geometry, probing curvature at a faster timescale. We show that this two-timescale structure is not merely a computational convenience: theoretically, the preconditioner amplifies the SAM escape signal in directions that are flat under the average geometry but locally sharp (potholes). Wide, flat basins, by contrast, remain stable. Empirically, LLQR+SAM gives consistent gains over both SAM and LLQR alone across standard vision and sequence modeling benchmarks, supporting the view that slow learned geometry and fast sharpness correction are genuinely complementary.
BibTeX
@misc{dufortlabbe2026navigating,
  author = {Simon Dufort-Labbé and Mehrab Hamidi and Razvan Pascanu and Ioannis Mitliagkas and Damien Scieur and Aristide Baratin},
  title = {{Navigating Potholes with Geometry-Aware Sharpness Minimization}},
  year = {2026},
  eprint = {2605.16134},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.16134},
}
Figure