Contrastive Flow Matching

George Stoica, V. Ramanujan, Xiang Fan, Ali Farhadi, Ranjay Krishna +1 more
6/1/2025
37 citations
diffusion-flow

Official code: gstoica27/DeltaFM (186 stars, MIT, last commit 2025-06-25).

Abstract

Unconditional flow matching trains diffusion models to transport samples from a source distribution to a target distribution by enforcing that the flows between sample pairs are unique. However, in conditional settings (e.g., classconditioned models), this uniqueness is no longer guaranteedflows from different conditions may overlap, leading to more ambiguous generations.

Show full abstract

We introduce Contrastive Flow Matching, an extension to the flow matching objective that explicitly enforces uniqueness across all conditional flows, enhancing condition separation. Our approach adds a contrastive objective that maximizes dissimilarities between predicted flows from arbitrary sample pairs. We validate Contrastive Flow Matching by conducting extensive experiments across varying model architectures on both class-conditioned (ImageNet-1k) and text-to-image (CC3M) benchmarks. Notably, we find that training models with Contrastive Flow Matching (1) improves training speed by a factor of up to $9 \times$, (2) requires up to $5 \times$ fewer de-noising steps and (3) lowers FID by up to 8.9 compared to training the same models with flow matching. We release our code at: https://github.com/gstoica27/DeltaFM.git.

View on arXivView PDF

Code Implementations(1)

gstoica27/DeltaFMOfficial100%
MIT

[ICCV 2025] Official Implementation of Contrastive Flow Matching

1862Jun 5, 20251 years agoMIT

Similar Papers

Cite this paper

@article{stoica2025contrastive,
  title  = {Contrastive Flow Matching},
  author = {George Stoica and V. Ramanujan and Xiang Fan and Ali Farhadi and Ranjay Krishna and J. Hoffman},
  year   = {2025},
  eprint = {2506.05350},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2506.05350},
  journal = {IEEE International Conference on Computer Vision}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.05350.svg)](https://codeofpaper.com/paper/2506.05350)

Discussion