Paper · 2026-10-22 · cs.CV, cs.LG
Beyond Best-of-k: Prior-Consistent DAPS for Ambiguous Nonlinear Inverse Problems
PC-DAPS runs DAPS on a bag of 4 particles per measurement, fits a Gaussian mixture to the bag's denoised estimates, and once per bag prunes clusters that the denoiser's prior score rates as inconsistent, without ground truth. On FFHQ phase retrieval, upside-down or colour-inverted samples fall from 14.5% to 1.5% (author-reported).
Generative priors for inverse problemsLangevin dynamicsGaussian mixture modelDiffusion modelsdiffusion-modelsinverse-problemsposterior-samplingphase-retrievallangevin-dynamics
arXivPDFCodeMarkdown14 min read
AI-compiled by claude-haiku-5-5 on 2026-11-21, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Some measurements fit many different pictures equally well. Phase retrieval is the standard example: it records only the brightness of the frequency components of an image, so a picture and its upside-down, colour-inverted version can produce the same record. A diffusion model knows which pictures look natural, but common samplers commit early to one candidate and refine it. They can then end up with a picture that matches the data and still looks wrong, such as a face turned upside down. Papers often hid this by running the sampler several times and keeping the run closest to the true image. That choice needs the answer, so it is not available in practice.
PC-DAPS keeps a small group of candidates alive within one run. Partway through the denoising it groups the candidates, asks the diffusion model how plausible each group looks, and drops the implausible groups by copying the plausible ones over them. The true image is never used. The authors report that the resulting samples are more often plausible and remain about as varied as separate runs. The gains are smaller on the more varied ImageNet images.
TL;DR
- PC-DAPS modifies DAPS by annealing a bag of K = 4 particles per measurement, modelling the denoiser posterior as a Gaussian mixture over the bag, and pruning prior-inconsistent clusters once per bag. §4 app. A.6.1
- Prior consistency is scored with the Tweedie residual at three noise scales, so no ground truth or classifier is needed. §4.1 eq. 9 app. A.4
- Author-reported: on FFHQ phase retrieval, upside-down or colour-inverted samples fall from 14.5% (DAPS, 4 runs) to 1.5% (PC-DAPS bag). Linear tasks are competitive, not uniformly better. tab. 1 tab. 2
- Phase-retrieval numbers compare a PC-DAPS mean over four particles with baselines that take the best of four runs against the truth, so the fair comparison is the mean-of-k table. §5 tab. 4
Problem
Diffusion-based inverse solvers keep one trajectory and tilt it with a local approximation of the likelihood. When the measurement is ambiguous, several prior modes remain plausible at high noise, but the trajectory can follow only one of them. A trajectory can then settle on a prior mode that the measurement does not support, next to a measurement-consistent mode that the prior does not support. Later steps mostly refine that mode §1 §3.2.
Best-of-k evaluation partly hides the failure: several independent runs are generated and the one closest to the ground truth is reported. That selection relies on the ground truth, which is absent at test time, and does not ensure prior consistency §1 §5. The discussion also argues that PSNR, SSIM and LPIPS compare with one reference and so penalise equally valid alternative solutions. The authors propose prior consistency as a separate axis §6.
The setting is Bayesian: a measurement y = A(x) + n with Gaussian noise of standard deviation β_y, and a posterior p(x | y) proportional to p(y | x) p(x) §3.1 eq. 1 eq. 2. The paper's example is Fourier phase retrieval, where rotated, translated or colour-channel-inverted faces match the same Fourier magnitudes §1 §3.1 fig. 1.
Method
PC-DAPS keeps the DAPS loop and changes three things. §4
- Bag of particles. K particles start as independent draws from the prior at the highest noise level. They share the annealing schedule and denoiser, and receive independent noise in their Langevin and re-noising steps §4.
- Gaussian-mixture denoiser posterior. DAPS approximates p(x0 | xt) by one Gaussian centred on the clean estimate. PC-DAPS centres one component on each particle's Tweedie estimate x̃0 = D(xt; σt) §4.2. Each component has a diagonal covariance. Before pruning, components are uniform with the bag's variance eq. 10. After pruning, there is one component per cluster, with the cluster's weight, mean and diagonal variance, estimated from its members eq. 11 eq. 12. Langevin then uses the closed-form mixture score eq. 13 §4.2.
- One-shot consensus pruning. At each iteration, PC-DAPS tests whether the bag is spread across several likelihood wells. The test compares the mean measurement residual of the particles with the residual of their mean eq. 8. When the test fires and the particles form more than one cluster, each cluster gets a prior-consistency score eq. 9. Clusters scoring below a relative threshold of the best cluster are pruned, and each pruned particle is overwritten with a duplicate of a survivor §4.1 app. A.4.
Two efficiency choices sit outside the core algorithm. The final Langevin refinement is skipped, and the probability-flow ODE uses one Euler step at high noise and five at low noise, with the switch at 65% of the annealing steps app. A.4 tab. 5.
The full procedure is Algorithm 1 in the appendix alg. 1 app. A.1. The pseudocode below follows it, with the helpers the paper describes in the text.
# PC-DAPS sampler [alg. 1]
# Input: y (B, ...), denoiser D, operator A, sigmas (decreasing to 0)
# Output: K samples per measurement, (B, K, ...)
def pc_daps(y, denoiser, operator, sigmas, K):
# K independent draws from the prior at the highest noise level [alg. 1]
bag = randn(B, K, ...) * sigmas[0] # (B, K, ...)
pruned = zeros(B, bool) # bags already checked
for i in range(len(sigmas) - 1):
sigma, sigma_next = sigmas[i], sigmas[i + 1]
# Tweedie estimate of every particle: the mixture centres [§4.2]
x0_tilde = denoiser(bag, sigma) # (B, K, ...)
# PF-ODE clean estimate: Langevin start, few Euler steps [§3.2]
x0_ode = ode_estimate(bag, sigma) # (B, K, ...)
if sigma_next == 0:
# No Langevin refinement at the last step [app. A.4]
x0_out = x0_ode
else:
# Langevin on the mixture score and the likelihood [eq. 7]
prior = gaussian_mixture(x0_tilde, pruned) # [eq. 10-12]
x0_out = langevin(x0_ode, prior, operator, y)
# One-shot consensus check on the refined particles [§4.1]
x0_out = consensus_check(x0_out, pruned, operator, y, sigma)
# Re-noise to the next level [alg. 1]
bag = x0_out + randn_like(x0_out) * sigma_next
return bag
# Runs for one bag b; the loop over bags is omitted for brevity.
def consensus_check(x0, pruned, operator, y, sigma):
# Skip bags already checked; test whether the bag is spread out [eq. 8]
r_bar = mean(sq_residual(operator, x0, y), over_particles)
r_star = sq_residual(operator, mean(x0, over_particles), y)
if pruned[b] or r_bar >= r_star:
return x0
# Cluster the bag into modes; act only if there are several [app. A.4]
labels = cluster(x0)
if num_clusters(labels) < 2:
return x0
# Prior-consistency score of each cluster [eq. 9]
scores = [prior_score(x0[labels == m]) for m in clusters(labels)]
best = max(scores)
# Keep clusters within the relative threshold of the best [§4.1]
keep = [s >= (1 + gamma) * best for s in scores]
# Replace each pruned particle by a copy of a survivor [app. A.4]
x0 = replace_with_survivors(x0, labels, keep)
pruned[b] = True
return x0
def prior_score(particles):
# Negative mean Tweedie residual over scales S [eq. 9] [app. A.4]
residuals = []
for s in (0.5, 1.0, 2.0):
noisy = particles + s * randn_like(particles)
denoised = denoiser(noisy, s)
residuals.append(sq_error(particles, denoised)) # per particle
return -mean(residuals) # <= 0, higher is better
def langevin(x, prior, operator, y):
# Chain targeting q(x0 | xt) p(y | x0) [eq. 7]; N is not stated
for step in range(langevin_steps):
# Data term, with its weight from the code, not from beta_y
data_grad = -grad_sq_error(operator, x, y) / tau ** 2
# Closed-form mixture score [eq. 13]
prior_grad = mixture_score(x, prior)
noise = randn_like(x)
x = x + lr * (data_grad + prior_grad) + sqrt(2 * lr) * noise
return xKey equations, written in the paper's notation:
\bar r = \frac{1}{K}\sum_{k=1}^{K}\|\mathcal{A}(x^{(k)}) - y\|^2,\qquad r^{\star} = \|\mathcal{A}(\bar x) - y\|^2 eq. 8
s(\mathcal{C}_m) = -\frac{1}{|\mathcal{C}_m|\,|\mathcal{S}|}\sum_{x\in\mathcal{C}_m}\sum_{\sigma\in\mathcal{S}}\bigl\|x - D_\theta(x+\sigma\epsilon;\sigma)\bigr\|^2 eq. 9
\nabla_{x_0}\log q(x_0\mid x_t)=\sum_{m=1}^{M}q_m(x_0)\,\Sigma_m^{-1}(\mu_m-x_0) eq. 13
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Bag size K | 4 | app. A.6.1 tab. 5 | Reported metrics average the K samples. Ablation: gains flatten beyond K = 8 to 16 app. A.4. |
| Annealing steps | 200 (the "1K" setting) | app. A.6.1 tab. 5 | Same as DAPS-1K. |
| ODE Euler steps | 1 for the first 65% of annealing steps, then 5 | app. A.4 tab. 5 | "1→5" in tab. 5. Code sets this in ode_switch_ratio. |
| Final Langevin | skipped | app. A.4 | Code makes an exception for HDR, see Paper vs code. |
| Noise scales S for prior score | {0.5, 1, 2} | app. A.4 | One noise draw per scale in the code. |
| Clustering | 32×32 bilinear, centred, PCA to 90% variance, spherical GMM with the number of components chosen by BIC, hard assignment | app. A.4 | The code also adds a variance floor and multiple EM starts; see Paper vs code. |
| Pruning threshold γ | not stated | app. A.4 | Paper: calibrate on 10 images per dataset, take the 95th percentile of within-cluster relative score gaps. No values given. Code: 0.065 and 0.15 edm_pcdaps.yaml. |
| Langevin steps N | not stated | alg. 1 app. A.1 | Code: 100 per task phase_retrieval.yaml. |
| Langevin step size η | not stated | eq. 7 | Code: 5e-5 for phase retrieval and inpainting, 1e-4 for most linear tasks; decays linearly to 1% of its start over annealing phase_retrieval.yaml mcmc.py. |
| Measurement noise β_y | 0.05 | §3.1 app. A.6 | Used in all tasks. |
| Data-term scale | not stated | eq. 7 | Code uses τ = 0.01 as a squared-residual divisor; see Paper vs code. |
| Test set | 100 images per dataset, 256×256 | app. A.6 | FFHQ and ImageNet. |
| Phase retrieval | Fourier magnitude, oversampling ratio 2.0 | §3.1 phase_retrieval.yaml | Oversampling is not stated in the paper. |
| Box inpainting | not stated in text | app. A.6 | The code uses a 128-pixel square inpainting.yaml. The sample figure caption says 190×190 app. A.7. |
| High-pass filter | 61×61 kernel, Gaussian σ = 5.0 | app. A.6 | Code matches. |
| 16× super-resolution | bicubic 256 → 16, σ = 0.05 | app. A.6 | Same operator family as 4×. |
| Annealing range σmin, σmax | not stated | — | Code: σmax = 100, σmin = 0.1, polynomial-7 spacing edm_pcdaps.yaml. |
Results
Author-reported. Setup: FFHQ and ImageNet at 256×256, 100 test images each, seven linear and three nonlinear tasks. Baselines are DAPS-4K for nonlinear and DAPS-1K for linear tasks. For phase retrieval, every baseline reports the best of four runs against the ground truth, while PC-DAPS reports the mean of its four particles app. A.6.1 tab. 1.
| Setting | Metric | Baseline | This paper | Source |
|---|---|---|---|---|
| Phase retrieval, FFHQ | PSNR / SSIM / LPIPS | DAPS 29.66 ± 4.17 / 0.770 / 0.177 (best of 4) | PC-DAPS 30.09 ± 1.77 / 0.834 / 0.152 (mean of 4) | tab. 1 |
| Phase retrieval, ImageNet | PSNR / SSIM / LPIPS | DAPS 20.98 ± 6.72 / 0.461 / 0.387 (best of 4) | PC-DAPS 21.75 ± 6.10 / 0.469 / 0.373 (mean of 4) | tab. 1 |
| Phase retrieval, FFHQ, mean of 4 for all | PSNR / SSIM / LPIPS | DAPS 25.11 ± 5.73 / 0.666 / 0.283 | PC-DAPS 30.09 ± 1.77 / 0.834 / 0.152 | tab. 4 |
| Phase retrieval, FFHQ outcomes | faithful / upside-down or colour-inverted / failed / unrecoverable | DAPS 79.5% / 14.5% / 6.0% / 4% | PC-DAPS 97.5% / 1.5% / 1.0% / 1% | tab. 2 §5 |
| Phase retrieval, ImageNet outcomes | faithful / upside-down or colour-inverted / failed / unrecoverable | DAPS 38.5% / 42.0% / 19.5% / 25% | PC-DAPS 45.0% / 30.5% / 24.5% / 15% | tab. 2 §5 |
| Super-resolution 4×, FFHQ | PSNR / SSIM / LPIPS | DAPS 29.36 / 0.782 / 0.173 | PC-DAPS 30.25 / 0.841 / 0.166 | tab. 1 |
| High-pass filter, FFHQ | PSNR / SSIM / LPIPS | DAPS 16.85 / 0.702 / 0.204; FGPS 18.04 / 0.761 / 0.184 | PC-DAPS 18.84 / 0.815 / 0.155 | tab. 1 |
| Nonlinear deblur, FFHQ | PSNR / SSIM / LPIPS | RED-Diff 30.72 / 0.793 / 0.162; DAPS 28.49 / 0.762 / 0.191 | PC-DAPS 29.04 / 0.804 / 0.180 | tab. 1 |
| Box inpainting, FFHQ | PSNR / SSIM / LPIPS | FPS-SMC 24.86 / 0.823 / 0.146 | PC-DAPS 24.73 / 0.825 / 0.152 | tab. 1 |
| Compute, phase retrieval | wall-clock vs LPIPS | DAPS counted as four runs | Single bag run, reported as faster for larger bags | app. A.5 |
The paper says PC-DAPS "is not uniformly superior" and is competitive on most tasks §5. The FFHQ phase-retrieval gain comes mainly from fewer upside-down or colour-inverted samples. On ImageNet the gains are smaller, and the authors attribute this to a less structured prior support §5 §6. Within a bag, samples still vary about as much as independent DAPS runs §5 fig. 3. For super-resolution, PC-DAPS is slower than DAPS, since it runs several particles app. A.5.
Paper vs code
The official repository is linked from the abstract footnote. The commit below is the one this card reads. Each entry names the paper text and the code. Entries that change the method are marked (method).
- (method) Langevin start point. Algorithm 1 starts Langevin from the Tweedie estimate x̃0 alg. 1. The text of DAPS starts it from the probability-flow ODE estimate §3.2. The code starts from the ODE estimate and uses the Tweedie estimate only as mixture centre sampler.py.
- (method) Consensus checks. The paper describes one one-shot check, fired at the first iteration where the diversity test passes §4.1. The code runs two stages, each allowed once per bag. Stage 1 uses the Tweedie residual, γ = 0.15, at any noise level, and it is consumed only when some cluster is pruned. Stage 2 uses the noisy-state residual, γ = 0.065, only when σ ≤ 1, and is consumed at its first firing even when nothing is pruned edm_pcdaps.yaml sampler.py sampler.py.
- (method) Mixture switch. The paper switches to cluster-based components after pruning §4.2. The code switches a bag to clusters at the first firing of either check, even if no cluster was removed sampler.py sampler.py.
- (method) Residual particles. The paper writes the test on x^(k) without saying which iterate it uses eq. 8. The code uses the noisy state for stage 2, the Tweedie estimates for stage 1, and the post-Langevin particles for logging sampler.py.
- (method) Pruning threshold. The paper gives no numeric γ. It says γ is
calibrated on 10 images per dataset app. A.4. The config sets fixed values
shared by both datasets, and
calibrateis False edm_pcdaps.yaml. No calibration output is shipped. - (method) Langevin scheme. The paper's Langevin update is the explicit step of Eq. 7 eq. 7. The code's default is a semi-implicit update that treats the mixture precision implicitly edm_pcdaps.yaml mcmc.py.
- (method) Orientation step, not in the paper. For phase retrieval on ImageNet only (the data root path contains "imagenet"), the code enables a 180-degree flip. At σ ≤ 0.3 it keeps the flipped particle when its prior score is higher posterior_sample.py sampler.py. The paper does not describe this step. The 180-degree flip is the only transform; colour inversion is not tried.
- (method) HDR override. The task file re-enables the final Langevin step and centres the mixture on the ODE estimate for HDR only hdr.yaml. The paper states both choices as global app. A.4.
- Data-term scale. The paper's likelihood uses β_y = 0.05 §3.1. The code divides the gradient of the squared residual by τ², with τ = 0.01 in every phase-retrieval and linear config mcmc.py phase_retrieval.yaml. Under the paper's Gaussian likelihood, the same drift corresponds to a noise scale of τ/√2, about 0.0071 (this is my derivation from the code, not stated anywhere).
- Inpainting size. The sample caption says 190×190 box inpainting app. A.7. The code's box inpainting config uses 128 pixels inpainting.yaml.
- Clustering. The paper says a Gaussian mixture is fitted after PCA app. A.4.
The code uses spherical components with a variance floor set by
cluster_eps, tries every component count up to K, and takes the best BIC over several EM starts pcdaps.py. - Prior-score details. The code averages the squared residual over dimensions rather than summing it. The paper's Eq. 9 sums. This is a constant factor, so the relative threshold is unaffected. The code also reuses one noise draw for all particles of a bag pcdaps.py.
- Divergence handling. The code resets particles with non-finite or very large values (|x| > 100) to their starting point. The paper does not mention this mcmc.py.
- Variance estimator. The code uses PyTorch's default unbiased variance (divisor K − 1) for the bag covariance. The paper does not say which estimator it uses pcdaps.py.
- Other settings. The code adds phase-retrieval oversampling of 2.0 phase_retrieval.yaml and an annealing range σ from 0.1 to 100 with polynomial-7 spacing edm_pcdaps.yaml. Neither is stated in the paper.
- Matches. Bag size 4, the 65% switch, the 1-to-5 ODE steps, the 32×32 PCA and BIC clustering, the score scales {0.5, 1, 2}, the cycling replacement of pruned particles, and the 200 annealing steps match the paper edm_pcdaps.yaml pcdaps.py.
Pitfalls
- Comparison protocol. Phase-retrieval baselines take the best of four runs against the truth, while PC-DAPS reports the mean of its particles. Use the mean-of-k table for a fair comparison: there PC-DAPS leads DAPS clearly (30.09 vs 25.11 PSNR on FFHQ) tab. 4.
- Classifier scope. The outcome classifier tests per-channel PSNR against the truth and its 180-degree twin, allowing ±1-pixel shifts and requiring a margin of 1 dB. It does not test other transforms. A sample whose channels match neither reference is labelled failed, even if its colours are inverted. Treat the labels as this classifier's output, not as a general measure pr_outcomes.py §5.
- Threshold sensitivity. γ decides how many clusters are removed. The paper gives no numeric value, and the code's two values are not explained in the paper. The paper's ablations cover ODE steps, annealing steps and bag size, not γ or the clustering settings app. A.4.
- Check timing. Because the code's stage 1 can fire at any noise level and
stage 2 is consumed without pruning, the check timing differs from the
paper's description. Reproductions should log
prune_log.json, which the code writes, to see when checks fire posterior_sample.py. - Cost. Compute scales roughly linearly with K app. A.5. The table gives 732 denoiser evaluations per particle for PC-DAPS-1K and 1000 per DAPS-1K run. At K = 4, that is about 2,928 evaluations for PC-DAPS and 4,000 for four DAPS runs, by the table's own definition tab. 5. The paper calls the clustering and mixture overhead small app. A.5. The code runs clustering in numpy on the CPU pcdaps.py.
- Numerically sensitive steps. The mixture responsibilities are computed in float64 with a softmax over log-weights, and components have a variance floor of 1e-4 pcdaps.py. The code's docstring says the semi-implicit update stays stable for small component variances, which is why it is the default mcmc.py.
- Seeds and hardware. The authors' README warns that DAPS and PC-DAPS are sensitive to the random generator and the GPU, and that results can differ noticeably README.md. Report several seeds or the standard deviations in the tables.
- Prior-structure limit. The authors say the pruning relies on the prior's local geometry, and that it works less well on ImageNet, where the prior is less structured §5 §6.
- Unstated values. The paper leaves out the Langevin step count and size, the likelihood scale, the threshold values and the σ range. An implementation built from the paper alone cannot be fully specified; the values in the Hyperparameters table that come from the code are marked as such.
Lineage
- Builds on: DAPS, Zhang et al., CVPR 2025, which the source bibliography lists without an arXiv id. PC-DAPS keeps DAPS's denoise, Langevin and re-noise loop and adds the bag, the mixture and the one-shot pruning §3.2 §4.
- Compared against: DAPS, DPS, DDNM, FPS-SMC, RED-Diff, FGPS, PnP-DM, DPnP and HIO, with the authors' implementations and their recommended settings app. A.6.1 tab. 1.
- Related: particle-based posterior samplers such as FPS-SMC and TDS, which use particles to improve fidelity rather than prior consistency §2. Post-hoc hallucination diagnostics for diffusion solvers §2.
- Superseded by: not known from this wiki.
Source and license
Adapted from “Beyond Best-of-k: Prior-Consistent DAPS for Ambiguous Nonlinear Inverse Problems” by Merve Kocabas, Benjamin A. Burns, Andreas Geiger, Kent Gauen, Sara Fridovich-Keil (arXiv:2610.31592), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/voilalab/PC-DAPS at commit 59b2f0461134 (MIT). Any quoted code is shown under that license.