Status: accepted (2026-10-24, Daniel: “keep both methods”; proposed 2026-10-23 on
review-argon). Related: Messages are Inversions §5, lens, passing, gaussian §4, L-SPEC-001 The Factor Interface §2, §5.
Context
In AutoBayes (Definition 10), the Bayesian inversion of a lens returns the posterior belief over the unobserved channel given the prior and observation : . In belief propagation on a factor graph, however, the factor-to-variable message must be the likelihood contribution (with the cavity prior divided out, using at most as an expansion point for linearisation or Laplace approximation); otherwise a variable of degree counts its prior times.
Previously, Mycelium.factor_message’s generic fallback called LenticulumCore.invert(lens, prior, inputs, ps, st), while individual factors (ImplicitLayers, AdversarialFactors, VariationalDiffusion) returned likelihoods from invert and Lenticulum’s GaussianFactor returned posteriors from invert and bypassed invert in factor_message.
Options
- Have
invertreturn the likelihood message everywhere, departing from AutoBayes Definition 10. - Have
invertreturn the posterior everywhere and divide out the prior inMycelium.factor_messagevia a belief division operation. - Add
LenticulumCore.likelihood_message(lens, π, inputs, ps, st) -> (belief, st)for the cavity-free BP likelihood message (defaulting toinvert(lens, π, inputs, ps, st)for lenses whoseinvertalready returns a likelihood or point estimate), defineinverton Gaussian/Laplace factors ascombine(π, likelihood_message(...)), and haveMycelium.factor_messagecalllikelihood_message.
Decision
Option 3. Belief division is ill-defined when the prior or message is improper or non-Gaussian (SampleBelief, DiracBelief), whereas forward multiplication (Mycelium.combine(π, msg)) is always well-defined. Separating likelihood_message (BP factor-to-variable likelihood) from invert (AutoBayes posterior) allows both contracts to hold without division or double-counting.
Consequences
LenticulumCore.invert(lens, π, inputs, ps, st)returns the posterior onGaussianFactor,LinearConstraintFactor,NonlinearFactor, andLikelihoodFactor.LenticulumCore.likelihood_message(lens, π, inputs, ps, st)returns the likelihood message , using only where needed as an expansion point (NonlinearFactor,LikelihoodFactor,DiffusionFactor).Mycelium.factor_message’s generic fallback callsLenticulumCore.likelihood_message(lens, prior, inputs, ps, st).