Reproduce “Sharpness-Aware Gradient Matching for Domain Generalization” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Pengfei Wang, Zhaoxiang Zhang, Zhen Lei, Lei Zhang

Sharpness-Aware Gradient Matching (SAGM) introduces an optimization technique that resolves conflicts in existing sharpness-aware methods by simultaneously minimizing empirical risk and perturbed loss while aligning their gradients. It achieves an average accuracy of 66.1% across five standard domain generalization benchmarks, consistently outperforming previous state-of-the-art approaches and finding flatter loss minima.

Key insights

  • Existing sharpness-aware methods like SAM insufficiently characterize sharpness, while GSAM introduces conflicting optimization objectives that can increase empirical loss on source domains.
  • Effective domain generalization requires simultaneously achieving low empirical loss and residing in a flat minimum of the loss landscape.
  • Aligning the gradients of the empirical loss and the perturbed loss is crucial for consistently minimizing the surrogate gap (a true measure of sharpness) without compromising performance on source data.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.