Sharpness-Aware Gradient Matching for Domain Generalization
- URL: http://arxiv.org/abs/2303.10353v1
- Date: Sat, 18 Mar 2023 07:25:12 GMT
- Title: Sharpness-Aware Gradient Matching for Domain Generalization
- Authors: Pengfei Wang, Zhaoxiang Zhang, Zhen Lei, Lei Zhang
- Abstract summary: 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.
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)
Our proposed SAGM method consistently outperforms the state-of-the-art methods on five DG benchmarks.
- Score: 84.14789746460197
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- 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.
Related papers
- Adaptive Adversarial Cross-Entropy Loss for Sharpness-Aware Minimization [2.8775022881551666]
Sharpness-Aware Minimization (SAM) was proposed to enhance model generalization.
SAM consists of two main steps, the weight perturbation step and the weight updating step.
We propose the Adaptive Adversarial Cross-Entropy (AACE) loss function to replace standard cross-entropy loss for SAM's perturbation.
arXiv Detail & Related papers (2024-06-20T14:00:01Z) - Gradient Alignment for Cross-Domain Face Anti-Spoofing [26.517887637150594]
We introduce GAC-FAS, a novel learning objective that encourages the model to converge towards an optimal flat minimum.
Unlike conventional sharpness-aware minimizers, GAC-FAS identifies ascending points for each domain and regulates the generalization gradient updates.
We demonstrate the efficacy of GAC-FAS through rigorous testing on challenging cross-domain FAS datasets.
arXiv Detail & Related papers (2024-02-29T02:57:44Z) - Enhancing Sharpness-Aware Optimization Through Variance Suppression [48.908966673827734]
This work embraces the geometry of the loss function, where neighborhoods of 'flat minima' heighten generalization ability.
It seeks 'flat valleys' by minimizing the maximum loss caused by an adversary perturbing parameters within the neighborhood.
Although critical to account for sharpness of the loss function, such an 'over-friendly adversary' can curtail the outmost level of generalization.
arXiv Detail & Related papers (2023-09-27T13:18:23Z) - Gradient constrained sharpness-aware prompt learning for vision-language
models [99.74832984957025]
This paper targets a novel trade-off problem in generalizable prompt learning for vision-language models (VLM)
By analyzing the loss landscapes of the state-of-the-art method and vanilla Sharpness-aware Minimization (SAM) based method, we conclude that the trade-off performance correlates to both loss value and loss sharpness.
We propose a novel SAM-based method for prompt learning, denoted as Gradient Constrained Sharpness-aware Context Optimization (GCSCoOp)
arXiv Detail & Related papers (2023-09-14T17:13:54Z) - Sharpness-Aware Training for Free [163.1248341911413]
SharpnessAware Minimization (SAM) has shown that minimizing a sharpness measure, which reflects the geometry of the loss landscape, can significantly reduce the generalization error.
Sharpness-Aware Training Free (SAF) mitigates the sharp landscape at almost zero computational cost over the base.
SAF ensures the convergence to a flat minimum with improved capabilities.
arXiv Detail & Related papers (2022-05-27T16:32:43Z) - Improving Generalization in Federated Learning by Seeking Flat Minima [23.937135834522145]
Models trained in federated settings often suffer from degraded performances and fail at generalizing.
In this work, we investigate such behavior through the lens of geometry of the loss and Hessian eigenspectrum.
Motivated by prior studies connecting the sharpness of the loss surface and the generalization gap, we show that i) training clients locally with Sharpness-Aware Minimization (SAM) or its adaptive version (ASAM) on the server-side can substantially improve generalization.
arXiv Detail & Related papers (2022-03-22T16:01:04Z) - Surrogate Gap Minimization Improves Sharpness-Aware Training [52.58252223573646]
Surrogate textbfGap Guided textbfSharpness-textbfAware textbfMinimization (GSAM) is a novel improvement over Sharpness-Aware Minimization (SAM) with negligible computation overhead.
GSAM seeks a region with both small loss (by step 1) and low sharpness (by step 2), giving rise to a model with high generalization capabilities.
arXiv Detail & Related papers (2022-03-15T16:57:59Z) - Learning Invariant Representations and Risks for Semi-supervised Domain
Adaptation [109.73983088432364]
We propose the first method that aims to simultaneously learn invariant representations and risks under the setting of semi-supervised domain adaptation (Semi-DA)
We introduce the LIRR algorithm for jointly textbfLearning textbfInvariant textbfRepresentations and textbfRisks.
arXiv Detail & Related papers (2020-10-09T15:42:35Z) - Sharpness-Aware Minimization for Efficiently Improving Generalization [36.87818971067698]
We introduce a novel, effective procedure for simultaneously minimizing loss value and loss sharpness.
Sharpness-Aware Minimization (SAM) seeks parameters that lie in neighborhoods having uniformly low loss.
We present empirical results showing that SAM improves model generalization across a variety of benchmark datasets.
arXiv Detail & Related papers (2020-10-03T19:02:10Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.