TL;DR
The authors introduce Rex, a new family of algebraically reversible solvers for diffusion models that allows for exact inversion of both ODE and SDE sampling paths. By combining exponential integrators with a stable reversible framework, Rex achieves high-order convergence and enables complex image editing and interpolation without the memory overhead or instability of previous methods.
What Problem Does This Paper Address?
Diffusion models work by gradually turning noise into data. However, many important tasks—like image editing, "morphing" between two real images, or adding specific attributes to a photo—require the opposite: inversion. You need to map a real image back to the specific noise that would have generated it.
The challenge is that numerical solvers (the math we use to actually run these models) introduce small errors at every step. If you run a standard solver forward and then try to run it backward, you won't end up exactly where you started. This "drift" ruins the bijection between noise and data.
Previous attempts at "reversible" solvers (like EDICT or BDIA) were often slow, inaccurate (low-order), or highly unstable, meaning they would "explode" if the step size wasn't perfectly tuned. Furthermore, inverting the stochastic (SDE) version of diffusion usually required storing the entire random path in memory, which is a massive bottleneck for high-resolution images.
Methods
The authors propose Rex (Reversible Exponential solvers), which builds on two key mathematical pillars:
- Lawson Methods (Exponential Integrators): These are used to handle the "stiff" parts of the diffusion equation—the parts that change very rapidly—analytically. This removes a major source of discretization error right from the start.
- McCallum-Foster Framework: This is a specific way of structuring a numerical step so that it is algebraically reversible. Unlike "analytic" reversibility (which requires expensive iterative solving), Rex uses a closed-form "coupling" approach that allows you to calculate the previous state from the current one exactly and efficiently.
The SDE Innovation: To invert the stochastic (SDE) path without storing gigabytes of random noise, Rex uses "splittable" pseudo-random number generators (PRNGs). This allows the solver to reconstruct the exact same Brownian motion path during the backward pass using only a single initial seed.
Datasets
The researchers evaluated Rex using several standard benchmarks and pre-trained models:
- CelebA-HQ ($256 \times 256$): Used for unconditional image generation and interpolation.
- MS-COCO: Used for text-conditioned image generation.
- FRLL (Face Research Lab London Set): Used to demonstrate interpolation between real-world high-resolution faces.
- Pre-trained Models: The experiments utilized standard weights from DDPM and Stable Diffusion v1.5.
Key Insights and Ideas
- A Unified Template: Rex isn't just one solver; it’s a family. You can plug in different underlying schemes (like Euler, Midpoint, or RK4) into the Rex framework to get different balances of speed and accuracy.
- Subsuming the Classics: One of the most elegant findings is that many famous solvers, such as DDIM and DPM-Solver, are actually just specific, non-reversible instances of the Rex math. Rex effectively "upgrades" these existing tools to be reversible.
- The "Blessing of Randomness": The paper reinforces the idea that SDE (stochastic) inversion is often superior to ODE (deterministic) inversion for interpolation. Because the SDE version explores the latent space more effectively, the "morphs" between images look much smoother and more realistic.
- Stability Matters: Reversible solvers are notoriously prone to divergence. By using the McCallum-Foster coupling parameter ($\zeta$), Rex maintains a "region of stability," making it much more robust for practical use than previous reversible baselines.
Key Results
- Superior Accuracy: In unconditional generation on CelebA-HQ, Rex (using an Euler-Maruyama base) achieved a Fréchet Distance (FD) of 391.93 at 50 steps, significantly beating other reversible solvers like EDICT (551.13) and BDIA (500.79).
- High-Order Benefits: Because Rex can use high-order Runge-Kutta schemes (like RK4), it can achieve high-quality results with far fewer steps than first-order methods.
- Better Interpolation: Qualitatively, Rex produces significantly better image interpolations. While ODE-based inversions often create "ghosting" or blurry artifacts during transitions, the stochastic Rex variants (like ShARK) provide smooth, identity-preserving morphs.
- Text-to-Image Excellence: When used with Stable Diffusion, Rex variants consistently outperformed the non-reversible DDIM baseline across human-preference metrics like Image Reward and PickScore.
Limitations and Future Work
- Stability Trade-off: While Rex is more stable than other reversible solvers, it is still slightly less stable than standard, non-reversible solvers. Users must still be mindful of step sizes in very "stiff" regimes.
- Latent Distribution: The authors noted that inverted latent variables are not always perfectly normally distributed, which can occasionally lead to strange artifacts in the reconstructed images.
- Computational Overhead: Each step in a reversible solver is slightly more complex than a standard step. While the accuracy gains often justify this, it is a factor for real-time applications.
- Future Directions: The authors suggest that Rex could be integrated into existing image-editing pipelines (like ControlNet or IP-Adapter) to allow for more precise, "zero-shot" editing of real images.
Summary updated