Reflected Flow Matching
Tianyu Xie, Yu Zhu, Longlin Yu, Tong Yang, Ziheng Cheng, Shiyue Zhang, Xiangyu Zhang, Cheng Zhang
TL;DR
Reflected Flow Matching (RFM) extends continuous normalizing flows to constrained domains by introducing a reflection term in the governing ODEs, yielding reflected CNFs that stay inside the domain. It trains the velocity model via simulation-free conditional velocity-field matching (CRFM), using analytically derived conditional flows to avoid bias and improve stability on boundaries. The method achieves competitive or superior results on low-dimensional constrained tasks and image benchmarks (CIFAR-10 and ImageNet64), while enforcing zero boundary violations under high guidance weights. This approach offers efficient, boundary-consistent generative modeling for data with domain constraints and broad applicability to constrained-generation problems.
Abstract
Continuous normalizing flows (CNFs) learn an ordinary differential equation to transform prior samples into data. Flow matching (FM) has recently emerged as a simulation-free approach for training CNFs by regressing a velocity model towards the conditional velocity field. However, on constrained domains, the learned velocity model may lead to undesirable flows that result in highly unnatural samples, e.g., oversaturated images, due to both flow matching error and simulation error. To address this, we add a boundary constraint term to CNFs, which leads to reflected CNFs that keep trajectories within the constrained domains. We propose reflected flow matching (RFM) to train the velocity model in reflected CNFs by matching the conditional velocity fields in a simulation-free manner, similar to the vanilla FM. Moreover, the analytical form of conditional velocity fields in RFM avoids potentially biased approximations, making it superior to existing score-based generative models on constrained domains. We demonstrate that RFM achieves comparable or better results on standard image benchmarks and produces high-quality class-conditioned samples under high guidance weight.
