Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow

Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
复制标题

DOI:
10.48550/arxiv.2209.03003
复制
发表时间:
2022-09
期刊:
ArXiv
影响因子:
--
通讯作者:
Xingchao Liu;Chengyue Gong;Qiang Liu
Xingchao Liu;Chengyue Gong;Qiang Liu
中科院分区:
其他
文献类型:
--
作者:
Xingchao Liu;Chengyue Gong;Qiang Liu

文献摘要

相似文献

我们提出了修正流,这是一种令人惊讶的简单方法来学习(神经)常微分方程(ODE)模型,以在两个经验观察到的分布 \pi_0 和 \pi_1 之间传输,从而为生成建模和域转移以及涉及分布传输的各种其他任务提供统一的解决方案。整流流的想法是学习 ODE 尽可能遵循连接从 \pi_0 和 \pi_1 绘制的点的直线路径。这是通过解决一个简单的非线性最小二乘优化问题来实现的,该问题可以轻松扩展到大型模型,而无需引入标准监督学习之外的额外参数。直线路径是特殊且优选的,因为它们是两点之间的最短路径,并且可以在没有时间离散化的情况下精确模拟,从而产生计算高效的模型。我们证明了从数据中学习整流流的过程(称为整流)将 \pi_0 和 \pi_1 的任意耦合转变为新的确定性耦合,并且可证明凸传输成本不增加。此外,递归地应用整流使我们能够获得路径越来越直的流序列,可以在推理阶段通过粗时间离散化来精确模拟。在实证研究中,我们表明修正流在图像生成、图像到图像转换和域适应方面表现出色。特别是,在图像生成和转换方面,我们的方法产生几乎直线的流,即使使用单个欧拉离散化步骤也能给出高质量的结果。
We present rectified flow, a surprisingly simple approach to learning (neural) ordinary differential equation (ODE) models to transport between two empirically observed distributions \pi_0 and \pi_1, hence providing a unified solution to generative modeling and domain transfer, among various other tasks involving distribution transport. The idea of rectified flow is to learn the ODE to follow the straight paths connecting the points drawn from \pi_0 and \pi_1 as much as possible. This is achieved by solving a straightforward nonlinear least squares optimization problem, which can be easily scaled to large models without introducing extra parameters beyond standard supervised learning. The straight paths are special and preferred because they are the shortest paths between two points, and can be simulated exactly without time discretization and hence yield computationally efficient models. We show that the procedure of learning a rectified flow from data, called rectification, turns an arbitrary coupling of \pi_0 and \pi_1 to a new deterministic coupling with provably non-increasing convex transport costs. In addition, recursively applying rectification allows us to obtain a sequence of flows with increasingly straight paths, which can be simulated accurately with coarse time discretization in the inference phase. In empirical studies, we show that rectified flow performs superbly on image generation, image-to-image translation, and domain adaptation. In particular, on image generation and translation, our method yields nearly straight flows that give high quality results even with a single Euler discretization step.