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.
- 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.
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