<?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="66"/><title>Frontier Pruning for Shift-Reduce CCG Parsing</title><author surname="Merity" givenname="Stephen"><org  name="University of Sydney" country="Australia" city="Sydney"/></author><author surname="Curran" givenname="James"><org  name="University of Sydney" country="Australia" city="Sydney"/></author></firstpageheader><frontmatter><p><b>Frontier Pruning for Shift-Reduce </b><b>CCG </b><b>Parsing</b></p><p><b>Stephen Merity </b>and <b>James R. Curran</b></p><p>School of Information Technologies University of Sydney NSW 2006, Australia {smerity, james}@it.usyd.edu.au</p></frontmatter><abstract>We apply the graph-structured stack (gss) to shift-reduce parsing in a Combinatory Cate-gorial Grammar (ccg) parser. This allows the shift-reduce parser to explore all possible parses in polynomial time without resorting to heuristics, such as beam search. The gss-based shift-reduce parser is 34% slower than cky in the finely-tuned C&amp;C parser. We per­form <i>frontier pruning </i>on the gss, increasing the parsing speed to be competitive with the C&amp;C parser with a small accuracy penalty. </abstract></header><body><section number="1" title="Introduction"><p>Parsing is a vital component of sophisticated natu­ral language processing (nlp) systems that require deep and accurate semantic interpretation, including question answering and summarisation. Unfortu­nately, the complexity of natural languages results in substantial ambiguity. For even a typical sentence, thousands of potential analyses may be considered by a wide-coverage parser, making parsing imprac­tical for large-scale applications.</p><p>Several methods have been proposed to improve parsing speed, including supertagging (Bangalore and Joshi, 1999; Clark and Curran, 2004; Kummer­feld et al., 2010), coarse-to-fine parsing (Charniak and Johnson, 2005; Pauls and Klein, 2009), chart repair (Djordjevic, 2006), chart constraints (Roark and Hollingshead, 2009), structure caching (Daw-born and Curran, 2009) and chart pruning (Zhang et al., 2010). These heuristic methods offer a trade­off between accuracy and speed. A* parsing (Klein and Manning, 2003) offers speed increases with no reduction in accuracy. For parsers optimised for speed, the overhead required by additional efficiency techniques can exceed the speed gains they provide (Dawborn and Curran, 2009). As mistakes made in the parsing phase propagate to later stages, high speed but low accuracy parsers may not be useful in nlp systems (Chang et al., 2006).</p><p>In this paper, we modify the C&amp;C (Clark and Cur­ran, 2007) Combinatory Categorial Grammar (ccg) parser to enable shift-reduce (sr) parsing. The Cocke-Kasami-Younger (cky) algorithm (Kasami, 1965; Younger, 1967) is replaced with the shift-reduce algorithm (Aho and Ullman, 1972). How­ever, back-tracking in shift-reduce parsers make them exponential in the worst case.</p><p>To eliminate this duplication of work, a graph-structured stack (gss; Tomita, 1988) is employed. This is the equivalent, for shift-reduce parsing, of the chart in cky parsing, which stores all possible parse states compactly and enables polynomial time worst-case complexity. Due to the incremental na­ture of shift-reduce parsing, we can perform prun­ing of the parse state in the process of considering the next word (the frontier). Our <i>frontier pruning </i>model is an averaged perceptron trained to recognise the highest-scoring derivation that the C&amp;C parser would have selected. By eliminating unlikely derivations , we substantially decrease the amount of ambiguity that the parser is required to handle.</p><p>The gss sr parser considers all the derivations that the C&amp;C parser would consider, but is 34% slower. When frontier pruning is applied, incremen­tal parsing speed is improved by 39% relative to the gss parser with a negligible impact on accuracy.</p><p>Stephen Merity and James R. Curran. 2011. Frontier Pruning for Shift-Reduce CCG Parsing . In <i>Proceedings of Australasian Language Technology Association Workshop, </i>pages 66—75<page local="2" global="67"/></p></section><section number="2" title="CCG Parsing"><p>Combinatory Categorial Grammar (ccg; Steedman, 2000) is a lexicalised grammar formalism that incor­porates both constituent structure and dependency information into its analyses.</p><p>In ccg, each word is assigned a category which encodes sub-categorisation information. Categories may be <i>atomic, </i>such as N and S ; or <i>complex, </i>such as <i>NP</i><i>/N</i><i> </i>for a word that requires an N to the right to produce an NP. Similarly, S\NP is an intran­sitive verb and produces a sentence when an NP is found to the left. Finally, a transitive verb receives (S\NP)/NP as it consumes an NP on the right, producing a verb phrase. Figure 1 shows two exam­ples of ccg derivations with lexical categories as­signed to each word. Both examples also provide the word saw with the (S\NP)/NP category.</p><p>Lexicalised grammars typically have a small set of rules (the <i>combinatory rules </i>in ccg) and instead rely on categories that describe a word's syntactic role in a sentence. In Figure 1, the word with con­tains two separate categories indicating whether it modifies saw (first example) or John (second exam­ple). In a highly lexicalised grammar, a parser may need to explore a large search space of categories in order to select the correct category for each word.</p><p>Bangalore and Joshi (1999) proposed <i>supertag-ging, </i>where each word is assigned a reduced set of categories by a sequence tagger, rather than all of the categories previously seen with that word. Our supertags are ccg categories, and so are much more detailed than pos tags. By limiting the number of supertags for each word, there is a massive reduc­tion in the number of derivations. The effectiveness of supertagging (Clark and Curran, 2004) demon­strates the influence of lexical ambiguity on parsing complexity for lexicalised grammars.</p><p>Hockenmaier and Steedman (2007) developed CCGbank, a semi-automated conversion of the Penn Treebank (Marcus et al., 1993) to the ccg formal­ism. A number of statistical parsers (Hockenmaier created for ccg parsing using CCGbank. <b>2.1   The </b>C&amp;C <b>Parser</b></p><doubt alpha="57.1" length="49" tooSmall="False" monospace="0.0">and Steedman, 2002; Clark et al., 2002) have been</doubt><p>Clark and Curran (2007) describe the three stages of the high-performance C&amp;C ccg parser. First, the supertagger provides each word with a set of likely categories, reducing the search space considerably. Second, the parser combines the categories, using the cky chart-parsing algorithm and ccg's combi-natory rules, to produce all derivations that can be constructed with the given categories. Finally, the decoder finds the best derivation from amongst the spanning analyses in the chart.</p><doubt alpha="57.9" length="38" tooSmall="False" monospace="0.0">I        saw      John with binoculars</doubt><doubt alpha="54.3" length="35" tooSmall="False" monospace="0.0">np(s\np)/np np((s\np)\(s\np))/np np</doubt><doubt alpha="42.9" length="21" tooSmall="False" monospace="0.0">s\np&gt; (S\NP)\(S\NP) &gt;</doubt><doubt alpha="50.0" length="6" tooSmall="False" monospace="0.0">S\NP &lt;</doubt><doubt alpha="25.0" length="4" tooSmall="False" monospace="0.0">-s-&lt;</doubt><doubt alpha="50.0" length="44" tooSmall="False" monospace="0.0">I        saw      John       with binoculars</doubt><doubt alpha="64.3" length="28" tooSmall="False" monospace="0.0">NP(s\Np)JNP np (np\np)/np np</doubt><doubt alpha="50.0" length="12" tooSmall="False" monospace="0.0">NP\NP &gt; NP &lt;</doubt><doubt alpha="50.0" length="6" tooSmall="False" monospace="0.0">S\NP &gt;</doubt><figure caption="Figure 1: Twoccgderivations with PP ambiguity."></figure><p>The C&amp;C parser uses a maximum-entropy model to score each derivation, using a wide range of fea­tures defined over local sub-trees in the derivation, including the head words and their pos tags, the lo­cal categories, and word-word dependencies. We use the default normal-form mode with the deriva­tions decoder (Clark and Curran, 2007) and a maxi­mum of 1,000,000 categories in the chart.</p><p>Clark and Curran (2004) describe the role of su-pertagging in the C&amp;C parser and its impact on parser speed. The supertagger initially assigns as few supertags as possible per word. If the parser is unable to provide a spanning analysis, the parser re­quests more supertags for each word. By restricting the number of supertags considered, this provides substantial pruning at the lexical level. Recent work by Kummerfeld et al. (2010) has shown that by train­ing the supertagger on parser output, the parser's speed can be substantially increased whilst achiev­ing the same accuracy as the baseline system. This exploits the idea that the only supertags the parser needs are those used by the highest-scoring deriva­tion, reducing the search space even more than tra­ditional supertagging.</p><p>Whilst the approach we present here focuses on ccg parsing, the techniques apply equally to any other binary branching or binarised grammars.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">67</doubt><page local="3" global="68"/><doubt alpha="42.9" length="14" tooSmall="False" monospace="0.0">^-NPj^^^J^^^NP</doubt><doubt alpha="48.8" length="41" tooSmall="False" monospace="0.0">S\NPT""\/NP\NP)/NP(S\NP)\(S\NP) S^^^ S\NP</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">S</doubt><p>I saw John with binoculars</p><p>PRP VBD NNP IN NNS</p><p>Figure 2: A graph-structured stack (gss) representing an incomplete parse of the sentences found in Figure 1. The nodes and lines in bold were provided by the supertagger, whilst the non-bold nodes and lines have been created during parsing. The light gray lines represent what reduce operation created that lexical category.</p></section><section number="3" title="Shift-Reduce Parsing"><p>In its deterministic form, a shift-reduce parser per­forms a single left-to-right scan of the input sen­tence, selecting one or more actions at each step. The current state of the parser is stored in a stack, where the partial derivation is stored and the pars­ing operations are performed. For the actions, either we <i>shift </i>the current word onto the stack or <i>reduce </i>the top two (or more) items at the top of the stack (Aho and Ullman, 1972). As the scoring model can be defined over actions, this can allow for highly efficient parsing through greedy search (Sagae and Lavie, 2005). This has made shift-reduce parsing popular for high-speed dependency parsers (Yamada and Matsumoto, 2003; Nivre and Scholz, 2004).</p><p>Unfortunately, a deterministic shift-reduce parser cannot handle ambiguity because it only considers a single derivation. A simple extension is to elim­inate determinism and perform a best-first search, backtracking if the parser reaches a dead end. This backtracking leads to duplicate construction of sub­structures and complete exploration is exponential in the worst case. Beam search has been used to han­dle this exponential explosion by discarding a large portion of the search space.</p><p>In Zhang and Clark (2011), a direct comparison is made between their shift-reduce ccg parser and the chart-based C&amp;C parser. As ccg allows for a limited number of unary rules, specifically type-changing and type-raising, Zhang and Clark extend the shift-reduce algorithm to consider unary actions. In order to handle the exponential search space, their parser performs beam search, only keeping the top 16 scoring states. Whilst this approximate search may potentially lose the best scoring parse, they achieve competitive accuracies compared to the C&amp;C chart parser.</p><subsection number="3.1" title="Advantages of Semi-Incremental Parsing"><p>Shift-reduce parsing allows for fully incremental parsing that does not require the full sentence. Whilst the C&amp;C parser could be modified to perform in this fashion, pos tagging and supertagging accu­racy would likely decrease, leading to lower overall parsing accuracy as mistakes propagate up the pars­ing pipeline.</p><p>Semi-incremental parsing can still be advanta­geous compared to non-incremental parsing. By us­ing features to provide a partial understanding of the sentence structure to components not tradition­ally integrated with the parser, such as the pos tag­ger and supertagger, improved accuracy is possible. This is because these components currently only use the orthographic properties of the input text as fea­tures, with no understanding of how each word may be potentially used during parsing. In Merity (2011), we have begun exploring tightly integrating parsing and tagging, specifically for pos tags and supertags, by using semi-incremental parsing and shown im­proved tagging accuracy is possible.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">68</doubt><page local="4" global="69"/></subsection><subsection number="3.2" title="Graph-Structured Stack"><p>Back-tracking shift-reduce parsers are worst case exponential, preventing a full exploration of the search space. A graph-structured stack (gss) is a general structure that allows for the efficient han­dling of non-determinism in shift-reduce parsing (Tomita, 1988). The gss allows for polynomial time non-deterministic shift-reduce parsing and has been shown to be highly effective for dependency pars­ing (Huang and Sagae, 2010). The use of gss al­lows for the incremental construction of the parse tree without being forced to discard large segments of the search space.</p><p>Here we will show an example of using a gss to augment shift-reduce parsing and then show how it can be applied to CCG parsing. In the example gram­mar below, all three reduction rules are possible on the given stack. By performing backtracking and pursuing all possible reductions, shift-reduce pars­ing becomes worst-case exponential as previous re­sults must be re-computed.</p><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">0</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">A</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">B</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">C</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">D</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">E</doubt><p>Reduction Rules</p><doubt alpha="60.0" length="5" tooSmall="False" monospace="0.0">~FD E</doubt><doubt alpha="52.9" length="17" tooSmall="False" monospace="0.0">G&lt;r-DEH&lt;r-C   D E</doubt><p>The Gss solves this by storing multiple possible derivations in a single structure. Note that all pos­sible rules have been applied and are now stored in the Gss. These reduce operations are also non­destructive, leaving the original structure from the above figure in place. Thus, the gss can store mul­tiple possible derivations. Note that there is only a single bottom node, 0, representing an empty stack.</p><doubt alpha="66.7" length="3" tooSmall="False" monospace="0.0">F G</doubt><doubt alpha="50.0" length="8" tooSmall="False" monospace="0.0">A &lt;-B CE</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">H</doubt><p>When a new node is pushed onto the stack, we combine it with the heads of all of the existing stacks stored in the Gss. This means that only a single shift action is necessary for the Gss instead of one for each possible derivation.</p><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">F</doubt><p>Finally, to prevent an exponential explosion due to local ambiguity, we check if a new partial deriva­tion is equivalent to any existing partial derivations. If it is, we keep track of the ways the given node can be generated and then merge them into a single node. This is referred to as local ambiguity packing by Tomita (1988) and allows shift-reduce parsing to be performed in polynomial time. In the example below, the new reduction rules result in two new J nodes. These two nodes are merged to form a single node as they are equivalent.</p><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">J</doubt><doubt alpha="40.0" length="5" tooSmall="False" monospace="0.0">E &lt;-I</doubt><p>Reduction Rules <i>~J F </i><b><i>T</i></b></p><doubt alpha="57.1" length="7" tooSmall="False" monospace="0.0">J&lt;r-G I</doubt><p>When parsing an <i>n </i>word sentence, there are <i>n </i>possible stages in the Gss. We refer to these stages as <i>frontiers, </i>with the <i>kth </i>frontier containing all par­tial derivations that contain a total span of k. In CKY chart terms, a frontier can be considered as repre­senting all cells on the diagonal from the top left to the bottom right, as seen in Figure 3.</p><p>Figure 2 represents an incomplete sentence processed using a Gss-based shift-reduce CCG parser. The frontier for the word with con­tains two heads, ((S<i>\NP\NP</i>))/NP and <i>(NP</i><i>\NP</i>)/NP.  When the CCG category for the<page local="5" global="70"/></p><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">I</doubt><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">69</doubt><doubt alpha="60.0" length="20" tooSmall="False" monospace="0.0">Span12345- Frontier-</doubt><p>Figure 3: An illustration of the relation between the chart in CKY and the graph-structured stack in SR word binoculars is shifted on to the gss, it connects to both of the previous heads. As the category for the word binoculars is an NP, we can then reduce the stack by applying combinatory rules from CCG to both of the heads found in the previous frontier. In light gray, we show the full derivation for "John with binoculars".</p><p>During the parsing process, we start with an empty gss. During the <i>shift </i>step, we add all the possible CCG categories provided by the supertagger for the kth word to the gss and connect each cate­gory to all of the head categories on the gss. Next, we attempt all possible <i>reduce </i>operations on the par­tial derivations in the current frontier. In CCG shift-reduce parsing, these reduce operations are the CCG combinatory rules. If a reduction is possible, we cre­ate a new top partial derivation from the result and place it in the kth frontier.</p></subsection></section><section number="4" title="Frontier Pruning"><p>The purpose of frontier pruning is to cut down the search space of the parser by only considering par­tial derivations that are likely to be in the highest-scoring derivation. Like adaptive supertagging, it exploits the idea that the only partial derivations the parser needs to generate are those used by the highest-scoring derivation. The model is trained us­ing the parser's initial unpruned output and aims to distinguish between partial derivations that are necessary and those that are not. By eliminating a large number of those unnecessary partial derivations, parsing ambiguity is significantly decreased.</p><p>This approach is similar to beam search as frontier pruning removes partial derivations once it is likely they will not be used in the highest-scoring deriva­tion. Beam search prunes nodes that are below a multiple (ß) of the highest-scoring node in the fron­tier. For certain instances, such as n-best re-ranking, beam search would be preferred as derivations with­out the highest score are still useful in the parsing process. For one best parsing, however, the parser may waste time generating these additional deriva­tions when it could be known in advanced that they will not be used. This could occur during attach­ment ambiguity where, although the parser is guar­anteed to select one attachment, the other attachment may be constructed as it is valid and still competitive when considered by beam search's criteria.</p></section><section number="5" title="Experiments"><p>The only modifications are to the core parsing al­gorithm, which involves replacing CKY with sR, and to the parsing process via pruning. As the de­coder and base models used for selecting the best-scoring derivation remain unchanged, any improve­ments seen are from an improved parsing process.</p><p>The C&amp;C code base has been optimised for cky parsing and we have made only limited attempts to optimise specifically for the shift-reduce approach. Due to this, the speed of the sr parser is 34% slower than the CKY parser. As the frontier pruning is im­plemented on the sR parser, all speeds will be rela­tive to the sR baseline. For the frontier pruning sR parser to be competitive with the cky parser, a speed improvement of 34% or more must be achieved.</p><subsection number="5.1" title="Training and Processing"><p>We train a binary averaged perceptron model (Collins, 2002) on parser output generated by the sr C&amp;C parser using the standard parsing model. Once the base parser has successfully processed a sen­tence, all partial derivations that lead to the highest-scoring derivation are marked. For each partial derivation in the Gss, the perceptron model attempts to classify whether it was part of the marked set. If the classification is incorrect, the perceptron model updates the weights appropriately.</p><p>During processing, pruning occurs as each fron-<page local="6" global="71"/></p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">70</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><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>\</p></td><td class="cell"><p><b>[</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></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></p></td><td class="cell"><p></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></p></td><td class="cell"><p></p></td><td class="cell"><p></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></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></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></tr></table><p>Feature Type</p><doubt alpha="100.0" length="7" tooSmall="False" monospace="0.0">Example</doubt><p>Category Binary Composition Forward Application Head Word Head pos <b>Previous Frontier Next Frontier </b>Next Frontier <i>(S</i><i>\NP</i>)/NP and NP True <i>saw VBD</i></p><doubt alpha="75.0" length="4" tooSmall="False" monospace="0.0">S\NP</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">NP</doubt><doubt alpha="43.8" length="32" tooSmall="False" monospace="0.0">((S\NP )\(S\NP ))/NP (NP\NP )/NP</doubt><p>Table 1: Example features extracted from S\NP in the third frontier of Figure 2. For the frontier features, bold represents the highest-scoring feature selected for contri­bution to the classification decision.</p><p>tier is developed. For each partial derivation, the per-ceptron model classifies whether the partial deriva­tion is likely to be used in the highest-scoring deriva­tion. If not, the partial derivation is removed from the frontier, eliminating any paths that the partial derivation would have generated. Perfect frontier pruning would allow only a single derivation, specif­ically the highest-scoring one, to develop.</p></subsection><subsection number="5.2" title="Model Features"><p>For frontier pruning to be effective, the model must be able to accurately distinguish between partial derivations that will be used in the highest-scoring derivation and those that shall not. As the features of the C&amp;C parser dictate the highest-scoring deriva­tion, the features used for frontier pruning have been chosen to be similar. For a full description of the features used in the C&amp;C parser, refer to Clark and Curran (2007).</p><p>Each partial derivation is given a base set of fea­tures derived from the current category. The initial features include a NULL which all categories re­ceive, the ccg category itself and whether the cat­egory was assigned by the supertagger. There are also features that encode rule instantiation, includ­ing whether the category was created by type rais­ing, a lexical rule, or any cc g combinatory rule. If the category was created by a ccg combinatory rule, the type of rule (such as forward/backward applica­tion and so on) is included as a feature.</p><p>Features representing the past decisions the parser has made are also included. Note that <i>current </i>represents the current category and <i>left/right </i>is the cur­rent category's left or right child respectively. For unary categories, a tuple of [current,current—left] is included as a feature. For binary categories, a tu­ple of [current—left, current, current—right] is in­cluded. If a category is a leaf, then two features [cur­rent, word] and [current, pos] are included. Features representing the root category of the partial deriva­tion are also included, encoding the category head's word and pos tag.</p><p>Finally, additional features are added that repre­sent the possible future parsing decisions. This is achieved by adding information about the remain­ing partial derivations on the stack (the past fron­tier) and the future incoming partial derivations (the next frontier). These do not exist in the C&amp;C parser and are only possible due to the implementation of the gss. For each category in the previous fron­tier, a feature is added of the type [previous, cur­rent]. For the next frontier, which is only composed of supertags at this point, the feature is [current, next]. These features allow the pruning classifier to determine whether the current category is likely to be active in any other reductions in future parsing work. As we only want to score the optimal path us­ing the previous and next features, only the highest weighted of these features are selected. The rest of the previous and next features are discarded and do not contribute to the classification.</p><p>An example of this can be seen in Table 1, where the features for the partial derivation of S \NP are enumerated.</p><p>These features differ to the traditional features used by shift-reduce parsers due to the addition of the gss. As traditional shift-reduce parsing only considers a single derivation at a time, it is trivial to include history further back than the current cat­egory's previous frontier. As gss-based shift-reduce parsing encodes an exponential number of states, however, the overhead of unpacking these states into a feature representation is substantial. Our ap­proximation of selecting the highest weighted previ­ous and next frontier features approximates the non-deterministic shift-reduce solution.</p></subsection><subsection number="5.3" title="Improving Marked Set Recall"><p>Compared to the unmarked set, the marked set of partial derivations used to create the highest-scoring derivation is small.<page local="7" global="72"/> If a single CCG category from the marked set is pruned accidentally, the accuracy may be negatively impacted. The loss of a single category may even mean it is impossible to form a spanning analysis.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">71</doubt><p>To prevent this loss of accuracy and coverage, the recall of the marked set needs to be improved. This can be achieved by biasing the binary perceptron al­gorithm towards a certain class, trading precision for recall. Traditionally, a binary perceptron classifier returns true if w <i>• x &gt; </i>0, else false, with w being a vector of weights for each feature and x being a bi­nary vector indicating whether a feature was active.</p><p>By providing a manual bias A, w • x &gt; A, we can bias the classifier towards a class. The value of A modifies the perceptron threshold level, allowing us to improve the recall of the marked set by lowering the precision. The value for A is obtained manually through the use of a development set.</p><p>Identifying the optimal threshold value is impor­tant. Too high a recall value would prevent pruning any parts of the parse tree whilst too low a threshold reverts back to traditional unpruned parsing. Due to the overheads involved in the frontier pruning pro­cess, ineffective frontier pruning may also be slower than traditional parsing, especially for an optimised parser such as the C&amp;C parser. This value is deter­mined experimentally using a development dataset.</p></subsection><subsection number="5.4" title="Balancing Pruning Features and Speed"><p>For frontier pruning to produce a speed gain, enough of the search space must be pruned in order to com­pensate for the additional computational overhead of the pruning step itself. This is a challenge as the C&amp;C parser is written in C++ with a focus on effi­ciency and already features substantial lexical prun­ing due to the use of supertagging.</p><p>For this reason, there were instances where ex­pressive features needed to be traded for simpler fea­tures in the frontier pruning process. Whilst these simpler features may not prune as effectively, they take far less time to compute and result in higher speed gains than complex features with a further re­duced search space. The complexity of the frontier pruning features may be dictated by the speed of the core parser itself, with more expressive features be­ing possible if the core parser is slower.</p><p>The implementation of these features also had to focus on efficiency. To decrease the stress and improve memory locality of the hash table storing the feature weights, only a subset of features were stored. This feature subset was obtained from the gold standard training data as it contains far less am­biguity than the same training data which uses lexi­cal categories supplied by the supertagger.</p><p>Hash tables were used for storing the relevant fea­ture weights. Simple hash based feature representa­tion were used for associating features with weights to reduce the complexity of equivalence checking. The hash values of features that were to be reused were also cached to prevent recalculation, substan­tially decreasing the computational overhead of fea­ture calculation.</p></subsection></section><section number="6" title="Evaluation"><p>Our experiments are performed using CCGbank which was split into three subsets for training (Sec­tions 02-21), development (Section 00), and the final evaluation (Section 23). The performance is mea­sured in terms of sentence coverage, accuracy and parsing time. The accuracy is computed as F-score over the extracted labeled and unlabeled CCG de­pendencies found in CCGbank. All unmarked ex­periments use gold standard POS tags whilst experi­ments marked <i>Auto </i>use automatically assigned POS tags using the C&amp;C POS tagger.</p></section><section number="7" title="Results"><subsection number="7.1" title="Training the Frontier Pruning Algorithm"><p>To establish bounds on the potential search space re­duction, the size of the marked set compared to the total tree size was tracked over all sentences in the training data. This represents the size of the tree af­ter optimal pruning occurs. Two figures are pre­sented, one with gold supertags and the other with supertags supplied by the C&amp;C supertagger. Gold represents the reduction in search space possible when only the correct CCG categories are used to parse the sentence. In contrast, the C&amp;C supertag­ger may apply multiple CCG categories to improve supertagging accuracy, resulting in higher ambigu­ity and greater potential search space reductions.</p><p>As can be seen in Table 2, the size of the marked set is 10 times smaller for gold supertags and 15 times smaller for automatically supplied supertags.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">72</doubt><page local="8" global="73"/><p>Table 2: Recall of the marked set from the frontier prun­ing algorithm across all trees and the size of the pruned tree compared to the original tree.</p><p>This places an upper-bound on the potential speed improvement the parser may see due to aggressive frontier pruning.</p><p>The recall of the marked set was low for both gold supertags and automatically assigned supertags. This suggests the need for a modified perceptron threshold level in order to increase the recall of the marked set.</p></subsection><subsection number="7.2" title="Tuning the Perceptron Threshold Level"><p>Tuning the perceptron threshold level, as described in the previous section, has an important impact on frontier pruning. If the baseline parser cannot form a spanning analysis with the supertags initially sup­plied by the supertagger, it requests more supertags. Aggressive frontier pruning may counter-intuitively result in a slower parser as the parser spends more time attempting to unsuccessfully parse the sentence with an increasingly large number of supertags. By tuning the perceptron threshold level we can prevent potential slow-downs caused by aggressive pruning.</p><p>To optimise the threshold level, experiments were performed on the development portion of CCGbank, Section 00. The results are shown in Table 3. De­creasing the perceptron thresholds level (A) is shown to decrease the speed of the parser substantially without increasing the accuracy. For extremely low values of A, frontier pruning will keep partial deriva­tions previously discarded as the perceptron classi­fier becomes biased towards recall. For a sufficiently low value, the accuracy would reach the same levels as the CKY and sr C&amp;C parsers, but the speed would be far too slow due to the computational overhead of frontier pruning added to the small reduction in the search space. More work on fine-tuning the feature representation and allowing for more expressive fea­tures in a faster manner will be required.</p><p>Table 3: Comparison to baseline parsers and analysis of the impact of threshold levels on frontier pruning (fp). The perceptron threshold level is referred to as A. All results are against the development dataset, Section 00 of CCGbank, which contains 1,913 sentences.</p><p>For A = 0, however, frontier pruning increases the parser's speed by 25.7% compared to the baseline gss-based sr parser on which the frontier pruning operates. There is also a small 9.8% speed increase compared to the CKY baseline parser. The F-score for both labeled and unlabeled dependencies is neg­atively impacted though.</p></subsection><subsection number="7.3" title="Speed Improvements during Evaluation"><p>Table 4 reports the impact frontier pruning has on speed compared to the baseline cky and sr C&amp;C parsers. Frontier pruning has improved the speed of the gss-based sr C&amp;C parser by 39%, an improve­ment over the speed increase seen during evaluation. Longer sentences seem to have a higher impact on the speed of the frontier pruning algorithm due to the increased computational complexity of feature gen­eration. This indicates that implementing a form of beam search on top of this may be beneficial, keep­ing on the top k scoring states in a frontier. Cur­rently all partial derivations that are greater than the perceptron threshold level A are kept.</p></subsection></section><section number="8" title="Discussion and future work"><p>As the C&amp;C parser is already highly tuned and thus extremely fast, the optimal balance between feature expressiveness and accurate pruning is difficult to achieve. However, there was still room for improve­ment. This suggests that on slower parsers than the C&amp;C parser, frontier pruning may have a much more substantial impact on parsing speeds.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">73</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>Task</p></td><td class="cell"><p>Acc.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Marked set recall (gold supertags)</p></td><td class="cell"><p>84.4%</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Marked set recall</p></td><td class="cell"><p>72.9%</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Average pruned size (gold supertags)</p></td><td class="cell"><p>9.6%</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Average pruned size</p></td><td class="cell"><p>6.7%</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="0" 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></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Model</p></td><td class="cell"><p>Coverage</p></td><td class="cell"><p>lf.</p></td><td class="cell"><p>uf.</p></td><td class="cell"><p>Speed</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>(sents/sec)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>cky C&amp;C</p></td><td class="cell"><p>99.01</p></td><td class="cell"><p>86.37</p></td><td class="cell"><p>92.56</p></td><td class="cell"><p>55.6</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>srC&amp;C</p></td><td class="cell"><p>98.90</p></td><td class="cell"><p>86.35</p></td><td class="cell"><p>92.44</p></td><td class="cell"><p>48.6</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = 0</p></td><td class="cell"><p>99.01</p></td><td class="cell"><p>86.11</p></td><td class="cell"><p>92.25</p></td><td class="cell"><p>61.1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = -1</p></td><td class="cell"><p>99.06</p></td><td class="cell"><p>86.16</p></td><td class="cell"><p>92.23</p></td><td class="cell"><p>56.4</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = -2</p></td><td class="cell"><p>99.01</p></td><td class="cell"><p>86.13</p></td><td class="cell"><p>92.19</p></td><td class="cell"><p>53.9</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = -3</p></td><td class="cell"><p>99.06</p></td><td class="cell"><p>86.15</p></td><td class="cell"><p>92.21</p></td><td class="cell"><p>49.0</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>cky C&amp;C Auto</p></td><td class="cell"><p>98.90</p></td><td class="cell"><p>84.30</p></td><td class="cell"><p>91.26</p></td><td class="cell"><p>56.2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>sr C&amp;C Auto</p></td><td class="cell"><p>98.85</p></td><td class="cell"><p>84.27</p></td><td class="cell"><p>91.10</p></td><td class="cell"><p>47.5</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = 0 Auto</p></td><td class="cell"><p>98.80</p></td><td class="cell"><p>84.09</p></td><td class="cell"><p>90.97</p></td><td class="cell"><p>60.0</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></tr></table><page local="9" global="74"/><p>for the top performing models from Table 3, containing 2,407 sentences.</p><p>More work needs to be done on reducing the number of computationally intensive feature look­ups and calculations. Even when using the gold­standard subset of the features, the feature look-up process accounts for the majority of the slow-down that the frontier pruning algorithm causes.</p><p>The C&amp;C code has been highly optimised to suit CKY parsing. It should be possible to improve the gss parser to be directly competitive with the CKY implementation. The frontier pruning provides speed increases for the gss parser, allowing it to be competitive with the original CKY parser, but with an improved gss parser, we could expect further im­provements over the original CKY parser.</p><p>Finally, we are still using the separate maximum entropy model and decoder to find the best deriva­tion. If we add more features to the perceptron model, it may be possible to use it for frontier prun­ing and finding the best derivation.</p></section><section number="9" title="Conclusion"><p>We present a shift-reduce CCG parser that can explore all possible analyses in polynomial time through the use of a graph-structured stack (gss). Whilst this parser is 34% slower than the CKY parser on which it is based, it can parse 60 sentences per second whilst exploring the full search space. We show that by performing frontier pruning on the gss and reducing this search space, the speed of the gss parser can be improved by 39% whilst only incur­ring a small accuracy penalty. This allows for shift-reduce parsing to attain speeds directly competitive with the CKY parser, whilst allowing all the potential advantages of a semi-incremental parser. We have also shown that whilst pruning is occurring at the lexical level due to supertagging, substan­tial speed-ups are still possible by performing prun­ing during the parsing process itself. This has also illustrated the difficulty in balancing expressive fea­tures and feature calculations overhead that frontier pruning needs to achieve.</p><p>Our approach uses the output of the original C&amp;C parser as training data, and so we can use any amount of parser output to train the system. This self-training has been shown to be highly effective in adaptive supertagging for increasing parser speed (Kummerfeld et al., 2010). The final result will be a substantially faster wide-coverage CCG parser that can be used for large-scale NLP applications.</p></section><section title="Acknowledgements"><p>This work was supported by the Capital Markets Co­operative Research Centre, an Australian Research Council Discovery grant DP1097291 and a Univer­sity of Sydney Honours Scholarship. We thank the anonymous reviewers for their insightful feedback.</p><table caption="Table 4: Final evaluation on Section 23 of CCGbank" 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><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Model</p></td><td class="cell"><p>Coverage</p></td><td class="cell"><p>lf.</p></td><td class="cell"><p>uf.</p></td><td class="cell"><p>Speed</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>(sents/sec)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>cky C&amp;C</p></td><td class="cell"><p>99.34</p></td><td class="cell"><p>86.79</p></td><td class="cell"><p>92.50</p></td><td class="cell"><p>96.3</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>sr C&amp;C</p></td><td class="cell"><p>99.58</p></td><td class="cell"><p>86.78</p></td><td class="cell"><p>92.41</p></td><td class="cell"><p>71.3</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = 0</p></td><td class="cell"><p>99.38</p></td><td class="cell"><p>86.51</p></td><td class="cell"><p>92.25</p></td><td class="cell"><p>95.4</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>cky C&amp;C Auto</p></td><td class="cell"><p>99.25</p></td><td class="cell"><p>84.59</p></td><td class="cell"><p>91.20</p></td><td class="cell"><p>82.0</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>sr C&amp;C Auto</p></td><td class="cell"><p>99.50</p></td><td class="cell"><p>84.53</p></td><td class="cell"><p>91.09</p></td><td class="cell"><p>61.2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>fp A = 0 Auto</p></td><td class="cell"><p>99.29</p></td><td class="cell"><p>84.29</p></td><td class="cell"><p>90.88</p></td><td class="cell"><p>84.9</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></tr></table></section><references><p>Alred V. Aho and Jeffrey D. Ullman. 1972. <i>The The­ory of Parsing, Translation, and Compiling. Volume I: Parsing. </i>Prentice-Hall.</p><p>Srinivas Bangalore and Aravind K. Joshi. 1999. Su-pertagging: An Approach to Almost Parsing. <i>Com­putational Linguistics, </i>25(2):237-265.</p><p>Ming-Wei Chang, Quang Do, and Dan Roth. 2006. Mul­tilingual Dependency Parsing: A Pipeline Approach. In Nicolas Nicolov, editor, <i>Recent Advances in Natu­ral Language Processing.</i></p><p>Eugene Charniak and Mark Johnson. 2005. Coarse-to-Fine n-Best Parsing and MaxEnt Discriminative Reranking. In <i>Proceedings of the 43rd Annual Meet­ing of the Association for Computational Linguis­tics (ACL-05), </i>pages 173-180, Ann Arbor, Michigan,</p><p>USA, June.</p><p>Stephen Clark and James R. Curran. 2004. The Impor­tance of Supertagging for Wide-Coverage ccg Pars­ing. In <i>Proceedings of the 20th International Con­ference on Computational Linguistics (COLING-04), </i>pages 282-288, Geneva, Switzerland, August.</p><p>Stephen Clark and James R. Curran. 2007. Wide-Coverage Efficient Statistical Parsing with ccg and Log-Linear Models.     <i>Computational Linguistics,</i> 33(4):493-552.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">74</doubt><page local="10" global="75"/><p>Stephen Clark, Julia Hockenmaier, and Mark Steedman. 2002. Building Deep Dependency Structures using a Wide-Coverage ccg Parser. In <i>Proceedings of the 40th Annual Meeting of the Association for Computa­tional Linguistics (ACL-02), </i>pages 327-334, Philadel­phia, Pennsylvania, USA, July.</p><p>Michael Collins. 2002. Discriminative Training Meth­ods for Hidden Markov Models: Theory and Experi­ments with Perceptron Algorithms. In <i>Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing (EMNLP-03), </i>pages 1-8.</p><p>Tim Dawborn and James R. Curran. 2009. ccg parsing with one syntactic structure per n-gram. In <i>Proceed­ings ofthe Australasian Language Technology Associ­ation Workshop 2009 (ALTA-09), </i>pages 71-79, Syd­ney, Australia, December.</p><p>Bojan Djordjevic. 2006. Efficient Combinatory Cate-gorial Grammar Parsing. In <i>Proceedings of the 2006 Australasian Language Technology Workshop (ALTW-06), </i>pages 3-10, Sydney, Australia, December.</p><p>Julia Hockenmaier and Mark Steedman. 2002. Gen­erative Models for Statistical Parsing with Combina-tory Categorial Grammar. In <i>Proceedings ofthe 40th Annual Meeting ofthe Association for Computational Linguistics (ACL-02), </i>pages 335-342, Philadelphia,</p><p>PA.</p><p>Julia Hockenmaier and Mark Steedman. 2007. CCG-bank: A Corpus of ccg Derivations and Dependency Structures Extracted from the Penn Treebank. <i>Com­putational Linguistics, </i>33(3):355-396.</p><p>Liang Huang and Kenji Sagae. 2010. Dynamic program­ming for linear-time incremental parsing. In <i>Proceed­ings of the 48th Annual Meeting of the Association for Computational Linguistics (ACL-10), </i>pages 1077­1086, Uppsala, Sweden, July.</p><p>TadaoKasami. 1965. An efficient recognition and syntax analysis algorithm for context-free languages. Techni­cal Report AFCRL-65-758, Air Force Cambridge Re­search Laboratory, Bedford, MA.</p><p>Dan Klein and Christopher D. Manning. 2003. A* Pars­ing: Fast Exact Viterbi Parse Selection. In <i>Proceed­ings ofthe Human Language Technology Conference and the North American Association for Computa­tional Linguistics (HLT-NAACL-03), </i>volume 3, pages 119-126.</p><p>Jonathan K. Kummerfeld, Jessika Roesner, Tim Daw-born, James Haggerty, James R. Curran, and Stephen Clark. 2010. Faster Parsing by Supertagger Adapta­tion. In <i>Proceedings ofthe 48th Annual Meeting ofthe Association for Computational Linguistics (ACL-10), </i>pages 345-355, Uppsala, Sweden, July.</p><p>Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz.   1993.  Building a Large Annotated</p><p>Corpus of English: The Penn Treebank. <i>Computa­tional Linguistics, </i>19(2):313-330.</p><p>Stephen Merity. 2011. <i>Integrated Tagging and Pruning via Shift-Reduce </i>ccg <i>Parsing. </i>Honours Thesis, The University of Sydney, Sydney, Australia.</p><p>Joakim Nivre and Mario Scholz. 2004. Determinis­tic Dependency Parsing of English Text. In <i>Proceed­ings ofthe 18nd International Conference on Com­putational Linguistics (COLING-04), </i>pages 64-70, Geneva, Switzerland, August.</p><p>Adam Pauls and Dan Klein. 2009. K-Best A* Pars­ing. In <i>Proceedings of the Joint Conference of the 47th Annual Meeting ofthe ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, </i>pages 958-966, Singapore, August.</p><p>Brian Roark and Kristy Hollingshead. 2009. Linear Complexity Context-Free Parsing Pipelines via Chart Constraints. In <i>Proceedings of2009 Human Language Technology Conference ofthe North American Chap­ter ofthe Association for Computational Linguistics</i></p><doubt alpha="58.3" length="48" tooSmall="False" monospace="0.0">(HLT/NAACL-09),pages 647-655, Boulder, Colorado,</doubt><p>June.</p><p>Kenji Sagae and Alon Lavie. 2005. A Classifier-Based Parser with Linear Run-Time Complexity. In <i>Pro­ceedings ofthe Ninth International Workshop on Pars­ing Technology (IWPT-05), </i>pages 125-132, Vancou­ver, British Columbia, Canada, October.</p><p>Mark Steedman. 2000. <i>The Syntactic Process. </i>MIT Press, Cambridge, Massachusetts, USA.</p><p>Masaru Tomita. 1988. Graph-structured Stack and Nat­ural Language Parsing. In <i>Proceedings ofthe 26th Annual Meeting ofthe Association for Computational Linguistics, </i>pages 249-257, Buffalo, New York, USA, June.</p><p>Hiroyasu Yamada and Yuji Matsumoto. 2003. Statis­tical Dependency Analysis with Support Vector Ma­chines. <i>Proceedings ofInternational Conference on Parsing Technologies (IWPT-03), </i>pages 195-206.</p><p>Daniel H. Younger. 1967. Recognition and Parsing of Context-Free Languages in Time n<footnote anchor="3"/>. <i>Information and Control, </i>10(2):189-208, February.</p><p>Yue Zhang and Stephen Clark. 2011. Shift-Reduce ccg Parsing. In <i>Proceedings ofthe 49th Annual Meet­ing ofthe Association for Computational Linguistics: Human Language Technologies (ACL-11:HLT), </i>pages 683-692, Portland, Oregon, USA, June.</p><p>Yue Zhang, Byung-Gyu Ahn, Stephen Clark, Curt Van Wyk, James R. Curran, and Laura Rimell. 2010. Chart Pruning for Fast Lexicalised-Grammar Parsing. In <i>Proceedings ofthe COLING 2010 Poster Sessions, </i>pages 1471-1479, Beijing, China, August.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">75</doubt></references></body></article>