Zhejiang University's FedRecGEL Boosts On-Device Recommendations by 50% Without Sharing User Data
A new federated recommendation framework applies sharpness-aware minimization to fix unstable item embeddings, delivering up to 50 percent gains on large user bases.
ProTakeaways
- FedRecGEL targets the stability of item embeddings in federated recommenders, a gap prior clustering and personalization work missed.
- The problem is reformulated as multi-task learning across items, with per-item prediction tasks over users.
- PAC-Bayes analysis links the general loss to a worst-case perturbation objective, motivating sharpness-aware minimization.
- SAM is applied separately to shared item embeddings and private user embeddings during local training and aggregation.
- Beats seven baselines on four datasets, with HR@10 gains above 50 percent on QB-article.
- Code is released at github.com/anonymifish/FedRecGEL under GPL-3.0.
Federated recommenders promise to keep user click history on-device while still learning a shared model, but they have a persistent weakness: the item embeddings that are supposed to carry knowledge between clients tend to be unstable and poorly generalized. A team from Zhejiang University, Hangzhou Dianzi University, and OPPO Research Institute has proposed FedRecGEL, a framework that reframes the problem as multi-task learning and uses sharpness-aware minimization to stabilize training. On four public datasets it outperforms seven strong baselines, and on the largest one the improvement in Hit Ratio exceeds 50 percent.
Why item embeddings keep breaking
In a federated recommender, each user is treated as a client that holds their interaction data locally and only shares essential model parameters with a central server for collaborative training. The item embedding table is the piece that actually moves between clients, so it has to describe items well enough for everyone.
That is harder than it sounds. In the cross-device setting, local data distributions exhibit significant heterogeneity and sparsity, with only a small subset of items participating in local training, which exacerbates the difficulty of learning generalized embeddings. Prior work has attacked this in two ways: clustering similar users based on user or item embeddings and training within each cluster to reduce distributional differences, or training personalized models per client through local fine-tuning or fusion of global and local models. Neither line directly targets the generalization of the shared item embedding itself.
An item-centered reformulation
The authors flip the usual formulation. Instead of one loss per user, they treat every item as inducing a set of prediction tasks (one per user that could interact with it) and cast the whole federated problem as multi-task learning. That framing makes it obvious that a good item embedding must minimize a general loss across many tasks, not just fit each client's empirical data.
Through a PAC-Bayes style analysis, they show that minimizing this general loss can be upper-bounded by a worst-case perturbation objective, which is exactly the shape of sharpness-aware minimization (SAM). SAM, originally from Foret et al., looks for parameters where the loss stays low even under a small adversarial nudge, pushing the optimizer toward flatter minima that tend to generalize better. In plain terms: instead of finding a point where the loss is small, you find a neighborhood where the loss is small everywhere.
How FedRecGEL actually trains
The model is split into a shared block (item embeddings and the score function) that is aggregated on the server, and a private block (the user embedding) that stays on device. SAM is applied to both, with two separate perturbation radii.
- On each selected client, sample negatives at a 1:4 ratio against positives.
- Compute a worst-case perturbation for the local user embedding, take a SAM gradient, and update the user vector locally.
- Compute a worst-case perturbation for the shared parameters and produce a SAM gradient for them.
- The server averages these shared gradients FedAvg-style and updates the global item table.
The two radii, rho_ur for the user side and rho_co for the shared side, are the main knobs. Empirical results indicate that the optimal hyperparameter typically falls within the range of 0.02 to 0.2, thereby reducing the complexity of the hyperparameter search process.
The numbers
Experiments span FilmTrust, Lastfm-2K, Amazon-Video, and QB-article, ranging from about 1.2K to 24.5K users, all with sparsity above 98 percent. Baselines include FedNCF, FedMF, PerFedRec, PFedRec, FedRAP, CoFedRec, and GPFedRec. FedRecGEL wins or ties on nearly every HR@K and NDCG@K, and the gap widens as the user-to-item ratio grows. On QB-article, the dataset with the largest user-item ratio, the improvement in HR@10 exceeds 50 percent, and even on Lastfm-2K, the dataset with the smallest user-item ratio, FedRecGEL remains comparable to the best baseline.
An ablation confirms that both SAM branches matter, but the shared-parameter SAM is doing the heavy lifting. That is consistent with the paper's thesis: the cross-client generalization problem lives in the shared item table.
Loss-landscape visualizations back this up. On FilmTrust, the average loss stays around 0.22 at a perturbation magnitude of 0.1 but jumps to roughly 2e19 at magnitude 1, highlighting how sharp the FedNCF landscape is compared to the flat basin FedRecGEL settles into.
When to reach for it, and when not to
FedRecGEL looks most useful in realistic cross-device settings where each user has very little data and there are many more users than items. That is where sparsity and heterogeneity punish naive averaging the hardest, and where SAM's flat-minima behavior pays off. If your dataset has abundant per-user interactions and a low user-item ratio, a strictly personalized method like PFedRec can still be competitive.
Two limitations are worth flagging. First, SAM roughly doubles the per-step compute because it requires an extra forward-backward pass to find the perturbation, which matters on edge devices. Second, the authors adopted a simple FedAvg-style aggregation scheme in the global aggregation phase for computational efficiency, and leave alternative aggregation strategies to future work.
Code is available at the FedRecGEL GitHub repository, under GPL-3.0, with dataset preprocessing scripts included. The paper is slated for WWW 2026.