FedNSAM:Consistency of Local and Global Flatness for Federated Learning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Junkang, Shang, Fanhua, Tian, Yuxuan, Liu, Hongying, Liu, Yuanyuan
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915942778273792
author Liu, Junkang
Shang, Fanhua
Tian, Yuxuan
Liu, Hongying
Liu, Yuanyuan
author_facet Liu, Junkang
Shang, Fanhua
Tian, Yuxuan
Liu, Hongying
Liu, Yuanyuan
contents In federated learning (FL), multi-step local updates and data heterogeneity usually lead to sharper global minima, which degrades the performance of the global model. Popular FL algorithms integrate sharpness-aware minimization (SAM) into local training to address this issue. However, in the high data heterogeneity setting, the flatness in local training does not imply the flatness of the global model. Therefore, minimizing the sharpness of the local loss surfaces on the client data does not enable the effectiveness of SAM in FL to improve the generalization ability of the global model. We define the \textbf{flatness distance} to explain this phenomenon. By rethinking the SAM in FL and theoretically analyzing the \textbf{flatness distance}, we propose a novel \textbf{FedNSAM} algorithm that accelerates the SAM algorithm by introducing global Nesterov momentum into the local update to harmonize the consistency of global and local flatness. \textbf{FedNSAM} uses the global Nesterov momentum as the direction of local estimation of client global perturbations and extrapolation. Theoretically, we prove a tighter convergence bound than FedSAM by Nesterov extrapolation. Empirically, we conduct comprehensive experiments on CNN and Transformer models to verify the superior performance and efficiency of \textbf{FedNSAM}. The code is available at https://github.com/junkangLiu0/FedNSAM.
format Preprint
id arxiv_https___arxiv_org_abs_2602_23827
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle FedNSAM:Consistency of Local and Global Flatness for Federated Learning
Liu, Junkang
Shang, Fanhua
Tian, Yuxuan
Liu, Hongying
Liu, Yuanyuan
Machine Learning
Artificial Intelligence
In federated learning (FL), multi-step local updates and data heterogeneity usually lead to sharper global minima, which degrades the performance of the global model. Popular FL algorithms integrate sharpness-aware minimization (SAM) into local training to address this issue. However, in the high data heterogeneity setting, the flatness in local training does not imply the flatness of the global model. Therefore, minimizing the sharpness of the local loss surfaces on the client data does not enable the effectiveness of SAM in FL to improve the generalization ability of the global model. We define the \textbf{flatness distance} to explain this phenomenon. By rethinking the SAM in FL and theoretically analyzing the \textbf{flatness distance}, we propose a novel \textbf{FedNSAM} algorithm that accelerates the SAM algorithm by introducing global Nesterov momentum into the local update to harmonize the consistency of global and local flatness. \textbf{FedNSAM} uses the global Nesterov momentum as the direction of local estimation of client global perturbations and extrapolation. Theoretically, we prove a tighter convergence bound than FedSAM by Nesterov extrapolation. Empirically, we conduct comprehensive experiments on CNN and Transformer models to verify the superior performance and efficiency of \textbf{FedNSAM}. The code is available at https://github.com/junkangLiu0/FedNSAM.
title FedNSAM:Consistency of Local and Global Flatness for Federated Learning
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2602.23827