Mathematics
The improper Gaussian factor, a sum of squared affine rows of any number, a linear term and a constant in the stacked tangent of a retirement's blanket at constant anchors, which keeps what retired terms say about blanket quantities they do not determine, adds across retirements, and is the normal's Stacked replacement when it is of full rank.
The problem#
A retirement removes quantities from a model and keeps what they said
about the rest in a replacement: a likelihood factor over the Markov blanket of the retired terms,
the integral of those terms over the retired quantities. The normal writes that replacement in one
form, its Stacked replacement (the normal as a likelihood factor),
a normal density of the blanket’s tangent coordinates at fixed anchors. A normal density has a
covariance, so Stacked can only write a replacement that determines every direction of the
blanket.
Many retirements do not. A landmark seen by bearing from a single pose is the standard case. When the pose is retired, the bearing has said in which direction the landmark lies, and nothing about how far. In the landmark’s tangent coordinates, the replacement is then Gaussian across the bearing and constant along it, and no covariance describes it. A filter that must write its replacement as a normal density has two bad choices: refuse the retirement, or invent a depth. The first keeps the pose in the model until the landmark is seen again, so that the window grows. The second puts a prior on the landmark that the data never gave.
The archive’s sliding windows wrote their replacement as a joint normal in the offset form , anchored at the point where it was computed so that its value and Jacobian there are exactly the eliminated rows, with a triangular of full rank. The anchoring carries over unchanged; the rank does not.
This entry gives skoro a form that needs neither a refusal nor an invented depth: the improper Gaussian factor, a sum of
squared affine rows of any number, a linear term and a constant, in the blanket’s tangent
coordinates at fixed anchors. It keeps exactly what the retired terms say and nothing more. Such
factors add, so that a model can marginalize what it learns about a quantity it cannot yet
estimate, accumulate it over several retirements, and estimate the quantity once enough is known.
When the factor determines its blanket, it is a normal, and its value is the Stacked replacement’s.
The entry provides the factor, the forms in which it can be written, and the roles it binds.
Computing a factor from a linearized retirement is the work of the linearization entry, which
needs it. This document works out what the factor is, when it is a normal, which of its forms are
the same function, how factors accumulate, and what a reader of its roles may assume.
Setting#
Retirement. A retirement retires the quantities , of which are fixed at given values and are integrated out, and replaces the terms joined to them by a likelihood factor over their Markov blanket (22), the integral of Proposition 23. The core checks that the factor is reached from no quantity outside , and applies the change. After it, a blanket quantity whose scoring term was retired is scored by no term, and so is a parameter, of which is a score, as a score is conditioned on a parameter with an improper prior (parameters and improper priors). Generation draws such a quantity from a proposal given with the replacement, and is refused for it otherwise. A retirement’s replacement may bind roles, which the retirement binds to the factor it adds (the replacement’s bindings).
The stacked tangent. For continuous blanket quantities and an anchor for each, a constant of its type, the normal’s stacked tangent is
(9), the blocks stacked as columns, as every tuple in this document is. It is defined where each lies in the chart’s image at , which for a full chart is all of the type but a set of measure zero. On a flat-in-disguise type, a Euclidean or a positive one, it translates exactly with the anchor, (1). The anchors are constants, so that a factor written in does not move with the quantities it summarizes.
Stacked. The normal’s replacement is (10): the normal’s term on , where the log-volume vanishes, at
the value , with a mean , a whitening of full rank and a constant . It binds the
whitened residual , the mean and the scale.
What a reader of a residual assumes. The normal’s roles let a reader of the whitened residual assume that the rest of the term’s log-density is a normalizer constant in the free quantities and, where one is bound, a log-volume , a node of its own (the normal’s roles):
A least-squares reader adds the bound log-volume’s gradient to the residuals’ to find the term’s own stationary points. The factor of this entry is written so that it keeps this contract.
The improper Gaussian factor#
Let be continuous quantities, with anchors constants of their types and the stacked tangent (9). Given a matrix , for any number of rows, a vector , a vector and a constant , the improper Gaussian factor is the likelihood factor
Its whitened residual is , of components, and its linear part is .
The rows say what the factor determines. Write , with in the row space of and in its null space. Along the row space the squares are a Gaussian. Along the null space the squares do not change, and the factor is linear, with slope . A factor with rows is linear and a constant alone.
As a function of , is integrable if and only if has rank . When it has, let be the lower-triangular matrix with a positive diagonal and , and
Then :
the factor is the normal’s Stacked replacement (10) with the mean , the whitening and the constant .
If has rank less than , take with . Along the line the factor is , so is constant or grows exponentially along every such line, and the integral over diverges. If has rank , is positive definite, and
since . The first term is , which is integrable, and adding gives .
∎So the improper Gaussian factor contains Stacked as its case of full rank, and adds every factor
that Stacked cannot write. Integrability in is the only difference, and a likelihood
factor never needed it: Proposition 23 asks of a replacement that it be a
function of the blanket, which an improper factor is. Integrability in is not
integrability against the blanket’s reference measure, which carries the chart’s volume : on a compact curved type such as the rotations, a bounded factor of any rank is
integrable against the type’s measure, and on a positive type the two differ by the factor . What matters below is the reading in , where the factor is Gaussian or flat.
What integrability does change is generation. A blanket quantity that becomes a parameter with an improper factor as its only score is not drawn from the factor. It needs a proposal, as the core already asks of every parameter, and generation is refused for it without one. Where the factor determines a Euclidean blanket, drawing from the normal of Proposition 3 and setting is a proposal that makes every draw’s weight the same, as the Kalman prediction does for the core’s replacement of full rank. On a positive or a curved type the draw has the density of that normal times with respect to the type’s measure, and the weights then vary with the chart’s volume.
Two examples#
A bearing in the plane. Take a landmark and poses , each with its own prior , and a measurement of each pose along a known unit direction ,
a linear stand-in for a bearing, which measures the landmark’s offset from the pose across one direction only. Retire , with observed at . Integrating the pose out, is normal with mean and variance , so that, with the anchor for and ,
This is the factor with one row, , , and , exactly. It has rank one on and is constant along the direction orthogonal to : the line on which the measurement places the landmark. Retiring a second pose with a direction not parallel to gives a second such factor. Their sum has two rows of rank two, and is by Proposition 3 a normal, whose mean is the point at which the two lines cross. It is the replacement that retiring both poses at once would give, since their retired terms are disjoint and the joint integral is the product of the two.
A positive quantity. Let a positive quantity be scored by the normal on the positive type with the mean and the scale , where is Euclidean, and retire , keeping and . The normal’s term on the positive type is the Gaussian of less the log-volume ((3)), so
with . In the stacked tangent at the anchors , , it is the factor with
The linear term is not in the row space of : by part 3 of Lemma 4, at most its
projection onto that space, , can be moved into , and remains. Along the null direction , the factor falls linearly. A replacement computed by
linearizing normals on the Euclidean and the curved types has no such term, since the normal’s
log-volume there is a function of its tangent coordinate alone and its gradient lies in the span of
its own rows; the linearization entry shows it. On the positive types one remains, as here, which
is why the factor carries .
Forms of one factor#
Each of the following changes and leaves the value of the factor unchanged at every :
- for an orthogonal , ;
- if , with zero rows in below , ;
- for any , .
Moving the anchor of each quantity of a flat-in-disguise type to , and keeping the anchors of the others, with stacked from the and zero in the blocks of the anchors kept, also leaves it unchanged with .
For part 1, . For part 2, the squares of the zero rows are . For part 3, expanding the square,
and the new constant restores . For the anchors, by (1), and the blocks of the anchors kept are unchanged, so in the new stacked tangent , and substituting gives the new right-hand side and constant.
∎Parts 1 and 2 together are an orthogonal factorization of . It leaves at most rows, so a factor never needs more rows than its blanket has coordinates. Part 3 moves any part of that lies in the row space into . Choosing to minimize leaves only the part of in the null space, which no form removes. When has rank , that part is zero, and the form is the normal’s of Proposition 3.
None of these changes the value, so a factor is the function it is, whichever form it is given in. The factor is kept in the form it is given, and no form is chosen for it by looking at its numbers. A batch of models has one factor for every row, with numbers of its own, and a form chosen by rank would give different rows different shapes. The number of rows , and whether is present, are therefore set by whoever writes the factor, and are the same for every row of a batch. A reduction by parts 1 and 2 to rows depends on the shapes alone, and is safe to apply to every row.
Accumulation#
Factors over the same quantities add. Two factors over blankets and , with the same anchor for each quantity they share, sum to a factor over , whose rows are the two sets of rows, each with zero columns for the quantities it does not involve, whose linear term is the sum of the two, each extended by zeros, and whose constant is the sum. The sum’s value is the sum of the values, at every point, by the definition alone. Its rows can then be reduced by Lemma 4 to at most , and once they have rank it is a normal.
The model does not need its factors summed: a model that holds several factors is their sum, and every reader of the model reads them as terms. Summing is a convenience, which keeps a model of many retirements small. It is exact when the anchors agree, and whatever the anchors of the flat-in-disguise quantities, since the last part of Lemma 4 moves those anchors without changing the factor’s value. On a curved type, the stacked tangent at one anchor is not an affine function of the stacked tangent at another, and two factors anchored differently are kept as two terms.
The example of the bearings shows what this buys. A filter retires each pose as it leaves the window, and each retirement leaves one row on the landmark. The landmark is undetermined until two rows of different directions have accumulated. Until then, a query that leaves it free, with nothing else to determine it, has no unique answer, and an estimator that needs one refuses it. After that, it is estimated, and nothing was lost on the way.
Derivatives#
The factor is a function of the blanket’s quantities through , and its derivatives are those of its two parts. In the chart at , the block of for has the derivative , which is the identity at and everywhere on a flat-in-disguise type, and on a curved type moves with as the core’s inverse retraction does. So the residual has the Jacobian , and the linear part has the gradient .
On the flat-in-disguise types, is affine in every chart of the blanket, so the factor is
exactly quadratic in it. Its residual’s Jacobian is constant, its Gauss–Newton matrix is its exact negative Hessian, and the linear part
has no curvature. On a curved type the factor has the curvature that has, as a Stacked replacement does: it vanishes at the anchors and is of first order in near them.
The roles#
The factor keeps the contract (1) of a term that binds a residual:
- its whitened residual is , with components, none included;
- its normalizer is the constant ;
- its log-volume, where is present, is its linear part , the varying part of its remainder, the part that (1) calls .
A least-squares reader that reads the residual and adds the gradient of the bound log-volume therefore finds the factor’s own gradient, and a reader that reads only the residual finds the gradient of its squares. That is what such a reader finds on the normal’s terms, where the bound node is a log-volume indeed. The factor binds no mean and no scale. Where it is not of full rank it has neither, and where it is, they can be computed from it by Proposition 3. It binds no information root, since it is a likelihood factor and scores no quantity, as the normal says of its own likelihood factors. A residual of no components is a residual: a reader that requires every factor to bind a residual accepts such a factor, whose remainder is then all it says.
In skoro’s terms#
- The factor is a likelihood factor over continuous blanket quantities, scoring none of them, added by a retirement as its replacement, or by a model directly. It is reached only from the blanket’s quantities, through , so the core’s check of a replacement holds.
- Its constants are the anchors, constants of the quantities’ types, and , , and , constants of the model. In a batch, their numbers may differ from row to row, while the number of rows , the blanket’s dimension , and whether is present are one for every row.
- Its value is Definition 2. Its derivatives are those of , composed with and , of the order of the blanket’s inverse retractions.
- It is a normal when it is of full rank, with the mean, the whitening and the constant of Proposition 3. The normal’s
Stackedreplacement stays the form for a caller that has a mean and a scale. The improper factor is the form for one that has rows. - Its forms are those of Lemma 4. A factor keeps the one it is given. A reduction to rows is a change of form the library may apply, since it depends on the shapes alone; it applies no other.
- Several factors over the same quantities are held as several terms, which every reader of the model reads as their sum. Summing them into one is exact at common anchors and on the flat-in-disguise types at any anchors, and is left to a later entry.
- Its roles are the whitened residual and, where is present, the log-volume role, bound to the linear part , which a reader takes as the varying part of the remainder and not as the volume of a chart.
- A blanket quantity it leaves undetermined becomes a parameter that it cannot generate: the caller gives a proposal, or generation is refused for it, as the core does for every parameter.
Open questions#
None remain. Which role binds the linear part is settled in The roles, and whether the library sums factors in Accumulation.
Revisions#
2026-11-09. In In skoro’s terms, the sentence saying that a reduction to rows “is the only one the library applies by itself” read as a promise that the library applies one, which the implementation does not. It now says that the library may apply that reduction, since it depends on the shapes alone, and applies no other change of form.
Built on by
- Improper Gaussian replacements: Implementation The improper Gaussian factor as `Stacked::improper` in skoro-normal, a builder of its rows, right-hand side, linear part and constant over a stacked tangent, which gives a retirement's replacement or a likelihood factor with its residual and its linear part bound, and the core's support, through every pass, for the values of no entries that a factor of no rows needs.