Solving Linear Inverse Problems Provably via Posterior Sampling with Latent Diffusion Models

Litu Rout, Negin Raoof, Giannis Daras, Constantine Caramanis, Alexandros G. Dimakis, Sanjay Shakkottai

Abstract

We present the first framework to solve linear inverse problems leveraging pre-trained latent diffusion models. Previously proposed algorithms (such as DPS and DDRM) only apply to pixel-space diffusion models. We theoretically analyze our algorithm showing provable sample recovery in a linear model setting. The algorithmic insight obtained from our analysis extends to more general settings often considered in practice. Experimentally, we outperform previously proposed posterior sampling algorithms in a wide variety of problems including random inpainting, block inpainting, denoising, deblurring, destriping, and super-resolution.

Introduction

Inverse problems are the "detective work" of computer vision: given a blurry, noisy, or partial image ($y$), how do we recover the original, clean image ($x_0$)? Mathematically, this is expressed as $y = Ax_0 + n$, where $A$ is a degradation operator (like a blur kernel or a mask) and $n$ is noise.

While recent pixel-space diffusion models like Diffusion Posterior Sampling (DPS) have shown promise, they are computationally expensive and limited to their training data. Latent Diffusion Models (LDMs), such as Stable Diffusion, are more powerful because they operate in a compressed latent space. However, using them for inverse problems is challenging: the encoder-decoder mapping is "many-to-one," meaning different latents can produce similar-looking images. A direct application of existing algorithms to latents often results in visual inconsistencies and mathematical failure.

The PSLD Framework

Researchers from UT Austin have introduced PSLD (Posterior Sampling with Latent Diffusion), the first framework that allows pre-trained LDMs to solve linear inverse problems with theoretical guarantees. The core of the algorithm is a three-part gradient update during the reverse diffusion process:

  1. Denoising Step: The standard diffusion step that moves the latent toward the manifold of "natural" data.
  2. Measurement Matching: A gradient step ensuring the decoded latent matches the observed measurements ($y$).
  3. The "Gluing" Objective: This primary innovation penalizes latents that, when decoded, create discontinuities at the boundaries of known data (e.g., the edge of an inpainting mask). This "glues" the generated content to the known observations, ensuring the encoder-decoder mapping remains consistent.
Comparison of the DPS (Algorithm 1) and PSLD (Algorithm 2) frameworks. Note the additional 'gluing' update in line 8 of Algorithm 2.

Crucially, the authors provide a theoretical analysis in a linear model setting, proving that PSLD is robust and works for any finite step size, whereas previous methods require perfectly tuned hyperparameters.

Experimental Results

The researchers evaluated PSLD across benchmarks including FFHQ, ImageNet, and general web images using pre-trained Stable Diffusion v1.5 and LDM-VQ-4.

Qualitative examples of inpainting using PSLD, demonstrating its ability to hallucinate semantically correct details like facial features and complex textures.

Key Findings

  • Quantitative Superiority: On the FFHQ dataset for random inpainting, PSLD achieved an FID score of 21.34, significantly better than the previous leader, DPS, which scored 33.48.
  • Qualitative Excellence: In tasks like block inpainting, PSLD produced photorealistic results that matched the surrounding context, whereas pixel-space methods often produced blurry or semantically nonsensical patches.
  • Versatility: The model successfully handled a wide array of tasks including random/block inpainting, 4x super-resolution, Gaussian deblurring, motion deblurring, and "destriping."

Conclusion and Future Work

PSLD demonstrates that foundation models like Stable Diffusion can be used "off-the-shelf" as powerful priors for image restoration. By performing the heavy lifting in a lower-dimensional latent space, the algorithm is more efficient and avoids mathematical pitfalls inherent in high-dimensional sampling. While currently focused on linear inverse problems and subject to the inherent biases of its training data, PSLD sets a new state-of-the-art for unsupervised posterior sampling.

Summary updated

BibTeX
@inproceedings{rout2023solving,
  author = {Litu Rout and Negin Raoof and Giannis Daras and Constantine Caramanis and Alexandros G. Dimakis and Sanjay Shakkottai},
  title = {{Solving Linear Inverse Problems Provably via Posterior Sampling with Latent Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=XKBFdYwfRo},
}
Figure