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

Litu Rout, Negin Raoof, Giannis Daras, Constantine Caramanis, Alex Dimakis, Sanjay Shakkottai

Introduction

Inverse problems involve recovering a high-quality image from corrupted or partial measurements, such as a blurry photo or an image with missing pixels. Recently, Diffusion Models have become the "gold standard" for this task because they act as powerful priors, helping "fill in the blanks" with realistic details.

However, most existing methods (like DPS or DDRM) operate in pixel space. This is problematic because pixel-space models are computationally expensive and struggle with high resolutions. The most powerful modern models, like Stable Diffusion, are Latent Diffusion Models (LDMs)—they operate in a compressed "latent space."

The challenge is that while our measurements (the "clues") are in pixel space, the diffusion process happens in a hidden latent space. Because the mapping from pixels to latents is many-to-one (lossy), it is difficult to ensure that the generated latent actually matches the specific pixels we observed. A "vanilla" extension of previous methods simply fails to produce consistent results. This paper introduces PSLD (Posterior Sampling with Latent Diffusion), the first framework that allows pre-trained latent diffusion models to solve linear inverse problems such as inpainting, deblurring, and super-resolution.

Methodology

The authors propose PSLD, which modifies the reverse diffusion process with two key additions to the standard gradient updates:

  1. The "Goodness" Term: This ensures the latent remains a "fixed point" of the encoder-decoder cycle. It keeps the latent on the manifold of "real" data that the model understands.
  2. The "Gluing" Objective: This core innovation penalizes the difference between the current latent and the encoded version of a "glued" image—an image where the known measurements are literally pasted onto the model's current best guess.

By adding these terms to the sampling process, the model is forced to generate latents that perfectly respect the known parts of the image when decoded, while using the LDM's power to hallucinate the missing parts realistically.

Key Insights

  • Avoiding the "Curse of Ambient Dimension": Pixel-space methods have to calculate gradients in massive $d$-dimensional spaces. PSLD works in the much smaller $k$-dimensional latent space, which theoretically avoids certain optimization pitfalls and is more computationally efficient.
  • The "Gluing" Secret Sauce: Simply trying to match measurements isn't enough in latent space. The "gluing" step ensures that the denoising update, the measurement update, and the latent manifold update all point toward the same optimal point.
  • Provable Recovery: In a simplified linear setting, the authors mathematically prove that PSLD will recover the ground truth image exactly, regardless of the step size used—a level of robustness not found in previous pixel-space algorithms.

Experiments and Results

The researchers evaluated their method using datasets like FFHQ 256, ImageNet 256, and general web images to test both in-distribution and out-of-distribution performance. They leveraged pre-trained models such as Stable Diffusion v1.5 and LDM-VQ-4.

PSLD sets a new state-of-the-art for unsupervised inverse problem solving:

  • Quantitative Wins: On FFHQ 4x super-resolution, PSLD achieved an LPIPS score of 0.233, significantly better than the previous leader, DPS (0.291). In random inpainting, it outperformed baselines across FID and LPIPS metrics.
Quantitative comparison of PSLD against baseline methods across various inverse problems.
  • Qualitative Superiority: Visual results show that PSLD produces much sharper, more photorealistic textures compared to pixel-space methods, which often produce "blurry" or "hallucinated" artifacts that don't match the original context.
Qualitative results of PSLD on inpainting tasks, showing original, masked, and reconstructed images.
  • Zero-Shot Versatility: The framework works "out of the box" for random inpainting, block inpainting, denoising, deblurring, destriping, and super-resolution without needing any task-specific fine-tuning.

Limitations and Future Work

  • Foundation Model Bias: Since PSLD relies on pre-trained models like Stable Diffusion, it inherits any biases present in the training data.
  • Linear vs. Non-Linear: The current theoretical proof and most experiments focus on linear inverse problems. Extending this to non-linear problems remains a frontier for future research.
  • Computational Cost: While more efficient than pixel-space diffusion at high resolutions, running a large model like Stable Diffusion still takes significant time (approx. 190 seconds per image in their setup), which might be too slow for real-time applications.

Summary updated

BibTeX
@inproceedings{rout2023solving,
  author = {Litu Rout and Negin Raoof and Giannis Daras and Constantine Caramanis and Alex 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