NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sharpness-Aware Minimization for Generalized Embedding Learning in Federated Recommendation

Fengyuan Yu, Xiaohua Feng, Yuyuan Li, Changwang Zhang, Jun Wang, Chaochao ChenarXiv 2026

TL;DR

Federated recommendation systems often suffer from poor generalization because individual user data is highly sparse and varied. This paper introduces FedRecGEL, a framework that reformulates federated recommendation as an item-centered multi-task learning problem and applies Sharpness-Aware Minimization (SAM) hierarchically to both local and global parameters. This forces the model to find flatter minima in the loss landscape, significantly boosting recommendation accuracy and stability across diverse datasets.

What Problem Does This Paper Address?

Federated recommender systems (FedRec) allow collaborative model training without centralizing sensitive user interaction data. In a typical cross-device setting, each user acts as a decentralized client holding their own local data.

However, two major hurdles plague this setup: data heterogeneity (users have wildly different preferences) and data sparsity (each user only interacts with a tiny fraction of the total item catalog).

While prior work has tried to fix this by clustering similar users or focusing heavily on local personalization, they overlook a foundational element: the stable learning of a generalized item embedding. Because item embeddings are shared globally, they act as the primary vehicle for transferring knowledge between clients. If these embeddings fail to generalize well across diverse local user distributions, the entire collaborative training process degrades.

Methods

To ensure item embeddings generalize robustly, the authors introduce FedRecGEL (Federated Recommendation with Generalized Embedding Learning), which leverages two key innovations:

  1. Item-Centered Multi-Task Reformulation: Instead of the traditional user-centric view, the authors flip the perspective. Learning the embedding for a specific item is treated as a multi-task learning problem, where predicting whether a given user will interact with that item constitutes a distinct task.
  2. Hierarchical Sharpness-Aware Minimization (SAM): SAM is an optimization technique that minimizes both the loss value and the sharpness of the loss landscape, guiding models toward flatter minima that inherently generalize better to unseen data. The authors mathematically extend SAM to a hierarchical architecture, decoupling the parameter updates into:
  3. Shared Parameters ($\theta_{co}$): Global item embeddings and score functions aggregated by the server.
  4. Private Parameters ($\theta_{ur}$): User embeddings that remain strictly local to ensure privacy.

During local training, clients calculate worst-case adversarial perturbations for both private and shared parameters, optimizing the model to remain robust even under localized data shifts.

Datasets

The framework was evaluated on four distinct, real-world recommendation datasets adapted for federated scenarios:

  • FilmTrust: A small movie recommendation dataset (1,227 users, 2,059 items).
  • Lastfm-2K: A music dataset detailing artist listening frequencies (1,600 users, 12,454 items).
  • Amazon-Video: Product reviews and metadata from Amazon (8,072 users, 11,830 items).
  • QB-article: A large dataset recording user click behaviors on articles, featuring a very high user-to-item ratio (24,516 users, 7,355 items).

Key Insights and Ideas

  • Flatter Landscapes Equal Better Recommendations: The core thesis is visually proven through loss landscape mapping. Standard federated learning methods (like FedNCF) often converge to sharp ridges or volatile valleys. FedRecGEL successfully smooths the loss surface, dropping the model into broad, flat basins that yield superior test-time generalization.
  • The Item-Centric Advantage: Flipping the problem from user-centric to item-centric makes it theoretically possible to apply Gaussian-perturbed PAC-Bayes generalization bounds, bridging the gap between minimizing empirical training loss and minimizing true distribution loss.
  • Shared Parameters Matter Most: Ablation studies revealed that while applying SAM to both user and item parameters is ideal, applying it to the shared global parameters (item embeddings) is far more critical. This highlights that the main bottleneck in federated recommendation isn't local personalization, but rather how effectively global knowledge is transferred.

Key Results

FedRecGEL consistently outperformed state-of-the-art federated recommendation baselines (including FedNCF, PFedRec, and FedRAP) across all datasets in terms of Hit Ratio (HR@K) and Normalized Discounted Cumulative Gain (NDCG@K).

Notably, its performance advantage scales with the user-item ratio. On the highly challenging QB-article dataset—which features the highest user-to-item ratio—FedRecGEL achieved a massive improvement, boosting HR@10 by over 50% compared to standard baselines.

The visual impact of the hierarchical SAM optimization can be clearly seen in the post-convergence loss landscapes:

Figure 1: 3D surface plots of the post-convergence landscapes for models trained with FedRecGEL and with FedNCF.

Limitations and Future Work

To keep the framework computationally efficient and practical for cross-device deployment, the authors utilized a straightforward FedAvg-style weighted average during the global server aggregation phase. They note that exploring more sophisticated gradient aggregation strategies specifically tailored for multi-task SAM could further stabilize training. Additionally, extending this item-centered multi-task formulation to more complex architectures, such as federated graph neural networks (GNNs), remains an open avenue for future research.

Summary updated

BibTeX
@misc{yu2026sharpness,
  author = {Fengyuan Yu and Xiaohua Feng and Yuyuan Li and Changwang Zhang and Jun Wang and Chaochao Chen},
  title = {{Sharpness-Aware Minimization for Generalized Embedding Learning in Federated Recommendation}},
  year = {2026},
  eprint = {2603.11503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.11503},
}
Figure