Simple ReFlow: Improved Techniques for Fast Flow Models

## Abstract

Abstract Diffusion and flow-matching models achieve remarkable generative performance but at the cost of many sampling steps, this slows inference and limits applicability to time-critical tasks. The ReFlow procedure can accelerate sampling by straightening generation trajectories. However, ReFlow is an iterative procedure, typically requiring training on simulated data, and results in reduced sample quality. To mitigate sample deterioration, we examine the design space of ReFlow and highlight potential pitfalls in prior heuristic practices. We then propose seven improvements for training dynamics, learning and inference, which are verified with thorough ablation studies on CIFAR10 32 × 32 32 32 32\times 32 32 × 32 , AFHQv2 64 × 64 64 64 64\times 64 64 × 64 , and FFHQ 64 × 64 64 64 64\times 64 64 × 64 . Combining all our techniques, we achieve state-of-the-art FID scores (without / with guidance, resp.) for fast generation via neural ODEs: 2.23 2.23 2.23 2.23 / 1.98 1.98 1.98 1.98 on CIFAR10, 2.30 2.30 2.30 2.30 / 1.91 1.91 1.91 1.91 on AFHQv2, 2.84 2.84 2.84 2.84 / 2.67 2.67 2.67 2.67 on FFHQ, and 3.49 3.49 3.49 3.49 / 1.74 1.74 1.74 1.74 on ImageNet-64, all with merely 9 9 9 9 neural function evaluations.

## 1 Introduction

The diffusion model (DMs) paradigm (Sohl-Dickstein et al., ; Ho et al., ) has changed the landscape of generative modelling of perceptual data, benefitting from scalability, stability and remarkable performance in a diverse set of tasks ranging from unconditional generation (Dhariwal & Nichol, ) to conditional generation such as image restoration (Chung et al., ), editing (Meng et al., ), translation (Su et al., ), and text-to-image generation (Rombach et al., ). However, to generate samples, DMs require numerically integrating a differential equation using tens to hundreds of neural function evaluations (NFEs) (Song et al., ; ). Naively reducing the NFE increases discretization error, causing sample quality to worsen. This has sparked wide interest in accelerating diffusion sampling (Song et al., ; Lu et al., ; Zhang & Chen, ; Kim & Ye, ; Salimans & Ho, ; Song et al., ).

Flow matching models (FMs) (Lipman et al., ) are a closely related class of generative model sharing similar training and sampling procedures and enjoying similar performance to diffusion models. Indeed, FM and DMs coincide for a particular choice of forward process (Kingma & Gao, ). Whereas diffusion models relate to entropically regularized transport (Bortoli et al., ; Shi et al., ; Peluchetti, ), a key property of flow matching models is their connection to non-regularized optimal transport, and hence deterministic, straight trajectories (Liu, ).

While there exist a plethora of acceleration techniques, one promising, yet less explored avenue is ReFlow (Liu et al., ; Liu, ), also known as Iterative Markovian Fitting (IMF) (Shi et al., ). ReFlow straightens ODE trajectories through flow-matching between marginal distributions coupled by a previously trained flow ODE, rather than using an independent coupling. Theoretically, with an infinite number of ReFlow updates, the resulting learned ODE should be straight, which enables perfect translation between the marginals with a single function evaluation (Liu et al., ).

In practice however, ReFlow results in a drop in sample quality (Liu et al., ; ). To address this problem, recent works on sampling acceleration via ReFlow opt to use heuristic tricks such as perceptual losses that only loosely adhere to the underlying theory (Lee et al., ; Zhu et al., ). Consequently, it is unclear whether the marginals are still preserved after ReFlow. This is problematic, as exact inversion and tractable likelihood calculation require access to a valid probability flow ODE between the marginals. Moreover, these two functions are critical to downstream applications such as zero-shot classification (Li et al., ) etc.

The goal of this work is to study and mitigate the performance drop after ReFlow without violating the theoretical setup. Although technical in nature, we call our method simple, as, similar to simple diffusion (Hoogeboom et al., ), it does not rely on latent-encoders, perceptual losses, or premetrics, whose effect on the learned marginals is poorly understood. To this end, we first disentangle the components of ReFlow. Next, we examine the pitfalls of previous practices. Finally, we propose enhancements within the theoretical bounds, and verify them through rigorous ablation studies.

Our contributions are summarized as follows.

- •
We generalize and categorize the design choices of ReFlow (Section 3.1). We generalize the ReFlow training loss and categorize the design choices of ReFlow into three key groups: training dynamics, learning, and inference. Within each group, we discuss previous practices, highlight their potential pitfalls, and propose improved techniques.
- •
We analyze each improvement via ablations (Sections 3.2, 3.3, and 3.4). For each proposed improvement, we verify its effect on sample quality via extensive ablations on three datasets: CIFAR10 $32\times 32$ (Krizhevsky, ), FFHQ $64\times 64$ (Karras et al., ), and AFHQv2 $64\times 64$ (Choi et al., ). We demonstrate that our techniques are robust, and they offer consistent gains in FID scores (Heusel et al., ) on all three datasets.
- •
We achieve state-of-the-art results (Section 4). With all our improvements, we set state-of-the-art FIDs for fast generation via neural ODEs, without perceptual losses or premetrics. Our best models achieve $2.23$ FID on CIFAR10, $2.30$ FID on AFHQv2, $2.84$ FID on FFHQ, and $3.49$ FID on ImageNet-64, all with merely 9 NFEs. In particular, our models outperform the latest fast neural ODEs such as curvature minimization (Lee et al., ) and minibatch OT flow matching (Pooladian et al., ). We are also able to further enhance the perceptual quality of samples via guidance, setting $1.98$ FID on CIFAR10, $1.91$ FID on AFHQv2, $2.67$ FID on FFHQ, and $1.74$ FID on ImageNet-64, also with 9 NFEs.

## 2 Background

Let $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$ be two data distributions on $\mathbb{R}^{d}$. Rectified Flow (RF) (Liu et al., ; Liu, ) is an algorithm which learns straight ordinary differential equations (ODEs) between $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$ by iterating a procedure called ReFlow. Below, we describe ReFlow, and explain how it can be applied to diffusion probability flow ODEs to learn fast generative flow models.

### 2.1 Flow Matching and ReFlow

Let us first define the flow matching (FM) loss and its equivalent formulation as a denoising problem

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01})$ $\displaystyle\coloneqq\mathbb{E}_{(\bm{x}_{0},\bm{x}_{1})\sim\mathbb{Q}_{01}} \mathbb{E}_{t\sim\operatorname{unif}(0,1)}\left[\ell_{\operatorname{MSE}}(\bm{ x}_{1}-\bm{x}_{0},\bm{v}_{\theta}(\bm{x}_{t},t))\right]$ (1) $\displaystyle\coloneqq\mathbb{E}_{(\bm{x}_{0},\bm{x}_{1})\sim\mathbb{Q}_{01}} \mathbb{E}_{t\sim\operatorname{unif}(0,1)}[t^{-2}\cdot\ell_{\operatorname{MSE} }(\bm{x}_{0},\bm{D}_{\theta}(\bm{x}_{t},t))]$ (2) $$

where $\bm{v}_{\theta}:\mathbb{R}^{d}\times(0,1)\rightarrow\mathbb{R}^{d}$ is a velocity parameterized by $\theta$, $\ell_{\operatorname{MSE}}(\bm{x},\bm{y})\coloneqq\|\bm{x}-\bm{y}\|_{2}^{2}$, $\bm{x}_{t}\coloneqq(1-t)\bm{x}_{0}+t\bm{x}_{1}$, and $\mathbb{Q}_{01}$ is a coupling, i.e., a joint distribution, of $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$, and $\bm{D}_{\theta}(\bm{x}_{t},t)\coloneqq\bm{x}_{t}-t\bm{v}_{\theta}$ is a denoiser that is optimized to recover the original data $\bm{x}_{0}$ given a corrupted observation $\bm{x}_{t}$ and time $t$ as inputs. According to the FM theory, a velocity which minimizes Eq. (1) or a denoiser which minimizes Eq. (2) can translate samples from $\mathbb{P}_{i}$ to $\mathbb{P}_{1-i}$, $i\in\{0,1\}$, by solving the ODE

$$ $\displaystyle d\bm{x}_{t}=\bm{v}_{\theta}(\bm{x}_{t},t)\,dt=t^{-1}(\bm{x}_{t}- \bm{D}_{\theta}(\bm{x}_{t},t))\,dt,\quad t\in(0,1)$ (3) $$

from $t=i$ to $1-i$ (Lipman et al., ).
Let us call the denoiser which minimizes Eq. (2) w.r.t. the independent coupling $\mathbb{Q}_{01}=\mathbb{P}_{0}\otimes\mathbb{P}_{1}$ as $\bm{D}_{\theta}^{1}$.

For $n\geq 1$, ReFlow minimizes Eq. (2) with coupling induced by $\bm{D}_{\theta}^{n}$ to obtain $\bm{D}_{\theta}^{n+1}$ whose ODE has a lower transport cost. Specifically, observe that Eq. (3) with $\bm{D}_{\theta}^{n}$ induces a coupling

$$ $\displaystyle d\mathbb{Q}_{01}^{n}(\bm{x}_{0},\bm{x}_{1})\coloneqq\begin{cases }d\mathbb{P}_{1}(\bm{x}_{1})\delta(\bm{x}_{0}-\operatorname{solve}(\bm{x}_{1}, \bm{D}_{\theta}^{n},1,0))\\ d\mathbb{P}_{0}(\bm{x}_{0})\delta(\bm{x}_{1}-\operatorname{solve}(\bm{x}_{0}, \bm{D}_{\theta}^{n},0,1))\end{cases}$ (4) $$

where $\delta$ is the Dirac delta, and $\operatorname{solve}(\bm{x},\bm{D}_{\theta}^{n},t_{0},t_{1})$ solves Eq. (3) from time $t=t_{0}$ to $t_{1}$ with initial point $\bm{x}$. Concretely, given $\bm{x}_{i}\sim\mathbb{P}_{i}$ for $i\in\{0,1\}$, we sample $\bm{x}_{1-i}\sim\mathbb{Q}_{1-i|i}(\cdot|\bm{x}_{i})$ by integrating Eq. (3) from $t=i$ to $1-i$ starting from $\bm{x}_{i}$. The two expressions in Eq. (4) are equivalent, since an ODE defines a bijective map between initial and terminal points.

RF guarantees that if $\bm{D}_{\theta}^{n+1}$ is a minimizer of $\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01}^{n})$, the ODE with $\bm{D}_{\theta}^{n+1}$ has transport cost less than or equal to that of the ODE with $\bm{D}_{\theta}^{n}$. An ODE with minimal transport cost has perfectly straight trajectories, making it possible to translate between the marginals with a single Euler step, e.g., $\bm{x}_{0}=\bm{D}_{\theta}(\bm{x}_{1},1)$ when translating from $t=1$ to 0 0 (see Section 3 of Liu et al., ).

### 2.2 ReFlow with Diffusion Probability Flow ODEs

Given distribution $\mathbb{P}_{0}$ on $\mathbb{R}^{d}$ and Gaussian perturbation kernel $d\mathbb{Q}_{\sigma|0}(\bm{y}_{\sigma}|\bm{y}_{0})\coloneqq\mathcal{N}(\bm{y}_
{\sigma}|\bm{y}_{0},\sigma^{2}\bm{I})$, DMs solve the denoising score matching (DSM) (Vincent, ) problems

$$ $\displaystyle\mathcal{L}_{\operatorname{DSM}}(\theta)\coloneqq\mathbb{E}_{ \sigma\sim\mathbb{S}}\mathbb{E}_{\bm{y}_{0}\sim\mathbb{P}_{0}}\mathbb{E}_{\bm{ y}_{\sigma}\sim\mathbb{Q}_{\sigma|0}(\cdot|\bm{y}_{0})}\left[\ell_{ \operatorname{MSE}}(\bm{y}_{0},\bm{F}_{\theta}(\bm{y}_{\sigma},\sigma))\right]$ (5) $$

to learn a denoiser $\bm{F}_{\theta}:\mathbb{R}^{d}\times(0,\infty)\rightarrow\mathbb{R}^{d}$. $\bm{F}_{\theta}$ then defines a probability flow ODE between $\mathbb{P}_{0}$ and $\mathbb{P}_{0}*\mathcal{N}(\bm{0},\hat{\sigma}^{2}\bm{I})\approx\mathcal{N}(
\bm{0},\hat{\sigma}^{2}\bm{I})$ for a large $\hat{\sigma}$:

$$ $\displaystyle d\bm{y}_{\sigma}=\sigma^{-1}(\bm{y}_{\sigma}-\bm{F}_{\theta}(\bm {y}_{\sigma},\sigma))\,d\sigma,\quad\sigma\in(0,\infty).$ (6) $$

When $\mathbb{P}_{1}$ is standard normal, Eq. (3) with $\bm{D}^{1}_{\theta}$ and Eq. (6) are equivalent, as Eq. (3) with the change of variables $(\bm{y}_{\sigma},\sigma)\coloneqq(\frac{\bm{x}_{t}}{1-t},\frac{t}{1-t})$ and Eq. (6) are identical (Lee et al., ).
It follows that we can straighten diffusion probability flow ODE trajectories via ReFlow. Specifically, with the coupling

$$ $\displaystyle d\mathbb{Q}_{01}^{1}(\bm{x}_{0},\bm{x}_{1})=\begin{cases}d \mathbb{P}_{1}(\bm{x}_{1})\delta(\bm{x}_{0}-\operatorname{solve}(\frac{\bm{x}_ {1}}{1-t},\bm{F}_{\theta},\frac{t}{1-t},0))\\ d\mathbb{P}_{0}(\bm{x}_{0})\delta(\bm{x}_{1}-(1-t)\cdot\operatorname{solve}( \bm{x}_{0},\bm{F}_{\theta},0,\frac{t}{1-t}))\end{cases}$ (7) $$

where $t\approx 1$ and $\operatorname{solve}(\bm{y},\bm{F}_{\theta},\sigma_{0},\sigma_{1})$ solves Eq. (6) from $\sigma=\sigma_{0}$ to $\sigma_{1}$ with initial point $\bm{y}$, we can minimize Eq. (1) to learn $\bm{D}^{2}_{\theta}$, and so on. Because optimizing Eq. (1) is often expensive, a typical procedure is to perform one ReFlow step with Eq. (7) to get $\bm{D}^{2}_{\theta}$, and distill Eq. (3) trajectories into a student model for one-step generation (Liu et al., ; Zhu et al., ; Liu et al., ).

## 3 Improved Techniques for ReFlow

We now investigate the design space of ReFlow and propose improvements. Specifically, in Section 3.1, we generalize the FM loss and identify the components that constitute ReFlow. The components are organized into three groups – training dynamics, learning, and inference. In Sections 3.2, 3.3, and 3.4, we investigate the pitfalls of previous practices and propose improved techniques in each group. To show that our improvements are robust, we provide rigorous ablation studies on CIFAR10 $32\times 32$, AFHQv2 $64\times 64$, and FFHQ $64\times 64$. We find that ReFlow training and sampling are very different from those of DMs, and generally require distinct techniques for optimal performance.

### 3.1 The Design Space of ReFlow

Generalizing weight and time distribution. Let the joint distribution of $(\bm{x}_{0},\bm{x}_{1},t,\bm{x}_{t})$ be given by $\bm{x}_{0},\bm{x}_{1}\sim d\mathbb{Q}_{01}$, $t\sim\mathbb{T}$, and $\bm{x}_{t}=(1-t)\bm{x}_{0}+t\bm{x}_{1}$.
Then Eq. (2) can also be expressed as

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01})=\mathbb{E }_{t\sim\operatorname{unif}(0,1)}\mathbb{E}_{\bm{x}_{t}\sim\mathbb{Q}_{t}} \left[w(t)\cdot\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{ t},t)\right],$ (8) where $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t} ,t)\coloneqq\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}_{0|t}(\cdot|\bm{x}_{t})}\left [\ell_{\operatorname{MSE}}(\bm{x}_{0},\bm{D}_{\theta}(\bm{x}_{t},t))\right],$ (9) $$

and $w(t)=t^{-2}$. This shows that the FM loss is separable w.r.t. $(\bm{x}_{t},t)$, and the optimal denoising function is given by the posterior mean (Robbins, ): $\bm{D}^{*}(\bm{x}_{t},t)=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}_{0|t}(\cdot|\bm{
x}_{t})}[\bm{x}_{0}]$.
Hence, we may replace $w(t)$ with a general weight $w(\bm{x}_{t},t)$ and use a general time distribution $\mathbb{T}$

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01})=\mathbb{E }_{t\sim\mathbb{T}}\mathbb{E}_{\bm{x}_{t}\sim\mathbb{Q}_{t}}\left[w(\bm{x}_{t} ,t)\cdot\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t) \right].$ (10) $$

This is minimized under the same condition,
given that $w(\bm{x}_{t},t)>0$ and $\mathbb{T}$ is supported on $(0,1)$.

Generalizing the loss function. We also consider using general loss functions in ReFlow, i.e.,

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t} ,t)=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}_{0|t}(\cdot|\bm{x}_{t})}\left[\ell( \bm{x}_{0},\bm{D}_{\theta}(\bm{x}_{t},t))\right]$ (11) $$

for general $\ell:\mathbb{R}^{d}\times\mathbb{R}^{d}\rightarrow\mathbb{R}$. It is difficult to precisely characterize the class of $\ell$
that preserves the minimizers of
Eq. (1), and popular losses such as LPIPS (Kendall et al., ) and pseudo-Huber (PH) (Song & Dhariwal, ) lack this guarantee. However, $\ell_{\operatorname{MSE}}$ has been observed to be sub-optimal compared to, e.g., LPIPS and PH for training fast models (Lee et al., ). To mitigate this trade-off between theoretical correctness and practicality, we consider a wider class of losses

$$ $\displaystyle\ell_{\phi}(\bm{x},\bm{y})\coloneqq\|\phi(\bm{x})-\phi(\bm{y})\|_ {2}^{2}$ (12) $$

for invertible linear maps $\phi:\mathbb{R}^{d}\rightarrow\mathbb{R}^{d}$.
This again ensures that the loss is minimized when $\bm{D}_{\theta}$ outputs the posterior mean,
and $\ell_{\operatorname{MSE}}$ is a special case of this loss with the identity map $\phi=\bm{I}$.

Generalized FM loss. Combining the two generalizations, we have our generalized FM loss

$$ $\displaystyle\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01})=\mathbb{ E}_{t\sim\mathbb{T}}\mathbb{E}_{\bm{x}_{t}\sim\mathbb{Q}_{t}}\left[w(\bm{x}_{t },t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t) \right],$ (13) where $\displaystyle\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t },t)\coloneqq\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}_{0|t}(\cdot|\bm{x}_{t})} \left[\ell_{\phi}(\bm{x}_{0},\bm{D}_{\theta}(\bm{x}_{t},t))\right].$ (14) $$

The following proposition ensures its theoretical correctness. Proof is deferred to Appendix E.1.

###### Proposition 1 .

Let $w(\bm{x}_{t},t)$, $d\mathbb{T}(t)$ be positive, and $\phi$ be an invertible linear map. Then, $\theta$ minimizes Eq. (13) if and only if it minimizes Eq. (1).

**Table 1: Comparison of practices for optimizing the ReFlow loss Eq. (13) and solving the ODE Eq. (3). $\operatorname{sg}$ means stop gradient and $\mathrm{HPF}$ denotes high-pass filter. Baseline is the combination of most recent techniques which do not violate the flow matching theory.**
|  | RF | RF++ | Baseline | Simple ReFlow (Ours) |
| --- | --- | --- | --- | --- |
| Train Dynamics (Sec. 3.2) |  |  |  |  |
| Weight $w(\bm{x}_{t},t)$ | $1/t^{2}$ | $1$, $1/t$ | $1$ | $1/\operatorname{sg}[\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm<br>{x}_{t},t)]$ |
| Time distribution $d\mathbb{T}(t)\propto$ | $1$ | $\cosh(4(t-0.5))$ | $\cosh(4(t-0.5))$ | $10^{t}$ |
| Loss function $\ell$ | $\ell_{\operatorname{MSE}}$, LPIPS | Pseudo-Huber, LPIPS | $\ell_{\operatorname{MSE}}$ | $\ell_{\bm{I}+\lambda\operatorname{HPF}}$ |
| Learning (Sec. 3.3) |  |  |  |  |
| $\bm{D}_{\theta}$ initialization with DM | ✗ | ✓ | ✓ | ✓ |
| $\bm{D}_{\theta}$ dropout probability | $0.15$ | Equal to EDM | $0.15$ | $\ll 0.15$ |
| Sampling from $\mathbb{Q}_{01}$ | Backward | Backward | Backward | Forward, Projection |
| Inference (Sec. 3.4) |  |  |  |  |
| ODE Solver | Euler | Euler, Heun | Heun | DPM-Solver |
| Discretization of $[0,1]$ | Uniform | Uniform | Uniform | Sigmoid $\kappa=20$ |
| Reference | (Liu et al., )<br>(Zhu et al., ) | (Lee et al., ) | – | – |

###### Proposition 1 .

#### 3.1.1 Training Dynamics, Learning, and Inference

We now observe that there are seven components that constitute ReFlow: time distribution $\mathbb{T}$, training dataset (empirical realization of $\mathbb{Q}_{01}$), weight $w(\bm{x}_{t},t)$, loss function $\ell_{\phi}$, denoiser $\bm{D}_{\theta}$, and ODE solver and discretization schedule for solving Eq. (3). We categorize them into three groups below.

Training dynamics influence the path that the model takes towards the minimizers
of Eq. (13) during training. Although the solution to which the model converges may change if dynamics changes, training dynamics do not impact the solution set itself. Weight function $w(\bm{x}_{t},t)$, time distribution $\mathbb{T}$, and loss function $\ell_{\phi}$ belong here. Learning influence the solution set of Eq. (13) by constraining the hypothesis class or by changing the training dataset. Parameterization of $\bm{D}_{\theta}$ and how we sample from $\mathbb{Q}_{01}$ belong here. Finally, inference influence generation or inversion of samples given a trained model. ODE solver and time discretization of the unit interval belong here.

In Tab. 1, we describe recent ReFlow practices within our framework. Baseline is the collection of most recent ReFlow techniques which do not violate FM theory (Lipman et al., ). We will build up improvements on this baseline setting in the subsequent sections.

### 3.2 Improving Training Dynamics

**Figure 1: Min., avg., max. relative losses after training on CIFAR10.**
| $w(\bm{x}_{t},t)$ | CIFAR10 | AFHQv2 | FFHQ |
| --- | --- | --- | --- |
| $1$ | $2.83$ | $2.87$ | $4.28$ |
| $1/t$ | $2.77$ | $\underline{2.76}$ | $\underline{4.01}$ |
| $1/t^{2}$ | $2.76$ | $\mathbf{2.74}$ | $4.04$ |
| $(\sigma^{2}+0.5^{2})/(0.5\sigma)^{2}$ | $2.78$ | $2.82$ | $4.04$ |
| $1/\mathbb{E}_{\bm{x}_{t}}[\operatorname{sg}[\mathcal{L}_{\operatorname{GFM}}(<br>\theta;\mathbb{Q}_{01},\bm{x}_{t},t)]]$ | $\underline{2.74}$ | $2.79$ | $\mathbf{3.83}$ |
| $1/\operatorname{sg}[\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},<br>\bm{x}_{t},t)]$ | $\mathbf{2.61}$ | $\mathbf{2.74}$ | $\mathbf{3.83}$ |

Evaluation protocol. Unless written otherwise, to evaluate a training setting, we initialize ReFlow denoisers with pre-trained EDM (Karras et al., ) denoisers, and optimize Eq. (13) with $\mathbb{Q}_{01}=\mathbb{Q}_{01}^{1}$ of Eq. (7) for $200k$ iterations. We sample $1M$ pairs from $\mathbb{Q}_{01}^{1}$ by solving Eq. (6) from $t=1$ to 0 0 with EDM models and use them for training. We measure the performance of an optimized model by computing the FID (Heusel et al., ) between $50k$ generated images and all available dataset images. Samples are generated by solving Eq. (3) with the Heun solver (Ascher & Petzold, ) with 9 NFEs, and we use the sigmoid discretization instead of the baseline uniform discretization for reasons discussed in Appendix F.1. We we report the minimum FID out of three random generation trials, as done by Karras et al. (). See Appendix D for a complete description.

#### 3.2.1 Loss Normalization

Previous practice. There is little study on suitable loss weights for ReFlow training. For instance, Lee et al. () use $w(\bm{x}_{t},t)=1$, and such choices can be detrimental to training, as the weighted loss $w(\bm{x}_{t},t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},
\bm{x}_{t},t)$ without proper modulation by $w(\bm{x}_{t},t)$ can have vastly different scales w.r.t. $t$, leading to slow and unstable model convergence. Typically, the loss vanishes as $t\rightarrow 0$ since $\bm{x}_{t}\rightarrow\bm{x}_{0}$, and to counteract this, previous works have suggested

$$ $\displaystyle w(\bm{x}_{t},t)=\begin{cases}1/t&\text{for ReFlow \cite[citep]{( \@@bibref{AuthorsPhrase1Year}{lee2024rfpp}{\@@citephrase{, }}{})}},\\ (\sigma^{2}+0.5^{2})/(0.5\sigma)^{2},\ \sigma\coloneqq\frac{t}{1-t}&\text{for DMs \cite[citep]{(\@@bibref{AuthorsPhrase1Year}{karras2022edm}{\@@citephrase{, }}{})}},\\ 1/\mathbb{E}_{\bm{x}_{t}\sim\mathbb{Q}_{t}}[\operatorname{sg}[\mathcal{L}_{ \operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)]]&\text{for DMs \cite [citep]{(\@@bibref{AuthorsPhrase1Year}{karras2023edm2}{\@@citephrase{, }}{})}} ,\end{cases}$ $$

where $\operatorname{sg}[\cdot]$ is stop-gradient. The FM weight $1/t^{-2}$ in Eq. (2) naturally emphasizes $t\approx 0$ as well.

However, we claim that such weights constant w.r.t. $\bm{x}_{t}$ can be sub-optimal for ReFlow, as ReFlow loss scales can vary greatly w.r.t. $\bm{x}_{t}$ even for fixed $t$. For instance, the following proposition shows that, at initialization, relative loss for DM at $t=1$ is constant whereas relative loss for ReFlow can be arbitrarily large. Proof is deferred to Appendix E.2.

###### Proposition 2 .

Assume output layer zero initialization for the DM denoiser and DM initialization for the ReFlow denoiser. Then maximum relative losses for DM and ReFlow at $t=1$ are

$$ $\displaystyle\textstyle\max_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}( \theta;\mathbb{P}_{0}\otimes\mathbb{P}_{1},\bm{x}_{1},1)/\min_{\bm{x}_{1}} \mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{P}_{0}\otimes\mathbb{P}_{1}, \bm{x}_{1},1)=1$ $\displaystyle\textstyle\max_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}( \theta;\mathbb{Q}_{01}^{1},\bm{x}_{1},1)/\min_{\bm{x}_{1}}\mathcal{L}_{ \operatorname{GFM}}(\theta;\mathbb{Q}_{01}^{1},\bm{x}_{1},1)=\max_{\bm{x}_{0}, \bm{x}_{0}^{\prime}}\|\bm{x}_{0}-\bm{\mu}_{0}\|_{2}^{2}/\|\bm{x}_{0}^{\prime}- \bm{\mu}_{0}\|_{2}^{2}$ $$

resp., where $\bm{\mu}_{0}=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{P}_{0}}[\bm{x}_{0}]$, and $\min_{\bm{x}_{i}}$, $\max_{\bm{x}_{i}}$ is taken w.r.t. $\bm{x}_{i}$ in the support of $\mathbb{P}_{i}$.

In fact, in Fig. 1, we observe that ReFlow loss varies greatly w.r.t. $\bm{x}_{t}$ after training as well. In contrast to DM training loss whose minimum and maximum values differ by a factor of at most $20$, minimum ReFlow loss is at least $\times 100$ smaller than the maximum loss for all $t>0.2$.

Our improvement. We propose a simple improvement by using

$$ $\displaystyle w(\bm{x}_{t},t)=1/\operatorname{sg}[\mathcal{L}_{\operatorname{ GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)].$ (15) $$

Similar to Karras et al. (), we keep track of the loss values during training with a small neural net that is optimized alongside $\bm{D}_{\theta}$ using the parameterization $w(\bm{x}_{t},t)=\exp(-f_{\phi}(\bm{x}_{t},t))$.

Ablations. In Tab. 2, we compare our weight with all aforementioned weights. As expected, the uniform weight $w(\bm{x}_{t},t)=1$ has the worst performance, as it is unable to account for vanishing loss as $t\rightarrow 0$. We get noticeable FID gain by using weights such as $1/t$ or which place a larger emphasis on $t=0$. Our weight, which accounts for loss variance w.r.t. both $t$ and $\bm{x}_{t}$, yields the best FID across all three datasets. The gap between baselines and our weight is especially large on CIFAR10.

###### Proposition 2 .

#### 3.2.2 Time Distribution

**Figure 2: Time distribution densities.**
| $d\mathbb{T}(t)\propto$ | CIFAR10 | AFHQv2 | FFHQ |
| --- | --- | --- | --- |
| $\cosh(4(t-0.5))$ | $\mathbf{2.61}$ | $2.74$ | $\underline{3.83}$ |
| $\operatorname{lognormal}$ | $3.28$ | $3.20$ | $4.48$ |
| $\mathrm{uniform}~{}(1^{t})$ | $2.65$ | $\underline{2.70}$ | $3.85$ |
| $10^{t}$ | $\underline{2.62}$ | $\mathbf{2.69}$ | $\mathbf{3.77}$ |
| $100^{t}$ | $2.68$ | $\mathbf{2.69}$ | $3.93$ |

Previous practice. Liu et al. () and Zhu et al. () use a uniform distribution on $(0,1)$. On the other hand, Lee et al. () notice better performance with a time distribution whose density is proportional to a shifted hyperbolic cosine function, i.e., $d\mathbb{T}(t)\propto\cosh(4(t-0.5))$, which has peaks at $t=0$ and $1$. The rationale behind using such a distribution is that, as Eq. (3) converges to the OT ODE with ReFlows, the denoiser needs to directly predict data from noise at $t\approx 1$ and vice versa at $t\approx 0$, so it is beneficial to emphasize those regions via $\mathbb{T}$.

Our improvement. The peak at $t=0$ of the baseline $\cosh$ time density compensates for vanishing loss as $t\rightarrow 0$, but as we normalize the loss with our weight, this peak is now no longer necessary. Thus, we use a distribution with density proportional to the increasing exponential, i.e., $d\mathbb{T}(t)\propto a^{t}$ for $a\geq 1$.

Ablations. We compare the performance of the exponential distribution with $a\in\{1,10,100\}$, where $a=1$ corresponds to the uniform distribution. We also compare with the lognormal distribution, which has been observed to be effective for training DMs and CMs (Karras et al., ; ; Song & Dhariwal, )
Fig. 2 displays time densities, and Tab. 3 shows training results. We first note that an emphasis on $t=1$ is necessary, as evidenced by severe FID degradation with the lognormal distribution.
We then observe that $10^{t}$, which closely resembles the $\cosh$ distribution, but without the peak at $t=0$, has consistently good performance, while suffering from a slight loss on CIFAR10. Other choices such as $1^{t}$ or $100^{t}$ are either too flat or sharp, yielding worse FID. Hence, we propose to take $d\mathbb{T}(t)\propto 10^{t}$.

Figure: (a) $\bm{v}_{\theta}(\bm{x}_{t},t)$
Refer to caption: x3.png

#### 3.2.3 Loss Function

Previous practice. To accelerate convergence and mitigate sample quality degradation during ReFlow, previous works have employed heuristic losses in Eq. (2) such as LPIPS and

$$ $\displaystyle\ell(\bm{x},\bm{y})=\begin{cases}(1/t)\cdot(\|\bm{x}-\bm{y}\|_{2} ^{2}+(ct)^{2})^{1/2}-c&\text{Pseudo-Huber (PH) \cite[citep]{(\@@bibref{Authors Phrase1Year}{lee2024rfpp}{\@@citephrase{, }}{})}},\\ \operatorname{LPIPS}(\bm{x},\bm{y})+(1-t)\cdot\operatorname{PH}(\bm{x},\bm{y}) &\text{LPIPS+PH \cite[citep]{(\@@bibref{AuthorsPhrase1Year}{lee2024rfpp}{ \@@citephrase{, }}{})}}.\end{cases}$ $$

While such losses perform better in practice than $\ell_{\operatorname{MSE}}$ in terms of FID, they do not ensure Eq. (1) is minimized at optimality, and so lose the theoretical guarantees of FM. We demonstrate this below.

Fig. 3 compares FM with $\ell_{\operatorname{MSE}}$ and PH, where $\mathbb{P}_{1}$ is unit Gaussian and $\mathbb{P}_{0}$ is a mixture of Gaussians. As shown in Fig. 3(a), the two models learn distinct vector fields, so PH indeed induces different ODE trajectories. While the model trained with $\ell_{\operatorname{MSE}}$ translates between $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$ accurately, the model trained with PH generates incorrect distributions, e.g., the model density is not isotropic at $t=1$, and modes are biased at $t=0$. So, instead of relying on empirical arguments (e.g., Section 4 in Lee et al. ()) to justify heuristic losses,
we show that a proper choice of the invertible linear map $\phi$ in Eq. (12) can still offer non-trivial performance gains while adhering to FM theory.

**Table 4: Comparison of various $\ell$ combined with our $w(\bm{x}_{t},t)$ and $\mathbb{T}$.**
| Loss | CIFAR10 | AFHQv2 | FFHQ |
| --- | --- | --- | --- |
| $\ell_{\operatorname{MSE}}$ | $2.62$ | $2.69$ | $3.77$ |
| PH | $\underline{2.59}$ | $2.71$ | $\underline{3.75}$ |
| LPIPS | $2.81$ | $2.65$ | $4.02$ |
| LPIPS+PH | $2.63$ | $2.72$ | $3.79$ |
| $\ell_{\bm{I}+0.1\operatorname{HPF}}$ | $2.63$ | $\underline{2.62}$ | $3.76$ |
| $\ell_{\bm{I}+10\operatorname{HPF}}$ | $\mathbf{2.58}$ | $\mathbf{2.55}$ | $\mathbf{3.69}$ |
| $\ell_{\bm{I}+1000\operatorname{HPF}}$ | $3.20$ | $2.79$ | $4.43$ |

Our improvement. Previous works have observed high-frequency features are crucial to diffusion-based modeling of image datasets (Kadkhodaie et al., ; Zhang & Hooi, ; Yang et al., ). Moreover, since we initialize $\bm{D}_{\theta}$ with a pre-trained DM, we assert that the model already has a good representation of low-frequency visual features. Hence, to accelerate the learning of high-frequency features, we propose calculating the difference of denoiser output $\bm{D}_{\theta}(\bm{x}_{t},t)$ and clean data $\bm{x}_{0}$ after passing them through a high-pass filter (HPF) using the linear map, i.e., use $\ell_{\phi}$ in Eq. (12) with

$$ $\displaystyle\phi=\bm{I}+\lambda\cdot\operatorname{HPF}$ (16) $$

where $\lambda>0$ controls the emphasis on high-frequency features. The identity matrix in Eq. (16) is necessary to ensure that $\phi$ is invertible, so Eq. (1) is minimized at optimality per Prop. 1.

We also remark that using $\ell_{\phi}$ can be interpreted as preconditioning the gradient. Specifically, since

$$ $\displaystyle\nabla_{\bm{D}_{\theta}}\ell_{\phi}(\bm{x}_{0},\bm{D}_{\theta}( \bm{x}_{t},t))$ $\displaystyle=\phi^{\top}\phi\{\nabla_{\bm{D}_{\theta}}\ell_{\operatorname{MSE }}(\bm{x}_{0},\bm{D}_{\theta}(\bm{x}_{t},t))\},$ (17) $$

using $\ell_{\phi}$ in place of $\ell_{\operatorname{MSE}}$ is equivalent to scaling the original FM loss gradient along the eigenvectors of $\phi^{\top}\phi$ by the corresponding eigenvalues. For instance, $\ell_{\phi}$ with Eq. (16) amplifies gradient magnitudes along high-frequency features by $(\lambda+1)$, and leaves gradient magnitudes along low-frequency features unchanged. This perspective provides another justification for using $\ell_{\phi}$, since using an appropriate preconditioning matrix can accelerate convergence (Kingma & Ba, ).

Ablations. Tab. 4 compares our loss $\ell_{\bm{I}+\lambda\operatorname{HPF}}$ for $\lambda\in\{0.1,10,1000\}$ with $\ell_{\operatorname{MSE}}$ and the heuristic losses. If $\lambda$ is too small, $\ell_{\bm{I}+\lambda\operatorname{HPF}}$ has little improvement compared to $\ell_{\operatorname{MSE}}$, whereas if $\lambda$ is too large, $\phi$ becomes nearly singular, leading to a severe drop in the FID. Our loss with $\lambda=10$ provides consistent improvement over $\ell_{\operatorname{MSE}}$, doing even better than PH and LPIPS. Indeed, in Fig. 4 which visualizes FID change w.r.t. $\ell_{\operatorname{MSE}}$ for various values of $\lambda$, we observe $\lambda=10$ provides the optimal performance across all datasets. Morever, CIFAR10 learning curves in Fig. 5 verify that $\ell_{\bm{I}+10\operatorname{HPF}}$ enjoys fast convergence compared to all other losses.

### 3.3 Improving Learning

#### 3.3.1 Model Dropout

Previous practice. Similar to simple diffusion (Hoogeboom et al., ), we find dropout to be highly impactful. There is little study on the impact of dropout in denoiser UNets for ReFlow. Dropout rates in ReFlow denoiser UNets are usually set to $0.15$ (Liu et al., ; Zhu et al., ), or equal to the dropout rates of DMs that are used to initialize ReFlow denoisers (Lee et al., ). For the EDM networks, dropout rates are $0.13$ on CIFAR10, $0.25$ on AFHQv2, and $0.05$ on FFHQ.

Our improvement. We observe that learning the OT ODE is a harder task than learning the diffusion probability flow ODE. For instance, at $t=1$, the optimal DM denoiser only needs to predict the data mean $\mathbb{E}_{\bm{x}_{0}\sim\mathbb{P}_{0}}[\bm{x}_{0}]$ for any input $\bm{x}_{1}\sim\mathbb{P}_{1}$, but an optimal ReFlow denoiser has to directly map noise to image along the bijective OT map. This means we need a larger Lipschitz constant for the ReFlow denoiser (Salmona et al., ), so we use smaller dropout rates during ReFlow training in favor of larger effective UNet capacity over stronger regularization.

**Figure 6: Dropout $p$ ablation.**
|  | CIFAR10 | AFHQv2 | FFHQ |
| --- | --- | --- | --- |
| RF $\ p=$ | $0.15$ | $0.15$ | $0.15$ |
| EDM $p=$ | $0.13$ | $0.25$ | $0.05$ |
| Ours $p=$ | $0.09$ | $0.09$ | $0.03$ |

Figure: Figure 7: $\rho$ ablation. Solid and dotted lines show results w/o and with improved dynamics, resp.
Refer to caption: x9.png

Ablations. To verify that smaller dropout rates are beneficial, we return to the baseline training setting (Tab. 1), and run a grid search over dropout probability $p\in[0,0.15]$. In Fig. 6, which shows FID change w.r.t. baseline $p=0.15$, we find that smaller $p$ is always beneficial. In fact, optimal $p$ are even smaller than those used to train EDM denoisers, despite using the same architecture (Tab. 6). FIDs after applying optimal dropout to baseline are written in row BSL+OP of Tab. 6. We also observe in row DYN+OP that optimal dropout rates can be combined with improved dynamics to further enhance performance without additional grid search over $p$.

#### 3.3.2 Training Coupling

Previous practice. A common practice is to generate a large number of pairs from $\mathbb{Q}_{01}^{1}$ by solving the diffusion probability flow ODE Eq. (6) backwards, i.e., from noise to data, and use the generated set as an empirical approximation of $\mathbb{Q}_{01}^{1}$ throughout training (Liu et al., ; Lee et al., ; Zhu et al., ; Liu et al., ). However, the set of generated $\bm{x}_{0}$ is only an approximation of the true marginal $\mathbb{P}_{0}$, so naively training with generated data will accumulate error on the marginal at $t=0$.

Our improvement – forward pairs. To mitigate error accumulation at $t=0$, we incorporate pairs generated by solving the diffusion probability flow ODE forwards, starting from data, coined forward pairs. We assert forward pairs can be helpful, as $\bm{x}_{0}$ are exactly data points.

To use forward pairs, we first invert the training sets for each dataset, which yields additional $50k$ pairs for CIFAR10, $13.5k$ pairs for AFHQv2, and $70k$ pairs for FFHQ. Due to the small number of forward pairs, we use them in combination with backward pairs, and to prevent forward pairs from being ignored due to the large number of backward pairs, we sample forward pairs with probability $\rho$ and backward pairs with probability $1-\rho$ at each step of the optimization.

Our improvement – projected pairs. We also propose projecting the coupling $\mathbb{Q}_{01}^{1}$ to $\Pi(\mathbb{P}_{0},\mathbb{P}_{1})$, the set of joint distributions with marginals $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$, by solving the optimization problem

$$ $\displaystyle\textstyle\widehat{\mathbb{Q}}_{01}^{1}=\operatorname*{arg\,min}_ {\Gamma_{01}}W_{p}(\Gamma_{01},\mathbb{Q}_{01}^{1})\quad s.t.\quad\Gamma_{01} \in\Pi(\mathbb{P}_{0},\mathbb{P}_{1})$ (18) $$

where $W_{p}$ is the $p$-Wasserstein distance (Villani, ), and using the projected coupling $\widehat{\mathbb{Q}}_{01}^{1}$ in place of the original during training. Intuitively, this procedure can be understood as fine-tuning the generated marginals to adhere to the true marginals without losing the coupling information in $\mathbb{Q}_{01}^{1}$. The full optimization procedure is described in Appendix D.

Ablations. In Fig. 7, we see that it is always beneficial to use forward pairs, as long is $\rho$ is not too high, e.g., $\rho\leq 0.5$. Otherwise, the model starts overfitting to the forward pairs. Interestingly, on FFHQ, using forward pairs without improved training dynamics has no improvement in the FID, implying that improved dynamics may be necessary to make the best out of the rich information contained in the forward pairs. In rows BSL+OP+Projected and DYN+OP+Projected of Tab. 6, we observe that projected pairs also offer improvements in the FID score across all three datasets.

**Table 7: Various discretizations applied to our best models and DPM-Solver with $r=0.4$.**
|  | CIFAR10 | AFHQv2 | FFHQ |
| --- | --- | --- | --- |
| Unif. | $2.36_{\triangledown 0.47}$ | $2.34_{\triangledown 0.53}$ | $2.97_{\triangledown 1.31}$ |
| EDM | $2.80_{\triangledown 0.03}$ | $3.61_{\vartriangle 0.74}$ | $6.78_{\vartriangle 2.50}$ |
| Ours |  |  |  |
| $\kappa=10$ | $\underline{2.31}_{\triangledown 0.52}$ | $\underline{2.31}_{\triangledown 0.56}$ | $\underline{2.87}_{\triangledown 1.41}$ |
| $\kappa=20$ | $\mathbf{2.23}_{\triangledown 0.60}$ | $\mathbf{2.30}_{\triangledown 0.57}$ | $\mathbf{2.84}_{\triangledown 1.44}$ |
| $\kappa=30$ | $2.45_{\triangledown 0.38}$ | $2.78_{\triangledown 0.09}$ | $3.32_{\triangledown 0.96}$ |

### 3.4 Improving Inference

Figure: Figure 10: Discretizations.
Refer to caption: x12.png

Previous practice. To generate data after ReFlow, previous works often use an uniform discretization $\{t_{i}=i/N:i=0,\ldots,N\}$ of $[0,1]$ along with the Euler or Heun to integrate Eq. (3) from $t=1$ to 0 0 (Liu et al., ; ; Lee et al., ; Zhu et al., ).

Our improvement. As the ReFlow ODE converges to the OT ODE, we assert that high-curvature regions in ODE paths now occur near $t\in\{0,1\}$. While the previously proposed EDM schedule

$$ $\displaystyle\textstyle t_{0}=0,\quad t_{i}=\frac{\sigma_{i}}{\sigma_{i}+1}\ \ \textit{where}\ \ \sigma_{i}=(\sigma_{\min}^{1/d}+\frac{i}{N}(\sigma_{\max}^ {1/d}-\sigma_{\min}^{1/d}))^{d}$ $$

for solving diffusion probability flow ODEs emphasizes $t\in\{0,1\}$, we note that it does not perform better than the uniform discretization, as shown in Tab. 7. Similar to Lin et al. (), we speculate that this is because $t_{N}<1$. Specifically,
$\bm{v}_{\theta}(\bm{x}_{1},t_{N})\neq\bm{v}_{\theta}(\bm{x}_{1},1)$ since $t_{N}\neq 1$, but the integration of the ODE is done with $\bm{v}_{\theta}(\bm{x}_{1},t_{N})$ in place of $\bm{v}_{\theta}(\bm{x}_{1},1)$, leading to erroneous ODE trajectories.

Instead of tuning $\{\sigma_{\min},\sigma_{\max},d\}$ to address this problem, we propose a simple sigmoid schedule

$$ $\displaystyle\textstyle\{t_{i}=(\operatorname{sig}(\kappa(\frac{i}{N}-0.5))- \operatorname{sig}(-\frac{\kappa}{2}))/(\operatorname{sig}(\frac{\kappa}{2})- \operatorname{sig}(-\frac{\kappa}{2})):i=0,\ldots,N\}$ (19) $$

with one parameter $\kappa$ which controls the concentration of $t_{i}$ at $t\in\{0,1\}$. Here, $\operatorname{sig}$ is the sigmoid function. As $\kappa\rightarrow 0$, $\{t_{i}\}$ converges to the uniform discretization, and as $\kappa\rightarrow\infty$, all $t_{i}$ with $i<N/2$ will converge to 0 0, and all $t_{i}$ with $i>N/2$ will converge to $1$.

To solve the ODE Eq. (3), we consider DPM-Solver (Lu et al., ) with the update rule

$$ $\displaystyle\textstyle\bm{x}_{t_{i}}\leftarrow\bm{x}_{t_{i+1}}+(t_{i}-t_{i+1} )(\frac{1}{2r}\bm{v}_{\theta}(\bm{x}_{s_{i+1}},s_{i+1})+(1-\frac{1}{2r})\bm{v} _{\theta}(\bm{x}_{t_{i+1}},t_{i+1}))$ (20) $$

where $s_{i+1}=t_{i}^{r}t_{i+1}^{1-r}$ and $r\in(0,1]$. We recover the second order Heun update (the baseline solver) with $r=1$, but we assert that we can obtain better performance by tuning $r$.

Ablations. In Tab. 7, we display results for solving Eq. (3) with various discretizations and DPM-Solver with $r=0.4$. First, row $\kappa=10$ shows that we can indeed mitigate the timestep mismatch problem in the EDM schedule. It also shows we can gain improvements by using $r<1$ (in the baseline setting, we use the sigmoid schedule with $\kappa=10$ and Heun). See Appendix F.2 for a full ablation over $r$. Second, rows $\kappa=20$, $30$ tells us we can get even better results by increasing sharpness, but too large $\kappa$ hurts performance.

To investigate the performance difference between discretizations, we visualize local truncation error $\|\bm{\tau}\|_{2}$ in Fig. 8, where $\bm{\tau}$ given time-step $t_{i}$ and $\bm{x}_{t_{i+1}}\sim\mathbb{Q}_{t_{i+1}}$ is defined as

$$ $\displaystyle\textstyle\bm{\tau}=(\bm{x}_{t_{i+1}}+(t_{i}-t_{i+1})\bm{v}_{ \theta}(\bm{x}_{t_{i+1}},t_{i+1}))-\operatorname{solve}(\bm{x}_{t_{i+1}},\bm{D }_{\theta},t_{i+1},t_{i}).$ $$

We first note that the uniform distribution incurs large error near $t\in\{0,1\}$. This highlights that we indeed must place more points near those $t$ in order to control discretization error. While the EDM schedule has less error at those regions, because $t_{N}\neq 1$, the mismatch between the initial state $\bm{x}_{1}$ and time $t_{N}$ does not ensure the ODE is solved properly. Finally, we see that our schedule is able to control the error at the extremes. While the error for our schedule increases near $t\approx 0.5$, Fig. 9 tells us we can sacrifice accuracy at intermediate $t$ to prioritize perceptual quality by choosing a large $\kappa$.

**Table 8: Comparison of neural ODE methods. MOT-$b$ is minibatch OT with minibatch size $b$, and MinCurv is curvature minimizing flow. We report FID and straightness (STN): $\textstyle S(\bm{v}_{\theta})\coloneqq\int_{0}^{1}\mathbb{E}\left[\|(\bm{x}_{1 }-\bm{x}_{0})-\bm{v}_{\theta}(\bm{x}_{t},t)\|_{2}\right]\,\mathrm{d}t$. Star * next to a method denotes our training results.**
| Method | CIFAR10 | AFHQv2 | FFHQ | ImageNet (cond.) | Reference |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| NFE | FID | STN | NFE | FID | STN | NFE | FID | STN | NFE | FID | STN |  |  |
| DM ODE |  |  |  |  |  |  |  |  |  |  |  |  |  |
| EDM | $35$ | $1.97$ | $14.19$ | $79$ | $1.96$ | $28.41$ | $79$ | $2.39$ | $27.15$ | $79$ | $2.30$ | $26.76$ | (Karras et al., ) |
|  | $9$ | $37.91$ | – | $9$ | $28.03$ | – | $9$ | $56.84$ | – | $9$ | $35.46$ | – |  |
| DPM-Solver | 9 | $4.98$ | – | – | – | – | 9 | $9.26$ | – | 9 | $6.64$ | – | (Lu et al., ) |
| AMED-Solver | 9 | $2.63$ | – | – | – | – | 9 | $4.24$ | – | 9 | $5.60$ | – | (Zhou et al., ) |
| FM ODE |  |  |  |  |  |  |  |  |  |  |  |  |  |
| MinCurv | 9 | $8.76$ | $5.87$ | 9 | $13.63$ | $10.45$ | 9 | $10.44$ | $10.49$ | – | – | – | (Lee et al., ) |
| FM-OT | 142 | $6.35$ | – | – | – | – | – | – | – | 138 | $14.45$ | – | (Lipman et al., ) |
| OT-CFM | 100 | $4.44$ | – | – | – | – | – | – | – | – | – | – | (Tong et al., ) |
| MOT-50 | – | – | – | – | – | – | – | – | – | 132 | $11.82$ | – | (Pooladian et al., ) |
| FM* | 100 | $2.96$ | $10.73$ | 100 | $2.73$ | $16.20$ | 100 | $3.30$ | $16.71$ | – | – | – | Baseline |
| MOT-512* | 100 | $3.29$ | $8.77$ | 100 | $5.53$ | $13.45$ | 100 | $4.69$ | $14.29$ | – | – | – |  |
| MOT-1024* | 100 | $3.18$ | $8.59$ | 100 | $5.83$ | $13.45$ | 100 | $4.84$ | $14.07$ | – | – | – |  |
| MOT-4096* | 100 | $3.16$ | $8.34$ | 100 | $6.18$ | $12.68$ | 100 | $4.92$ | $13.47$ | – | – | – |  |
| ReFlow | 110 | $3.36$ | – | – | – | – | – | – | – | – | – | – | (Liu et al., ) |
| Simple ReFlow* | 9 | $2.23$ | $1.64$ | 9 | $2.30$ | $3.30$ | 9 | $2.84$ | $2.87$ | 9 | $3.49$ | $2.72$ | Ours |
| + Guidance* | 9 | $1.98$ | $2.49$ | 9 | $1.91$ | $5.60$ | 9 | $2.67$ | $3.24$ | 9 | $1.74$ | $3.92$ |  |

## 4 Applications

Comparison to other fast flow methods. Our approach significantly outperforms other ODE approaches, e.g., minibatch-OT FM (Pooladian et al., ; Tong et al., ) and curvature minimization (Lee et al., ), see see Tab. 8. Where possible, we report straightness (Liu et al., ), which quantifies how an ODE trajectory deviates from a straight line between its initial and terminal points (see Tab. 8 and Eq. (21) and further details in Appendix D). We attribute the inferior baseline performance due to bias in minibatch OT, and discuss this and other pitfalls in Appendix A.

Figure: Figure 11: ImageNet-64 FID at 9 NFEs without and with our improvements.
Refer to caption: x13.png

Improving perceptual quality via guidance. DMs often use guidance such as classifier-free guidance (CFG) (Ho & Salimans, ) or autoguidance (AG) (Karras et al., ) to enhance the perceptual quality of samples. As observed by Liu et al. (), conditional ReFlow models can also easily be combined with CFG. While it is unclear what effect guidance has on the marginals of ReFlow models, we also try applying AG / CFG to our best unconditional / conditional models, since perceptual quality may be of interest for certain downstream tasks. We already achieve state-of-the-art results for fast ODE-based generation with our improved choices, but we obtain even lower FID scores with guidance, as shown in the last row of Tab. 8. See Appendix F.2 for a full ablation over guidance strength.

ReFlow on class-conditional ImageNet-64. To verify the scalability of our improvements, we apply our training dynamics (DYN), learning (LRN), and inference (INF) choices to ReFlow with the class-conditional ImageNet-64 EDM model. We use $8M$ backward pairs, $4M$ forward pairs, and $\rho=0.2$ for this experiment.
Fig. 11 at CFG scale $w=0$, i.e., no guidance, confirms that our techniques are effective. DYN+LRN improves BSL FID from $4.27$ to $3.91$, and INF further improves the FID to $3.49$, which is better than FIDs of state-of-the-art fast flow methods. Finally, with CFG $w=0.4$, our DYN+LRN+INF model achieves an even better FID score of $1.74$. Our techniques also consistently improve CFG FIDs, implying that they offer orthogonal benefits.

## 5 Conclusion

In this paper, we decompose the design of ReFlow into three groups – training dynamics, learning, and inference. Within each group, we examine previous practices and their potential pitfalls, which we overcome with seven improved choices for loss weight, time distribution, loss function, model dropout, training data, ODE discretization and solver. We verify the robustness of our techniques via extensive analysis on CIFAR10, AFHQv2, and FFHQ, and their scalability by ReFlow on ImageNet-64. Our techniques yield state-of-the-art results among fast neural ODE methods, without latent-encoders, perceptual losses, or premetrics.

## Appendix A Faster ODEs via Couplings

### A.1 Faster sampling via straight paths

Generative ODEs with straight trajectories can be solved accurately with substantially fewer velocity evaluations than those with high-curvature trajectories (Stoer & Bulisch, ). In fact, probability flow ODEs with perfectly straight trajectories can translate one distribution to another with a single Euler step. For an ODE with velocity $\bm{v}_{\theta}$, we can quantify its straightness as (Liu et al., ):

$$ $\displaystyle\textstyle S(\bm{v}_{\theta})\coloneqq\int_{0}^{1}\mathbb{E}\left [\|(\bm{x}_{1}-\bm{x}_{0})-\bm{v}_{\theta}(\bm{x}_{t},t)\|_{2}\right]\,\mathrm {d}t$ (21) $$

where the expectation is over ODE trajectories $\{\bm{x}_{t}:t\in[0,1]\}$ generated by $\bm{v}_{\theta}$. An ODE with zero straightness has linear trajectories, which means it can translate initial points to terminal points with a single function evaluation.

One approach to encourage straight paths is to learn ODEs which minimize trajectory curvature (Lee et al., ) by parameterizing the coupling with a neural network which takes as input some image and outputs a sample such the distribution of these samples is close to Gaussian. Another approach is based on connections to optimal transport.

### A.2 Connection to Optimal Transport

For any convex ground cost, the solution to the dynamic optimal transport on continuous support will be straight trajectories, see e.g. Liu (). In addition, training a flow matching model on samples from an optimal transport coupling will preserve the coupling, providing the vector field of the flow matching model is of a specific form as detailed in Section A.2.2.

As an aside, more generally performing bridge matching (Peluchetti, ) on an entropically-regularized optimal coupling will preserve the coupling, though the trajectory will be given by an SDE, and hence no longer straight. In the limit as the entropic regularization term tends to zero, then this recovers the non-regularized optimal coupling with squared Euclidean ground cost (Shi et al., ; Peluchetti, ).

This motivates learning an optimal transport (OT) coupling and then performing bridge / flow matching on this coupling. There are two dominant ways to do this, either ReFlow (also known as Iterative Markovian fitting) (Liu et al., ; Liu, ; Lee et al., ; Shi et al., ) or approximating the coupling using mini-batches (Tong et al., ; Pooladian et al., ).

#### A.2.1 Mini-batch Optimal Transport Flow Matching

We first make a distinction between the loss batch size $b_{\text{loss}}$ and coupling batch size $b_{\text{coupling}}$ where $b_{\text{coupling}}\geq b_{\text{loss}}$. The loss batch size, $b_{\text{loss}}$, is the number of input pairs $(x_{0},x_{1})$ used per training iteration in the flow matching loss Eq. (1), whereas the coupling batch size, $b_{\text{coupling}}$, refers to the number of independently sampled pairs used as input into the mini-batch OT solver.

The procedure for obtaining mini-batch couplings is to first independently sample $b_{\text{coupling}}$ items denoted $(y_{i})_{i=1}^{b_{\text{coupling}}}$ $(x_{i})_{i=1}^{b_{\text{coupling}}}$ from both marginal distributions $x_{i}\sim\mathbb{P}_{0}$ and $y_{i}\sim\mathbb{P}_{1}$. The next step is to run a mini-batch OT solver to obtain a coupling matrix $P=(p_{i,j})_{i=1,j=1}^{b_{\text{coupling}}}$ such that $\sum_{i,j}p_{i,j}=1$, $\sum_{i}p_{i,j}=1/b_{\text{coupling}}$, $\sum_{j}p_{i,j}=1/{b_{\text{coupling}}}$.

The final step is to sub-sample the coupling batch of size $b_{\text{coupling}}$ to obtain $b_{\text{loss}}$ aligned pairs $(\tilde{x}_{i},\tilde{y}_{i})_{i=1}^{b_{\text{loss}}}\sim P$, which are then fed into loss Eq. (1) and corresponding standard gradient based optimization procedure.

Mini-batch bias. In stochastic gradient descent, for example, losses computed on uniformly sampled batches are unbiased with respect to the measures the batches were sampled from. This is not true for mini-batch OT couplings with respect to the true OT coupling between marginals (Bellemare et al., ). Indeed, marginal preservation within mini-batches may force points in each minibatchto be mapped together, such points may not be mapped, or have very low probability of being mapped, in the true OT coupling. Asymptotically the mini-batch couplings should converge to the true OT coupling solvers the mini-batch size increases. Unfortunately, this is not practically feasible with discrete OT solvers for large datasets or indeed for measures with continuous support. The mini-batch and true OT couplings would also be the same for infinite regularization, indeed the couplings would both be independent couplings and so not very informative.

Subsampling.
Computing OT couplings for large batch sizes is not typically possible using the Hungarian algorithm (Kuhn, ) due to the cubic time complexity. However, entropic approximations from Sinkhorn (Sinkhorn, ) is of only quadratic complexity and can be implemented on modern GPU-accelerators (Cuturi, ; Cuturi et al., ), hence enables fast computation of discrete entropic OT for batches in excess of $100,000$ points.

Prior works (Tong et al., ; Pooladian et al., ) set $b_{\text{loss}}=b_{\text{coupling}}$ and do not subsample. This is problematic as mini-batch OT is only justified as being close to optimal in the asymptotically large batch regime. Although we can compute the coupling for large batch sizes, the optimization setup for training the neural network via FM is limited by hardware memory and so it becomes infeasible to set $b_{\text{loss}}=b_{\text{coupling}}$ for large batch size. Prior works therefore use small coupling batch size.

Subsampling should still preserve marginal distributions. We observe in Tab. 8 that the straightness of the generative trajectories increases as batch size grows, as expected, however generative performance in terms of FID gets increasingly worse compared to regular flow matching. This is a surprising empirical result that warrants further investigation.

#### A.2.2 ReFlow and Iterative Markovian Fitting

ReFlow (Liu et al., ; Liu, ; Lee et al., ) and more generally Iterative Markovian Fitting (Shi et al., ) are procedures which iteratively refine the coupling between marginals. We shall focus on ReFlow for brevity. ReFlow first takes an independent coupling, then involves training a flow between samples from that coupling, known as a Markovian projection. Simulating from this trained flow is then used to define an updated coupling. This process is repeated between updating a flow and coupling until convergence. It has been shown that this process iteratively reduces the transport cost for any convex ground cost, and hence straightens the paths between coupling whilst retaining the correct marginals.

Note that ReFlow results in a coupling which is slightly stronger than optimal transport. OT aims to minimize the transport cost for a specific ground cost function, whereas ReFlow reduces transport cost for all convex costs. However, ReFlow can be limited to a specific cost by ensuring the vector field takes a specific conservative form (Liu, ).

## Appendix B Fast Sampling via Higher Order Solvers

One can use higher-order solvers which utilize higher order differentials of the ODE velocity to take large integration steps or reduce truncation error (Karras et al., ; Dockhorn et al., ; Lu et al., ; Zhang & Chen, ). While this approach is generally training-free, recent works (Zhou et al., ; Kim et al., ) have incorporated trainable components which minimize truncation error to further accelerate sampling.

## Appendix C Distillation and Consistency Models

The goal of distillation is to compress multiple probability flow ODE steps of a teacher diffusion model into a single evaluation of a student model. Representative methods are progressive distillation (Salimans & Ho, ), and consistency distillation (Song et al., ; Song & Dhariwal, ; Kim et al., ; Geng et al., ). While distillation and ReFlow are similar in the aspect that they train a new model using a teacher diffusion model, we emphasize that they are, in fact, orthogonal approaches, and can benefit from one another. We discussion this point in more detail in the following section.

### C.1 ReFlow vs. Distillation

We also remark that faster ODEs have several practical benefits over distillation. Since translation along an ODE is a bijective map, we can achieve fast inversion and likelihood evaluation by integrating the ODE backwards starting from data. Furthermore, faster ODEs can be combined with distillation or fast samplers to achieve a greater effect. For instance, Lee et al. (); Liu et al. (); Zhu et al. () have observed it is substantially easier to distill ODE models with straight trajectories. Lee et al. (; ) also report combining RF models with higher-order solvers improves the trade-off between generation speed and quality.

## Appendix D Experiment Settings

**Table 9: Training hyper-parameters.**
|  | CIFAR10 | AFHQv2 | FFHQ | ImageNet-64 |
| --- | --- | --- | --- | --- |
| Iterations | $200k$ | $200k$ | $200k$ | $500k$ |
| Minibatch Size | 512 | 256 | 256 | 1024 |
| Adam LR | $210-4$ | $210-4$ | $210-4$ | $210-4$ |
| Label dropout | – | – | – | 0.1 |
| EMA | 0.9999 | 0.9999 | 0.9999 | 0.9999 |
| Num. Backward Pairs | $1M$ | $1M$ | $1M$ | $8M$ |
| Num. Forward Pairs | $50k$ | $13.5k$ | $70k$ | $4M$ |

### D.1 Training and Evaluation

To evaluate a training setting, we initialize ReFlow denoisers with pre-trained EDM (Karras et al., ) denoisers, and optimize Eq. (13) with $\mathbb{Q}_{01}=\mathbb{Q}_{01}^{1}$ of Eq. (7). Specific optimization hyper-parameters are reported in Tab. 9. We sample backward and forward pairs from $\mathbb{Q}_{01}^{1}$ by solving Eq. (6) with EDM models and use them throughout training. Specifically, we use the EDM discretization with the Heun solver (Ascher & Petzold, ). We use sampling budgets of 35 NFEs for CIFAR10 and 79 NFEs for AFHQv2, FFHQ, and ImageNet. FIDs of backward training samples are reported in the first row of Tab. 8.

We measure the generative performance of the optimized model by computing the FID (Heusel et al., ) between $50k$ generated images and all available dataset images. Inception statistics are computed using the pre-trained Inception-v3 model (Karras et al., ). Samples are generated by solving Eq. (3) with the Heun solver with 9 NFEs, and we report the minimum FID score out of three random generation trials, as done by Karras et al. (). For reasons described in Appendix F.1, we use the sigmoid discretization instead of the baseline uniform discretization.

### D.2 Flow Matching Baselines

We strove to obtain competitive baselines for base and mini-batch OT flow matching methods, and indeed achieved superior performance to comparable implementations from Tong et al. () on the datasets considered.

Firstly, similar to Karras et al. (), we formulate flow matching as $x_{0}$ or mean-prediction rather than using regression target $X_{0}-X_{1}$. We parameterize the mean-prediction to be of form $D_{\theta}(x_{t},t)=c_{\text{skip}}(t)x_{t}+c_{\text{out}}(t)F_{\theta}(c_{
\text{in}}(t),c_{\sigma}(t))$ where $F_{\theta}$ is a neural network:

$$ $\mathbb{E}_{t,\mathbf{X}_{t},\mathbf{X}_{0}}\lambda(t)\|D_{\theta}(\mathbf{X}_ {t},t)-\mathbf{X}_{0}\|^{2}.$ (22) $$

The scalar functions $c_{\sigma},c_{\text{skip}},c_{\text{out}},c_{\text{in}},\lambda(t)$ are derived according to the reasoning of Karras et al. () in Sec D.2.2. We set $\sigma_{0,T}=0$ for the independent coupling.

Throughout we use the a similar setup as Karras et al. () but with the flow matching loss and new preconditioning. In particular for AFHQv2, FFHQ and CIFAR10 we use the SongNet from Song et al. () with corresponding hyperparameters from Karras et al. () per dataset.

The time-sampling during training is taken to be uniform and the Euler solver with $100$ steps is used for computing FID and straightness metrics, in order to be comparable to other reported baselines from Tong et al. ().

#### D.2.1 Mini-batch Flow Matching

The mini-batch flow matching experiments use the same learning rate, networks, and training objectives as base flow matching. The primary difference is in how the inputs, $\mathbf{X}_{t},\mathbf{X}_{0}$, are sampled.

We follow the procedure outlined in Sec. A.2.1 for sampling mini-batches, using Sinkhorn (Sinkhorn, ; Cuturi, ) as the mini-batch solver based on the OTT-JAX library (Cuturi et al., ). Images were scaled to $[-1,1]$ as is standard in diffusion models and flattened. The squared Euclidean ground cost was used.

The regularization parameter was set to $\epsilon=2$, qualitatively this provided a reasonable trade-off between meaningful coupling visually and the time to compute using convergence threshold defaults from Cuturi et al. (). The default regularization parameter from Cuturi et al. () did not provide a visually meaningful coupling on large batches, and setting parameter less than $\epsilon<1$ took over the maximum iteration threshold of $2,000$ iterations to converge, and hence was not feasible for training.

Each Sinkhorn loop took approximately $100-200$ Sinkhorn iterations without acceleration techniques, and wall-clock time up to roughly $0.8$s for the largest coupling batch size $8192$. We then ran acceleration techniques including Anderson acceleration (Anderson, ) with memory $2$, epsilon decay starting from $10$, and initializing potentials from prior batches to reduce runtime. This sped up the mini-batch process to $0.4$s per Sinkhorn loop, and convergence of Sinkhorn in approximately $20-30$ Sinkhorn iterations.

We ablated the coupling batch size between $512,1024,4096,8192$. The loss batch size was kept constant at $512$ for CIFAR10 and $256$ for AFHQV2 and FFHQ.

Scope for further improvements: Unfortunately, $\mathbb{C}ov[X_{0},x_{T}]=\sigma_{0,T}^{2}$ is not known for mini-batch couplings and hence as in the independent coupling we set $\sigma_{0,T}=0$ in the preconditioning computation. It is possible that this is sub-optimal and may be estimated in better ways.

Although straightness improves with larger batch size and our implementation achieves better FID scores than prior baselines, mini-batch OT flow matching is still not well understood. It is puzzling as to why performance in terms of FID gets worse compared to base flow matching. This is corroborated in Table 5 of Tong et al. () where FID for CIFAR10 is $3.74$ with the mini-batch coupling and $3.64$ with independent coupling, however we notice a significant discrepancy at $2.98$ FID for the independent coupling and $3.16$ for the best mini-batch coupling. We leave further investigations to future work.

#### D.2.2 Preconditioning

In the interest of generality, we derive EDM-style preconditioning (Karras et al., ) for the more general case of bridge matching / stochastic interpolant (Peluchetti, ; ; Shi et al., ; Albergo et al., ) which recovers preconditioning for flow matching for $\gamma_{t}=0$,

Let $\mathbf{X}_{t}=\alpha_{t}\mathbf{X}_{0}+\beta_{t}\mathbf{X}_{T}+\gamma_{t}\epsilon$
where $\epsilon\sim\mathcal{N}(0,\mathbb{I})$. Consider prediction of form $D_{\theta}(x_{t},t)=c_{\text{skip}}(t)x_{t}+c_{\text{out}}(t)F_{\theta}(c_{
\text{in}}(t),c_{\sigma}(t))$ and $\lambda(\cdot)$ weighted loss per $Eq.~{}(\ref{eq:karras_loss})$.

The loss per $Eq.~{}(\ref{eq:karras_loss})$ may be written:

$$ $\displaystyle\mathbb{E}_{t,\mathbf{X}_{t},\mathbf{X}_{0}}\lambda(t)c_{\text{ out}}(t)^{2}\|F_{\theta}(\mathbf{X}_{t},t)-c_{\text{out}}(t)^{-1}(\mathbf{X}_{ 0}-c_{\text{skip}}(t)\mathbf{X}_{t})\|^{2}$ (23) $$

Setting $\lambda(\cdot)$. In order to uniformly weight the loss per time step, we set $\lambda(t)=c_{\text{out}}(t)^{-2}$ similarly to Karras et al. ().

Setting $c_{\text{in}}(t)$. We take the strategy of finding $c_{\text{in}}$ such that $\mathbb{V}ar[c_{\text{in}}(t)\mathbf{X}_{t}]=1.$

Let $\mathbb{V}ar[\mathbf{X}_{0}]=\sigma_{0}^{2}$, $\mathbb{V}ar[\mathbf{X}_{T}]=\sigma_{T}^{2}$ and $\mathbb{C}ov[\mathbf{X}_{0},x_{T}]=\sigma_{0,T}^{2}$

$$ $\displaystyle\mathbb{V}ar[c_{\text{in}}(t)\mathbf{X}_{t}]=c_{\text{in}}(t)^{2} \left[\alpha_{t}^{2}\sigma_{0}^{2}+\beta_{t}^{2}\sigma_{0}^{2}+2\alpha_{t} \beta_{t}\sigma_{0,T}^{2}+\gamma_{t}^{2}\right]=1$ (24) $\displaystyle c_{\text{in}}(t)=\left[\alpha_{t}^{2}\sigma_{0}^{2}+\beta_{t}^{2 }\sigma_{T}^{2}+2\alpha_{t}\beta_{t}\sigma_{0,T}^{2}+\gamma_{t}^{2}\right]^{- \frac{1}{2}}$ (25) $$

Setting $c_{\text{skip}}$ and $c_{\text{out}}$. The prediction target of $D_{\theta}(x_{t},t)$ is $\mathbf{X}_{0}$, hence the target of network $F_{\theta}$ is $c_{\text{out}}(t)^{-1}\left[\mathbf{X}_{0}-c_{\text{skip}}(t)x_{t}\right]$. We choose $c_{\text{skip}}$ and $c_{\text{out}}$ to ensure regression target has uniform variance i.e. $\mathbb{V}ar\left[c_{\text{out}}(t)^{-1}\left[\mathbf{X}_{0}-c_{\text{skip}}(t
)\mathbf{X}_{t}\right]\right]=1$,

$$ $\displaystyle\mathbb{V}ar\left[c_{\text{out}}(t)^{-1}\left[\mathbf{X}_{0}-c_{ \text{skip}}(t)\mathbf{X}_{t}\right]\right]=$ $\displaystyle\;1$ (26) $\displaystyle c_{\text{out}}(t)^{2}=$ $\displaystyle\;\mathbb{V}ar\left[\mathbf{X}_{0}-c_{\text{skip}}(t)\mathbf{X}_{ t}\right]$ (27) $\displaystyle c_{\text{out}}(t)^{2}=$ $\displaystyle\;\mathbb{V}ar\left[(1-\alpha_{t}c_{\text{skip}}(t))\mathbf{X}_{0 }-c_{\text{skip}}(t)(\beta_{t}\mathbf{X}_{T}+\gamma_{t}\epsilon)\right]$ (28) $\displaystyle c_{\text{out}}(t)^{2}=$ $\displaystyle\;(1-\alpha_{t}c_{\text{skip}}(t))^{2}\sigma_{0}^{2}$ (29) $\displaystyle-2\beta_{t}(1-\alpha_{t}c_{\text{skip}}(t))c_{\text{skip}}(t) \sigma_{0,T}^{2}$ (30) $\displaystyle+c_{\text{skip}}(t)^{2}\beta_{t}^{2}\sigma_{T}^{2}+\gamma_{t}^{2} c_{\text{skip}}(t)^{2}$ (31) $$

Given the fixed relationship between $c_{\text{skip}}$ and $c_{\text{out}}$, we choose $c_{\text{skip}}$ to minimize $c_{\text{out}}$

$$ $\displaystyle\frac{\mathrm{d}c_{\text{out}}^{2}}{\mathrm{d}c_{\text{skip}}}=$ $\displaystyle\;-2\alpha_{t}(1-\alpha_{t}c_{\text{skip}}(t))\sigma_{0}^{2}$ (32) $\displaystyle-2\beta_{t}\sigma_{0,T}^{2}+4\alpha_{t}\beta_{t}\sigma_{0,T}^{2}c _{\text{skip}}(t)$ (33) $\displaystyle+2c_{\text{skip}}(t)\beta_{t}^{2}\sigma_{T}^{2}+2\gamma_{t}^{2}c_ {\text{skip}}(t)$ (34) $$

With first order condition $\frac{\mathrm{d}c_{\text{out}}^{2}}{\mathrm{d}c_{\text{skip}}}=0$, we obtain:

$$ $\displaystyle c_{\text{skip}}(t)=\frac{\alpha_{t}\sigma_{0}^{2}+\beta_{t} \sigma_{0,T}^{2}}{\alpha_{t}^{2}\sigma_{0}^{2}+2\alpha_{t}\beta_{t}\sigma_{0,T }^{2}+\beta_{t}^{2}\sigma_{T}^{2}+\gamma_{t}^{2}}.$ (35) $$

### D.3 Coupling Projection

Recall that we propose projecting $\mathbb{Q}^{1}_{01}$ to $\Pi(\mathbb{P}_{0},\mathbb{P}_{1})$ at the end of each iteration

$$ $\displaystyle\widehat{\mathbb{Q}}^{1}_{01}\coloneqq\operatorname{proj}_{\Pi( \mathbb{P}_{0},\mathbb{P}_{1})}(\mathbb{Q}^{1}_{01})$ (36) $$

and using $\widehat{\mathbb{Q}}^{1}_{01}$ in place of $\mathbb{Q}^{1}_{01}$. However, the projection operation is well-defined only if there is a suitable metric on the space under consideration (the space of distributions, in our case). An applicable metric is the $p$-Wasserstein distance $W_{p}$. Then, projection w.r.t. $W_{p}$ is defined as

$$ $\displaystyle\widehat{\mathbb{Q}}^{1}_{01}=\operatorname*{arg\,min}_{\Gamma_{0 1}}W_{p}(\Gamma_{01},\mathbb{Q}^{1}_{01})\quad s.t.\quad\Gamma_{0}=\mathbb{P}_ {0},\ \Gamma_{1}=\mathbb{P}_{1}.$ (37) $$

Furthermore, we may parameterize

$$ $\displaystyle d\Gamma_{01}(\bm{x}_{0},\bm{x}_{1})=d\Gamma_{0|1}(\bm{x}_{0}|\bm {x}_{1})d\mathbb{P}_{1}(\bm{x}_{1})\quad or\quad d\mathbb{P}_{0}(\bm{x}_{0})d \Gamma_{1|0}(\bm{x}_{1}|\bm{x}_{0})$ (38) $$

which means (with the first parameterization), we only have to enforce the marginal constraint

$$ $\displaystyle\widehat{\mathbb{Q}}^{1}_{01}=\operatorname*{arg\,min}_{\Gamma_{0 1}}W_{p}(\Gamma_{01},\mathbb{Q}^{1}_{01})\quad s.t.\quad\Gamma_{0}=\mathbb{P}_ {0},\ d\Gamma_{01}=d\Gamma_{0|1}d\mathbb{P}_{1}.$ (39) $$

Noting that

$$ $\displaystyle\Gamma_{0}=\mathbb{P}_{0}\iff D(\Gamma_{0},\mathbb{P}_{0})=0$ (40) $$

for distances or divergences $D$, we can optimize

$$ $\displaystyle\min_{\Gamma_{01}}D(\Gamma_{0},\mathbb{P}_{0})+\lambda W_{p}^{p}( \Gamma_{01},\mathbb{Q}^{1}_{01})\quad s.t.\quad d\Gamma_{01}=d\Gamma_{0|1}d \mathbb{P}_{1}$ (41) $$

for decreasing values of $\lambda$ and stop when $D(\Gamma_{0},\mathbb{P}_{0})$ saturates. In practice, we solve

$$ $\displaystyle\min_{\Gamma_{01}}D(\Gamma_{0},\mathbb{P}_{0})+\lambda \operatorname{SKD}_{p}(\Gamma_{01},\mathbb{Q}^{1}_{01})\quad s.t.\quad d\Gamma _{01}=d\Gamma_{0|1}d\mathbb{P}_{1}$ (42) $$

with gradient descent, where $\operatorname{SKD}$ stands for Sinkhorn Divergence (Feydy et al., ). We approximate $\mathbb{Q}^{1}_{01}$ as a mixture of diracs using the generated backward pairs, and approximate $D$ using a Generative Adversarial Network (Goodfellow et al., ). Since we do not know an appropriate value of $\lambda$, we initialize $\lambda$ from a large value, e.g., $\lambda=1000$, decay it by a factor of $0.1$ every time FID saturates. If decaying $\lambda$ does not offer any more FID improvement, we terminate optimization, and use the optimized $\Gamma_{01}$ as $\widehat{\mathbb{Q}}_{01}^{1}$.

## Appendix E Proofs

### E.1 Proof of Proposition 1

###### Lemma 1 .

The following statements are equivalent.

- (a)
$\theta$ minimizes $\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$.
- (b)
$\theta$ minimizes $\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$.
- (c)
$\bm{D}_{\theta}(\bm{x}_{t},t)=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}_{0|t}(\cdot
|\bm{x}_{t})}[\bm{x}_{0}]$.

###### Proof.

We first observe that (writing $\bm{D}_{\theta}$ in place of $\bm{D}_{\theta}(\bm{x}_{t},t)$ for brevity)

$$ $\displaystyle\nabla_{\bm{D}_{\theta}}\mathcal{L}_{\operatorname{GFM}}(\theta; \mathbb{Q}_{01},\bm{x}_{t},t)=\phi^{\top}\phi\{\nabla_{\bm{D}_{\theta}} \mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)\}$ (43) $$

and since $\phi$ is invertible, $\phi^{\top}\phi$ is invertible as well, which implies

$$ $\displaystyle\nabla_{\bm{D}_{\theta}}\mathcal{L}_{\operatorname{GFM}}(\theta; \mathbb{Q}_{01},\bm{x}_{t},t)=\bm{0}\iff\nabla_{\bm{D}_{\theta}}\mathcal{L}_{ \operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)=\bm{0}.$ (44) $$

Because both $\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$ and $\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$ are strongly convex w.r.t. $\bm{D}_{\theta}$, this means $\theta$ minimizes $\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$ iff $\theta$ minimizes $\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)$ iff

$$ $\displaystyle\bm{D}_{\theta}(\bm{x}_{t},t)=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q }_{0|t}(\cdot|\bm{x}_{t})}[\bm{x}_{0}].$ (45) $$

This establishes the equivalence of the three claims.
∎

###### Lemma 2 .

Let $\mu$ be a $\sigma$-finite measure. If $f>g$ on a set $A$ with $\mu(A)>0$, $\int_{A}f\,d\mu>\int_{A}g\,d\mu$.

###### Proof.

By linearity of integrals, we can assume $g=0$. Since $f>0$ on $A$, we may express

$$ $\displaystyle A=\cup_{n=1}^{\infty}A_{n},\quad A_{n}\coloneqq\{x\in A:f(x)>1/n\}.$ (46) $$

Since $\mu(A)>0$, there is $n$ such that $\mu(A_{n})>0$. Otherwise, by subadditivity of measures,

$$ $\displaystyle\textstyle\mu(A)\leq\sum_{n=1}^{\infty}\mu(A_{n})=0$ (47) $$

which contradicts the assumption $\mu(A)>0$. It follows that

$$ $\displaystyle\textstyle\int_{A}f\,d\mu\geq\int_{A_{n}}f\,d\mu\geq\int_{A_{n}} \frac{1}{n}\,d\mu=\frac{\mu(A_{n})}{n}>0.$ (48) $$

This establishes the claim.
∎

Proof of Proposition 1. Denote the measure of $(t,\bm{x}_{t})$ where $t\sim\operatorname{unif}(0,1)$ and $\bm{x}_{t}\sim\mathbb{Q}_{t}$ as $\mu$. (Assuming $\bm{D}_{\theta}$ can approximate a sufficiently large set of functions), define $\theta^{*}$ as the neural net parameter which satisfies

$$ $\displaystyle\bm{D}_{\theta^{*}}(\bm{x}_{t},t)=\mathbb{E}_{\bm{x}_{0}\sim \mathbb{Q}_{0|t}(\cdot|\bm{x}_{t})}[\bm{x}_{0}]$ (49) $$

for any $(\bm{x}_{t},t)$ such that

$$ $\displaystyle\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t },t)\geq\mathcal{L}_{\operatorname{GFM}}(\theta^{*};\mathbb{Q}_{01},\bm{x}_{t} ,t)$ (50) $$

or equivalently,

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t} ,t)\geq\mathcal{L}_{\operatorname{FM}}(\theta^{*};\mathbb{Q}_{01},\bm{x}_{t},t)$ (51) $$

for any $(\bm{x}_{t},t)$ and $\theta$ by Lemma 1.

We now show that a minimizer of Eq. (13) minimizes Eq. (1). Suppose $\theta$ minimizes Eq. (13), but there is a set $A$ with positive measure, i.e., $\mu(A)>0$, such that

$$ $\displaystyle\bm{D}_{\theta}(\bm{x}_{t},t)\neq\mathbb{E}_{\bm{x}_{0}\sim \mathbb{Q}_{0|t}(\cdot|\bm{x}_{t})}[\bm{x}_{0}]$ (52) $$

for all $(\bm{x}_{t},t)\in A$. By Lemma 1,

$$ $\displaystyle\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t },t)>\mathcal{L}_{\operatorname{GFM}}(\theta^{*};\mathbb{Q}_{01},\bm{x}_{t},t)$ (53) $$

for all $(\bm{x}_{t},t)\in A$, and since $w(\bm{x}_{t},t)$ and $d\mathbb{T}(t)$ are positive by assumption,

$$ $\displaystyle d\mathbb{T}(t)\cdot w(\bm{x}_{t},t)\cdot\mathcal{L}_{ \operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)>d\mathbb{T}(t)\cdot w (\bm{x}_{t},t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta^{*};\mathbb{Q}_{01} ,\bm{x}_{t},t)$ (54) $$

for all $(\bm{x}_{t},t)\in A$, so by Lemma 2,

$$ $\displaystyle\mathbb{E}_{(t,\bm{x}_{t})\sim\mu}[1_{A}(\bm{x}_{t},t)\cdot d \mathbb{T}(t)\cdot w(\bm{x}_{t},t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta ;\mathbb{Q}_{01},\bm{x}_{t},t)]$ (55) $\displaystyle>\mathbb{E}_{(t,\bm{x}_{t})\sim\mu}[1_{A}(\bm{x}_{t},t)\cdot d \mathbb{T}(t)\cdot w(\bm{x}_{t},t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta ^{*};\mathbb{Q}_{01},\bm{x}_{t},t)]$ (56) $$

where $1_{A}(\bm{x}_{t},t)=1$ if $(\bm{x}_{t},t)\in A$ and 0 0 if not, and so

$$ $\displaystyle\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01})=\mathbb{ E}_{(t,\bm{x}_{t})\sim\mu}[d\mathbb{T}(t)\cdot w(\bm{x}_{t},t)\cdot\mathcal{L} _{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t},t)]$ (57) $\displaystyle>\mathbb{E}_{(t,\bm{x}_{t})\sim\mu}[d\mathbb{T}(t)\cdot w(\bm{x}_ {t},t)\cdot\mathcal{L}_{\operatorname{GFM}}(\theta^{*};\mathbb{Q}_{01},\bm{x}_ {t},t)]=\mathcal{L}_{\operatorname{GFM}}(\theta^{*};\mathbb{Q}_{01})$ (58) $$

which contradicts the assumption that $\theta$ minimizes Eq. (13). It follows that if $\theta$ minimizes Eq. (13),

$$ $\displaystyle\bm{D}_{\theta}(\bm{x}_{t},t)=\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q }_{0|t}(\cdot|\bm{x}_{t})}[\bm{x}_{0}]$ (59) $$

almost everywhere w.r.t. $\mu$, it also minimizes

$$ $\displaystyle\mathcal{L}_{\operatorname{FM}}(\theta;\mathbb{Q}_{01},\bm{x}_{t} ,t)$ (60) $$

almost everywhere w.r.t. $\mu$ by Lemma 1, which implies $\theta$ minimizes Eq. (1).

The other direction can be proven in an analogous manner. ∎

###### Lemma 1 .

###### Proof.

###### Lemma 2 .

###### Proof.

### E.2 Proof of Proposition 2

Proof of Proposition 2. Let $\mathbb{Q}_{01}^{0}=\mathbb{P}_{0}\otimes\mathbb{P}_{1}$. If we assume zero initialization in output layer for $\bm{D}_{\theta}$,

$$ $\displaystyle\max_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{ Q}_{01}^{0},\bm{x}_{1},1)/\min_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}( \theta;\mathbb{Q}_{01}^{0}\bm{x}_{1},1)$ (61) $\displaystyle=\max_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}^{0}_{0|1}( \cdot|\bm{x}_{1})}\|\bm{x}_{0}-\bm{D}_{\theta}(\bm{x}_{1},1)\|_{2}^{2}/\min_{ \bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}^{0}_{0|1}(\cdot|\bm{x}_{1})}\| \bm{x}_{0}-\bm{D}_{\theta}(\bm{x}_{1},1)\|_{2}^{2}$ (62) $\displaystyle=\max_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}^{0}_{0|1}( \cdot|\bm{x}_{1})}\|\bm{x}_{0}\|_{2}^{2}/\min_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{ 0}\sim\mathbb{Q}^{0}_{0|1}(\cdot|\bm{x}_{1})}\|\bm{x}_{0}\|_{2}^{2}$ (63) $\displaystyle=\max_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{P}^{0}}\|\bm{ x}_{0}\|_{2}^{2}/\min_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{P}^{0}}\| \bm{x}_{0}\|_{2}^{2}=1$ (64) $$

On the other hand, if we use a pre-trained diffusion model to initialize $\bm{D}_{\theta}$,

$$ $\displaystyle\bm{D}_{\theta}(\bm{x}_{1},1)=\bm{\mu}_{0}$ (65) $$

such that

$$ $\displaystyle\max_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{ Q}_{01}^{1},\bm{x}_{1},1)/\min_{\bm{x}_{1}}\mathcal{L}_{\operatorname{GFM}}( \theta;\mathbb{Q}_{01}^{1},\bm{x}_{1},1)$ (66) $\displaystyle=\max_{\bm{x}_{1}}\mathbb{E}_{\bm{x}_{0}\sim\mathbb{Q}^{1}_{0|1}( \cdot|\bm{x}_{1})}\|\bm{x}_{0}-\bm{\mu}_{0}\|_{2}^{2}/\min_{\bm{x}_{1}}\mathbb {E}_{\bm{x}_{0}\sim\mathbb{Q}^{1}_{0|1}(\cdot|\bm{x}_{1})}\|\bm{x}_{0}-\bm{\mu }_{0}\|_{2}^{2}$ (67) $\displaystyle=\max_{\bm{x}_{0}}\|\bm{x}_{0}-\bm{\mu}_{0}\|_{2}^{2}/\min_{\bm{x }_{0}}\|\bm{x}_{0}-\bm{\mu}_{0}\|_{2}^{2}$ (68) $$

because $\bm{x}_{1}\mapsto\bm{x}_{0}\sim\mathbb{Q}^{1}_{0|1}(\cdot|\bm{x}_{1})$ is now a bijective map between $\mathbb{P}_{0}$ and $\mathbb{P}_{1}$ samples.

## Appendix F Additional Experiments

### F.1 Linear Discretization Lacks Discriminative Power

While all previous works use the uniform discretization to sample from ReFlow models, we use the sigmoid discretization to evaluate models in Sections 3.2 and 3.3. This is because, we found that the uniform discretization lacks discrimination power, i.e., the ability to make the best of a given model, especially at small NFEs.

To demonstrate this, in Tab. 10, we re-evaluate models in Sec. 3.2.1 with the uniform discretization, and compare them with evaluation results with the sigmoid discretization with $\kappa=10$. We observe that none of the FIDs with the uniform discretization are better than the worst FID with the sigmoid discretization. Moreover, the model with our proposed weight, when evaluated with the uniform schedule, performs worse than the model with uniform weight.

**Table 10: Uniform vs. sigmoid ($\kappa=10$) discretizations with Heun on AFHQv2.**
| $w(\bm{x}_{t},t)$ | Uniform | Sigmoid |
| --- | --- | --- |
| $1$ | $\mathbf{2.88}$ | $2.87$ |
| $1/t$ | $\underline{2.89}$ | $\underline{2.76}$ |
| $1/t^{2}$ | $2.93$ | $\mathbf{2.74}$ |
| $(\sigma^{2}+0.5^{2})/(0.5\sigma)^{2}$ | $2.97$ | $2.82$ |
| $1/\mathbb{E}_{\bm{x}_{t}}[\operatorname{sg}[\mathcal{L}_{\operatorname{GFM}}(<br>\theta;\mathbb{Q}_{01},\bm{x}_{t},t)]]$ | $2.98$ | $2.79$ |
| $1/\operatorname{sg}[\mathcal{L}_{\operatorname{GFM}}(\theta;\mathbb{Q}_{01},<br>\bm{x}_{t},t)]$ | $2.95$ | $\mathbf{2.74}$ |

We speculate this happens because, as analyzed in Sec. 3.4, large curvature regions for ReFlow ODEs occur near $t\in\{0,1\}$, but the uniform discretization fails to account for them. So, the uniform discretization is unable to accurately capture the differences in ODE trajectories between different models. Due to these reasons, we opt to use the sigmoid discretization to distinguish training techniques that work from those that do not.

### F.2 DPM-Solver and Guidance Ablations

Recall that the DPM-Solver update for Eq. (3) is given as

$$ $\displaystyle\textstyle\bm{x}_{t_{i}}\leftarrow\bm{x}_{t_{i+1}}+(t_{i}-t_{i+1} )(\frac{1}{2r}\bm{v}_{\theta}(\bm{x}_{s_{i+1}},s_{i+1})+(1-\frac{1}{2r})\bm{v} _{\theta}(\bm{x}_{t_{i+1}},t_{i+1})).$ (69) $$

In Fig. 12, we show the FID for various values of $r\in(0,1]$. While we can get better FIDs than those in Tab. 7 by using $r$ tailored to individual datasets, we opt for simplicity and set $r=0.4$ as our improved choice, which still yields better FID than the Heun solver, i.e., using $r=1$.

For conditional ReFlow models, classifier-free guidance (CFG) (Ho & Salimans, ) can be formulated as solving the ODE

$$ $\displaystyle d\bm{x}_{t}=\{(1+w)\cdot\bm{v}_{\theta}(\bm{x}_{t},t,c)-w\cdot \bm{v}_{\theta}(\bm{x}_{t},t,\varnothing)\}\,dt$ (70) $$

where $\bm{v}_{\theta}(\bm{x}_{t},t,c)$ is velocity conditioned on $c$, and $\bm{v}_{\theta}(\bm{x}_{t},t,\varnothing)$ is an unconditional velocity, and $w$ is guidance scale. Note that $w=0$ reduces the ODE to standard class-conditional generation. In practice, we train conditional velocities with label dropout such that $\bm{v}_{\theta}(\bm{x}_{t},t,c)$ and $\bm{v}_{\theta}(\bm{x}_{t},t,\varnothing)$ can be evaluated in parallel, by passing class labels to the former and null labels to the latter.

Table: Figure 12: DPM-Solver $r$

For unconditional ReFlow models, AutoGuidance (Karras et al., ) can be formulated as solving

$$ $\displaystyle d\bm{x}_{t}=\{(1+w)\cdot\bm{v}_{\theta}(\bm{x}_{t},t)-w\cdot\hat {\bm{v}}_{\phi}(\bm{x}_{t},t)\}\,dt$ (71) $$

where $\hat{\bm{v}}_{\phi}$ is a degraded version of $\bm{v}_{\theta}$. In practice, we use ReFlow models trained with the baseline training configuration (see Tab. 1) for $10k$ iterations as $\hat{\bm{v}}_{\phi}$. While other choices of $\hat{\bm{v}}_{\phi}$ may offer better FIDs, as AG is not the main topic of our paper, we do not perform an extensive search.

### F.3 Sample Visualization

Figure: (a) BSL, $2.83$ FID with 9 NFEs
Refer to caption: extracted/5916200/figures/cifar10_BSL.png

Figure: (a) BSL, $2.87$ FID with 9 NFEs
Refer to caption: extracted/5916200/figures/afhqv2_BSL.png

Figure: (a) BSL, $4.27$ FID with 9 NFEs
Refer to caption: extracted/5916200/figures/imagenet_BSL.png

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: None
soundness: 3
strengths: I find the paper well-presented. The design space is clearly communicated and the ablations are convincing. These dimensions show how to squeeze the performance on these standard image generation settings.
summary: The paper studies ways of improving the ReFlow procedure for diffusion and flow matching. They break the design space into training dynamics, learning and inference, and show isolated ablations w.r.t. the choices here (weighting, time distribution, loss function, initialization, dropout, sampling, ODE solvers, [0, 1] discretization). The main experimental results ablate these on CIFAR10, AFHQv2, and FFHQ.
weaknesses: I do not find many weaknesses in the paper, as it clearly communicates the goal and setting and explores it nicely:

1. The experimental settings of CIFAR10, AFHQv2, and FFHQ are interesting, but only a small subset of all of the other potential uses and larger applications of flow matching and diffusion models. It would be interesting to see if the improvements continue holding in these.
2. The paper is niche in the sense that it relies on wanting to do generative modeling with ReFlow, and discussing the relevant dimensions here.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: The reviewer is trying to understand the language of the following claim in 3.3.1:

"Our improvement. We observe that learning the OT ODE is a harder task than learning the diffusion
probability flow ODE. For instance, at t = 1, the optimal DM denoiser only needs to predict the data mean $\mathbb E_{x_0 \sim P_0} [ x_0] $ for any input $x_1 ∼ P_1$, but an optimal ReFlow denoiser has to directly map noise to image along the bijective OT map."

Should the reviewer interpret this as being the claim that: The velocity field solving the probability flow is generically for $\mathbb E[\dot x_t | x_t = x]$, and for a deterministic coupling $P(x_0, x_1) = P_0 (x_0) \delta (x - T(x_0)$, this conditional expectation collapses because only one $x_t$ passes through $x$? This would be true for any monge coupling, and not just the OT coupling.
soundness: 3
strengths: The paper provides a number of useful empirical studies of what ultimately influences the performance of the flow matching models and when they are rectified to straighter paths. As the reviewer sees it, the paper aggregates many of the design space choices that arise from the diffusion model literature and uses them to study how these knobs affect flow matching. It is nice to have them all considered in one place. 

The inclusion of a new high pass filter metric on the loss is nice, and could be well motivated in other domains where we explicitly know these frequency regimes are important, e.g. for generative models in the sciences.

The extent of the ablations is thorough and the reviewer acknowledges the size of this experimental undertaking!
summary: This paper provides an empirical study of how to improve the FID of rectified flow based image generative models. They aggregate a number of design choices studied in the context of diffusion and reconsider them in the context of flow matching and rectification. These design choices focus on the various aspects of the loss function: the metric under which the regression is performed (e.g. MSE vs PIPs, vs generalized invertible mappings), the time weighting, and loss normalization. They then consider training choices, like how the training data is chosen based on the first deterministic coupling of the rectification (fixing a Gaussian base value for each data point, called forward pairs). Finally they run ablations over discretizations of the ODE.
weaknesses: Thanks to the authors for their hard work on this project.

*Main remarks*:
- While the paper provides a number of empirical insights for training, it would be nice if there was more of an analysis of why these tricks ultimately help. The reviewer stresses this a bit because a number of the proposed innovations are directly inspired from their application in other work, e.g. the improvement of loss normalization in Karras et al (2023b), and e.g. equations (8)-(12). 

- The reviewer is confused by the reference to OT solutions throughout, e.g. in Section 3.3.1, which suggests a potential misconception about the rectified flow procedure. In particular, as the reviewer understands it, one iteration does not give OT, but instead gives a monge map, in the sense that the coupling $P(x_0, x_1)  = P_0(x_0) \delta(x - T(x_0))$, where $T$ is the transport endowed from learning the velocity field first with $x_0, x_1$ independently drawn in the loss. This is certainly not OT (brenier polar factorization theorem), but is a deterministic coupling. Can the authors address this? 

- The argument of proposition 2 is confusing, perhaps due to a typo. Is the first line supposed to specify the DM loss and not the GFM loss? Currently they are both statements about GFM. 

- These analyses are mostly limited to the image domain, and it's hard to understand how any of these 

- Can the authors address how large the bias is in rectification under the different procedures somehow? By this, the reviewer means that each iterate of rectification introduces a bias unless the flow was initially learned perfectly. The reviewer understands this to be difficult to measure, but it would be nice to understand how these ablations affect or relate to the extent of this bias. This might sit better in the questions section.




*Small remarks*:
-  the fundamental idea of of FM and rectified flow are equivalent to the method of stochastic interpolants, and should probably be cited accordingly. 
- There is in a sense a competing small set of remarks about the benefits of rectification vs distillation in the appendix section C, saying that there are benefits of rectification over distillation because rectification maintains an ODE-like structure. But this ignores the fact that the learning problem after a rectification is a distillation problem...and it too is now fitting to an imperfect teacher model. I'm not sure this remark really contributes much to the discussion.

*Very small remarks*: A few typos to watch out for. 
- "we  we" top of page 5

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: I do not have other questions.
soundness: 4
strengths: 1. The paper is well-written and easy to follow, with each step of the ablation study clearly described and the results effectively presented.
2. The final experiment results after combining all improvements show lower FID and lower straightness compared with other diffusion-based and flow-based methods.
summary: This paper proposes several improvements to training dynamics, learning, and inference for Rectified Flow models (e.g. initialization from the EDM model, loss reweighting, new loss function, refinements on noise-image pairs, etc.). Thorough ablation studies verify the effectiveness of the proposed improvements and the final experiment results are competitive among diffusion and flow-based models for few-steps sampling.
weaknesses: 1. The projected pairs operation, which projects the coupling $Q_{01}^1$ to $\Pi(P_0, P_1)$, complicates the training pipeline (GAN training and solving Sinkhorn) while yielding only marginal performance improvements, as indicated in Table 6 (with a maximum FID improvement of 0.02, which is not even statistically significant).

2. The authors frequently use the notation 'OT ODE' and 'OT map' throughout the paper. However, as noted in references [1] and [2], the iterative rectified flow does not generally converge to the optimal transport mapping in dimensions higher than or equal to 2. Furthermore, the algorithm presented in this paper corresponds to the 2-rectified flow. Therefore, the use of the 'OT' notation is not appropriate.

[1] Rectified Flow: A Marginal Preserving Approach to Optimal Transport. arxiv 2209.14577

[2] Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow. arxiv 2209.03003

---

confidence: 5
contribution: 3
initial_rating: 8
presentation: 3
questions: - As described in lines 100-111, the original ReFlow algorithm works by iteratively training $D^{n+1}$ using the coupling induced by $D^{n}$. Does Simple ReFlow proceed analogously? If so, how many iterations are used? It would be good to include this information in the paper.

- The authors propose two improvements with regards to training data: forward pairs and projected pairs. Hence, there are three ways to obtain trajectories: backward pairs, forward pairs and projected pairs. How are the three approaches combined? For example, what is the approach used to obtain the results in Table 8?

- The projected pairs approach is very interesting. The authors propose one way to solve the projection problem, which involves recasting the constraint on the marginals of $\Gamma_{01}$ as a penalty term, which forces them to use GANs. It seems that solving a Schrodinger bridge problem between P_0 and P_1 with an appropriate regularization term would also achieve the final goal of the paper, but of course one then loses the connection with ReFlow. Are there other alternatives that may be simpler? Also, it would be good to provide a more detailed explanation in Subsec. D.3, e.g., more details in how problem 42 is solved.

- What do the authors think is the improvement that is most responsible for the performance boost that is observed? As a reviewer, I think the training data improvements may be the most critical ones, but it would be nice to comment on that in the Conclusion section.
soundness: 3
strengths: - The paper does a very good job at ablating design choices to improve ReFlow. 
- The experimental results are state-of-the-art, by a good margin.
- The paper can be very helpful for practitioners that face similar choices when training their models.
summary: This work addresses the performance degradation of ReFlow without violating its theoretical foundations. ReFlow aims to straighten the trajectories of ordinary differential equations (ODEs) by flow-matching between marginal distributions connected by a previously trained flow ODE. Theoretically, an infinite number of ReFlow updates should result in a straight trajectory that enables perfect translation between marginals with a single function evaluation. However, in practice, ReFlow suffers from a drop in sample quality, and previous attempts to mitigate this have relied on heuristic methods like perceptual losses, which deviate from the theoretical framework and may not preserve the underlying probability distributions.

The authors generalize the ReFlow training loss and categorize design choices into three key groups: training dynamics, learning, and inference. They analyze previous practices, identify potential pitfalls, and propose improved techniques within the theoretical bounds. Extensive ablation studies on datasets such as CIFAR10, FFHQ, and AFHQv2 demonstrate that their methods consistently improve sample quality and Fréchet Inception Distance (FID) scores. Ultimately, they achieve state-of-the-art results in fast neural ODE-based generation without relying on heuristic methods, offering a theoretically sound and practical approach to accelerating generative models.
weaknesses: - Each of their contributions may be labeled as incremental, which means that the whole paper could also be labeled as incremental. Regardless, it is a very valuable paper to the community because it sheds light on several empirical choices one must make.

- The statement “This again ensures that the loss is minimized when $D_{\theta}$
outputs the posterior mean” in line 184 is false. In fact, what holds is 
$D^*(x_t,t) = \phi^{-1}(\mathbb{E}_{x_0 \sim Q(\cdot|x_t)} [\phi(x_0)])$.
When $\phi$ is far from the identity, $D^*(x_t,t)$ may be far from the desired point. This does not makes the empirical findings less valuable, but it does invalidate the theoretical claims that the authors make about the training loss based on $\phi$ adhering to FM theory.

Meta-review: This paper focuses on improving the performance of ReFlow models for image generation while preserving their theoretical underpinnings. ReFlow aligns ODE trajectories by flow-matching marginal distributions. Despite its theoretical potential to perfectly translate between marginals, practical implementations often exhibit degraded sample quality, with prior approaches relying on heuristic fixes that compromise theoretical consistency.

The authors categorize their contributions into three dimensions: training dynamics, learning strategies, and inference techniques. They propose principled refinements, including loss reweighting, improved initialization from pre-trained models, optimized pair selection, and better ODE discretization strategies. Through extensive ablation studies on CIFAR10, FFHQ, and AFHQv2, they demonstrate that these improvements yield some gains in sample quality and FID scores.

While the paper has notable strengths, it also has several weaknesses: (1) Although many practical techniques are proposed, the paper lacks a deeper analysis of why these methods improve performance; (2) several reviewers highlighted inaccuracies in the paper’s understanding and claims related to OT; and (3) some proposed techniques result in only marginal performance improvements.

Despite these limitations, the paper’s contributions outweigh its shortcomings. All reviewers recommended acceptance, with several assigning high scores, reflecting confidence in its significance. Therefore, I recommend accepting this paper.

Decision: Accept (Poster)