Elamur Research

Efficient Minimum Error Rate Training and Minimum Bayes-Risk Decoding for Translation Hypergraphs and Lattices

Paper · 2009 · Shankar Kumar, Wolfgang Macherey, Chris Dyer et al.

Summary

A translation system can have many plausible answers for the same sentence. Its usual decision is to return the answer with the highest score, but that score and the measure used to judge the translation serve different purposes. The highest-scoring answer may agree less well with a human reference than another answer the system already considered. This paper addresses two parts of that problem in statistical machine translation. Minimum error rate training, or MERT, adjusts the weights used to rank translations so that the system does better against references on development data. Minimum Bayes-risk decoding, or MBR, chooses an answer by weighing how well it agrees with other plausible translations and how much probability those alternatives carry.

Both procedures originally worked with ranked lists of complete translations. A list records only the answers that made its cutoff. A lattice can represent many more by sharing parts of paths, and a hypergraph can also share the pieces of branching grammatical derivations. The authors show how to search along a direction in weight space using the upper envelope of translation scores, which is the set of score segments that can win somewhere along that direction. The envelope can be built from the pieces of a hypergraph without listing all its translations. For MBR, they give a faster way to estimate the probability that a word sequence occurs somewhere in a plausible translation. That estimate supplies a gain function based on a linear approximation to the BLEU score. The authors also use MERT to tune the weights of this approximation, with an optional feature that lets the original translation score influence the decision.

The hypergraph MERT implementation has runtimes broadly similar to the earlier implementation specialized for phrase lattices. On phrase lattices, the new MBR procedure gives approximately the same BLEU as the earlier finite-state procedure, with a reported 20X speedup. On hypergraphs from hierarchical and syntax-augmented translation systems, it gives comparable or better BLEU than MBR on 1000-best lists, with a reported 7X speedup. When the authors tune MBR on the multilingual task and include the original decoder score, the test comparison with ordinary highest-score decoding records gains on 26 language pairs, no change on 8, and drops on 5, under the paper’s BLEU thresholds. The tuning gains are less consistent on the NIST systems. The experiments therefore distinguish two outcomes: making risk-based decoding cheaper worked across the tested representations, while the value of learning its gain weights varied with the translation task.

Deep dive: Efficient Minimum Error Rate Training and Minimum Bayes-Risk Decoding for Translation Hypergraphs and Lattices

How minimum error rate training and minimum Bayes-risk decoding use translation lattices and hypergraphs to tune scores and choose translations. · about 40 minutes to read

The problem and its context

The score used to search and the score used to judge

A statistical translation system has to choose an output before it can see a human reference for the sentence. It can score its choices using information available at that point, giving different weights to different features of the candidate and the source. An evaluation measure asks another question. Once references are available, it can compare the submitted translation against them. The paper’s starting point is that fitting a system by likelihood and selecting its most probable translation give no direct guarantee of doing well under the measure used for evaluation. The ranking may be useful while still leaving room for a different training objective or a different final decision.

Training and decoding give the authors different opportunities to use that measure. During training, references are available for a collection of source sentences. Changing the weights changes which candidates win, and the new winners can be evaluated as a group. At decoding time, the references are unavailable. The system instead has a probability distribution over plausible translations, and it can ask how costly each possible choice would be if another translation in that distribution were treated as the reference. The probabilities determine how much each comparison counts. The preferred answer can be one that agrees with several plausible alternatives even when another individual alternative has the highest probability.

MERT and MBR thus act at different points in the procedure. MERT needs reference translations to assess the effect of a weight change. MBR needs probabilities for translation alternatives and a rule for measuring disagreement or agreement between them. Bringing those methods together does not make those inputs interchangeable. In the paper’s tuning procedure, actual references judge the development outputs selected by MBR. At test time, MBR uses the alternative translations in the search space to score a candidate, and references enter only when its output is evaluated.

Why a ranked list left room for improvement

The earlier MERT work described in the paper optimized weights using an N-best list, a ranked collection of complete candidates. For a fixed collection, moving the weights can change which candidate comes first. A large change can make an answer desirable that had little chance of appearing near the top under the weights that produced the list. The line search can discover a new winner only if the candidate space already contains it. Keeping more alternatives lets the optimization inspect more of the consequences of changing the weights.

The earlier Minimum Bayes-Risk Decoding for Statistical Machine Translation likewise used complete lists. The advantage of a list is that each candidate is immediately available for a sentence-level comparison with the other entries. The method can use a loss based on sentence BLEU, word errors, or a measure that disregards word position. The price is that the list limits both roles in the calculation. It limits the candidate outputs the decoder can select, and it limits the alternative translations that can supply evidence about the quality of those outputs.

A phrase-based decoder can retain its alternatives in a lattice. A path through this graph represents a complete translation, and paths can share edges. Consequently, the decoder can retain many more candidates than it would ordinarily write out as complete sentences. The earlier Lattice-based Minimum Error Rate Training showed how to find the weight values where the preferred path changes. The earlier Lattice Minimum Bayes-Risk Decoding made risk-based selection possible over lattices by replacing a direct sentence loss with an approximation that can be attached to pieces of a path.

The approximation was important because storing a large number of alternatives compactly does not by itself make arbitrary comparisons between complete translations cheap. The earlier lattice procedure reduces the comparison to candidate length and matches of contiguous word sequences. It still has to obtain the posterior probability of each sequence and attach the corresponding gain to the lattice. Its finite-state implementation processes the sequences individually. The paper identifies that repeated work as a cost that grows with the inventory of distinct sequences in the lattice.

Why a forest changes the computation

The paper also considers systems built with a synchronous context-free grammar. In this setting, rules describe related pieces of the source and target, with places where smaller rule applications can be substituted. The paper places hierarchical phrase-based translation and Syntax Augmented Machine Translation via Chart Parsing in this family. It also points to Forest-Based Translation in describing the use of packed structures for translation. A packed forest, represented as a directed hypergraph, can store alternative grammatical derivations while sharing the partial derivations they have in common.

The difference between a lattice and a forest matters to both algorithms. On a lattice, a partial path can be extended by following an edge. In a forest, a rule may need several partial translations at once. Changing the training weights can affect the preferred translation in any of those parts, so the line search must track what happens when they are combined. For decoding, the target words supplied by the rule and the words supplied by different children can become adjacent. A word sequence may appear for the first time where those pieces meet. The procedure needs enough information about their boundaries to recognize it.

The paper describes an earlier risk-inspired approach to hypergraph rescoring that used the expected number of synchronous constituents in a translation. Its own objective is different. It uses agreement on target word sequences to approximate the contribution to corpus BLEU, and then uses that score to select a translation from the hypergraph. This gives the lattice and hypergraph versions a common decision criterion even though they have different work to do to find the relevant sequences. Bleu: a Method for Automatic Evaluation of Machine Translation

The method, step by step

What the graph stores

Begin with an input sentence and the translation alternatives generated for it. A node in a forest can be reached by alternative rule applications. Each application specifies the partial translations it needs and how those pieces are arranged on the target side. A rule with no children produces a piece directly. A rule with children uses translations that have already been derived at those children. A complete choice of rules reaching the root constitutes a derivation and yields a complete output string. The forest can keep a partial derivation available for many such complete choices without copying it into each one.

H = ⟨V, ℰ⟩, ℰ ⊆ V* × V

Here H is the directed hypergraph, V is its vertex set, and ℰ is its hyperedge set. V* means all finite ordered sequences drawn from V, including the empty sequence. The Cartesian product × pairs a sequence of tail vertices with a head vertex, and ⊆ means the hyperedge set is a subset of those possible pairs. The angle brackets group the vertex set and edge set into the structure H.

The paper writes h(e) for the head of hyperedge e and T(e) for its tail sequence. The arity |e| is the number of tails. A head supplied by an edge without any tails is a source vertex. The arity of the graph is the largest edge arity. An edge with just one tail is structurally equivalent to an ordinary edge, so a hypergraph with arity 1 is a regular graph, of which a translation lattice is one example. In a grammar-derived hypergraph, the edge label is a rule. Its tail positions correspond to the nonterminals that must be filled by other derivations.

rₑ: X → w₁ X₁ w₂ … wₙ Xₙ wₙ₊₁

In this rule, rₑ is the label of edge e, and X is the nonterminal expanded by the rule. The arrow reads as an expansion. X₁ through Xₙ are the n nonterminal positions filled by the translations from the corresponding tails. The w terms are fixed target-side word strings contributed by the rule around those positions. The ellipsis indicates repetition of the pattern, and n+1 indexes the final string after the last nonterminal. These w terms denote pieces of a rule. In the decoding formulas below, a standalone w denotes an n-gram being scored.

The paper illustrates substitution with the target pattern a X₁ b X₂ c. The two children fill the positions between the fixed material. To calculate the output of the rule, the decoder needs both child strings. To calculate the score of the resulting derivation, it combines their contributions with the one attached to the rule. This distinction between substitution and scoring matters throughout the method. The algorithms can do arithmetic on the scores, but they have to retain enough information about which rules supplied them to recover the actual output.

MERT evaluates the translations that the decoder would choose at different weights. It does so with a set of source sentences and human references. For a given choice of weights, the decoder picks the best-scoring candidate for each source sentence. The training criterion evaluates those decisions against the references. The paper expresses the objective using errors associated with the selected translations. In a BLEU search the corpus evaluation concerns the collection of choices, with the selected translations supplying the statistics used to score it.

λ̂ = arg min over λ [∑ from s = 1 to S Err(Rₛ, Ê(Fₛ; λ))]

Here λ is the vector of feature weights and λ̂ is the vector sought by training. s indexes the S source sentences, Fₛ is source sentence s, and Rₛ denotes its corresponding references. Ê(Fₛ; λ) is the translation chosen at those weights, and Err denotes the error contribution under the evaluation criterion as written in the paper. The summation collects contributions across the training sentences. arg min returns weights that minimize the objective.

The decoder’s decision uses the weighted sum of its features. The training criterion enters after that decision has been made. This ordering is what allows the line-search algorithm to identify possible winners without evaluating BLEU on every candidate in the graph. Finding the best score under a proposed set of weights and judging the outputs selected by those weights are separate calculations.

Ê(F; λ) = arg max over E ∈ C [∑ from m = 1 to M λₘ hₘ(E, F)]

Here F is a source sentence, C is its available candidate set, and E denotes a candidate translation scored through its derivation. M is the number of features. For feature index m, hₘ(E, F) is its value and λₘ is its weight. The sum gives the total score, and arg max returns a candidate achieving the greatest score. The notation ∈ means the candidate is in C. In this formula hₘ names a feature, distinct from the use of h(e) for the head of an edge.

Rather than move all weights independently in a single search, MERT starts at a current vector and chooses a direction. A scalar tells it how far to move along the direction. For each candidate, the score at the starting weights is fixed. So is the rate at which its score changes as the scalar varies. The starting value becomes the intercept of a line, and the rate of change becomes its slope.

λ′ = λ + γd

Here λ′ is the weight vector being tested, λ is the starting vector, d is the chosen direction, and γ is the signed step along it. The product γd scales every component of d by the same scalar before the result is added to λ.

a(E, F) = ∑ from m = 1 to M λₘ hₘ(E, F)

The intercept a(E, F) is the score of candidate E for source F at the starting vector. The sum runs over the M feature indices m, pairing the starting weight λₘ with the feature value hₘ(E, F).

b(E, F) = ∑ from m = 1 to M dₘ hₘ(E, F)

The slope b(E, F) measures the change in score per unit of movement along the direction. dₘ is the component of d for feature m, and the remaining terms have the same meanings as in the intercept. A candidate’s slope depends on the direction chosen for this search.

Ê(F; γ) = arg max over E ∈ C [a(E, F) + γb(E, F)]

Here Ê(F; γ) is the winning translation for source F at step γ, with the starting weights and direction held fixed. C contains the competing candidates E. Their intercepts a(E, F) and slopes b(E, F) determine the scores compared by arg max.

Imagine looking at these lines from above. Only the top portion at any particular value of γ affects the decoder. The sequence of visible portions is the upper envelope. Candidate switches occur at the boundaries between its segments. Within an interval where the winning derivation stays the same, changing its numerical score has no effect on the translation submitted for evaluation. The paper uses this fact to turn the weight search into a search over changes in output. It obtains an error surface along the direction from the winners of the envelopes, without smoothing that surface, and selects the step γ̂ where the aggregate error is minimized. The updated weights are obtained by substituting γ̂ for γ in the weight update.

How the envelope is built without listing translations

The new part of the MERT procedure is how the envelope is computed when an edge can depend on several children. The authors explain it by converting the hypergraph into an ordinary graph with two kinds of operation. Each original vertex becomes a place where alternatives compete, marked ∨. An edge with multiple tails gets a new intermediate vertex, marked ∧, where the contributions of its children are joined. The intermediate vertex connects the same children to the same head as the original rule. The rule belongs to its outgoing edge. The added connections into it carry the children’s contributions.

Minimum error rate training on a translation hypergraph

The steps in order.

Minimum error rate training on a translation hypergraphStep 1: Choose a direction for changing the weights1. Choose a direction for changing the weightsStep 2: Visit vertices from sources to root2. Visit vertices from sources to rootStep 3: Add child envelopes for each rule3. Add child envelopes for each ruleStep 4: Apply the rule to the surviving derivations4. Apply the rule to the surviving derivationsStep 5: Keep the upper envelope across alternative rules5. Keep the upper envelope across alternative rulesStep 6: Evaluate output changes against the references6. Evaluate output changes against the referencesStep 7: Update the weights at the best step7. Update the weights at the best step

The operations follow from what a child envelope represents. Fix γ and fix a rule. The best score for applying that rule is obtained by taking the best available score at each of its children and adding those scores to the rule contribution. A child derivation below its own envelope at this γ cannot improve the sum. This property saves the algorithm from building a cross-product of all the children’s derivations for MERT. It does have to track the points at which any child’s best derivation changes, because crossing such a point can change the rule’s best combined derivation as well.

The operation at the ∧ vertex is represented geometrically as a Minkowski sum. In terms of the score functions, it adds the child envelopes at each value of the step. Their breakpoints are already in order. The algorithm uses a priority queue with one current segment from each child, visiting the boundaries from left to right. When a child switches segments, its old slope and intercept cease to contribute to the sum and its new ones take their place. If several children switch at the same boundary, the algorithm incorporates those changes at the same position.

|Env(v∧(e))| ≤ ∑ over v ∈ T(e) |Env(v)|

Here v∧(e) is the intermediate join vertex for edge e, and T(e) is the sequence of its tails v. Env denotes the upper envelope at a vertex, and the vertical bars count its line segments. The inequality gives the paper’s bound on the size of the join envelope. The sum counts the segments in the child envelopes. A change in the sum can only occur where a child changes, so the number of segments at a join is bounded by the combined segment counts rather than by a product of them.

An envelope segment stores its left boundary, slope and intercept, along with information for recovering the partial derivation it represents. At a join, recovery information has to identify the selected derivation from each child. When the paper’s algorithm advances past a breakpoint, it updates the relevant child entry as well as the score. Applying the edge rule then supplies the derivation step that puts the children into their target-side positions. This is also why the hypergraph implementation carries a vector of backpointers where the lattice implementation could use a single backpointer.

The operation at an original vertex is a maximum. Its incoming edges represent different ways to derive that vertex, and only the uppermost score across those alternatives matters at a given step. The algorithm takes the union of the incoming envelopes and computes the upper hull. It sorts the candidate lines by slope. When lines have the same slope, the one with the lower intercept cannot exceed the other. The algorithm walks through the remaining lines in slope order while maintaining the left boundary of each surviving segment. If the next intersection leaves a stored line with no interval on which it is uppermost, that line is removed and the intersection is tested against the preceding survivor.

x = (y₂ − y₁) ÷ (m₁ − m₂)

Here x is the step value at the intersection of two lines of different slopes. The intercepts are y₁ and y₂, and the slopes are m₁ and m₂. The subscripts distinguish the lines. The numerator is the difference between their intercepts, and the denominator is the difference between their slopes in the opposite order. This intersection is the proposed left boundary for the new segment when it follows the old one on the upper hull.

The complete traversal follows topological order so an edge can use its child envelopes as soon as it is processed. For each head, the algorithm first constructs alternatives using the rules on its incoming edges and then takes their maximum. The envelope at the unique root describes the competition among the complete derivations. The paper also bounds its number of segments by the number of edges in the transformed graph. The bound concerns the envelope stored at the root. It does not require the number of distinct sentences obtainable from the grammar to be small.

From expected loss to a gain that can be scored on edges

MBR starts from a probability distribution over translations for a source sentence. Its general decision rule treats each possible translation as a hypothetical reference, measures the loss for the proposed output against it, and averages those losses with the probabilities as weights. Under this rule, the candidate that is most probable on its own can lose to one that disagrees less with the collection. The decision still comes from the available search space.

Ê = arg min over E′ ∈ G [∑ over E ∈ G L(E, E′) P(E | F)]

Here Ê is the chosen output, G is the available translation space, and E′ is the proposed output under evaluation. E is a hypothesis taking the role of a possible reference, and F is the source. L(E, E′) is the loss for choosing E′ when E plays that reference role. P(E | F) is the probability of E given F, with the vertical bar denoting conditioning. The sum averages the losses over the hypotheses in G, and arg min chooses an output with the least expected loss. The paper uses translation notation for E and also speaks of paths when describing graph computations.

For graph decoding, the paper follows the earlier lattice work in using a linear approximation to log BLEU. It assigns a weight to the output’s length and another weight to matches at each order of n-gram. An n-gram is a contiguous sequence of the specified number of words. The gain counts occurrences on the candidate side when the sequence is present on the hypothetical reference side. The presence test on the reference side matters: a reference contributes evidence that a sequence occurs, and repeated occurrences there do not add extra probability in that test.

Gain(E, E′) = θ₀ |E′| + ∑ over w [θ_|w| #w(E′) δw(E)]

Gain(E, E′) names the paper’s linear gain, with E acting as reference and E′ as candidate. |E′| is the candidate’s word length, and θ₀ is its coefficient. w ranges over relevant word sequences up to the maximum order, and |w| is the order of w. θ_|w| is the coefficient for that order. #w(E′) counts occurrences of w in the candidate. δw(E) indicates whether w occurs at all in the hypothetical reference. The summation adds the contributions of the sequences.

Averaging the gain over hypothetical references leaves the candidate length and candidate counts unchanged. Only the presence test depends on which reference is being considered. Its average is the posterior probability that a translation drawn from the search space contains the sequence. The decoder can compute this quantity once for a sequence and reuse it wherever that sequence contributes to the gain of an output candidate.

p(w | G) = ∑ over E ∈ G [𝟙w(E) P(E | F)]

Here p(w | G) is the posterior probability of occurrence of w in the translation space G for source F. The indicator 𝟙w(E) equals 1 if hypothesis E contains w and 0 otherwise. P(E | F) supplies the hypothesis probability used in the sum. The indicator has the same presence-test role as δw(E) in the gain.

Ê = arg max over E′ ∈ G [θ₀ |E′| + ∑ over w θ_|w| #w(E′) p(w | G)]

Here Ê is the output selected by the approximate MBR criterion. E′ ranges over the space G, θ₀ weights candidate length |E′|, and θ_|w| weights the contribution from the order of sequence w. The product combines the number of its occurrences in E′ with its posterior probability p(w | G). arg max chooses the greatest expected gain. With local contributions attached to edges, that final maximization is a best-path or best-derivation calculation.

Estimating occurrence probabilities on a lattice

The difficulty is obtaining the posterior in that last formula. An edge posterior measures the probability of traversing a particular edge. The desired n-gram posterior measures the probability of encountering a word sequence anywhere in a complete translation. If a sequence can be introduced at several places, simply adding the probabilities of the contributing edges may count a translation more than once. The earlier finite-state procedure, called FSAMBR in the paper, works with each n-gram separately. It extracts the sequence inventory, obtains the posteriors, uses weighted automaton operations to put the gains into a lattice, and extracts the best path.

The new procedure starts with a path-level view of occurrence. If responsibility for a sequence is assigned once on any path containing it, then the presence test for that path can be written as a sum over edges. The paper motivates the assignment using edge posteriors and the ordering of occurrences along a path. The exact calculation would still have to take account of which edges appear together on the complete path. In the faster procedure, a lattice-wide predecessor statistic takes the place of that path-specific information.

p(w | G) = ∑ over E ∈ G [P(E | F) ∑ over e ∈ E f(e, w, E)]

Here e ∈ E means that edge e is on the path for hypothesis E. f(e, w, E) is the path-dependent assignment introduced by the paper for sequence w. In the occurrence-probability identity, the inner sum must represent the presence indicator for that path. The outer sum weights those assignments by P(E | F), the probability of the path for source F, to obtain p(w | G).

The paper describes f using an edge that introduces w and whose posterior outranks predecessors along the path. Its displayed predecessor test uses a strict greater-than comparison. Read as a test for a new record among contributing edges, it can identify several successive records on one path. The claimed single-count interpretation requires the assignment to resolve those records to a single contribution. The implemented algorithm is clearer about what happens to successive records: it adds only the amount by which a new record exceeds the score already stored. That update is the operative rule for the faster estimate.

p̃(w | G) = ∑ over e ∈ ℰ [𝟙w∈e f*(e, w, G) P(e | G)]

Here p̃(w | G) distinguishes the local estimate from the occurrence probability it approximates. ℰ is the lattice edge set. 𝟙w∈e indicates that edge e introduces w, f*(e, w, G) is the local attribution based on predecessor information in the graph, and P(e | G) is the edge posterior in that graph. Once the attribution is treated as depending on the edge and the graph, marginalizing over paths that use the edge gives the edge posterior. The summation expresses the resulting edge-based calculation.

The lattice algorithm topologically sorts the nodes and computes backward probabilities. In its forward processing, it computes edge posteriors and identifies the word sequences introduced by each edge. A new sequence can overlap a boundary between the preceding partial path and the edge currently being considered. To find it, the procedure carries suffixes at nodes up to one order below the maximum being scored. Material from the new edge can extend those suffixes. Sequences fully introduced earlier already contribute through earlier processing.

For each tracked sequence and node, the algorithm maintains the highest posterior of an introducing edge seen on paths that reach that node. When it encounters a new occurrence, it compares the current edge posterior with the stored predecessor score. If the edge exceeds that score, the difference is added to the estimated occurrence posterior and the higher value is propagated. Otherwise the predecessor score is propagated. This preserves the distinction between a strong new occurrence and another occurrence for which the running score is already as high.

If pₑ > Score(w, t), update p̃(w | G) ← p̃(w | G) + pₑ − Score(w, t)

Here pₑ is the posterior of the current edge e, and t is its tail node. Score(w, t) is the predecessor value recorded for sequence w there. The symbol > is the update condition, and the left arrow assigns a new value to the estimate p̃(w | G) by adding the excess over the predecessor score. In the same case the head receives the higher score for w. When the condition fails, the algorithm carries forward the predecessor score and leaves the accumulated estimate unchanged for that update.

After this pass, the decoder uses the resulting posteriors in the expected-gain score. Each edge receives the contributions for length and the n-grams it introduces. The decoder then finds the path that maximizes their sum. The gain of a candidate counts its n-gram occurrences, while the posterior factor estimates the chance of finding at least one occurrence in a hypothetical reference. Keeping these roles separate explains why the algorithm tracks predecessor scores during estimation even though the final candidate gain can reward a repeated sequence.

Extending the decoder to branching rules

On a hypergraph, the corresponding procedure sorts the vertices, computes inside probabilities for the partial derivations and obtains hyperedge posteriors. It again propagates information about word sequences and the highest scores assigned to them. At a rule with several tails, a sequence can already be present in several children. When merging their stored scores, the algorithm keeps the largest for the shared sequence. It then applies the rule to identify sequences introduced by the new combination.

In a lattice, the next edge extends a partial path, so suffixes supply the boundary information used in the forward pass. In a forest, a partial string can acquire material on either side when a parent rule uses it. Both prefixes and suffixes are therefore retained, up to one order below the largest n-gram used in the gain. A sequence newly created by a rule can involve its fixed words, a child boundary, or boundaries from more than one child. The rule determines which pieces actually meet and in what order.

The paper illustrates the combinations using the rule pattern with X₁ and X₂. If the first child supplies the fragments c, cd, and d, and the second supplies f and g, pairing the first child’s alternatives with the second child’s gives six combinations to consider. These are combinations of boundary material for applying the rule, not six complete translations of the input. The example illustrates why computing n-gram occurrences at a join requires a cross-product of relevant fragments even though computing the best MERT score at a fixed weight step does not require a cross-product of all child derivations.

For every sequence introduced by the rule, the decoder compares the hyperedge posterior with the predecessor value from its tails and updates the estimated sequence posterior by the same excess rule used on a lattice. It propagates the needed prefix and suffix information to the head. With the revised scores attached to the hyperedges, it extracts the best complete derivation. The authors say the boundary combinations are manageable in practice when the maximum order used by MBR is no greater than the order of the word-sequence predictor used in creating the hypergraph. Under that condition, they describe the sets of distinct boundary fragments at the tails as small.

Using MERT to tune what counts as agreement

The earlier lattice decoder used gains derived from corpus statistics, with a heuristic assumption about how n-gram precisions decline as the order increases. The paper treats the coefficients of the gain as quantities that can be tuned. For that purpose it groups the expected matches by order. Each group supplies a feature, and length supplies another. The n-gram posteriors provide the evidence about the hypothesis space, while the weights determine how much the decision values each order of agreement.

g₀(E′, F) = |E′|

g₀ is the length feature for candidate E′ given the source F. The bars on E′ denote its length in words. The source is included in the feature notation even though this feature depends only on the candidate’s length.

gᵢ(E′, F) = ∑ over w with |w| = i [#w(E′) p(w | G)]

Here gᵢ is the expected match feature for order i, with i running from 1 through the maximum order N. E′ is the scored candidate, and F identifies the source and hence its search space G. The condition |w| = i restricts the sum to sequences w of the selected order. #w(E′) counts their occurrences in the candidate, and p(w | G) supplies their occurrence posteriors, estimated by the graph decoder in these experiments.

Ê = arg max over E′ ∈ G [∑ from i = 0 to N θᵢ gᵢ(E′, F)]

Ê is the selected translation, G is the candidate space, and E′ ranges over it. The index i covers the length feature at 0 and the match features up to N. θᵢ is the weight of feature gᵢ, and F is the input sentence. The output maximizes the sum of these weighted contributions.

The original decoder score can also be added to the feature set. The paper denotes this feature by gₙ₊₁ when N is the maximum order, with the subscript understood as N+1. The score comes from the first-pass decoder and is available on the graph edges. With this feature, the total number of features is N+2. The authors give a weight assignment that recovers the original highest-score decision: the original score feature receives 1.0, and the other features receive zero. Intermediate weight settings let that score influence the ranking alongside expected n-gram agreement.

The original decision is labeled MAP, for maximum a posteriori, in the experiments. Letting the learned gain fall back toward MAP is useful if the linear approximation selects poor outputs on the development set. It is a property of the scoring family rather than a separate rule that turns risk decoding on or off. MERT uses one set of feature weights to score candidates under the selected system. A higher weight on the original score can pull the decision towards the ranking used before the MBR pass, while leaving room for agreements to change a choice.

For tuning, the authors first compute the MBR features on each edge of the lattice or hypergraph, and supply the original score in runs that use it. They then use reference translations to evaluate candidate selections on development data. The search starts from 40 random parameter settings as well as the setting derived from corpus statistics. They compare the default weight vector, a tuned vector without the original score, and a tuned vector that can use it. In the NIST experiments, they also modify the tuning criterion after observing a tendency toward short outputs. The modification supplies a sentence-level penalty for candidates shorter than the average of their references. Its strength, α, is set on development data so that the MBR outputs have a brevity score close to that of the MAP outputs.

Experiments and results

Tasks, systems, and comparisons

The paper tests the methods on two translation tasks. The first uses the constrained NIST Arabic-to-English and Chinese-to-English track. The parallel and monolingual training material came from the data allowed for that track. The development split, labeled dev, is the NIST 2005 evaluation set, used to choose MBR parameters. It has 1797 source sentences for Arabic and 1664 for Chinese. The held-out nist02 split has 1043 Arabic and 878 Chinese sentences. The nist03 split has 663 Arabic and 919 Chinese sentences. The decoding comparisons use both held-out splits, and the NIST weight-tuning table reports nist03.

The second task consists of systems translating into English. The experiment spans 39 language pairs, and its setup describes a training corpus of up to 300 million word tokens drawn from the web and other published sources. Development and test sentences were randomly selected from the web. The development sets contain 5000 sentences and the test sets contain 1000. The multilingual comparison reports how many language pairs land in each of the paper’s BLEU change categories. It does not publish a separate test score for each pair.

The phrase-based system uses beam search and generates a lattice or an N-best list in a first pass. The second pass performs MBR. The grammar-based systems are the hierarchical phrase-based system, labeled Hiero, and the syntax-augmented system, labeled SAMT. Built on top of the phrase-based systems, they supply a hypergraph or an N-best list for rescoring. These outputs let the authors compare decoding procedures on the same family of first-pass systems. MAP is the baseline decision that returns the original top-ranked translation.

The phrase-based comparison includes MBR on 1000-best lists, the older finite-state lattice procedure and the new lattice decoder. List-based MBR uses a sentence BLEU loss, while the lattice procedures use the linear gain based on expected n-gram matches. The hypergraph comparison uses MAP and 1000-best MBR as baselines. The main quality measure is corpus BLEU, written as a percentage in the tables. The timing experiments report average milliseconds per sentence for the relevant computation, with envelope construction timed separately from the MBR decoding comparisons.

The cost of computing a training envelope

On Arabic-to-English phrase lattices, the earlier specialized implementation constructs an envelope in 8.57 msec per sentence on average. The proposed implementation takes 10.30 msec on those lattices. For Chinese-to-English phrase lattices, the earlier and proposed implementations take 7.91 and 8.65 msec per sentence, respectively. This comparison holds the kind of input graph fixed and changes the implementation. It shows a cost to using the general implementation on the simpler representation.

In the hypergraph runs, the proposed implementation averages 8.19 msec per sentence for Arabic-to-English and 8.11 msec for Chinese-to-English. The authors prune the hypergraphs to the same density for the comparison, defining density using the number of graph edges relative to the number of edges on the best path. They describe error-surface computation at matched density as taking the same time in practical terms. The table labels the measurement as envelope construction. These timings show that the generalization can handle the tested forest inputs at a cost in the range of the lattice computation. The comparison on phrase lattices is also important because it shows that faster MBR decoding should not be read as a speedup in this stage of MERT.

Phrase-based decoding from lattices

The phrase-based experiments show close BLEU results for the two lattice decoders. On Arabic-to-English nist03, MAP gives 54.2 BLEU and 1000-best MBR gives 54.3. FSAMBR reaches 54.9, and the proposed lattice decoder reaches 54.8. On Arabic-to-English nist02, the corresponding scores are 64.2, 64.5, 65.2, and 65.2. In these Arabic tests, both lattice approaches finish above the list-based baseline, and the new decoder is close to the earlier lattice procedure.

On Chinese-to-English nist03, MAP gives 40.1 BLEU and the list decoder gives 40.2. FSAMBR gives 40.6, and the proposed lattice decoder gives 40.7. On the Chinese nist02 split, the same decoder order gives 39.0, 39.2, 39.5, and 39.4. In particular, the ordering of the lattice decoders changes across splits. Their comparable scores are the basis for the authors’ claim about quality. The results do not depend on the new approximation winning every test comparison.

Average decoding time per sentence for phrase-based MBR in the NIST experiments

The proposed lattice decoder takes less time per sentence than the list-based and finite-state baselines.

Average decoding time per sentence for phrase-based MBR in the NIST experiments1000-best MBR: 3.71000-best MBR3.7Finite-state lattice MBR: 3.7Finite-state lattice MBR3.7Proposed lattice MBR (this paper): 0.2Proposed lattice MBR (this paper)0.2
The numbers
System or settingms.
1000-best MBR3.7
Finite-state lattice MBR3.7
Proposed lattice MBR (this paper)0.2

The paper reports a 20X speedup for the new lattice procedure. The table gives one average time per method alongside the NIST BLEU comparisons. The speed and quality measurements answer complementary questions. Timing tests whether the new estimate and scoring procedure reduce the cost of the MBR pass. BLEU tests whether the resulting changes in selected translations are consequential for the evaluation measure. The table does not report how many individual sentences the two lattice decoders translate differently.

Decoding from hierarchical and syntax-augmented forests

For the Arabic-to-English Hiero system, the nist03 BLEU scores are 52.8 for MAP, 53.2 for list-based MBR, and 53.3 for hypergraph MBR. On nist02, the same systems score 62.9, 63.0, and 63.1. For Chinese-to-English Hiero, the nist03 results are all 41.0. On the Chinese nist02 split, MAP scores 39.8, list-based MBR scores 40.1, and hypergraph MBR scores 40.2. The hypergraph decoder’s benefit over list-based MBR is small in these tests, with an exact tie at the precision displayed on Chinese nist03.

The Arabic-to-English SAMT results offer the clearest comparison in the table. The chart shows the nist02 results. On Arabic nist03, MAP gives 53.4 BLEU, list-based MBR gives 53.8, and hypergraph MBR gives 54.0. For Chinese-to-English SAMT on nist03, the scores are 41.3, 41.7, and 41.8 in that order. On Chinese nist02, MAP reaches 40.3 and both forms of MBR reach 41.1. The paper describes the Arabic SAMT gains from hypergraph rescoring as significant and reports that the graph-based decoder at least matches the list-based decoder elsewhere in the table.

BLEU for Arabic-to-English SAMT on the NIST 2002 test set

Hypergraph rescoring gives the highest BLEU among the decoding procedures tested with SAMT on this split.

BLEU for Arabic-to-English SAMT on the NIST 2002 test setMAP: 63.9MAP63.91000-best MBR: 64.31000-best MBR64.3Hypergraph MBR (this paper): 64.6Hypergraph MBR (this paper)64.6
The numbers
System or settingBLEU %
MAP63.9
1000-best MBR64.3
Hypergraph MBR (this paper)64.6

In both the Hiero and SAMT rows, the reported average time is 3.7 ms. for list-based MBR and 0.5 ms. for hypergraph MBR. The authors report a 7X speedup. The results attach that runtime gain to a specific alternative, rescoring 1000-best lists, rather than to the entire decoding pipeline. They also show why the speed comparison is useful even where BLEU ties: the graph decoder achieves the reported quality without carrying out the list-based decision procedure.

What happens when the gain weights are learned

For the tuning experiments, the default gain weights are −5, 1.5, 2, 3, 4, in the order of the length feature followed by the increasing n-gram orders. The tuned condition mert-b learns weights for the MBR features alone. The condition mert+b also gives MERT access to the original decoder score. In these experiments, the authors use forward-backward pruning to set a density of 30 for lattices and hypergraphs. The multilingual experiment uses a fixed MBR scaling factor of 0.7 across pairs. The NIST settings are selected on the development set for each language and system combination.

For the Arabic-to-English NIST systems, the scaling factors for phrase-based, Hiero, and SAMT decoding are 0.1, 0.01, and 0.5, respectively. For Chinese-to-English, they are 0.2, 0.5, and 1.0 in the same system order. Thus the tuning results compare gain weights under an already selected scale in the NIST experiments and under a shared scale in the multilingual experiment. The paper does not report a search over separate scales for those multilingual pairs.

On Arabic-to-English nist03, the phrase-based system starts at 54.2 BLEU for MAP. Its default lattice MBR and mert-b both give 54.8, and mert+b gives 54.9. Arabic Hiero starts at 52.8, then scores 53.3 with default hypergraph MBR, 53.5 with mert-b, and 53.7 with mert+b. Arabic SAMT starts at 53.4. Its scores are 54.0 with the default gain, 54.4 with mert-b, and 54.0 with mert+b. The Arabic results show that each tuned setting can offer an improvement on a particular system, while giving different rankings of the settings across systems.

On Chinese-to-English nist03, the phrase-based system scores 40.1 for MAP, 40.7 for both default and mert-b, and 40.9 for mert+b. Chinese Hiero gives 41.0 for MAP and for all three MBR settings. Chinese SAMT gives 41.3 for MAP, 41.8 with default MBR, 41.6 with mert-b, and 41.7 with mert+b. Both tuned scores for Chinese SAMT are above MAP, and both are below the default score. The choice of comparison matters when describing what tuning achieved.

For the multilingual test, a score at least 0.2 BLEU points above MAP counts as a gain, and a score at most -0.2 points away in the negative direction counts as a drop. The scores between those thresholds are categorized as no change. The default gain records gains on 18 pairs, no change on 9, and drops on 12. With mert-b, the counts are 22 gains, 5 with no change, and 12 drops. With mert+b, the outcomes are 26 gains, 8 with no change, and 5 drops. Each count is a comparison against the same type of baseline, MAP, for the relevant language pair.

Language pairs gaining BLEU over MAP on the multilingual test sets

The tuned gain that includes the original decoder score improves BLEU on the most pairs under the paper’s gain threshold.

Language pairs gaining BLEU over MAP on the multilingual test setsDefault lattice MBR gain: 18Default lattice MBR gain18Tuned gain without original score: 22Tuned gain without original score22Tuned gain with original score (this paper): 26Tuned gain with original score (thispaper)26
The numbers
System or settinglanguage pairs with a gain
Default lattice MBR gain18
Tuned gain without original score22
Tuned gain with original score (this paper)26

The chart counts pairs that clear the gain threshold. The accompanying drop and no-change counts matter because a setting can gain on more pairs while still losing on the same number of pairs overall. The comparison between default and mert-b has that property. The condition with access to the original score has fewer drops as well as more gains. The aggregate counts provide evidence about the frequency of improvements and setbacks under the threshold rule. They give no estimate of the average magnitude of a change or the effect on an identified pair.

What the ablations show

Separating the effect of the decoder from the effect of tuning

The paper’s controlled comparisons change the envelope implementation, the MBR decoding procedure, and the available features in the gain. They can answer different questions about the behavior of the system. The phrase-lattice envelope experiment holds the graph type fixed. Its comparison shows that support for multiple children entails some additional implementation cost even when the input is a lattice. The authors attribute most of the increase to how segments record derivations. The general implementation keeps several backpointers available, while the specialized implementation can represent a line with a single predecessor reference.

The matched-density experiments show that this overhead does not make hypergraph envelope construction prohibitively expensive in the tested setting. Density provides a common yardstick for the pruned structures, although the shapes of those structures and the number of derivations encoded can still differ. The evidence is therefore about observed cost at the tested sizes and density. It supports the claim that the same envelope method can be used on both kinds of graph. It gives neither an unrestricted timing comparison across all forests and lattices nor a direct measure of how much expanding the training space improves the weights.

The closest comparison of MBR inference procedures is the one between FSAMBR and the new algorithm on phrase lattices. Both attach an expected gain based on the same kind of linear BLEU approximation. The major procedural change is that the new decoder propagates local statistics instead of handling the n-grams with separate finite-state computations. The time measurement shows the benefit of the resulting procedure, and the BLEU rows show that the approximation used for the posteriors did not materially change the reported scores in those tests. Sentence-level agreement and posterior accuracy are separate quantities, and neither is measured by those rows.

The 1000-best comparisons change more than the implementation. The list-based decoder uses a sentence BLEU loss, while the graph procedures score expected n-gram agreement under the linear gain. They also have different representations of the candidate set and of the alternatives supplying reference evidence. The graph decoder can win because useful alternatives or useful agreement are available in the graph, because the decision criterion ranks candidates differently, or because these effects act together. The experiment evaluates the procedures as alternatives that an engineer could use. It does not isolate the effect of adding candidates while holding the loss and the probability calculation fixed.

SAMT on Arabic illustrates that distinction. Its hypergraph result exceeds its 1000-best result on both reported NIST splits, and its timing favors the graph procedure. On Chinese nist03, Hiero has identical displayed BLEU across the decoding methods. The same procedure can therefore offer a timing advantage whether the quality result is an improvement or a tie. Without a trace of which translations were selected and which alternatives contributed to their scores, the tables cannot establish why Arabic SAMT shows a clearer BLEU gain.

What the original score contributes

The feature comparison in the tuning experiment isolates a concrete design change. Both tuned conditions can assign weights to candidate length and to expected matches by n-gram order. Only mert+b can assign weight to the score that ranked the candidates before the MBR pass. The additional feature makes MAP reachable within the scoring family. It also permits partial reliance on the original score when the development references favor a decision influenced by both kinds of evidence.

The NIST results show why this feature is conditional in its usefulness. Arabic Hiero’s best displayed result comes from the condition that includes it, while Arabic SAMT reaches its highest displayed BLEU with the tuned MBR features alone. Chinese Hiero’s displayed score stays fixed across the conditions. For Chinese SAMT, the strongest of the tested MBR settings is the default one. These comparisons support the authors’ interpretation that the corpus-derived weights were already well suited to much of the NIST setup. This is an explanation they propose from the pattern of scores. The experiments do not locate a uniquely best parameter vector for each task.

On the multilingual task, the tuned gain without the original score records more gains than the default, with the same number of drops. That pattern is consistent with the authors’ hypothesis that fixed weights are poorly suited to some language pairs and can be improved using development data. Because the paper reports counts, it does not tell us whether the same pairs fell into the drop category under both settings. This distinction is important when interpreting tuning as a way of transferring a default method to a range of tasks.

With the original score included, the counts shift towards gains and away from drops. The authors also report seeing the expected weighting behavior for 4 systems. If MBR yielded no BLEU improvement over MAP on the development set, MERT could assign more weight to the original score. The paper treats that observation as evidence that the feature can act as a fallback. It does not trace every multilingual test outcome to a fully MAP decision or establish that every drop avoided by mert+b came from that mechanism alone.

The evidence about length

The observation about output length exposes a different weakness of tuning the gain. The authors found that tuned NIST outputs could be short relative to MAP on unseen test data. Their response was to add a sentence-level brevity term to the criterion used by MERT and set its strength using the development set. The penalty grows linearly with the amount by which an output falls short of its sentence’s average reference length. The comparison target for selecting the strength was the brevity score of the MAP output.

This part of the analysis shows that selecting weights by corpus BLEU on development data can still leave a length problem on held-out data. It also explains why a length feature in the gain and a brevity term in the tuning criterion serve distinct purposes. The gain’s length coefficient affects which candidate wins. The extra criterion affects how MERT judges the outputs that win. The paper reports the intervention and its motivation alongside the tuning results, without a separate controlled table giving the effect of removing the brevity term while leaving the rest of the setup fixed.

Limitations

Limits identified by the authors

The authors distinguish their expected gain from corpus BLEU. The gain is linear in length and expected word-sequence matches. Corpus BLEU is the measure used to assess the outputs as a collection. A heuristic weight vector can work in one setting and still provide a poor approximation on an unseen test set or language pair. Learning the weights on development data changes the approximation the decoder uses. It does not give an exact search for the corpus BLEU optimum on future inputs. The length behavior observed on NIST is a concrete case where the development objective required an additional adjustment.

The faster lattice decoder also approximates the posterior of occurrence. The path-dependent question is whether a complete path contains a sequence. The efficient calculation retains predecessor scores at graph nodes and uses differences between edge posteriors and those stored scores. The new computation avoids processing each sequence through a separate automaton, but it replaces information about the complete path with information shared across paths. The authors’ evidence for the tradeoff is the comparable BLEU and reduced time achieved in their lattice experiments.

The paper identifies a condition on the practical cost of the hypergraph boundary combinations. The description of small prefix and suffix sets applies whenever MBR’s highest order is at most that of the n-gram predictor that generated the hypergraph. It does not establish a comparable runtime for arbitrarily high orders or for forests with much larger inventories of boundary fragments. The authors also say that tuning the scaling factor could bring further gains. They use a common value for the multilingual experiments and leave systematic exploration of that dimension outside the paper.

Limits of the experimental evidence

The exactness of the MERT envelope is specific to a candidate structure and a chosen direction. The root envelope supplies the highest-scoring available derivations as the step changes, and the reference-based criterion can be evaluated on those decisions. This gives the error surface for that search. It does not establish that the final weight vector globally optimizes all weights or that a retained graph contains every translation that a fresh search with different weights could generate. Beam search and pruning are part of the setup, so the training and decoding algorithms operate on the alternatives that survive generation and pruning.

Similarly, the timing tables concern envelope calculation and MBR computation. They do not establish the same speedup for the entire translation process, which includes generating the initial graph or list. The matched-density envelope comparison is also specific to the pruned structures used by the authors. Equal density under their definition need not imply equal work at every vertex or equal numbers of derived translations. The paper reports behavior in those runs, with the forest and lattice representations doing different work internally.

The quality tables report BLEU. They give no human evaluation from which to infer how frequently outputs become more adequate or more fluent, and no sentence-by-sentence comparison from which to measure how stable the decoder’s choices are. The paper describes some hypergraph gains as significant, but the reported comparison does not specify a statistical test or give uncertainty estimates. Similarly, the multilingual gain and drop cutoffs are rules for counting outcomes, not estimates of statistical significance. A pair counted as a gain clears the specified BLEU threshold, and the category does not say how far it clears it.

Finally, the multilingual experiment is described with inconsistent totals. The task description says 39 language pairs, while the discussion says 40. The outcome counts above are presented as reported in the results table. Without a per-pair breakdown, the paper does not resolve the discrepancy or show what happened for individual languages. The detailed comparisons are strongest for the specified NIST systems, where the reader can identify the source language, translation architecture, test split, and score for each decoder.

What came after

The later citing works take up themes from both sides of the paper: how to tune a translation system’s ranking and how to make use of alternatives stored in a forest. The citation links establish that these works refer to the paper. Their titles identify the problem each addresses, but leave the details of any reuse open. In particular, an interest in ranking does not establish that a later method uses the same envelope computation, just as an interest in forests does not establish that a later decoder uses the same posterior estimate.

Tuning as Ranking addresses translation tuning through ranking. The connection is to the training half of the paper. In the MERT procedure, changes in feature weights matter because they change which candidates outrank the others and become outputs. The cited work’s stated framing makes ranking itself the subject of tuning. The title and citation do not identify a particular loss, direction-search method, or result that can be attributed to that connection.

Consensus Training for Consensus Decoding in Machine Translation connects the training criterion to a decoding decision based on consensus. That is also a concern in the paper’s MBR experiments. Choosing among plausible outputs by expected agreement changes what the decoder values, and the paper uses development references to tune the weights for that choice. The citation places consensus-oriented training and decoding alongside this work without specifying which gain features, if any, the citing study adopts.

Binarized Forest to String Translation takes up forest-to-string translation with binarization as its stated focus. In the paper, rule arity already matters: a join has to combine the scores of its children, and a rule can create new n-grams where their outputs meet. The later title concerns the structure of forest-to-string translation, while the paper’s algorithms concern training and rescoring over a forest supplied by a translation system. The citation supplies a connection through the representation without establishing reuse of the MERT or MBR algorithms.

Travatar describes a forest-to-string translation engine based on tree transducers. That is an engine-level use of the forest-to-string setting in which structured alternatives are central to the translation process. The paper examined how a search over alternatives already encoded in a hypergraph can incorporate an evaluation criterion. Travatar’s stated focus is the engine that carries out forest-to-string translation. The citation connects those efforts without identifying either of the paper’s rescoring procedures as a component of that engine.

Cite

Cite as Shankar Kumar, Wolfgang Macherey, Chris Dyer and Franz Och. 2009. Efficient Minimum Error Rate Training and Minimum Bayes-Risk Decoding for Translation Hypergraphs and Lattices. 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.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{kumar2009efficient,
  title = {{Efficient Minimum Error Rate Training and Minimum Bayes-Risk Decoding for Translation Hypergraphs and Lattices}},
  author = {Shankar Kumar, Wolfgang Macherey, Chris Dyer and Franz Och},
  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/1687878.1687903},
  url = {https://doi.org/10.3115/1687878.1687903}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/kumar-2009-efficient-minimum-error-rate-training/