X-SAM: Boosting Sharpness-Aware Minimization with Dominant-Eigenvector Gradient Correction

Hongru Duan, Yongle Chen, Lei Guan
1/15/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Sharpness-Aware Minimization (SAM) aims to improve generalization by minimizing a worst-case perturbed loss over a small neighborhood of model parameters. However, during training, its optimization behavior does not always align with theoretical expectations, since both sharp and flat regions may yield a small perturbed loss. In such cases, the gradient may still point toward sharp regions, failing to achieve the intended effect of SAM. To address this issue, we investigate SAM from a spectral and geometric perspective: specifically, we utilize the angle between the gradient and the leading eigenvector of the Hessian as a measure of sharpness. Our analysis illustrates that when this angle is less than or equal to ninety degrees, the effect of SAM's sharpness regularization can be weakened. Furthermore, we propose an explicit eigenvector-aligned SAM (X-SAM), which corrects the gradient via orthogonal decomposition along the top eigenvector, enabling more direct and efficient regularization of the Hessian's maximum eigenvalue. We prove X-SAM's convergence and superior generalization, with extensive experimental evaluations confirming both theoretical and practical advantages.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{duan2026xsam,
  title  = {X-SAM: Boosting Sharpness-Aware Minimization with Dominant-Eigenvector Gradient Correction},
  author = {Hongru Duan and Yongle Chen and Lei Guan},
  year   = {2026},
  eprint = {2601.10251},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.10251v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.10251.svg)](https://codeofpaper.com/paper/2601.10251)

Discussion