SP$^3$: Spherical Priors for Plug-and-Play Restoration

Sean Man, Ron Raphaeli, Matan Kleiner, Or RonaiNeurIPS 2026

TL;DR

Restoring degraded images (think blurring, missing pixels, or heavy noise) using modern diffusion and flow models yields gorgeous results, but waiting for hundreds of gradient-heavy steps at inference time is painfully slow. This paper introduces $\text{SP}^3$, a gradient-free Plug-and-Play algorithm that swaps out sluggish diffusion denoisers for Spherical Encoders—autoencoders that map images onto a tightly packed, uniform sphere. The result is an "anytime" restoration method that produces sharp, realistic images from the very first step and matches state-of-the-art perceptual quality while running $3\times$ to $630\times$ faster.

Figure 1: SP3. We introduce a Plug-and-Play image restoration algorithm (left) that iteratively projects degraded observations onto a tightly structured latent space using a Spherical Encoder (SE) generative prior. The trajectory along the sphere illustrates our gradient-free, alternating optimization approach, which navigates the image manifold to enforce data consistency. The magnified crops highlight the algorithm’s “anytime” generation capability, demonstrating how it stably converges to produce perceptually sharp and plausible details from the very first iteration. (right) SP3 achieves perceptual quality comparable to state-of-the-art zero-shot methods, while being 3 −630× faster.

What Problem Does This Paper Address?

Suppose you have a blurry, noisy photo $y$, created by applying some known degradation $A$ to a clean image $x$. To recover $x$, you have to balance two competing goals: data fidelity (the result should match your blurry measurement when degraded) and an image prior (the result should look like a real, natural photo, not a mathematical artifact).

The Plug-and-Play (PnP) framework solves this zero-shot—meaning you don't have to retrain a network for every new type of blur or mask—by alternating between enforcing data fidelity and applying a pretrained denoiser as the prior. Recently, researchers have plugged powerful diffusion and flow-matching models into this setup. While the visual quality is fantastic, there's a catch: guiding an iterative diffusion process requires computing gradients through the massive generative network at every step of inference. What should be a quick photo fix turns into a computational slog.

Earlier generative models like VAEs and GANs have simpler latent spaces, but optimizing in their latent spaces still requires backpropagation through the decoder and notoriously falls into "posterior holes"—uncharted regions of latent space that decode into bizarre, unrealistic images.

Methods

Instead of denoisers or standard VAEs, the authors build upon the recently proposed Sphere Encoder (SE). Unlike a VAE, which nudges latent vectors toward a Gaussian cloud (leaving empty pockets in high dimensions), an SE normalizes encoder outputs onto the shell of a sphere and injects noise during training so the entire spherical surface is densely and uniformly populated with valid natural images.

The authors embed this SE into a classic Half-Quadratic Splitting (HQS) optimization loop, creating $\text{SP}^3$ (Spherical Priors for Plug-and-Play Restoration). Each iteration consists of just two fast, alternating steps:

  1. The Spherical Projection Step (What's New): Instead of optimizing a latent vector via backpropagation through the decoder alone, $\text{SP}^3$ uses both the encoder $E$ and decoder $D$ as a direct, forward-pass projection operator onto the natural image manifold: it encodes the current image estimate, adds a tiny bit of Gaussian noise, re-projects it onto the sphere via RMS normalization, and decodes it back to pixel space.
  2. The Data-Consistency Step (What's Standard): Given that clean-looking prior image, $\text{SP}^3$ pulls it back toward the actual physical measurements $y$. For linear degradations (deblurring, super-resolution, inpainting, denoising), this is a standard proximal update with an exact, closed-form linear algebra solution.

Crucially, zero gradients or backpropagation are computed through the neural network during restoration.

Datasets

The authors do not introduce new benchmarks, instead following standard evaluation splits established by recent PnP literature (PnP-Flow):

  • AFHQ-Cat ($256 \times 256$ resolution), along with AFHQ-Dog and AFHQ-Wild splits to test generalization.
  • CelebA ($128 \times 128$ resolution).

Across these datasets, models are tested on six noisy linear tasks (Gaussian denoising, Gaussian deblurring, $2\times$/$4\times$ super-resolution, box inpainting, $70\%$ random pixel inpainting, and paintbrush inpainting) plus two nonlinear tasks (JPEG artifact removal and nonlinear motion deblurring).

Key Insights and Ideas

  • Why standard VAEs fail where Spherical Encoders shine: If you take a blurry image and repeatedly encode and decode it through state-of-the-art VAEs (like SD-VAE or FLUX.1-VAE), the image rapidly diverges into garbage within a few steps. Doing the exact same thing with a Sphere Encoder pulls the out-of-distribution image right onto the natural image manifold and keeps it there stably, thanks to its bounded, hole-free spherical geometry.
  • Noise isn't a bug; it's a stabilizer: Injecting a small amount of random latent noise ($\sigma > 0$) before projecting back onto the sphere during inference is essential. A purely deterministic projection ($\sigma = 0$) slowly diverges in perceptual quality, whereas slight stochasticity keeps samples anchored in high-probability regions of the manifold.
  • Don't throw away the encoder: Naive latent-space optimization only backpropagates through the decoder $D$. Using the full $E \to D$ round-trip exploits the rich manifold-mapping knowledge the encoder learned during joint training—improving both quality and speed.
  • "Anytime" restoration: Diffusion models output pure static until the very end of their sampling schedule. Because $\text{SP}^3$ projects directly to the clean image manifold on iteration one, you get a sharp, usable image after a single step, and subsequent steps simply refine fine details and measurement loyalty.

Key Results

Evaluated on distortion (LPIPS, PSNR) and perceptual quality (KID, lower is better) on a single NVIDIA L40S GPU:

  • Massive Speedups: Using 20 steps, $\text{SP}^3$ achieves perceptual quality on par with top zero-shot competitors while running $3\times$ to $630\times$ faster overall—specifically $8\times$ faster than OT-ODE and $60\times$ faster than DPS. Even a 1-step $\text{SP}^3$ pass beats several competing multi-step methods in perceptual quality.
  • Superior to Latent-Optimization Baselines: On AFHQ-Cat deblurring, $\text{SP}^3$ reaches $25.7\text{ dB}$ PSNR and $2.64 \text{ KID}\times 10^3$ in $0.28\text{ seconds}$, easily beating decoder-only projected gradient descent ($23.1\text{ dB}$ PSNR, $5.49 \text{ KID}\times 10^3$, $1.17\text{ s}$).
  • Nonlinear Flexibility: Even when gradients are needed for nonlinear physics (like nonlinear motion blur, using 5 image-space gradient steps per iteration without touching the network), $\text{SP}^3$ beats DPS on PSNR ($22.28$ vs. $20.70\text{ dB}$) and LPIPS ($0.188$ vs. $0.254$) while running $36\times$ faster ($8.3\text{ s}$ vs. $304.9\text{ s}$).

Limitations and Future Work

  • Perception over Distortion: Because $\text{SP}^3$ approximates a MAP estimator, it favors sharp, realistic textures over smooth pixel-averaging (the classic perception-distortion tradeoff). It does not compute Minimum Mean Square Error (MMSE) estimates, nor is it a true posterior sampler like DPS.
  • Known Forward Operators Only: The algorithm assumes you know the exact degradation operator $A$; blind restoration (where the blur kernel or degradation is unknown) is out of scope.
  • Scale of Pretrained Priors: Experiments are currently constrained to domain-specific $128\text{px}$ and $256\text{px}$ pretrained SE models, and performance drops on out-of-distribution data. Scaling Spherical Encoders to diverse, high-resolution natural images—and exploring whether latent sphere noise can be harnessed for true posterior sampling—are key next steps.

Summary updated

Abstract

In this paper, we introduce SP$^3$, a novel Plug-and-Play algorithm that accelerates maximum a posteriori image restoration by replacing denoisers with Spherical Encoders (SE) as generative priors. SP$^3$ approximates the intractable proximal prior step by utilizing the SE tightly structured latent space as a robust projection onto the natural image manifold. Alternating this projection with a closed-form data-consistency step, via Half-Quadratic Splitting, achieves stable convergence without requiring gradient computation during inference. This unique formulation unlocks "anytime" restoration capabilities, producing sharp, plausible images from the first iteration. Across image restoration tasks, SP$^3$ often achieves perceptual quality comparable to state-of-the-art zero-shot diffusion and flow methods while being $3$-$630\times$ faster.
BibTeX
@inproceedings{man2026sp,
  author = {Sean Man and Ron Raphaeli and Matan Kleiner and Or Ronai},
  title = {{SP$^3$: Spherical Priors for Plug-and-Play Restoration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=F9SLbhP7uz},
}
Figure