hyperiax.prebuilt.bffg.discrete_schema

hyperiax.prebuilt.bffg.discrete_schema(d)[source]

Field layout for a discrete-edge BFFG tree.

Parameters:

d (int) – State dimension.

Return type:

dict[str, tuple[int, ...]]

Returns:

Mapping of field name to per-node trailing shape, suitable for hyperiax.Schema.from_dict. Fields:

  • val: (d,) — node state (filled by the forward sweep).

  • z: (d,) — i.i.d. standard-normal noise driving the forward sample.

  • ptnl: (d,) — canonical-form potential F at the node (BF).

  • prec: (d, d) — canonical-form precision H at the node (BF).

  • anchor: (d,) — per-edge linearisation point for the auxiliary kernel (Algorithm 3 §7.1); leaves are seeded at the observation, internal nodes refined via discrete_refine_anchor().

  • log_norm: () — canonical-message log-norm; sums up the tree so log_norm[root] is the marginal log-evidence.

  • log_corr: () — per-edge importance log-weight from forward guiding (Theorem 14.3).