hyperiax.prebuilt.bffg.continuous_bf_sweep

hyperiax.prebuilt.bffg.continuous_bf_sweep(n_steps, prxy_scale_fn, prxy_shift_fn, prxy_diffusion_fn)[source]

Build the continuous-edge backward-filtering up-sweep (Theorem 23 §7.1).

For each parent, integrates the auxiliary-SDE backward equation (eq 29) over every child’s edge — either analytically (closed form when \(B = \beta = 0\)) or via hyperiax.utils.ode.RK4 — to produce the per-step canonical (H, F) trajectory. Each edge is linearised between two endpoint anchors (anchor_pa at \(t = 0\) and anchor at \(t = \tau_e\)), with \(\tilde a(t) = \tilde\sigma\tilde\sigma^\top\) linearly interpolated. The trajectory is scattered to the child (writes_children); the time-0 messages are fused into the parent’s vertex message (prec_v, ptnl_v, log_norm).

Parameters:
  • n_steps – Number of integration substeps per edge.

  • prxy_scale_fn(t, anchor, params) -> (d, d) returning \(B(t)\), or None to take the driftless analytic path (requires prxy_shift_fn also None).

  • prxy_shift_fn(t, anchor, params) -> (d,) returning \(\beta(t)\), or None for the analytic path.

  • prxy_diffusion_fn(t, anchor, params) -> (d, d) returning \(\tilde\sigma(t)\); the auxiliary covariance is \(\tilde a = \tilde\sigma \tilde\sigma^\top\).

Return type:

SweepFn

Returns:

A hyperiax.SweepFn that writes (prec_v, ptnl_v, log_norm) at every non-leaf node and the full (precs, ptnls) trajectories at every non-root node.