definition design

“Inference” for an implicit diffusion learner is not one map. Listed here are the signatures that occur, what each returns, which algorithm computes it, and which ones a Bayesian lens can hold. Short version: there are point, anytime, distributional and message-passing variants. The original sketch’s signature is the anytime variant with an incoming message.

Sources: original to this vault (design and analysis); Mardani et al., A Variational Perspective on Solving Inverse Problems with Diffusion Models, arXiv:2305.04391 (RED-Diff); Chung, Kim, McCann, Klasky & Ye, Diffusion Posterior Sampling for General Noisy Inverse Problems, ICLR 2023 (DPS); Song et al., arXiv:2011.13456 (annealed Langevin, probability-flow ODE); Fang, Díaz, Buchanan & Sulam, Beyond Scores: Proximal Diffusion Models, arXiv:2507.08956 (ProxDM); code: implicit.jl, reddiff.jl, factor.jl, proxdm.jl

Theory (CT-ML wiki): Bayesian Lens · Bayesian Inversion · Statistical Game · Markov Category

1. The ingredients every signature draws from

  • Parameters , the noise predictor’s.
  • A polarity: the precision vector , which says which coordinates are inputs , outputs and latents (Implicit Diffusion Learners §2).
  • Evidence : clamp values on the inputs, and anchors on the anchored outputs.
  • An optional solver state: a previous , plus the optimiser’s moments if one is used.
  • An optional incoming message on any coordinate: a belief from a neighbouring factor.
  • A noise source, either a random generator or a fixed node set.

The outputs are an output value or belief on (and ), a residual / energy report, and an updated state.

2. The signatures

#namesignaturereturnscomputed by
1point (MAP-like)a stable root implicit_infer (deterministic nodes); prox_infer (proximal prior); RED-Diff
2point + residual and (or )implicit_infer returns residual, converged, stable
3anytime, warm-startedthe state after steps, its residual, the new stateimplicit_infer(…; z_init, maxiters = k); RED-Diff with steps = k
4with incoming messageas 3, with soft evidenceprecisions and anchors encode a Gaussian message
5variationalmean and covarianceRED-Diff with (not implemented; The Diffusion Factor §5)
6samplingone posterior sampleDPS, annealed Langevin, guided reverse SDE; unconditional: proxdm_sample
7amortised, optionally refined by 3a learned initialiser (the AmortisedInversion slot)

The sketch’s signature is #3 combined with #4. The state is the warm start. is an incoming message: the energy a neighbour assigns to the shared coordinates, here a quadratic, i.e. a precision and a mean, which enter as and . The returned is the residual or energy report a scheduler needs to decide whether to keep iterating.

3. Which is “the” inference?

None of them alone. In the Bayesian-lens reading, inference is the backward map , which depends on a prior . The signatures are different approximations of the same exact object, the conditional of the joint the model represents:

graph LR
  exact["exact conditional p(y,u | x)"] --> samp["#6 sampling: unbiased draws"]
  exact --> var["#5 variational: Gaussian fit"]
  var -->|"σ → 0"| point["#1/#2 point: a mode of the smoothed density"]
  point -->|"stop after k steps"| any["#3 anytime"]
  any -->|"evidence as a message"| msg["#4 message passing"]
  • Sampling (#6) is the only signature that represents multimodality. On the circle it returns both branches with the right frequencies; a point method returns the branch whose basin you started in.
  • Point methods (#1–#4) return a mode of . That is a smoothed posterior mode, and the smoothing bias is computed in Implicit Diffusion Learners §5.
  • Anytime (#3) is what message passing actually calls. A factor in a loopy graph is asked for a few steps, then again with new neighbour messages, so its state persists between calls (in st).

4. The algorithms, sorted by what they compute

methodtargetdeterministic?uses the networkbackward pass available
RED-Diff (Mardani et al.)a mode of the smoothed prior, by stochastic descentno (fresh each step)forward onlyonly after fixing the nodes (§5)
implicit_infer (this package)a stable root of the deterministic fieldyesforward, plus input Jacobianyes, by the adjoint
noise-free single levela fixed point of the Tweedie denoiseryesforward, plus input Jacobianyes (it is a DEQ, Deterministic Relaxation)
DPS, ΠGDMa posterior sample, by guided reverse SDEnoforward and backward (DPS)only by differentiating the sampler
annealed Langevina posterior samplenoforwardscore-function or pathwise estimators
ProxDM sampler (proxdm_sample)a sample, by backward-Euler proximal stepsnothe prox networkonly by differentiating the sampler
proximal inference (prox_infer)a mode of the relaxed problem, by half-quadratic splittingyesthe prox networknot yet (the IFT applies; proxdm §5)

Sampling methods are needed when the downstream task needs uncertainty, or when the relation is multivalued and the branch matters. Point methods are what a factor graph with messages can consume today, and what an implicit learner differentiates through.

5. Determinism, and what the noise is

All diffusion-based inference involves noise in two places: the Monte-Carlo estimate of the expectation over , and, for samplers, the injected noise that makes the output random. The first is a numerical device and can be fixed once (sample-average approximation: FieldNodes). The second is semantic: it is what makes the output a sample rather than a mode.

So “the output is nondeterministic” is true for samplers and for RED-Diff as published. It is not inherent to the point signature: with fixed nodes, #1–#4 are deterministic functions of . Determinism is exactly what the implicit function theorem needs (Backpropagation through Implicit Inference).

6. What the factor graph can hold today

Mycelium passes DiracBeliefs and GaussianBeliefs. Signatures #1–#4 produce Diracs and consume Gaussian messages as . #5 would produce a Gaussian and fix the problems listed in The Diffusion Factor §4. #6 needs a SampleBelief, which exists in the core but which no diffusion factor produces yet.

Related: Implicit Diffusion Learners, Backpropagation through Implicit Inference, Deterministic Relaxation, The Implicit Diffusion Factor as a Statistical Game, RED-Diff as a Statistical Game, ProxDM and Proximal Alternatives