NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Solving Inverse Problems with Latent Diffusion Models via Hard Data Consistency

Bowen Song, Soo Min Kwon, Zecheng Zhang, Xinyu Hu, Qing Qu, Liyue Shen

Introduction

Inverse problems are ubiquitous in imaging fields, ranging from reconstructing a 3D organ from 2D X-rays (CT scans) to sharpening a blurry photograph or filling in missing pixels. Mathematically, the goal is to recover an original image $x$ given noisy, often incomplete measurements $y = A(x) + \eta$.

Recently, Diffusion Models have emerged as the gold standard for solving these problems because they act as incredibly powerful "priors"—they inherently understand the manifold of realistic images. However, most traditional diffusion models operate in "pixel space," which is computationally expensive and highly memory-intensive. Latent Diffusion Models (LDMs) alleviate this by operating in a compressed "latent space."

The catch? The decoder that translates these latent representations back into pixels is highly nonlinear and non-convex. Existing methods that attempt to enforce "data consistency" (ensuring the reconstructed image matches the original measurements) typically rely on simple gradient steps. In the complex landscape of an LDM's latent space, these "soft" updates often get trapped in local minima, resulting in blurry or noisy outputs.

To overcome this, researchers introduce ReSample, a novel algorithm that replaces "soft" gradient updates with "hard" optimization and a unique stochastic resampling trick, achieving state-of-the-art image reconstruction while using significantly less memory.

Methodology: The ReSample Approach

ReSample tackles the non-convexity of LDMs through two core innovations:

  1. Hard Data Consistency: Instead of taking a small gradient step toward the measurements, ReSample treats data consistency as a "hard" optimization problem. At specific timesteps during the reverse diffusion process, the algorithm solves $\min_z \|y - A(D(z))\|^2$ to find a latent variable $z$ that strictly aligns with the observed data $y$.
  2. Stochastic Resampling: Once a latent variable that matches the data is found, the process cannot simply continue, as the sample has been pulled off the "noisy manifold" expected by the diffusion model. The authors propose a novel resampling scheme to map this measurement-consistent sample back onto the noisy data manifold. By utilizing information from the previous unconditional sample, this scheme reduces variance and yields significantly cleaner reconstructions.

To maintain computational efficiency, ReSample employs a skipped-step mechanism. The optimization is applied only periodically (e.g., every 10 steps) and is restricted to the later "semantic" and "refinement" stages of the diffusion process, where structural details are finalized.

Experimental Setup

The researchers evaluated ReSample on a variety of challenging tasks across several standard datasets:

  • Natural Images: CelebA-HQ (faces), FFHQ (faces), and LSUN-Bedroom.
  • Medical Imaging: The AAPM LDCT (Low-Dose CT) dataset, a standard benchmark for medical reconstruction.
  • Tasks Evaluated: 4x Super-resolution, 70% random inpainting, box inpainting, Gaussian/nonlinear deblurring, and sparse-view CT reconstruction.

Key Insights and Results

ReSample consistently outperforms state-of-the-art baselines like DPS (Diffusion Posterior Sampling) and PSLD across standard metrics (PSNR, SSIM, and LPIPS).

Qualitative results of ReSample on nonlinear deblurring and CT reconstruction tasks.

Several key insights drive these results:

  • The "Hard" vs. "Soft" Tradeoff: The paper demonstrates that "soft" consistency (gradient descent) is too weak for the complex latent space of LDMs. "Hard" consistency (full optimization) is strictly necessary to satisfy measurement constraints.
  • Initialization Matters: To avoid local minima during the hard optimization phase, the solver is initialized using Tweedie’s formula, providing a best-guess estimate of the clean image from the current noisy state.
  • The Three-Stage Phenomenon: Data consistency is most effective in the middle and late stages of diffusion. In the very early stages (near pure noise), the model lacks sufficient structure for the measurements to be helpful, allowing the algorithm to skip optimization early on and save time.
  • Medical Imaging Breakthrough: In CT reconstruction, ReSample achieved a PSNR of 35.91 on abdominal scans, significantly outperforming supervised baselines like FBP-UNet (32.77) and other diffusion-based methods.
  • Massive Memory Savings: Because LDMs operate in a compressed space, ReSample is highly memory-efficient. On the FFHQ dataset, ReSample required only ~5GB of VRAM, whereas pixel-space baselines like DDRM required over 20GB. Visually, ReSample produces images with fewer artifacts and sharper details, avoiding the "hallucinated" textures common in other models during difficult tasks like nonlinear deblurring.

Limitations and Future Work

The primary limitation of ReSample is its computational overhead. Even with the skipped-step mechanism, solving an optimization problem inside the diffusion loop is inherently slower than simple sampling. Making this "hard data consistency" step more efficient is a critical direction for future research. Additionally, while the method excels for general linear and nonlinear problems, it currently requires a known forward operator $A(x)$. Adapting the approach for "blind" inverse problems, where the degradation operator is unknown, remains an open challenge.

Summary updated

BibTeX
@inproceedings{song2024solving,
  author = {Bowen Song and Soo Min Kwon and Zecheng Zhang and Xinyu Hu and Qing Qu and Liyue Shen},
  title = {{Solving Inverse Problems with Latent Diffusion Models via Hard Data Consistency}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=j8hdRqOUhN},
}
Figure