Flow Matching 中的路径选择影响训练速度
Same Flow, Different Paths: Variance Reduction in Flow Matching
这个论文研究的是流匹配(FM)算法里的一个细节问题,具体是路径选择对训练速度的影响。作者通过理论分析和实验证明,不同的路径会导致完全不同的训练速度,甚至最优路径的选择可以显著提升效率。
本文研究了流匹配(FM)中连接数据与噪声样本的路径选择问题。作者发现,即使路径 g_t 诱导相同的边际分布 p_t 和速度场 v* t,导致相同的 FM 目标函数,路径选择也会从根本上改变 SGD 的收敛速度。对于线性速度模型和一维高斯数据,作者推导了一个紧的 SGD 迭代复杂度上界,并找到了一个分析上最优的线性路径,它在保持相同 FM 问题的情况下最小化了该上界。作者将方差分析扩展到一般 FM 问题,并将固定 θ 下的路径选择定义为方差最小化问题 PathOpt_θ,该问题受约束于 g_t ∈ G(p_t, v* t)。作者证明了该约束是必要的,因为如果没有它,减少方差可能导致更慢的收敛。由于约束 g_t ∈ G(p_t, v* t) 通常无法直接验证,作者推导了一个等效的、可以从样本中估计约束的公式,从而允许数值求解路径。
Same Flow, Different Paths: Variance Reduction in Flow Matching
In flow matching (FM), a velocity model $v_θ$ is trained using a predefined path $g_t$ that connects data and noise samples (e.g., $g_t(x_0, x_1) = (1 - t) x_0 + t x_1$). In this work, we study the choice of this path from an optimization perspective by analyzing the variance of stochastic gradients. We consider the class $G(p_t,v^\star_t)$ of paths that induce the same marginal distributions $p_t$ and marginal velocity field $v^\star_t$, and therefore the same FM objective. Our main finding is that the choice of path $g_t$ can fundamentally change the convergence rate of SGD, even when the FM objective remains exactly the same. (i) For a linear velocity model and one-dimensional Gaussian data, we derive a tight bound on the SGD iteration complexity up to logarithmic factors and find an analytically optimal path that minimizes this bound among linear paths inducing the same FM problem. (ii) We then extend the variance analysis to general FM problems and formulate path selection at a fixed $θ$ as the variance-minimization problem PathOpt$_θ$, constrained to $g_t\in G(p_t,v^\star_t)$. We show that this constraint is essential: reducing variance without it can lead to slower convergence. (iii) Since the constraint $g_t \in G(p_t,v^\star_t)$ cannot generally be verified directly, we derive an equivalent formulation with constraints that can be estimated from samples, allowing paths to be found numerically. Our theoretical results are supported by experiments with Gaussian data, Gaussian mixture models, and real datasets.