arXiv:2509.25519cs.LGstat.ML2025-09被引 10

用半离散优化提升生成模型训练效率,大幅降低计算开销。

Flow Matching with Semidiscrete Couplings

  • 将目标数据分布视为有限集合,通过梯度下降求解对偶势能向量
  • 训练时用最大内积搜索匹配噪声与数据点,避免二次复杂度瓶颈
  • 在多个数据集和生成任务中均优于传统流模型与最优传输方法

参数化为时变速度场的流模型可通过积分常微分方程从噪声生成数据。这类模型通常采用流匹配(Flow Matching)进行训练,即随机采样噪声与目标点对 $(\mathbf{x}_0, \mathbf{x}_1)$,并确保速度场在连接 $\mathbf{x}_0$ 到 $\mathbf{x}_1$ 的路径上平均与 $\mathbf{x}_1 - \mathbf{x}_0$ 一致。虽然默认情况下这些点对独立采样,但也可通过最优传输(OT)求解器更精细地匹配一批 $n$ 个噪声点与 $n$ 个目标点。尽管理论前景良好,实际中因批量 OT 训练成本过高而未普及。张等(2025)指出,只有当批次大小 $n$ 显著增大时,基于 Sinkhorn 算法的最优传输流匹配(OT-FM)才真正见效,而这需多 GPU 支持。然而,其代价高达 $O(n^2/\varepsilon^2)$ 次操作,其中 $\varepsilon$ 是需取小值以获得更好结果的正则化参数。为兑现 OT-FM 的理论优势,我们提出摒弃批量 OT,转而采用半离散形式:利用目标数据分布通常为有限大小 $N$ 的特性,通过随机梯度下降估计对偶势能向量;训练时,新采样的噪声向量可借助最大内积搜索(MIPS)快速匹配数据点。该方法消除了原本 $O(n^2/\varepsilon^2)$ 的二次依赖。半离散流匹配(SD-FM)在所有训练指标和推理预算约束下,均优于标准流匹配(FM)与最优传输流匹配(OT-FM),涵盖无条件/有条件生成及均值流模型等多种场景。

原文摘要 · Abstract (English)

Flow models parameterized as time-dependent velocity fields can generate data from noise by integrating an ODE. These models are often trained using flow matching, i.e. by sampling random pairs of noise and target points $(\mathbf{x}_0,\mathbf{x}_1)$ and ensuring that the velocity field is aligned, on average, with $\mathbf{x}_1-\mathbf{x}_0$ when evaluated along a segment linking $\mathbf{x}_0$ to $\mathbf{x}_1$. While these pairs are sampled independently by default, they can also be selected more carefully by matching batches of $n$ noise to $n$ target points using an optimal transport (OT) solver. Although promising in theory, the OT flow matching (OT-FM) approach is not widely used in practice. Zhang et al. (2025) pointed out recently that OT-FM truly starts paying off when the batch size $n$ grows significantly, which only a multi-GPU implementation of the Sinkhorn algorithm can handle. Unfortunately, the costs of running Sinkhorn can quickly balloon, requiring $O(n^2/\varepsilon^2)$ operations for every $n$ pairs used to fit the velocity field, where $\varepsilon$ is a regularization parameter that should be typically small to yield better results. To fulfill the theoretical promises of OT-FM, we propose to move away from batch-OT and rely instead on a semidiscrete formulation that leverages the fact that the target dataset distribution is usually of finite size $N$. The SD-OT problem is solved by estimating a dual potential vector using SGD; using that vector, freshly sampled noise vectors at train time can then be matched with data points at the cost of a maximum inner product search (MIPS). Semidiscrete FM (SD-FM) removes the quadratic dependency on $n/\varepsilon$ that bottlenecks OT-FM. SD-FM beats both FM and OT-FM on all training metrics and inference budget constraints, across multiple datasets, on unconditional/conditional generation, or when using mean-flow models.

生成模型流匹配最优传输半离散

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。