Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts

Ruipeng Zhang, Ziqing Fan, Jiangchao Yao, Ya Zhang, Yanfeng Wang
2/12/2026

No official code found. Best implementation: MediaBrain-SJTU/DISAM (9 stars, last commit 2024-04-26).

Abstract

This paper presents a Domain-Inspired Sharpness-Aware Minimization (DISAM) algorithm for optimization under domain shifts. It is motivated by the inconsistent convergence degree of SAM across different domains, which induces optimization bias towards certain domains and thus impairs the overall convergence. To address this issue, we consider the domain-level convergence consistency in the sharpness estimation to prevent the overwhelming (deficient) perturbations for less (well) optimized domains. Specifically, DISAM introduces the constraint of minimizing variance in the domain loss, which allows the elastic gradient calibration in perturbation generation: when one domain is optimized above the averaging level \textit{w.r.t.} loss, the gradient perturbation towards that domain will be weakened automatically, and vice versa. Under this mechanism, we theoretically show that DISAM can achieve faster overall convergence and improved generalization in principle when inconsistent convergence emerges. Extensive experiments on various domain generalization benchmarks show the superiority of DISAM over a range of state-of-the-art methods. Furthermore, we show the superior efficiency of DISAM in parameter-efficient fine-tuning combined with the pretraining models. The source code is released at https://github.com/MediaBrain-SJTU/DISAM.

View on arXivView PDF

Code Implementations(1)

This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the ICLR 2024.

90PythonNov 14, 20232 years ago

Similar Papers

Cite this paper

@article{zhang2026domaininspired,
  title  = {Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts},
  author = {Ruipeng Zhang and Ziqing Fan and Jiangchao Yao and Ya Zhang and Yanfeng Wang},
  year   = {2026},
  eprint = {2405.18861},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2405.18861},
  journal = {ICLR 2024 2024}
}

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/2405.18861.svg)](https://codeofpaper.com/paper/2405.18861)

Discussion