FedMix: Approximation of Mixup under Mean Augmented Federated Learning

Tehrim Yoon, Sumin Shin, Sung Ju Hwang, Eunho Yang

The Challenge of Data Heterogeneity in Federated Learning

Federated Learning (FL) allows multiple clients—such as mobile phones or hospitals—to train a shared machine learning model without ever exchanging their raw, private data. While powerful for preserving privacy, FL has a major Achilles' heel: data heterogeneity (non-iid data).

In the real world, data distributions differ wildly between clients. One user might only take photos of cats, while another only takes photos of landscapes. When this happens, standard algorithms like FedAvg struggle to converge, often leading to "client drift" where local updates pull the global model in conflicting directions.

In centralized learning, a technique called Mixup—which creates synthetic training examples by linearly interpolating between pairs of images and labels—is a go-to for improving generalization. However, performing Mixup between two different clients in FL requires sharing private, raw data, which defeats the framework's core purpose.

To bridge this gap, researchers introduce FedMix, a privacy-preserving way to apply Mixup to FL. By sharing only averaged data and using a clever Taylor expansion to approximate global data distributions, FedMix significantly boosts model accuracy and convergence speed in challenging non-iid environments.

Methods: Mean Augmentation and FedMix

The authors propose a two-part solution to enable cross-client Mixup without exposing raw data:

  1. Mean Augmented Federated Learning (MAFL): Instead of sending raw data points, clients share "mashed" or averaged versions of their local data batches with the server. For instance, rather than sending a specific image of a "3," a client sends the average of many images. This provides a "soft" representation of the client's data distribution while maintaining a layer of privacy.
  2. FedMix Algorithm: A naive approach (NaiveMix) would simply mix local data with these received averages. FedMix goes a step further by using a first-order Taylor expansion to approximate the loss function of "Global Mixup" (mixing with raw external data).
Comparison of Mixup strategies in Federated Learning, illustrating how FedMix approximates Global Mixup using averaged images and gradients.

Mathematically, the complex loss of mixing with private external data can be approximated using only the averaged external data and the gradient of the loss with respect to the input. This allows a client to "simulate" the effect of having access to everyone else's raw data batches.

Key Insights

  • The "Mean" as a Privacy-Utility Sweet Spot: Sharing the mean of $M$ samples is significantly more private than sharing raw data. Even with a relatively small $M$, the averaged data retains enough distributional information to act as a powerful regularizer.
  • Approximation over Interaction: The most elegant insight is that actual external data points aren't needed to get the benefits of Mixup. By using the model's own input derivatives, FedMix extrapolates how the model would behave if it were seeing those external points.
  • Communication Efficiency: While sharing averaged data adds overhead, input data (like a 32x32 image) is usually orders of magnitude smaller than model parameters (millions of weights). Thus, the extra communication cost is negligible.

Experimental Results

The researchers evaluated FedMix on standard benchmarks configured to be highly non-iid, including FEMNIST (partitioned by writer), CIFAR-10, and CIFAR-100 (partitioned by class).

FedMix consistently outperformed standard baselines like FedAvg and FedProx across all tested scenarios:

  • Accuracy Boost: On CIFAR-10 in a highly non-iid setting, FedMix achieved 81.2% accuracy, compared to 73.8% for FedAvg and 77.3% for FedProx.
  • Faster Convergence: FedMix reached target accuracy levels much faster. On CIFAR-100, it reached the target in 34 rounds, whereas FedAvg took 101 rounds.
  • Robustness: FedMix showed a much smaller drop in performance as the data became more heterogeneous (fewer classes per client), proving its effectiveness for real-world, "messy" data distributions.
Performance of FedMix compared to baselines across FEMNIST, CIFAR-10, and CIFAR-100 datasets, demonstrating superior test accuracy and convergence.

Limitations and Future Work

While highly effective, FedMix has a few limitations. First, averaged data isn't perfectly private; sophisticated "model inversion" attacks might still extract information if the averaging factor ($M$) is too small, suggesting a future combination with Differential Privacy (DP). Second, calculating input derivatives during every local update adds a computational burden to edge devices compared to simple FedAvg. Finally, while the Taylor expansion is general, Mixup's intuition is strongest in image data, leaving its effectiveness on more abstract data types or complex NLP tasks as an open area for exploration.

Summary updated

BibTeX
@inproceedings{yoon2021fedmix,
  author = {Tehrim Yoon and Sumin Shin and Sung Ju Hwang and Eunho Yang},
  title = {{FedMix: Approximation of Mixup under Mean Augmented Federated Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=Ogga20D2HO-},
}
Figure