DMPlug: A Plug-in Method for Solving Inverse Problems with Diffusion Models

Hengkang Wang, Xu Zhang, Taihui Li, Yuxiang Wan, Tiancong Chen, Ju Sun

TL;DR

DMPlug rethinks how to use pretrained diffusion models for inverse problems by treating the entire reverse diffusion process as a single, differentiable function. This "plug-in" approach allows for direct optimization in the latent seed space, guaranteeing that recovered images stay on the natural image manifold while achieving a significantly better fit to the observed data, especially for complex nonlinear problems.

What Problem Does This Paper Address?

Inverse problems (IPs)—such as super-resolution, inpainting, or deblurring—involve recovering an original image $x$ from noisy, degraded measurements $y = A(x) + n$. Because these problems are "ill-posed" (many different images could have produced the same measurement), we need strong prior knowledge about what natural images look like.

Pretrained Diffusion Models (DMs) have become the gold standard for these priors. However, most existing methods try to solve IPs by "interleaving" steps: they take one step of the reverse diffusion process to make the image look more natural, then one step of optimization to make it match the measurement. This tug-of-war often fails to satisfy either goal perfectly. The results might look "uncanny" (poor manifold feasibility) or fail to actually match the input data (poor measurement feasibility), particularly when the degradation process $A$ is nonlinear or the noise $n$ is of an unknown type.

Methods

The core innovation of DMPlug is viewing the entire reverse diffusion process as a deterministic function, $R(z)$, which maps a starting "seed" $z$ (random noise) to a final clean image on the manifold $\mathcal{M}$.

Instead of tweaking the image $x$ directly during the diffusion process, DMPlug optimizes the starting seed $z$. The problem is reformulated as a standard regularized optimization: $$\min_z \ell(y, A(R(z))) + \Omega(R(z))$$ where $\ell$ is a data-fitting loss (like mean squared error) and $\Omega$ is an optional regularizer.

By keeping the pretrained DM's reverse process $R(\cdot)$ fixed and only changing the input seed, the recovered image $x^* = R(z^*)$ is guaranteed to look like a natural object from the model's training distribution. This "plug-in" style allows researchers to use standard off-the-shelf optimizers like ADAM or L-BFGS.

Datasets

The authors evaluated DMPlug using three widely-used high-resolution image datasets: CelebA (human faces), FFHQ (high-quality human faces), and LSUN-bedroom (interior scenes). They tested the method across five distinct inverse problems: two linear (super-resolution, inpainting) and three nonlinear (nonlinear deblurring, blind image deblurring, and blind deblurring with atmospheric turbulence).

Key Insights and Ideas

  • The Power of Reparameterization: By optimizing in the "seed space" rather than the "image space," the method inherently respects the image prior. You can't easily produce a "non-natural" image because the function $R(z)$ only knows how to produce natural ones.
  • Efficiency with Few Steps: A surprising "aha moment" was that DMPlug doesn't need the hundreds of steps typically used for high-quality image generation. The authors found that using as few as 3 reverse steps was sufficient to beat state-of-the-art methods, making the approach computationally practical.
  • The ELTO Phenomenon: The researchers identified an "Early-Learning-Then-Overfitting" (ELTO) property. During optimization, the model first learns the clean, structured content of the image before it starts "overfitting" to the measurement noise.
  • Robustness to Unknown Noise: Because of the ELTO property, the authors could integrate an automated early-stopping strategy. This allows DMPlug to handle various noise types (Gaussian, impulse, shot, speckle) at unknown levels without needing ground-truth information to tune parameters.

Key Results

DMPlug consistently outperformed existing state-of-the-art (SOTA) methods across all tested tasks, often by substantial margins. For nonlinear IPs like nonlinear deblurring, DMPlug improved the Peak Signal-to-Noise Ratio (PSNR) by a massive 3 to 6 dB over previous methods. For linear IPs (super-resolution and inpainting), it maintained a lead of about 2 dB in PSNR.

Qualitative comparison of DMPlug against state-of-the-art methods across linear and nonlinear inverse problems.

Qualitatively, the reconstructed images are sharper and contain fewer artifacts, especially in difficult "blind" problems where the exact nature of the blur is unknown. Furthermore, DMPlug reaches a much lower data-fitting residual than competing methods, meaning it honors the observed measurements far more accurately.

Evolution of data-fitting loss: DMPlug (red) achieves a significantly lower residual than competing methods like DPS and Resample.

Limitations and Future Work

The authors acknowledge that their work is primarily empirical. While the results are compelling, a rigorous theoretical explanation for why the method works so well with so few reverse steps is still an open question. There appears to be a fundamental difference between the requirements for image generation (which needs many steps) and image regression for IPs (which seemingly doesn't).

Additionally, while the use of only 3 steps makes it faster than many diffusion-based solvers, the iterative optimization over the seed space is still slower than "one-shot" deep learning models trained for specific tasks. Future work could explore further acceleration techniques.

Summary updated

BibTeX
@inproceedings{wang2024dmplug,
  author = {Hengkang Wang and Xu Zhang and Taihui Li and Yuxiang Wan and Tiancong Chen and Ju Sun},
  title = {{DMPlug: A Plug-in Method for Solving Inverse Problems with Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=81IFFsfQUj},
}
Figure