An Optimal Transport Approach to Personalized Federated Learning

Farzan Farnia, Amirhossein Reisizadeh, Ramtin Pedarsani, Ali Jadbabaie

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models across decentralized devices while maintaining data privacy. However, a primary bottleneck in FL is data heterogeneity, or the "non-IID" (Independent and Identically Distributed) nature of client data. When data distributions vary significantly across users—due to differences in environment, usage patterns, or hardware—standard global models like FedAvg often fail to generalize well to individual local contexts.

This paper introduces FedOT, a novel framework that leverages multi-marginal optimal transport theory to address these challenges. By learning to mathematically align heterogeneous client distributions into a common domain, FedOT enables superior personalization and generalization, even under extreme distribution shifts.

The Challenge of Distribution Shifts

Existing approaches to Personalized Federated Learning (PFL) typically fall into two categories: model interpolation (balancing global and local weights) or meta-learning (training a model that can be quickly fine-tuned). While effective for minor variations, these methods often struggle when client distributions are far apart in the feature space. Most current methods assume that local distributions are "close" to the global average.

FedOT shifts this perspective. Instead of assuming closeness, it asks: Can we learn the transformation that maps one distribution to another? By treating personalization as a transport problem, the framework seeks to identify the underlying "physics" of the shift—such as changes in lighting, rotation, or scaling—rather than simply adjusting neural network weights.

The FedOT Framework

FedOT treats the personalization task as a multi-marginal optimal transport problem. The goal is to find a set of transport maps that move $n$ distinct client distributions into a single, shared latent domain where a global classifier can operate effectively.

1. Min-Max Formulation

Using Kantorovich duality, the authors transform the training objective into a min-max optimization problem:

  • The Minimizer: Seeks to find a global classifier ($f$) and the parameters for client-specific transport maps ($\psi$).
  • The Maximizer: Identifies "potential functions" that represent the cost of transporting data from the local distribution to the common domain.

2. The FedOT-GDA Algorithm

To solve this in a distributed environment, the authors propose FedOT-GDA (Gradient Descent Ascent). In this setup, clients perform local updates on both their transport maps and the global model parameters before synchronizing with a central server. This allows the system to learn the shared structure of the task while respecting the unique geometry of each client's data.

3. Personalization via Composition

Once training is complete, a client’s personalized model is defined as the composition of the global classifier and that client’s specific transport map ($f \circ \psi_i$). This ensures that local data is first "normalized" by the transport map before being processed by the global model.

Theoretical and Empirical Results

Sample Complexity

A significant theoretical contribution of the paper is the proof that FedOT enjoys enhanced sample complexity. By mapping all clients to a common domain, the global classifier effectively learns from the aggregate number of samples across the entire network ($m \times n$), rather than being limited by the small number of samples ($m$) available to a single client.

Experimental Performance

The authors evaluated FedOT against standard benchmarks (MNIST, CIFAR-10, and Colored-MNIST) modified with affine shifts (rotation, scaling) and color-based intensity shifts. FedOT consistently outperformed baselines such as FedAvg, FedMI (Model Interpolation), and Fed-FOMAML (First-Order MAML):

  • MNIST (Affine Shifts): With only 50 samples per user, FedOT achieved approximately 87% accuracy, significantly higher than FedAvg’s 72%.
  • Colored-MNIST: Using InceptionNet, FedOT reached 77.4% accuracy, outperforming Fed-FOMAML (67%) and FedAvg (69.8%).
  • Scaling: As local sample sizes increased to 500, FedOT maintained its lead, reaching near-perfect accuracy (~97%) on MNIST, demonstrating its robustness as data volume grows.

Limitations and Future Directions

While FedOT provides a robust mathematical foundation for PFL, it currently requires prior knowledge regarding the "class" of transport functions (e.g., choosing between affine maps or neural networks). If the chosen function class cannot represent the actual distribution shift, performance may be limited. Additionally, the convergence of the GDA algorithm relies on strong concavity assumptions that may be challenged in complex, non-linear deep learning landscapes.

Future work involves exploring non-convex/non-concave optimization settings and developing tighter information-theoretic bounds to further refine the sample complexity of learning under diverse distribution shifts.

Conclusion

FedOT represents a significant step forward in Personalized Federated Learning by applying the rigorous tools of Optimal Transport to the problem of data heterogeneity. By explicitly modeling the maps between distributions, FedOT provides a principled way to achieve high-performance personalization that remains robust even when client data is drastically different.

Summary updated

BibTeX
@article{farnia2022optimal,
  author = {Farzan Farnia and Amirhossein Reisizadeh and Ramtin Pedarsani and Ali Jadbabaie},
  title = {{An Optimal Transport Approach to Personalized Federated Learning}},
  journal = {IEEE J. Sel. Areas Inf. Theory},
  year = {2022},
}
Figure