GCSAM: Gradient Centralized Sharpness Aware Minimization

Mohamed Hassan, Aleksandar Vakanski, Boyu Zhang, Min Xian
1/20/2025
cs.LG

No official code found. Best implementation: mhassann22/GCSAM (4 stars, last commit 2025-09-09).

Abstract

The generalization performance of deep neural networks (DNNs) is a critical factor in achieving robust model behavior on unseen data. Recent studies have highlighted the importance of sharpness-based measures in promoting generalization by encouraging convergence to flatter minima. Among these approaches, Sharpness-Aware Minimization (SAM) has emerged as an effective optimization technique for reducing the sharpness of the loss landscape, thereby improving generalization. However, SAM's computational overhead and sensitivity to noisy gradients limit its scalability and efficiency. To address these challenges, we propose Gradient-Centralized Sharpness-Aware Minimization (GCSAM), which incorporates Gradient Centralization (GC) to stabilize gradients and accelerate convergence. GCSAM normalizes gradients before the ascent step, reducing noise and variance, and improving stability during training. Our evaluations indicate that GCSAM consistently outperforms SAM and the Adam optimizer in terms of generalization and computational efficiency. These findings demonstrate GCSAM's effectiveness across diverse domains, including general and medical imaging tasks.

View on arXivView PDF

Code Implementations(1)

mhassann22/GCSAMCommunity100%
41PythonJan 26, 20251 years ago

Similar Papers

Cite this paper

@article{hassan2025gcsam,
  title  = {GCSAM: Gradient Centralized Sharpness Aware Minimization},
  author = {Mohamed Hassan and Aleksandar Vakanski and Boyu Zhang and Min Xian},
  year   = {2025},
  eprint = {2501.11584},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.11584v2}
}

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

Discussion