Contrastive Flow Matching

  • 2025-06-05 18:59:58
  • George Stoica, Vivek Ramanujan, Xiang Fan, Ali Farhadi, Ranjay Krishna, Judy Hoffman
  • 0

Abstract

Unconditional flow-matching trains diffusion models to transport samples froma source distribution to a target distribution by enforcing that the flowsbetween sample pairs are unique. However, in conditional settings (e.g.,class-conditioned models), this uniqueness is no longer guaranteed--flows fromdifferent conditions may overlap, leading to more ambiguous generations. Weintroduce Contrastive Flow Matching, an extension to the flow matchingobjective that explicitly enforces uniqueness across all conditional flows,enhancing condition separation. Our approach adds a contrastive objective thatmaximizes dissimilarities between predicted flows from arbitrary sample pairs.We validate Contrastive Flow Matching by conducting extensive experimentsacross varying model architectures on both class-conditioned (ImageNet-1k) andtext-to-image (CC3M) benchmarks. Notably, we find that training models withContrastive 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.9compared to training the same models with flow matching. We release our codeat: https://github.com/gstoica27/DeltaFM.git.

 

Quick Read (beta)

loading the full paper ...