Zero-Shot Adaptation for Approximate Posterior Sampling of Diffusion Models in Inverse Problems

Yasar Utku Alçalar, Mehmet Akçakaya

Abstract

Diffusion models have emerged as powerful generative techniques for solving inverse problems. Despite their success in a variety of inverse problems in imaging, these models require many steps to converge, leading to slow inference time. Recently, there has been a trend in diffusion models for employing sophisticated noise schedules that involve more frequent iterations of timesteps at lower noise levels, thereby improving image generation and convergence speed. However, application of these ideas for solving inverse problems with diffusion models remain challenging, as these noise schedules do not perform well when using empirical tuning for the forward model log-likelihood term weights. To tackle these challenges, we propose zero-shot approximate posterior sampling (ZAPS) that leverages connections to zero-shot physics-driven deep learning. ZAPS fixes the number of sampling steps, and uses zero-shot training with a physics-guided loss function to learn log-likelihood weights at each irregular timestep. We apply ZAPS to the recently proposed diffusion posterior sampling method as baseline, though ZAPS can also be used with other posterior sampling diffusion models. We further approximate the Hessian of the logarithm of the prior using a diagonalization approach with learnable diagonal entries for computational efficiency. These parameters are optimized over a fixed number of epochs with a given computational budget. Our results for various noisy inverse problems, including Gaussian and motion deblurring, inpainting, and super-resolution show that ZAPS reduces inference time, provides robustness to irregular noise schedules and improves reconstruction quality.

Introduction

Diffusion models have revolutionized image synthesis, but their application to inverse problems—recovering a clean image from a blurry, noisy, or incomplete measurement—remains computationally demanding. Standard Posterior Sampling methods require balancing the image prior with the measurement likelihood via a weight parameter ($\zeta_t$). Finding the optimal weight is particularly difficult when using irregular noise schedules designed to speed up convergence. This paper introduces Zero-Shot Approximate Posterior Sampling (ZAPS), a framework that automates hyperparameter tuning and improves reconstruction efficiency.

The ZAPS Framework

ZAPS addresses the "speed vs. tuning" trade-off by treating the inference process as a zero-shot learning task, optimizing parameters specifically for the image being reconstructed.

Algorithm Unrolling and Physics-Guided Loss

Rather than using fixed, manually tuned weights, ZAPS employs "algorithm unrolling." The sequence of diffusion sampling steps is treated as a neural network where the weights $\zeta_t$ are optimized during the reconstruction process. This optimization is driven by a physics-guided loss function that minimizes measurement consistency error ($||y - Ax_0||_2^2$), ensuring the current estimate aligns with the observed physical data.

Wavelet-based Hessian Approximation

A significant challenge in posterior sampling is the high computational cost of calculating the Hessian of the log-prior. ZAPS circumvents this by approximating the Hessian through diagonalization using a Discrete Wavelet Transform (DWT). By learning diagonal entries ($D_t$) for each timestep, the model efficiently captures the spatial and frequency characteristics of the image distribution without the memory overhead of a full Jacobian calculation.

Experimental Evaluation

The researchers evaluated ZAPS on the FFHQ and ImageNet datasets across tasks including Gaussian deblurring, motion deblurring, inpainting, and 4x super-resolution.

Efficiency and Quality

ZAPS demonstrates remarkable efficiency, producing high-quality reconstructions in just 30 sampling steps—a 33x reduction compared to the 1000 steps often required by standard Diffusion Posterior Sampling (DPS). Quantitatively, ZAPS achieved a PSNR of 26.06 dB in Gaussian deblurring on FFHQ, surpassing both DPS (25.20 dB) and DDRM (24.42 dB).

Motion deblurring results showing Ground Truth (GT), the blurry measurement, and the ZAPS reconstruction for human faces and red pandas.

As shown in the motion deblurring results above, ZAPS recovers sharp details and minimizes artifacts even under challenging blur conditions. Despite the overhead of per-image fine-tuning (typically 10 epochs), the total wall-clock time remains lower than standard methods (14.71s vs 47.25s for DPS) due to the drastically reduced number of neural function evaluations (NFEs).

Conclusion

ZAPS provides a robust, automated framework for solving inverse problems with diffusion models. By combining zero-shot adaptation with wavelet-based Hessian approximations, it eliminates the need for manual hyperparameter tuning while significantly accelerating inference. This approach paves the way for more practical "plug-and-play" solvers in domains like medical imaging and remote sensing.

Summary updated

BibTeX
@inproceedings{alcalar2024zero,
  author = {Yasar Utku Alçalar and Mehmet Akçakaya},
  title = {{Zero-Shot Adaptation for Approximate Posterior Sampling of Diffusion Models in Inverse Problems}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=3CWxz02hd3},
}
Figure