Abstract
Diffusion models have emerged as a powerful tool for solving inverse problems, yet their practical application is often hindered by slow sampling speeds and the need for meticulous hyperparameter tuning. We present Zero-Shot Approximate Posterior Sampling (ZAPS), a framework that automates the adaptation of diffusion models to specific inverse problems during inference. By treating the sampling process as a zero-shot learning task, ZAPS optimizes log-likelihood weights and a learnable Hessian approximation on-the-fly. Our results demonstrate that ZAPS achieves state-of-the-art reconstruction quality with significantly fewer sampling steps, offering a 30–50x reduction in iterations compared to traditional methods like Diffusion Posterior Sampling (DPS).
Introduction
The field of computer vision has been transformed by diffusion models, which excel at generating high-fidelity images from noise. However, applying these models to inverse problems—such as deblurring, inpainting, and super-resolution—presents unique challenges. Solving an inverse problem involves recovering an original image $x$ from a degraded observation $y$, typically modeled as $y = Ax + n$, where $A$ is a forward operator and $n$ is noise. While methods like Diffusion Posterior Sampling (DPS) provide a robust framework for this task, they are computationally expensive, often requiring 1,000 or more sampling steps to produce high-quality results.
The Bottleneck of Manual Tuning
A major hurdle in accelerating diffusion-based inverse solvers is the sensitivity of the guidance term. This term ensures that the generated image remains consistent with the observed data $y$. In accelerated sampling schedules, the weight of this guidance term must be carefully tuned for different noise levels, image types, and degradation operators. Manual tuning is not only time-consuming but often results in suboptimal performance when applied to diverse real-world data.
The ZAPS Framework
To address these limitations, we introduce Zero-Shot Approximate Posterior Sampling (ZAPS). ZAPS shifts the paradigm from static parameter selection to dynamic, per-image adaptation.
1. Algorithm Unrolling and Learnable Weights
ZAPS treats the iterative sampling process as an unrolled neural network. The log-likelihood weights ($\zeta_t$), which control the influence of the measurement constraint at each timestep $t$, are treated as learnable parameters. This allows the model to adapt its guidance strategy to the specific characteristics of the input image and the noise schedule.
2. Physics-Guided Self-Supervision
During the inference phase, ZAPS performs a brief "zero-shot" fine-tuning. It minimizes a self-supervised loss function based on physical consistency: $L(y, x_0) = ||y - Ax_0||_2^2$. By ensuring that the estimated clean image $x_0$ at each step can reconstruct the observation $y$ through the forward operator $A$, the model rapidly converges toward a physically plausible solution.
3. Efficient Hessian Approximation
A critical component of posterior sampling is accounting for the curvature of the log-prior. However, computing the full Hessian of the score function is memory-prohibitive. ZAPS employs a Discrete Wavelet Transform (DWT) to approximate the Hessian. By assuming the Hessian is diagonal in the wavelet domain—a reasonable assumption for natural images—the framework learns diagonal entries ($D_t$) alongside the weights, enabling efficient backpropagation on standard hardware.
Experimental Evaluation
We evaluated ZAPS on the FFHQ (human faces) and ImageNet (diverse objects) datasets at 256x256 resolution. The framework was tested across four tasks: Gaussian deblurring, motion deblurring, 70% random inpainting, and 4x super-resolution.
ZAPS consistently outperformed baseline methods in both speed and quality. In Gaussian deblurring on FFHQ, ZAPS achieved a Peak Signal-to-Noise Ratio (PSNR) of 26.06 and a Learned Perceptual Image Patch Similarity (LPIPS) of 0.121. In comparison, the standard DPS method achieved 25.20 PSNR and 0.128 LPIPS while requiring 1,000 steps. ZAPS reached these superior metrics in only 20–30 sampling steps (approximately 300 neural function evaluations including the fine-tuning overhead).
Discussion and Conclusion
The success of ZAPS highlights the potential of "inference-as-training." By dedicating a small amount of computation to adapt the model to the specific measurement at hand, we can bypass the rigid constraints of traditional sampling schedules. The wavelet-based Hessian approximation proves to be a scalable solution for capturing local image statistics without the overhead of full Jacobian computations. While current assumptions regarding wavelet decorrelation hold well for natural images, future work may explore more flexible learned transforms to further enhance robustness across diverse data distributions. ZAPS represents a significant step toward making diffusion-based inverse solvers practical for real-time applications.
Summary updated