EM separates posterior inference from maximization. A further separation is useful when observations arrive in batches or when estimation is regularized: aggregate posterior statistics, transform that aggregate, then recover model parameters. This mathematical extract of the upstream design develops general and affine update rules and their composition with Bregman shrinkage.
The prerequisites are batch EM, exponential-family coordinates, and mixture architecture. The full upstream framework owns the software interfaces, fitting loops, and product options.
From a batch to a model¶
For a complete-data exponential family with statistic , observation batch , and current classical parameter , compute
The aggregate contains only the statistic blocks needed by the M-step. The GH convention orders them as . is the mixing variable in the conditioning note; remains standard-normal noise. Factor analysis adds latent-factor cross moments to these six blocks.
After an update rule produces a statistic vector , recover parameters by
Here is the natural-coordinate embedding. In an unconstrained minimal family with an attained interior solution, . In a curved family, solves the constrained problem; is not generally the expectation vector of the recovered model. We use the name for the running statistic in the update rules, without asserting ambient moment matching in that case.
Two layers of update rules¶
The general layer is a map with optional state :
State can record a cumulative observation count or a running schedule. It is distinct from the sufficient-statistic vector and from the model parameters. A specialization is an affine rule
where is a statistic-space offset and are linear operators. Scalar weights multiply every block; block-diagonal operators can weight different statistics separately.
| Algorithmic scheme | |||
|---|---|---|---|
| Ordinary batch EM | 0 | 0 | |
| Exponential forgetting | 0 | ||
| Decreasing online update | 0 | ||
| Sample-count weighting | 0 |
In the last row, is the weight already accumulated and is the new batch size; the count state becomes . The reciprocal schedule recovers single-observation weighting with initial weight . More general decreasing schedules and their assumptions are discussed in online EM.
A scalar convex combination of feasible statistics preserves their convex moment constraints. Arbitrary offsets, operators, or independent block weights need not preserve positive-definiteness, moment inequalities, or existence of an interior maximizing map. The general update notation alone provides no likelihood-ascent or convergence theorem.
Scalar shrinkage as a Bregman penalty¶
Let be a reference expectation vector and . The penalized EM derivation maximizes
Dividing by makes it ordinary parameter recovery at , where
With a fresh full-data E-step and exact or improving penalized maximization, this is EM for the observed likelihood minus the fixed complete-data KL penalty. In IG dual coordinates, the penalty is ; it is not generally a squared Euclidean distance in expectation coordinates.
Composing shrinkage with a running rule¶
Apply the base rule first, then shrink its statistic output:
For an affine base, the composed coefficients are explicit:
Thus one composition handles ordinary EM, forgetting, and sample-weighted updates. If the base is nonlinear, is still affine in its own argument, but the complete composed rule need not be affine in its inputs. The base rule’s auxiliary state passes through this construction.
The interpretation depends on the base. With ordinary batch EM, the penalty proof applies to the current observed-data objective. With running statistics, the same algebra describes a regularized surrogate, but does not establish ascent of a fixed observed-data likelihood.
Composition order also matters. Shrinking a running average gives
Updating toward a shrunk new aggregate instead gives
The reference weights are respectively and . Repeated shrinkage of the whole running statistic can dominate a vanishing data step: for fixed , bounded new statistics, and , the first recurrence tends to . These schemes therefore need separate choices of schedule and objective.
Blockwise rules and algorithmic limits¶
For nonnegative block weights , one can write
This defines a blockwise statistic transformation. It is not generally equivalent to the scalar joint-KL penalty, because couples statistic blocks. A separable potential or another explicit penalty derivation would be needed for such a claim. Moment feasibility must also be checked. The covariance-only example explains when changing the sixth GH block alone gives a direct dispersion shrinkage formula.
Batch EM refreshes posterior statistics for all observations at each step. Incremental or mini-batch schemes refresh only the selected observations, retain a running aggregate, and apply to that aggregate. Their fixed points, numerical cost, and convergence depend on the update schedule and on whether old posterior contributions are revisited. Factor constraints, approximate solvers, and post-update transformations must each be assessed against the actual optimization problem.
For numerical inversion and implementation details, see the upstream Bessel and solver design, full EM framework, and package API.
Source and adaptation¶
Rewritten from xshi19/normix, docs/design/em_framework.md, at revision
763bb3608920661a012cf089888d349fbf680aad (2026-09-13 import).
Copyright (c) 2020 xshi19. Licensed under MIT.
The pinned source
records the original version. Notation, mathematical qualifications, and links
were adapted for this site. Package interfaces, fitter recipes, and executable
cells are omitted; no upstream benchmark or formal-proof verification is claimed.
MIT permission notice
MIT License
Copyright (c) 2020 xshi19
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.