Abstract
Data today is decentralized, generated and stored across devices and institutions where privacy, ownership, and regulation prevent centralization. This motivates the need to train generative models directly from distributed data locally without central aggregation. In this paper, we introduce Federated Flow Matching (FFM), a framework for training flow matching models under privacy constraints. Specifically, we first examine FFM-vanilla, where each client trains locally with independent source and target couplings, preserving privacy but yielding curved flows that slow inference. We then develop FFM-LOT, which employs local optimal transport couplings to improve straightness within each client but lacks global consistency under heterogeneous data. Finally, we propose FFM-GOT, a federated strategy based on the semi-dual formulation of optimal transport, where a shared global potential function coordinates couplings across clients. Experiments on synthetic and image datasets show that FFM enables privacy-preserving training while enhancing both the flow straightness and sample quality in federated settings, with performance comparable to the centralized baseline.
Introduction
Generative models like Diffusion and Flow Matching (FM) are the engines behind modern AI art and media. Flow Matching, in particular, is prized for learning a deterministic "velocity field" that transforms simple noise into complex data. However, FM faces a "straightness" problem: if noise and data points are paired randomly during training, the resulting paths are curved, requiring many steps (and significant compute) to sample a single image.
While Optimal Transport (OT) can create straight-line paths, it typically requires access to the entire dataset. In many real-world scenarios, data is siloed on personal devices or across institutions due to privacy regulations. Federated Learning (FL) allows models to train on decentralized data, but achieving globally "straight" flows without centralizing data remains a challenge. Federated Flow Matching (FFM) addresses this by enabling decentralized clients to collaboratively learn straight probability flows.
Methodology
The authors propose three variants of Federated Flow Matching, increasing in sophistication to address data heterogeneity:
- FFM-vanilla: Each client pairs its local data with noise independently. While simple to implement, it results in curved, inefficient flows due to a lack of coordination between clients.
- FFM-LOT (Local Optimal Transport): Each client solves an OT problem locally. This straightens paths within a client's specific data cluster but fails to achieve global consistency. If data distributions differ significantly across clients, local paths may conflict.
- FFM-GOT (Global Optimal Transport): This flagship approach utilizes the semi-dual formulation of Kantorovich duality. Instead of sharing raw data, clients collaboratively learn a shared dual potential function (represented by a neural network). This potential function acts as a coordinator, implicitly aligning how noise is paired with data across all clients to ensure the straightest possible global paths.
Experimental Setup
The FFM framework was evaluated on both synthetic and standard image benchmarks:
- 2D Synthetic Sets: 8-Gaussian distributions and "Moon" shapes to visualize flow trajectories.
- CIFAR-10: Partitioned using a Dirichlet distribution to simulate non-IID (heterogeneous) data across 3 clients.
- ImageNet64: Challenging benchmarks using subsets of ImageNet (500 classes and 10 classes) resized to 64x64, distributed across multiple clients.
Key Results and Insights
The researchers found that data heterogeneity is a major hurdle; they mathematically proved that the error in FFM-LOT is proportional to the divergence between client distributions. FFM-GOT overcomes this by synchronizing the geometry of the flow across the network via the dual potential gradients.
Key performance highlights include:
- Efficiency: On CIFAR-10, FFM-GOT achieved an FID score of 18.15 with only 3 steps (NFE=3), significantly outperforming the vanilla federated approach (FID 57.46) and even the centralized OT-CFM baseline (FID 28.60).
- Visual Straightness: 2D visualizations confirm that FFM-GOT produces near-perfect straight lines from source to target, facilitating faster and more accurate sampling.
- Robustness: FFM-GOT remains stable across different levels of data skew, whereas FFM-LOT's performance degrades as heterogeneity increases.
Conclusion
FFM-GOT demonstrates that it is possible to train high-quality, efficient generative models in a privacy-preserving, federated manner. While FFM-GOT introduces some computational overhead—taking approximately 37% longer to train than the vanilla version—it offers superior sample quality at low step counts. Future work will focus on improving communication efficiency and scaling the framework to thousands of clients.
Summary updated