To make a numerical scheme reversible, we need at least one auxiliary state — the same structural trick Normalizing Flows use in coupling layers.
Reversibility requires ≥ 1 auxiliary state — the same structural trick as coupling layers in Normalizing Flows.
Current diffusion inversion methods are bespoke schemes for diffusion ODEs which suffer from:
Can we design a general reversible solver — high-order, stable, and works for both ODEs and SDEs?
Rex: a family of Reversible Exponential (Stochastic) Runge–Kutta solvers.
What this gives us
ODE Runge-Kutta extended to SDEs via iterated stochastic integrals which are generally intractable. We use the space-time Lévy area and the Foster-Reis-Strange (S)RK scheme to develop nice SDE solvers.
$$\class{srk-wcolor}{\boldsymbol W_{s,t}} \sim \mathcal N(\boldsymbol 0,\, h\,\boldsymbol I)$$
$$\class{srk-hcolor}{\boldsymbol H_{s,t}} \sim \mathcal N\!\left(\boldsymbol 0,\, \tfrac{h}{12}\,\boldsymbol I\right), \quad \class{srk-wcolor}{\boldsymbol W_{s,t}} \perp\!\!\!\perp \class{srk-hcolor}{\boldsymbol H_{s,t}}$$
"where" you end up | "how curvy" the path was
$$\renewcommand\arraystretch{1.2}\begin{array}{c|c|c|c} \boldsymbol c & \boldsymbol a & \class{srk-wcolor}{\boldsymbol a^W} & \class{srk-hcolor}{\boldsymbol a^H} \\ \hline & \boldsymbol b & \class{srk-wcolor}{\boldsymbol b^W} & \class{srk-hcolor}{\boldsymbol b^H} \end{array}$$
Two new columns for the Brownian increment $\boldsymbol W$ and Lévy area $\boldsymbol H$.
$$\begin{array}{c|c} 0 & \\ \hline & 1 \end{array}$$
Euler — ODE, order 1
$$\renewcommand\arraystretch{1.5}\begin{array}{c|cccc} 0 & \\ \tfrac12 & \tfrac12 \\ \tfrac12 & 0 & \tfrac12 \\ 1 & 0 & 0 & 1 \\ \hline & \tfrac16 & \tfrac13 & \tfrac13 & \tfrac16 \end{array}$$
RK4 — ODE, order 4
$$\renewcommand\arraystretch{1.3}\begin{array}{c|cccccc} 0 & \\ \tfrac15 & \tfrac15 \\ \tfrac3{10} & \tfrac3{40} & \tfrac9{40} \\ \tfrac45 & \tfrac{44}{45} & \tfrac{-56}{15} & \tfrac{32}9 \\ \tfrac85 & \tfrac{19372}{6561} & \tfrac{-25360}{2187} & \tfrac{64448}{6561} & \tfrac{-212}{729} \\ 1 & \tfrac{9017}{3168} & \tfrac{-355}{33} & \tfrac{46732}{5247} & \tfrac{49}{176} & \tfrac{-5103}{18656} \\ 1 & \tfrac{35}{384} & 0 & \tfrac{500}{1113} & \tfrac{125}{192} & \tfrac{-2187}{6784} & \tfrac{11}{84} \\ \hline & \tfrac{35}{384} & 0 & \tfrac{500}{1113} & \tfrac{125}{192} & \tfrac{-2187}{6784} & \tfrac{11}{84} & 0 \\ & \tfrac{5179}{57600} & 0 & \tfrac{7571}{16695} & \tfrac{393}{640} & \tfrac{-92097}{339200} & \tfrac{187}{2100} & \tfrac1{40} \end{array}$$
Dormand–Prince 4(5) — ODE, adaptive (rows 7–8: order 4 / order 5)
$$\renewcommand\arraystretch{1.5}\begin{array}{c|c|c|c} 0 & 0 & 0 & 0 \\ \hline & 1 & \class{srk-wcolor}{1} & \class{srk-hcolor}{0} \end{array}$$
Euler–Maruyama — SDE, strong order 0.5
$$\renewcommand\arraystretch{1.5}\begin{array}{c|cc|c|c} 0 & & & \class{srk-wcolor}{0} & \class{srk-hcolor}{1} \\ \tfrac56 & \tfrac56 & & \class{srk-wcolor}{\tfrac56} & \class{srk-hcolor}{1} \\ \hline & 0.4 & 0.6 & \class{srk-wcolor}{1} & \class{srk-hcolor}{0} \\ & -0.6 & 0.6 & & \end{array}$$
ShARK — SDE, strong order 1.5, adaptive (row 3: error estimator)
The diffusion SDE has a semi-linear structure — a stiff linear term and a noise term that can both be solved in closed form, leaving only the neural network term for numerical integration.
$$\underbrace{\class{lawson-stiff}{a(t)\,\boldsymbol X_t\,\mathrm dt}}_{\text{stiff linear}} + \underbrace{\class{lawson-nn}{b(t)\,\boldsymbol f_\theta(t,\boldsymbol X_t)\,\mathrm dt}}_{\text{neural network}} + \underbrace{\class{lawson-noise}{g(t)\,\mathrm d\boldsymbol W_t}}_{\text{noise}}$$
$$\class{lawson-nn}{\boldsymbol f_\theta(\varsigma,\,\Xi(\varsigma)\,\boldsymbol Y_\varsigma)\,\mathrm d\varsigma} + \mathrm d\boldsymbol W_\varsigma$$
For a differential equation $\tfrac{\mathrm d\boldsymbol x}{\mathrm dt} = \boldsymbol f_\theta(t, \boldsymbol x_t)$, $\boldsymbol\Phi$ is a numerical scheme such that $\boldsymbol x_{n+1} = \boldsymbol x_n + \boldsymbol\Phi_{t_n,t_{n+1}}(\boldsymbol x_n)$.
We use the McCallum–Foster reversible coupling to convert arbitrary explicit RK schemes into reversible RK schemes:
Combine the exponential integrator with an explicit (S)RK scheme $\boldsymbol\Phi$ — the result is a large family of exponential (stochastic) Runge–Kutta solvers we call Princeps, $\boldsymbol\Psi$.
Easy to build new solvers! E.g., adaptive step-sizing via Dormand–Prince 4(5) , or a state-of-the-art SDE solver via ShARK .
When building Princeps $\boldsymbol\Psi$ we instead first convert $\boldsymbol \Phi$ into a stable reversible solver via the McCallum–Foster coupling with an auxiliary state $\hat{\boldsymbol Y}_t$ in the exponetially lifted domain, before building Rex in the $\boldsymbol X_t$ space.
Encode a Stable Diffusion v1.5 latent → decode → measure $\|\boldsymbol X_0-\hat{\boldsymbol X}_0\|^2$. Lower ↔ closer to exact.
10⁴ samples · larger polygon = better. Rex (E–M) sweeps five of six metrics at 20 & 50 steps.
3 metrics × 3 step counts, min‑max per metric. Rex SDE variants lead Image Reward & PickScore at every step budget.
LPIPS inverted (larger = better). Rex (Dopri5) on the ring; EDICT failed entirely.
Noise → biased sample → reweight via exact log p(x) → unbiased sample. Reversibility gives unbiased likelihoods.
Same DiT, same pipeline — swap Dopri5 for Rex. Energy‑W₂ 0.737 → 0.495 (33% reduction).
Rex is a family of algebraically reversible diffusion solvers.