We propose a training-free conditional sampling method for flow matching models based on importance sampling. Because a naïve application of importance sampling suffers from weight degeneracy in high-dimensional settings, we modify and incorporate a resampling technique in sequential Monte Carlo (SMC) during intermediate stages of the generation process. To encourage generated samples to diverge along distinct trajectories, we derive a stochastic flow with adjustable noise strength to replace the deterministic flow at the intermediate stage. Our framework requires no additional training, while providing theoretical guarantees of asymptotic accuracy. Experimentally, our method significantly outperforms existing approaches on conditional sampling tasks for MNIST and CIFAR-10. We further demonstrate the applicability of our approach in higher-dimensional, multimodal settings through text-to-image generation experiments on CelebA-HQ.
翻译:我们提出了一种基于重要性采样的免训练条件采样方法,适用于流匹配模型。由于重要性采样在高维场景下易出现权重退化问题,我们在生成过程的中间阶段改进并引入了序贯蒙特卡罗(SMC)中的重采样技术。为促使生成样本沿不同轨迹发散,我们推导出一种具有可调噪声强度的随机流,以替代中间阶段的确定性流。该框架无需额外训练,同时提供渐近准确性的理论保证。实验表明,我们的方法在MNIST和CIFAR-10的条件采样任务上显著优于现有方法。我们进一步通过在CelebA-HQ数据集上进行文本到图像生成实验,验证了该方法在高维多模态场景下的适用性。