The improper Gaussian factor
A sum of squared affine rows of any number, a linear term and a constant, in the tangent coordinates of several points at fixed anchors, is Gaussian along its rows and flat or linear across them; the linearization of a sum of squares is one, a Gaussian factor on the increment from the point of linearization whose mean is the Gauss–Newton step, and such factors add and are a normal exactly when their rows have full rank.
Integrating a quantity out of a model leaves a function of the quantities it was tied to, its Markov blanket. For a model of normals that function is Gaussian in shape, and it is tempting to write it as a normal density of the blanket. A normal density has a covariance, though, and so can only describe a function that pins down every direction of the blanket. Many do not. A landmark seen by bearing from a single pose is the standard case: once the pose is integrated out, the bearing has said in which direction the landmark lies, and nothing about how far. What is left is Gaussian across the bearing and constant along it, and no covariance describes it. Forced into a normal, it must either be refused or be given a depth that the data never supplied.
The same function appears earlier, and more often, without any integral. The linearization of a sum of squares at a point is a quadratic model of the function, read by an optimizer as something to minimize. Its exponential is Gaussian in the step along its rows and flat across them, and it is a statement about the increment from the point of linearization to the point: what the residuals, once made affine, say of where the point lies.
This note defines the function that describes both: the improper Gaussian factor. It keeps exactly what was said and nothing more, such factors add, and when one does determine its points it is a normal. Read on a linearization, it is the second reading of the same model, a Gaussian where the note before saw a model in a trust region.
The factor#
Let be points of manifolds of dimensions , each with a retraction, and fix for each an anchor in its manifold. The stacked tangent is the vector of their coordinates in the charts at the anchors,
the tuple standing, here and below, for the column vector with its entries stacked. The anchors are fixed points, and do not move with the points the factor is a function of.
Let be points of manifolds with retractions, with anchors and the stacked tangent of (1). Given a matrix , for any number of rows, a vector , a vector and a constant , the improper Gaussian factor is the function
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.
The factor is a likelihood factor: a nonnegative function of quantities of a model, which reweights the model’s law and is not the density of anything. It therefore needs no reference measure and no log-volume, even over a curved or a positive quantity. Whatever measure an integral was taken in before the factor was written is already in its values.
When it is a normal#
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 , with the normal’s log-density on : the factor is a normal density of the stacked tangent, with the mean and the whitening , times a 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 by (1) on , where the log-volume vanishes, and it is integrable. Adding gives .
∎So the factors of full rank are the normal densities of the stacked tangent, and the improper factors are everything else of the same shape. Integrability in is the only difference between them, and a likelihood factor never needed it. Integrability in is also not integrability against the reference measure of the points’ own spaces, which carries the chart’s volume: on a compact curved space such as the rotations, a bounded factor of any rank is integrable against the space’s measure, and on a positive space 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 drawing. A quantity whose only information is an improper factor has no law to be drawn from, and is a parameter with a score. Where the factor has full rank over Euclidean points, drawing from the normal of Proposition 3 and setting is a proposal under which every draw has the same weight.
The linearization is a factor#
Take the linearization of the objective at , anchor every factor of the point at itself, so that the stacked tangent is the increment , and set
with the linear term of the linearization. Then is the improper Gaussian factor with these rows, term for term, and since agrees with to first order,
near . Linearizing the residuals is saying that the increment from the point of linearization to the point has a Gaussian factor. Each term contributes its own rows, so the factor is a sum of factors, one for each term, over the term’s variables; it is the linearization’s structure read as a sum of likelihoods.
When the rows have full rank, the factor is by Proposition 3 a normal of the increment. Its mean , by (2), is the Gauss–Newton step (4), and its precision is the Gauss–Newton matrix. The optimizer’s minimizer and the estimator’s mean are one vector, and the optimizer’s curvature and the estimator’s precision one matrix. When the rows do not have full rank, the optimizer has no step and the estimator no mean, for the same reason: some direction of the increment is not determined, and the factor is flat or linear along it.
A damping is a factor too. The penalty of the damped step (5) is, as a factor, a normal of the increment with mean zero and precision : a prior that the point lies near . Adding it to the linearization’s factor, as factors add, gives a factor of full rank whose mean is the damped step. The trust region’s radius is, in this reading, set by the prior: the tighter the prior, the shorter the step.
The factor is a likelihood factor in , and approximates , a density against the reference measure of the points’ spaces. As a density of against Lebesgue measure, the posterior near is times the volume of the chart, by (4); the two differ on a curved space, and the Gaussian fitted to a posterior in a chart keeps 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. Integrate the pose out, with observed at . Then 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. 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.
A positive quantity. Let a positive quantity have the normal on the positive reals with the mean and the scale , where is real, and integrate out, keeping and . The normal’s log-density on the positive reals is the Gaussian of less the log-volume , 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 5 below, at most its projection onto that space, , can be moved into , and remains. Along the null direction the factor falls linearly. This is why the factor carries : a log-volume that depends on the point and not only on a residual, as the positive reals’ does, leaves a slope that no row can hold.
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 point of a space that is flat in disguise 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 (5), 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 points have 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: a factor is the function it is, whichever form it is given in.
Accumulation#
Factors over the same points add. Two factors over sets of points and , with the same anchor for each point they share, sum to a factor over , whose rows are the two sets of rows, each with zero columns for the points 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 5 to at most , and once they have rank it is a normal.
The sum is exact when the anchors agree, and whatever the anchors of the points of spaces flat in disguise, since the last part of Lemma 5 moves those anchors without changing the factor’s value. On a curved space, the stacked tangent at one anchor is not an affine function of the stacked tangent at another, and two factors anchored differently are two functions, not one factor.
The example of the bearings shows what accumulation buys. A filter that drops each pose as it is done with it is left with one row on the landmark each time. The landmark is undetermined until two rows of different directions have accumulated, and until then a question that needs it determined has no unique answer. After that it is estimated, and nothing was lost on the way.
Derivatives#
The factor is a function of its points through , and its derivatives in charts 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 space flat in disguise, and on a curved space moves with . So the residual has the Jacobian , and the linear part has the gradient .
On the spaces flat in disguise, is affine in every chart of its points, so the factor is exactly quadratic in it. Its residual’s Jacobian is constant, the matrix is its exact negative Hessian, and the linear part has no curvature. On a curved space the factor has the curvature that has: it vanishes at the anchors and is of first order in near them.
Built on by
- The normal distribution skoro's normal is the law of a point moved by normal noise through its space's chart, on every space whose chart is global, with an exact density and sampler, a scale in four forms, roles that estimators read, its tangent among them, and the Gaussian and improper Gaussian replacements of a retirement.
- The uniform distribution skoro's uniform distribution is the law of a space whose reference measure has finite mass, the rotations and the categorical spaces among them, with a constant term, an exact sampler on the host, and a residual of no components, so that a linearization reads it as a factor with no rows; it is how a model says that nothing is known of a quantity.
- The normal equations The Gauss–Newton step, the damped step and the mean of a Gaussian factor all solve one linear system, the normal equations, whose matrix is the precision and whose determinant normalizes the integral; forming that matrix squares the condition number, a linear term costs the square whatever is done, and a linear term in the row space is therefore folded into the right-hand side.
- What elimination leaves Integrating a block of variables out of an improper Gaussian factor, by the elimination of its rows, leaves an improper Gaussian factor on the blocks it was tied to, of any rank and exactly; it is a normal when it determines them, and the factor is the exact answer when it does not.
- Optimization and estimation, term by term The notes on least squares and Gaussian approximations name most things twice, once as an optimizer would and once as a state estimator would; this table sets the two names side by side, row by row, with the note that defines each.