hyperiax.prebuilt.bffg.continuous_fg_sweep¶
- hyperiax.prebuilt.bffg.continuous_fg_sweep(n_steps, drift_fn, diffusion_fn, prxy_scale_fn, prxy_shift_fn, prxy_diffusion_fn)[source]¶
Build the continuous-edge forward-guided down-sweep (Theorem 23 §7.1).
For each non-root node, integrates the guided SDE (eq 31)
\[dX_u^\circ = \big(b(u, X_u^\circ) + a(u, X_u^\circ)(F(u) - H(u)X_u^\circ)\big)du + \sigma(u, X_u^\circ)\,dW_u\]from
parent.vals[-1]over the edge, using the BF-cached(precs, ptnls)trajectory as the guiding term andnode.zsfor the noise. Writes the per-step Theorem-23 importance log-weight increment\[\frac{(\mathcal L - \tilde{\mathcal L})g}{g} = (b - \tilde b)\cdot r - \tfrac12 \mathrm{tr}((a - \tilde a) H) + \tfrac12 r^\top(a - \tilde a) r, \qquad r = F - H X^\circ,\]integrated over the edge into
log_corr(Remark 24). Auxiliary \(\tilde a(t)\) is linearly interpolated between the two anchors — same convention ascontinuous_bf_sweep().- Parameters:
n_steps – Number of substeps per edge.
diffusion_fn (drift_fn /) – True SDE
(t, x, params) -> array.prxy_diffusion_fn (prxy_scale_fn / prxy_shift_fn /) – Auxiliary linear-SDE
(t, anchor, params) -> array(same callables fed tocontinuous_bf_sweep(); passNonetoprxy_scale_fnandprxy_shift_fnfor the driftless analytic case).
- Return type:
- Returns:
A
hyperiax.SweepFnthat writes(vals, log_corr)at every non-root node. Runcontinuous_bf_sweep()first.