Improving Federated Learning Personalization via MAML
Abstract
- FL algorithms share many similarities with MAML and can be interpreted through meta-learning algorithms
- Fine-tuning gives the global model stronger accuracy while making personalization easier
- Models trained on standard centralized datasets are harder to personalize than those trained with FedAvg
Introduction
- Points out the connection between FL and MAML, and interprets the FL algorithm via MAML
- Improves FedAvg with a two-stage approach of training and fine-tuning
- Finds that FedAvg is essentially a meta-learning algorithm that optimizes personalization performance rather than the global model.
Interpreting FedAvg as a Meta Learning Algorithm
The figure below shows MAML applied in the FL setting (left), the Reptile algorithm (middle), and FedAvg, the training algorithm of FL (right). Let L be the loss function. In each round of iteration, MAML trains by randomly sampling a batch of tasks T. For each task T there is an inner loop, and the outer loop aggregates the gradient updates obtained from each task. The FL algorithm randomly samples several clients T. For each T and its weight, several rounds of local optimization are performed, and the updated gradients are aggregated into a new global model. If we simplify the setting and assume all clients have the same amount of data, all weights become equal, and Reptile and FedAvg are then effectively the same algorithm.

Assume the weights in FedAvg are equal, denoted wi. Consider T clients, and let the model parameters be . For each client i, the loss function is ; let denote the gradient computed during the local training step.
The gradient update of FedSGD is:
Now let us express FOMAML in the same terms. Assume the client learning rate is ; after K steps, the personalized model of client i obtains the updated parameters
Differentiating gives:
After K gradient updates, the whole model is updated:
To avoid the computational cost of second-order derivatives, FOMAML was introduced: after K gradient updates, it directly uses the (K+1)-th gradient as the local update.
From the formulas above, it is easy to see that the FedAvg update — the average of all clients’ updates — is essentially a linear combination of the two ideas above.
Personalized FedAvg

As shown in the figure above, FedAvg E in Algorithm 1 trains for E local epochs, weighting the gradient updates by the local data volume. Then, in the FL setting, Reptile (K) trains for K local steps, ignoring the local data volume.
Generally speaking, in terms of the number of communication rounds, FedAvg with several local epochs converges quickly within just a few rounds of communication. Due to the complexity of production environments, this metric is used to measure the convergence speed of FL algorithms. This paper finds that using momentum SGD as the server optimizer already benefits the personalized model, whereas the initial model remains relatively unstable. Previous approaches reduced the number of local training epochs or the learning rate.
This paper proposes using Reptile (K) for fine-tuning and then Adam as the server optimizer, which improves the initial model while also stabilizing the personalized model.
To be continued