Beyond Optimal Transport: Model-Aligned Coupling for Flow Matching

Yexiong Lin, Yu Yao, Tongliang LiuarXiv 2025 · DOI

Introduction

Continuous-time generative models, such as Flow Matching (FM), learn a vector field that transports a simple noise distribution ($x_0$) to a complex data distribution ($x_1$). A critical component of training these models is the "coupling" strategy—the method used to pair specific noise samples with data samples. While early approaches relied on random pairings, recent advancements have favored Optimal Transport (OT) couplings, which minimize geometric distance to reduce path crossings and simplify the learning task.

However, OT-based couplings are "model-blind." By focusing solely on geometric distance, they can introduce local ambiguities where a single noise point is paired with multiple disparate data clusters. This forces the model to learn curved, inefficient trajectories that "average" these directions, leading to blurry outputs in few-step generation.

Visual comparison of Random, OT, and MAC coupling strategies. MAC produces straighter paths that are easier for the model to learn in a single step.

Model-Aligned Coupling (MAC)

To address these limitations, we introduce Model-Aligned Coupling (MAC). Instead of relying on static geometric distance, MAC dynamically selects training pairs based on the model's current prediction error. This "learnability" metric ensures that the model prioritizes paths it can already represent well, progressively straightening the flow as training proceeds.

Key Methodological Components

  1. Learnability Metric: MAC evaluates couplings by measuring the model's prediction error along the noise-to-data path. A lower error indicates a more "learnable" and well-aligned trajectory.
  2. Efficient Selection: To maintain training efficiency, MAC employs a top-k selection strategy within each mini-batch. By randomly sampling candidate pairs and selecting the fraction with the lowest error, the computational complexity is kept to $O(n \log n)$.
  3. Soft Weighting: Rather than a hard selection, MAC uses a soft-weighting loss function. Pairs that align well with the model's current state receive a higher weight ($\lambda$), focusing the gradient updates on coherent, straight trajectories.
  4. Endpoint Approximation: For computational efficiency, the error is approximated at the critical endpoints ($t=0$ and $t=1$), which are most influential for one-step generation performance.

Experimental Results

We evaluated MAC against several baselines, including standard Flow Matching, Batch Optimal Transport (BatchOT), and specialized "Shortcut" models, across MNIST, CIFAR-10, and CelebA-HQ-256 datasets.

FID scores for various generative models across different datasets and sampling steps. MAC consistently outperforms baselines in 1-step and 4-step generation.

As shown in the table above, MAC demonstrates a significant advantage in low-step regimes. On CIFAR-10, MAC achieves a one-step FID of 35.47, a dramatic improvement over standard Flow Matching (324.04) and BatchOT (314.93). Notably, it also surpasses the performance of dedicated Shortcut Models (36.19). Qualitatively, MAC produces sharp, structurally coherent images where other one-step methods often yield blurry or distorted results.

Discussion and Conclusion

The success of MAC highlights that the shortest geometric path is not necessarily the most efficient for neural network learning. By aligning data pairings with the model's internal representation, we reduce gradient interference and facilitate the learning of straight trajectories.

While MAC introduces a slight computational overhead due to the additional forward pass for candidate evaluation, the training time remains comparable to baseline methods—taking only 7 minutes longer than the baseline over a 5-hour training run on CIFAR-10. Future work will explore the scalability of MAC to high-resolution text-to-image models and further refine the hyperparameter selection process.

Summary updated

BibTeX
@misc{lin2025beyond,
  author = {Yexiong Lin and Yu Yao and Tongliang Liu},
  title = {{Beyond Optimal Transport: Model-Aligned Coupling for Flow Matching}},
  year = {2025},
  eprint = {2505.23346},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23346},
}
Figure