Online expectation–maximization replaces a full-data E-step by a running average of posterior sufficient statistics. Cappé and Moulines develop the general method in 2009, On-line expectation–maximization algorithm for latent data models. This note specializes the update to a full exponential family, derives the upstream regret identity, and applies the same statistic order as batch EM for GH.
Read the exponential-family core for natural and expectation coordinates and IG duality for Bregman divergences. Throughout the full-family derivation, assume a regular minimal family, finite posterior statistics, and iterates in an interior region where the expectation-to-natural map exists. Matrix statistic blocks use their independent symmetric coordinates.
Posterior statistics and the sequential update¶
For observed and hidden , write
Let be the Legendre dual, so that . At observation , compute
Starting from , update
The reciprocal schedule , with , has the exact aggregation identity
Here is the step size; is its reciprocal. The initial statistic has weight in pseudo-observation units. Each uses the parameter available when that observation arrives; it is not recomputed under . Thus this average differs from a batch E-step at the final parameter. With , the first update can lie on the boundary, so the assumed inverse map needs particular care.
For a mini-batch, replace by its within-batch average. A constant gives exponential forgetting. Decreasing schedules satisfying and are common in stationary stochastic approximation; for example with . These conditions alone do not prove convergence: stability, regularity, and a suitable M-step are also needed. The method’s cost per update uses fewer observations than batch EM, but this does not imply the same convergence rate or likelihood ascent at each observation.
A Bregman regret identity¶
Define the complete-data divergence, with its orientation explicit,
For a sequence , compare sequential prediction with a fixed parameter chosen using all observations and this initial penalty:
Suppose this minimum is finite and attained at an interior , and put . For the reciprocal schedule above, the upstream decomposition is
This is an identity, not by itself a sublinear regret bound. The posterior KL sum is nonnegative and need not be small. It disappears for fully observed data. The penalty belongs to the comparator in (6); the sequential algorithm need not find its minimizer.
To verify the identity, let . Parameter-independent carrier terms cancel in likelihood differences. The update gives , and Legendre duality gives
Subtract these expressions. The observed-versus-complete likelihood identity adds the posterior KL sum, while supplies (7). The calculation is algebraic and requires all displayed expectations and divergences to be finite.
Application to generalized hyperbolic mixtures¶
Use the GH model
The classical tuple is ; denotes natural coordinates. In the scalar conditioning note, , , and . For and positive-definite , the posterior is GIG and its power moments are finite. Set , , and , evaluated at . In the Batch 1 statistic order,
The first three slots are , a permutation of the source online note’s . The normal parameters are recovered as
The mixing-law update maximizes . These are the batch M-step formulas applied to running statistics. Their feasibility, nonzero-denominator, and positive-definiteness requirements still apply; boundary mixing laws need their own moment checks. A shrinkage target can regularize the statistics, but changes the update and its objective.
Curved families need a constrained M-step¶
For , the ambient expectation vector need not equal the statistics being averaged. The appropriate map is
At an interior stationary point it satisfies
This is weaker than ambient moment matching. Applying without the constraint can leave the curved family. This limitation concerns that unconstrained inverse map: it does not exclude online EM for curved families. The Cappé–Moulines construction uses a model-specific maximizing map. Its convergence assumptions must be checked for the particular model; the full-family regret derivation above does not transfer automatically.
GH factor analysis gives a concrete constrained example. The EM update framework separates statistic aggregation, update rules, and parameter recovery. Numerical backends and runnable streaming examples stay in the upstream EM framework.
Source and adaptation¶
Adapted from xshi19/normix, docs/theory/online_em.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.
- Cappé, O., & Moulines, E. (2009). On-Line Expectation–Maximization Algorithm for latent Data Models. Journal of the Royal Statistical Society Series B: Statistical Methodology, 71(3), 593–613. 10.1111/j.1467-9868.2009.00698.x