<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="646"/><title>SCFG Decoding Without Binarization</title><pubinfo>Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing,pages 646-655, MIT, Massachusetts, USA, 9-11 October 2010. ©2010 Association for Computational Linguistics</pubinfo><author surname="Hopkins" givenname="Mark"><org  name="Language Weaver Inc." country="USA" city="Marina del Rey"/></author><author surname="Langmead" givenname="Greg"><org  name="Language Weaver Inc." country="USA" city="Marina del Rey"/></author></firstpageheader><frontmatter><p><b>SCFG Decoding Without Binarization</b></p><p><b>Mark Hopkins and Greg Langmead</b></p><p>SDL Language Weaver, Inc. 6060 Center Drive, Suite 150 Los Angeles, CA 90045</p><p>{mhopkins,glangmead}@languageweaver.com</p></frontmatter><abstract>Conventional wisdom dictates that syn­chronous context-free grammars (SCFGs) must be converted to Chomsky Normal Form (CNF) to ensure cubic time decoding. For ar­bitrary SCFGs, this is typically accomplished via the synchronous binarization technique of (Zhang et al., 2006). A drawback to this ap­proach is that it inflates the constant factors as­sociated with decoding, and thus the practical running time. (DeNero et al., 2009) tackle this problem by defining a superset of CNF called Lexical Normal Form (LNF), which also sup­ports cubic time decoding under certain im­plicit assumptions. In this paper, we make these assumptions explicit, and in doing so, show that LNF can be further expanded to a broader class of grammars (called "scope-3") that also supports cubic-time decoding. By simply pruning non-scope-3 rules from a GHKM-extracted grammar, we obtain better translation performance than synchronous bi-narization. </abstract></header><body><section number="1" title="Introduction"><p>At the heart of bottom-up chart parsing (Younger, 1967) is the following combinatorial problem. We have a context-free grammar (CFG) rule (for in­stance, S — NP VP PP) and an input sentence of length n (for instance, "on the fast jet ski of mr smith"). During chart parsing, we need to apply the rule to all relevant subspans of the input sentence. See Figure 1. For this particular rule, there are (n+<footnote anchor="1"/>) <i>application contexts, </i>i.e. ways to choose the sub­spans. Since the asymptotic running time of chart parsing is at least linear in this quantity, it will take</p><doubt alpha="100.0" length="5" tooSmall="False" monospace="0.0">smith</doubt><p>choice point choice       choice choice</p><doubt alpha="46.2" length="13" tooSmall="False" monospace="0.0">NP      VP PP</doubt><doubt alpha="0.0" length="7" tooSmall="False" monospace="0.0">^   \ \</doubt><doubt alpha="62.5" length="24" tooSmall="False" monospace="0.0">point        point point</doubt><p>Figure 1: A demonstration of application contexts. There are application contexts for the CFG rule "S — NP VP PP", where n is the length of the input sentence.</p><p>at least <i>O((n~+^ </i>) = O(n<footnote anchor="4"/>) time if we include this rule in our grammar.</p><p>Fortunately, we can take advantage of the fact that any CFG has an equivalent representation in Chom­sky Normal Form (CNF). In CNF, all rules have the form X — Y Z or X — x, where x is a termi­nal and X, Y, Z are nonterminals. If a rule has the form X — Y Z, then there are only (n+<footnote anchor="1"/>) applica­tion contexts, thus the running time of chart parsing is O^n+^ ) = O(n<footnote anchor="3"/>) when applied to CNF gram­mars.</p><p>A disadvantage to CNF conversion is that it in­creases both the overall number of rules and the overall number of nonterminals. This inflation of the "grammar constant" does not affect the asymp­totic runtime, but can have a significant impact on the performance in practice. For this reason, (DeN-<page local="2" global="647"/></p><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>on</b></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>fast</b></p></td><td class="cell"><p><b>jet</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>NP</b></p></td><td class="cell"><p><b>VP</b></p></td><td class="cell"><p><b>PP</b></p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>NP</b></p></td><td class="cell"><p><b>VP</b></p></td><td class="cell"><p><b>PP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>NP</b></p></td><td class="cell"><p><b>VP</b></p></td><td class="cell"><p><b>PP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>NP</b></p></td><td class="cell"><p><b>VP</b></p></td><td class="cell"><p><b>PP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>choice point choice point</p><p>Figure 2 A demonstration of application contexts for rules with lexical anchors. There are O(n) application contexts for CFG rule "S — the NPB of NNP", and O(n<footnote anchor="2"/> ) application contexts for CFG rule "S — the JJ NPB of NNP", if we assume that the input sentence has length n and contains no repeated words.</p><p>ero et al., 2009) provide a relaxation of CNF called Lexical Normal Form (LNF). LNF is a superclass of CNF that also allows rules whose right-hand sides have no consecutive nonterminals. The intuition is that the terminals provide anchors that limit the ap­plicability of a given rule. For instance, consider the rule NP — the NPB of NNP. See Figure 2. Because the terminals constrain our choices, there are only two different application contexts. The implicit as­sumption is that input sentences will not repeat the same word more than a small constant number of times. If we make the explicit assumption that all words of an input sentence are unique, then there are O(n<footnote anchor="2"/>) application contexts for a "no consecu­tive nonterminals" rule. Thus under this assumption, the running time of chart parsing is still O(n<footnote anchor="3"/>) when applied to LNF grammars.</p><p>But once we make this assumption explicit, it be­comes clear that we can go even further than LNF and still maintain the cubic bound on the runtime.</p><p>Consider the rule NP — the JJ NPB of NNP. This rule is not LNF, but there are still only O(n<footnote anchor="2"/>) ap­plication contexts, due to the anchoring effect of the terminals. In general, for a rule of the form X — 7, there are at most O(np) application contexts, where p is the number of consecutive nonterminal pairs in the string X 7• X (where X is an arbitrary nontermi­nal). We refer to p as the <i>scope </i>of a rule. Thus chart parsing runs in time O(nscope(G)), where scope(G) is the maximum scope of any of the rules in CFG G. Specifically, any scope-3 grammar can be decoded in cubic time.</p><p>Like (DeNero et al., 2009), the target of our in­terest is synchronous context-free grammar (SCFG) decoding with rules extracted using the GHKM al­gorithm (Galley et al., 2004). In practice, it turns out that only a small percentage of the lexical rules in our system have scope greater than 3. By simply re­moving these rules from the grammar, we can main­tain the cubic running time of chart parsing without any kind of binarization. This has three advantages. First, we do not inflate the grammar constant. Sec­ond, unlike (DeNero et al., 2009), we maintain the <i>synchronous </i>property of the grammar, and thus can integrate language model scoring into chart parsing. Finally, a system without binarized rules is consid­erably simpler to build and maintain. We show that this approach gives us better practical performance than a mature system that binarizes using the tech­nique of (Zhang et al., 2006).</p></section><section number="2" title="Preliminaries"><p>Assume we have a global vocabulary of <i>symbols, </i>containing the reserved <i>substitution symbol </i>0. De­fine a <i>sentence </i>as a sequence of symbols. We will typically use space-delimited quotations to represent example sentences, e.g. "the fast jet ski" rather than (the, fast, jet, ski). We will use the dot operator to represent the concatenation of sentences, e.g. "the fast" • "jet ski" = "the fast jet ski".</p><p>Define the <i>rank </i>of a sentence as the count of its 0 symbols. We will use the no­tation SUB(s,s1 <i>,...,S</i><i>k) </i>to denote the substitu­tion of k sentences s1,...,sk into a k-rank sen­tence s. For instance, if s = "the 0 0 of 0", then SUB(s, "fast", "jet ski", "mr smith") = "the fast jet ski of mr smith".</p><p>To refer to a subsentence, define a <i>span </i>as a pair [a, b] of nonnegative integers such that a &lt; b. For a sentence s = (s1, s2,sn) and a span [a, b] such that b &lt; n, define s^j = (sa+i,s6).</p><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>on</b></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>fast</b></p></td><td class="cell"><p><b>jet</b></p></td><td class="cell"><p><b>ski</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>mr</b></p></td><td class="cell"><p><b>smith</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>choice point</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>on</b></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>fast</b></p></td><td class="cell"><p><b>jet</b></p></td><td class="cell"><p><b>ski</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>mr</b></p></td><td class="cell"><p><b>smith</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>JJ</b></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>JJ</b></p></td><td class="cell"><p></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"><p></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>JJ</b></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>JJ</b></p></td><td class="cell"><p></p></td><td class="cell"><p><b>NPB</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>NNP</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="3" global="648"/><doubt alpha="54.5" length="11" tooSmall="False" monospace="0.0">PP -&gt; on NP</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">I</doubt><doubt alpha="63.6" length="22" tooSmall="False" monospace="0.0">NP -&gt; the JJ NN of NNP</doubt><p>JJ -&gt; fast NN -&gt; jet ski NNP -&gt; mr smith</p><doubt alpha="45.8" length="24" tooSmall="False" monospace="0.0">PP -&gt; &lt; on NP1;sur NP1&gt;\</doubt><doubt alpha="56.8" length="44" tooSmall="False" monospace="0.0">NP -&gt; &lt; the JJ1NN2of NNP3, le NN2JJ1de NNP3&gt;</doubt><doubt alpha="49.4" length="81" tooSmall="False" monospace="0.0">JJ -&gt; &lt; fast, vite &gt;    NN -&gt; &lt; jet ski, jet ski &gt;   NNP -&gt; &lt; mr smith, m smith &gt;</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">Ci</doubt><doubt alpha="75.0" length="4" tooSmall="False" monospace="0.0">ric3</doubt><doubt alpha="50.0" length="2" tooSmall="False" monospace="0.0">C5</doubt><p>Figure 3 An example CFG derivation (above) and an ex­ample SCFG derivation (below). Both derive the sen­tence sub("on 0", sub( "the 0 0 of 0", "fast", "jet ski", "mr smith") ) = "on the fast jet ski of mr smith". The SCFG derivation simultaneously derives the auxil­iary sentence "sur le jet ski vite de m smith".</p></section><section number="3" title="Minimum Derivation Cost"><p>Chart parsing solves a problem which we will re­fer to as Minimum Derivation Cost. Because we want our results to be applicable to both CFG decod­ing and SCFG decoding with an integrated language model, we will provide a somewhat more abstract formulation of chart parsing than usual.</p><p>In Figure 3, we show an example of a CFG deriva­tion. A derivation is a tree of CFG rules, constructed so that the <i>preconditions </i>(the RHS nonterminals) of any rule match the <i>postconditions </i>(the LHS nonter­minal) of its child rules. The purpose of a derivation is to <i>derive </i>a sentence, which is obtained through recursive substitution. In the example, we substitute "fast", "jet ski", and "mr smith" into the lexical <i>pat­tern </i>"the 0 0 of 0" to obtain "the fast jet ski of mr smith". Then we substitute this result into the lexi­cal pattern "on 0" to obtain "on the fast jet ski of mr smith".</p><p>The cost of a derivation is simply the sum of the base costs of its rules. Thus the cost of the CFG derivation in Figure 3 is C1 + C2 + C3 + C4 + C5, where C1 is the base cost of rule "PP — on NP", etc. Notice that this cost can be distributed locally to the nodes of the derivation (Figure 4).</p><p>An SCFG derivation is similar to a CFG deriva-</p><p>Figure 4 The cost of the CFG derivation in Figure 3 is <i>C1 </i>+ <i>C2 </i>+ C3 + C4 + C5, where C1 is the base cost of rule "PP — on NP", etc. Notice that this cost can be distributed locally to the nodes of the derivation.</p><p>tion, except that it simultaneously derives two sen­tences. For instance, the SCFG derivation in Fig­ure 3 derives the sentence pair ( "on the fast jet ski of mr smith", "sur le jet ski vite de m smith" ). In machine translation, often we want the cost of the SCFG derivation to include a language model cost for this second sentence. For example, the cost ofthe SCFG derivation in Figure 3 might be C1+C2+C3+ C4+C5+LM (sur le)+LM (le jet) +LM (jet ski) + LM(ski de) + LM(de m) + LM(m smith), where LM is the negative log of a 2-gram language model. This new cost function can also be distributed lo­cally to the nodes of the derivation, as shown in Fig­ure 5. However, in order to perform the local com­putations, we need to pass information (in this case, the LM boundary words) up the tree. We refer to this extra information as <i>carries. </i>Formally, define a <i>carry </i>as a sentence of rank 0.</p><p>In order to provide a chart parsing formulation that applies to both CFG decoding and SCFG de­coding with an integrated language model, we need abstract definitions of rule and derivation that cap­ture the above concepts of <i>pattern, postcondition, preconditions, cost, </i>and <i>carries.</i></p><subsection number="3.1" title="Rules"><p>Define a <i>rule </i>as a tuple (k, s*, X, n, r, c), where k is a nonnegative integer called the <i>rank, </i>s* is a rank-k<page local="4" global="649"/></p><doubt alpha="56.8" length="44" tooSmall="False" monospace="0.0">NP -&gt; &lt; the JJ1NN2of NNP3, le NN2JJ1de NNP3&gt;</doubt><doubt alpha="45.0" length="20" tooSmall="False" monospace="0.0">C1+ LM(surle)'|^^^^J</doubt><doubt alpha="58.1" length="43" tooSmall="False" monospace="0.0">C2+ LM(le jet) + LM(ski vite) + LM(vite de)</doubt><doubt alpha="50.0" length="10" tooSmall="False" monospace="0.0">+ LM(de m)</doubt><doubt alpha="50.0" length="20" tooSmall="False" monospace="0.0">JJ -&gt; &lt; fast, vite &gt;</doubt><doubt alpha="53.8" length="26" tooSmall="False" monospace="0.0">NN -&gt; &lt; jet ski, jet ski &gt;</doubt><doubt alpha="60.0" length="15" tooSmall="False" monospace="0.0">C4+ LM(jet ski)</doubt><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">1</doubt><doubt alpha="60.0" length="15" tooSmall="False" monospace="0.0">C5+ LM(m smith)</doubt><p><b>postcondition   preconditions     postcondition   preconditions rank</b></p><doubt alpha="52.8" length="53" tooSmall="False" monospace="0.0">NP -&gt; the JJ NN of NNP      NP -&gt; &lt; theJJ1NN2of NNP3,</doubt><doubt alpha="50.0" length="8" tooSmall="False" monospace="0.0">rank = 3</doubt><doubt alpha="64.7" length="17" tooSmall="False" monospace="0.0">le NN2JJ1de NNP3&gt;</doubt><p>Figure 5 The cost of the SCFG derivation in Figure 3 (with an integrated language model score) can also be dis­tributed to the nodes of the derivation, but to perform the local computations, information must be passed up the tree. We refer to this extra information as a <i>carry.</i></p><p>sentence called the <i>pattern </i><footnote anchor="1"/>, X is a symbol called the <i>postcondition, </i>n is a k-length sentence called the <i>preconditions, </i>r is a function (called the <i>carry func­tion) </i>that maps a k-length list of carries to a carry, and c is a function (called the <i>cost function) </i>that maps a k-length list of carries to a real number. Fig­ure 6 shows a CFG and an SCFG rule, deconstructed according to this definition. <footnote anchor="2"/> Note that the CFG rule has trivial cost and carry functions that map every­thing to a constant. We refer to such rules as <i>simple.</i></p><p>We will use post(r) to refer to the postcondition of rule r, and pre(r, i) to refer to the ith precondition of rule r.</p><p>Finally, define a <i>grammar </i>as a finite set of rules. A grammar is <i>simple </i>if all its rules are simple.</p></subsection><subsection number="3.2" title="Derivations"><p>For a grammar R, define deriv(R) as the smallest set that contains every tuple (r, 51,ök) satisfying the following conditions</p><footnote label="1">For simplicity, we also impose the condition that "0" is not a valid pattern. This is tantamount to disallowing unary rules.</footnote><footnote label="2">One possible point of confusion is why the pattern of the SCFG rule refers only to the primary sentence, and not the aux­iliary sentence. To reconstruct the auxiliary sentence from an SCFG derivation in practice, one would need to augment the abstract definition of rule with an auxiliary pattern. However this is not required for our theoretical results.</footnote><p>Figure 6 Deconstruction of a CFG rule (left) and SCFG rule (right) according to the definition of rule in Sec­tion 3.1. The carry function of the SCFG rule computes boundary words for a 2-gram language model. In the cost functions, C is a real number and LM returns the negative log of a language model query.</p><p>• r G R is a k-rank rule</p><doubt alpha="63.0" length="27" tooSmall="False" monospace="0.0">•öiGderiv(R)for all1&lt; i &lt; k</doubt><p>• pre(r, i) = post(r) for all 1 &lt; i &lt; k, where <i>ri</i>is the first element of tuple</p><p>An <i>R-derivation </i>is an element of deriv(R). Con­sider a derivation ö = (r,ö1,...,ök), where rule r = (k,s*,X, n, r, c). Define the following prop­erties</p><doubt alpha="63.0" length="81" tooSmall="False" monospace="0.0">post(ö)=post(r)sent(ö)=sub(s*,sent(ö1),sent(ök))carry(ö)= r(carry(Ö1),carry(öfc))</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">k</doubt><doubt alpha="61.0" length="41" tooSmall="False" monospace="0.0">cost(ö)=c(carry(ö1),carry(ök)) +^cost(öj)</doubt><doubt alpha="33.3" length="3" tooSmall="False" monospace="0.0">j=1</doubt><p>In words, we say that derivation ö <i>derives </i>sen­tence sent(ö). If for some span <i>a </i>of a particular sen­tence s, it holds that sent(ö) = <i>sa</i>, then we will say that ö is a derivation <i>over </i>span a.</p></subsection><subsection number="3.3" title="Problem Statement"><p>The Minimum Derivation Cost problem is the fol­lowing. Given a set R of rules and an input sentence<page local="5" global="650"/></p><doubt alpha="40.0" length="15" tooSmall="False" monospace="0.0">PP -&gt; &lt; on NP1#</doubt><doubt alpha="62.5" length="8" tooSmall="False" monospace="0.0">sur NP1&gt;</doubt><doubt alpha="55.6" length="18" tooSmall="False" monospace="0.0">NNP -&gt; &lt; mr smith,</doubt><doubt alpha="66.7" length="9" tooSmall="False" monospace="0.0">m smith &gt;</doubt><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>pattern</b></p></td><td class="cell"><p>the 0 0 of 0</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>carry function</b></p></td><td class="cell"><p><b>r( "" , "" , "" ) = </b>""</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>cost function</b></p></td><td class="cell"><p><b>c( "" , "" , "" ) = </b>C</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>pattern</b></p></td><td class="cell"><p>the 0 0 of 0</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>carry function</b></p></td><td class="cell"><p><b>r( "u*v" , "w*x" , "y*z" )</b></p><p><b>= </b>"le * z"</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>cost function</b></p></td><td class="cell"><p><b>C( "u*v" , "W*X" , "y*z" )</b></p><p><b>= </b>C + LM(w|le) + LM(u|x) + LM(de|v) + LM(y|de)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><doubt alpha="0.0" length="12" tooSmall="False" monospace="0.0">012   345678</doubt><p>Figure 7 An application context for the pattern "the 0 0 of0" andthe sentence "onthe fastjetski ofmrsmith".</p><p>s, find the minimum cost of any R-derivation that derives s. In other words, compute</p><p>MinDCost(R, s) = min cost(ö)</p><doubt alpha="50.0" length="22" tooSmall="False" monospace="0.0">&lt;5€deriv(ß)|sent(&lt;5)=s</doubt></subsection></section><section number="4" title="Application Contexts"><p>Chart parsing solves Minimum Derivation Cost via dynamic programming. It works by building deriva­tions over increasingly larger spans of the input sen­tence s. Consider just one of these spans a. How do we build a derivation over that span?</p><p>Recall that a derivation takes the form (r,ö1,...,ök). Given the rule r and its pattern s*, we need to choose the subderivations öi such that sub(s*, sent(ö1),sent(ök)) = <i>sa</i>. To do so, we must match the pattern to the span, so that we know which subspans we need to build the subderivations over. Figure 7 shows a matching of the pattern "the 0 0 of 0" to span [1,8] of the sentence "on the fast jet ski of mr smith". It tells us that we can build a derivation over span [1, 8] by choosing this rule and subderivations over subspans [2, 3], [3, 5], and [6, 8].</p><p>We refer to these matchings as <i>application con­texts. </i>Formally, given two sentences s* and s of respective lengths m and n, define an (s*,s)-<i>context </i>as an monotonically increasing sequence (xo,x1, ...,xm) of integers between 0 and n such that for all i</p><doubt alpha="52.5" length="40" tooSmall="False" monospace="0.0">s*i-1,i]=0impliesthats*i-1,i]=s[xi-i,*;]</doubt><p>The context shown in Figure 7 is (1, 2, 3, 5, 6, 8). Use cxt(s*,s) to denote the set of all (s*,s)-contexts.</p><p>An (s*, s)-context x = (x0, x1,xm) has the following properties</p><doubt alpha="46.8" length="62" tooSmall="False" monospace="0.0">span(x; s*,s) = [xo,xm]subspans(x; s*,s) = ([xo,x1],[xm_1,xm])</doubt><p>Moreover, define varspans(x;s*,s) as the sub­sequence of subspans(x; s*,s) including only [xi-1,xi] suchthat s*i-1i] = 0. For the context x shown in Figure 7</p><doubt alpha="22.5" length="129" tooSmall="False" monospace="0.0">span(x; s*, s) = [1, 8]subspans(x; s*, s) = ([1, 2], [2, 3], [3, 5], [5, 6], [6, 8])varspans(x; s*, s) = ([2, 3], [3, 5], [6, 8])</doubt><p>An application context x G cxt(s*, s) tells us that we can build a derivation over span(x) by choosing a rule with pattern s* and subderivations over each span in varspans(x; s*, s).</p></section><section number="5" title="Chart Parsing Algorithm"><p>We are now ready to describe the chart parsing al­gorithm. Consider a span a of our input sentence s and assume that we have computed and stored all derivations over any subspan of a. A naive way to compute the minimum cost derivation over span a is to consider every possible derivation 1. Choose arule r = (k,s*,X, n, r,c).</p><p>2. Choose an application context x G cxt(s*, s) such that span(x; s*, s) = a.</p><p>3. For each subspan ai  G  varspans(x; s*,s), choose a subderivation öi such that post(öi) =</p><p>pre(r, i).</p><p>The key observation here is the following. In or­der to score such a derivation, we did not actually need to know each subderivation in its entirety. We merely needed to know the following information about it (a) the subspan that it derives, (b) its post­condition, (c) its carry.</p><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><b>on</b></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>fast</b></p></td><td class="cell"><p><b>jet</b></p></td><td class="cell"><p><b>ski</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>mr</b></p></td><td class="cell"><p><b>smith</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p><b>the</b></p></td><td class="cell"><p><b>0</b></p></td><td class="cell"><p><b>0</b></p></td><td class="cell"><p><b>of</b></p></td><td class="cell"><p><b>0</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="6" global="651"/><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">k</doubt><p>1. Choose arule r = (k,s*,X, n, r,c).</p><p>2. Choose an application context x G cxt(s*, s) such that span(x; s*, s) = a.</p><p>Chart parsing takes advantage of the above obser­vation to avoid building all possible derivations. In­stead it groups together derivations that share a com­mon subspan, postcondition, and carry, and records only the minimum cost for each equivalence class. It records this cost in an associative map referred to as the <i>chart.</i></p><p>Specifically, assume that we have computed and stored the minimum cost of every derivation class (a',X',7/), where X' is a postcondition, 7' is a carry, and a' is a proper subspan of a. Chart pars­ing computes the minimum cost of every derivation class (a, X, 7) by adapting the above naive method as follows</p><p>3. For each subspan ai G varspans(x; s*,s), <b>choosea derivation class </b>(ai, Xi, 7i) <b>fromthe chart </b>such that Xi = pre(r, i).</p></section><section number="4." title="Update 3 the   cost   of  derivation class"><doubt alpha="41.4" length="29" tooSmall="False" monospace="0.0">(a,post(r),r(71,...,7k))with:</doubt><doubt alpha="38.7" length="31" tooSmall="False" monospace="0.0">c(71,...,7k) +^ chart[ai,Xi,7i]</doubt><doubt alpha="33.3" length="3" tooSmall="False" monospace="0.0">i=1</doubt><p><b>where </b>chart[ai, Xi, 7i] <b>refers to the stored cost of derivation class </b>(ai, Xi, 7i).</p><p>By iteratively applying the above method to all sub­spans of size 1, 2, etc., chart parsing provides an efficient solution for the Minimum Derivation Cost problem.</p></section><section number="6" title="Runtime Analysis"><p>At the heart of chart parsing is a single operation the updating of a value in the chart. The running time is linear in the number of these chart updates. <footnote anchor="4"/> The typical analysis counts the number of chart updates <i>per span. </i>Here we provide an alternative analysis that counts the number of chart updates <i>per rule.</i><i> </i>This provides us with a finer bound with prac­tical implications.</p><footnote label="3">Here, update means "replace the cost associated with the class if the new cost is lower."</footnote><footnote label="4">This assumes that you can linearly enumerate the relevant updates. One convenient way to do this is to frame the enumer­ation problem as a search space, e.g. (Hopkins and Langmead, 2009)</footnote><p>Let r be a rule with rank k and pattern s*. Con­sider the chart updates involving rule r. There is (potentially) an update for every choice of (a) span, (b) application context, and (c) list of k derivation classes. If we let <i>C </i>be the set of possible carries, then this means there are at most |cxt(s*, s)| • |C|kupdates involving rule r. <footnote anchor="5"/> If we are doing beam de­coding (i.e. after processing a span, the chart keeps only the B items of lowest cost), then there are at most |cxt(s*, s)| • Bk updates.</p><p>We can simplify the above by providing an upper bound for |cxt(s*,s)|. Define an <i>ambiguity </i>as the sentence "0 0", and define scope(s*) as the number of ambiguities in the sentence "0" -s*- "0". The following bound holds <b>Lemma 1.</b><b> </b><i>Assume that a zero-rank sentence </i>s <i>does not contain the same symbol more than once. Then </i>|cxt(s*,s)| &lt; |s|scope(s*).</p><p><i>Proof. </i>Suppose s* and s have respective lengths m and n. Consider (x0, x1,xm) G cxt(s*,s). Let / be the set of integers i between 1 and m such that s* = 0 and let 1+ be the set of integers i between 0 and m — 1 such that s*+1 = 0. If i G /, then we know the value of xi, namely it is the unique integer j such that <i>sj</i><i> </i>= s*. Similarly, if i G / +, then the value of xi must be the unique integer j such that sj = s*+1. Thus the only nondetermined elements of context xi are those for which i G 1U /+. Hence</p><doubt alpha="30.4" length="46" tooSmall="False" monospace="0.0">|cxt(s*,s)| &lt; |s|{0&gt;1-"m}-/-/+= |s|scope(s*).□</doubt><p>Hence, under the assumption that the input sen­tence s does not contain the same symbol more than once, then there are at most |s|scope(s*) • |£|k chart updates involving a rule with pattern s*.</p><p>For a rule r with pattern s*, define scope(r) = scope(s*). For a grammar R, define scope(R) = maxreRscope(r) and rank(R) = maxreR rank(r).</p><p>Given a grammar R and an input sentence s, the above lemma tells us that chart parsing makes<page local="7" global="652"/></p><footnote label="5">For instance, in SCFG decoding with an integrated j-gram language model, a carry consists of 2(j — 1) boundary words. Generally it is assumed that there are O(n) possible choices for a boundary word, and hence O(n 2(j-1) ) possible carries.</footnote><p>O(|s|scope(R) • |c|rank(R)) chart updates. If we re­strict ourselves to beam search, than chart parsing makes O(|s|scope(R)) chart updates. <footnote anchor="6"/></p><subsection number="6.1" title="On the Uniqueness Assumption"><p>In practice, it will not be true that each input sen­tence contains only unique symbols, but it is not too far removed from the practical reality of many use cases, for which relatively few symbols repeat them­selves in a given sentence. The above lemma can also be relaxed to assume only that there is a con­stant upper bound on the multiplicity of a symbol in the input sentence. This does not affect the O-bound on the number of chart updates, as long as we further assume a constant limit on the length of rule patterns.</p></subsection></section><section number="7" title="Scope Reduction"><p>From this point of view, CNF binarization can be viewed as a specific example of <i>scope reduction. </i>Suppose we have a grammar R of scope p. See Fig­ure 8. If we can find a grammar <i>R </i>of scope p &lt; p which is "similar" to grammar R, then we can de­code in O(np) rather than O(np) time.</p><p>We can frame the problem by assuming the fol­lowing parameters• a grammar R</p><p>• a desired scope p</p><p>• a loss function A that returns a (non-negative real-valued) score for any two grammars R and <i>R</i>; if A(R, R) = 0, then the grammars are con­sidered to be equivalent</p><p>A <i>scope reduction method with loss </i>A finds a gram­mar R such that scope(R) &lt; p and A(R, R) = A. A scope reduction method is <i>lossless </i>when its loss is 0.</p><p>In the following sections, we will use the loss function where s is a fixed input sentence. Observe that if A(R, R) = 0, then the solution to the Minimum</p><doubt alpha="60.5" length="38" tooSmall="False" monospace="0.0">A(R,R)=|MinDCost(R,s) —MinDCost(R, s)|</doubt><footnote label="6">Assuming rank(R) is bounded by a constant.</footnote><p>Figure 8 The "scope reduction" problem. Given a gram­mar of large scope, find a similar grammar of reduced scope.</p><p>Derivation Cost problem is the same for both R and</p><doubt alpha="33.3" length="3" tooSmall="False" monospace="0.0">R.7</doubt><subsection number="7.1" title="CNF Binarization"><p>A rule r is <i>CNF </i>if its pattern is "0 0" or "x", where x is any non-substitution symbol. A grammar is <i>CNF </i>if all of its rules are CNF. Note that the maximum scope of a CNF grammar is 3.</p><p><i>CNF binarization </i>is a deterministic process that maps a simple grammar to a CNF grammar. Since binarization takes subcubic time, we can decode with any grammar R in O(n<footnote anchor="3"/>) time by converting R to CNF grammar R, and then decoding with R. This is a lossless scope reduction method.</p><p>What if grammar R is not simple? For SCFG grammars, (Zhang et al., 2006) provide a scope reduction method called <i>synchronous binarization </i>with quantifiable loss. Synchronous binarization se­lects a "binarizable" subgrammar R' of grammar R, and then converts R' into a CNF grammar R. The cost and carry functions of these new rules are con­structed such that the conversion from R' to <i>R </i>is a lossless scope reduction. Thus the total loss of the method is |MinDCost(R, s) —MinDCost(R', s)|. Fortunately, they find in practice that R' usually con­tains the great majority of the rules of R, thus they<page local="8" global="653"/></p><footnote label="7">Note that if we want the actual derivation and not just its cost, then we need to specify a more finely grained loss func­tion. This is omitted for clarity and left as an exercise.</footnote><p>AE Lexical   ^*CE Lexical   «^AE Nonlexical   ^CE Nonlexical</p><figure caption="Figure 9: A selection of rule patterns that are scope &lt; 3"></figure><p>but not LNF or CNF.</p><p>assert that this loss is negligable.</p><p>A drawback of their technique is that the resulting CNF grammar contains many more rules and post­conditions than the original grammar. These con­stant factors do not impact asymptotic performance, but do impact practical performance.</p></subsection><subsection number="7.2" title="Lexical Normal Form"><p>Concerned about this inflation of the grammar con­stant, (DeNero et al., 2009) consider a superset of CNF called Lexical Normal Form (LNF). A rule is <i>LNF </i>if its pattern does not contain an ambiguity as a proper subsentence (recall that an ambiguity was defined to be the sentence "0 0"). Like CNF, the maximum scope of an LNF grammar is 3. In the worst case, the pattern s* is "0 0", in which case there are three ambiguities in the sentence "0" •s^</p><p>"0".</p><p>(DeNero et al., 2009) provide a lossless scope reduction method that maps a simple grammar to an LNF grammar, thus enabling cubic-time decod­ing. Their principal objective is to provide a scope reduction method for SCFG that introduces fewer postconditions than (Zhang et al., 2006). However unlike (Zhang et al., 2006), their method <i>only </i>ad­dresses simple grammars. Thus they cannot inte­grate LM scoring into their decoding, requiring them to rescore the decoder output with a variant of cube growing (Huang and Chiang, 2007).</p><p>Figure 10: Breakdown of rules by scope (average per sen­tence in our test sets). In practice, most of the lexical rules applicable to a given sentence (95% for Arabic-English and 85% for Chinese-English) are scope 3 or less.</p></subsection><subsection number="7.3" title="Scope Pruning"><p>To exercise the power of the ideas presented in this paper, we experimented with a third (and very easy) scope reduction method called <i>scope pruning. </i>If we consider the entire space of scope-3 grammars, we see that it contains a much richer set of rules than those permitted by CNF or LNF. See Figure 9 for examples. Scope pruning is a lossy scope reduc­tion method that simply takes an arbitrary grammar and prunes all rules with scope greater than 3. By not modifying any rules, we preserve their cost and carry functions (enabling integrated LM decoding), without increasing the grammar constant. The prac­tical question is: how many rules are we typically pruning from the original grammar?</p><p>We experimented with two pretrained syntax-based machine translation systems with rules ex­tracted via the GHKM algorithm (Galley et al., 2004). The first was an Arabic-English system, with rules extracted from 200 million words of parallel data from the NIST 2008 data collection, and with a 4-gram language model trained on 1 billion words of monolingual English data from the LDC Giga-word corpus. We evaluated this system's perfor­mance on the NIST 2008 test corpus, which con­sists of 1357 Arabic sentences from a mixture of newswire and web domains, with four English refer­ence translations. The second system was a Chinese-<page local="9" global="654"/></p><table class="main" frame="box" rules="all" border="0" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a 00</p></td><td class="cell"><p>a b 0 0 c</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>00 a</p></td><td class="cell"><p>0a 00b</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a 00 b</p></td><td class="cell"><p>a 0b 00</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>0a 00</p></td><td class="cell"><p>00a 0b</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>00a 0</p></td><td class="cell"><p>000a b</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>000 a</p></td><td class="cell"><p>a 000b</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a 000</p></td><td class="cell"><p>a 0 0 b 0 c</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a b 00</p></td><td class="cell"><p>a 0000b</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>00a b</p></td><td class="cell"><p>a 00 b c 00 d</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a 00b 0</p></td><td class="cell"><p>a 0000 b 0 c 0 d</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a 0 0 b c</p></td><td class="cell"><p>a 00b 00c 00d</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>Arabic-English</p><p>Chinese-English</p><p>Figure 11: Speed-quality tradeoffcurves comparing thebaseline scope reductionmethod ofsynchronous binarization (dark gray diamonds) with scope-3 pruning (light gray squares).</p><p>English system, with rules extracted from 16 million words of parallel data from the mainland-news do­main of the LDC corpora, and with a 4-gram lan­guage model trained on monolingual English data from the AFP and Xinhua portions of the LDC Gi-gaword corpus. We evaluated this system's perfor­mance on the NIST 2003 test corpus, which con­sists of 919 Chinese sentences, with four English reference translations. For both systems, we report BLEU scores (Papineni et al., 2002) on untokenized, recapitalized output.</p><p>In practice, how many rules have scope greater than 3? To answer this question, it is useful to dis­tinguish between <i>lexical </i>rules (i.e. rules whose pat­terns contain at least one non-substitution symbol) and <i>non-lexical </i>rules. Only a subset of lexical rules are potentially applicable to a given input sentence. Figure 10 shows the scope profile of these applicable rules (averaged over all sentences in our test sets). Most of the lexical rules applicable to a given sen­tence (95% for Arabic-English, 85% for Chinese-English) are scope 3 or less. <footnote anchor="8"/> Note, however, that scope pruning also prunes a large percentage ofnon-lexical rules.</p><p>Figure 11 compares scope pruning with the base­line technique of synchronous binarization. To gen­erate these speed-quality tradeoff curves, we de­coded the test sets with 380 different beam settings. We then plotted the hull of these 380 points, by elim­inating any points that were dominated by another (i.e. had better speed and quality). We found that this simple approach to scope reduction produced a better speed-quality tradeoff than the much more complex synchronous binarization. <footnote anchor="9"/><page local="10" global="655"/></p><footnote label="8">For contrast, the corresponding numbers for LNF are 64% and 53%, respectively.</footnote><footnote label="9">We also tried a hybrid approach in which we scope-pruned</footnote></subsection></section><section number="8" title="Conclusion"><p>In this paper, we made the following contributions:</p><p>• We provided an abstract formulation of chart parsing that generalizes CFG decoding and SCFG decoding with an integrated LM.</p><p>• We framed <i>scope reduction </i>as a first-class ab­stract problem, and showed that CNF binariza-tion and LNF binarization are two specific solu­tions to this problem, each with their respective advantages and disadvantages.</p><p>• We proposed a third scope reduction technique called <i>scope pruning, </i>and we showed that it can outperform synchronous CNF binarization for particular use cases.</p><p>Moreover, this work gives formal expression to the extraction heuristics of hierarchical phrase-based translation (Chiang, 2007), whose directive not to extract SCFG rules with adjacent nonterminals can be viewed as a preemptive pruning of rules with scope greater than 2 (more specifically, the prun­ing of non-LNF lexical rules). In general, this work provides a framework in which different approaches to <i>tractability-focused </i>grammar construction can be compared and discussed.</p><p>Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic eval­uation of machine translation. In <i>Proceedings of 40th Annual Meeting of the Association for Computational Linguistics, </i>pages 311-318.</p><p>Daniel Younger. 1967. Recognition and parsing of context-free languages in time n<footnote anchor="3"/>. <i>Information and Control, </i>10(2):189-208.</p><p>Hao Zhang, Liang Huang, Daniel Gildea, and Kevin Knight. 2006. Synchronous binarization for machine translation. In <i>Proceedings ofthe Human Language Technology Conference ofthe NAACL, Main Confer­ence, </i>pages 256-263.</p></section><references><p>David Chiang. 2007. Hierarchical phrase-based transla­tion. <i>Computational Linguistics, </i>33(2):201-228.</p><p>JohnDeNero, MohitBansal, AdamPauls, andDanKlein. 2009. Efficient parsing for transducer grammars. In <i>Proceedings ofthe Human Language Technology Con­ference ofthe NAACL, Main Conference.</i><i> </i>Michel Galley, Mark Hopkins, Kevin Knight, and Daniel Marcu. 2004. What's in a translation rule? In <i>Pro­ceedings ofHLT/NAACL.</i></p><p>Mark Hopkins and Greg Langmead. 2009. Cube pruning as heuristic search. In <i>Proceedings ofEMNLP.</i></p><p>Liang Huang and David Chiang. 2007. Forest rescoring: Faster decoding with integrated language models. In <i>Proceedings ofACL.</i></p><p>the lexical rules and synchronously binarized the non-lexical rules. This had a similar performance to scope-pruning all rules. The opposite approach of scope-pruning the lexical rules and synchronously binarizing the non-lexical rules had a similar performance to synchronous binarization.</p></references></body></article>