Online EM for Unsupervised Models
Paper · 2009 · Percy Liang and Dan Klein
Summary
Learning from unlabeled text requires a system to infer the very thing it is supposed to learn to predict. A sentence arrives as a string of words, for example, while its grammatical tags are hidden. Expectation–maximization, or EM, handles this problem by estimating how often hidden events occur under the current parameters and then fitting the parameters to those estimates. In its standard batch form, EM waits for a complete pass through the corpus before using any of the new information. The authors ask whether updating during a pass can make better use of the same data. They study incremental EM, which replaces a stored contribution whenever it revisits an example, and stepwise EM, which mixes fresh estimates into a running set of counts.
The authors compare these procedures on part-of-speech tagging, document text classification, word segmentation, and bilingual word alignment. With its settings chosen by the likelihood of the unlabeled data, stepwise EM reaches comparable performance more quickly across the tasks. Its advantage can extend to the quality of the predictions. On Wall Street Journal tagging, batch EM reaches 57.3% per-position accuracy after 100 iterations. Stepwise EM with settings chosen for tagging accuracy reaches 65.4% after two iterations. The gains are also clear in document classification. For segmentation, the authors' unigram approach with a penalty for long words reaches 83.5% word-token F1 on the English corpus under accuracy-based tuning, compared with a previously published 78%. That comparison changes both the learning procedure and the assumptions about segmentation.
Stepwise EM has two controls. The step size determines how readily the running counts absorb new evidence, and the mini-batch size determines how many examples supply that evidence at once. Wall Street Journal tagging benefits from aggressive updates on small groups, whereas good document classification depends on using larger groups. Across the settings tested, choosing by likelihood usually identifies a reasonable region without access to labels. Incremental EM behaves much like the most restrictive stepwise setting in the comparisons the authors could run. It also needs to retain each example's contribution. Stepwise EM avoids that per-example store, and the authors show how to implement its updates by touching only the counts that the new examples affect.
The route through training matters because the likelihood of the observed text and the accuracy of the hidden predictions are different measurements. In tagging, the stepwise setting that improves accuracy fastest raises likelihood more slowly than the likelihood-tuned setting. Switching to batch EM after that early stage raises likelihood while preserving the accuracy already reached in the reported run. Repeated trials also show that stepwise EM can be less sensitive to initialization, with some additional variation from the order of the examples. The experiments establish that update frequency and weighting can change both how soon a useful solution appears and which solution training reaches. The authors leave open why the strongest accuracy gains occur in the tasks that assign latent labels.
Deep dive: Online EM for Unsupervised Models
Online EM updates from small groups of examples, speeding up unsupervised learning and sometimes improving tagging and document classification. · about 37 minutes to read
The problem and its context
Learning about things the data leave hidden
A corpus supplies words and their order. It may supply no indication of which words share a grammatical category, where a phoneme sequence should be divided, or which words in a translation correspond. In the family of approaches the paper studies, these missing structures are treated as latent variables. The system assigns probabilities to combinations of an observed input and a possible hidden analysis. It can therefore ask how plausible a particular tagging or segmentation is given the input, even during training, when the intended analysis is unavailable.
Training starts from a basic difficulty. The parameters needed to judge a possible analysis depend on counts that would be easy to obtain if the analyses were known. For a tagger, one would like to know how frequently a tag is followed by a certain other tag and how frequently a tag emits a certain word. The corpus contains the words. An assignment of tags would supply the extra information needed to count those events. EM lets the current probabilities spread credit among the possible assignments and uses the resulting fractional counts to revise those probabilities.
The objective in this setup is the marginal likelihood of the observed inputs. To assign a probability to a sentence, the system combines the probabilities of the possible hidden analyses of that sentence. Training adjusts the parameters to give the observed data high probability under this calculation. Evaluation asks a separate question about the hidden outputs. A tagger has to recover tags that correspond to the annotated categories. A segmenter has to recover words with the correct extents. The training objective contains no direct reward for either achievement.
That distinction makes timing an important part of the unsupervised problem. A conventional EM sweep takes one set of parameters, uses it to interpret the entire corpus, and then updates it. The inference work can be necessary even when the parameters at the start of the sweep are still very rough. The authors point to a second source of waste in redundant corpora. Many examples can support similar changes, yet the batch procedure waits to consider all of them before acting on that evidence. The slow progress reported in earlier work on Wall Street Journal tagging makes this concern concrete. The paper connects that example to a study of where EM taggers go wrong. Why Doesn't EM Find Good HMM POS-Taggers?
What earlier online methods offered
Updating during a pass was a familiar idea in supervised language processing by the time of this study. The authors cite Perceptron training for tagging, large-margin updates for dependency parsing, exponentiated-gradient training, and stochastic-gradient training for constituency parsing. These examples show why frequent approximate updates were attractive when the training corpus was large. The paper also describes earlier arguments that fast approximate optimization can be well suited to the goal of obtaining good predictions on unseen data. Online Large-Margin Training of Dependency Parsers and Efficient, Feature-based, Conditional Random Field Parsing
For the unsupervised case, the paper identifies incremental EM as the online variant most often seen in earlier language work. Its update keeps a record of what each example currently contributes. When inference revises the contribution for one example, the algorithm removes the previous version from the corpus total. The authors point out a resemblance to collapsed sampling methods for Bayesian tagging and segmentation, which retain a sampled hidden analysis for each example. An expected count vector and a sampled analysis have different meanings. Their common feature is the need to keep an example-specific record available for later revision. A fully Bayesian approach to unsupervised part-of-speech tagging and Contextual Dependencies in Unsupervised Word Segmentation
Stepwise EM comes from a different line of work. The paper traces it to Sato and Ishii and to a subsequent generalization by Cappé and Moulines. The idea is to view a newly estimated count vector as a sample of the information that a batch pass would produce. An estimate from one example is noisy, so the algorithm moves part of the way toward it. Repetition and a suitable reduction in step sizes let the updates accumulate. The authors bring that approach into the language tasks alongside the more established incremental variant.
Supervised online learning supplies part of the intuition for this comparison. Frequent changes can accelerate learning, and noisy changes can disrupt it. Unsupervised EM adds two complications. The likelihood objective is non-convex, so different sequences of updates can take training to different local solutions. Also, a solution that assigns high probability to the data can yield mediocre hidden analyses. A faster optimizer can therefore reach a solution sooner, reach a different solution, or do both at once. To tell these possibilities apart, the paper follows likelihood and task performance through training.
The authors also identify uses for sequential updates beyond shortening experiments on a fixed corpus. They mention systems that receive examples over time, such as a system clustering incoming news articles. It is natural in that setting to revise estimates as examples arrive. They also suggest that sequential learning has a possible connection to questions about human learning. The paper's own investigation is a comparison on existing corpora, where the effects of updating within a pass can be examined under controlled conditions.
The method, step by step
From possible analyses to expected counts
Suppose a sentence has several plausible sequences of tags. A fully specified sequence would tell the learner exactly which tag transitions and word emissions to count. The current probabilities supply a distribution over the sequences instead. In the expectation step, the learner credits each sequence in proportion to its probability given the sentence. An event that appears in several plausible sequences accumulates credit from all of them. The result is a vector of expected counts for that particular sentence.
Different tasks put different events in the vector. A document supplies evidence about a hidden topic class and about the words associated with that class. A segmentation supplies counts of the word forms the analysis proposes. The shared operation is to infer hidden structure under the current parameters and convert that inference into the statistics needed to re-estimate those same parameters.
Think of the vector as divided into groups of counts. In a tagger, the counts of words emitted by a particular tag form one group. Dividing each of those counts by their total produces the distribution of words given that tag. The paper calls such a group a multinomial block. The probabilities for any one block come from the relative sizes of the entries in it. The authors exploit this property both to write the algorithms compactly and to make stepwise updates inexpensive.
The following diagram traces an update of stepwise EM. Within a mini-batch, all examples use the same current parameters. Their combined evidence then changes what the learner sees when it starts the next mini-batch.
How stepwise EM updates within a corpus pass
The steps in order.
The objective and the shared inference step
ℓ(θ) = ∑ᵢ₌₁ⁿ log p(x⁽ⁱ⁾; θ)
Here ℓ is the corpus log-likelihood, and θ is the collection of probabilities to be estimated. The index i identifies an example among n observed examples, with x⁽ⁱ⁾ denoting the input for that example. The quantity p(x⁽ⁱ⁾; θ) is its probability after summing over hidden analyses under θ. The logarithm is taken separately for each input, and the sum combines those values across the corpus. The superscript in parentheses is an example index.
The learner uses a joint distribution p(x, z; θ), where x is an input and z is a candidate analysis of that input. The cases considered in the paper have discrete hidden outputs. For a word sequence, for instance, z can be a sequence of tags of the same length. The meaning of the latent variable changes with the task, but the training objective always asks how much probability the observed inputs receive.
s′ᵢ = ∑𝓏 p(z | x⁽ⁱ⁾; θ(μ)) φ(x⁽ⁱ⁾, z)
The vector s′ᵢ is the newly computed sufficient statistic for example i. The sum ranges over its possible hidden outputs z. The mapping φ takes the input and a fully specified output and returns the event counts for that pair. The factor p(z | x⁽ⁱ⁾; θ(μ)) is the conditional probability of the hidden output given the input, with the parameters obtained from the current count vector μ. The notation θ(μ) is the maximum-likelihood re-estimation rule applied to those counts. The prime marks the newly inferred vector, which can replace an older contribution or be combined with the running vector, depending on the algorithm.
Writing a sum over all analyses does not require the inference procedure to enumerate them individually. The paper uses dynamic programs to perform the expectation step. A dynamic program reuses calculations for subproblems shared by many candidate outputs. For tagging, the authors give forward–backward as the example. It combines information from prefixes and suffixes of a sentence to compute the probabilities needed for expected counts. The algorithm can obtain counts for events shared among many tag sequences while leaving the individual sequences implicit.
The M-step, or maximization step, converts the resulting statistics into parameter estimates. For the probability blocks in the paper, this amounts to normalizing counts within each block. This closed-form update is central to the online design. Once the counts have changed, a new probability is available from the relevant block, so the algorithm can use revised parameters for the very next inference calculation.
ẑ⁽ⁱ⁾ = argmax𝓏 p(z | x⁽ⁱ⁾; θ̂)
The symbol ẑ⁽ⁱ⁾ denotes the prediction for instance i, and θ̂ denotes the fitted parameters used to make it. The argmax chooses a candidate hidden output z with the highest conditional probability for the observed input x⁽ⁱ⁾. During inference for training, the expectation step gives weight to alternatives. The prediction used for evaluation is a selected analysis, and each task has its own way of comparing that analysis with an annotation.
Batch EM replaces the corpus estimate
Batch EM begins each pass with a fresh accumulator. It infers expected counts for every example using the same parameters, adds the counts to that accumulator, and re-estimates the parameters when the pass ends. The important separation is between the old counts that determine the probabilities during the pass and the new counts being assembled for the next pass. An example processed late in the corpus is interpreted under the same probabilities as an example processed early.
μ′ = ∑ᵢ₌₁ⁿ s′ᵢ
Here μ′ is the new corpus count vector, n is the number of examples, and s′ᵢ is the vector inferred for example i under the parameters from the preceding estimate. The batch M-step replaces μ with μ′ and uses θ(μ′) for the next pass. The previous vector has already influenced the new one through the probabilities used in inference.
The paper explains batch EM and incremental EM using a lower bound on likelihood. This bound depends on both the parameters and provisional distributions over the hidden outputs. It gives a common way of describing which variables each algorithm updates together.
ℓ(θ) ≥ L(q₁, …, qₙ, θ) = ∑ᵢ₌₁ⁿ [∑𝓏 qᵢ(z | x⁽ⁱ⁾) log p(x⁽ⁱ⁾, z; θ) + H(qᵢ)]
The function L is the lower bound. For each of the n inputs x⁽ⁱ⁾, qᵢ is a distribution over the possible hidden outputs z of that input. Its mass at z is qᵢ(z | x⁽ⁱ⁾). The joint probability p(x⁽ⁱ⁾, z; θ) assigns probability to the input together with that output. The inner sum is an average of joint log probabilities under qᵢ, and H(qᵢ) is the entropy of qᵢ, which accounts for how spread out that distribution is. The outer sum combines the contributions of the examples. The log-likelihood ℓ(θ) bounds this expression from above.
For fixed θ, choosing each qᵢ to be the posterior under θ makes the bound tight at those parameters. Batch EM makes this choice for the entire corpus during the E-step. The M-step then fits θ with the qᵢ held fixed, using their combined expected counts. This viewpoint explains why one can change the granularity of the E-step while preserving the role of the M-step. It also distinguishes progress on the auxiliary bound from progress on the likelihood itself when only some of the distributions have been refreshed.
Incremental EM replaces an example's contribution
In incremental EM, μ represents the sum of the contributions currently stored for the corpus. The store can contain contributions inferred under earlier parameters. Processing an example entails finding its old contribution, computing a new one under the current parameters, and revising the aggregate. The algorithm can then use the updated aggregate to infer a new contribution for the next example.
μ ← μ + s′ᵢ − sᵢ
The arrow assigns the expression on its right to μ. The old aggregate appears on the right, s′ᵢ is the new expected count vector for example i, and sᵢ is the vector left by its previous processing or by initialization. After the aggregate changes, the algorithm stores s′ᵢ in place of sᵢ. Subtraction is essential here because the old evidence is already included in μ. Simply adding the new vector would change the total without removing the estimate that it supersedes.
Incremental EM thus makes a coordinate update to the bound. It changes the distribution belonging to one example, then uses the current collection of distributions to re-estimate θ. The bound rises monotonically under those updates, and the paper describes convergence to a local optimum of the bound and likelihood. The likelihood itself can move downward on an individual update. The bound tracks a collection of distributions that can have been inferred at different points in training, so an improvement in the bound at one step does not supply a step-by-step likelihood guarantee.
The expected count vectors are sparse in these language applications. A sentence can contribute only to a limited subset of the full inventory of count entries. Incremental EM can apply its replacement to the affected entries, but it still needs the old contribution for each example. The total storage grows with the number of examples. Sparse records can make each example cheaper to store, while the need to retain the whole collection remains.
Stepwise EM changes the weight of recent evidence
Stepwise EM keeps one running estimate of sufficient statistics. The new example provides a fresh set of counts, and the algorithm moves its estimate toward those counts by an amount controlled by a step size. The existing aggregate already contains weighted evidence from earlier examples. It has no separate slot for the example now being visited.
μ ← (1 − ηₖ)μ + ηₖs′ᵢ
Here ηₖ is the step size at update index k, with k counting the updates already performed. The factor 1 − ηₖ retains a share of the old running estimate μ, while ηₖ weights the newly inferred vector s′ᵢ for instance i. The new aggregate becomes the basis for θ(μ) on the next inference step. The procedure advances k after the update, so the step schedule runs across passes.
This is the paper's stochastic approximation view of EM. Inference on a small sample gives a noisy indication of the counts that a complete pass would produce. The interpolation guards against basing the entire parameter estimate on that sample. Earlier examples influence subsequent inference through the retained portion of the aggregate, and their influence decays as more updates are made. The authors describe the procedure as a kind of stochastic gradient method in the space of sufficient statistics.
ηₖ = (k + 2)⁻ᵅ
In this schedule, ηₖ is the weight of the incoming count vector at update k, and α is the power controlling how fast that weight decreases. The offset 2 is part of the schedule from the paper. For a fixed k, a smaller α gives the incoming counts more weight and discounts the previous aggregate more strongly. A larger α makes later changes more conservative. The paper gives 0.5 < α ≤ 1 as the range for this schedule under the convergence conditions it invokes.
∑ₖ₌₀^∞ ηₖ = ∞
Here k ranges over update indices starting at 0, and ηₖ is the corresponding step size. The infinity sign above the sum indicates an indefinitely continued training sequence. The infinity on the right says that the total weight made available to updates diverges. In the stochastic approximation argument, this ensures that the ability to move is not exhausted after a finite amount of accumulated adjustment.
∑ₖ₌₀^∞ ηₖ² < ∞
The index k and the step size ηₖ have the same meanings, and the square gives the contribution of an update to this second condition. The inequality says that the total of the squared weights is finite. Together, the two conditions express the balance the schedule is meant to achieve. Updates can continue to move the running estimate, while their sustained contribution to noise is controlled. The paper invokes local convergence under suitable conditions. Individual steps can reduce the likelihood or the auxiliary bound.
The connection with incremental EM is clearest in the first pass. The paper states that when α and m both equal 1, stepwise EM is equivalent on the first pass to incremental EM that starts with a zero contribution from every example. The relevant comparison is between parameter updates, since count vectors on different scales can represent the same probabilities. During that pass, there is no previously inferred contribution to subtract when incremental EM meets an example for the first time. When the examples return on a later pass, incremental EM replaces their old vectors. Stepwise EM continues with the running interpolation. The equivalence gives the authors a particular setting to test empirically, with a specific reason to expect the algorithms to diverge after their first visit to the data.
Mini-batches control the evidence in an update
The group size m controls how many examples contribute before the parameters change. In the paper's procedure, the learner partitions a pass into mini-batches and treats each group as one unit for the stepwise update. Within the group, it calculates each expected count vector with the existing parameters. It uses the sum of those vectors in the interpolation. This distinction matters because a procedure that updated once per example while moving through a group would already be changing the probabilities used to infer the other examples in that group.
s′ᵢ₊₁ + ⋯ + s′ᵢ₊ₘ
This expression is the incoming statistic for a group of m examples. The index i marks the position before the group begins, s′ᵢ₊₁ is the expected count vector for its first example, and s′ᵢ₊ₘ is the vector for its last example. The intervening terms are the vectors for the other group members. That sum takes the place of s′ᵢ in the single-example update, and the step index advances with each group update.
Larger groups can give a more stable picture of the data because the update depends less on the peculiarities of one example. They also delay the next chance to use revised parameters. At m = 1, every example can change the running counts. At m = n, training changes them once per complete corpus pass. At that endpoint, stepwise EM still retains a fraction of the old counts through interpolation, while batch EM replaces its previous estimate with the newly accumulated corpus counts.
Sparse updates and probability lookup
A direct implementation of the stepwise update would multiply every entry in μ by the retention factor, even if the current example supplies fresh evidence for very few entries. The authors avoid this full-vector operation by moving the common factor out of the stored vector. Normalizing a multinomial block gives the same probabilities if all its counts are multiplied by the same positive factor. Consequently, the algorithm can keep a rescaled representation and use it directly for probability lookup.
S = μ / ∏ⱼ₍ⱼ<ₖ₎ (1 − ηⱼ)
Here S is the stored vector, μ is the conceptual running estimate before update k, and j indexes the earlier updates. The product collects all the retention factors 1 − ηⱼ from those updates. Dividing μ by their common product gives the scale used to store its entries. Each count in S is scaled in the same way, so θ(S) gives the same probabilities as θ(μ).
S ← S + [ηₖ / ∏ⱼ₍ⱼ≤ₖ₎ (1 − ηⱼ)] s′ᵢ
The arrow updates S using its old value and a scaled copy of the incoming counts s′ᵢ. The step size ηₖ contributes the weight of the new counts. The product now includes update k because it accounts for the retention factor applied at the current update as well as those from earlier updates j. Only entries with non-zero incoming counts need to change. The same representation can be used when the incoming counts are the sum for a mini-batch.
Both online procedures also need to recover individual probabilities quickly. The paper maintains a total for each multinomial block. Each change to an entry can be accompanied by a change to that block's total. At lookup time, the algorithm divides the stored count by the stored total. This trades an extra adjustment during updates for constant-time access to a probability, without summing a block again whenever inference needs one of its entries. The sparse implementation addresses the cost of updating counts. Computing the incoming counts still requires inference for the examples in the group.
Experiments and results
What each task asks the learner to recover
The experiments cover tasks in which the learner invents labels and tasks in which it proposes a structure directly. In the label tasks, the identities of the induced classes are arbitrary. Evaluation maps each predicted label to the annotated label that gives the best accuracy. This lets a class receive credit for capturing a grammatical category or document category regardless of the name assigned to it during training. In the structural tasks, the learner predicts spans or links that can be compared directly with annotated structures.
The authors tag the Penn Treebank’s Wall Street Journal section using a bigram hidden Markov model. The corpus contains 49,208 sentences, and the tag inventory contains 45 tags. Each tag depends on the preceding tag, and each word is emitted by its tag. These assumptions allow the expectation step to accumulate both transition counts and word emission counts. Training uses no tagging dictionary. The evaluation is per-position accuracy after label mapping, so the reported percentage measures the recovery of the annotated tag at individual word positions.
For document classification, the 20 Newsgroups dataset contains 18,828 documents in 20 classes. The input is a bag of words, which retains word occurrences while ignoring their order. Conditional on the hidden class, the words of a document are drawn independently from that class's distribution. Before training, the authors remove the 50 most frequent words and words appearing fewer than 5 times. Evaluation reports document class accuracy after mapping the induced classes to the annotated ones. A whole document supplies the evidence for its class, whereas a single sentence in tagging contains a sequence of latent category choices.
For word segmentation, an input is a sequence of phonemes or characters with the word boundaries removed. The goal is to recover contiguous spans that correspond to words, a form of tokenization. The English experiment uses the Bernstein–Ratner corpus from CHILDES, with 9790 sentences. The Chinese experiment uses the first 100K sentences of the Academia Sinica corpus from the SIGHAN segmentation bakeoff. The authors score both datasets by word-token F1, which combines the precision and recall of proposed words. The score therefore concerns complete word tokens. A local boundary decision can affect the spans on either side.
A unigram probability contributes one factor for each proposed word. With no length cost, maximizing likelihood in the naive formulation admits a degenerate solution in which an entire sentence is treated as one lexical item. The paper adds a penalty that grows with the segment length. The contribution from a proposed word then depends both on its estimated probability and on the cost associated with its length.
p(x, z; θ) ∝ ∏ᵣ₌₁^|z| p(x[zᵣ]; θ) e⁻⁽|zᵣ|ᵝ⁾
In this expression x is the input sequence and z is a proposed segmentation. The index r ranges over its |z| segments. The segment zᵣ identifies a contiguous span of x, and x[zᵣ] is the word form in that span. The factor p(x[zᵣ]; θ) is the unigram word probability under parameters θ. The symbol |zᵣ| is the span's length, e is the base of the exponential, and β controls the power applied to the length before taking the negative exponential. The condition in the paper is β > 1. The product combines the word probability and penalty for every segment. The proportionality symbol indicates that the expression specifies the relative joint weight.
The authors use β = 1.6 for English and β = 2.5 for Chinese. To make inference faster, they cap the allowed segment length at 10 for English and 5 for Chinese. The penalty and the cap play different roles. The penalty changes the relative weight of candidates within the allowed inventory, and the cap restricts the spans that inference considers. Both are part of the experimental setup shared by the compared training algorithms on each segmentation corpus.
For word alignment, an input consists of an English sentence and its French translation. The hidden output records which pairs of word positions are linked. The paper trains two directional IBM Model 1 systems using agreement-based learning. Under this setup, the two alignment directions inform training through their agreement. From the NAACL 2003 Shared Task’s English–French Hansards data, the authors take the first 30K sentence pairs, which include 447+37 manually aligned pairs. Those hand alignments furnish the reference for standard alignment error rate, or AER. The paper cites comparison work connected with the data and alignment evaluation. A Systematic Comparison of Various Statistical Alignment Models
Initialization, settings, and measurements
The usual run begins from nearly uniform probabilities with a random perturbation to break symmetry. Distinct hidden categories can start with equivalent distributions under a perfectly symmetric initialization. Noise gives inference a basis for treating them differently at the start. In the main comparison, the seed for initialization is fixed, as is the randomness used to shuffle examples at the beginning of each online pass. The standard training budget is 20 iterations, where an iteration is a pass through the data. Batch tagging is an exception. The authors use a stronger perturbation for that case and run batch EM for 100 iterations to obtain satisfactory performance. Training uses no parameter smoothing.
θₖ ∝ exp{10⁻³ (1 + aₖ)}, aₖ ∼ U[0, 1]
Here θₖ is the initial probability for entry k of a multinomial block. In this formula, k indexes entries within the block. The value aₖ is a random draw from the uniform distribution U on the interval from 0 to 1. The exponential gives a positive weight, scaled in its exponent by 10⁻³, and the proportionality sign indicates that the weights are normalized across the block. For batch EM on tagging, the multiplier in the exponent is 1. The stronger noise and longer training schedule are conditions of the reported tagging comparison.
The authors report marginal log-likelihood divided by the number of examples and a task-specific measure of prediction quality. Normalizing by example count gives a per-example score suitable for following alternative runs on the same corpus. It does not put different datasets on a common scale of task difficulty. A likelihood value describes how the fitted distribution scores the inputs. The accuracy or F1 value describes how well the resulting predictions match annotations, and the alignment task has its own error convention.
The main stepwise comparison varies α over 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0, and m over 1, 3, 10, 30, 100, 300, 1K, 3K, and 10K. The authors call the likelihood-selected version sEM. They also report sEMₐ, which uses the settings that maximize task accuracy, and sEMᵢ, with α = 1 and m = 1. The grid includes the empirical setting α = 0.5, at the boundary of the range described in the convergence discussion. An experiment at that setting measures the behavior of a finite training run.
Batch EM is the reference for the value of more frequent updates. Incremental EM and sEMᵢ help test how much any online update can achieve with the simplest per-example regime. The likelihood-selected version asks what can be obtained when the settings are chosen from the unlabeled data. The accuracy-selected version asks how good the predictions can be within the tested settings when annotations are available for selection. The final scores are those from the final iteration of the designated run. The training curves also let the authors compare scores earlier in a run.
Tagging and classification benefit most
In the training curves, the likelihood-selected stepwise procedure reaches comparable likelihood and task performance faster than batch EM across the datasets. The authors describe the speed advantage as ranging from about 2 times on word alignment to 10 on tagging. The curves track progress through corpus passes. This shows how the algorithms differ in the amount of data processing needed to reach useful scores. The comparison also shows unsuccessful online runs. Incremental EM and the fixed per-example stepwise setting can perform poorly, so frequency of updates alone is insufficient to explain the successful curves.
Final per-position tagging accuracy on the Wall Street Journal corpus
Stepwise EM improves on batch EM, with the strongest score under accuracy-based tuning.
The numbers
| System or setting | accuracy % |
|---|---|
| Batch EM | 57.3 |
| Stepwise EM tuned by likelihood | 59.6 |
| Stepwise EM tuned by tagging accuracy (this paper) | 66.7 |
On Wall Street Journal tagging, the likelihood-selected run uses α = 0.7 and m = 3. The accuracy-selected run retains m = 3 and uses α = 0.5. After one pass, batch EM has 24.0% tagging accuracy and the accuracy-selected stepwise run has 54.5%. After two passes, the latter reaches 65.4%. Batch EM has 57.3% after 100 iterations. The early speed comparison and the final-score comparison address related questions. The early results show that useful tags appear sooner, while the final results show that the advantage in the reported run persists after batch EM has had a much longer opportunity to improve.
The distinction between the two stepwise settings matters for what can be done without labels. The 59.6% final tagging result uses only likelihood to select the settings. Reaching the reported 66.7% setting depends on using tagging accuracy for selection. Both systems infer tags during training without labeled sentences. They differ in what information the researcher uses to choose the schedule under which that inference is carried out.
Final accuracy on 20 Newsgroups document classification
Both selected stepwise settings improve document classification over batch EM.
The numbers
| System or setting | accuracy % |
|---|---|
| Batch EM | 39.1 |
| Stepwise EM tuned by likelihood | 47.8 |
| Stepwise EM tuned by class accuracy (this paper) | 49.9 |
Document classification shows the same ordering of the selected procedures. The likelihood-selected run uses α = 0.8 and m = 1K. The accuracy-selected run uses α = 0.5 and m = 3K. A small mini-batch works well for tagging, while the selected classification runs aggregate evidence from many more examples before changing the parameters. This difference is visible even though both tasks induce classes and evaluate them by mapping predicted labels to annotated ones.
Segmentation and alignment show smaller changes
Final word-token F1 on Bernstein–Ratner English segmentation
Accuracy-based tuning gives the largest improvement within the penalized unigram comparison.
The numbers
| System or setting | word-token F1 % |
|---|---|
| Batch EM | 80.5 |
| Stepwise EM tuned by likelihood | 80.7 |
| Stepwise EM tuned by word-token F1 (this paper) | 83.5 |
For the Bernstein–Ratner corpus, likelihood selection chooses α = 0.7 and m = 1K. Selecting by segmentation F1 chooses α = 1.0 and m = 100. The authors compare their 83.5% result with the 78% previously published by Johnson. They describe their penalized unigram formulation as new to their knowledge and the previous approach as more complicated. The within-paper comparison keeps the penalized formulation fixed across algorithms. The comparison with published work changes that formulation as well, so it puts the resulting score in context without isolating the contribution of stepwise optimization.
On Academia Sinica Chinese segmentation, the final word-token F1 is 78.2% for batch EM, 77.2% for likelihood-selected sEM, and 78.1% for sEMₐ. Both selected stepwise settings use m = 10K. The likelihood-selected schedule uses α = 0.6, and the accuracy-selected one uses α = 1.0. The corpus thus provides an example of a speed advantage with a slightly lower final task score under likelihood selection. It also shows why the positive result on the English corpus is best understood as specific to its data and choice of settings.
For English–French Hansards alignment, the final comparison lists scores of 78.8 for batch EM and 78.9 for each selected stepwise variant. These are the alignment entries in the paper's final performance table. The paper identifies AER as the underlying task metric, so the entries should be read in the table's reported score convention. Both selection criteria choose α = 0.7 and m = 10K. Here they identify the same setting, and the final scores are close. The alignment result mainly supports the finding that the stepwise procedure can reach comparable performance in fewer passes.
What the ablations show
The step size and group size act together
The parameter sweep is the paper's clearest controlled comparison. For each task, the authors vary the reduction power and the mini-batch size and examine how the resulting runs score on likelihood and predictions. The inference procedure and probabilistic assumptions for a task are held fixed in this comparison. Differences across the settings show what can change solely from giving new statistics a different weight or accumulating them over a different group of examples.
Tagging responds well to small mini-batches and relatively large updates. Frequent revisions mean that counts collected early in a pass can immediately influence how the later sentences are interpreted. For document classification, the sweep shows that larger groups are important. A document has an entire bag of words associated with a single inferred class. The group comparison establishes that aggregating across documents before changing the running statistics is valuable in this setup. It leaves the precise explanation for the difference between the tasks open.
The sweep also shows an interaction. As mini-batches get larger, the authors tend to find better settings with smaller α. The new counts then carry more weight. A plausible explanation, offered by the authors, is that estimates from larger groups are reliable enough to absorb more quickly. This interpretation links the controls. Increasing m changes the evidence behind the next update, and decreasing α changes how much the update can move the parameters. The best setting for either control depends on the value used for the other.
The tasks generally have a region of settings that provide reasonable performance. Favorable likelihood settings often lie near settings with good task scores. That is the empirical basis for using likelihood as a selection rule when labels are unavailable. The final results also show the limits of that rule on individual corpora. A different point in the grid gives better tagging accuracy, and the likelihood-selected choice on Chinese segmentation yields a lower word-token score than batch EM. The broad overlap observed in the sweep explains why likelihood can be useful for selection even when the best choices for the two metrics differ.
Remembering old examples buys little in these comparisons
The first-pass relationship between incremental EM and sEMᵢ suggests comparing their full training curves directly. After the first pass, the incremental algorithm has the opportunity to benefit from removing stale per-example counts each time it revisits the data. The stepwise run has no such records and continues to adjust its single running estimate. If the stored history substantially stabilized training, a difference could emerge as those replacement updates accumulated.
The reported curves are very similar where both methods were run, and both are vulnerable to poor outcomes. Keeping the old statistics therefore provides little apparent benefit in those experiments. It also creates a concrete cost. The authors could not run incremental EM on Wall Street Journal tagging within their memory limits. They predict that it would behave much like sEMᵢ on the basis of the other comparisons. That part of the argument is an extrapolation from the observed similarities, with sEMᵢ supplying the data from tagging itself.
Updating several example contributions together could give incremental EM a counterpart to larger mini-batches. The authors point out that such a grouped coordinate update would still lack the effect of using α < 1 in stepwise EM. Under stepwise interpolation, the strength of the new counts controls how fast the previous aggregate is discounted. Under a coordinate replacement, each example retains its own contribution until it is revisited. The empirical comparison favors the additional flexibility of the stepwise schedule over retaining the old statistics in the forms tested.
Likelihood and accuracy can move on different schedules
The tagging trajectories allow the authors to probe the difference between the criterion used for fitting and the one used for judging the predictions. A setting selected by likelihood can give stepwise training gains on both measures relative to batch EM. The setting selected by tagging accuracy reaches good tags particularly early, while its likelihood rises more slowly than in the likelihood-selected stepwise run. The parameters have followed different paths even though the task's probability assumptions and the unlabeled training corpus are the same.
This behavior is consistent with the training procedure favoring certain types of solutions. A sequence of large updates from small groups can carry the parameters to a region where the selected tag sequences agree well with the annotation. Marginal likelihood depends on the total probability over possible sequences. Accordingly, changes that improve the choice of tag sequence need not improve that total by a corresponding amount. The authors suggest that stochasticity may sometimes help the procedure avoid poor local solutions. Their curves establish differences in outcomes and leave the mechanism behind those differences open.
The hybrid experiment tests what can happen after the useful early phase. The authors run sEMₐ for 5 iterations on tagging and then switch to batch EM. The first stage brings the system to a region with good tagging accuracy. After the switch, likelihood rises quickly and the accuracy attained on the stepwise trajectory is preserved. Batch EM can thus improve the likelihood from the starting point supplied by the stepwise phase, even though its run from the original initialization takes a different course.
That result gives the role of the hybrid some precision. It demonstrates that good tagging predictions and improved likelihood can coexist on this trajectory. It also makes the history of the parameter estimates observable in the comparison. The same batch update rule operates from a different starting point after the switch, with a different result from running batch updates throughout. The experiment addresses what the early online stage can contribute before batch re-estimation resumes.
Random seeds identify two sources of variation
The main experiments use a fixed seed, so the authors run a separate analysis to determine how much the results depend on that choice. They distinguish randomness in the starting probabilities from randomness in the order of examples at the beginning of each pass. The order can influence online EM because earlier examples affect the parameters used on later ones. In batch EM, the same parameters govern inference throughout a pass, and the sufficient statistics are accumulated before any re-estimation. Initialization is the source of randomness varied in its trials.
The initialization seed Sᵢ and the permutation seed Sₚ each take values from the set {1, 2, 3, 4, 5}. The authors report 5 batch EM trials and 25 stepwise EM trials. By repeating the order choices for each initialization, they can see both how different initializations perform on average and how much the ordering changes results for a fixed start.
var(X) = var(E(X | Sᵢ)) + E(var(X | Sᵢ))
Here X is the measured outcome, either the task score or the normalized log-likelihood, and Sᵢ is the initialization seed. The notation E means expectation or averaging, var means variance, and the vertical bar indicates conditioning on the initialization. The first term computes the variability across initializations of the mean result for each initialization, averaging over permutations before comparing the starts. The second term computes variability across permutations within each initialization and then averages those within-initialization variances. The equation decomposes the total variation into these two contributions.
For tagging, the mean per-position accuracy is 56.2% for batch EM and 58.8% for likelihood-selected stepwise EM. The standard deviation attributed to initialization is 1.36 for batch EM and 0.73 for stepwise EM, in the units of the reported percent-accuracy scores. Stepwise EM has a further standard deviation of 1.41 attributed to example permutation. The mean per-example log-likelihoods are −6.01 for batch EM and −6.09 for stepwise EM. Thus the mean tagging accuracy favors stepwise training in these trials, while the mean likelihood favors batch training.
On 20 Newsgroups, the batch and stepwise means are 41.2% and 51.4% class accuracy, respectively. Their initialization standard deviations are 1.97 and 0.97, with a permutation standard deviation of 2.82 for stepwise EM. Their mean per-example log-likelihoods are −7.93 and −7.88, respectively. Here the stepwise means are higher on both measurements. The difference between the two tasks reinforces why the authors examine training likelihood and task performance separately.
The smaller final-score changes on segmentation and alignment are also reflected in the repeated runs. On English segmentation, the means are 80.5% and 81.0% word-token F1 for batch and stepwise EM. On Chinese segmentation, the corresponding means are 78.2% and 77.2%. The alignment means in the paper's score convention are 79.0 for batch EM and 78.8 for stepwise EM. These averages allow a more qualified reading of the fixed-seed alignment result, in which the order was reversed. The authors report standard deviations below 0.01 for the log-likelihoods in this analysis.
The authors conclude that stepwise EM is less sensitive to initialization overall in their trials, while shuffling introduces extra variation large enough to make its accuracy somewhat more variable overall. The two observations concern different sources of variation. Changing the starting probabilities has a relatively small effect on the stepwise runs, while presenting the same corpus in a different order changes the sequence of intermediate inferences. The repeat trials retain the main mean accuracy gains on tagging and document classification despite that extra dependence on order.
Limitations
Limits identified by the authors
The authors leave the cause of the accuracy improvements open. Tagging and document classification are the strongest cases, and both infer labels associated with distributions over words. Segmentation and alignment seek combinatorial structures such as spans and links. The authors propose this distinction as a possible clue. Each task also has its own input representation, corpus, and probability structure, so the paper does not establish latent classes as the cause of the improvement.
The guarantee discussed for stepwise EM concerns convergence under suitable conditions to a local optimum. It does not predict which local solution a finite run will reach or how well that solution will recover annotations. Intermediate likelihood and bound values can decrease. Incremental EM has a monotonic guarantee for the auxiliary bound, and its individual updates can still decrease marginal likelihood. The precision of these distinctions matters because none of these optimization properties alone supplies an accuracy guarantee.
The authors also emphasize the dependence on setting α and m. Their best choices vary by task. In particular, likelihood provides a practical criterion when labels are unavailable, while choosing by prediction accuracy requires annotated data. The tagging result that reaches 65.4% after two passes belongs to the accuracy-selected run. Applying the decision procedure that produced that setting to a new task would require some way to assess task accuracy, such as the small labeled tuning set the authors mention.
Memory prevented a direct incremental EM tagging run. The comparison on that corpus is therefore between batch EM and the stepwise variants, with a prediction about what incremental EM would do. This constraint is evidence about the practicality of storing the example-level sufficient statistics for that experiment. The accuracy of an incremental run on the same corpus remains unmeasured.
Limits visible in the experimental setup
The central time comparison follows progress through corpus passes. The sparse implementation explains how one can keep count maintenance cheap, but runtime also depends on the cost of inference, access to the count blocks, shuffling, and the extra work of searching settings. The results describe speed within runs under the selected schedules. They do not measure an end-to-end tuning cost or establish a wall-clock factor that applies across implementations. The memory advantage is likewise specific to the state carried by the optimizer. A stepwise run still has to support the probability tables and the inference required by the task.
The results compare different selections of the same optimization controls under the paper's protocol. The accuracy-selected variant establishes what the tested grid can yield when the selection criterion has access to annotation. The reported comparison does not specify a separate held-out accuracy estimate after selecting those settings. Its strongest numerical results are therefore best understood as performance under accuracy-based selection in the reported experiment. The likelihood-selected results supply the corresponding evidence for choosing a schedule without labels.
The setup for batch Wall Street Journal tagging has stronger initialization noise and a longer run. The authors report that the stronger noise worked better for batch EM. The longer run also lets batch training progress further than it would under the usual stopping point. This design makes the comparison informative about the procedures under the stated choices. It leaves open how much of a particular run's outcome is attributable to initialization interacting with the schedule. The seed study isolates variation within the chosen initialization protocols. It does not sweep over the amount of initialization noise.
The structural tasks show why the results should be read at the scale of their experimental design. The English segmentation comparison with earlier work includes the length-penalized unigram formulation as well as the choice of update procedure. The internal batch comparison is the controlled evidence for changing the update rule. On Chinese segmentation, the final score under likelihood selection trails batch EM. In alignment, the final scores are close, and the ordering changes between the fixed-seed result and the seed averages. These experiments support faster attainment of comparable scores more consistently than they support higher final task scores.
Finally, the corpora are revisited and shuffled across passes. Updating during a pass makes stepwise EM relevant to sequentially arriving data, as the authors suggest. Learning from a stream that is seen once, or whose composition changes over time, presents a different experimental condition. The paper's evidence concerns repeated training on fixed datasets. Its discussion of real-time estimation identifies a reason to study that further.
What came after
Later citations span several problems in which the things a learner is meant to recover are unobserved, such as frames, alignments, and lexical structure. The citation links establish that these works refer to the online EM study. Their titles identify the problems that brought them into contact with it. A citation alone leaves open whether the citing work implemented the stepwise update, changed it, used it for comparison, or discussed it as earlier work.
Painless Unsupervised Learning with Features places features at the center of an unsupervised learning problem. The question this raises alongside Liang and Klein's study is what happens to an online update when re-estimation involves richer evidence than the normalized count blocks used here. The connection is at the level of unsupervised estimation. The specific role of the stepwise schedule in the later work is unspecified.
Probabilistic Frame Induction takes up the induction of latent frames. This is a different target from the latent categories and structural outputs evaluated by Liang and Klein. The shared setting is probabilistic inference about structure that is absent from the observed text. The citation links the application to earlier work on estimating such distributions efficiently, without establishing which update it used.
Monolingual Phrase Alignment on Parse Forests concerns alignment at phrase level within a language, using parse forests. Liang and Klein's alignment experiment concerns individual words across English and French translations. The link marks a connection between studies of alignment with different units and inputs. It does not determine whether the later alignment procedure adopted the original mini-batch choices or the agreement-based setup.
The Same-Head Heuristic for Coreference cites the study in work on coreference resolution, where the relevant linguistic structure concerns which mentions refer to the same entity. Its named contribution is a heuristic based on mention heads. The title identifies the coreference question and the heuristic, while the citation leaves the relationship between that heuristic and the online EM updates unspecified.
Masked Segmental Language Modeling supplies a later connection to learning over segments. The original paper treats segmentation as inference over possible word spans, with unigram probabilities and a length penalty. The later citation connects that study to a different segmental approach. It supplies no basis for attributing the original penalty or the stepwise update to the later procedure.
Unsupervised Induction of Arabic Root and Pattern Lexicons using Machine Learning brings the connection into morphology. Its target is a lexicon of roots and patterns, rather than the contiguous word spans scored in Liang and Klein's segmentation experiments. The citation documents a further point of contact with unsupervised induction. How the later work drew on the difference between incremental and stepwise EM remains unspecified.
Cite
Cite as Percy Liang and Dan Klein. 2009. Online EM for Unsupervised Models. Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics.
@inproceedings{liang2009online,
title = {{Online EM for Unsupervised Models}},
author = {Percy Liang and Dan Klein},
booktitle = {Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics},
year = {2009},
doi = {10.3115/1620754.1620843},
url = {https://doi.org/10.3115/1620754.1620843}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/liang-2009-online-em-unsupervised-models/