Gradient Compression May Hurt Generalization: A Remedy by Synthetic Data Guided Sharpness Aware Minimization
Yujie Gu, Richeng Jin, Zhaoyang Zhang, Huaiyu Dai
TL;DR
This work reveals that gradient compression in federated learning can sharpen loss landscapes and degrade generalization under non-IID data. It proposes FedSynSAM, a SAM-based FL method that uses a trajectory-derived synthetic dataset to more accurately estimate the global perturbation, addressing a key limitation of prior SAM-based FL approaches under compression. The authors provide convergence guarantees for unbiased compressors and demonstrate through extensive experiments that FedSynSAM yields superior accuracy and flatter loss landscapes across multiple datasets and compression schemes, with notable robustness to hyperparameters. The approach offers a practical path to improved generalization in bandwidth-constrained, heterogeneous FL settings thanks to trajectory-inspired data synthesis and SAM integration.
Abstract
It is commonly believed that gradient compression in federated learning (FL) enjoys significant improvement in communication efficiency with negligible performance degradation. In this paper, we find that gradient compression induces sharper loss landscapes in federated learning, particularly under non-IID data distributions, which suggests hindered generalization capability. The recently emerging Sharpness Aware Minimization (SAM) effectively searches for a flat minima by incorporating a gradient ascent step (i.e., perturbing the model with gradients) before the celebrated stochastic gradient descent. Nonetheless, the direct application of SAM in FL suffers from inaccurate estimation of the global perturbation due to data heterogeneity. Existing approaches propose to utilize the model update from the previous communication round as a rough estimate. However, its effectiveness is hindered when model update compression is incorporated. In this paper, we propose FedSynSAM, which leverages the global model trajectory to construct synthetic data and facilitates an accurate estimation of the global perturbation. The convergence of the proposed algorithm is established, and extensive experiments are conducted to validate its effectiveness.
