Sharpness-Aware Gradient Matching for Domain Generalization
Pengfei Wang, Zhaoxiang Zhang, Zhen Lei, Lei Zhang
Abstract
The goal of domain generalization (DG) is to enhance the generalization capability of the model learned from a source domain to other unseen domains. The recently developed Sharpness-Aware Minimization (SAM) method aims to achieve this goal by minimizing the sharpness measure of the loss landscape. Though SAM and its variants have demonstrated impressive DG performance, they may not always converge to the desired flat region with a small loss value. In this paper, we present two conditions to ensure that the model could converge to a flat minimum with a small loss, and present an algorithm, named Sharpness-Aware Gradient Matching (SAGM), to meet the two conditions for improving model generalization capability. Specifically, the optimization objective of SAGM will simultaneously minimize the empirical risk, the perturbed loss (i.e., the maximum loss within a neighborhood in the parameter space), and the gap between them. By implicitly aligning the gradient directions between the empirical risk and the perturbed loss, SAGM improves the generalization capability over SAM and its variants without increasing the computational cost. Extensive experimental results show that our proposed SAGM method consistently outperforms the state-of-the-art methods on five DG benchmarks, including PACS, VLCS, OfficeHome, TerraIncognita, and DomainNet. Codes are available at https://github.com/Wang- pengfei/SAGM .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f7498b2f-1c8a-403f-a026-226c9242378eCited by top-tier papers71
- FlatMatch: Bridging Labeled Data and Unlabeled Data with Cross-Sharpness for Semi-Supervised LearningZhuo Huang, Li Shen, Jun Yu, Bo Han et al.NeurIPS 2023 · 50 citations
- Enhancing Sharpness-Aware Optimization Through Variance SuppressionBingcong Li, Georgios B. GiannakisNeurIPS 2023 · 47 citations
- CLIPCEIL: Domain Generalization through CLIP via Channel rEfinement and Image-text aLignmentXi Yu, Shinjae Yoo, Yuewei LinNeurIPS 2024 · 36 citations
- Locally Estimated Global Perturbations are Better than Local Perturbations for Federated Sharpness-aware MinimizationZiqing Fan, Shengchao Hu, Jiangchao Yao, Gang Niu et al.ICML 2024 · 35 citations
- GeneOH Diffusion: Towards Generalizable Hand-Object Interaction Denoising via Denoising DiffusionXueyi Liu, Li YiICLR 2024 · 35 citations
Builds on21
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh et al.ICCV 2019 · 5,843 citations
- Moment Matching for Multi-Source Domain AdaptationXingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang et al.ICCV 2019 · 2,239 citations
- Sharpness-aware Minimization for Efficiently Improving GeneralizationPierre Foret, Ariel Kleiner, Hossein Mobahi, Behnam NeyshaburICLR 2021 · 1,861 citations
- Distributionally Robust Neural NetworksShiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy LiangICLR 2020 · 1,578 citations
Related papers
- Unknown Domain Inconsistency Minimization for Domain GeneralizationSeungjae Shin, HeeSun Bae, Byeonghu Na, Yoon-Yeong Kim et al.ICLR 2024 · 10 citations
- Navigating the Flatlands: Dual Adaptive Sharpness-Aware Minimization for Domain GeneralizationJunwen He, Yang He, Lebing Zheng, Zirui Yin et al.ICML 2026
- SWAD: Domain Generalization by Seeking Flat MinimaJunbum Cha, Sanghyuk Chun, Kyungjae Lee, Han-Cheol Cho et al.NeurIPS 2021 · 630 citations
- Domain-Inspired Sharpness-Aware Minimization Under Domain ShiftsRuipeng Zhang, Ziqing Fan, Jiangchao Yao, Ya Zhang et al.ICLR 2024 · 12 citations
- Cross-modal Representation Flattening for Multi-modal Domain GeneralizationYunfeng Fan, Wenchao Xu, Haozhao Wang, Song GuoNeurIPS 2024 · 21 citations
