{ "paper_id": "2020", "header": { "generated_with": "S2ORC 1.0.0", "date_generated": "2023-01-19T13:17:16.412006Z" }, "title": "Efficient Outside Computation", "authors": [ { "first": "Daniel", "middle": [], "last": "Gildea", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Rochester", "location": {} }, "email": "gildea@cs.rochester.edu" } ], "year": "", "venue": null, "identifiers": {}, "abstract": "Weighted deduction systems provide a framework for describing parsing algorithms that can be used with a variety of operations for combining the values of partial derivations. For some operations, inside values can be computed efficiently, but outside values cannot. We view outside values as functions from inside values to the total value of all derivations, and we analyze outside computation in terms of function composition. This viewpoint helps explain why efficient outside computation is possible in many settings, despite the lack of a general outside algorithm for semiring operations.", "pdf_parse": { "paper_id": "2020", "_pdf_hash": "", "abstract": [ { "text": "Weighted deduction systems provide a framework for describing parsing algorithms that can be used with a variety of operations for combining the values of partial derivations. For some operations, inside values can be computed efficiently, but outside values cannot. We view outside values as functions from inside values to the total value of all derivations, and we analyze outside computation in terms of function composition. This viewpoint helps explain why efficient outside computation is possible in many settings, despite the lack of a general outside algorithm for semiring operations.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Abstract", "sec_num": null } ], "body_text": [ { "text": "In weighted deduction systems such as those used for parsing with context-free grammars, the inside-outside algorithm provides an efficient way of finding the total weight of all derivations passing through a specific item. Weighted deduction systems can be used with different semirings, or even more generally, with other classes of functions for computing the values of items bottom-up in the inside pass. In some cases, efficient inside computation is possible, but efficient outside computation is not. How can these cases be characterized?", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1." }, { "text": "We give a very general characterization of the conditions for efficient outside computation in terms of function composition, as well as three more specific examples of sufficient conditions. The first of these conditions, commutative semirings, is discussed by Goodman (1999) , while we believe the other two, extremal semirings and the sum of linear functions, to be novel formulations. We discuss general superior functions as a case where efficient outside computation is not possible. We conclude that, despite the emphasis in the literature on describing weighted deduction in terms of semirings, semirings are not the best abstraction for describing the requirements of the general inside-outside algorithm.", "cite_spans": [ { "start": 262, "end": 276, "text": "Goodman (1999)", "ref_id": "BIBREF13" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1." }, { "text": "A weighted deduction system (Nederhof 2003) has rules of the form A 1 , . . . , A n C where A 1 , . . . , A n are the items of the system that form the antecedents of the rule, and C is an item that forms the consequent of the rule. One item is designated as the goal of the system. Associated with each rule R is a function F R which takes the weights of the antecedent items, and calculates a new weight. A derivation is a tree of rules where the antecedents of each rule are the consequents of its children. The leaves of this tree are rules having zero antecedents, also referred to as axioms. The weight of a derivation is computed by recursively evaluating the functions F R ; that is, for a derivation D formed by applying rule R to derivations D 1 , . . . , D n :", "cite_spans": [ { "start": 28, "end": 43, "text": "(Nederhof 2003)", "ref_id": "BIBREF23" } ], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "weight (D) = F R (weight (D 1 ), . . . , weight (D n ))", "eq_num": "(1)" } ], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "The fundamental problem associated with weighted deduction systems is to find the total weight of all derivations of the goal item. This total weight is computed with a generalized sum operation that will be denoted by \u2295.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "Weighted deduction systems provide a general framework for expressing and reasoning about dynamic programming algorithms, and in particular about parsing algorithms (Shieber, Schabes, and Pereira 1995; Sikkel 1997; Nederhof 2003) . The deduction rule for the basic combination step of CYK parsing of a context-free grammar (CFG) is shown in Figure 1 (a). The goal item for CFG parsing with start symbol S and sentence length n is [S; 0; n], where i, j, and k range over positions in a string. In order to simplify our definition of weighted deduction systems, we include the CFG rule S \u2192 A B as an antecedent of the rule, although it is sometimes also represented as a \"side condition\" for the rule, as in Nederhof (2003) , in which case the weight w 1 of the rule can be incorporated into the function F R . Weighted deduction systems can be used to express other parsing algorithms, including Earley parsing and dependency parsing (Eisner and Satta 1999) . Beyond CFG, weighted deduction systems are used for parsing for tree adjoining grammars (Alonso et al. 1999) , combinatory categorical grammars (Kuhlmann and Satta 2014) , and general linear context-free rewriting systems (Burden and Ljungl\u00f6f 2005) , as well as for machine translation (Melamed, Satta, and Wellington 2004; Lopez 2009) . In all of these applications, a set of general deduction rules is instantiated into a hypergraph for a specific input string. For example, given a sentence of length n, the general rule is shown in Figure 1 (a). The goal item for CFG parsing with start symbol S and sentence length n [S; 0; n] is instantiated into a specific rule for each combination of i, j, k \u2208 {0, . . . , n}. Each instantiated item is a vertex in the hypergraph, and each instantiated rule is a hyperedge from the antecedent vertices to the consequent vertex. The resulting hypergraphs are also known as parse forests. In this article, we will deal exclusively with deduction systems that are already instantiated into hypergraphs. We will refer to hyperedges simply as edges. We use E to refer to the set of edges (instantiated rules), and |E| to refer to the number of edges. For CYK parsing of a string of length n with a set of CFG productions P, |E| \u2208 O(|P|n 3 ). However, our discussion will apply equally to the various other applications of weighted deduction systems just mentioned. To simplify the presentation, we will assume at first that our deduction system does not have cycles, that is, an item cannot appear as the consequent of any derivation in which it also appears as an antecedent. For parsing CFGs, this is true whenever the grammar is in Chomsky Normal Form. We return to discuss systems with cycles in Section 4.", "cite_spans": [ { "start": 165, "end": 201, "text": "(Shieber, Schabes, and Pereira 1995;", "ref_id": "BIBREF28" }, { "start": 202, "end": 214, "text": "Sikkel 1997;", "ref_id": "BIBREF29" }, { "start": 215, "end": 229, "text": "Nederhof 2003)", "ref_id": "BIBREF23" }, { "start": 706, "end": 721, "text": "Nederhof (2003)", "ref_id": "BIBREF23" }, { "start": 933, "end": 956, "text": "(Eisner and Satta 1999)", "ref_id": "BIBREF9" }, { "start": 1047, "end": 1067, "text": "(Alonso et al. 1999)", "ref_id": null }, { "start": 1103, "end": 1128, "text": "(Kuhlmann and Satta 2014)", "ref_id": "BIBREF16" }, { "start": 1181, "end": 1207, "text": "(Burden and Ljungl\u00f6f 2005)", "ref_id": "BIBREF2" }, { "start": 1245, "end": 1282, "text": "(Melamed, Satta, and Wellington 2004;", "ref_id": "BIBREF21" }, { "start": 1283, "end": 1294, "text": "Lopez 2009)", "ref_id": "BIBREF19" } ], "ref_spans": [ { "start": 341, "end": 349, "text": "Figure 1", "ref_id": "FIGREF0" }, { "start": 1495, "end": 1503, "text": "Figure 1", "ref_id": "FIGREF0" } ], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "(a) (b) w 1 : A 1 w 2 : A 2 w 3 : A 3 F R (w 1 , w 2 , w 1 ): C w 1 : [S \u2192 A B] w 2 : [A, i, j] w 3 : [B, j, k] F R (w 1 , w 2 , w 3 ): [S, i, k]", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "Efficient computation on weighted deduction systems depends on a general dynamic programming algorithm that computes a table of inside values for each item. The inside value of an item B represents the total weight of all derivations of B.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "V(B) = derivations D of B weight (D)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "The general inside algorithm computes the table of inside values efficiently by summing over rules R having B as a consequent, and applying the function F R to the (previously computed) inside values of the rule's antecedents.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Weighted Deduction", "sec_num": "2." }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "= R: A 1 ,..., An B F R (V(A 1 ), . . . , V(A n ))", "eq_num": "(2)" } ], "section": "V(B)", "sec_num": null }, { "text": "Items are sorted in a topological order to ensure that inside values of an antecedent are ready before the calculation of the consequent. The basic property that is required to enable dynamic programming is that the generalized sum must distribute over each argument:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "\u2200i, x i F R (x 1 , . . . , x i\u22121 , x i , x i+1 , . . . , x n ) = F R (x 1 , . . . , x i\u22121 , x i x i , x i+1 , . . . , x n )", "eq_num": "(3)" } ], "section": "V(B)", "sec_num": null }, { "text": "Weighted deduction can be performed with various choices of F R and \u2295. The most common choices are the max-product or Viterbi algorithm, where weights are nonnegative real numbers, F R is always multiplication (regardless of the rule R), and \u2295 is the maximum operation. The sum-product algorithm, used to derive the total probability of a string, or as a subroutine of the Expectation Maximization (EM) algorithm (Dempster, Laird, and Rubin 1977) , is the case where weights are real numbers, F R is always multiplication, and \u2295 is addition. In the case of CYK parsing, using the sum-product algorithm, the inside recurrence of Equation (2) takes the familiar form:", "cite_spans": [ { "start": 413, "end": 446, "text": "(Dempster, Laird, and Rubin 1977)", "ref_id": "BIBREF6" } ], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "V([A, i, k]) = B,C,j P(A \u2192 B C) V([B, i, j]) V([C, j, k])", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "because the set of rules with item [A, i, k] as a consequent can be found by iterating over nonterminals B and C and split points j. Every deduction rule has three antecedents; the inside value of the axiom A \u2192 B C is defined as the grammar's probability P(A \u2192 B C), and the function F R simply multiplies these three inside values. The sum-product algorithm was the focus of the first presentations of the inside-outside algorithm for parsing by Baker (1979) and Lari and Young (1990) . Eisner (2016) relates the sum-product insideoutside algorithm to backpropagation as used in neural networks (Rumelhart, Hinton, and Williams 1986) by showing that the inside-outside algorithm can be derived with automatic differentiation. The max-product and sum-product algorithms are both instances of the semiring parsing framework of Goodman (1999) . A semiring over a set K consists of two operations \u2295 and \u2297 such that:", "cite_spans": [ { "start": 447, "end": 459, "text": "Baker (1979)", "ref_id": "BIBREF1" }, { "start": 464, "end": 485, "text": "Lari and Young (1990)", "ref_id": "BIBREF17" }, { "start": 488, "end": 501, "text": "Eisner (2016)", "ref_id": "BIBREF8" }, { "start": 596, "end": 634, "text": "(Rumelhart, Hinton, and Williams 1986)", "ref_id": "BIBREF26" }, { "start": 826, "end": 840, "text": "Goodman (1999)", "ref_id": "BIBREF13" } ], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "\u2022 \u2295 is associative and commutative, and has an identity element0", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "\u2022 \u2297 is associative and has an identity element1", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "\u2022 \u2297 distributes over \u2295, and", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "\u2022 for all x \u2208 K,0 \u2297 x = x \u22970 =0", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "The semiring parsing framework uses these operators to combine partial derivations, and is an instance of our general definition of weighted deduction. For all rules R, the function F R is the semiring product of its arguments:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "F R (x 1 , . . . , x n ) = n i=1 x i (4)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "Applying our general recurrence of Equation 2, the inside value of an item is the semiring sum over rules producing the item of the semiring product of each rule's antecedents:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "V(B) = R: A 1 ,..., An B n i=1 V(A i )", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "Goodman (1999) describes a number of other semirings that can be used in this general algorithm. In particular, the Viterbi derivation semiring, discussed in more detail in Section 3.2, computes the value of the highest weight derivation along with a record of the derivation itself. The derivation semiring collects a set of all valid derivations. The size of this set can be exponential in the number of edges in the hypergraph.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "As an alternative to the semiring framework, Knuth (1977) defines superior functions to be functions that are monotonically increasing in each argument, and that have the property that the function is greater than or equal to each of its arguments. In Knuth's framework, each F R can be any superior function, and the generalized sum for weighted deduction is the minimum operation:", "cite_spans": [ { "start": 45, "end": 57, "text": "Knuth (1977)", "ref_id": "BIBREF15" } ], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "V(B) = min R: A 1 ,..., An B F R (V(A 1 ), . . . , V(A n ))", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "Defining F R to be the sum of its arguments yields an algorithm that is an instance of both the semiring framework and the superior function framework. This min-sum algorithm is equivalent to max-product (Viterbi) if we transform each value by taking its negative logarithm. However, the superior function formulation also includes functions such as", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "F(x 1 , x 2 ) = x 1 + exp(x 2 )", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "that are not associative, as well as functions with more than two arguments. The sum-product algorithm, on the other hand, is an instance of the semiring framework, but is not an instance of the superior function framework, because the generalized sum is not the minimum operation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "In general, one can allow items to have weights of different types, for example, vectors of various dimensions. Dynamic programming is possible as long as each type has a generalized sum operation, and as long as Equation 3holds for each rule, with the first sum interpreted as the sum operator for the type of the rule's consequent, and the second sum interpreted as the sum operator for the type of the ith antecedent.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "V(B)", "sec_num": null }, { "text": "We refer to the total value of all derivations passing through an item X as the item's total weight \u03b3(X):", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "\u03b3(X) = D: X\u2208D weight (D)", "eq_num": "(5)" } ], "section": "Outside Computation", "sec_num": "3." }, { "text": "where each derivation D consists of a complete tree of rules having the goal item as a consequent, and X \u2208 D means that item X is the consequent of some rule in D. Note that the total weight is defined over complete derivations, unlike inside values.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "A semiring is called commutative if its multiplication operator is commutative: a \u2297 b = b \u2297 a. When using a commutative semiring in the semiring framework, an outside value Z(X) for an item X is a value that can be combined with the inside value to obtain the total weight of an item:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "\u03b3(X) = Z(X) \u2297 V(X)", "eq_num": "(6)" } ], "section": "Outside Computation", "sec_num": "3." }, { "text": "Outside values with the sum-product semiring are used to compute expected counts of grammar rules in the EM algorithm. Outside values in the max-product semiring can be used to find the highest probability parse that includes a given item. For example, for CYK parsing of a sentence w 1 \u2022 \u2022 \u2022 w n with the max-product semiring, the outside value Z([A, i, j]) would be the value of the highest scoring parse tree having the grammar's start symbol as the root, and the string w", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "1 \u2022 \u2022 \u2022 w i Aw j+1 \u2022 \u2022 \u2022 w n as leaves. The product Z([A, i, j]) V([A, i, j])", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "is the score of the best tree generating w 1 \u2022 \u2022 \u2022 w n and containing a node A over the substring", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "w i+1 \u2022 \u2022 \u2022 w j .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "For commutative semirings, the outside value Z(X) for an item X can be computed by iterating over rules R that take X as an antecedent, and multiplying the outside value of R's consequent with the inside values of R's other antecedents:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "Z(X) = R, i: R= A 1 ,..., An B A i =X Z(B) \u2297 n j=1, j =i V(A j )", "eq_num": "(7)" } ], "section": "Outside Computation", "sec_num": "3." }, { "text": "For CYK parsing with the sum-product algorithm, the recurrence above corresponds to the standard recurrence for outside probabilities:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "Z([B, i, j]) = A,C,k Z([A, i, k]) P(A \u2192 B C) V([C, j, k]) + A,C,k Z([A, k, j]) P(A \u2192 C B) V([C, k, i])", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "The first sum includes rules of the form shown in Figure 1 (a). The goal item for CFG parsing with start symbol S and sentence length n is [S; 0; n] where [B, i, j] is the second of the three antecedents, and the second sum includes rules where it is the third antecedent. Outside values can be efficiently computed with a top-down or outside pass through the deduction system after first performing a bottom-up pass to compute the inside values for each item.", "cite_spans": [], "ref_spans": [ { "start": 50, "end": 58, "text": "Figure 1", "ref_id": "FIGREF0" } ], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "We depend on the fact that the \u2297 operation is commutative, because we re-order the product", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "V(A 1 ) \u2297 \u2022 \u2022 \u2022 \u2297 V(A n ) by removing V(A i )", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": ", in order to later multiply it in from the right in Equation 6.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "For non-commutative semirings, the situation is more complex, because one must combine values in the correct order. Goodman (1998, Section 2-C) defines a new semiring, defined from an arbitrary inside semiring, for outside computation. The values of this new outside semiring are sets of pairs of values from the inside semiring. Although this approach shows that there is a semiring that can be used for outside computation, Goodman does not give a general, efficient algorithm for computing outside values. The values in the outside semiring may grow exponentially large (because they are sets of pairs), making the general inside-outside algorithm exponential even when operations on the inside semiring are efficient.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "We wish to give a general set of conditions under which efficient outside computation is possible, and to specify the general algorithm. Let us first state the problem by giving a precise definition of efficient outside computation. We will use |\u03b3(X)| to indicate the size of the representation (in memory) of \u03b3(X).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Outside Computation", "sec_num": "3." }, { "text": "Given a weighted deduction system, let g be a function such that, as the size |E| of the system's instantiated hypergraphs grows, max X |\u03b3(X)| \u2208 O(g(|E|)). Efficient outside computation refers to any algorithm that computes the total weight \u03b3(X) of all items X in time O(|E| g(|E|)).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "We include the term g(|E|) in our definition in order to cover situations such as the derivation semiring, where the size required for the goal item G, |\u03b3(G)|, is exponential in |E|, and |\u03b3(G)| provides an upper bound on |\u03b3(X)| for all items X. However, in most cases, and in all the examples discussed in this article, g(|E|) can be treated as a constant. In this case, efficient outside computation is equivalent to time linear in the size of the hypergraph.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "Our definition of efficient outside computation does not explicitly require a topdown or outside pass through the deduction system. It is possible in some settings to compute the total weight of an item without an outside pass. For example, in CYK parsing, one can first eliminate all items not consistent with a fixed item denoting a particular pair of nonterminal and span, and one can then compute the total weight of all remaining derivations bottom-up (Pereira and Schabes 1992) , as shown in Algorithm 1.", "cite_spans": [ { "start": 457, "end": 483, "text": "(Pereira and Schabes 1992)", "ref_id": "BIBREF24" } ], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "Algorithm 1 Bottom-Up Computation of Total Weight procedure BOTTOMUPTOTALWEIGHT for Items [A, i, j] do Remove all items [A , i , j ] such that i < i < j < j or i < i < j < j Compute inside value of goal V(G) = V([S, 0, n]) \u03b3([A, i, j]) \u2190 V(G)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "Restore all items previously removed For CYK parsing |E| \u2208 O(n 3 ) with respect to the sentence length n. The outer loop of Algorithm 1 has O(n 2 ) iterations, and each inside pass is O(n 3 ), for a total runtime of O(n 5 ). Thus, using this method to compute the total weight for all items in the system takes time greater than O(|E| g(|E|)). Computing the total weight of all items is necessary for the EM algorithm, perhaps the most common use case for outside computation. As another use case, one may also wish to precompute the best derivation passing through each item, using the Viterbi semiring, in order to be able to later look up in constant time the best derivation for any desired item. Our definition of efficient outside computation is chosen so as not to predetermine any specific algorithm, but also to rule out less efficient procedures such as repeated bottom-up computation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "In our general framework of weighted deduction, each derivation corresponds to a tree of function evaluations. The outside value of an item X can be thought of as a function F \u00acX from the inside value of X to the total weight of X:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "F \u00acX (V(X)) = \u03b3(X)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "We call F \u00acX defined above an outside function. We use the symbol \u00ac as a mnemonic for \"outside\" in the definition above and in the remainder of this article. In the commutative semiring framework, the outside function multiplies its argument with the outside value Z(X) discussed above:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = Z(X) \u2297 x", "eq_num": "(8)" } ], "section": "Definition 1", "sec_num": null }, { "text": "The outside function F \u00acX can also be formulated in terms of paths through the deduction system, as shown in Figure 2 . We refer to a sequence of deductions R 1 , . . . , R n such that the consequent of each R i is an antecedent of R i+1 as a path p. Let", "cite_spans": [], "ref_spans": [ { "start": 109, "end": 117, "text": "Figure 2", "ref_id": "FIGREF1" } ], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "R i = A i,1 , . . . , A i,n i C i with C i\u22121 = A i, j i , that is, j i specifies which antecedent of rule R i is", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "satisfied by the consequent of rule R i\u22121 . We define a function f i for each rule on the path p by fixing the inside values of the other antecedents, and projecting the rule's inside function onto argument j i :", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "f p,i (x) = F R i (V(A i,1 ), . . . , V(A i,j i \u22121 ), x, V(A i,j i +1 ), . . . , V(A i,n i ))", "eq_num": "(9)" } ], "section": "Definition 1", "sec_num": null }, { "text": "The outside function F \u00acX can be expressed as a sum over paths from item X to the goal item G.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = paths p from X to G f p,n \u2022 \u2022 \u2022 \u2022 \u2022 f p,1 (x)", "eq_num": "(10)" } ], "section": "Definition 1", "sec_num": null }, { "text": "This can be shown by taking the sum over all derivations through item X, grouping the derivations according to the path from X to the goal G, and applying the general distributive rule for weighted deduction of Equation 3: Any tree outside an item X contains a path from X to the goal item G (top). Each rule along the path specifies a function, which can be applied to the inside values of the rule's other antecedents (bottom left). Composing the resulting unary functions along the path results in the outside function F \u00acX (bottom right).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "\u03b3(X) = D:X\u2208D weight (D) (11) = paths p from X to G D:p\u2286D weight (D) (12) = paths p from X to G f p n \u2022 \u2022 \u2022 \u2022 \u2022 f p 1 ( V(X) )", "eq_num": "(13)" } ], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "= F \u00acX ( V(X) )", "eq_num": "(14)" } ], "section": "Definition 1", "sec_num": null }, { "text": "Standard algorithms for outside computation compute this sum of function compositions using dynamic programming. The top-down, outside pass of computation consists of creating a representation of F \u00acX from the set of the representations of F \u00acB for all items B that are consequents of a rule having X as an antecedent:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = R, i: R= A 1 ,...,An B A i =X F \u00acB (F R (V(A 1 ), . . . , V(A i\u22121 ), x, V(A i+1 ), . . . , V(A n )))", "eq_num": "(15)" } ], "section": "Definition 1", "sec_num": null }, { "text": "For commutative semirings, this recurrence is equivalent to Equation 7, as can be seen by substituting in Equation 8for F \u00acB and Equation 4 for F R . For non-commutative semirings, by induction on the length of the paths, we see that:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = p a p \u2297 x \u2297 b p", "eq_num": "(16)" } ], "section": "Definition 1", "sec_num": null }, { "text": "where p ranges over all paths from X to the goal item, and a p and b p are semiring values determined from the inside values along path p. However, the exponentially large number of terms in the sum may make outside computation difficult. The formulation of Equation (15) leads to a simple general condition for efficient outside computation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Definition 1", "sec_num": null }, { "text": "Let out(X) be the set of items B such that some rule has X as an antecedent and B as a consequent, and define g(|E|) as in Definition 1. Efficient outside computation is possible if a representation of F \u00acX can be computed with |out(X)| operations of time O(g(|E|)), given F \u00acB for each B \u2208 out(X), and if the representation can be evaluated in time O(g(|E|)).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Theorem 1", "sec_num": null }, { "text": "Proof. Procedure OUTSIDE (Algorithm 2) computes F \u00acX for all items X using time X |out(X)| O(g(|E|)). The sum X |out(X)| is bounded by summing the number of antecedents for each in E, so X |out(X)| \u2208 O(|E|), yielding total time O(|E| g(|E|)) for Algorithm 2. We then compute \u03b3(X) = F \u00acX (V(X)) in time O(|E| g(|E|)), satisfying the conditions of Definition 1.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Theorem 1", "sec_num": null }, { "text": "procedure OUTSIDE for Items X in reverse topological order do Compute F \u00acX with Equation 15We will give examples of settings that do and that do not meet this general criterion for efficient outside computation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Algorithm 2 General Outside Pass", "sec_num": null }, { "text": "For any commutative semiring, the representation of the outside function F \u00acX (x) consists of the outside value Z(X). If semiring operations take time O(g(|E|)), this value can be computed for all items X in time O(|E| g(|E|)) using Equation 7. The outside function can be evaluated with a single semiring multiplication using Equation (8). Therefore the conditions of Theorem 1 are met, yielding the following corollary:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Commutative Semirings", "sec_num": "3.1" }, { "text": "Corollary 1 Efficient outside computation is possible for any commutative semiring whose operations can be computed in time O(g(|E|)).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Commutative Semirings", "sec_num": "3.1" }, { "text": "In particular, efficient outside computation is possible whenever semiring operations take constant time. The general outside pass of Algorithm 2 takes the following form for commutative semirings.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Commutative Semirings", "sec_num": "3.1" }, { "text": "procedure OUTSIDECOMMUTATIVE for Items X in reverse topological order do Compute Z(X) with Equation 7Set", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Algorithm 3 Outside Pass for Commutative Semiring", "sec_num": null }, { "text": "F \u00acX (x) = Z(X) \u2297 x", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Algorithm 3 Outside Pass for Commutative Semiring", "sec_num": null }, { "text": "Commutative semirings include the sum-product semiring used for finding the total probability of all parses of a string, as well as the max-product and max-sum (Viterbi) semirings used for finding the score of the best parse. Other examples include: the K-best semiring used to find the scores for the k best parses (Mohri 2002), the expectation semiring used to compute expected feature values for EM or for training log-linear models (Eisner 2002) , the variance semiring used in minimum risk training of log-linear models (Li and Eisner 2009) , the entropy semiring used to compute the entropy of the distribution over parses (Hwa 2004; Cortes et al. 2006) , the generalized entropy semiring used to compute the relative entropy between two grammars (Cohen, Simmons, and Smith 2011) , and the k-best+residual semiring used to find the k best scores and total score simultaneously (Gimpel and Smith 2009) . Gimpel and Smith (2009) also define \"generalized\" semirings for approximate inference that do not meet all the criteria that define a semiring, but that have a commutative \u2297 operator and thus admit outside computation with Algorithm 3.", "cite_spans": [ { "start": 436, "end": 449, "text": "(Eisner 2002)", "ref_id": "BIBREF7" }, { "start": 525, "end": 545, "text": "(Li and Eisner 2009)", "ref_id": "BIBREF18" }, { "start": 629, "end": 639, "text": "(Hwa 2004;", "ref_id": "BIBREF14" }, { "start": 640, "end": 659, "text": "Cortes et al. 2006)", "ref_id": null }, { "start": 753, "end": 785, "text": "(Cohen, Simmons, and Smith 2011)", "ref_id": "BIBREF3" }, { "start": 883, "end": 906, "text": "(Gimpel and Smith 2009)", "ref_id": "BIBREF11" }, { "start": 909, "end": 932, "text": "Gimpel and Smith (2009)", "ref_id": "BIBREF11" } ], "ref_spans": [], "eq_spans": [], "section": "Algorithm 3 Outside Pass for Commutative Semiring", "sec_num": null }, { "text": "A semiring is extremal if for all a, b, either a \u2295 b = a or a \u2295 b = b (Vorobev 1963) . The max-product semiring is extremal, as is any semiring over real numbers having max as the generalized addition operator. An extremal semiring is always idempotent, meaning that a \u2295 a = a.", "cite_spans": [ { "start": 70, "end": 84, "text": "(Vorobev 1963)", "ref_id": "BIBREF31" } ], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Another example of an extremal semiring is the Viterbi derivation semiring of Goodman (1999) . Values in this semiring consist of a pair whose first item is a real number, and whose second item is a record of a partial derivation. This semiring is used to find a maximum scoring derivation, rather than merely computing the maximum score as a real number. The record of the partial derivation can be implemented with back pointers; this semiring is a mathematical formalization of the standard use of backpointers in dynamic programming algorithms. The semiring operation a \u2295 b returns whichever of a and b has the highest value as the first element (score) of the pair. The operation a \u2297 b multiplies the scores of a and b and concatenates the derivations into a new derivation. This semiring is non-commutative, because the concatenation in the \u2297 operator is non-commutative. The Viterbi derivation semiring is extremal. 1 For extremal semirings, it is sufficient to retain the outside value of a single outside derivation. We will now prove this fact and derive a general algorithm for extremal semirings. The natural order of a semiring is defined by:", "cite_spans": [ { "start": 78, "end": 92, "text": "Goodman (1999)", "ref_id": "BIBREF13" }, { "start": 923, "end": 924, "text": "1", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "a \u2264 b if a \u2295 b = b b \u2264 a if a \u2295 b = a", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "The natural order of an extremal semiring is a total order, because one of the two cases above applies for any pair of a and b. An extremal semiring is monotonic with respect to its natural order, meaning that:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "a \u2264 b =\u21d2 a \u2297 c \u2264 b \u2297 c a \u2264 b =\u21d2 c \u2297 a \u2264 c \u2297 b", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "For a short proof, see Lemma 2 of Mohri (2002) . Monotonicity implies that:", "cite_spans": [ { "start": 34, "end": 46, "text": "Mohri (2002)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "a \u2264 b =\u21d2 (a \u2297 c) \u2295 (b \u2297 c) = (b \u2297 c) (17) a \u2264 b =\u21d2 (c \u2297 a) \u2295 (c \u2297 b) = (c \u2297 b)", "eq_num": "(18)" } ], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "We now show that the outside function of an item X can be represented by one left and one right multiplication:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = a \u2297 x \u2297 b", "eq_num": "(19)" } ], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "To see this, let B range over consequents of rules with X as an antecedent, and assume as an inductive hypothesis that B's outside function can be represented as one left and one right multiplication:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "F \u00acB (x) = a B \u2297 x \u2297 b B", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Applying the composition rule of Equation (15) yields:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = R,i: R= A 1 ..., An B A i =X a B \u2297 \uf8eb \uf8ed i\u22121 j=1 V(A j ) \uf8f6 \uf8f8 \u2297 x \u2297 \uf8eb \uf8ed n j=i+1 V(A j ) \uf8f6 \uf8f8 \u2297 b B", "eq_num": "(20)" } ], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "which can be summarized by", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = i a i \u2297 x \u2297 b i", "eq_num": "(21)" } ], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "for the appropriate choice of a i and b i .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "For a monotonic semiring, if", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "a 1 \u22971 \u2297 b 1 \u2264 a 2 \u22971 \u2297 b 2 then for all x, a 1 \u2297 x \u2297 b 1 \u2264 a 2 \u2297 x \u2297 b 2", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Thus, which term of Equation 21is greatest does not depend on V. Total ordering implies that there is a unique greatest term. From Equation 17, only the greatest term of Equation (21) appears in the result, meaning that F \u00acX (x) = a j \u2297 x \u2297 b j for some j.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Our algorithm for extremal semirings identifies this greatest term and retains it as the outside value. Algorithm 4 represents outside values as pairs of semiring values to be combined on the left and right. For an outside value Z(X), we use Z(X).l to denote the first (or left) element of the pair, and Z(X).r to denote the second (or right) element. (Including the term1 in the products above is superfluous for semirings, because it is the multiplicative identity element. We retain it to indicate a placeholder for the inside values, and to generalize to settings where items may have different types, and an identity element of the same type as the inside value may be necessary.)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Algorithm 4 Outside Pass for Extremal Semiring", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "procedure OUTSIDEEXTREMAL Z(G) \u2190 (1,1) for goal item G for Items X in reverse topological order do Z(X) \u2190 (0,0) for Rules R = A 1 , . . . , A n B , i such that A i = X do if Z(X).l \u22971 \u2297 Z(X).r \u2264 Z(B).l \u2297 ( i\u22121 j=1 V(A j )) \u22971 \u2297 ( n j=i+1 V(A j )) \u2297 Z(B).r then Z(X).l \u2190 Z(B).l \u2297 i\u22121 j=1 V(A j ) Z(X).r \u2190 ( n j=i+1 V(A j )) \u2297 Z(B).r Set F \u00acX = Z(X).l \u2297 x \u2297 Z(X).r", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "The representation of F \u00acX (x) that we have derived results in the following corollary of Theorem 1.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Extremal Semirings", "sec_num": "3.2" }, { "text": "Efficient outside computation is possible for any extremal semiring whose operations can be computed in time O(g(|E|)).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 2", "sec_num": null }, { "text": "As an example of a setting where efficient outside computation is possible even though the inside functions are not semiring operations, we consider the case of vectors as item weights. Components of these vectors correspond to latent variables or refined nonterminals in the latent variable parsing models of Matsuzaki, Miyao, and Tsujii (2005) , Petrov et al. (2006) , and Cohen et al. (2012) .", "cite_spans": [ { "start": 310, "end": 345, "text": "Matsuzaki, Miyao, and Tsujii (2005)", "ref_id": "BIBREF20" }, { "start": 348, "end": 368, "text": "Petrov et al. (2006)", "ref_id": "BIBREF25" }, { "start": 375, "end": 394, "text": "Cohen et al. (2012)", "ref_id": "BIBREF4" } ], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "To make this concrete, we take as our starting point the tensor formulation of the inside-outside algorithm given by Collins and Cohen (2012) . Inside values for an item are vectors, and the function for computing inside values bottom-up consists of applying a three-dimensional tensor T a\u2192b c specific to a CFG rule a \u2192 b c to two vectors representing the inside values for nonterminals b and c. The function for computing inside values takes two vectors as arguments, and returns a vector that is linear in each argument:", "cite_spans": [ { "start": 117, "end": 141, "text": "Collins and Cohen (2012)", "ref_id": "BIBREF5" } ], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "F R (x a , x b ) k = i,j T a\u2192b c i,j,k x a,i , x b,j", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "If we project this function onto one of its arguments as shown in Equation 9, we obtain a linear function:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "f p,i (x) = F R i x", "eq_num": "(22)" } ], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "where F R i is a matrix that can be computed from the rule tensor T a\u2192b c and the other argument of F R . This implies that the outside function for an item is linear and can be expressed as a matrix-vector multiplication: \u00acX) x for some matrix Z (\u00acX) . We now show this result by induction. From our composition rule in Equation 15:", "cite_spans": [ { "start": 223, "end": 226, "text": "\u00acX)", "ref_id": null }, { "start": 247, "end": 251, "text": "(\u00acX)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "F \u00acX (x) = Z (", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "F \u00acX (x) = R,i: R= A 1 ,..., An B A i =X F \u00acB (F R (V(A 1 ), . . . , V(A i\u22121 ), x, V(A i+1 ), . . . , V(A n )))", "eq_num": "(23)" } ], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "Using the linear projection of Equation 22:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "= R,i: R= A 1 ,...,An B A i =X F \u00acB (F R i x)", "eq_num": "(24)" } ], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "Using the induction hypothesis:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "EQUATION", "cite_spans": [], "ref_spans": [], "eq_spans": [ { "start": 0, "end": 8, "text": "EQUATION", "ref_id": "EQREF", "raw_str": "= R,i: R= A 1 ,...,An B A i =X Z (\u00acB) F R i x (25) = Z (\u00acX) x", "eq_num": "(26)" } ], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "Thus there exists a matrix Z (\u00acX) as desired. The computation of the matrix Z (\u00acX) takes time constant in |E|, giving the following corollary of Theorem 1.", "cite_spans": [ { "start": 29, "end": 33, "text": "(\u00acX)", "ref_id": null }, { "start": 78, "end": 82, "text": "(\u00acX)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Sum of Linear Functions", "sec_num": "3.3" }, { "text": "Efficient outside computation is possible for any inside function consisting of a sum of linear functions.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "This example does not fall into the semiring framework. The inside function cannot be expressed as a semiring product because the rule tensor and the vectors for inside values do not have the same type. It is also possible to allow different items to have inside values consisting of vectors of different dimensionality, which therefore do not belong to a single semiring. Thus, the sum of linear functions provides a case where efficient outside computation is possible, despite the fact that the inside functions are not semiring operations, much less commutative or extremal semirings.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "Matrix multiplication. The operations of matrix addition and matrix multiplication over d \u00d7 d matrices of real numbers form a semiring in which efficient inside computation is possible. However, this semiring is non-commutative, and is also not extremal. Nevertheless, because the outside functions are linear, the sum of linear functions technique allows efficient outside computation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "For any semiring, including non-commutative semirings, we saw in Equation (16) that the outside function for an item can be represented as:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "F \u00acX (x) = p a p \u2297 x \u2297 b p", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "where p ranges over all paths from X to the goal item, and a p and b p are semiring values determined from the inside values along path p. In the case of matrix multiplication, this function cannot be represented as a single matrix multiplication. For example, if V is a matrix of rank one, the product of V with any matrix will have rank no greater than one, while the rank of F \u00acX (V) may be as large as the number of terms in the sum. Thus, it is not possible to represent the outside value of an item as an element of the semiring used to define inside computation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "Nevertheless, F \u00acX is a linear function from R d\u00d7d to R d\u00d7d having d 4 parameters. Consider the inside function for a rule R using matrix multiplication as the semiring product:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "F R (A, B, C) = A B C", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "The projection of this function onto its second argument is:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "f (B) i,j = k, a i,k b k, c ,j", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "which is a linear function with the d 4 parameters {a i, k c ,j } i, j, k, . In general, the projection onto any one argument has the form of Equation (22), repeated here:", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "f p,i (x) = F R i x (27)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "where x is a vector of dimensionality d 2 consisting of a flattened version of the d \u00d7 d matrix for an inside value, and F R i is a matrix of size", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "d 2 \u00d7 d 2 .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "Matrix addition is equivalent to a sum of the flattened vectors. Thus, the semiring of matrix addition and matrix multiplication falls into the framework of a sum of linear functions, and efficient outside computation is possible using the procedure described above. We emphasize that, although standard implementations of matrix muliplication are O(d 3 ) time in the matrix dimension, the time is constant with respect to the size of the hypergraph |E|. Thus the function g(|E|) in the statement of Theorem 1 is constant, and efficient outside computation is equivalent to time linear in |E|.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Corollary 3", "sec_num": null }, { "text": "We now give an example where efficient outside computation is not possible. Knuth's framework of a minimum of superior functions encompasses extremal semirings, as well as some cases outside the semiring framework. It allows not only efficient inside computation, but also efficient best-first search using a generalization of Dijkstra's algorithm (Nederhof 2003) . However, efficient outside computation is not possible in general. Using Equation (10), the outside function can be represented as:", "cite_spans": [ { "start": 348, "end": 363, "text": "(Nederhof 2003)", "ref_id": "BIBREF23" } ], "ref_spans": [], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "F \u00acX (x) = min p f p,n \u2022 \u2022 \u2022 \u2022 \u2022 f p,1 (x)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "where p ranges over paths from X to the goal, and each f p,i is the inside function at rule i of path p, projected onto a single argument by fixing the values of the other argument to their inside values. This outside function is guaranteed to be a superior function, but may be arbitrarily complex. For example, even if each f p,i is linear, and", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "therefore each composition of f p,n \u2022 \u2022 \u2022 \u2022 \u2022 f p,1", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "is also linear, F \u00acX (x) may be a piecewise linear function with an exponentially large number of pieces. Because there is no known way to perform the function composition and represent the result in constant time, efficient outside computation is not possible.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "This implies that the conditions for efficient outside computation neither subsume nor are subsumed by the conditions for best first search, as summarized in Table 1 .", "cite_spans": [], "ref_spans": [ { "start": 158, "end": 165, "text": "Table 1", "ref_id": "TABREF0" } ], "eq_spans": [], "section": "Superior Functions", "sec_num": "3.4" }, { "text": "We now relax the assumption that the deduction system has no cycles. In the semiring framework, the total weight of an item X is defined by Goodman (1999) as:", "cite_spans": [ { "start": 140, "end": 154, "text": "Goodman (1999)", "ref_id": "BIBREF13" } ], "ref_spans": [], "eq_spans": [], "section": "Cycles", "sec_num": "4." }, { "text": "\u03b3(X) = D:X\u2208D weight (D) C(X, D)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Cycles", "sec_num": "4." }, { "text": "where C(X, D) is an integer indicating the number of times that item X appears in derivation D, and the product weight (D) C(X, D) indicates repeated addition with the semiring \u2295 operation. Inside values can be computed by solving a set of equations of the form of Equation (2). The equations may be linear, if an item can appear at most once as the antecedent of a rule (this is the case for unary chains in CFGs), or nonlinear, if an item can appear more than once (as can happen with CFGs with epsilon productions). Methods for solving such equations are discussed by Stolcke (1995) and Goodman (1999) , with detailed complexity analysis by Etessami and Yannakakis (2009) .", "cite_spans": [ { "start": 571, "end": 585, "text": "Stolcke (1995)", "ref_id": "BIBREF30" }, { "start": 590, "end": 604, "text": "Goodman (1999)", "ref_id": "BIBREF13" }, { "start": 644, "end": 674, "text": "Etessami and Yannakakis (2009)", "ref_id": "BIBREF10" } ], "ref_spans": [], "eq_spans": [], "section": "Cycles", "sec_num": "4." }, { "text": "For commutative semirings, computing outside values once inside values are known involves solving a similar set of equations. The outside equations are always linear, because they have only one outside value on the right-hand side. For extremal semirings, derivations with cycles can always be discarded, as they have weight less than the same derivation with the cycle removed, assuming that the inside value is well-defined. For the sum of linear functions, outside values can again be computed by solving a set of linear equations.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Cycles", "sec_num": "4." }, { "text": "To summarize, for all cases discussed in this article where efficient outside computation is possible, outside computation with cycles is no more difficult than inside computation with cycles.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Cycles", "sec_num": "4." }, { "text": "This article has aimed to provide a deeper understanding of the conditions under which efficient outside computation is possible by making three observations.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5." }, { "text": "First, we give a very general condition for efficient outside computation stated in terms of function composition. Despite the emphasis in the literature on describing weighted deduction in terms of semirings, our general condition does not apply to all semirings, and can apply in situations that do not fall into the semiring framework.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5." }, { "text": "Second, we identify a few more specific situations in which efficient outside computation is possible. Extremal semirings help explain why efficient outside computation is possible for the specific non-commutative semirings described by Goodman (1999) , despite the fact that the general outside algorithm given by Goodman is not efficient. The sum of linear functions is a setting that is not a semiring but does allow efficient outside computation.", "cite_spans": [ { "start": 237, "end": 251, "text": "Goodman (1999)", "ref_id": "BIBREF13" } ], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5." }, { "text": "Third, we show that the conditions for efficient outside computation are incomparable to the conditions for efficient best-first search.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5." }, { "text": "The bottom left cell of Table 1 is empty. It is an interesting open problem to consider whether this is an accident, which is to say, whether efficient outside computation is possible for all semirings. Resolving this problem would require either providing a general efficient algorithm that applies to all semirings, or providing a counterexample by means of a semiring such that outside computation can be used to solve a problem that is NP-complete or otherwise considered to be intractable.", "cite_spans": [], "ref_spans": [ { "start": 24, "end": 31, "text": "Table 1", "ref_id": "TABREF0" } ], "eq_spans": [], "section": "Conclusion", "sec_num": "5." }, { "text": "In order to break ties between derivations with the same score, one can use an arbitrary ordering over the partial derivations-for example, lexicographic order.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null } ], "back_matter": [ { "text": "We are grateful for feedback from Giorgio Satta, Daniel\u0160tefankovi\u010d, Parker Riley, Shay Cohen, Esma Balk\u0131r, and the anonymous reviewers. This work was supported by National Science Foundation award IIS-1813823.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Acknowledgments", "sec_num": null } ], "bib_entries": { "BIBREF0": { "ref_id": "b0", "title": "Eric de la Clergerie, and Manuel Vilares. 1999. Tabular algorithms for TAG parsing", "authors": [ { "first": "Miguel", "middle": [ "A" ], "last": "Alonso", "suffix": "" }, { "first": "David", "middle": [], "last": "Cabrero", "suffix": "" } ], "year": null, "venue": "Ninth Conference of the European Chapter of the Association for Computational Linguistics", "volume": "", "issue": "", "pages": "150--157", "other_ids": { "DOI": [ "10.3115/977035.977056" ] }, "num": null, "urls": [], "raw_text": "Alonso, Miguel A., David Cabrero, Eric de la Clergerie, and Manuel Vilares. 1999. Tabular algorithms for TAG parsing. In Ninth Conference of the European Chapter of the Association for Computational Linguistics, pages 150-157, Bergen. DOI: https://doi .org/10.3115/977035.977056", "links": null }, "BIBREF1": { "ref_id": "b1", "title": "Trainable grammars for speech recognition", "authors": [ { "first": "J", "middle": [ "K" ], "last": "Baker", "suffix": "" } ], "year": 1979, "venue": "Speech Communication Papers for the 97th Meeting of the", "volume": "", "issue": "", "pages": "547--550", "other_ids": {}, "num": null, "urls": [], "raw_text": "Baker, J. K. 1979. Trainable grammars for speech recognition. In Speech Communication Papers for the 97th Meeting of the Acoustical Society of America, pages 547-550.", "links": null }, "BIBREF2": { "ref_id": "b2", "title": "Parsing linear context-free rewriting systems", "authors": [ { "first": "H\u00e5kan", "middle": [], "last": "Burden", "suffix": "" }, { "first": "Peter", "middle": [], "last": "Ljungl\u00f6f", "suffix": "" } ], "year": 2005, "venue": "9th International Workshop on Parsing Technologies (IWPT-05)", "volume": "", "issue": "", "pages": "11--17", "other_ids": { "DOI": [ "10.3115/1654494.1654496" ] }, "num": null, "urls": [], "raw_text": "Burden, H\u00e5kan and Peter Ljungl\u00f6f. 2005. Parsing linear context-free rewriting systems. In 9th International Workshop on Parsing Technologies (IWPT-05), pages 11-17, Vancouver. DOI: https:// doi.org/10.3115/1654494.1654496", "links": null }, "BIBREF3": { "ref_id": "b3", "title": "Products of weighted logic programs", "authors": [ { "first": "Shay", "middle": [ "B" ], "last": "Cohen", "suffix": "" }, { "first": "J", "middle": [], "last": "Robert", "suffix": "" }, { "first": "Noah", "middle": [ "A" ], "last": "Simmons", "suffix": "" }, { "first": "", "middle": [], "last": "Smith", "suffix": "" } ], "year": 2011, "venue": "Theory and Practice of Logic Programming", "volume": "", "issue": "", "pages": "", "other_ids": { "DOI": [ "10.1017/S1471068410000529" ] }, "num": null, "urls": [], "raw_text": "Cohen, Shay B., Robert J. Simmons, and Noah A. Smith. 2011. Products of weighted logic programs. In Theory and Practice of Logic Programming, 112-3:263-296. DOI: https://doi.org/10.1017 /S1471068410000529", "links": null }, "BIBREF4": { "ref_id": "b4", "title": "Spectral learning of latent-variable PCFGs", "authors": [ { "first": "Shay", "middle": [ "B" ], "last": "Cohen", "suffix": "" }, { "first": "Karl", "middle": [], "last": "Stratos", "suffix": "" }, { "first": "Michael", "middle": [], "last": "Collins", "suffix": "" }, { "first": "Dean", "middle": [ "P" ], "last": "Foster", "suffix": "" }, { "first": "Lyle", "middle": [], "last": "Ungar", "suffix": "" } ], "year": 2012, "venue": "Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (ACL)", "volume": "", "issue": "", "pages": "223--231", "other_ids": { "DOI": [ "10.1017/S1471068410000529" ] }, "num": null, "urls": [], "raw_text": "Cohen, Shay B., Karl Stratos, Michael Collins, Dean P. Foster, and Lyle Ungar. 2012. Spectral learning of latent-variable PCFGs. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (ACL), pages 223-231, Jeju Island. DOI: https://doi.org/10.1017 /S1471068410000529", "links": null }, "BIBREF5": { "ref_id": "b5", "title": "Efficient computation of the relative entropy of probabilistic automata", "authors": [ { "first": "Michael", "middle": [], "last": "Collins", "suffix": "" }, { "first": "Shay", "middle": [ "B" ], "last": "Cohen", "suffix": "" } ], "year": 2006, "venue": "7th Latin American Symposium on Theoretical Informatics (LATIN 2006)", "volume": "25", "issue": "", "pages": "323--336", "other_ids": { "DOI": [ "10.1007/11682462_32" ] }, "num": null, "urls": [], "raw_text": "Collins, Michael and Shay B. Cohen. 2012. Tensor decomposition for fast parsing with latent-variable PCFGs. In Advances in Neural Information Processing Systems 25, pages 2519-2527, Curran Associates, Inc. Cortes, Corinna, Mehryar Mohri, Ashish Rastogi, and Michael Riley. 2006. Efficient computation of the relative entropy of probabilistic automata. In 7th Latin American Symposium on Theoretical Informatics (LATIN 2006), volume 3887 of Lecture Notes in Computer Science, pages 323-336, Valdivia. DOI: https:// doi.org/10.1007/11682462 32", "links": null }, "BIBREF6": { "ref_id": "b6", "title": "Maximum likelihood from incomplete data via the EM algorithm", "authors": [ { "first": "A", "middle": [ "P" ], "last": "Dempster", "suffix": "" }, { "first": "N", "middle": [ "M" ], "last": "Laird", "suffix": "" }, { "first": "D", "middle": [ "B" ], "last": "Rubin", "suffix": "" } ], "year": 1977, "venue": "Journal of the Royal Statistical Society", "volume": "39", "issue": "1", "pages": "1--21", "other_ids": { "DOI": [ "10.1111/j.2517-6161.1977.tb01600.x" ] }, "num": null, "urls": [], "raw_text": "Dempster, A. P., N. M. Laird, and D. B. Rubin. 1977. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, 39(1):1-21. DOI: https://doi.org /10.1111/j.2517-6161.1977.tb01600.x", "links": null }, "BIBREF7": { "ref_id": "b7", "title": "Parameter estimation for probabilistic finite-state transducers", "authors": [ { "first": "Jason", "middle": [], "last": "Eisner", "suffix": "" } ], "year": 2002, "venue": "Proceedings of the 40th Annual Conference of the Association for Computational Linguistics (ACL-02)", "volume": "", "issue": "", "pages": "1--8", "other_ids": { "DOI": [ "10.3115/1073083.1073085" ] }, "num": null, "urls": [], "raw_text": "Eisner, Jason. 2002. Parameter estimation for probabilistic finite-state transducers. In Proceedings of the 40th Annual Conference of the Association for Computational Linguistics (ACL-02), pages 1-8, Philadelphia, PA. DOI: https://doi.org/10.3115/1073083 .1073085", "links": null }, "BIBREF8": { "ref_id": "b8", "title": "Inside-outside and forward-backward algorithms are just backprop", "authors": [ { "first": "Jason", "middle": [], "last": "Eisner", "suffix": "" } ], "year": 2016, "venue": "Proceedings of the Workshop on Structured Prediction for NLP", "volume": "", "issue": "", "pages": "1--17", "other_ids": { "DOI": [ "10.18653/v1/W16-5901" ] }, "num": null, "urls": [], "raw_text": "Eisner, Jason. 2016. Inside-outside and forward-backward algorithms are just backprop. In Proceedings of the Workshop on Structured Prediction for NLP, pages 1-17, Austin, TX. DOI: https://doi.org/10 .18653/v1/W16-5901", "links": null }, "BIBREF9": { "ref_id": "b9", "title": "Efficient parsing for bilexical context-free grammars and head automaton grammars", "authors": [ { "first": "Jason", "middle": [], "last": "Eisner", "suffix": "" }, { "first": "Giorgio", "middle": [], "last": "Satta", "suffix": "" } ], "year": 1999, "venue": "Proceedings of the 37th Annual Conference of the Association for Computational Linguistics (ACL-99)", "volume": "", "issue": "", "pages": "457--464", "other_ids": { "DOI": [ "10.3115/1034678.1034748" ] }, "num": null, "urls": [], "raw_text": "Eisner, Jason and Giorgio Satta. 1999. Efficient parsing for bilexical context-free grammars and head automaton grammars. In Proceedings of the 37th Annual Conference of the Association for Computational Linguistics (ACL-99), pages 457-464, College Park, MD. DOI: https://doi.org /10.3115/1034678.1034748", "links": null }, "BIBREF10": { "ref_id": "b10", "title": "Recursive Markov chains, stochastic grammars, and monotone systems of nonlinear equations", "authors": [ { "first": "Kousha", "middle": [], "last": "Etessami", "suffix": "" }, { "first": "Mihalis", "middle": [], "last": "Yannakakis", "suffix": "" } ], "year": 2009, "venue": "Journal of the Association for Computing Machinery", "volume": "56", "issue": "1", "pages": "1--66", "other_ids": { "DOI": [ "10.1145/1462153.1462154" ] }, "num": null, "urls": [], "raw_text": "Etessami, Kousha and Mihalis Yannakakis. 2009. Recursive Markov chains, stochastic grammars, and monotone systems of nonlinear equations. Journal of the Association for Computing Machinery, 56(1):1:1-66. DOI: https://doi.org/10 .1145/1462153.1462154", "links": null }, "BIBREF11": { "ref_id": "b11", "title": "Cube summing, approximate inference with non-local features, and dynamic programming without semirings", "authors": [ { "first": "Kevin", "middle": [], "last": "Gimpel", "suffix": "" }, { "first": "Noah", "middle": [ "A" ], "last": "Smith", "suffix": "" } ], "year": 2009, "venue": "12th Conference of the European Chapter of the Association for Computational Linguistics (EACL-09)", "volume": "", "issue": "", "pages": "318--326", "other_ids": { "DOI": [ "10.3115/1609067.1609102" ] }, "num": null, "urls": [], "raw_text": "Gimpel, Kevin and Noah A. Smith. 2009. Cube summing, approximate inference with non-local features, and dynamic programming without semirings. In 12th Conference of the European Chapter of the Association for Computational Linguistics (EACL-09), pages 318-326, Athens. DOI: https://doi.org/10.3115/1609067 .1609102", "links": null }, "BIBREF13": { "ref_id": "b13", "title": "Semiring parsing", "authors": [ { "first": "Joshua", "middle": [], "last": "Goodman", "suffix": "" } ], "year": 1999, "venue": "Computational Linguistics", "volume": "25", "issue": "4", "pages": "573--605", "other_ids": { "DOI": [ "10.1162/0891201041850894" ] }, "num": null, "urls": [], "raw_text": "Goodman, Joshua. 1999. Semiring parsing. Computational Linguistics, 25(4):573-605. DOI: https://doi.org/10.1162 /0891201041850894", "links": null }, "BIBREF14": { "ref_id": "b14", "title": "Sample selection for statistical parsing", "authors": [ { "first": "Rebecca", "middle": [], "last": "Hwa", "suffix": "" } ], "year": 2004, "venue": "Computational Linguistics", "volume": "30", "issue": "3", "pages": "253--276", "other_ids": {}, "num": null, "urls": [], "raw_text": "Hwa, Rebecca. 2004. Sample selection for statistical parsing. Computational Linguistics, 30(3):253-276.", "links": null }, "BIBREF15": { "ref_id": "b15", "title": "A generalization of Dijkstra's algorithm", "authors": [ { "first": "Donald", "middle": [ "E" ], "last": "Knuth", "suffix": "" } ], "year": 1977, "venue": "Information Processing Letters", "volume": "6", "issue": "1", "pages": "1--5", "other_ids": {}, "num": null, "urls": [], "raw_text": "Knuth, Donald E. 1977. A generalization of Dijkstra's algorithm. Information Processing Letters, 6(1):1-5.", "links": null }, "BIBREF16": { "ref_id": "b16", "title": "A new parsing algorithm for combinatory categorial grammar", "authors": [ { "first": "Marco", "middle": [], "last": "Kuhlmann", "suffix": "" }, { "first": "Giorgio", "middle": [], "last": "Satta", "suffix": "" } ], "year": 2014, "venue": "Transactions of the Association for Computational Linguistics", "volume": "2", "issue": "", "pages": "405--418", "other_ids": { "DOI": [ "10.1162/tacl_a_00192" ] }, "num": null, "urls": [], "raw_text": "Kuhlmann, Marco and Giorgio Satta. 2014. A new parsing algorithm for combinatory categorial grammar. Transactions of the Association for Computational Linguistics, 2:405-418. DOI: https://doi.org/10 .1162/tacl a 00192", "links": null }, "BIBREF17": { "ref_id": "b17", "title": "The estimation of stochastic context-free grammars using the Inside-Outside algorithm", "authors": [ { "first": "K", "middle": [], "last": "Lari", "suffix": "" }, { "first": "S", "middle": [ "J" ], "last": "Young", "suffix": "" } ], "year": 1990, "venue": "Computer Speech and Language", "volume": "4", "issue": "", "pages": "35--56", "other_ids": {}, "num": null, "urls": [], "raw_text": "Lari, K. and S. J. Young. 1990. The estimation of stochastic context-free grammars using the Inside-Outside algorithm. Computer Speech and Language, 4:35-56.", "links": null }, "BIBREF18": { "ref_id": "b18", "title": "First-and second-order expectation semirings with applications to minimum-risk training on translation forests", "authors": [ { "first": "Zhifei", "middle": [], "last": "Li", "suffix": "" }, { "first": "Jason", "middle": [], "last": "Eisner", "suffix": "" } ], "year": 2009, "venue": "Conference on Empirical Methods in Natural Language Processing", "volume": "", "issue": "", "pages": "40--51", "other_ids": {}, "num": null, "urls": [], "raw_text": "Li, Zhifei and Jason Eisner. 2009. First-and second-order expectation semirings with applications to minimum-risk training on translation forests. In Conference on Empirical Methods in Natural Language Processing (EMNLP 2009), pages 40-51, Singapore.", "links": null }, "BIBREF19": { "ref_id": "b19", "title": "Translation as weighted deduction", "authors": [ { "first": "Adam", "middle": [], "last": "Lopez", "suffix": "" } ], "year": 2009, "venue": "Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009)", "volume": "", "issue": "", "pages": "532--540", "other_ids": { "DOI": [ "10.3115/1609067.1609126" ], "PMID": [ "19815967" ] }, "num": null, "urls": [], "raw_text": "Lopez, Adam. 2009. Translation as weighted deduction. In Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009), pages 532-540, Athens. DOI: https://doi.org/10.3115/1609067 .1609126, PMID 19815967", "links": null }, "BIBREF20": { "ref_id": "b20", "title": "Probabilistic CFG with latent annotations", "authors": [ { "first": "Takuya", "middle": [], "last": "Matsuzaki", "suffix": "" }, { "first": "Yusuke", "middle": [], "last": "Miyao", "suffix": "" }, { "first": "Jun'ichi", "middle": [], "last": "Tsujii", "suffix": "" } ], "year": 2005, "venue": "Proceedings of the 43rd Annual Conference of the Association for Computational Linguistics (ACL-05)", "volume": "", "issue": "", "pages": "75--82", "other_ids": { "DOI": [ "10.3115/1219840.1219850" ] }, "num": null, "urls": [], "raw_text": "Matsuzaki, Takuya, Yusuke Miyao, and Jun'ichi Tsujii. 2005. Probabilistic CFG with latent annotations. In Proceedings of the 43rd Annual Conference of the Association for Computational Linguistics (ACL-05), pages 75-82, Ann Arbor, MI. DOI: https://doi.org/10.3115/1219840 .1219850", "links": null }, "BIBREF21": { "ref_id": "b21", "title": "Generalized multitext grammars", "authors": [ { "first": "I", "middle": [], "last": "Melamed", "suffix": "" }, { "first": "Giorgio", "middle": [], "last": "Dan", "suffix": "" }, { "first": "Ben", "middle": [], "last": "Satta", "suffix": "" }, { "first": "", "middle": [], "last": "Wellington", "suffix": "" } ], "year": 2004, "venue": "Proceedings of the 42nd", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Melamed, I. Dan, Giorgio Satta, and Ben Wellington. 2004. Generalized multitext grammars. In Proceedings of the 42nd", "links": null }, "BIBREF22": { "ref_id": "b22", "title": "Annual Conference of the Association for Computational Linguistics (ACL-04)", "authors": [], "year": null, "venue": "", "volume": "", "issue": "", "pages": "661--668", "other_ids": { "DOI": [ "10.3115/1218955.1219039" ] }, "num": null, "urls": [], "raw_text": "Annual Conference of the Association for Computational Linguistics (ACL-04), pages 661-668, Barcelona. DOI: https:// doi.org/10.3115/1218955.1219039", "links": null }, "BIBREF23": { "ref_id": "b23", "title": "Weighted deductive parsing and Knuth's algorithm", "authors": [ { "first": "M.-J", "middle": [], "last": "Nederhof", "suffix": "" } ], "year": 2003, "venue": "Computational Linguistics", "volume": "29", "issue": "1", "pages": "135--144", "other_ids": { "DOI": [ "10.1162/089120103321337467" ] }, "num": null, "urls": [], "raw_text": "Nederhof, M.-J. 2003. Weighted deductive parsing and Knuth's algorithm. Computational Linguistics, 29(1):135-144. DOI: https://doi.org/10.1162 /089120103321337467", "links": null }, "BIBREF24": { "ref_id": "b24", "title": "Inside-outside reestimation from partially bracketed corpora", "authors": [ { "first": "Fernando", "middle": [], "last": "Pereira", "suffix": "" }, { "first": "Yves", "middle": [], "last": "Schabes", "suffix": "" } ], "year": 1992, "venue": "30th Annual Meeting of the Association for Computational Linguistics", "volume": "", "issue": "", "pages": "128--135", "other_ids": { "DOI": [ "10.3115/981967.981984" ] }, "num": null, "urls": [], "raw_text": "Pereira, Fernando and Yves Schabes. 1992. Inside-outside reestimation from partially bracketed corpora. In 30th Annual Meeting of the Association for Computational Linguistics, pages 128-135, Newark, DE. DOI: https://doi.org/10.3115/981967 .981984", "links": null }, "BIBREF25": { "ref_id": "b25", "title": "Learning accurate, compact, and interpretable tree annotation", "authors": [ { "first": "Slav", "middle": [], "last": "Petrov", "suffix": "" }, { "first": "Leon", "middle": [], "last": "Barrett", "suffix": "" }, { "first": "Romain", "middle": [], "last": "Thibaux", "suffix": "" }, { "first": "Dan", "middle": [], "last": "Klein", "suffix": "" } ], "year": 2006, "venue": "Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics", "volume": "", "issue": "", "pages": "433--440", "other_ids": { "DOI": [ "10.3115/1220175.1220230" ] }, "num": null, "urls": [], "raw_text": "Petrov, Slav, Leon Barrett, Romain Thibaux, and Dan Klein. 2006. Learning accurate, compact, and interpretable tree annotation. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics, pages 433-440, Sydney. DOI: https://doi.org /10.3115/1220175.1220230", "links": null }, "BIBREF26": { "ref_id": "b26", "title": "Learning internal representations by error propagation", "authors": [ { "first": "D", "middle": [ "E" ], "last": "Rumelhart", "suffix": "" }, { "first": "G", "middle": [ "E" ], "last": "Hinton", "suffix": "" }, { "first": "R", "middle": [ "J" ], "last": "Williams", "suffix": "" } ], "year": 1986, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Rumelhart, D. E., G. E. Hinton, and R. J. Williams. 1986. Learning internal representations by error propagation. In D.", "links": null }, "BIBREF27": { "ref_id": "b27", "title": "Parallel Distributed Processing", "authors": [ { "first": "E", "middle": [], "last": "Rumelhart", "suffix": "" }, { "first": "J", "middle": [ "L" ], "last": "Mcclelland", "suffix": "" } ], "year": null, "venue": "", "volume": "2", "issue": "", "pages": "318--362", "other_ids": { "DOI": [ "10.21236/ADA164453" ], "PMID": [ "3159828" ] }, "num": null, "urls": [], "raw_text": "E. Rumelhart and J. L. McClelland, editors, Parallel Distributed Processing, volume 2. MIT Press, pages 318-362. DOI: https:// doi.org/10.21236/ADA164453, PMID: 3159828", "links": null }, "BIBREF28": { "ref_id": "b28", "title": "Principles and implementation of deductive parsing", "authors": [ { "first": "Stuart", "middle": [ "M" ], "last": "Shieber", "suffix": "" }, { "first": "Yves", "middle": [], "last": "Schabes", "suffix": "" }, { "first": "Fernando", "middle": [ "C N" ], "last": "Pereira", "suffix": "" } ], "year": 1995, "venue": "Journal of Logic Programming", "volume": "24", "issue": "1-2", "pages": "", "other_ids": { "DOI": [ "10.1016/0743-1066(95)00035-I" ] }, "num": null, "urls": [], "raw_text": "Shieber, Stuart M., Yves Schabes, and Fernando C. N. Pereira. 1995. Principles and implementation of deductive parsing. Journal of Logic Programming, 24(1-2):3-36. DOI: https://doi.org/10.1016/0743 -1066(95)00035-I", "links": null }, "BIBREF29": { "ref_id": "b29", "title": "Parsing Schemata", "authors": [ { "first": "Klaas", "middle": [], "last": "Sikkel", "suffix": "" } ], "year": 1997, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Sikkel, Klaas. 1997. Parsing Schemata. Springer Verlag, Berlin.", "links": null }, "BIBREF30": { "ref_id": "b30", "title": "An efficient probabilistic context-free parsing algorithm that computes prefix probabilities", "authors": [ { "first": "Andreas", "middle": [], "last": "Stolcke", "suffix": "" } ], "year": 1995, "venue": "Computational Linguistics", "volume": "21", "issue": "2", "pages": "165--202", "other_ids": {}, "num": null, "urls": [], "raw_text": "Stolcke, Andreas. 1995. An efficient probabilistic context-free parsing algorithm that computes prefix probabilities. Computational Linguistics, 21(2):165-202.", "links": null }, "BIBREF31": { "ref_id": "b31", "title": "Extremal matrix algebra", "authors": [ { "first": "N", "middle": [ "N" ], "last": "Vorobev", "suffix": "" } ], "year": 1963, "venue": "Proceedings of the USSR Academy of Sciences", "volume": "152", "issue": "", "pages": "24--27", "other_ids": {}, "num": null, "urls": [], "raw_text": "Vorobev, N. N. 1963. Extremal matrix algebra. Proceedings of the USSR Academy of Sciences, 152:24-27.", "links": null } }, "ref_entries": { "FIGREF0": { "uris": null, "type_str": "figure", "text": "general weighted deduction rule, and a rule of CFG parsing in weighted deduction notation. The goal item for CFG parsing with start symbol S and sentence length n is [S, 0, n].", "num": null }, "FIGREF1": { "uris": null, "type_str": "figure", "text": "Figure 2 Any tree outside an item X contains a path from X to the goal item G (top). Each rule along the path specifies a function, which can be applied to the inside values of the rule's other antecedents (bottom left). Composing the resulting unary functions along the path results in the outside function F \u00acX (bottom right).", "num": null }, "TABREF0": { "text": "Summary of results.", "html": null, "type_str": "table", "num": null, "content": "
Efficient Inside Possible Best-first Possible
Efficient Outside Possiblecommutative semirings extremal semirings
sum of linear functions
Efficient Outside Not Possiblegeneral superior functions
" } } } }