A Gibbs Sampler for Phrasal Synchronous Grammar Induction
Paper · 2009 · Phil Blunsom, Trevor Cohn, Chris Dyer et al.
Summary
A translation system can learn that a group of words has a useful counterpart in another language even when the words make poor matches individually. The difficulty is finding those groups in a collection of paired sentences. A standard approach at the time started by linking individual words, then extracted phrases compatible with those links. An early alignment error could therefore determine which phrases the system ever got to consider. This paper learns bilingual phrases and their arrangement together. It uses a synchronous grammar, whose rules build a sentence and its translation through a shared tree while allowing parts of the tree to appear in different orders on the two sides. The aim is to improve the training of systems for machine translation.
Learning directly from sentence pairs introduces a problem of its own. A grammar can account for the training data by treating long stretches of text, or entire sentences, as individual translation units. The authors use a Bayesian prior that favors a compact inventory of rules and short phrases, while giving the inventory room to grow as the data warrant. They train the grammar with a Gibbs sampler. It keeps a current tree for each sentence pair, revises nearby phrase boundaries and branches, and uses counts from the current trees to score each proposed revision. This avoids constructing a chart that represents all possible trees for a pair.
The authors use the sampled trees to supply alignments to Moses, a phrase-based system, and Hiero, a hierarchical one. On IWSLT Chinese-to-English Test 05, the grammar-based training raises Moses from 47.3 to 49.6 and Hiero from 48.3 to 51.8 in BLEU score. Both systems also gain on the reported NIST Chinese-to-English tests, by smaller margins. The NIST Arabic-to-English scores give a mixed picture, with declines on MT04 and MT05 for both systems. The authors expected the grammar to help most where translation involves substantial reordering. Their inspection of Chinese alignments shows how an isolated word link can block phrase extraction even when the words around it align well.
For larger training sets the authors divide the sentence pairs among workers, which update their trees independently and share their changes after a pass. The resulting training curves closely follow those of a sequential run on the posterior statistic the paper plots. Together, the experiments show that this form of phrase and grammar induction can be used on sizable parallel corpora, and that its value for translation depends on the alignments and reordering patterns it encounters.
Deep dive: A Gibbs Sampler for Phrasal Synchronous Grammar Induction
A Gibbs sampler learns bilingual phrase rules from paired sentences and tests how those rules affect Chinese and Arabic translation into English. · about 39 minutes to read
The problem and its context
Why word links determine which phrases survive
The starting point is a parallel corpus. Each training item contains a sentence in one language and a corresponding sentence in another. The pairing identifies which sentences go together. It leaves open the finer question of which stretches within them are counterparts. A word can be translated by a phrase, a phrase can be translated by a word, and material can appear in a different order. A useful training procedure has to infer some of these correspondences before a decoder can reuse them in another sentence.
The paper describes a shift in translation research from individual words to phrases, where a phrase is a contiguous sequence of tokens. In that usage, a phrase can consist of a single token, and a longer phrase can be useful even if it would have no special standing in a linguistic analysis. A sequence of adjacent tokens is an n-gram. The earlier system the authors take as their main point of comparison is described in Statistical Phrase-Based Translation.
The established training pipeline still gave the word a central role. It inferred links at the word level, commonly using GIZA++. The procedure ran alignment in both directions and combined the results with heuristics. A further extraction procedure looked for contiguous spans that were consistent with the combined links. Roughly, if a proposed pair of spans enclosed a link at one end and left the other end outside, the pair failed that consistency check. The accepted pairs could then populate a phrase table. A related extraction procedure could produce rules with variables for a hierarchical decoder.
That arrangement is efficient and gives the extractor an intelligible test for admitting a phrase pair. It also makes some errors expensive. A single stray link can exclude several phrases that would otherwise be available. Removing the link could admit those phrases even if all the other links stayed in place. The number of links and the number of extractable phrases can therefore move in different directions. The location of a link matters because the extraction procedure interprets it as a constraint on which spans belong together.
There is a second difficulty with starting from words. If the translation of a multiword expression is hard to explain as a sum of individual correspondences, a word aligner has to distribute support for that expression across decisions at the wrong scale. A grammar can put probability on the phrase pair itself. Once the pair is available as a unit, the training procedure can weigh it against alternative ways of accounting for the same stretch of the sentence. The paper asks whether that freedom can be made practical without first using word links to define which units are eligible.
Why learning the phrases directly was difficult
The authors situate their approach among earlier efforts to infer phrases directly from sentence pairs. Marcu and Wong’s approach coupled a very large phrase-pair inventory with a difficult estimation problem. Its use of expectation maximization required inference over latent correspondences, and the paper describes that inference as intractable. Contiguous spans already offer many choices within a sentence. Pairing spans across languages and considering how several pairs can jointly cover a sentence greatly expands the search. Marcu and Wong’s phrase-based joint probability approach.
A later approach by DeNero and colleagues used Gibbs sampling to explore phrase alignments more freely. Gibbs sampling repeatedly chooses part of a current analysis and samples a replacement conditional on the rest. The authors regard that work as a promising way to avoid an exhaustive computation, while pointing out that its experiments used small datasets and short runs. Their own proposal brings sampling to a different representation. The analysis has a shared tree, so the way a span groups with or moves around its neighbors must fit into a hierarchy. This makes local changes more structured than changes to a general arrangement of phrase pairs.
Synchronous grammars provide that hierarchy by extending the context-free grammar. A context-free rule rewrites a category into a sequence of symbols. A synchronous rule rewrites corresponding occurrences of a category on both sides of a sentence pair and identifies which of its child categories go together. The children can occur in a different order on either side. A tree built from such rules represents both segmentation into phrases and an account of how the phrases reorder.
The paper distinguishes two sources of computational cost. One concerns the inventory itself. In a substantial parallel corpus, the number of conceivable bilingual phrase pairs can reach billions or trillions. The other concerns the analyses of an individual sentence pair. Even when a grammar admits polynomial-time inference, a procedure that explicitly builds the packed forest of analyses can be expensive for long sentences. The paper cites a high-order bound for a weighted subclass in its discussion of earlier bilingual grammar work. Stochastic Inversion Transduction Grammars and Bilingual Parsing of Parallel Corpora.
Earlier work controlled this cost in several ways. A training run could exclude long sentences or use relatively little data. A word alignment or parse tree could restrict the structures available to the learner. A grammar could also be fixed before inference. These choices make computation more manageable, but they affect which phrase pairs or structures can acquire support. If a noisy alignment excludes a candidate at the outset, later evidence from the corpus has no chance to restore it within that search. The authors wanted the grammar and its prior to govern which analyses were plausible, with the sampler handling the cost of exploring them.
Why the most likely grammar can learn too little
Computational access to the phrase inventory would solve only part of the problem. The authors also discuss a failure of maximum likelihood. If the objective rewards a grammar solely for assigning probability to the observed sentence pairs, very long terminal rules can exploit that objective. A grammar can learn a pair of complete sentences as a single rule. This accounts for that item with great specificity, but it offers little help with a new sentence made from some of the same expressions.
The problem is subtler than deciding that short phrases are always preferable. A useful multiword correspondence sometimes needs to be treated as a whole. Conversely, subdividing every sentence as finely as possible could replace a compact inventory of reliable phrase pairs with a collection of weak local decisions and extra tree structure. An induction procedure needs a way to compare the evidence for a longer reusable unit with the evidence for combinations of shorter units. It also needs to allow the training corpus to reveal a larger inventory when a small one cannot explain the data well.
The paper gives these preferences a probabilistic form. It assigns a prior to grammars, with pressure towards reusing rules and assigning short strings to terminal rules. A prior influences the relative weight of competing analyses while leaving longer phrase pairs available. The choice of search then becomes important. A prior may strongly prefer a plausible analysis, yet a sampler that takes only awkward paths between trees may reach it rarely. The article’s technical contribution concerns both sides of this problem, the distribution over grammars and the moves that explore it.
The method, step by step
What a synchronous tree records
A tree for a sentence pair starts with a root covering both sentences. Each internal expansion divides its source span and target span among corresponding children. At a leaf, the rule emits the observed strings for that portion of the pair. The tree thus records decisions at different scales. A leaf says which contiguous sequences are being translated as a unit. A branch says how the units below it combine, including whether their relative order changes.
The authors illustrate this structure with a Japanese sentence and its English translation. The tree groups a subject, an object and a verb. The Japanese side places the object before the verb. The English side places the verb before the object. A shared branching rule keeps the subject in the same relative position and swaps the other children between languages. A terminal rule supplies the English object along with its article, which demonstrates why the strings associated with a single leaf can have different token counts.
The paper gives the general synchronous rule form as follows.
X → ⟨e, f, a⟩
Here X is the category being rewritten. The arrow denotes a rewrite, and the angle brackets group the parts of the paired rule. The strings e and f are on the target and source sides, respectively. In the general formalism they may contain terminals, which are observed tokens, and nonterminals, which are categories to be expanded. The alignment a pairs occurrences of nonterminals on the two sides, so that each pair expands through the same child tree.
The experiments use a simplified rule inventory. A nonterminal expansion has either two or three children and gives their relative order across languages. A terminal expansion has a pair of strings, with permission for one side to be empty. The grammar excludes rules that emit tokens and contain expandable children in the same production. All experimental grammars use the single recurring category X. Although the rule alphabet for branches is restricted, terminal strings have an open-ended inventory. A newly proposed leaf can contain a phrase pair that the current grammar has yet to use.
The distinction between branches and leaves matters for the sampler. Changing a leaf boundary changes which words belong together as a phrase. Changing an internal branch can give the same leaves a different grouping, with consequences for subsequent changes to phrase boundaries or order. A shared pair of strings can often be generated by several trees. The observed sentences are fixed throughout training, so any acceptable change must leave the source and target yields intact.
From paired sentences to decoder rules
The steps in order.
From a preference for compact rules to a probability
The learning target is a posterior distribution. The data are the observed pairs of sentences, and the grammar determines how likely it is to produce them. The prior expresses preferences before observing those sentences. Bayes’ rule combines the two.
P(g ∣ x) ∝ P(x ∣ g) P(g)
P denotes probability. The vertical bar means conditioning on the expression to its right. The symbol g stands for a weighted synchronous grammar, and x for the training corpus of sentence pairs. P(g ∣ x) is the posterior probability of the grammar given the corpus. P(x ∣ g) is the likelihood of the corpus under the grammar, and P(g) is the prior. The proportionality sign means that the expression on the right needs a common normalizing factor to give posterior probabilities.
For a fixed grammar, producing a sentence pair involves starting at the root and choosing an expansion for each nonterminal until all remaining material is terminal. A derivation is the record of these choices. Its probability is the root probability multiplied by the probabilities of the selected rules.
p(d) = p(z₁) ∏ᵢ p(rᵢ ∣ zᵢ)
Here p denotes probability, d is the derivation, and z₁ is its initial category. The index i runs over the rule occurrences in the derivation. rᵢ is the rule at occurrence i, and zᵢ is the nonterminal it rewrites. The product symbol ∏ᵢ multiplies the factors for all these occurrences. The conditional factor gives the probability of choosing rule rᵢ when expanding zᵢ.
The next step is to give the rule probabilities priors and integrate the probabilities out. The resulting sampler is called collapsed because it keeps track of the assignments and their counts while averaging over the possible values of the underlying rule probabilities. To see what this means, consider a sampled tree whose leaf currently uses a particular phrase pair. That occurrence contributes a count to the relevant rule. When the sampler decides how to revise the leaf, it can temporarily remove that contribution and ask how well the remaining uses support keeping it or choosing an alternative.
This approach makes reuse observable in the state of training. If a candidate introduces a rule that many other nodes already use, it receives support from their counts. A new rule can enter through the prior, where its support depends partly on the strings it would emit. Counts change with the trees, so the evidence for a rule reflects the current analyses of the corpus. A rule that appears many times only because of a particular initial alignment can lose its support as those analyses are revised.
Choosing a rule type and a branch
The first choice at a node is whether it expands to children or emits terminal strings. The authors express this as a Bernoulli choice with a probability parameter given a symmetric Beta prior.
tᵢ ∼ Bernoulli(γ)
tᵢ denotes the rule type at occurrence i, with possible outcomes TERM and NON-TERM. The tilde means that the choice is drawn from the named distribution. Bernoulli is the distribution for a choice between the two outcomes, and γ is its probability parameter for the category being expanded.
γ ∼ Beta(αᴿ, αᴿ)
γ is the rule-type probability. Beta is the prior distribution over that probability, and αᴿ is the concentration parameter governing the rule-type choice. Its use for both arguments makes the two types symmetric before observing rule occurrences. The tilde again denotes a draw from a distribution.
After integrating out γ, the prediction for the current occurrence depends on how often the alternatives have appeared elsewhere.
p(tᵢ ∣ r₋ᵢ, zᵢ, αᴿ) = (n⁻ⁱ(tᵢ, zᵢ) + αᴿ) / (n⁻ⁱ(·, zᵢ) + 2αᴿ)
p denotes conditional probability, tᵢ is the proposed type, r₋ᵢ collects all rule occurrences other than the current one, and zᵢ is its parent category. The superscript ⁻ⁱ marks counts that exclude the current occurrence. n⁻ⁱ(tᵢ, zᵢ) counts rules of the proposed type under that category, while the dot in n⁻ⁱ(·, zᵢ) means to count rules of either type under the same category. The additions supply prior support of αᴿ to each type. The denominator includes 2αᴿ because those are the two alternatives. The slash denotes division.
An important property here is exchangeability. If the count of each outcome is fixed, the probability of the collection of choices is the same under any permutation of those choices. For inference, an occurrence deep inside an existing tree can be treated as if it were the next one being added after all the other occurrences. The procedure can visit the source boundaries of a sentence in a convenient order while using counts that reflect the rest of the current corpus. This is a property of the probabilistic treatment of the rule choices. It places no requirement that the sentence or its tree be read in that order when used for translation.
If the sampler selects a nonterminal expansion, it must also choose the child categories and the alignment of those children. The prior over branch probabilities is a symmetric Dirichlet distribution.
φᶰ_z ∼ Dirichlet(αᴺ)
Here φᶰ_z is the vector of probabilities of nonterminal expansions from category z, and αᴺ is the common prior parameter for its entries. Dirichlet names a distribution over vectors of probabilities. The tilde indicates that the vector is given this distribution before the probabilities are integrated out.
p(rᵢ ∣ tᵢ = NON-TERM, r₋ᵢ, zᵢ, αᴺ) = (nᴺ,⁻ⁱ(rᵢ, zᵢ) + αᴺ) / (nᴺ,⁻ⁱ(·, zᵢ) + |N|αᴺ)
rᵢ is the proposed branch rule, including its ordered children and their correspondence across the source and target. The equality inside the condition fixes tᵢ to the nonterminal type. r₋ᵢ excludes the current occurrence, zᵢ is the category being expanded, and αᴺ is the branch prior parameter. The count nᴺ,⁻ⁱ(rᵢ, zᵢ) records other uses of this particular branch rule. The dot in nᴺ,⁻ⁱ(·, zᵢ) means to sum over the nonterminal rules for that category. N is the set of distinct nonterminal rules and |N| its size, so the denominator includes the support assigned to every rule in that set.
This is a finite choice once the categories and allowed branching patterns have been specified. The terminal case is different. The grammar must be able to assign a probability to a previously unseen string pair even though a full list of possible pairs would be unbounded. The authors use a Dirichlet process to support that open inventory.
Generating phrases and handling empty sides
A terminal rule first chooses whether it emits a nonempty phrase on each side or leaves one side empty. An empty side represents material for which the current analysis proposes no overt counterpart. The fixed probability for the latter kind of rule is p_null, set to 10⁻¹⁰ in the reported experiments. This heavily discourages empty sides while keeping them available to the sampler. A rule with two empty sides is excluded.
φᴾ_z ∼ DP(αᴾ, P₁ᴾ)
φᴾ_z denotes the distribution over phrase-pair rules for category z when the rule emits text on both sides. DP denotes a Dirichlet process, αᴾ is its concentration parameter, and P₁ᴾ is its base distribution over the possible phrase pairs. The tilde denotes the prior on φᴾ_z. The base assigns support to possible rule types, while the concentration parameter governs the balance between that support and evidence for reuse.
φⁿᵘˡˡ_z ∼ DP(αⁿᵘˡˡ, P₁ⁿᵘˡˡ)
φⁿᵘˡˡ_z is the distribution for terminal rules under category z with exactly one empty side. DP again denotes a Dirichlet process. αⁿᵘˡˡ is the concentration for this inventory, and P₁ⁿᵘˡˡ is the base distribution over rules that emit a string in one language only. The numerical value of p_null determines how rarely the grammar chooses this branch of the terminal procedure. Its concentration controls the reuse of particular rules within that branch.
There are two separate ways to express preferences here. One concerns how readily the grammar adds a type to its inventory. The other concerns which as-yet-unseen phrases are plausible. A strong tendency to reuse rules would still leave a poor starting point if the underlying distribution treated very long strings too generously. The authors therefore specify a distribution for a single string before defining how its probability contributes to a phrase pair.
P₀ˣ(s) = P_Poisson(|s|; 1) × 1 / Vₓ^|s|
P₀ˣ(s) is the base probability of string s in language X. In this formula X denotes a language, whereas X in the example grammar names its nonterminal. The bars in |s| give the length of the string in tokens. P_Poisson(|s|; 1) is the probability of that length under a Poisson distribution with expected length 1. The semicolon inside the notation separates the length argument from the distribution parameter. Vₓ is the vocabulary size on that side. The exponent ^|s| raises it to the string length, and its reciprocal is the probability of the specific sequence given that length under uniform token choices. The multiplication sign combines the length probability and the probability of the sequence.
The length distribution makes the base probability fall sharply for long strings. The authors’ comparison is with a geometric length distribution, under which a long string can have greater prior probability than the corresponding shorter pieces taken together. The Poisson choice is intended to make segmentation into short units favorable in the comparison they describe. The full derivation still has to pay for the structural rules that connect the pieces. A longer phrase can retain support when its words repeatedly occur together or when pairing them as a unit accounts for the bilingual data more readily.
For a rule that emits only one string, the base distribution uses the monolingual probability on the nonempty side, with equal weight for either language.
P₁ⁿᵘˡˡ(z → ⟨e, f⟩) = ½ P₀ᴱ(e) if |f| = 0, or ½ P₀ᶠ(f) if |e| = 0
P₁ⁿᵘˡˡ is the base distribution conditional on emitting text in one language only. z is the category being rewritten, and the arrow and angle brackets specify its paired output. e is the target string and f is the source string. E and F label their respective languages, and P₀ᴱ and P₀ᶠ are the monolingual string distributions. A length of 0 indicates the empty string, and ½ gives each language equal weight for being the one that supplies the nonempty string. The fixed probability of proposing a rule with an empty side is applied separately.
Sharing evidence across phrase pairs
For ordinary terminal rules, the grammar assigns a probability to the bilingual pair as a unit. It can also benefit from seeing one side of that pair elsewhere. A recurring source phrase may pair with more than one target phrase. Evidence that the source phrase is common should be able to affect the plausibility of a candidate pair even when that particular bilingual combination has yet to occur. The paper builds this sharing into the base distribution.
P₁ᴾ(z → ⟨e, f⟩) = φᴱ_z(e) × φᶠ_z(f)
P₁ᴾ is the base probability for an ordinary bilingual terminal rule. z denotes the category, e the target phrase, and f the source phrase. The arrow rewrites z as the paired strings enclosed by the angle brackets. φᴱ_z(e) and φᶠ_z(f) are the probabilities assigned to the target and source strings by their respective phrase distributions. The product combines the two for the base probability. The upper Dirichlet process can still favor a particular bilingual combination through reuse of the complete rule.
φᴱ_z ∼ DP(αᴾᴱ, P₀ᴱ)
φᴱ_z is the target-side phrase distribution for category z. DP denotes the Dirichlet process, αᴾᴱ is the concentration for that phrase distribution, and P₀ᴱ is the monolingual base probability given by the string formula above. The tilde introduces the prior distribution.
φᶠ_z ∼ DP(αᴾᶠ, P₀ᶠ)
φᶠ_z is the corresponding source-side distribution. αᴾᶠ is its concentration and P₀ᶠ is the monolingual base distribution for source strings. DP and the tilde have the same meaning as in the target-side expression.
This hierarchy distinguishes two events that would be conflated in a flat inventory. One event is reusing a bilingual rule exactly as it has been used before. The other is introducing a bilingual combination whose individual phrases are familiar. In the latter case, the grammar can give the pair support through those separate distributions. A longer phrase that occurs infrequently has less opportunity to benefit from such sharing, which complements the length bias in the base distribution.
The authors relate this construction to Hierarchical Dirichlet Processes. In their bookkeeping, they track table counts directly. A table count is distinct from a count of observed uses. Multiple uses can reuse a table, while the creation of a table contributes evidence at the level supplying its prior. This distinction lets the upper inventory reuse phrase pairs without treating every use as an independent introduction of both monolingual strings. The paper contrasts direct tracking with the expected-table-count approximation used in earlier phrase sampling. Its discussion points to problems in the approximation as presented in Contextual Dependencies in Unsupervised Word Segmentation.
Revising a phrase boundary
With the probability distributions specified, the remaining challenge is to get from the current trees to better-supported trees. One possible method would construct a chart for a sentence pair, calculate the total probability of analyses represented by each chart cell, and sample a tree from the top down. The paper connects that approach to earlier work on sampling monolingual trees. The obstacle is constructing the bilingual forest even when the chart can share part of the computation across derivations. Bayesian Inference for PCFGs via Markov Chain Monte Carlo.
O(|f|³ |e|³)
O expresses an asymptotic time bound for the forest construction discussed in the paper. f and e are the full source and target sentences, |f| and |e| their lengths, and the superscript ³ cubes each length. The juxtaposition of the length terms denotes multiplication. The bound is cited for the applicable subclass of synchronous grammars. It illustrates the cost that motivates local sampling and gives no overall runtime bound for the sampler used in the experiments.
The sampler keeps a single current tree for each training pair. It visits a source boundary, identifies the part of the tree affected by a possible edit, and fixes the remainder. The fixed part is the context for the conditional update. In the figures, that surrounding structure is omitted so the candidate configurations can be compared locally. Each candidate still has to produce precisely the observed strings when placed back in the original tree.
The first operation is Split/Join. It visits positions between source words. Suppose such a position falls inside an existing terminal phrase. The sampler can keep the current leaf or split its source span into separate pieces. For a split it considers target boundaries within the target span, as well as permissible reordering of the pieces. Some choices leave one of the new phrases without a counterpart on one side. Choosing a cut therefore involves more than segmenting the source string. It requires an account of the corresponding target material.
Now suppose the position already separates two terminal phrases. If their target spans are adjacent, the sampler can consider new boundaries within the target material they jointly cover. An existing source boundary can be retained while its target counterpart moves. If the leaves also have the same parent, the sampler can consider different relative orders or remove the boundary altogether and use a single phrase pair. Sharing a parent matters because a join can then be represented by a local replacement within that portion of the tree.
The Split/Join figure presents these alternatives as a contrast between the joined configuration and configurations described by separate left and right phrase pairs and an alignment choice. In the joined configuration, a terminal rule accounts for the entire local span. A split configuration accounts for its pieces with terminal rules and includes the branching structure that connects them. A branch that preserves order and one that changes order contribute different rule choices. The scoring compares full compatible local configurations, so the weight of a split depends on more than the plausibility of either leaf by itself.
The conditional calculation for that comparison can be expressed in terms of the probabilities already defined.
p(c ∣ B) = w(c; B) / ∑ᵤ w(u; B)
B denotes the surrounding structure and counts held fixed for the update. c is a particular legal local configuration, and u ranges over the configurations permitted at the position being sampled. w(c; B) is its unnormalized conditional weight. The sum ∑ᵤ adds the weights of all competing configurations so that the slash gives a normalized probability. The weight for each configuration uses the applicable rule choices conditional on the fixed counts and on any other choices made within that configuration.
In evaluating such a replacement, the old local rules cannot contribute evidence as if they were still in the tree regardless of the outcome. The calculation starts from the counts outside the replacement, considers the factors needed to add the candidate, and returns the selected rules to the count state. When several rule occurrences are involved, the collapsed probabilities reflect their joint contribution. This matters, for example, if a candidate uses a rule more than once. The first occurrence can affect the predictive weight of a subsequent one.
The revised configuration is sampled according to its weight. Keeping an existing boundary can be a valid outcome, and so can choosing a lower-weight alternative. A statistical sampler needs that variability because it is meant to explore a distribution over analyses. Choosing the highest-weight change at every visit would serve a different purpose, namely improving the current analysis locally.
Editing the tree above its phrases
Split/Join can theoretically reach a different tree by joining phrases until the structure flattens into a single terminal pair and then building a new structure from that pair. That route is likely to pass through implausible analyses. A tree may have useful, well-supported phrase boundaries that would all have to disappear before its grouping could change. If a sampler rarely makes the intermediate joins, the ability to reach the desired tree in principle has little practical value.
The Insert/Delete operation gives it a shorter route. Within an allowed branching configuration, the operation can take adjacent nodes and put them under a new common parent. It can also remove such a parent and bring its children back up a level. The figure gives the example of grouping a pair of children within a ternary branch under a binary node, with the reverse edit restoring the ternary branch. The edit can preserve the terminal spans while changing the internal grouping. Its probabilities use the same collapsed rule choices as the boundary operation.
Ternary branching is a computational decision as well as a grammatical one. It gives the sampler room to remove a node by replacing the surrounding structure with another legal local configuration. A binary-only grammar would require a broader change when removing that node, since the exposed children would have to be reorganized immediately. The authors observe that ternary branching would make a dynamic programming approach less attractive. Their local sampler can use it to make structural movement easier. Thus the representation is chosen partly for the edits it makes possible.
The two operations address different obstacles to mixing, the process by which a sampling chain moves around the distribution it targets. Boundary edits can uncover a better set of leaves. Structural edits can change the route by which their groupings are reached, including which leaves can later be considered together. The paper explains why the combination should help practical exploration. It gives no time bound for how quickly the sampler explores all consequential alternatives in a real corpus.
Learning the concentrations and dividing the work
The rule-type choice, branch expansions, phrase-pair inventory, monolingual phrase distributions and empty-side inventory each have parameters governing their concentration. The authors infer these concentrations as part of training. They give each one a broad Gamma prior and periodically propose replacing its current value.
αˣ ∼ Gamma(10⁻⁴, 10⁴)
αˣ is a generic concentration parameter, with x indexing the family of choices it governs. Gamma is the prior distribution for the positive parameter. Its two arguments are the values reported for that prior, and the tilde denotes the draw. The authors use this broad prior to allow a wide range of concentrations.
A proposal is drawn from a log-normal distribution with mean given by the current concentration and variance 0.3, in the paper’s description. A Metropolis–Hastings step determines whether to accept it. The procedure evaluates the proposed concentration in light of the current derivations and the other concentrations.
p(αˣ ∣ d, α₋ₓ)
p denotes the conditional distribution targeted by this update, αˣ is the concentration being changed, d here stands for the collection of current derivations, and α₋ₓ denotes the remaining concentrations. The bar means that the trees and the other parameters are treated as given during this update. A log-normal proposal keeps the candidate value positive, while the acceptance step accounts for the conditional distribution it is meant to explore.
The authors adopt this general approach to inferring concentrations from earlier work on unsupervised part-of-speech tagging. Evaluating a proposed concentration is costly because it requires information across the corpus, and the paper’s parallel scheme for resampling trees does not distribute that calculation. The small-corpus procedure updates concentrations after each pass. For the larger experiments the reported interval is every 20 passes through the corpus.
Parallelizing the tree updates creates a different complication. The collapsed counts link the training items. A change to one sentence pair can affect the probability of a choice at another pair. If a sequential sampler has just added a rule, the next update can immediately take account of that use. Splitting the corpus among workers permits concurrent updates, but then workers need a way to learn about changes occurring elsewhere.
The approximation gives each worker a disjoint subset of sentence pairs and a copy of counts for the whole corpus. It updates its assigned subset using those counts, including changes it makes locally. After a pass over that subset, workers communicate their changes. During the pass, an update has current information about its worker’s own changes and delayed information about changes from the others. Increasing the amount of local work between communications therefore changes the conditionals being used. The authors assess this approximation empirically against the sequential sampler.
Going from sampled trees to a translation system
The tree state needs an initializer. The authors start from GIZA++ IBM Model 4 word alignments and factor those alignments into synchronous trees using the algorithm they attribute to Zhang and colleagues. Some nodes in the resulting trees mix words with child categories or have too many children. The initializer discards alignment points where necessary to make those nodes factor into the grammar used by the sampler. The authors describe the resulting trees as poor quality because the original alignments contain many structures that cannot be represented directly.
These word alignments are a starting state. As the local operators change the trees, an alignment point used in initialization has no special status as a constraint. Equally, a phrase correspondence omitted when making a legal initial tree can be introduced if it becomes part of a legal update. This is the sense in which phrase and grammar induction proceed from paired sentences even though the reported runs begin with word alignment. Initialization can still influence a finite run, which is why the authors allow a substantial burn-in period before using samples.
For decoding, the authors take another intermediate step. A sampled tree gives a hierarchical alignment. They apply the standard extraction procedures for Moses and Hiero to that alignment and combine output from a sequence of sampled trees. For Moses the resulting object is a phrase table. For Hiero it is a set of hierarchical rules whose variables can stand for translated portions of a sentence. This lets the experiments study how the learned alignments affect established decoders. The authors judge the induced grammar’s own treatment of reordering too simple to make direct decoding an effective choice for their evaluation.
Experiments and results
The comparison and how it was scored
The evaluation asks whether changing the training alignments improves translation with Moses or Hiero. The heuristic condition starts from GIZA++ IBM Model 4 and uses the corresponding conventional extraction procedure, phrase extraction for Moses and synchronous rule extraction for Hiero. The Bayesian SCFG condition extracts the same kind of decoder resources from the sampler’s alignments. Comparing conditions within a decoder therefore holds the kind of decoder fixed. The learning pipeline that supplies its phrases or rules changes.
Training runs use a burn-in of 1000 full passes over the data. Burn-in is the portion of the sampling run during which the chain can move away from its initial state before samples contribute to the reported translation resources. The authors then use every 50th sample through the 1500th sample to build an expectation over phrase tables or Hiero grammars. The translation scores are consequently based on the extraction and combination procedure applied across retained trees. The illustrative alignments in the paper serve a different purpose and depict particular analyses.
The reported metric is IBM BLEU, which evaluates output by comparing its word sequences with those in reference translations. The paper uses it to evaluate translation output, so a change in BLEU measures a downstream change in the tested decoder. A BLEU result alone cannot identify which links became better or which phrase pairs account for the difference. The authors use examples and observations about the extracted inventory to investigate those questions separately. BLEU: a Method for Automatic Evaluation of Machine Translation.
Small-corpus Chinese-to-English translation
The small experiment uses the IWSLT corpus of transcribed utterances, with 40k training sentence pairs. The corpus table reports 380k English words and 340k Chinese segments. It gives average sentence lengths of 9 on the English side and 8 on the Chinese side, with longest sentences of 75 and 64, respectively. Thus the corpus is small by the paper’s standards while still containing sentences much longer than its average. The sampler for this experiment runs on a single CPU.
The IWSLT setting combines sparse counts with substantial reordering. The authors characterize the GIZA++ alignments here as poor. On Test 05, Moses scores 47.3 BLEU with heuristic training and 49.6 with Bayesian SCFG training. Hiero scores 48.3 with heuristic training and 51.8 with Bayesian SCFG training. Each decoder improves with the sampled alignments, and Hiero with the grammar-based training is the highest-scoring system in this comparison.
Moses and Hiero on IWSLT Chinese-to-English Test 05 BLEU
Training from sampled synchronous trees improves both decoders, with Hiero scoring highest.
The numbers
| System or setting | BLEU |
|---|---|
| Moses with heuristic alignment | 47.3 |
| Moses with Bayes SCFG | 49.6 |
| Hiero with heuristic alignment | 48.3 |
| Hiero with Bayes SCFG (this paper) | 51.8 |
The IWSLT comparison is especially informative because the promising downstream scores come with a visible change in the decoder resources. The grammar-based alignments yield considerably more extracted rules. The projected alignments also contain more alignment points, according to the authors. That combination suggests that the increase in available rules cannot be explained simply by leaving more tokens unaligned. The arrangement of the additional links must be considered alongside their number.
Larger Chinese-to-English and Arabic-to-English tests
The larger Chinese-to-English training set combines FBIS, identified as LDC2003E14, with the first 100k sentences from Sinorama, LDC2005E47. The paper describes the larger experiment as containing millions of words and long sentences. Chinese is segmented using a conditional-random-field segmenter optimized for translation. That preprocessing sets the token boundaries the sampler works with, while the sampler determines which adjacent tokens belong together in a terminal phrase. Optimizing Chinese Word Segmentation for Machine Translation Performance.
To train their Arabic-to-English system, the authors use four datasets: the Ummah corpus (LDC2004T18), eTIRR (LDC2004E72), an Arabic news corpus (LDC2004T17), and a high-confidence portion of the ISI parallel corpus (LDC2006T02) that was automatically extracted from the web. In the last component the confidence score c must exceed 0.995. The Arabic input receives the D₂ preprocessing described by Habash and Sadat. The paper says that scheme had been identified as suitable for corpora of this size. Arabic Preprocessing Schemes for Statistical Machine Translation.
The NIST translation systems are tuned to maximize BLEU on MT02 using Och’s tuning algorithm. The results are then reported on MT03, MT04 and MT05. In these experiments, the distributed sampler runs on one machine with eight cores to perform Bayesian training. The authors report roughly one day to produce the 1.5K samples for each experiment. That timing describes the reported computing setup and sampling schedule.
On NIST Chinese-to-English MT03, Moses moves from 26.2 with heuristic training to 26.4 with Bayesian SCFG training. Hiero moves from 26.4 to 26.7. On MT04, Moses scores 30.0 and 30.2 in the corresponding conditions, and Hiero scores 30.8 and 30.9. On MT05, the Moses scores are 25.3 and 25.8, while the Hiero scores are 25.4 and 26.0. The change favors the Bayesian SCFG condition within each decoder across the reported Chinese test sets. The IWSLT comparison shows larger gains than the NIST Chinese comparisons.
Moses and Hiero on NIST Chinese-to-English MT05 BLEU
Sampled alignments raise the score of each decoder, and the Bayesian SCFG condition for Hiero ranks highest.
The numbers
| System or setting | BLEU |
|---|---|
| Moses with heuristic alignment | 25.3 |
| Moses with Bayes SCFG | 25.8 |
| Hiero with heuristic alignment | 25.4 |
| Hiero with Bayes SCFG (this paper) | 26.0 |
On NIST Arabic-to-English MT03, the two Moses conditions both score 48.5, while Hiero moves from 48.1 with heuristic training to 48.4 with Bayesian SCFG training. On MT04, Moses moves from 43.9 to 43.5, while Hiero moves from 43.5 to 43.4. On MT05, Moses moves from 49.2 to 48.7, and Hiero moves from 48.4 to 47.7. The favorable result for Hiero on MT03 coexists with declines for both decoders on the other reported Arabic sets.
Moses and Hiero on NIST Arabic-to-English MT05 BLEU
Heuristic training leads within each decoder, with heuristic Moses scoring highest.
The numbers
| System or setting | BLEU |
|---|---|
| Moses with heuristic alignment (this paper) | 49.2 |
| Moses with Bayes SCFG | 48.7 |
| Hiero with heuristic alignment | 48.4 |
| Hiero with Bayes SCFG | 47.7 |
The language comparison was part of the authors’ motivation for choosing these experiments. They expected the grammar to help more on Chinese and English because those sentences often require substantial changes of order. They describe Arabic and English as more nearly monotone, meaning that corresponding material tends to appear in the same relative order. The word-based alignment and its diagonal growing heuristic favor links near that arrangement. The reported scores are consistent with the expectation, though the language pairs also come from different corpora and receive different preprocessing. The comparison gives evidence about the tested conditions, with more than reordering varying between them.
What the ablations show
The paper has no component-removal ablation. It offers a within-decoder comparison of the complete training pipelines, a controlled comparison of sequential and distributed sampling, and analyses of what the projected alignments yield during rule extraction.
What changes when the training alignment changes
The within-decoder comparison keeps the decoder family and its associated type of extraction in place. In Chinese-to-English translation, the gains occur for Moses as well as Hiero. This matters because Moses consumes phrase pairs, while Hiero consumes rules that can place variables between pieces of text. The favorable Chinese results are therefore visible through both downstream representations. The hierarchical structure of the training alignment can affect which contiguous phrase pairs are accepted by an extractor, even when the decoder later uses a flat phrase table.
The comparison tests the contribution of the training procedure as a whole. It includes the tree restrictions, the priors, the local sampling process and the way the extracted resources are combined across samples. The study provides no run in which the Poisson length preference is independently replaced, the shared monolingual phrase distributions are removed, or Insert/Delete is disabled. The reported translation gains do not assign a separate effect to any of those decisions.
The Arabic outcomes help define the scope of the comparison. The sampled trees can produce an alignment that is more compatible with the grammar’s grouping assumptions without improving the phrases or rules most useful to the final metric. When much of the correspondence can be captured by reasonably monotone word alignment, the authors argue that the heuristic pipeline is a stronger fit. The Arabic figures show that the new training procedure can lose ground even though the same kind of hierarchical reasoning improves the reported Chinese conditions.
Why more links can yield more admissible phrases
The extraction analysis addresses a concrete explanation for the IWSLT results. Ordinarily, a sparse alignment could yield many consistent phrase pairs simply because few links cross their proposed boundaries. If the grammar-based condition produced more rules by leaving more words unattached, its larger inventory would be compatible with that explanation. The authors report the opposite pattern in the link counts. The projected grammar-based derivations contain more links while still allowing considerably more rules to be extracted.
Their explanation is local consistency. The grammar tends to group correspondences into spans, with fewer off-diagonal links that disrupt those spans. Here an off-diagonal link is relevant because its position can tie an otherwise coherent phrase to a distant word outside the candidate translation. A legitimate change of word order can also appear off the diagonal. The distinction is whether the order change participates in a coherent grouping, or whether an isolated link crosses boundaries that could otherwise support a useful pair.
The paper illustrates the difference with a NIST Chinese headline from the thousandth sample. Its figure places the heuristic alignment beside the alignment projected from the synchronous tree and marks the spans of multiword constituents on the tree side. The example shows how hierarchical grouping can avoid outlying links that impede extraction. The authors also identify residual errors. In the projected tree, the English words of and an should be left unaligned, and the Chinese item 是 has no overt counterpart for its copular meaning in the English sentence. The example consequently illustrates both the effect of the grammar’s grouping and the continued difficulty of handling words that lack straightforward counterparts.
The authors suggest that grouping links into coherent spans could help translation systems that use richer syntactic structure, since inconsistent alignments can obstruct extraction for those systems as well. The reported experiment mainly supports the narrower claim that the learned alignments produce more usable extraction opportunities in their comparisons. The syntactic suggestion follows from the shape of the alignment example and the behavior they observe in extraction.
What parallel sampling preserves in the comparison
To test the distributed approximation, the authors compare sequential sampling on a single CPU with distributed sampling on an eight-core machine. Each condition has five independent runs. The plot reports the mean of the posterior statistic and its standard error over the course of training. Both conditions resample concentrations every twenty passes over the corpus, keeping that schedule fixed while changing how the trees are updated.
The curves track each other closely on the plotted quantity. This supports using delayed count updates in the larger experiments: the approximation follows much the same trajectory on this corpus-level statistic, through the period shown. The comparison is more informative than using the distributed implementation alone and then assuming its behavior matches the sequential one. It directly examines the consequence of a change to the way updates receive corpus evidence.
The plotted probability is a summary of the state, so agreement leaves open whether individual rules and alignments occur at the same rates in both conditions. Two runs can explain the corpus to much the same degree while allocating probability to different trees. Likewise, the similar curves give no numerical estimate of parallel speedup. The plot concerns fidelity on the reported training statistic, and the translation tables separately show the downstream performance achieved with distributed training.
Limitations
Limits the authors state
The grammar has a deliberately narrow form. Its terminal rules emit contiguous strings, and its structural rules expand to binary or ternary branches. The rules cannot combine fixed lexical material with expandable children in a single production. The experiments use one recurring nonterminal, and the authors defer grammars with multiple nonterminal categories. Accordingly, the successful use of a grammar in these experiments concerns segmentation and hierarchical reordering under that rule form. The experiments offer no induced inventory of differentiated syntactic categories to inspect.
The authors also describe the induced grammar as too weak in its treatment of reordering for effective use as a direct decoder. This is why the evaluation extracts phrases and hierarchical rules for Moses and Hiero. Their longer-term proposal is to induce grammars that match the needs of stronger decoders more directly, including Hiero or the tree substitution grammars discussed in the paper. The reported work therefore advances induction of training alignments through a synchronous grammar. A decoder built to use the induced grammar directly remains a separate undertaking.
The sampling method addresses an expensive operation by working locally. The authors explicitly note that paths available through boundary edits alone can require improbable intermediate trees. Insert/Delete helps the chain move among alternative groupings without flattening first. This makes the procedure more practical, while leaving the general issue of mixing dependent on the probability landscape and the particular sentence pair. Burn-in is intended to reduce the influence of poor initial trees. Its role is to give the sampler time to move, with the available empirical checks providing evidence about the run.
Finally, the parallel implementation deliberately uses counts that can be out of date. The authors describe it as an approximation and assess it against sequential updates. The similar curves justify confidence for the comparison they ran. Exact collapsed sampling has access to each preceding update, while the distributed implementation shares updates after local passes. This difference is part of the method as tested on the larger corpora.
Limits visible from the experimental design
The use of GIZA++ at initialization makes the scope of direct learning precise. Word links are used to construct a starting tree, and they cease to act as fixed eligibility conditions once sampling begins. The paper does not compare that initialization with a non-alignment initializer. The long burn-in and the changes visible in the learned alignments support the view that the chain moves substantially, while leaving the sensitivity of the reported translation scores to initialization unmeasured.
Standard extraction heuristics also remain in the pipeline after training. The distinction is between using word alignment heuristics to determine the phrase candidates in advance and using an extractor on alignments inferred from the sampled trees. Both Moses and Hiero still receive their resources through extraction. The improved Chinese scores establish the value of the changed training procedure within those decoder pipelines. They do not measure the quality of an end-to-end translator that uses only the induced synchronous grammar.
The analysis of alignment quality is narrower than the analysis of downstream scores. The authors discuss the number and local consistency of links, and show an example with both improvements and residual errors. A systematic comparison against an annotated reference alignment is unreported. As a consequence, the article can establish what the inspection and extraction behavior show while leaving the accuracy of individual links across the corpus open. A structure can suit an extractor even if some of its links would be judged incorrect in a manual annotation.
The proposed explanation based on reordering also has the usual limits of a comparison between language pairs. Chinese and Arabic differ in the tendencies the authors describe, but the experiments do not vary only that property. Training data, segmentation and preprocessing change as well. The pattern across the Chinese and Arabic test sets agrees with the reordering hypothesis. A controlled comparison holding the other differences fixed would be needed to isolate reordering as the cause of the score pattern.
The paper reports BLEU point estimates for translation. Its displayed uncertainty concerns the posterior curves in the sampling comparison. The reported NIST Chinese gains all go in the same direction, but their size should be read as the measured result for each test and decoder. The translation tables do not give a significance test or show how much the scores fluctuate with another training run. The greater improvement on IWSLT also cannot be attributed to corpus size alone, since the corpus differs from the NIST data in other respects.
The scalability evidence has a similarly specific scope. A run on a larger corpus with long sentences demonstrates that the sampler can train under that setup. Avoiding a derivation forest removes a clear computational obstacle, and keeping only current trees and active rule counts avoids enumerating an unbounded phrase inventory. There is still substantial work in repeated passes and in hyper-parameter inference. The reported training time gives a practical reference for the experiment. The study does not map how the runtime or the quality of posterior exploration changes as corpus size, sentence lengths or the number of workers vary.
What came after
The later citations reach into two problems adjacent to the paper’s treatment of bilingual correspondence. One concerns deciphering a foreign language. The other concerns improving word links in a low-resource setting by drawing on linguistic information from English. The citation record establishes those connections in subject matter. It does not specify whether either work adopted the synchronous grammar, its hierarchical prior or either of its local sampling operations.
Deciphering a foreign language
The 2011 work studies foreign-language decipherment. Its subject places it near the induction paper’s question of how a learner can use evidence to infer correspondences that are initially hidden. In the induction experiments, an observed sentence pairing anchors that search. The sampler asks how the two fixed strings can be divided and arranged into shared constituents. A citation from work on decipherment connects that question to a different research problem. The citation does not establish that the decipherment procedure starts from the same observations or incorporates the same tree representation. Deciphering Foreign Language.
The useful distinction is between the general problem and the particular solution. Recovering unknown associations is common to the subjects of the two papers. The local split and join operation is specific to an inference state in which a source boundary and a compatible target span are already identifiable within a current tree. A claim that later work reused that operation would require evidence about how the later inference state is represented and what its updates can change.
Adding English semantic roles to word alignment
The 2016 work uses English monolingual semantic role labeling in work aimed at improving word alignment for low-resource languages. Semantic roles describe how constituents participate in the situation expressed by a predicate. The stated direction is to bring information available on the English side to bear on the narrower task of recovering word links. In the Gibbs sampler paper, the added structure instead comes from a tree that spans both sentences, and the tree is evaluated partly through what phrase and grammar extractors can recover from its links. Improving Word Alignment for Low Resource Languages.
The two works therefore meet at the question of what information can improve an uncertain bilingual alignment. The grammar paper supplies structure through joint span choices, shared branches and reuse across the corpus. The later work’s stated focus is English-side semantic roles. Its citation establishes a relationship to the alignment literature that includes the grammar paper. The available account leaves the precise use of that earlier paper’s ideas unspecified.
Cite
Cite as Phil Blunsom, Trevor Cohn, Chris Dyer and Miles Osborne. 2009. A Gibbs Sampler for Phrasal Synchronous Grammar Induction. Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP.
@inproceedings{blunsom2009gibbs,
title = {{A Gibbs Sampler for Phrasal Synchronous Grammar Induction}},
author = {Phil Blunsom, Trevor Cohn, Chris Dyer and Miles Osborne},
booktitle = {Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP},
year = {2009},
doi = {10.3115/1690219.1690256},
url = {https://doi.org/10.3115/1690219.1690256}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/blunsom-2009-gibbs-sampler-phrasal-synchronous-grammar/