Skip to main content
Back

City University of Hong Kong's FedFew Beats 9 Federated Learning Baselines With 3 Models

FedFew trains just K shared models to serve M clients in personalized federated learning, hitting near-optimal accuracy with only 3 models across vision, NLP and medical benchmarks.

Pro

  • FedFew reformulates personalized federated learning as a few-for-many problem, maintaining K shared models to serve M clients where K is much smaller than M.
  • The method uses two-level log-sum-exp smoothing on a Tchebycheff set scalarization to make discrete model selection differentiable and gradient-trainable.
  • Theoretical analysis proves error decomposes into a Pareto coverage gap (vanishes as K grows) and statistical error (vanishes with more data per client).
  • With only K=3 models, FedFew beats nine baselines including IFCA, FedRep, and Ditto across CIFAR-10/100, TinyImageNet, AG News, FEMNIST, Kvasir and FedISIC2019.
  • Communication overhead is a modest K-times factor, and local epochs can be raised to 16 for 16x fewer communication rounds without hurting accuracy.
  • Code is available at github.com/pgg3/FedFew with the full paper on arXiv.

Personalized federated learning has a scaling problem. If you have a thousand hospitals with wildly different patient populations, the theoretically optimal setup is a thousand tailored models. That is not going to happen in production. A new paper from City University of Hong Kong and collaborators proposes a middle path called FedFew: keep only K shared models on the server (K much smaller than M), let each client pick the one that fits best, and let gradient descent figure out the rest.

The heterogeneity tax

Standard federated learning trains one global model by averaging updates across clients. That works when everyone's data looks similar, but real-world federated problems often exhibit significant data heterogeneity across clients, which leads to degraded performance and slow convergence. Personalized federated learning (PFL) tries to fix this, but existing approaches lean on heuristics: hard clustering, model interpolation with hand-tuned weights, or maintaining a separate model per client.

The authors frame PFL formally as a multi-objective optimization problem, where each client is its own objective and no single model can minimize all of them at once. The catch is combinatorial. Achieving epsilon-accuracy on the full Pareto front requires an exponential number of models in M, so even with 10 clients and epsilon = 0.01 you would need 10^18 models. Clearly not tractable.

Diagram comparing centralized FL, per-client PFL, and the K-for-M framework with multiple server models

Few models, many clients

The reformulation is deliberately pragmatic. Instead of chasing M personalized models, the server maintains K models where K is much smaller than M, and each client selects the model that minimizes its local loss. The paper proves this framework has two error terms that both vanish under reasonable conditions: a Pareto coverage gap that shrinks as K grows, and a statistical error that shrinks as each client accumulates more data. When K equals M, the coverage gap disappears entirely.

The trick is making this differentiable. Selecting the best model out of K is a discrete operation, and nesting a min inside a max (the Tchebycheff scalarization used for Pareto optimization) gives you a non-smooth objective that gradient descent cannot touch. FedFew applies two-level log-sum-exp smoothing to both operators, turning hard selection into soft weights controlled by a temperature parameter mu. As mu approaches zero, the inner weights collapse to one-hot assignments and the method behaves like hard clustering (essentially recovering IFCA). At larger mu, clients softly blend across models during training.

How a training round actually runs

  • The server broadcasts all K models to every client.
  • Each client computes gradients and losses for all K models on its local data.
  • Clients send K gradients plus K scalar losses back to the server.
  • The server computes two sets of weights: an outer weight that up-weights clients performing badly across the whole set (a hard-example mining effect), and an inner weight that softly assigns each client to its best-matching model.
  • The server updates all K models using the weighted gradient aggregation.
  • After training, each client evaluates all K models locally and picks the one with the lowest loss.

Per-round communication is O(Kd) per client where d is model size. With K fixed at 3, that is a modest constant overhead, and the authors show you can push local epochs up to 16 and cut communication rounds by the same factor without hurting accuracy.

Three models, seven datasets

FedFew was benchmarked against nine baselines including FedAvg, FedProx, Ditto, FedRep, APFL, FedAMP, FedMTL and IFCA across CIFAR-10, CIFAR-100, TinyImageNet, AG News, FEMNIST, plus two real medical datasets: Kvasir gastrointestinal endoscopy images across 8 classes partitioned among 5 clients, and FedISIC2019 skin lesion classification with 8 categories from 6 different medical centers with distinct imaging equipment and demographics.

Using only K=3 models, FedFew ranked first or second everywhere. On CIFAR-100 with 20 clients under practical heterogeneity, it hit 53.69% accuracy, surpassing the best baseline by 7.02%. On TinyImageNet it improved over FedRep by 3.07%. On FedISIC, the worst-case client accuracy jumped by 13 points over local-only training, which matters more than mean accuracy when you are the small rural clinic in the federation.

Where the caveats live

An interesting sensitivity finding: on CIFAR-10, the single-model configuration K=1 actually attained the highest accuracy at 91.3%. The authors attribute this to two things: CIFAR-10 comes from a single underlying distribution so heterogeneity is limited, and larger K expands the parameter space so convergence slows within a fixed training budget. Optimal K is dataset-dependent, with Kvasir peaking at K=3 and AG News at K=5 in ablations.

Training compute scales roughly K-fold because clients evaluate all K models each round, though inference cost is unchanged since each client uses only its selected model. Server storage drops by a factor of M/K compared to full per-client personalization. The code is available on GitHub alongside the full paper on arXiv with proofs of the convergence bounds and Pareto stationarity guarantees.