implementation

The linear-Gaussian factor with its weight A and/or bias b exposed as channels: with a point input, the factor is linear-Gaussian in the exposed blocks, so its messages and Bethe term are exact closed forms.

Sources: code: exposure.jl; the generic wrapper in Mycelium’s exposure.jl; tests in test/exposure.jl

Theory (CT-ML wiki): Bayesian Inversion

Implements L-SPEC-003 §1.2 (L-SPEC-003 Exposed Parameters and Energy Channels) for GaussianFactor.

Theory

With the input clamped at the residual is

using . The factor is therefore a linear-Gaussian relation among the blocks that carry beliefs, and every message is the usual one. For a target block , the other blocks’ means and covariances (a point has ; an unexposed block is the point in ps) give

To the output this is the posterior predictive ; to it has rank nout when (rank 0 when ), so it is improper unless nin = 1, and a prior on the weight makes the belief proper. An incoming belief on a block may itself be improper as long as the directions sees are proper (): then has mean and covariance ; otherwise the message throws. If another block has no information and a full-row-rank coefficient (, or with ), the residual is unconstrained and the message is exactly uninformative.

The Bethe term uses the joint factor belief over the stacked non-point blocks , , with precision and information , and reports the same (fit, complexity, negentropy) grading as local_free_energy (shared through _graded_free_energy).

What it does not do

  • A belief on together with one on : is bilinear, the joint is not Gaussian, and both the messages to and the free energy throw rather than approximate (VMP or EP would be the next step).
  • Exposing the noise covariance: ps.noise exists only with learn_noise, and a belief on a covariance is not Gaussian (a Wishart belief is not in LenticulumCore).

Measured

test/exposure.jl (2026-10-30): Bayesian linear regression with seven tied observations matches the closed-form posterior, predictive and ; the random-slopes hierarchy built from thirty exposed regression factors matches the dense reference of examples/hierarchical_models.jl (means rtol , rtol ).