Formalizing Semantic Parsing with Tree Transducers
Paper · 2011 · Bevan Jones, Mark Johnson and Sharon Goldwater
Summary
A question about the capital of Texas is easy to ask in ordinary language. To answer it from a database, a system needs to identify Texas as a state, select the operation that retrieves its capital, and return the result. Semantic parsing is the task of learning to produce that formal instruction from the question. The authors of Formalizing Semantic Parsing with Tree Transducers start from the observation that the instruction has a tree structure. Its operations enclose their arguments, and those arguments can contain operations of their own. A tree transducer provides rules for relating that structure to the words of a question. The authors use it to put an existing parser, the hybrid tree, into a formalism with established algorithms for training and decoding.
The transducer describes how a meaning tree and a sentence could be generated together. At each node it selects the formal rules for the arguments, decides how to order the resulting phrases, and generates words at positions around them. A question can fit the same meaning tree through several different sequences of decisions, so training has to infer which decisions plausibly account for each observed pair. The authors adapt a standard procedure that counts rules across possible derivations, using variational Bayes to give rules some support even when the training data offer little evidence for them. They also add head-switching, which lets a rule consider a parent and child together and change how their words are nested. A Japanese example shows why simply swapping sibling phrases can leave a valid question beyond the reach of the original structure.
The experiments use the English and Japanese portions of GeoQuery that share the same formal queries. The transducer with both head-switching and Bayesian estimation reaches raw accuracy of 82.8% on English and 80.8% on Japanese, the highest recall in the paper’s comparison for each language. Systems that return answers more selectively still achieve higher precision and, in some cases, higher F1. The comparisons within the transducer family also put the gains in perspective. Changing the estimation procedure produces the larger shift in recall, while head-switching adds a smaller gain under either training procedure. The paper thus shows both what the extra rules contribute and what can be gained by training a familiar rule system with a general estimation method.
Deep dive: Formalizing Semantic Parsing with Tree Transducers
How tree transducers turn questions into database queries, and what Bayesian training and head-switching improved on GeoQuery. · about 35 minutes to read
The problem and its context
From a question to an executable meaning
The input to the parser is a sentence. Its output is a formal expression whose interpretation is defined by a meaning language. In the paper’s opening example, a question about the capital of Texas corresponds to an expression with an answer operation on the outside, a capital operation inside it, and an expression identifying the state as Texas farther in. The nested form specifies what to do with the name. A system that merely identifies the topic as geography or recognizes Texas as a place has recovered only part of the information needed to execute the query.
The learning problem begins with examples that pair those kinds of expressions with questions. The parser needs to carry what it learns from those examples to questions it has yet to see. Learning which words surround a state name can help, but much of the work concerns the arrangement of larger pieces. Names, operations, and requests for answers may each account for different words. The meaning language fixes which argument belongs to which operation, while the natural-language question gives its own cues through phrasing and order. The connection between those structures is what the parser has to recover.
The paper works with functional or variable-free expressions. Their brackets already indicate how pieces of the meaning fit together. An operation becomes a tree node, and the operations or entities it takes as arguments sit beneath it. The tree is therefore available from the meaning representation itself. The same kind of structural description is useful for the sentence, although the sentence comes with no observed tree in this setup. A learner might account for a given sequence of words with several underlying structures. The structure that links the sentence to its meaning is latent, which means that the training data leave it to be inferred.
This formulation separates the direction in which a rule system describes its examples from the direction in which a parser is used. At test time, a person supplies a sentence and needs a formal meaning back. In the authors’ formalism, the meaning tree is the transducer’s input side and the sentence is its output side. That direction allows the transducer to start from a grammar that says what a valid meaning looks like. The parser can then ask which meaning tree and which rule choices would best account for the observed sentence. It is the same relationship used in both cases, with different parts known in advance.
Why use a common formalism?
The authors situate their work among several approaches to semantic parsing. They cite string classification, including the use of kernels over strings, and approaches that use syntax and grammar formalisms to relate linguistic expressions to meanings. They mention synchronous grammar, which describes related structures on two sides of a transformation, and combinatory categorial grammar, which can associate grammatical composition with the construction of a logical form. They also discuss methods based on probabilistic context-free grammar, where grammar rule choices have probabilities. Their account points to systems built around string kernels, statistical machine translation, and probabilistic CCG induction with higher-order unification.
The paper’s concern is that the engineering of these approaches was tied closely to the system being built. A particular way of aligning a phrase with a formal operation could bring with it a particular training procedure. A change to the structures that a parser allowed could then require a change to the machinery that scored those structures or learned their weights. The authors see common ground in the use of structure on the natural-language and meaning sides. A framework that already describes transformations of trees gives researchers a place to express those commonalities and to reuse algorithms that operate on the resulting rules.
Tree transducers come from the theory of automata. A finite-state machine provides the starting intuition. Its current state determines the transitions it can take. With a tree as input, a transition can send the machine into several successor states at once, each responsible for its own subtree. One branch might process the argument of a formal operation while another accounts for material elsewhere under the same node. The transition also determines where the results of those branches go in the output. The paper traces the formalism to work on linguistic tree transformations and notes its subsequent use in syntax-based statistical machine translation.
The authors choose the hybrid-tree parser as a concrete system to reformulate. Its starting point is a meaning tree, which it extends with words and rearranges to produce a sentence. This is a particularly direct case for a tree transducer. Both its assumptions about the formal tree and its assumptions about how words are attached can be assigned to rules. Once those parts are expressed in the same formalism, a change to the permissible tree transformations can be made in the rules, while a change to estimation can be made in the general training procedure.
The method, step by step
From a meaning tree to a sentence
Consider the example that names Portland, Maine. In the paper the expression is written cityid(portland,me). The city-identifying operation has arguments for the city and the state. A sentence or phrase that expresses it need not mention those arguments in the same order as the formal expression. The Japanese phrase in the paper starts with the word for Maine, places a linking word after it, and ends with the word for Portland. To relate that phrase to the formal expression, the system needs to choose an argument order and account for the linking word as well as the names.
The hybrid tree handles those tasks in stages. An ordering decision says how to arrange the arguments and where to leave space for words belonging to the current operation. A later word decision chooses what to put in each occupied space. For the Portland example, the ordering choice can place the state argument before the city argument and leave space for a word between them. The words contributed by the argument subtrees can then express Maine and Portland, while the city-identifying operation contributes the material between them. The approach gives the ordering decision a way to handle patterns that recur with different names.
These decisions extend a meaning tree with a linguistic derivation. A derivation is the record of which rules fired and how their results were combined. At training time, the sentence and meaning tree are observed. The derivation is inferred. An observed word between two names is evidence for an attachment decision, but it does not come with a label that assigns it to a particular node. Plausible alternatives have to be considered when learning what each rule should weigh.
How the tree transducer relates meanings to sentences
The steps in order.
The branches in this process can operate recursively. Once the current node has made its ordering decision, each argument branch can make decisions of its own. The argument keeps its formal role even if the corresponding words move. The city and state arguments, for instance, still occupy the positions required by cityid in the formal tree. It is the arrangement of their contributions to the output string that changes.
What the rules can express
The transducer’s definition makes explicit which decisions are available. The general notation begins with the version that can produce an output tree. The paper then specializes it to produce a string.
(Q, Σ, Δ, q_start, R)
Q is the finite set of states, and q_start is the designated starting state. Σ and Δ are the alphabets of the input and output trees. An alphabet gives the symbols that the corresponding rules can use. R is the set of transducer rules. Here the capital R names the whole set, while the formulas about meaning grammar later use capital R with a subscript to name an individual grammar rule.
r = [q.t → u].v
r is a rule from the set R. On the left of the arrow, q is a state and t is an input fragment containing tree symbols and possibly variables. A variable stands for the entire subtree found at its position. The dot in q.t pairs the state with the input fragment. On the right of the arrow, u describes what to produce. In a tree-producing rule, it is an output tree fragment whose leaves may include pairs of a state and a variable. Such a pair tells the transducer which state to use on the subtree bound to the variable. The arrow separates the condition for taking the rule from its action, and the brackets group the transformation. The final dot attaches v, the non-negative weight assigned to the rule.
The paper calls the transducer linear when each variable occurs at most once in the output side of a rule. The constraint prevents a rule from asking for duplicate processing of the same captured subtree. It is non-deleting when every variable captured on the input side also occurs on the output side. The condition concerns variable occurrences in the rule. A branch can still yield an empty string, as it does when a word attachment position is unused.
A root-to-frontier rule starts at the root of the fragment it is processing and delegates the subtrees at its boundary. In the shallow form, the rule sees the root symbol and leaves the children as variables. The paper gives the depth of these fragments as ≤ 1. An extended left-hand side can describe some of the structure below the root before handing off the remaining branches. Each rule still sees a bounded fragment. This is the property that later allows the system to handle a parent and child in a single rule.
For the tree-to-string case, the output alphabet supplies symbols for a string. The right side interleaves those symbols with pairs that say which state should process a captured subtree. Reading their contributions in the specified order produces the output text. The same formalism can describe several rules for a fragment, so a sentence and meaning can be associated through more than one derivation.
Weights give the rules a probabilistic interpretation. The paper uses a joint distribution on meanings and sentences. Rules that leave the same state form a group whose probabilities sum to one. In this interpretation the transducer makes choices that generate the formal tree and the sentence together. Some choices add to the formal tree, some arrange material in the string, and some emit words. Thinking of paired generation makes it easier to follow why the state used to predict a word also contains information about the formal operation responsible for it.
How the meaning grammar guides generation
The system receives a grammar for the meaning representation language. This is a regular tree grammar, which specifies how to build the well-formed trees of that language. The paper uses an analysis of the meaning tree in which each node is labeled with the grammar rule that produced it. A distinction between rule and symbol matters here. A function or predicate name can appear in more than one grammar rule, and the rule identifies which use of the name is present. Conditioning subsequent choices on the rule gives the transducer access to this distinction.
The probability of the meaning tree begins with a choice of rule for its root. Each node’s children then contribute probabilities based on two pieces of information. The system uses the rule that produced their parent, and it uses each child’s position among that parent’s arguments. For a function with different roles for its arguments, the permitted expressions and their likelihoods can therefore vary with position.
P(MR) = P(R_ε) ∏_{i ∈ paths} ∏_{j ∈ args_i} P(R_{i·j} | j, R_i)
P denotes probability, and MR is the meaning representation, analyzed with its grammar. paths is the set of addresses of its nodes. An address i describes the path to one node from the root, while ε is the empty address at the root. R_ε is the grammar rule at that root, and R_i is the grammar rule at address i. args_i contains the child positions at i. For a child position j, the centered dot in i·j means that j is appended to the address i. R_{i·j} is the rule at that child. The vertical bar indicates conditioning, so the child probability on the right is given its position and its parent’s rule. The membership sign assigns each index to its set, the product signs multiply the factors over the indicated nodes and children, and the equals sign specifies the probability of the whole meaning.
The authors use states to put this probability into the transducer. A state can record a type of decision and the identity of a particular meaning grammar rule. An argument state records which child needs to be generated. An order state chooses a pattern for arranging that child’s linguistic material around its own arguments. A word state generates the words at an attachment position. Keeping the grammar rule in the state makes the conditioning information available locally, wherever the transition is taken.
q_start.x₀ → q_orderᴿ.x₀
q_start is the initial state, and q_orderᴿ denotes the order state associated with grammar rule R. x₀ is the variable for the subtree being processed, and the dots pair the states with that same variable. The arrow shows the move to the order state. The eligible choices of R are the grammar rules whose left-hand side contains the grammar’s start symbol. Their weights account for the probability of selecting the rule at the root. This transition selects a rule through the state change, leaving the expansion of the tree to the order state.
q_arg,iᴿᵖ.x₀ → q_orderᴿᶜ.x₀
q_arg,iᴿᵖ is the argument state for child position i under the parent grammar rule Rᵖ. q_orderᴿᶜ is the order state associated with the selected child rule Rᶜ. The superscripts mark parent and child rule identities. The dots pair each state with x₀, the subtree variable, and the arrow changes the state that will handle it. The transducer includes this choice when the grammar permits the child rule at that argument position. Its weight is the probability of the child rule given the parent rule and the position. Here i is a child position in a transition, whereas in the tree probability formula it names the full address of a node.
This division of work lets states for the same meaning grammar rule operate together. The order and word states associated with an operation handle its local arrangement and attached words. Argument states can move into the states associated with another grammar rule. The tree grammar’s restrictions are thus reflected in which transitions the transducer offers. The learner estimates the weights of those choices from the examples.
How ordering and word attachment work
The ordering step works with an input tree augmented by placeholder symbols written W. The preprocessing inserts a placeholder wherever a node can contribute words around its arguments. For a node with arguments, the possible word positions include the ends and the spaces between neighboring argument subtrees. A placeholder lets a transducer rule account for that position through an input symbol. A postprocessing transducer removes the added symbols from the meaning tree.
Each ordering pattern combines an attachment choice with a permutation of the arguments. The paper describes the attachment part as a sequence of bits. A bit of 1 enables words at its site, and a bit of 0 sends the site to a state that yields the empty string. The permutation says which argument’s output comes at each position. The placeholders and arguments can then be read as an alternating sequence of local word contributions and recursively generated phrases. What becomes the first argument phrase in the sentence can still be a later argument in the formal expression.
n + 1
n denotes the number of arguments of a function. The plus sign and 1 give the additional site needed to count both ends as well as the intervening sites. The expression is the length of the attachment bit sequence for that function. The paper represents the permutation with the argument indices from 0 through n − 1, where the minus sign expresses the last index in an enumeration starting at 0. The entry at each position in that permutation tells the rule which argument to place there.
The choice is made for a grammar rule, so even operations with the same number of children can favor different patterns. The paper illustrates the size of the pattern inventory with 4 transformations for an operation with one argument and 16 for an operation with two. The options reflect the joint choice of attachment sites and sibling order. In the case of a formal constant with just a W child in the augmented tree, the rule enables word generation there. A constant such as a place name then has a way to contribute a phrase even though it has no semantic arguments to rearrange.
In the Portland example, the added slots belong to the city-identifying node and to the nodes for the two names. An ordering rule at the city-identifying node calls the argument state for Maine ahead of the one for Portland. It enables the city-identifying node’s intervening word site and leaves the other local sites empty. The resulting Japanese string is meen no porutorando. Its words arise from separate branches, including the branch responsible for the linking word. The particular pattern governs where those branches contribute, and their word rules determine what comes out.
The word rules distinguish active generation from closing a site. While active, a word state can emit a word and remain active, or it can emit a word and move to the state that closes the site. Closing the site accounts for W on the input side and produces the empty string on the output side. An ordering rule that leaves a site unoccupied can send it straight to the closing state. The description therefore permits a single occupied site to contribute a phrase with several words and allows unused positions to make no visible contribution to the sentence.
q_words,1ᴿ.x₀ → wordₖ q_words,1ᴿ.x₀
q_words,1ᴿ is the active word state for grammar rule R. The 1 distinguishes active generation from the closing state marked 0. x₀ is the subtree variable retained by the rule, and the dots pair it with the state. wordₖ is the word emitted by the selected rule, with k indexing the word choice. The arrow says that the rule emits that word and then calls the same state on x₀, so more words can follow.
q_words,1ᴿ.x₀ → wordₖ q_words,0ᴿ.x₀
q_words,1ᴿ again denotes the active state for grammar rule R. wordₖ is the chosen word, k indexes it, and x₀ is the carried subtree variable. The dots combine the state with the variable. The arrow specifies an emission followed by a call to q_words,0ᴿ, the closing state for the same grammar rule. This version makes the emitted word the last at that site.
q_words,0ᴿ.W → ε
q_words,0ᴿ is the closing state for grammar rule R, the dot pairs it with the placeholder W, and the arrow specifies the output ε, the empty string. This use of ε concerns the string. In the meaning-tree probability, the same character denotes the empty address of the root.
The reconstruction of the hybrid tree now has separate rules for choosing a meaning node, placing the material beneath it, and selecting words. Each group of outgoing choices has its own probabilities. This assignment of jobs to states lets the authors express the original hybrid-tree calculation in the general transducer framework.
P(NL–MR hybrid) = P(R_ε) ∏_{i ∈ paths} [P(pat_i | R_i) ∏_{j ∈ args_i} P(R_{i·j} | j, R_i) ∏_{k ∈ words_i} P(w_{i·k} | R_i)]
P denotes probability, NL is the natural-language sentence, and MR is the meaning representation. NL–MR hybrid names a particular tree connecting the two, including its choices of transformations. R_ε is the meaning rule at the root. The outer product ranges over node addresses i in paths. At each node, pat_i is the ordering and attachment pattern, and R_i is the node’s rule. The first conditional factor is the probability of that pattern under that rule. The next product ranges over child positions j in args_i, with i·j the address of the child and R_{i·j} its grammar rule. The last product ranges over indices k in words_i, the words attached at node i. w_{i·k} is the indexed word there, and its probability is conditioned on R_i. The vertical bars indicate conditioning, the membership signs assign indices to sets, the product signs multiply the indicated probabilities, and the square brackets group the contributions made at node i.
The distinction between a derivation and a pair is important for training. The formula gives the probability of a particular hybrid tree. If several hybrid trees produce the same sentence and meaning, that pair can receive support from several sets of rule choices. During training the algorithm distributes support across compatible derivations. At decoding time the implementation looks for the meaning tree participating in the highest-probability derivation for the observed sentence. These operations serve different purposes. One estimates weights from all compatible explanations of the observations, and the other chooses a result.
What changes when a parent and child switch
The basic hybrid tree ties the placement of words to the nesting of the meaning tree. Once a subtree has generated its words, it contributes a continuous piece of the output under the ordinary ordering rules. A parent can move its argument phrases relative to one another and attach words at the available boundaries. Those choices can change word order substantially while preserving the nesting associated with each subtree.
The paper’s example about the highest point in the United States brings out the remaining restriction. In the Japanese question, the material corresponding to America comes before the superlative, and the word related to the place follows it. The authors associate these pieces with the location, highest, and place components of the formal meaning. The ordinary rules have to work with the dominance relations in that formal tree. Adjusting the order of siblings leaves the relevant parent–child nesting in place, which prevents the intended arrangement of those contributions.
Head-switching allows a rule to match the parent and child together. The larger input pattern can recognize both grammar rules and access word sites attached to both nodes. The output can then interleave contributions from those sites in the order that the rotated configuration requires. In the example, switching the roles of the highest and place nodes for arranging the output allows the intended relation between the meaning tree and the sentence. The gold query still supplies the formal operations and arguments. The rotation concerns the order and nesting used to account for the words.
The paper illustrates the extended rule with a parent that has a child function, which in turn has its own argument. In the notation below, the symbols with superscripts p and c keep the material belonging to the parent and child distinct.
q_orderᴿᵖ.p(w₀ᵖ, c(w₀ᶜ, x₀ᶜ, w₁ᶜ), w₁ᵖ) → q_words,i₀ᴿᶜ.w₀ᶜ q_words,i₁ᴿᵖ.w₀ᵖ q_arg,0ᴿᶜ.x₀ᶜ q_words,i₂ᴿᵖ.w₁ᵖ q_words,i₃ᴿᶜ.w₁ᶜ
p and c are the parent and child function symbols, and Rᵖ and Rᶜ are their respective grammar rules. The superscripts p and c on the four w terms identify the node that owns each word site, and their subscripts distinguish the sites on either side of the nested material. x₀ᶜ is the child function’s argument subtree. On the left, q_orderᴿᵖ is the order state for the parent rule. The dot connects that state with the entire matched fragment. The parentheses and commas show the order and grouping of children in that fragment. On the right, each q_words term calls the word state for its grammar rule and attachment choice, with i₀ through i₃ denoting the choices at the successive output sites. A dot pairs each call with its word site. q_arg,0ᴿᶜ is the child rule’s argument state for position 0, paired with x₀ᶜ. The arrow separates matching from generation, and the sequence on its right gives the order in which the branches contribute to the output.
In that rule, the child’s outside word sites surround contributions from the parent, with a call to process the child’s argument inside the sequence. A shallow order rule has access to an argument as a whole. The extended rule has access to the child’s internal boundary and can arrange material around it. The authors add related rules for cases with multiple arguments. The rest of the derivation continues through the existing state types, so the general machinery can train and decode the expanded rule set.
How training handles hidden derivations
The training data specify natural-language strings and their meaning trees. They supply evidence about a rule indirectly, through the derivations in which that rule could participate. If different derivations fit a pair, their contributions should depend on their current weights. A plausible derivation contributes more expected uses of its rules than a derivation with little weight. The expected count of a rule summarizes these contributions across the observed pairs.
The inside–outside procedure computes those counts by using the tree structure of derivations. An inside quantity combines the possible ways of completing a subderivation. An outside quantity accounts for the compatible ways that subderivation can be reached and combined with the rest of the example. Together they give the contribution of a rule occurrence in context. This is the same general reasoning that underlies inside–outside training for probabilistic context-free grammars. The transducer procedure uses derivations compatible with the meaning tree and sentence.
Expectation maximization, or EM, alternates between estimating rule counts and updating the rule weights from those estimates. Within a group of rules leaving the same state, the maximum-likelihood update gives each rule a share of the weight proportional to its expected count.
θ_{s,k} = c_{s,k} / Σ_{k′} c_{s,k′}
θ_{s,k} is component k of the probability vector for the rules leaving state s. c_{s,k} is the expected count of that rule. k′ ranges over the rules leaving the same state, and Σ sums their expected counts. The slash divides the rule’s expected count by the group’s total, and the equals sign assigns that proportion as the updated parameter.
The authors identify a difficulty with this update when observations are sparse. A rule with zero expected count receives zero weight in a group with observed uses. A rule with few expected uses can also get an unreliable estimate. Either issue can matter at test time. A formal function or a word may require a rule that was compatible with few training examples, even though the transducer’s rule inventory contains it. To change how the learner treats such choices, the paper places a prior on the parameter vectors.
A Dirichlet prior assigns probability to different settings of the probabilities in a rule group. The authors use a symmetric version, giving the same prior parameter to each component. This provides support before the training counts enter the calculation. The posterior combines the prior with the evidence of the sentence–meaning pairs.
p(θ | α, W, Y) = p(W, Y, θ | α) / p(W, Y | α)
p denotes a probability or probability density as appropriate for its arguments. θ is the collection of rule weights, α is the symmetric Dirichlet hyper-parameter, W is the collection of observed sentences, and Y is their paired collection of meaning trees. The capital W here names the sentences, distinct from the placeholder W used in the tree rules. The vertical bar marks conditioning, and the commas group the variables supplied as arguments or conditions. The numerator is the joint quantity for the data and weights under the prior setting. The denominator is the probability of the data under that setting, and the slash denotes division. The left side is the posterior density of the weights.
That denominator also needs to account for the derivations that could have produced the observed pairs. The paper writes the marginalization using an integral over both the derivations and the parameters. With discrete derivations, marginalizing over them amounts to summing their contributions.
p(W, Y | α) = ∫ p(W, X, Y | θ) p(θ | α) dX dθ
X is the collection of hidden derivations, with a derivation linking a meaning tree in Y to its paired string in W. θ again denotes the rule weights and α the prior hyper-parameter. p(W, X, Y | θ) is the joint probability of the observed pairs and those derivations given the weights. p(θ | α) is the prior density. The vertical bars mark conditioning, and the adjacent probability terms are multiplied. The integral sign together with dX and dθ indicates marginalization over the derivations and weights. The equals sign identifies that marginal quantity with the probability of the observed pairs.
The exact calculation is intractable in the authors’ setup. Variational Bayes replaces the posterior over the hidden derivations and weights with a tractable approximation and improves it by maximizing a lower bound. The bound is derived by expressing the probability of the data as an average under the approximation and moving the logarithm inside that average to get a lower quantity.
log p(W, Y | α) ≥ ∫ q(X, θ) log [p(W, X, Y, θ | α) / q(X, θ)] dX dθ = F
log is the logarithm, p(W, Y | α) is the probability of the observed strings W and trees Y under hyper-parameter α, and ≥ gives the direction of the bound. q(X, θ) is the approximate joint posterior for the hidden derivations X and weights θ. p(W, X, Y, θ | α) is the joint quantity for data, derivations, and weights under the prior setting. The slash divides that quantity by the approximation, and the brackets show the argument of the logarithm on the right. The integral averages that logarithm under q, with dX and dθ indicating the variables marginalized. F names the resulting lower bound, which the paper calls variational free energy. For fixed observations, increasing this bound decreases the divergence from the approximation to the joint posterior over derivations and parameters.
The mean-field assumption used in the paper factorizes that approximation. It represents the distribution over derivations through one factor and the distribution over weights through another. The factors still influence each other during training. One is updated using the current setting of the other, and the roles alternate.
q(X, θ) = q₁(X) q₂(θ)
q is the approximate joint posterior, X is the hidden derivation collection, and θ is the collection of rule parameters. q₁ is the factor for derivations, and q₂ is the factor for parameters. The equality expresses the factorization, and adjacency on the right denotes multiplication. The separation is an assumption about the approximation. It is what allows the estimation procedure to update the two factors in turn.
The practical change to the trainer is concentrated in the weights used for computing expected counts. For standard EM the trainer uses the normalized expected counts. Under the variational approximation it uses a quantity obtained from the expected logarithm of each weight with the prior included.
τ_{s,k} = exp[Ψ(c_{s,k} + α) − Ψ(Σ_{k′}(c_{s,k′} + α))]
τ_{s,k} is the effective weight used for rule k leaving state s in the next count update. exp is the exponential function, and Ψ is the digamma function. c_{s,k} is the expected count of the rule, and α is the shared prior hyper-parameter. The plus sign combines count and prior contribution. The sum Σ with index k′ collects these terms across the rules leaving s. The minus sign subtracts the digamma of that total from the digamma of the individual component, and the brackets enclose the argument of the exponential. The resulting weights enter the next inside–outside pass, which supplies updated expected counts for the following parameter update.
The experiments use Tiburon, a weighted tree automata toolkit, for the transducer training and decoding. The authors run 40 iterations of the toolkit’s inside–outside-style procedure and adapt its parameter update for the Bayesian runs. They use 100 iterations of IBM alignment model 1 to initialize the word distributions. As in the original hybrid tree, they also use the language’s standard noun phrase list to help initialize the distributions for corresponding items in the meaning language. These steps provide starting estimates for the words before the transducer revises its weights from the paired training examples.
Decoding uses the same procedure after either kind of training. Given a sentence, Tiburon searches for the meaning tree and derivation with the highest derivation probability. Thus the comparisons between EM and variational Bayes hold the decoding procedure fixed. The weights and the derivation they favor can differ, and the head-switching versions additionally have a larger set of derivations to consider.
Experiments and results
What the test measures
GeoQuery pairs questions about United States geography with expressions in a database query language. The paper evaluates the multilingual section, where 250 questions have Japanese translations and can be evaluated against the same meanings as their English counterparts. The English and Japanese experiments therefore share a set of formal targets. They test how the different word sequences and constructions associated with those targets can be handled by the parsing system.
The authors use 10-fold cross validation with the standard training and test partitions of Wong and Mooney. A fold gives the system a training partition from which to estimate its weights and a held-out partition on which to make predictions. The reported metrics are micro-averaged across folds, so the counts underlying the metrics are pooled over the held-out predictions. The experiment tests generalization to held-out questions within the corpus under those partitions.
Correctness is judged by what a query retrieves. A predicted parse is correct when its execution gives the same database results as the annotated meaning for that question. This matters when comparing systems because the score concerns the delivered answer on GeoQuery. A parser could in principle produce a formally different expression that retrieves the same result and receive credit. Conversely, a well-formed query that retrieves the wrong result counts as an error.
The paper reports precision, recall, and F1. Precision measures the proportion of correct parses among the sentences for which a system returns a parse. Recall measures the proportion of all test sentences that receive a correct parse, so the authors also call it raw accuracy. Taking the harmonic mean of precision and recall gives the F1 score. If a system returns a parse for every sentence, precision and recall use the same denominator, and F1 coincides with them. If a system sometimes fails to return a parse, its precision can remain high even when a smaller share of the questions receive correct answers.
Which systems are compared
The direct transducer formulation of the hybrid tree is labeled trs with EM and trsVB with variational Bayes. The version with parent–child switching is labeled hs with EM and hsVB with variational Bayes. The Bayesian runs use a symmetric prior with hyper-parameter 0.1. Having both training procedures for each rule inventory lets the paper compare estimation while fixing the available transformations, and compare the two rule inventories under the same estimation procedure.
The closest previously published comparison is Lu-uni, the original hybrid tree with a unigram word distribution. Lu-dis is the stronger version from that work. It combines unigram and bigram information and uses discriminative reranking. Such reranking can change the order of candidate parses after the generative procedure has made them available. The other comparisons are WASP, which uses synchronous grammar, and UBL-s, the previously published system with the highest raw accuracy in the authors’ comparison. The distinction between the unigram hybrid tree and its reranked version is important because the new transducer’s changes concern its generative rules and their estimation.
Raw accuracy on the English GeoQuery cross-validation test folds
The head-switching transducer with Bayesian training gives the largest share of correct answers.
The numbers
| System or setting | recall % |
|---|---|
| UBL-s | 80.4 |
| WASP | 70.0 |
| Lu-uni | 71.2 |
| Lu-dis | 72.8 |
| trs | 69.6 |
| trsVB | 82.0 |
| hs | 71.6 |
| hsVB (this paper) | 82.8 |
Raw accuracy on the Japanese GeoQuery cross-validation test folds
Bayesian training raises recall for both transducer variants, with head-switching giving the highest result.
The numbers
| System or setting | recall % |
|---|---|
| UBL-s | 80.5 |
| WASP | 74.4 |
| Lu-uni | 73.6 |
| Lu-dis | 76.0 |
| trs | 67.2 |
| trsVB | 78.0 |
| hs | 68.8 |
| hsVB (this paper) | 80.8 |
Reading the results across metrics
On the English GeoQuery test folds, hsVB has precision, recall, and F1 of 82.8%. The basic Bayesian transducer, trsVB, has 82.0% on each measure. Its English recall exceeds the 80.4% of UBL-s, which reports precision of 80.8% and F1 of 80.6%. WASP has a different profile, with 95.4% precision, 70.0% recall, and 80.8% F1 on the English test folds. The combination of high precision and lower recall shows that its returned parses are often right while the share of all questions answered correctly is smaller. Lu-dis reaches 91.5% precision, 72.8% recall, and 81.1% F1 in English. The English hsVB result leads the displayed comparison in recall and F1.
On the Japanese GeoQuery test folds, hsVB has precision, recall, and F1 of 80.8%. The basic Bayesian version has 78.0% on each measure. Here UBL-s, with Japanese recall of 80.5%, exceeds the basic Bayesian version and falls below the head-switching version. Its Japanese precision and F1 are both 80.6%. WASP reports Japanese precision of 92.0%, recall of 74.4%, and F1 of 82.9%. Lu-dis reports 87.6% precision, 76.0% recall, and 81.4% F1. These results explain the paper’s emphasis on raw accuracy. The system that gives the largest share of correct answers over all questions can place below a more selective system on F1.
The Bayesian transducers return parses throughout the test sets, according to the paper’s account of their results. The authors attribute the coverage to smoothing the weights for choices involving words and functions that were unseen in training. In the EM results, precision is higher than recall for both transducer rule inventories in both languages. In the Bayesian rows, equality across the metrics makes the remaining errors errors of the returned parses. Producing a parse for every input and producing the right query are separate achievements, and the table shows how the choice of estimation procedure affects their combination.
The comparison with Lu-uni helps distinguish the value of the reformulation from the value of subsequent changes. On English, Lu-uni has 80.2% precision, 71.2% recall, and 75.4% F1. On Japanese it has 79.7% precision, 73.6% recall, and 76.5% F1. The basic EM transducer has 88.3% precision, 69.6% recall, and 77.9% F1 in English. In Japanese its corresponding results are 82.4%, 67.2%, and 74.0%. The authors regard the broad level of performance as similar and attribute the discrepancies principally to smoothing differences. The original system uses specialized smoothing for the meaning tree and word probabilities. The transducer experiments explore a common Bayesian update across the rule groups.
The benchmark therefore supports two distinct statements about the reformulation. It provides a way to express the hybrid tree and handle it with a general transducer toolkit. In combination with the modified training and the added rules, it also yields a generative system whose recall exceeds the prior figures shown for each language. The experiment evaluates the complete choices that go into those results, including the supplied meaning grammar, initialization, rule inventory, and decoding objective.
What the ablations show
Changing the estimator while keeping the rules fixed
The results provide a controlled comparison of estimation for each of the two transducer rule sets. With the basic rule set, moving from EM to variational Bayes takes English recall from 69.6% to 82.0% and Japanese recall from 67.2% to 78.0%, all on the GeoQuery cross-validation test folds. With the head-switching rules enabled, the corresponding change is from 71.6% to 82.8% in English and from 68.8% to 80.8% in Japanese. The same pattern appears whether the rules can combine a parent and child or can only make the original, shallower choices.
Precision moves in the opposite direction in those comparisons. For the basic inventory it goes from 88.3% to 82.0% on English and from 82.4% to 78.0% on Japanese. For the head-switching inventory it goes from 89.5% to 82.8% on English and from 84.3% to 80.8% on Japanese. Because Bayesian estimation lets the system answer across the test set, its precision is calculated over more returned parses. The experiments show that this broader coverage comes with a higher share of correct answers across all test questions. The aggregate figures leave open which previously failed questions became correct and how often the estimator chose a different parse for a question the EM version already answered.
The training comparison also helps explain why smoothing is important to the paper’s argument about the formalism. The same update can treat sparse choices among meaning rules and sparse choices among words. The authors use that common procedure in place of recreating the original hybrid tree’s separate smoothing methods. The evidence comes from applying the update as a whole. The experiment leaves the separate contributions of smoothing the meaning rules and smoothing the word rules unresolved.
Changing the rule inventory while keeping the estimator fixed
Under EM, head-switching raises English GeoQuery recall from 69.6% to 71.6% and Japanese GeoQuery recall from 67.2% to 68.8%. Under variational Bayes, head-switching takes English recall from 82.0% to 82.8% and Japanese recall from 78.0% to 80.8%. Its benefit appears under both estimators. In the Bayesian runs, each version covers the test set, so that comparison measures a change in how often the returned query is correct with coverage already complete.
The example involving the highest point in the United States gives a structural explanation for a benefit the larger inventory can deliver. The original rule structure restricts the possible arrangement of the words associated with highest and place. A joint parent–child rule can give those words their intended order. This example establishes that the new rules admit a derivation the original arrangement rules exclude. The test-fold scores provide aggregate evidence that adding rules improves performance. The paper supplies no per-construction breakdown that would assign the observed gains specifically to questions like the illustrated one.
The comparison with the earlier hybrid tree answers a related question with less experimental control. Lu-uni provides an approximate check on what happens when the new transducer implements the familiar unigram approach. The authors point to custom smoothing in the original hybrid tree when accounting for the difference between its results and those from the direct EM transducer. Lu-dis then shows the performance of an earlier system that combines a richer word distribution with reranking. Since those changes occur together in the published comparison, the table supplies a benchmark for the complete system. It gives no separate estimate of the contribution of the bigram component or reranking.
Taken together, the within-system comparisons distinguish two ways a correct answer can become available. An added transformation can make a suitable derivation possible, as the Japanese example demonstrates. An estimation change can give a derivation usable weight when the choices it requires are sparse. In these experiments the estimation change produces the larger movement in recall. The case for head-switching rests on the illustrated expansion in expressiveness and the consistent gain under both training procedures.
Limitations
Limits identified by the authors
The implementation focuses on a class of tree-to-string transducers with extended input patterns, linear use of subtree variables, and preservation of those variables in the rules. This class supports the extension the authors wanted to test while still giving them the algorithms for training and decoding that they needed. The conclusion identifies other transducer classes as a direction for future investigation. The experiment demonstrates the approach for a particular choice of formalism and rule inventory.
The paper also identifies reranking as a possible next step. The reported transducer results come from the generative derivation score, while the earlier Lu-dis system already uses discriminative reranking. The authors anticipate gains from adding such a stage. The reported experiments establish the performance of the generative system and leave the effect of a combined system open.
The formal meanings in the experiments are functional or variable-free expressions with an evident tree structure. A grammar for them is supplied. The paper notes that a preliminary analysis might also make it possible to represent lambda expressions as trees. That suggestion describes a route to extending the framework. The implementation and results concern the particular kind of meaning language used in the experiments.
Limits visible in the evaluation
The benchmark covers questions about one domain and paired English and Japanese versions of the same meanings. Having the same target queries makes the language comparison easier to interpret, since the formal side is held in common. It also bounds the evidence. The test partitions establish performance on held-out questions from that benchmark. Generalization to another domain or a language with different constructions would depend on its grammar, training examples, and the transformations supplied to the system.
The grammar and the initialization procedure are part of what the system receives. In particular, the meaning grammar already defines valid arguments and operations, and the word initialization draws on alignment and a noun phrase list. The result is evidence about learning from paired questions and formal meanings under those conditions. Learning the meaning language itself, or isolating the role of the language-specific initialization, would require a different comparison. Likewise, the experiment evaluates a common training algorithm for a chosen set of rules. The designer still specifies which states, transitions, and enlarged input patterns are allowed.
Execution-based accuracy answers a practical question about whether the database returns the intended result. Its scope is the behavior of the query on that database. When two expressions happen to return the same result, the metric grants them the same credit. It therefore supplies limited evidence about the exact structure of a predicted meaning or the correctness of its internal word alignment. The example derivations explain how the transformations work, while the evaluation measures their consequences for the final answers.
The reported metrics provide point comparisons across the test folds. The paper gives no uncertainty estimate or significance test for the observed head-switching gains. It also leaves open how often those rules fire in correct predictions, how often they contribute to an error, and which questions benefit most. The test-fold results support the stated ranking by raw accuracy. Assessing the stability of small gaps across different samples calls for evidence beyond those scores.
Finally, the implemented decoder selects the tree attached to the most probable derivation. A tree with several plausible derivations could receive more total probability when their contributions are combined and still lack the strongest single derivation. The results characterize the decoder the authors used. The relative performance of summing derivations by meaning at test time remains an open empirical question in this setup.
What came after
Parsing English into Abstract Meaning Representation Using Syntax-Based Machine Translation is a later citing work that applies a syntax-based translation approach to mapping English into Abstract Meaning Representation. Its title identifies a different formal target from the executable GeoQuery expressions. It continues the broader line of work that treats the relationship between a sentence and a structured meaning as a translation problem, with syntactic structure available to guide that relationship.
The connection is at the level of the approach. Formalizing Semantic Parsing with Tree Transducers shows how a meaning grammar and a set of transformations can specify a probabilistic relationship between trees and words. The later work places syntax-based translation in the service of another semantic parsing task. The citation connects the two formulations. The later work’s adoption of any particular head-switching rule, prior, or estimation procedure is unspecified.
Cite
Cite as Bevan Jones, Mark Johnson and Sharon Goldwater. 2011. Formalizing Semantic Parsing with Tree Transducers. Proceedings of the Australasian Language Technology Association Workshop 2011.
@inproceedings{jones2011formalizing,
title = {{Formalizing Semantic Parsing with Tree Transducers}},
author = {Bevan Jones, Mark Johnson and Sharon Goldwater},
booktitle = {Proceedings of the Australasian Language Technology Association Workshop 2011},
year = {2011},
url = {https://aclanthology.org/U11-1005/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/jones-2011-formalizing-semantic-parsing-tree-transducers/