Expand description
Variational Message Passing engine.
Implements Winn & Bishop (2005) VMP for conjugate-exponential models built on
three families: Gaussian (mean-unknown / precision-known), Categorical, and
Dirichlet. The engine consumes a structural description via VmpConfig and
runs coordinate-ascent natural-parameter updates until the ELBO / L∞ residual
converges.
The algorithm is independent of the discrete factor-potential tables carried
by the FactorGraph type: VMP operates purely in continuous natural-parameter
space. The user is therefore required to annotate each variable with its
family and each factor with its conjugate role (see VmpFactor).
§High-level flow
- Initialise each variable’s variational distribution
q(v)from its prior. - For each iteration:
- For every variable
vin a deterministic order:- Accumulate contributions from every adjacent factor (natural-parameter deltas).
- Replace
q(v)’s natural parameters byprior_nat + Σ Δ.
- Compute the ELBO.
- For every variable
- Stop when |ΔELBO| < ε or the maximum natural-parameter residual < ε.
Divergence (ELBO decreasing by more than a small tolerance) is detected and
surfaced as a ConvergenceFailure error so the caller does not silently
consume a broken result.
Structs§
- Variational
Message Passing - The VMP coordinate-ascent engine.
- VmpConfig
- User-facing configuration describing a VMP problem.
- VmpResult
- Summary of a VMP run.
Enums§
- Family
- Variational family assigned to a variable.
- Variational
State - Variational state carried for a single variable.
- VmpFactor
- Conjugate relationship represented by a single factor.