Computing Lattice BLEU Oracle Scores for Machine Translation
Paper · 2012 · Artem Sokolov, Guillaume Wisniewski and François Yvon
Summary
A translation system can produce a disappointing answer even when its search has found a better one. To tell whether a better answer was available, the authors examine the graph of candidate translations retained by a phrase-based system. Each complete path through this graph, called a lattice, spells out a possible translation. An oracle decoder has access to a human reference and uses it to select a path. The quality of the selected translation helps show how much room there is to improve the system by choosing differently among the candidates it already has. The paper develops ways to make that comparison practical for machine translation.
The difficulty is that the value of an individual edge depends on the rest of its path. The standard evaluation measure counts matching words and consecutive word sequences, while limiting the credit for any sequence to the number of times it occurs in the reference. A repeated phrase can therefore earn credit at one position and exhaust its allowance before appearing again. The measure also balances overlap against translation length and combines counts across a corpus. The authors search individual lattices with tractable substitutes, then evaluate the selected translations together using the BLEU score.
One approach replaces the evaluation measure with a linear cost. Every word adds a length cost, and each matching sequence earns a discount. Finite-state operations add those costs to the lattice, where a shortest-path algorithm can find the best candidate for that objective. The other approach keeps reference count limits for words and word pairs. An integer linear program combines those limits with the requirement to select a valid path. A related method repeatedly solves a shortest-path problem and adjusts the cost of sequences whose counts exceed the reference allowance.
The experiments use N-code and Moses lattices for French into English, German into English, and English into German. On the WMT’10 French-to-English test set, N-code’s ordinary output scores 27.88 BLEU, while an oracle selecting from its 100-best lists scores 36.36. The full lattice offers a richer set of candidates. In the lattice comparisons, the linear oracle and the approaches that account for clipping deliver the strongest overall results. The clipping-aware searches come close to the corpus BLEU of the linear oracle that uses sequences up to order 4 while running considerably faster. The linear oracle using only words and word pairs is especially fast. Taken together, the results show that the retained lattices contain substantial reference-matching potential and that an approximation can be more useful for finding it than a more expensive search that targets a different sentence score.
Deep dive: Computing Lattice BLEU Oracle Scores for Machine Translation
Computing Lattice BLEU Oracle Scores tests how much better phrase-based translation could score by choosing among paths it already finds. · about 37 minutes to read
The problem and its context
What an ordinary translation leaves unanswered
A phrase-based decoder searches over ways to translate pieces of a source sentence and arrange them into an output. During search, it can find several alternatives for the same input. Its ordinary output reflects both what survives that search and how the decoder ranks the surviving candidates. Looking at the output alone leaves those influences tangled. A poor translation could come from a candidate set with little good material, or it could be the winner of a set that contains better choices.
The paper asks what the search has made available. It gives a separate decoder the reference translation and asks it to choose a path that agrees closely with that reference. This is what makes the decoder an oracle. The reference is information that a conventional translation system would lack when translating a new sentence. Its purpose here is to let the experiment inspect the candidates with a quality criterion that the original decoder did not use to select its answer.
The distinction matters when investigating a failure. If the oracle can find a close match, the retained candidates give a different ranking procedure an opportunity to improve the output on that sentence. If the oracle also struggles, there are several possible explanations. The translation table may lack a useful phrase. The permitted reorderings may prevent an otherwise available phrase from reaching the right position. Pruning may have discarded paths during search. The reference may express the same content in a way that is distant from the available candidates under a word-overlap measure. The oracle provides evidence about the retained hypotheses, and the causes of those hypotheses require further investigation.
Why use a graph instead of a list
The earlier work described by the authors could inspect a decoder’s search through a list of its highest-ranked hypotheses or through a graph. A list makes each candidate explicit. If quality is defined at the sentence level, an investigator can score every listed candidate and take the highest-scoring one. The restriction is that entry into the list already depends on the decoder’s ranking. A translation useful for diagnosis may have a low original score and fall beyond the list cutoff.
A lattice carries alternatives in a different form. Paths can reuse the same edges, so the graph can represent many complete hypotheses with shared pieces. A continuation can be stored once even when several different beginnings reach it. This allows a lattice to retain many more complete hypotheses than a short list. The authors treat the lattice as an approximation of the larger space searched by the translation system because its contents still reflect pruning.
That representation changes the algorithmic problem. With the list, the candidates are already separated. With the lattice, enumerating the candidates would sacrifice much of the economy gained by sharing edges. Ordinary shortest-path methods can exploit this sharing whenever a path’s cost is the sum of costs already assigned to its edges. The decoder then needs to keep only the best way to reach a state under those costs. The challenge for an oracle is to construct costs or a richer search state that preserve enough of what translation quality measures.
Why matching the reference makes search harder
BLEU counts matches at several lengths. An n-gram is a consecutive sequence of words of a specified length. A unigram is a word considered on its own, and a bigram is a pair of consecutive words. Overlap at longer lengths rewards agreement in stretches of wording. A hypothesis can contain familiar words while ordering them into sequences that match the reference much less closely.
There are two different dependencies to handle. First, a bigram can cross an edge boundary, so the latest word must be interpreted with its predecessor. This kind of dependency has a bounded history: enough preceding words determine which sequence has just ended. Second, a matching sequence has a reference count limit. An earlier occurrence can consume some of that allowance, regardless of how far away it is from the current edge. A record of recent words can solve the first dependency while leaving the second unresolved.
The complexity result that the paper cites makes the distinction concrete. Even in a confusion network, a more restricted graph of alternatives, deciding whether there is a hypothesis with clipped unigram and bigram precisions both equal to 1.0 is NP-complete. This holds with the brevity penalty removed. The difficult part is therefore present before accounting for longer sequences or penalizing short output. Two partial paths with identical recent words can still have quite different remaining opportunities to earn credit. Keeping every relevant combination of past counts can require a large number of separate histories.
Corpus scoring adds another problem. BLEU pools counts before turning them into precisions and combining them with the length penalty. Selecting a path for a particular source sentence changes the totals to which all other sentences contribute. A per-sentence oracle can use a substitute to make each lattice an independent search problem. The price of that independence is that the selected corpus need not attain the highest BLEU available across all combinations of paths.
How earlier work made oracle decoding usable
The paper describes uses of reference-guided search beyond diagnosis. A reference may be unreachable through the translation system’s candidate space, which makes the reference itself unsuitable as a target path during certain kinds of training. A reachable candidate with strong reference agreement can stand in for it. The paper points to large-margin translation training as an example. Online Large-Margin Training of Syntactic and Structural Translation Features
Another use is to prepare training examples for lattice reranking. A reranker learns to choose among candidates generated by an existing decoder. An oracle identifies which candidates in that representation are worth treating as targets. In this setting the oracle’s value depends partly on how often it can find good candidates in graphs that would be expensive to enumerate.
The authors reimplement two earlier strategies to establish a comparison. One estimates how probable a lattice path is under word-sequence probabilities fitted to the reference sentence. Another scores partial hypotheses by a smoothed overlap measure and discards alternatives that share a sufficiently similar recent history. Both offer ways to use reference information during search. Both also give credit to repeated matches without enforcing the reference count limits.
A separate line of earlier work supplied the linear approximation that the paper adapts. It had been used to make lattice minimum Bayes-risk decoding tractable. In that use, the approximation supports a decision about a translation under uncertainty. Here the reference is supplied directly, and the same additive form scores agreement with it. The change in purpose is what turns the approximation into an oracle objective. Lattice Minimum Bayes-Risk Decoding for Statistical Machine Translation
The method, step by step
Turn each sentence into a path-selection problem
The input to an oracle is the lattice for a source sentence and its matching reference. The paper assumes a directed acyclic graph with a unique starting state and a unique finishing state. It works with word lattices, where each edge contributes a single output word. A phrase label can be distributed along a chain of edges when a decoder initially supplies a phrase lattice. Reading the output words in order along a complete path gives a candidate translation.
The conventional decoder has access to other information on the edges. The paper describes a source phrase and a vector of compatibility features associated with each edge. The original ranking combines such features with weights determined during tuning. For the oracle experiments, the output labels are sufficient. The selected paths answer a question about matching the reference within the supplied graph, with the conventional scoring features left out of the oracle objective.
Once the lattice is ready, the authors choose what information to preserve about a path. The linear method can score each new sequence as it is completed. The integer formulation also makes the total use of a word or sequence visible through constraints. The relaxed formulation prices that total use indirectly by changing edge costs over repeated shortest-path searches. All of these routes end with a path whose labels can be scored together with the paths selected for the rest of the corpus.
Finding a reference-guided path through a translation lattice
The steps in order.
Separate the evaluation score from the search score
The starting measure is the corpus formulation from the original BLEU paper. It combines precisions for sequences of several lengths by a geometric mean and multiplies that result by a penalty for short output. The geometric mean lets agreement at each included order affect the result. Strong word overlap can thus coexist with a weak overall score if few longer sequences match. Bleu: a Method for Automatic Evaluation of Machine Translation
BLEUₙ(E, R) = BP · (∏ₘ₌₁ⁿ pₘ)^(1/n)
Here E is the corpus of candidate translations and R is the aligned reference corpus. BLEUₙ denotes BLEU through order n, which is the maximum sequence length included. BP is the brevity penalty. The product symbol ∏ multiplies the modified precisions pₘ for the sequence lengths indexed by m, from 1 through n. The exponent 1/n takes their geometric mean. The paper ordinarily uses n = 4 when it reports BLEU.
pₘ = cₘ(E, R) / cₘ(E)
The numerator cₘ(E, R) pools the clipped matching counts at order m across aligned sentence pairs. The denominator cₘ(E) counts all candidate occurrences of that order in E, including occurrences that receive no match credit. Within a sentence pair, each sequence can contribute up to the count available in the corresponding reference sentence. Repeating a matching sequence past that allowance continues to contribute to the denominator.
BP = min(1, exp(1 − c₁(R) / c₁(E)))
BP is capped at 1 by min, which takes the smaller of its arguments. The function exp is the exponential. The count c₁(R) is the total number of reference words, and c₁(E) is the total number of candidate words. The ratio puts the reference length over the candidate length. When the candidate corpus is shorter, the exponential reduces the final score. The modified precisions measure how much of the produced material matches, and the penalty represents the disadvantage of producing too little material overall.
The oracle instead has to make one choice for a particular source sentence. The authors write this as maximizing a sentence-level substitute. The substitute can be drawn from a corpus approximation, as in the linear approach, while still assigning a score to one path at a time.
π*(f) = arg max over π ∈ Π_f of BLEU′(e_π, r_f)
Here f is the source sentence, Π_f is the set of complete paths in its lattice, and π ∈ Π_f means that a candidate path belongs to that set. The output words of path π form e_π, and r_f is the reference translation for f. BLEU′ denotes the chosen sentence-level replacement for BLEU. The arg max returns a path at which that replacement is greatest, and π*(f) names the resulting oracle path. A path optimal for one replacement can be evaluated with corpus BLEU after selection alongside paths from the other sentences.
Use finite-state operations to carry a score through the lattice
The graph-based implementations use weighted finite-state acceptors and transducers, with OpenFST as the implementation toolbox. An acceptor has states and transitions labeled with symbols from an alphabet. A weighted acceptor also assigns values to its transitions and can assign initial and final weights to states. A transducer adds output labels. It can, for example, read an individual word and emit the longer sequence that has just become complete because that word was read.
A scoring rule tells the search how to extend a path and how to combine information from alternative paths. The paper expresses those two operations as a semiring. It uses ⊗ to join weights along a path and ⊕ to combine alternatives. The first operation has a multiplicative identity, written 1̄, and the second has an additive identity, written 0̄. The identities are elements of the chosen weight system. In particular, these marks can stand for values different from the ordinary numbers used in arithmetic.
E(π) = I(p(ξ₁)) ⊗ (⊗ᵢ₌₁ˡ E(ξᵢ)) ⊗ F(n(ξₗ))
π is a path containing l transitions, with ξᵢ the transition at position i. p returns the starting state of a transition, and n returns its destination state. I assigns an initial weight to the first state, and F assigns a final weight to the last state. In this expression E is the weight function, so E(ξᵢ) gives the weight of a transition and E(π) gives the weight of the whole path. The indexed ⊗ combines the edge weights in order before incorporating the endpoint weights.
⊕ over π ∈ Π(A) of E(π)
A is the weighted acceptor, and Π(A) is its set of successful paths. Applying ⊕ to their weights E(π) combines the complete alternatives. Under min for ⊕ and ordinary addition for ⊗, this expression finds the lowest total cost. A maximum-based choice is also possible with a compatible rule for extending paths.
These operations explain why different oracle calculations can use the same general graph machinery. The linear oracle uses plain additive costs and keeps a minimum. An earlier partial-overlap method stores a set of partial hypotheses and uses the two operations to extend and merge those sets. The work done at a graph state, and how much information can be discarded there, depends on the contents of the weights.
Reproduce the reference-probability and partial-overlap baselines
The reference-probability baseline, abbreviated LM, fits a separate predictor to each reference translation. For any position in a candidate, it estimates the probability of the next word from the preceding words, using a fixed maximum history. The corresponding candidate probability combines those conditional probabilities along the sequence. A finite-state acceptor represents the available histories, with backoff transitions for cases where the full context cannot supply a probability.
Pₙ(e | r) = ∏ᵢ P(eᵢ | hᵢ)
Pₙ(e | r) is the probability assigned to the candidate word sequence e by the predictor fitted to reference r, at order n. The product runs over positions i in that sequence. eᵢ is the word at the current position, and hᵢ is its preceding history, of up to n − 1 words. The vertical bar in each probability introduces the information being conditioned on. On the left that information identifies the reference used for fitting, and on the right it identifies the history used to score a word.
π*_LM(f) = ShortestPath(L_f ◦ A_LM(r_f))
π*_LM(f) is the path chosen for source sentence f by this baseline. L_f is the source sentence’s lattice, r_f is its reference, and A_LM(r_f) is the weighted acceptor fitted to that reference. The composition operator ◦ pairs lattice steps with compatible steps through the probability acceptor. ShortestPath minimizes the accumulated costs of the composed graph. Those costs are negative log probabilities, so minimizing their sum selects a path with highest probability under the reference-specific predictor.
The partial BLEU baseline, abbreviated PB, works with overlap counts more directly. It gives each partial path a score using a smoothed version of the precision terms. The score can be updated as a path is extended. The baseline uses a rule for merging partial paths that keeps the currently stronger candidate when their recent histories agree.
pₘ = (cₘ(e_π, r) + 0.1) / (cₘ(e_π) + 0.1)
pₘ is the smoothed precision at sequence length m for the path π. e_π is the partial or complete sequence generated by that path, and r is the reference. In this baseline the numerator count cₘ(e_π, r) credits matching occurrences without clipping, while cₘ(e_π) counts the candidate occurrences. The offset 0.1 in both parts allows the search to work with partial hypotheses whose counts may still be zero.
log BLEU(π) = (1/4) · Σₘ₌₁⁴ log pₘ
Here log BLEU(π) names the partial-overlap score assigned to path π. log takes the logarithm of each smoothed precision pₘ, and Σ adds the terms for the orders indexed by m. The factor 1/4 averages those terms. The expression has no separate brevity factor.
The stored information includes the recent words, current length, sequence counts, current score, and the hypothesis built so far. Appending a word shifts the history and updates the counts. The original merge rule then groups hypotheses by recent history. The length-aware variant, PB′, also requires equal lengths before it merges paths. At the same lattice state, equal histories imply that a common continuation will create the same new local sequences. Equal lengths additionally make the eventual lengths agree under that continuation. The paths can still arrive with different accumulated counts, which is why the partial ranking is an approximation.
Make the reference discounts additive
The proposed linear oracle, LB, uses a length cost together with discounts for sequences that occur in the reference. It takes the form of a first-order approximation to corpus BLEU. A first-order approximation here means that each retained count enters as a term multiplied by a fixed coefficient. Once those coefficients have been set, a path can be scored by adding the contributions that arise along it.
linBLEU(π) = θ₀ · |e_π| + Σₙ₌₁⁴ Σᵤ∈Σⁿ θₙ · cᵤ(e_π) · δᵤ(r)
linBLEU(π) is the linear cost of path π, and e_π is the word sequence it produces. The bars in |e_π| give its length. θ₀ is the cost per word. In the outer sum, n indexes sequence length. In the inner sum, Σⁿ is the set of sequences of length n over the vocabulary Σ, and u is one such sequence. θₙ is the coefficient for matches of that order, cᵤ(e_π) counts occurrences of the particular sequence u along the path, and δᵤ(r) indicates whether u occurs in reference r.
The indicator contributes whenever there is reference support for the type of sequence. It carries no information about the number of times that sequence appears in the reference. If the path generates it again, the linear cost receives its discount again. This is what allows a local transition to have a fixed cost once its sequence is known. A search with clipping would also need information about how much of the sequence’s allowance had already been used.
θₙ = −(4p · r^(n−1))^(−1)
θₙ is the match coefficient for order n. Here p and r are the parameters of the approximation. In this formula r is a scalar setting, distinct from the reference denoted by the same letter in the count formulas. The exponent −1 takes the reciprocal, and the leading minus sign makes the contribution a discount in the cost minimized by the search. The paper sets the length coefficient θ₀ to 1. That cost makes each extra word pay the same amount, while the matching sequences it creates may lower the total cost. It serves as a length control in the surrogate, with a simpler form than BLEU’s corpus brevity factor.
To apply these costs, the authors first give every original lattice edge the length cost. They call this weighted graph Δ₀. For each included sequence length, they then build a transducer whose state remembers the preceding words needed to complete a sequence of that length. When an edge reads a new word, the transducer emits the sequence ending at that word and shifts its history so it is ready to process the next edge. The transition weight applies the corresponding discount if the emitted sequence appears in the reference.
transition cost = θₙ · δᵤ(r)
transition cost is the contribution of a step that completes sequence u at order n. The coefficient θₙ gives the discount for that order, and δᵤ(r) indicates whether the sequence is present in the reference r. Before enough words are available to form a sequence, auxiliary states allow the transducer to read the beginning of the hypothesis without applying a match discount for that order.
The paper’s illustration uses the alphabet {0, 1} and shows automata for n = 1 . . . 3. Its role is to make the history structure visible. Once a full history is available, a transition replaces the oldest part of that history with the new word. The principal states and their connections follow the pattern of a de Bruijn graph, where histories overlap in the symbols they share. The same transition structure can be reused with different reference-dependent weights. In the application, the labels are translation words.
π*_LB = ShortestPath(Δ₀ ◦ Δ₁ ◦ Δ₂ ◦ Δ₃ ◦ Δ₄)
π*_LB is the path chosen by the linear BLEU oracle through order 4. Δ₀ is the input lattice weighted by word length, and Δ₁, Δ₂, Δ₃, and Δ₄ supply the adjustments for their respective sequence lengths. The composition operator ◦ attaches those adjustments to compatible lattice paths. ShortestPath selects the path of minimum total cost. The version through order 2 uses the length-weighted lattice and only the transducers for words and word pairs.
For this objective, the search can be exact. Paths with the same graph position and the same required history face the same subsequent costs. It is then safe to keep the cheaper path to that combined state. The efficiency gain comes partly from this ability to merge histories and partly from how little history the lower-order variant needs to remember.
Turn the lattice into a constrained optimization problem
The clipping-aware approach starts from a different representation of the same lattice. Every edge has a binary selection variable. The optimizer must choose edges that join up into a complete path, and it must account for the number of times that path generates each relevant word or pair. The paper first presents the construction for individual words and then extends it to word pairs.
For the simplest objective, an edge earns a reward when its word occurs in the reference and a penalty otherwise. The edge scores can be added without remembering previous matches. The authors try different positive reward and penalty settings and select according to corpus BLEU.
θᵢ = Θ₁ if w(ξᵢ) occurs in r, and −Θ₂ otherwise
Here θᵢ is the reward for selecting edge ξᵢ, and w(ξᵢ) is its output word. r is the reference. Θ₁ is a positive reward for generating a reference word, and Θ₂ is the positive magnitude of the penalty for generating a word outside the reference. The same reward applies each time a particular reference word appears along a candidate.
score(ξ) = Σᵢ₌₁^|Ξ| ξᵢ · θᵢ
ξ is the full assignment of selection variables, Ξ is the set of lattice edges, and |Ξ| is its size. The sum visits edges indexed by i. The variable ξᵢ is 1 for a selected edge and 0 otherwise, so only selected edges contribute their rewards θᵢ.
The path conditions make this an optimization over lattice translations. One selected edge leaves the initial state, and one arrives at the final state. At every intermediate state, there must be as many selected incoming edges as selected outgoing edges. These constraints are the bookkeeping of a unit of flow through the graph. Because the lattice is acyclic, they also exclude a disconnected loop of selected edges.
Σ over ξ ∈ Ξ⁺(q₀) of ξ = 1
q₀ is the initial state, Ξ⁺(q₀) is the set of outgoing edges there, and ξ stands for the binary variable of each such edge. Their sum requires one selected departure.
Σ over ξ ∈ Ξ⁻(q_F) of ξ = 1
q_F is the final state, and Ξ⁻(q_F) contains the incoming edges at that state. The sum over their selection variables ξ requires one selected arrival.
Σ over ξ ∈ Ξ⁺(q) of ξ − Σ over ξ ∈ Ξ⁻(q) of ξ = 0, for q ∈ Q ∖ {q₀, q_F}
Q is the set of lattice states and q is any state outside the set containing q₀ and q_F. Ξ⁺(q) and Ξ⁻(q) are its outgoing and incoming edges, respectively. Subtracting the selected incoming count from the selected outgoing count and setting the result to 0 requires the path to continue through any intermediate state it enters. Maximizing the given edge reward under these conditions is the unclipped shortest-path oracle, SP. The paper solves this case with a standard Bellman algorithm.
Limit the credit for each repeated word
For clipping, the authors introduce a separate variable for each word whose occurrences are counted. Its value represents how many selected occurrences receive matching credit after applying the reference limit. All edges producing the same word contribute to the same bound, even if they lie far apart.
γ_w = min(Σ over ξ ∈ Ω(w) of ξ, c_w(r))
γ_w is the credited count for word w. Ω(w) is the set of edges that generate it, and the sum of their selection variables ξ is the candidate count. c_w(r) is the count of w in reference r. The min operation chooses whichever of the candidate count and the reference count is smaller.
The objective pays for credited occurrences and penalizes the remainder of the output. A word outside the reference earns no credit. A reference word repeated beyond its allowance can appear in the path, with the surplus treated like other unmatched output. In this formulation, clipping defines the scoring of a valid candidate.
maximize (Θ₁ + Θ₂) · Σ_w γ_w − Θ₂ · Σᵢ₌₁^|Ξ| ξᵢ
The optimization ranges over edge assignments and credited counts. Σ_w γ_w totals the credited occurrences over words w. Σᵢ₌₁^|Ξ| ξᵢ counts all selected edges, which is the candidate length for a word lattice. Θ₁ and Θ₂ are the reward and penalty magnitudes. Each credited word offsets its share of the length charge and receives the match reward. A word without credit contributes the penalty through the length term.
0 ≤ γ_w ≤ c_w(r)
γ_w is required to be non-negative and can receive at most the reference count c_w(r) for w. The lower bound lets the objective represent a word that receives no credit.
γ_w ≤ Σ over ξ ∈ Ω(w) of ξ
This upper bound says that γ_w can receive at most the number of selected edges ξ from Ω(w), the edges that produce w. The objective increases with γ_w, so a maximizing solution uses the largest count allowed by both bounds. This reproduces clipping through linear constraints while keeping the path conditions in force.
The implementation extends the construction to bigrams. Composing the word lattice with the transducer for order 2 identifies the pair generated when the next word follows its predecessor. That makes it possible to count those pairs using edge variables as well. The resulting objective combines clipped word and word-pair matches. The solver used in the experiments is Gurobi. This is the ILP oracle, named for the integer linear program in which the edge decisions are discrete and the rewards and constraints are linear.
Replace the hard count constraints with prices during search
The relaxation approach, RLX, uses a related objective expressible in terms of shortest paths. The paper writes it with bounds on the total occurrences of reference words. That is a different way to place the count limit from the ILP formulation with credited-count variables. In the ILP a candidate may contain surplus words and pay a penalty for them. In the constrained path problem used to derive RLX, a surplus reference occurrence violates the displayed constraint.
minimize over ξ ∈ Π: −Σᵢ₌₁^|Ξ| ξᵢ · θᵢ
Π is the set of edge assignments that represent complete lattice paths. ξ is one such assignment, ξᵢ is its selection variable for edge i, |Ξ| is the edge count, and θᵢ is the edge reward. The minus sign changes reward maximization into cost minimization. The path conditions are already present through the domain Π.
Σ over ξ ∈ Ω(w) of ξ ≤ c_w(r), for w ∈ r
Ω(w) contains the edges that generate word w, here one of the words appearing in reference r. The sum counts the uses of that word in the selected path, and c_w(r) is its reference count. This constraint bounds the number of actual uses of each reference word in the path.
The role of relaxation is to move those conditions out of the immediate path search. A multiplier acts as a price on using a reference word. The first path is chosen with the multipliers initialized to zero. The method can then increase a word’s price when the chosen path exceeds the reference count. The next path search sees the updated prices, which may make another path cheaper. The paper adapts techniques from work on relaxing hard constraints in structured search. On Dual Decomposition and Linear Programming Relaxations for Natural Language Processing
L(λ, ξ) = −Σᵢ₌₁^|Ξ| ξᵢ · θᵢ + Σ_w∈r λ_w · (Σ over ξ ∈ Ω(w) of ξ − c_w(r))
L(λ, ξ) is the Lagrangian, the path cost after adding weighted deviations from the reference limits. λ is the collection of multipliers λ_w, one for each reference word w in r. The first sum is the negative edge reward of assignment ξ. In the second sum, each multiplier scales the difference between the path count, given by the selected edges from Ω(w), and the fixed reference count c_w(r).
L(λ) = min over ξ ∈ Π of L(λ, ξ)
L(λ) is the dual objective at fixed multipliers. The min evaluates the cheapest path assignment ξ in Π under L(λ, ξ). The paper then seeks the greatest value of L(λ) over non-negative multipliers.
For fixed multipliers, the part involving only reference counts has the same value for every path. This leaves an additive search problem with adjusted edge costs. It can use the same type of shortest-path computation as the unclipped baseline within each iteration.
ξ* = arg min over ξ ∈ Π of Σᵢ₌₁^|Ξ| ξᵢ · (λ_{w(ξᵢ)} − θᵢ)
ξ* is a cheapest complete assignment at the current prices. The arg min compares assignments in Π, and the sum runs over the lattice edges indexed by i. ξᵢ selects edge i, w(ξᵢ) gives its word label, λ_{w(ξᵢ)} is that word’s current multiplier, and θᵢ is the edge reward. A word outside the reference has multiplier 0.
g_w = Σ over ξ ∈ Ω(w) of ξ* − c_w(r)
g_w is the component of the subgradient for reference word w. The sum counts the edges in Ω(w) selected by ξ*, and c_w(r) is the count the reference permits. An excess gives a positive value, unused allowance a negative value, and agreement with the reference limit gives zero. These deviations tell the algorithm how to revise the prices for its next path calculation.
λ_w ← max(0, λ_w + α⁽ᵗ⁾ · g_w)
The arrow updates the multiplier λ_w using the step size α⁽ᵗ⁾ at iteration t and the current subgradient component g_w. The max takes the larger of the updated value and 0, enforcing the nonnegativity of the multipliers. The experiments use a constant step size of 0.1.
The algorithm checks the selected path against the count limits and can stop when its criterion is met. The implementation also has an iteration budget. This separation between repeated additive searches and price adjustments gives the method a way to account for surplus occurrences without calling the external integer solver. It also creates a choice about how far to pursue the sentence-level objective when the final comparison uses a corpus measure.
Experiments and results
Which data and system outputs enter the comparison
The authors train the translation systems using data supplied for the WMT’11 evaluation task. They tune them on WMT’09 test data and use the WMT’10 test set for the evaluation and lattice generation. They run N-code and Moses in French-to-English, German-to-English, and English-to-German translation. These are experiments with existing decoder outputs. The different oracle procedures search those outputs with access to references.
The ordinary test score measures the translation chosen by the system. The list oracle starts from the system’s 100-best hypotheses and uses the smoothed partial-overlap score to select one. The lattice oracles operate over paths and can recover hypotheses that a list of that size omits. For the lattice comparison, the authors assess both the quality of the selected translations and the average time needed per sentence. They report BLEU using the multi-bleu.pl script.
The comparison also distinguishes the order used during search from the corpus metric used for evaluation. The clipping-aware experiments use words and word pairs in the objective. The authors include corresponding versions of LB and LM, marked -2g, to compare methods working at that order. Their -4g versions use sequences through order 4. PB and PB′ compare different recombination rules under the partial-overlap approach. SP gives a simple path baseline based on unigram reward and penalty.
N-code and Moses also have a difference in preparation. The authors pruned Moses lattices to speed preparation for the Python implementations of the clipping-aware methods. The Moses lattice performance figure specifies pruning with -b 0.5. The timing results concern those experimental inputs and implementations. This matters because the cost of path search depends on the retained graph as well as on the method applied to it.
What fixed-size lists reveal
The list comparison gives a direct view of the separation between ordinary system output and choices made with a reference. On French into English, both decoders’ 100-best lists supply translations that a reference-guided selector combines into a higher-scoring corpus. The best entry in this comparison is the N-code list oracle.
Ordinary output and list oracles on WMT’10 French-to-English test BLEU
Reference-guided selection improves the score for both decoders.
The numbers
| System or setting | BLEU |
|---|---|
| N-code ordinary output | 27.88 |
| Moses ordinary output | 27.68 |
| N-code 100-best oracle (this paper) | 36.36 |
| Moses 100-best oracle | 35.25 |
The same pattern holds for German into English. The chart compares the two ordinary outputs and their corresponding list oracles on the WMT’10 split. The list oracle uses the same selection rule as in the French-to-English comparison.
Ordinary output and list oracles on WMT’10 German-to-English test BLEU
Each decoder’s list contains alternatives that raise the corpus score.
The numbers
| System or setting | BLEU |
|---|---|
| N-code ordinary output | 22.05 |
| Moses ordinary output | 21.85 |
| N-code 100-best oracle (this paper) | 29.22 |
| Moses 100-best oracle | 29.13 |
In English into German on WMT’10, the ordinary outputs score 15.83 for N-code and 15.89 for Moses. The 100-best oracles score 21.18 and 22.03, respectively, in corpus BLEU. On this direction Moses provides the higher-scoring list oracle. Across the directions, the comparison shows how easily a diagnostic restricted to the top output would overlook better-scoring choices already present in the system’s candidates.
The size of the list also affects the strength of the benchmark. The authors report that the list oracle becomes comparable to SP only when they consider 10,000-best lists. SP is the simple lattice oracle that rewards reference words without clipping them. The authors characterize its performance as mediocre among the lattice methods. The comparison thus gives a practical reason for retaining the graph in a diagnostic: increasing the explicit list substantially is necessary to approach even this simple graph-based result.
How the authors set the linear discounts
The linear objective has adjustable coefficients, so its evaluation includes a grid search for the parameters that generate the match discounts. One grid evaluation, shown for the German-to-English WMT’11 task, uses a step value of 0.05. The discussion of that figure places good values roughly around p ≈ 0.3 and r ≈ 0.2 for the other language pairs. The settings listed for the lattice experiments are specific to translation direction and sequence order. The authors find them with N-code and reuse them for Moses.
For LB-4g, the French-to-English setting is p = 0.25 and r = 0.15. The English-to-German setting is p = 0.175 and r = 0.575. For German-to-English, the reported values are p = 0.35 and r = 0.425. These parameters determine how much matching sequence counts change the path cost. They are settings of the oracle’s objective, rather than weights learned by the conventional translation decoder.
For LB-2g, French-to-English uses p = 0.3 and r = 0.15, English-to-German uses p = 0.3 and r = 0.175, and German-to-English uses p = 0.575 and r = 0.1. The lower-order search has its own settings. The comparison between LB orders therefore reflects the performance of each version with its selected discount values, as well as the different sequences it can score.
The relaxation experiment makes an additional choice about the search budget. The authors stop RLX after 20 iterations. They report that running it to convergence reduced corpus BLEU by approximately ∼1 point. They attribute that behavior to the discrepancy between the objective used for each sentence and the evaluation of all the selected sentences together.
How the lattice oracles compare
The paper reports the lattice comparisons separately for N-code and Moses. Its overall account puts LB, ILP, and RLX among the strongest choices for corpus BLEU. ILP and RLX deliver scores close to LB-4g while computing the sentences considerably faster. LB-2g stands out for speed, and the authors emphasize that optimizing with sequences through order 2 gives corpus results comparable to using sequences through order 4.
The reference-probability baseline is consistently weaker. It searches for the most likely candidate under the probability rule estimated from the reference. That can favor sequences that look familiar given the reference while still ranking complete paths in a different order from a count-based score. The empirical comparison indicates that a straightforward relationship between the search objective and overlap pays off more reliably for these lattices.
PB sometimes approaches the stronger lattice oracles in quality, but it has intermittent bursts of resource use. Its procedure stores partial hypotheses and their statistics, so the number that remain distinct at a state matters for the workload. A more aggressive merge could reduce that burden while also changing which translations survive. The experiments find the more conservative PB′ consumes substantially more memory and has only marginal score differences from PB, with scores unexpectedly on the weaker side.
The authors use the score and timing results together to choose among objectives. In their experiments, the more expensive search over longer sequences brings little additional corpus BLEU relative to the fastest effective alternative. Clipping-aware search gives another way to achieve close results with lower-order sequences. The reported value of those methods is the combination of the resulting corpus score and the time required to obtain a path, especially for long sentences.
What the ablations show
Sequence length and the final score
The paper compares oracle variants and search settings, with the closest match to an ablation coming from the versions of the linear method that stop at different sequence orders. LB-2g keeps the length term and the discounts for matching words and adjacent word pairs. LB-4g additionally gives discounts for longer matching sequences. The two share the linear construction, and both are judged by ordinary corpus BLEU after path selection. Since their coefficients are chosen for each version, the comparison asks how well each configured method works with the information it has.
The close scores show that the lower-order objective is sufficient to find candidates with good overall overlap on these lattices. The authors suggest that hypotheses sharing many bigrams are also likely to share longer sequences. Consecutive word-pair agreements can occur along a longer matching stretch, so many useful paths receive support from the smaller pieces. The empirical result is about the available translations in these experiments. Two sentences can still share many pairs without preserving every longer sequence, and those differences remain visible to BLEU at evaluation time.
The speed comparison follows from how the method represents that information. A word-pair transducer needs to know the word immediately before the next one. Longer sequences require additional history in the matching state, and composition must carry those distinctions into the lattice. Even when two paths end at the same original lattice state, they can continue to occupy different states in the composed graph. The shorter history therefore makes fewer distinctions during search, while the final metric checks whether the resulting simplification has sacrificed useful agreement.
The authors include corresponding lower-order LM variants as well. This helps put the different families on more comparable footing, since ILP and RLX use only words and word pairs in the reported implementation. The consistently weaker LM scores show a limit of this control. Giving methods the same maximum history leaves their search objectives distinct. The availability of a reference-dependent bigram probability is empirically less useful here than a scoring rule that rewards the desired overlap more directly.
What the clipping comparisons can tell us
SP and ILP expose how reference count limits change the optimization. SP rewards a path each time it emits a word found in the reference. ILP counts selected occurrences together, caps their credit, and charges for the surplus. The generalization used in the experiments also counts pairs, so the reported SP and ILP comparison changes both clipping and sequence order. Its results support the practical value of the richer formulation while leaving the size of a clipping-only effect undetermined.
The comparison with LB supplies a different check. LB does well with a match indicator that has no count cap. ILP and RLX do well with objectives that explicitly consider reference counts. The success of the linear oracle shows that useful diagnostic translations can still be found with repeated-match discounts. The clipping-aware results show that enforcing count information can be made practical for low-order search. The experiments compare whole oracle designs, each with its own scoring and search decisions.
It also matters which feature of BLEU the methods retain. LB tries to model the tradeoff between candidate length and reference agreement by attaching costs directly to the graph. ILP preserves the cap on credited matches and folds length into its penalty for unmatched material. Both can give better guidance than a reference-probability score. Their similar final results are compatible with different choices of path on particular sentences, since the reported comparison aggregates the selected translations.
Why length-aware recombination behaved unexpectedly
PB versus PB′ is a direct comparison of merge rules. PB can discard a partial hypothesis when it encounters another path at the same state with the same recent words and a better current score. PB′ requires the lengths to agree too. Its purpose is to preserve paths that can receive different treatment because of length. With a common continuation, paths of equal current length also have equal final length, making that particular part of the comparison less ambiguous.
The authors expected the stricter merge rule to perform at least as well. In the experiments PB′ achieves slightly poorer scores and consumes more memory. At a given state, retaining separate lengths preserves more partial candidates. That creates a measurable cost even if the extra candidates contribute little to the selected corpus. The score result also illustrates how preserving one distinction leaves other decisions about the surviving candidates in place.
The authors attribute the unexpected result to the interaction of clipping in evaluation with ties during recombination. Paths can agree in current score, recent history, and length while containing different earlier counts. Selecting one of those tied paths can change which sequences receive credit when the completed output is evaluated. The paper offers this as an explanation for the observed comparison. Its practical finding is that the stronger retention rule brings heavier memory use for marginal score differences.
Why a longer search could hurt the reported result
The iteration limit in RLX probes the gap between optimizing the search objective and evaluating the output. Additional iterations give the relaxation method more opportunity to adjust its prices toward the reference count limits. Each decision concerns one sentence’s constrained objective. Corpus BLEU then combines the counts and lengths from all decisions, giving those changes a different role.
The authors find that running to convergence modestly lowers the final corpus score relative to stopping at the reported budget. That observation is consistent with the paper’s distinction between local and corpus optimization. A path preferred by a more thoroughly solved surrogate can change several corpus totals at once. Whether that change helps depends on the other selected sentences. The paper’s reported experiment gives an example where pushing the local objective further is unnecessary for the best observed corpus result.
The list-size comparison probes a different choice, the representation of the candidates available for search. When the explicit list grows large enough to approach even SP, the oracle has been given more paths to inspect. This supports the diagnosis that ranking and list truncation can hide high-overlap candidates. The graph experiments add that the quality exposed by a compact candidate representation also depends on how effectively the oracle can search it.
Limitations
Limits stated by the authors
The paper confines the optimization to sentence-level objectives. Exact corpus BLEU oracle computation would choose a path for every sentence jointly, accounting for the shared precision totals and the corpus brevity penalty. The authors identify this as a further combinatorial problem and leave it outside the study. An exact shortest path under LB is exact for the linear replacement. The corpus BLEU of the resulting set of translations is an evaluation of that set.
The authors also emphasize the difficulty of direct clipped search. The complexity result they cite applies to an already restricted form of the problem, with only the shorter sequences and with the brevity penalty removed. Each proposed decoder therefore gains tractability by making choices about which qualities of BLEU to preserve and how thoroughly to search the resulting space. The linear method lets repeated matching sequences continue to earn credit. The clipped implementation concentrates on words and pairs. The relaxed implementation uses an iteration budget in the reported experiments.
The scope of the candidate space is another limit stated in the paper’s setup. The lattice represents the hypotheses surviving the original decoder’s pruning. Consequently, the oracle explores what the decoder retained. A graph oracle can expose alternatives omitted from the decoder’s explicit ranked list, while its access to alternatives discarded before lattice generation depends on how the graph was produced. The paper also treats the possible difficulty of other evaluation measures as an expectation. Its detailed methods and results concern BLEU and its substitutes.
The authors draw a strong diagnostic conclusion about the systems they study. They observe that the lattices contain good candidates under the evaluation measure and say the ordinary feature scores assess many of them poorly. Their discussion allows tuning to account for some of the effect. It also points to the difficulty of surfacing those hypotheses in a ranked list without taking the list to a size that the authors describe as impractical.
Limits visible in the experimental design
An oracle score measures what a reference-guided search actually recovers. When its objective is a surrogate, the score provides an achievable result from the retained candidates. Interpreting it as a ceiling for that lattice under corpus BLEU would require a joint optimum that the study leaves open. The same distinction applies to comparing two oracles. A stronger observed score shows that the chosen translations work better together under BLEU. It leaves open how much score might still be recovered by a different search on the same inputs.
The reference constrains what any reported improvement means. BLEU rewards overlap with reference wording and handles length through its own penalty. The experiments establish differences under that evaluation procedure. They supply no human assessment of whether oracle translations better preserve the source meaning or read more naturally. The paper itself names nonliteral references as one possible reason a candidate space might score poorly. That possibility also limits how directly one can turn the observed score gap into a statement about translation quality in use.
The experiments use three directions, two decoders, and the stated WMT training, tuning, and test setup. The evidence for the speed of LB-2g and the close scores from lower-order search comes from those inputs. Reusing discounts selected for N-code on Moses tests the methods with the same parameter values across those systems. It leaves open whether another parameter search, other graph structures, or other pruning choices would change the ordering. Likewise, the Moses preparation and the implementation choices belong to the measured timing conditions.
The clipping-aware formulations also deserve care when comparing their claims. The credited-count variables in the ILP permit a path with excess repetition and penalize the surplus. The derivation of RLX presents a bound on how often a reference word can occur in the selected path. These constraints put excess repetition in different places, which can matter when the graph offers few ways to avoid it. The results compare the implemented procedures and the corpus scores they obtain. They do not establish that the two formulations always select the same hypothesis or that a capped relaxation run certifies an optimum.
Finally, the large gaps between ordinary decoding and oracle outputs reveal an opportunity conditional on reference information. A deployable decoder has to choose using information available without the reference. The experiments neither train such a selector nor measure how much of the gap it could close. The strength of the diagnosis is narrower and concrete: for these tasks, a better-scoring translation can often be found among the hypotheses the system already retains, and the search method affects how much of that potential becomes visible.
What came after
There are no documented follow-on studies to trace here. The paper’s connections to reranking, discriminative training, and minimum Bayes-risk decoding describe earlier uses of oracle search or earlier sources of its methods. Its own experiments establish how the linear approximation and count-aware optimization can be used to inspect retained translation hypotheses.
Cite
Cite as Artem Sokolov, Guillaume Wisniewski and François Yvon. 2012. Computing Lattice BLEU Oracle Scores for Machine Translation. Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics.
@inproceedings{sokolov2012computing,
title = {{Computing Lattice BLEU Oracle Scores for Machine Translation}},
author = {Artem Sokolov, Guillaume Wisniewski and François Yvon},
booktitle = {Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics},
year = {2012},
url = {https://aclanthology.org/E12-1013/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/sokolov-2012-computing-lattice-bleu-oracle-scores/