
rectified_flow_mlp
Diffusion and generative8 ops4.5K params
An ODE trained to move along straight lines between noise and data, then straightened by reflow to one step.
Diffusion and generative · 818 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
The DDPM++ U-Net velocity network from the CIFAR10 image-generation configuration, taking an image batch and a time value.
About this model's family
Rectified flow is a simple approach to learning neural ordinary differential equation (ODE) models that transport one empirically observed distribution to another, which unifies generative modeling and domain transfer. The ODE is trained to follow the straight paths connecting paired points drawn from the two distributions as closely as possible. Training is a nonlinear least squares regression that scales to large models without extra parameters beyond standard supervised learning.
The network itself is a velocity model that maps a point and a time in the unit interval to a drift of the same dimension as the data. For image generation the drift is represented by the U-Net architecture of DDPM++, built on the Score SDE code. Applying the rectification procedure recursively, called reflow, yields flows with increasingly straight paths that can be simulated accurately with coarse time discretization. On image generation and translation the method gives nearly straight flows that produce high quality results even with a single Euler step. Being purely ODE-based, it is conceptually simpler and faster at inference than SDE-based diffusion approaches.
The captured members are the image-generation network from the CIFAR10 DDPM++ configuration and two small MLP velocity fields of the kind used in the toy examples.
Key idea. Learning an ODE that follows straight paths between two distributions with a least squares objective, and straightening it by reflow until one Euler step suffices.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{liu2022flowstraightfastlearning,
title={Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow},
author={Xingchao Liu and Chengyue Gong and Qiang Liu},
year={2022},
eprint={2209.03003},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2209.03003},
}