# Federated Optimization: Distributed Machine Learning for On-Device Intelligence

Federated optimization trains one shared model across many unevenly distributed devices

Jakub Konečný, H. Brendan McMahan, Daniel Ramage, Peter Richtárik · arXiv · 2016-10-8

- **Problem** Standard distributed methods assume evenly split, IID data, which fails on user devices. Their data is uneven and non-IID, so these methods converge slowly or diverge.
- **Method** FSVRG adapts SVRG to federated data. Each device runs local variance-reduced steps, and the server averages updates, weighting each coordinate by how many devices hold it.
- **Results** On a Google+ comment-prediction task with 10,000 nodes, FSVRG reached optimal test classification accuracy within 30 iterations. CoCoA+ was worse than distributed gradient descent.

## Why distributed methods struggle here

The setting combines three properties: the data is spread over a very large number of nodes, the examples on each node follow a distribution that differs from the overall one, and the node sizes vary by orders of magnitude.

Much of the distributed learning literature assumes that the data is evenly split and that each machine holds an IID sample, which is close to reality in a data center but not on user devices. The authors note that algorithms built on these assumptions can converge much more slowly or even diverge when the assumptions fail.

The cost that drives the design is communication: moving data between nodes is far more expensive than computing on a node, and a method that communicates after every iteration loses most of its speed. Because local computation is treated as nearly free in this setting, the practical objective becomes minimizing the number of communication rounds.

## Deriving FSVRG from SVRG and DANE

SVRG runs an outer loop that computes the full gradient at a reference point, and an inner loop of stochastic steps. Each inner step corrects a stochastic gradient at the current point with the difference of stochastic gradients at the current and reference points, plus the stored full gradient, which keeps the estimate unbiased while its variance shrinks near the reference point.

DANE takes a different route: each node approximately solves a local subproblem built from its own data, and the local solutions are then averaged. Its iterations can be read as averaged inexact Newton steps, and the method relies on the local Hessians being similar.

Adding a linear term that equals the local full gradient minus the global one to each local objective pushes all nodes to move in a common direction at the start, which is the link to the SVRG correction. Applying this idea yields FSVRG, which at first looks almost identical to SVRG, but it is still unsatisfactory for the general federated setting and needs further adaptation.

## What one FSVRG communication round computes

At the start of a round the global iterate is wt, and the full gradient at wt is computed over all n examples. Each node k sets its local iterate to wt and uses a local stepsize hk = h / nk, where nk is the number of examples on that node.

Each node then visits its own examples once in a random order, and at each step moves its local iterate along the stochastic gradient difference plus the global full gradient, with that correction multiplied elementwise by the diagonal matrix Sk. Sizing the stepsize by nk is meant to give nodes with very different data sizes progress of roughly the same magnitude, instead of making large nodes dominate.

The server forms the new global iterate by adding to wt a weighted sum of the local changes wk minus wt, with weights nk / n, and then multiplies each coordinate of that sum by the diagonal matrix A. The weights nk / n come from an expectation argument: if every node uses one sampled gradient with weight nk / n, the combined direction equals the full gradient in expectation.

## Why scale by feature frequency

The paper's illustration uses 1,000,000 examples on K = 1,000 nodes, where a feature is nonzero in only 1,000 examples, all stored on one node. A gradient sampled from that node then overestimates the full gradient by about a thousand times, and repeated steps of that size would likely make the iteration diverge.

The fix is to multiply local stochastic gradients by Sk, a diagonal matrix whose jth entry is sjk = phi\_j / phi\_jk, the ratio of the global to the local frequency of nonzero values of feature j on node k. Scaling by this ratio pushes the local estimate back toward the magnitude of the global gradient, given that the designer knows the sparsity structure.

The server-side matrix A has entries aj = K / omega\_j, where omega\_j counts the nodes that hold at least one example with a nonzero jth coordinate. A feature present on every node is averaged as usual, while a feature present on few nodes gets a larger weight on those nodes, so the aggregated step is a per-variable interpolation between averaging and fully separable updates.

The authors argue that plain averaging is the only sensible choice for fully dense data, and that when each example depends on only one disjoint group of variables the same scheme would solve the problem in a single iteration.

## The Google+ comment-prediction setup

The dataset is built from public Google+ posts by 10,000 randomly picked authors who each have at least 100 public English posts. The binary task is to predict whether a post receives at least one comment. Data is split chronologically per author, with the earlier 75% used for training and the following 25% for testing.

The training split contains n = 2,166,693 examples. Features come from a bag-of-words model over the 20,000 most frequent words, and two extra features give a bias term and an unknown-word feature, so d = 20,002. Each author is one node, so K = 10,000, with an average of about 216 examples per node and a range from 75 to 9,000.

The model is L2-regularized logistic regression with lambda = 1/n, where lambda was chosen as the value giving the best test error in the optimal solution. The stepsize is the only tuned parameter, selected retrospectively from a set of tried values.

## Trivial predictors as reference points

Always predicting no comment gives a classification error of 33.16%. The optimal solution of the global logistic regression problem gives a test set error of 26.27%. Predicting each author's majority label from training data gives 17.14% test error, which is lower than the global optimum.

The authors read this as evidence that knowing the author carries more information than the text of the post, which they describe as perhaps unsurprising. This points to per-user adaptation as a source of gain, and the authors say the techniques for that are orthogonal to the federated challenges.

## FSVRG against the baselines

The comparison plots the optimal value, distributed gradient descent, CoCoA+, FSVRG and FSVRGR, which applies the same algorithm to randomly reshuffled data with the same unbalanced node sizes. Two plots show primal suboptimality and test classification error against rounds of communication, from 0 to 30.

CoCoA+ performs worse than the distributed gradient descent benchmark on this problem. The authors relate this to the aggregation parameter sigma prime, whose best value for sparse problems can reach the maximum feature-frequency ratio, which is K, and they note this bound is nearly reached in practice.

FSVRG reaches optimal test classification accuracy within 30 iterations. The authors say other communication-efficient algorithms fail to converge at all in this setting, and they caution that the result does not make FSVRG stunningly superior, since none of the existing methods were designed for these challenges.

FSVRGR, with randomly reshuffled data, converges only subtly differently from FSVRG, which the authors take as evidence that the techniques of the method handle the non-IID structure.

## Limitations

The experiments are described as a preliminary study on one dataset.

Requiring an exact local solution is often impractical, and a variant that relaxed the local objective gave results that were significantly inferior to the reported FSVRG results.

The personalized-model experiment was not run, so the link between per-user adaptation and distance from IID remains a remark. The method is not studied for non-convex objectives such as neural networks, and asynchronous versions were left as future work. The node definition is a modelling choice, with each user as one node.

## Paper info

- **Authors**: Jakub Konečný, H. Brendan McMahan, Daniel Ramage, Peter Richtárik
- **Venue**: arXiv · Preprint
- **First published**: 2016-10-8
- **Added**: 2026-11-12
- **Updated**: 2016-10-8
- **Version**: v1
- **arXiv**: 1610.02527
- **Category**: cs.LG
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1610.02527v1) · [PDF ↗](https://arxiv.org/pdf/1610.02527v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Jakub Konečný, H. Brendan McMahan, Daniel Ramage, Peter Richtárik (2016). Federated Optimization: Distributed Machine Learning for On-Device Intelligence. arXiv:1610.02527v1. https://arxiv.org/abs/1610.02527v1

**BibTeX**

```
@misc{konen2016federated,
  title = {{Federated Optimization: Distributed Machine Learning for On-Device Intelligence}},
  author = {Jakub Konečný and H. Brendan McMahan and Daniel Ramage and Peter Richtárik},
  year = {2016},
  eprint = {1610.02527},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1610.02527v1}
}
```

## Other paper commentary

- [Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs](https://refivu.com/en/papers/2f0fda58-62a6-4d7b-8db1-4bdf80289483-efficient-and-robust-approximate-nearest-neighbor-search.md)
- [Channel Pruning for Accelerating Very Deep Neural Networks](https://refivu.com/en/papers/e9bb1323-d15c-464e-b220-b00a94be3b6d-channel-pruning-for-accelerating-very-deep-neural-networks.md)
- [Towards Federated Learning at Scale: System Design](https://refivu.com/en/papers/5a416c7f-9637-4efb-9bcc-4ff43e95b3bd-towards-federated-learning-at-scale-system-design.md)
- [Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials](https://refivu.com/en/papers/bfc0169f-9d85-4375-8194-0b11713c1836-efficient-inference-in-fully-connected-crfs-with-gaussian.md)
- [Direct Sparse Odometry](https://refivu.com/en/papers/05fea2ab-dd17-4852-b079-020caac4ff45-direct-sparse-odometry.md)
- [Sparse Subspace Clustering: Algorithm, Theory, and Applications](https://refivu.com/en/papers/cf801d50-c51a-4e90-bfdb-a39a2831b982-sparse-subspace-clustering-algorithm-theory-and-applications.md)
- [The Ethics of AI Ethics -- An Evaluation of Guidelines](https://refivu.com/en/papers/36e5de78-c499-4b96-ba0a-9d2daff8bde8-the-ethics-of-ai-ethics-an-evaluation-of.md)
- [Temporal Ensembling for Semi-Supervised Learning](https://refivu.com/en/papers/5823cdfc-4033-4589-9f86-a6c88d27f620-temporal-ensembling-for-semi-supervised-learning.md)
- [Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks](https://refivu.com/en/papers/2ced2044-9976-4c74-bbf8-ff344f253f42-modeling-long-and-short-term-temporal-patterns-with.md)
- [Tutorial on Variational Autoencoders](https://refivu.com/en/papers/51a9cfc2-6285-4935-b55a-3d6450af8eff-tutorial-on-variational-autoencoders.md)
- [VoxCeleb: a large-scale speaker identification dataset](https://refivu.com/en/papers/4f6bddda-2d26-4b56-93a3-d11745f2af0d-voxceleb-a-large-scale-speaker-identification-dataset.md)
- [AffectNet: A Database for Facial Expression, Valence, and Arousal Computing in the Wild](https://refivu.com/en/papers/93b39bb6-a5c2-45b8-8cd8-f4785271bb90-affectnet-a-database-for-facial-expression-valence-and.md)

## Terms in this paper

- [gradient descent](https://refivu.com/en/terms/7557852c745c-gradient-descent)
- [Federated Learning](https://refivu.com/en/terms/c6fc55e6f812-federated-learning)
- [non-IID](https://refivu.com/en/terms/83ef54c01151-non-iid)
- [DisCo](https://refivu.com/en/terms/e718b3404def-disco)
- [federated optimization](https://refivu.com/en/terms/3c456b4c0ae0-federated-optimization)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/5f4eb215-ecfd-414d-aaa9-bd382c3c7b54-federated-optimization-distributed-machine-learning-for-on)
