A Visual Introduction to Rectified Flows

Have you ever wondered why generative models like Flow Matching take dozens—or even hundreds—of steps during sampling, despite using “straight-line interpolation” during training? Why do the actual generated paths end up winding and curved? This not only slows down the process but also increases computational costs.

In this visual introduction article, Alec Helbling reveals the core issue through a 2D toy experiment: independent coupling causes trajectory crossings, and neural networks can’t predict multiple directional velocities at the same spacetime point—only averaging them—resulting in “bent” paths.

The solution is surprisingly elegant: Rectified Flows. By iteratively retraining the model with its own newly generated samples, it progressively “straightens” the trajectories. The result? Sampling requires only a few steps of Euler integration to produce high-quality samples, drastically reducing latency and computational costs.

The article includes interactive animations and comparison visuals (click to generate), making it accessible even without a deep learning background.

:link: Original link: A Visual Introduction to Rectified Flows