about
Contrastive Flow Matching (arxiv.org)
2 points by badmonster on Jun 6, 2025 | hide | past | pdf | 1 comment on HN

In plain words: Flow matching turns noise into a sample along a path; when told what to generate, paths can tangle, so this adds a penalty pushing apart paths across conditions. Models trained this way learned up to nine times faster and made better images than standard training.

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., class-conditioned models), this uniqueness is no longer guaranteed--flows from different conditions may overlap, leading to more ambiguous generations. 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 9x, (2) requires up to 5x 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.

George Stoica, Vivek Ramanujan, Xiang Fan, Ali Farhadi, Ranjay Krishna, Judy Hoffman
arXiv:2506.05350 · cs.CV · submitted Jun 5, 2025
abstract · pdf · html

add comment on HN

The speedup (up to 9x training) and quality gains (up to 8.9 FID improvement) are impressive, especially on large-scale benchmarks like ImageNet and CC3M.