Semantic Parsing as Machine Translation
Paper · 2013 · Jacob Andreas, Andreas Vlachos and Stephen Clark
Summary
A geography question can be easy to understand and still be unusable as a database query. Someone asking for states that border Texas expects a list of states, while the database needs a precise expression that identifies Texas, specifies the relationship, and determines what to return. Semantic parsing supplies that expression. The authors ask how much of the work can be done by treating the question and its formal representation as a pair of translations. They use standard statistical machine translation components and adapt the way those components receive and return the formal language.
The main adaptation is to write the formal expression as a sequence. The authors read its tree from the root down, recording each symbol together with the number of arguments it takes. The argument counts preserve the information needed to reassemble the tree. A translation system learns correspondences between pieces of questions and pieces of these sequences. It also learns which sequences of formal symbols tend to occur together. At prediction time, it proposes ranked translations, and the parser takes the highest-ranked proposal that can be reconstructed as a complete tree. The paper compares a phrase-based system, which learns correspondences between contiguous strings, with a hierarchical system that can also learn patterns with gaps.
The evaluation uses GeoQuery questions in English, German, Greek, and Thai. A prediction counts as correct when it returns the same database answer as the reference expression. With the benchmark’s supplementary noun-phrase data, the hierarchical system reaches 80.5% test accuracy in English, close to UBL at 82.1%. The hierarchical variant leads the paper’s phrase-based variant in English, German, and Thai, while the phrase-based variant does better in Greek. In each language, at least one of the translation systems matches or exceeds at least one purpose-built parser on accuracy. An informal comparison also finds that the translation system trains faster than the available implementations of two strong baselines.
The result gives semantic parsing a competitive baseline built from familiar translation machinery. It also identifies design choices that matter when the target is executable. The sequence representation makes tree reconstruction unambiguous, the target-side scorer helps order candidate expressions, and the final check enforces the structure that the translation decoder is free to violate. GeoQuery shows how these pieces can work together on a variable-free query language. The experiment also shows how much the resulting scores can depend on the additional phrase-level supervision supplied with the benchmark.
Deep dive: Semantic Parsing as Machine Translation
Semantic Parsing as Machine Translation turns questions into database queries and tests how well standard translation tools work on GeoQuery. · about 36 minutes to read
The problem and its context
From a question to a database operation
A natural-language question and a formal database expression describe the same task at different levels of detail. In a geography question, the wording gives a human reader cues about the entities, the relations between them, and the kind of answer expected. A formal expression commits to those choices explicitly. It supplies the operations and arguments that an interpreter can evaluate. A semantic parser has to identify the relevant choices in the question and assemble them in the form the interpreter expects.
The assembly matters because a formal expression has nesting. The paper’s example about the population of a city involves locating the city, applying the population operation to it, and packaging the result as an answer. The city identifier itself has arguments. A correct expression needs all the required pieces, in positions that make their relationships clear. A sequence containing plausible pieces in the wrong order may describe a different operation. A sequence missing an argument may fail to describe a complete operation at all. This requirement connects semantic parsing to knowledge representation and reasoning, since the output’s organization determines what can be interpreted or executed.
It is useful to separate the translation problem from the execution problem. The parser is given text and predicts a formal expression. The database interface takes that expression and supplies an answer. In the experiments, the answer provides a way to judge the parser’s work. During training, however, the parser has access to paired questions and formal expressions. Those pairs let it learn at the level of formal symbols and spans, including pieces whose contribution to the final answer would be difficult to isolate from the answer alone.
The paper draws its analogy with machine translation from these pairs. A sentence in a human language and an expression in a meaning representation language can be regarded as corresponding utterances. From a collection of such pairs, one can try to discover which source words map to which target symbols, extend those correspondences to larger spans, and combine them to handle a new question. A formal target adds a strict requirement. In ordinary translation, a reader can sometimes recover the intention of an awkward sentence. Here, an incomplete formal expression can prevent the interpreter from reaching the stage at which a result is available.
How earlier parsers learned the mapping
The authors place their study within a field that already used several forms of supervision. They mention rule-based parsers, supervised parsers trained from paired examples, unsupervised work, and approaches that learn from responses. These categories describe where evidence for the mapping comes from. A hand-built rule can encode a known correspondence directly. A pair of a question and its formal expression exposes the intended representation during learning. Response-based supervision supplies evidence through the result of interpreting an expression. The paper’s experiment uses the paired setting and asks how far general-purpose translation machinery can go under that condition. The unsupervised direction is represented in its account by Confidence Driven Unsupervised Semantic Parsing.
Translation methods already influenced some of the supervised parsers the authors review. WASP, for instance, begins by aligning the words in a question with symbols in its formal expression. It then extracts rules using procedures that the authors compare with syntax-based translation. A shared starting point therefore existed before this paper. The distinction lies in how much additional machinery the parser uses after alignment, how the rules describe the output structure, and what assumptions enter when their weights are learned. WASP is described in Learning for Semantic Parsing with Statistical Machine Translation.
Another precedent, tsVB, uses a tree transducer, a device whose rules describe correspondences involving trees. A rule can associate source material with a structured portion of a target expression. As the authors recount it, simply estimating weights from counts of rule occurrences failed to improve results in that work, which instead estimated weights by variational Bayesian inference. This is an example of earlier research borrowing a device from translation while developing a distinct way to learn its parameters. The relevant study is Semantic Parsing with Bayesian Tree Transducers.
The paper describes two other routes to structural information. The hybrid-tree approach assigns probabilities to derivations that relate variable-free expressions to their natural-language strings. Its extensions can use larger structures composed from smaller rules. UBL starts from word alignments and learns a lexicon in combinatory categorial grammar, in which lexical entries carry both syntactic and semantic information. Its rule induction uses splitting and unification operations specific to lambda calculus, allowing it to derive templates at several levels of granularity. These systems show how much a parser can learn by exploiting the organization of the intended formal expressions. The paper connects the hybrid-tree approach to A Generative Model for Parsing Natural Language to Meaning Representations.
The question this paper isolates
The authors take the attraction of structured rules seriously. Those rules can encode the parts that belong together in a formal expression. Their experiment asks whether the target can preserve enough of that information in its written form for a general translation system to learn useful correspondences directly. If the expression has a reversible sequence representation, the translation apparatus can work on sequences while a later procedure recovers the tree. The representation of the target thus does some work that earlier approaches assigned to the rules or the search procedure.
Phrase-based translation gives the paper a particularly direct way to explore that question. A translation phrase is a span of tokens. Its boundaries can be useful for prediction even if the span crosses a constituent boundary in the question or contains an incomplete fragment of the formal expression. Learning from such spans lets the translation system reuse a recurring local pattern without first deciding which linguistic constituent or logical subexpression it represents. The authors identify their use of this kind of phrase-based translation for semantic parsing as a departure from the earlier tree-based translation approaches they knew. The translation method itself comes from Statistical Phrase-Based Translation.
Hierarchical translation extends the same comparison. It can put gaps inside a learned correspondence, so an outer pattern can recur with different material in its gaps. This matters because the order in which a question presents information can differ from the order in which the formal expression uses it. A phrase table captures recurring stretches in their observed order, while hierarchical rules give the decoder a way to reuse a larger pattern across intervening material. Both approaches leave the formal target in sequence form during translation, which makes their comparison informative about the choice of rules within that shared design.
The study is therefore a test of a concrete alternative for a supervised setting. It keeps the executable target and its requirement for structural completeness. It represents the target in a way a translation toolkit can consume, then asks how well ordinary alignment, rule extraction, target scoring, and decoding can solve the mapping. This gives the comparison with earlier semantic parsers a clear interpretation. The systems have a common task and answer criterion, while their approaches to representing and searching the space of possible expressions differ.
The method, step by step
What goes into the system and what comes out
The training material pairs each question with a meaning representation, a formal expression that says what the database should evaluate. Each expression in the GeoQuery setup is variable-free and tree-shaped. An operation is a node, its arguments appear below it, and a constant such as a place name can sit at a leaf. The authors make this structure visible to the translation toolkit by representing the expression as an ordered list of decorated symbols. A decorated symbol gives both the original label and its argument count.
Once the training expressions have that form, the rest of training can operate on pairs of token sequences. An aligner learns connections between the source and target. Rule extraction collects useful correspondences from those connections. A separate score, estimated from target sequences, gives the decoder evidence about which combinations of formal symbols are plausible. At prediction time, the input is a question. The output of translation is a ranked list of decorated sequences, from which the parser selects a candidate that can be turned back into a tree.
Training and prediction with an executable target
The steps in order.
The steps before decoding learn what to propose and how to rank proposals. The final steps determine whether a particular proposal is structurally usable and convert it to the format the interpreter expects. This division is central to the experiment. The authors can use a regular translation decoder to propose candidates because the target encoding leaves enough information for a separate check.
Encoding a tree as a sequence
The authors encode an expression by visiting its root before its descendants and proceeding through its arguments in their original order. This is a preorder traversal. A traversal fixes the order in which the symbols appear. The added argument counts, also called arities, tell the reader how the sequence divides into subtrees. A constant takes zero arguments. A function taking a city as its sole argument bears a different count from the identifier that takes both the city name and its state.
The Seattle example shows what the encoding has to preserve. The outer operation returns an answer. Within it is a population operation, applied to a city. The city is specified by a city identifier that contains both Seattle and the state abbreviation wa. The decorated sequence can be written as follows.
answer₁ population₁ city₁ cityid₂ seattle₀ wa₀
Each word before a subscript is a formal symbol. answer is the outer operation, population requests the population, city introduces the city expression, and cityid identifies the city from its name and state. seattle and wa are the constants. The subscript ₁ marks an operation with a single argument, ₂ marks the identifier with two arguments, and ₀ marks a leaf. Spaces separate successive decorated symbols. The position of a symbol in the traversal and its argument count jointly determine how it attaches.
One way to follow reconstruction is to keep track of the arguments that are still waiting for a subtree. At the beginning, the entire expression is waiting for a root. Reading answer₁ supplies that root and leaves its argument to be read. Each of the next operations attaches in the open position and creates the position or positions required by its own arity. At cityid₂, the traversal must supply two subtrees in order. seattle₀ and wa₀ fill them without creating further obligations. The whole expression is then complete.
This explains the two ways a candidate can fail the structural check. It can end while an argument still needs a subtree, or it can keep supplying symbols after the complete root expression has closed. In the second case, the remaining symbols are outside the single tree the decoder is supposed to produce. The parser can detect either condition as it reads the sequence. For a successful candidate, the same argument obligations determine where to open and close brackets in the restored expression.
Arity also matters before reconstruction because a formal symbol can take different numbers of arguments in different examples. The paper notes that cityid is unary in some of the training material. Keeping its argument count alongside the name means the aligner can distinguish those cases from examples in which the identifier takes both a city name and a state. The difference remains visible when translation rules are extracted. A source phrase can consequently provide evidence for a particular use of the formal symbol, including the amount of structure that must follow it.
The encoding guarantees a unique tree for a decorated sequence that admits a complete reconstruction. It leaves the translation system free to propose other sequences. It also leaves open which well-formed tree expresses the question. Several trees might pass the same structural test while referring to different places or requesting different quantities. The ranking stage has to use evidence from the question and the training expressions to favor an appropriate candidate.
The authors scope this procedure to a variable-free language. They point to combinatory logic as a way to map expressions involving variables, including lambda-calculus expressions, into variable-free forms. That observation explains why they regard the representation as potentially relevant beyond the particular GeoQuery formalism. The experiment itself starts with expressions already suitable for the traversal. The preprocessing that it demonstrates is the direct encoding of those expressions.
Finding correspondences in the paired data
After linearization, an input question and its formal expression resemble a parallel sentence pair. The system can observe that certain words recur near certain formal tokens across the training material. It still has to infer the token-level correspondences. The paired examples tell it which whole expressions go together, while the alignment procedure estimates which parts of those expressions go together.
The implementation uses IBM Model 4 in GIZA++. Alignment is run from the natural-language side to the formal side and in the reverse direction. The two passes can give different accounts of the same pair, since each direction treats a different sequence as the source. The authors combine the two outputs through symmetrization, producing a many-to-many alignment. That allows the extracted correspondences to reflect cases in which several tokens on one side are associated with material on the other. The relevant alignment and symmetrization work includes Improved Statistical Alignment Models and the Edinburgh System Description for the 2005 IWSLT Speech Translation Evaluation.
The paper illustrates preprocessing and alignment with its question about states bordering Texas. The formal sequence includes a state operation, a relation for being next to something, another state operation, a state identifier, and the Texas constant. Several of those symbols express the structure needed to interpret the question. The source side, meanwhile, gives the aligner stems corresponding to the kind of entity, the bordering relation, and the place. This example makes clear why a direct dictionary from single words to single formal symbols would be too restrictive. A short piece of wording can correspond to a span of formal tokens that also introduces the operations required to use the entity or relation.
The authors use stemming for English and German, where their development experiments found it helpful for data sparsity. Stemming reduces surface variants to a common form for training and prediction. The Texas example shows both the state noun and bordering expression in stemmed form. This lets related surface forms contribute evidence to the same source-side entry. The target serves a different purpose. Its symbols and their counts preserve the distinctions the interpreter will need after reconstruction.
The paper also supplements question-level pairs with noun-phrase entries available for the benchmark. Each supplementary entry pairs a phrase with its formal meaning. The entries go into the training material for the corresponding language and receive greater weight than ordinary examples. That arrangement gives the rule extractor direct evidence for noun-phrase correspondences it would otherwise have to infer from surrounding words and operations. A phrase-level entry still leaves the parser to determine how to use the phrase’s meaning in a complete question.
Turning alignments into reusable rules
In the phrase-based system, a rule associates a contiguous stretch of source tokens with a contiguous stretch of target tokens. The learned alignment supplies evidence for extracting the pair. The term phrase refers here to a span taken from a sequence. Its usefulness comes from its correspondence to a target span, so the parser can benefit from a unit whose boundaries differ from the ones a syntactic analysis would assign.
A rule can cover several operations together. If a piece of wording regularly requires a particular stretch of formal structure, preserving that stretch in the rule carries its internal ordering into a new prediction. This is an important part of the authors’ argument for larger rules. A frequently occurring construction can be remembered with its formal context already in place. The decoder can combine that span with other rules to build a candidate for a new question.
The hierarchical system can extract a rule with gaps as well as rules made entirely of fixed strings. It represents rules using a synchronous context-free grammar. Here, synchronous means that a rule describes matching expansions on the question and formal-expression sides together. A nonterminal is a placeholder that another rule can expand. The hierarchical rules use a single nonterminal category, with at most two occurrences serving as placeholders in a rule. An outer correspondence can therefore survive changes to the particular spans that fill its gaps, and the two sides can place corresponding material in different orders.
The paper illustrates the reach of such rules with this target-side pattern.
[X] river₁ all₀ traverse₁ [X]
Each [X] is a gap that another expansion can fill. river, all, and traverse are formal symbols. The ₁ subscripts indicate an argument is required, and the ₀ subscript identifies a symbol with no arguments. Spaces show the order of the fixed material and gaps in the linear target. The paper relates this pattern to disconnected parts of a formal tree. The sequence rule can group the fixed tokens together even where their corresponding tree fragments would be separate. It illustrates a representational difference from a rule constrained to operate on a traditional tree fragment.
Both alternatives are implemented in Moses. They use the same kind of decorated target sequence and the same general pipeline for learning alignments, scoring translations, and checking their output. What changes is the form of the rule the decoder can use. Phrase rules record correspondences between spans. Hierarchical rules can additionally record a correspondence that stretches around material supplied by other rules. This makes it possible to ask whether the broader kinds of correspondence learned by the hierarchical system help on the same executable target.
Ranking complete candidate sequences
The rule table gives information about how likely a piece of the source is to translate into a piece of the target. The authors also want information about how the predicted target tokens fit together. For that purpose, they estimate a target-side n-gram scorer. An n-gram is a sequence of adjoining tokens. Statistics over such sequences can give higher scores to combinations of formal symbols that occur together in the training material. In ordinary translation, the target-side estimates can come from a separate collection of text. Here the authors estimate them from the formal expressions in the training data, since comparable standalone collections of such expressions are rarely available.
The target scorer can learn, for example, that units representing a particular predicate tend to occur near units representing a certain class of argument. The decorated tokens carry distinctions about arity as part of what the scorer sees. Its role is statistical. A candidate can contain familiar local sequences and still fail to form a whole tree. Conversely, an unfamiliar sequence can be structurally possible. The reconstruction procedure checks a different property from the one estimated by the target scorer.
The paper describes decoding as ranking translations by a weighted combination of translation and target-sequence scores. That combination can be written as follows.
S(y ∣ x) = wₜ × T(y ∣ x) + wₗ × L(y)
Here x is the input question and y is a candidate sequence of decorated formal tokens. The vertical bar ∣ reads as “given.” T(y ∣ x) is the score for translating the question into that candidate, based on the learned rule table. L(y) is the score assigned by the target-side sequence scorer. The weights wₜ and wₗ determine how much the translation and target-side terms contribute, respectively. S(y ∣ x) is the resulting ranking score. The parentheses show what each score takes as input, × indicates multiplication by a weight, + combines the terms, and = defines the combined score. The subscripts ₜ and ₗ distinguish the two weights.
The authors use cross-validation on the development set to choose symmetrization and the score weights for each language. Cross-validation repeatedly fits on part of the development material and evaluates on the remainder, so those choices can be made before the held-out test. Selecting settings separately lets differences in the training material for each source language influence the decoder’s configuration. The target representation and the procedure for recovering a tree stay the same across these experiments.
Filtering and reconstructing the output
The standard decoder returns an n-best list, an ordered list of the highest-scoring candidates it has found. The paper considers the possibility of integrating well-formedness into beam search, which keeps a limited set of promising partial candidates as it builds translations. With structure checks during that search, a partial candidate that can no longer yield a valid expression could be dropped as soon as the problem became detectable. For the experiments, the authors instead use the ordinary ranked list and inspect completed candidates in order.
The filter tests whether the decorated sequence can be consumed as a single tree. It can make that decision in time linear in the sequence length by reading the argument labels. Once it encounters a candidate that passes, the parser restores the brackets prescribed by that tree and has an expression the database interface can use. The search depth determines how many alternatives are available to inspect. If the list contains no complete tree, the filter has no candidate to return from that list.
The method puts a firm structural decision at the end of a statistical ranking process. The translation rules and target scorer favor some sequences over others. The arity labels let the filter reject a structurally incomplete candidate even when its statistical score is high. The guarantee applies to the tree rebuilt from a candidate that passes. Accuracy is a further question, answered in this experiment by executing the tree and comparing what it returns with the result of the reference expression.
Experiments and results
The data and the answer criterion
GeoQuery contains 880 questions about United States geography in English, German, Greek, and Thai. The natural-language questions are paired with formal expressions in a variable-free language that can be evaluated through a Prolog database interface. The multilingual setup allows the experiment to change the language on the question side while retaining the same domain and kind of executable representation. The development set contains 600 sentences and is used for 10 fold cross-validation. The final comparison uses a held-out test set of 280 sentences.
The benchmark also supplies lists of noun phrases and their formal representations for the questions in each language. The paper says the comparison systems use these lists. The authors append the entries to the training material for the corresponding language and give them 50 times the weight of ordinary training examples, so they can readily be learned as translation rules. The headline test scores follow this setup. A separate comparison removes the lists from training and shows how the translation variants perform with the question pairs alone.
For each test question, the evaluation executes the predicted expression and the reference expression against the database. A prediction is correct when the resulting answers agree. This criterion accommodates systems that yield different formal expressions for a question if those expressions retrieve the same answer. It also gives a concrete measure of whether the predicted representation works for the task, even though the systems build their expressions in different ways.
Accuracy measures the percentage of the natural-language questions answered correctly. The paper also reports F₁, using the harmonic mean associated with precision and recall. The usual expression for that mean is as follows.
F₁ = 2 × P × R ∕ (P + R)
F₁ denotes the combined score, with ₁ identifying the standard equally weighted measure. P is precision, the share of returned answers that are correct. R is recall, the share of all questions for which the parser returns a correct answer. Accuracy uses that all-questions denominator in this evaluation. The 2 is the factor in the harmonic mean of the two quantities, × is multiplication, ∕ is division, and + adds precision and recall in the denominator. The parentheses group that denominator, and = gives the expression for the score. A parser can have higher precision among the answers it returns when some questions receive no answer, so accuracy and F₁ provide complementary views of the reported performance.
Which systems are compared
MT-phrase uses the phrase-based translation rules, and MT-hier uses the hierarchical ones. They share the sequence representation, the use of alignment and target scoring, and the procedure for reconstructing an expression from the decoder’s output. Their side-by-side results show how the choice of translation rules plays out within the same general approach.
The test comparison also includes WASP, UBL, tsVB, and hybrid-tree. WASP uses a synchronous grammar, which gives it a point of contact with the hierarchical translation system. UBL induces a lexicon with semantic annotations. TsVB learns weights for a tree transducer using variational Bayesian inference. Hybrid-tree assigns probabilities to paired structures over the formal expression and natural-language string. The baseline scores are taken from the earlier study by Jones and colleagues. This is a comparison with previously reported systems on the same benchmark, with the two translation variants implemented and evaluated by the authors.
English and German
English is the strongest result for the authors’ hierarchical system in the multilingual comparison. MT-hier achieves 80.5% accuracy on the English test set. That places it between UBL, at 82.1%, and tsVB, at 79.3%. MT-phrase reaches 75.3%. It exceeds WASP’s 71.1% on this split, while hybrid-tree at 76.8% is ahead of it. The English result thus puts the hierarchical variant near the front of the comparison, with a clear distinction between its position and the phrase-based variant’s.
English GeoQuery test set accuracy by parser
Hierarchical translation finishes behind UBL and ahead of the other systems shown.
The numbers
| System or setting | accuracy % |
|---|---|
| WASP | 71.1 |
| UBL | 82.1 |
| tsVB | 79.3 |
| hybrid-tree | 76.8 |
| MT-phrase | 75.3 |
| MT-hier (this paper) | 80.5 |
On English test F₁, MT-hier scores 81.8 and UBL leads with 82.1. Hybrid-tree reaches 81.0, tsVB 79.3, and WASP 77.7. MT-phrase records 75.8. The relation between WASP and MT-phrase changes when the metric changes. MT-phrase answers a greater percentage of all English test questions correctly, while WASP has the higher combined precision and recall score. For MT-hier, the two metrics place it in the same position relative to the other systems.
On the German test split, the two translation variants are close. MT-phrase gets 68.8% accuracy, and MT-hier gets 68.9%. UBL leads at 75.0%, with tsVB at 74.6%. Both translation variants exceed WASP at 65.7% and hybrid-tree at 62.1%. This is an instance where the translation approach sits between the stronger and weaker purpose-built systems and where the choice of translation rules has little effect on the reported accuracy.
German test F₁ gives a somewhat different comparison. MT-phrase scores 70.8, and MT-hier scores 71.8. Hybrid-tree records 68.5. WASP reaches 74.9, among the strongest German F₁ scores alongside UBL at 75.0 and tsVB at 74.6. The contrast between its accuracy and F₁ positions illustrates why the paper includes both metrics. A ranking by the proportion of all questions answered correctly leaves out the precision component of the combined score.
Greek and Thai
Greek is the exception to the hierarchical system’s lead over the phrase-based system. MT-phrase achieves 70.4% accuracy on the Greek test split, while MT-hier reaches 69.1%. The phrase-based variant exceeds hybrid-tree’s 69.3%. WASP at 70.7%, UBL at 73.6%, and tsVB at 75.4% all score above it. The paper’s claim that translation is competitive in every language rests here on the phrase-based result against hybrid-tree. The overall Greek accuracy lead belongs to tsVB.
On Greek test F₁, the translation variants score 73.0 for MT-phrase and 72.3 for MT-hier. Hybrid-tree reaches 74.6, UBL 73.7, tsVB 75.4, and WASP 78.6. The translation variants keep their ordering from the accuracy comparison, while both rank below the other systems on F₁. WASP leads on this metric, whereas tsVB leads on Greek accuracy.
Thai has the most pronounced separation between the authors’ two translation variants. MT-hier reaches 70.4% accuracy on the Thai test split, and MT-phrase reaches 53.0%. The same comparison includes UBL at 66.4%, WASP at 71.4%, hybrid-tree at 73.6%, and tsVB at 78.2%. Hierarchical translation gets ahead of UBL and comes close to WASP. The gap between the translation variants is considerably larger here than in the other languages tested.
Thai GeoQuery test set accuracy by parser
Hierarchical translation substantially improves on phrase-based translation and scores above UBL.
The numbers
| System or setting | accuracy % |
|---|---|
| WASP | 71.4 |
| UBL | 66.4 |
| tsVB | 78.2 |
| hybrid-tree | 73.6 |
| MT-phrase | 53.0 |
| MT-hier (this paper) | 70.4 |
For Thai test F₁, MT-hier scores 70.7, and MT-phrase scores 54.4. UBL records 66.4. WASP reaches 75.0, hybrid-tree 76.7, and tsVB 78.2. This metric preserves the same ordering of the systems as Thai accuracy. The hierarchical system’s improvement over phrase-based translation holds under either measure, while the strongest published Thai result remains tsVB’s.
Seen across the languages, the accuracy comparisons support the claim that standard translation machinery gives a serious baseline for GeoQuery. In English the hierarchical result is close to the leading score. In German and Thai the translation variants’ positions depend on which purpose-built system provides the comparison. In Greek the stronger of the translation variants is the phrase-based one. These results describe competitiveness in a field of baselines whose relative positions also change across languages and between metrics.
The training-time comparison
The paper concludes its evaluation with an informal comparison of training times. Its translation system takes under three minutes to train on GeoQuery. The public implementation of tsVB takes roughly twenty minutes, and the public implementation of UBL takes approximately five hours, with the comparison reported on a 2.1 GHz CPU. These times concern training on this benchmark. They are separate from the experiment about how many candidate translations the decoder has to inspect for a well-formed answer.
The reported times help explain why the authors regard the approach as practical to include in evaluations. A parser using established translation software can be trained quickly in this setting, and the English results in particular make it worth comparing on accuracy. The authors describe the speed comparison as informal because the implementations differ. The timings give a sense of the observed cost of running the available systems, with the implementation and programming-language differences included in that observation.
What the ablations show
What changes when the rules can contain gaps
The comparison of MT-phrase and MT-hier tests a change in the form of the translation rules. The phrase-based version can learn recurring alignments between source and target spans. The hierarchical version can also preserve the pieces of a larger correspondence while allowing other rules to supply the intervening material. This is especially relevant when the order of operations in the formal expression differs from the order in which the question supplies the information needed for them.
With the extra noun-phrase training data, the accuracy results favor the hierarchical version in English, German, and Thai. The sizes of the gains matter to the interpretation. The German test accuracies are 68.8% for MT-phrase and 68.9% for MT-hier, so the advantage there is slight. Thai moves from 53.0% with phrase rules to 70.4% with hierarchical rules. In Greek, the direction reverses, with 70.4% for the phrase-based version and 69.1% for the hierarchical one. A broad description of the hierarchy as helpful should retain both the small German difference and the Greek exception.
The authors connect the gains to the hierarchical system’s capacity to learn longer-range reorderings. They suggest that Thai’s comparatively different word order may explain why it benefits most strongly in this comparison. That is their interpretation of the observed pattern. The experiment varies the translation architecture as a whole. It supports the use of hierarchical rules for the Thai data, while leaving the contribution of particular reorderings to be established through a more targeted analysis of the rules and errors.
The discussion also emphasizes how much information a large learned rule can preserve. A recurring formal structure may be easier to generate if several of its parts are learned together. A phrase rule can already preserve a substantial contiguous sequence, and a hierarchical rule can preserve an outer pattern across gaps. The reported architecture comparison shows their relative behavior as deployed in the full parser. It leaves open how much of their performance depends on the largest rules, since there is no corresponding comparison in which only rule size is varied.
What the noun-phrase lists contribute
The comparison with and without the supplementary noun phrases changes the training evidence. With the lists, the system sees direct pairs connecting phrases to their formal meanings and treats those pairs as particularly important during training. Without them, it must recover those correspondences from the alignment of complete questions and expressions. The difference can affect what the aligner finds, which translation rules are available, and how reliably they are scored. The intervention tests the value of that extra supervision for the whole training pipeline.
English shows losses for both variants when the lists are removed. On the English test set, MT-phrase goes from 75.3% accuracy with the lists to 63.4% without them. MT-hier goes from 80.5% to 62.5%. The ordering also changes. Phrase-based translation scores higher than hierarchical translation under this reduced-supervision condition. This is a case where the stronger architecture comparison depends on the training setup, and the reversal helps make that dependency visible.
In German, MT-phrase drops from 68.8% to 65.8% test accuracy after removal of the lists. MT-hier moves from 68.9% with the lists to 69.9% without them, the exception to the general pattern of lower scores after removal. The experiment establishes that this run can do slightly better under the reduced supervision. The paper gives no targeted account of which entries or training effects produce the German exception.
The Greek test values are 70.4% with the lists and 64.0% without them for MT-phrase. For MT-hier they are 69.1% with the lists and 62.9% without them. The phrase-based variant retains the lead between the two under both training conditions. Removing the lists lowers the accuracy of each by enough to be visible even though it leaves the ordering intact.
On Thai, the corresponding MT-phrase accuracies are 53.0% and 39.8%, while MT-hier scores 70.4% and 62.1%. Hierarchical translation maintains a substantial advantage when both variants train without the additional noun-phrase entries. The 39.8% result is also an important exception to the paper’s general observation that the parser can still answer a majority of questions correctly after the lists are removed. That observation describes most settings in the comparison. Thai phrase-based translation without the lists falls below a majority.
Taken together, these results distinguish the contribution of the learning approach from the scores it obtains with the benchmark’s fuller supervision. The systems can learn useful correspondences from complete questions and their formal expressions by themselves. The lists generally improve the resulting accuracy, sometimes substantially. Since the experiment removes the entries altogether, it gives evidence about having the supplementary supervision in the authors’ training setup. It leaves the choice of entry weight and the contributions of individual phrases open.
How far decoding has to look
The search-depth comparison addresses a separate question. Since rank comes from translation and target-sequence scores, the first decoded sequence may fail the tree check. Looking farther down the ranked list gives the filter more chances to find a usable candidate. If high-scoring candidates often failed in this way and valid alternatives tended to occur farther down, then the depth of the list would matter for the accuracy of the parser.
The authors compare the effect of raising the depth from 1 to 50. They report a gain of at most approximately a point or two. This indicates that, on GeoQuery, scanning much deeper into the ordinary list produces only a modest improvement in the reported outcome. The observation supports their use of a post-decoding filter as a practical procedure for this task. It applies to the behavior of the system on the tested data and with the learned ranking.
This comparison also clarifies what remains unknown about the decoder. It does not enumerate the unusable candidates or identify how frequently the first structurally acceptable candidate answers incorrectly. A small improvement in correct answers from greater depth measures the practical return on deeper search. It does not count every case in which the deeper list contains a tree. Since the filter stops at the first complete tree, it can also pass over a correct lower-ranked tree after accepting an incorrect higher-ranked one. The paper’s experiment measures the performance of the actual selection procedure, which depends on ordering as well as structural validity.
The authors highlight target-side scoring as a promising feature of the approach because it can favor plausible sequences independently of the rule that produced them. The paper gives no separate target-scorer removal experiment. Its evidence is the performance of the integrated systems and the limited return from inspecting deeper lists. Those observations are compatible with the argument that useful candidates often receive high ranks. They supply no isolated estimate of how much credit belongs to the target scorer, the rule table, or the representation itself.
Limitations
Limits stated by the authors
The authors make a structural assumption about the target language. They start from variable-free meaning representations that have a tree shape. The preorder sequence with arity labels preserves what is needed to reconstruct such a tree. The authors note that a suitable transformation can express forms with variables in a variable-free formalism. Their procedure therefore has a suggested route to broader use, while the experiment itself begins after that representational choice has already been made.
The paper also acknowledges a search question. A decoder ranking linear strings could in principle leave all the well-formed expressions outside the part of the list being inspected. The authors consider changing beam search to discard malformed candidates during decoding and use a simpler completed-candidate filter in their experiments. Their comparison of list depths gives evidence that the filter works adequately for the benchmark. It leaves a general guarantee about finding a well-formed candidate in reasonable time unresolved.
A further constraint concerns the training material available for the target side. The authors note that semantic parsing seldom has the kind of separate target-language corpus commonly used in translation. Their sequence scorer is estimated from formal expressions already in the paired training data. The approach shown in the paper can therefore run on the available GeoQuery material, but any extra benefit from training that scorer on a larger independent collection remains outside the experiment.
The authors also qualify the speed comparison. Differences in software implementation and factors such as the choice of programming language make the times approximate as a comparison between methods. The figures report what happened with particular implementations on the benchmark. An attribution of the full observed difference to the learning procedures would require controls beyond the comparison the paper reports.
Limits apparent from the evaluation
GeoQuery varies the natural language in which the questions are expressed while holding the domain and formal target fixed. This is useful for comparing how the same approach handles English, German, Greek, and Thai. It supplies evidence within a particular family of database questions. Applying the approach to another database domain, a different output language, or substantially different kinds of utterances would raise questions the multilingual split does not answer. The same applies to the authors’ suggestion about converting expressions with variables. The performance on an already variable-free target leaves the effects of such a conversion unmeasured.
The answer-based metric is well suited to comparing parsers with different representations, and its scope is the result obtained from this database. Two expressions can return the same answer on a given database even if they take different routes to it. The test therefore rewards agreement on the question’s observed answer. It gives no independent measurement of whether the predicted expression would remain equivalent across changes to the database or whether it recovers every intended internal distinction. This follows from using the result of execution as the criterion of correctness.
The well-formedness check establishes a similarly specific property. Arity and sequence position are enough to determine whether there is a complete tree and how its arguments attach. They do not tell the parser that it chose the intended entity or relation. They also leave the appropriateness of a candidate’s arguments to the evidence established by training and to the behavior of the interpreter. A full tree can be an incorrect interpretation. The evaluation’s database step is what tells whether the chosen expression answers the test question under the stated criterion.
The supervision matters when interpreting the benchmark scores. The main comparison uses paired questions and expressions plus the supplementary phrase entries. The version without those entries still trains on paired formal representations. The results therefore concern two amounts of supervised evidence instead of a system learning from answers alone or without formal annotation. The noun-phrase condition is informative because it shows how the available benchmark resource changes the result. It also puts a boundary around comparisons with tasks that provide fewer kinds of annotation.
The comparison with previously published parsers supports the claim of competitiveness on GeoQuery. Since the baseline results come from the earlier study, the paper does not present a new common implementation of all the systems or a matched experiment for every training choice within them. The headline scores identify where each reported system stands on the benchmark. Small differences, such as the one between the German translation variants, have a more limited interpretation without an accompanying uncertainty estimate.
Finally, the comparisons distinguish only some of the mechanisms the authors discuss. They vary the translation rule format, the presence of supplementary phrase pairs, and the depth of inspection of the decoder’s list. The usefulness of the target-sequence score and of large memorized patterns is argued from the design and the integrated results. The paper leaves separate measurements of those contributions for further work. Its demonstrated claim is that the complete translation-based pipeline can be effective with this representation and benchmark.
What came after
Learning a mapping to logical form and code
Later work citing the paper pursued several versions of the question it makes concrete. One is how much the mechanism mapping the utterance to its formal target can learn about which parts of the utterance matter during prediction. Language to Logical Form with Neural Attention (2016) addresses the same passage from language to logical form using attention. That choice puts the connection to the source inside a neural predictor. The point of comparison in the earlier parser is the separately learned alignment and the translation rules extracted from it. Both formulations give the source wording a role in deciding which formal material to produce. Language to Logical Form with Neural Attention
For Language to Code: Learning Semantic Parsers for If-This-Then-That Recipes (2015), the target setting is a recipe that can be expressed in code. The connection to GeoQuery is the requirement to produce a formal object with a practical interpretation. A geography query specifies operations on database information. A recipe specifies the parts of an if-this-then-that task. The later work brings the learning problem into that domain, where the formal representation has to capture a different kind of user intent. Language to Code: Learning Semantic Parsers for If-This-Then-That Recipes
Latent Predictor Networks for Code Generation (2016) likewise addresses a formal output in code and programming languages. Its focus is code generation with latent predictors. That places the mechanism for predicting the output at the center of the problem. In the earlier parser, the prediction mechanism is made explicit through learned translation rules and a separate score for target sequences. The neighboring code-generation task carries forward the problem of obtaining a structured formal product from linguistic evidence while studying a different prediction architecture. Latent Predictor Networks for Code Generation
Learning an Executable Neural Semantic Parser (2019) retains executability as the desired property of the semantic parser’s output. It puts that requirement in a neural parsing setting. This is a direct point of continuity with the GeoQuery paper, where the test runs the selected representation and checks its answer. The choice to require an executable expression can survive a change in the learning architecture because it describes what the finished parser must provide. Learning an Executable Neural Semantic Parser
Translating to a different kind of meaning representation
Parsing English into Abstract Meaning Representation Using Syntax-Based Machine Translation (2015) develops the translation analogy for another target representation. It applies syntax-based translation to the task of recovering an Abstract Meaning Representation from English. Where the GeoQuery paper studies an executable geography expression and evaluates it through database answers, this work brings the translation approach to a different meaning representation. The continuity lies in asking how translation machinery can support semantic parsing when the target has its own structural requirements. Parsing English into Abstract Meaning Representation Using Syntax-Based Machine Translation
AMR Parsing as Graph Prediction with Latent Alignment (2018) takes graph prediction as the organizing form of the AMR task and includes alignment as a latent part of it. It gives a useful point of comparison with the sequence representation used for GeoQuery. The earlier paper first transforms its target tree into a sequence and estimates alignment before extracting rules. The later work puts the graph at the center of the prediction task and makes the alignment latent. Together, the approaches make clear that the choice of what the predictor produces and the choice of how it treats alignment are separate design decisions. AMR Parsing as Graph Prediction with Latent Alignment
Changing supervision and the place of constraints
Unified Semantic Parsing with Weak Supervision (2019) addresses semantic parsing with weaker training signals. This changes a premise of the translation experiment, whose aligner receives a formal expression alongside each complete training question. Those expressions allow word-to-symbol correspondences to be inferred from observed target tokens. Weaker supervision makes the availability of a suitable expression part of the learning problem. The link between the works is the formal mapping being learned, with the later work focusing on the kind of evidence from which a parser can recover it. Unified Semantic Parsing with Weak Supervision
Constrained Language Models Yield Few-Shot Semantic Parsers (2021) brings constraints together with few-shot learning. In the GeoQuery system, learned scores propose a ranked list, after which an explicit check enforces the arity-based tree structure. The later title identifies constrained generation as part of a method for parsing from few examples. The connection is the decision to give the formal target’s requirements an explicit role alongside statistical prediction. The earlier study gives an example of that role as a completed-output filter, while the later work investigates constraints in a different learning regime. Constrained Language Models Yield Few-Shot Semantic Parsers
Testing the ability to generalize
Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both? (2021) asks how a semantic parsing approach deals with both new combinations and variation in the language expressing them. That question sharpens what one can ask of the GeoQuery results. A held-out accuracy score establishes how frequently the system answers the benchmark questions correctly. It does not by itself isolate the ability to assemble familiar elements in unfamiliar ways. The later work makes the relationship between generalization and linguistic variation part of its research question. Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?
Improving Compositional Generalization with Latent Structure and Data Augmentation (2022) addresses compositional generalization through latent structure and changes to the training data. The GeoQuery paper also gives learned units of structure and added training examples a role, through hierarchical phrase rules and explicitly annotated noun phrases. The connection is a shared interest in the structures a learner can reuse and the evidence that encourages it to reuse them. The later work places the ability to handle novel combinations at the center of its inquiry, extending the questions one can ask beyond the earlier benchmark’s overall test accuracy. Improving Compositional Generalization with Latent Structure and Data Augmentation
Cite
Cite as Jacob Andreas, Andreas Vlachos and Stephen Clark. 2013. Semantic Parsing as Machine Translation. Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers).
@inproceedings{andreas2013semantic,
title = {{Semantic Parsing as Machine Translation}},
author = {Jacob Andreas, Andreas Vlachos and Stephen Clark},
booktitle = {Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
year = {2013},
url = {https://aclanthology.org/P13-2009/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/andreas-2013-semantic-parsing-as-machine-translation/