Enhancing Diffusion Models for Inverse Problems with Covariance-Aware Posterior Sampling

Shayan Mohajer Hamidi, En-Hui YangarXiv 2024 · DOI

Abstract

Solving inverse problems—such as deblurring, inpainting, and super-resolution—requires effective image priors. While Denoising Diffusion Probabilistic Models (DDPMs) serve as powerful priors, current methods often rely on crude likelihood approximations that necessitate extensive hyperparameter tuning. This paper introduces Covariance-Aware Diffusion Posterior Sampling (CA-DPS). By deriving a closed-form formula for posterior covariance and approximating it via finite differences, CA-DPS achieves more accurate "covariance-aware" sampling. Experimental results on FFHQ and ImageNet demonstrate that CA-DPS outperforms existing state-of-the-art methods in both visual quality and quantitative metrics, while eliminating the need for task-specific guidance scale tuning.

Introduction

Inverse problems involve recovering a clean image $x$ from a corrupted measurement $y = \mathcal{A}(x) + n$. Diffusion models have become a standard tool for this, using the learned distribution of natural images to guide the reconstruction process. The core challenge is approximating the likelihood term $p(y|x_t)$ during the reverse diffusion process. Existing methods like Diffusion Posterior Sampling (DPS) often approximate this likelihood using only the mean of the distribution, leading to reconstruction biases and a heavy reliance on manually tuned "guidance scale" hyperparameters.

Methodology: Covariance-Aware Sampling

The authors propose CA-DPS to incorporate the second moment (covariance) of the reverse diffusion process, moving beyond simple point estimates.

Theoretical Foundation

The method is built upon a new theoretical derivation (Theorem 1) providing a closed-form expression for the posterior covariance of a general exponential conditional distribution family. This derivation reveals that the covariance is intrinsically linked to the Hessian (second derivative) of the log-density.

Efficient Approximation

Since standard diffusion models only provide the "score" (first derivative), the Hessian is not directly accessible. To maintain computational efficiency, CA-DPS approximates the Hessian as a diagonal matrix using a finite difference method between consecutive diffusion time steps. This approach provides "free" second-order information without the overhead of full Hessian computation or model retraining.

Refined Likelihood

By combining the analytical mean (via Tweedie’s formula) with the newly approximated covariance, CA-DPS constructs a significantly more accurate Gaussian approximation of the likelihood $p(y|x_t)$. This mathematically grounded approach allows the "strength" of the guidance to adjust itself naturally, removing the need for the heuristic guidance scale parameter $\zeta$.

Experimental Results

The performance of CA-DPS was evaluated on standard high-resolution benchmarks, including FFHQ and ImageNet (256×256), across tasks such as random/box inpainting, Gaussian/motion deblurring, and super-resolution.

Quantitative Performance

CA-DPS consistently achieves superior results across multiple metrics. On the FFHQ dataset, it recorded the lowest FID and LPIPS scores for nearly all tested tasks. For instance, in random inpainting, CA-DPS improved the FID from 21.19 (DPS) to 20.14.

Quantitative performance (FID, LPIPS, SSIM) on FFHQ and ImageNet datasets comparing CA-DPS to baseline methods.

Qualitative Analysis

Visual comparisons highlight the ability of CA-DPS to recover fine-grained textures and structural details that other methods miss. Whether reconstructing the knit pattern of a hat or the clarity of facial features in blurred images, CA-DPS produces more realistic and faithful results.

Qualitative comparison of CA-DPS against other state-of-the-art methods across various inverse problems.

Posterior Accuracy

In synthetic experiments using a mixture of 25 Gaussians (Toy GMM), CA-DPS was the only method capable of accurately capturing all modes of the true posterior distribution. Baselines like DPS and $\Pi$GDM frequently suffered from mode collapse or failed to represent the true distribution shape.

Conclusion and Future Work

CA-DPS demonstrates that accounting for uncertainty (covariance) in the diffusion process leads to more stable and accurate guidance for inverse problems. By leveraging finite differences for second-order information, it offers a practical, tuning-free improvement over existing solvers.

Current limitations include the use of a diagonal Hessian approximation, which may overlook complex inter-pixel correlations. Future research could explore non-diagonal approximations or the integration of covariance-aware sampling into faster frameworks like consistency models to address the inherent sampling speed limitations of DDPMs.

Summary updated

BibTeX
@misc{hamidi2024enhancing,
  author = {Shayan Mohajer Hamidi and En-Hui Yang},
  title = {{Enhancing Diffusion Models for Inverse Problems with Covariance-Aware Posterior Sampling}},
  year = {2024},
  eprint = {2412.20045},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.20045},
}
Figure