Elamur Research

Improving Semantic Parsing with Enriched Synchronous Context-Free Grammar

Paper · 2015 · Junhui Li, Muhua Zhu, Wei Lu et al.

Summary

A geography question can be phrased several ways and still ask for the same answer. A database, by contrast, needs a query whose functions and arguments fit together in a specific way. This is the problem of semantic parsing. The paper studies a parser that treats the question and its formal meaning as the source and target of machine translation. It asks what needs to change when the target is an executable representation. A phrase that seems plausible in a translation can still leave a function without an argument, and a word that helps make a question fluent may have no corresponding token in the query.

The authors change which translation rules the parser learns, how it combines them, and what it can do when it meets an unfamiliar word. Their enriched synchronous context-free grammar labels fragments according to the structure they carry. A fragment that already forms a complete argument has a different label from one that still needs a piece on its right. The authors also extract rules from alternative alignments of each training pair. This lets a short expression become a rule even when one alignment ties it to surrounding words. For an unseen word, the parser can omit it or, in the English semantic variant, propose target tokens using similar words in the training vocabulary.

The experiments use the tree-structured version of GeoQuery. The parser’s output is credited when it returns the same database answer as the reference query. The full English system reaches 86.3 accuracy and 87.1 F1 on the test set. In the paper’s comparison with previous systems, it has the highest English F1, while f-RHT has the highest English accuracy at 86.8. The enriched system leads on both measures for German and Greek. It also improves on the paper’s own Thai baseline, although other systems in the comparison score higher on Thai.

The component comparisons show why the authors intervene at several points. Structural labels improve the reported English scores for every tested alignment setting. Keeping alternative alignments generally makes useful rules available beyond those learned from a single alignment, and the best automatic pairing depends on the metric. Omitting unknown words recovers some otherwise unusable translations. Proposing meaningful translations for them improves the English results further, although a manual check finds cases where the right rule is still missing.

Deep dive: Improving Semantic Parsing with Enriched Synchronous Context-Free Grammar

See how enriched synchronous grammar, multiple word alignments, and rules for unfamiliar words improve GeoQuery semantic parsing. · about 36 minutes to read

The problem and its context

A question and its query follow different rules

A person asking about Utah’s neighbors can start with the state, put the requested class of places first, or introduce the request with a polite phrase. The desired query still has to specify a class of objects, a geographic relation, and the entity that fills the relevant argument of that relation. The order and wording of the question can vary independently of the nesting and argument order that the formal expression requires. The parser must recognize which distinctions the speaker is making and express them in a notation the database can interpret.

The formal target in this paper is a variable-free meaning representation. The authors work with expressions that can be drawn as trees. A function occupies a node and has a specified number of arguments. An argument can be another expression, so the result of an inner function can be passed directly to an outer one. A string naming a place can appear inside an identifying function, and the resulting expression can then fill a position in a geographic relation. The nesting records which pieces of meaning belong together.

The difference affects what it means to finish a translation. A sequence of familiar query tokens can still be incomplete. If a function requires an argument, the following material must supply a whole expression for that position. If the following token starts a function of its own, its arguments must also be supplied. A sequence can therefore contain appropriate names and predicates while failing to describe a complete query. Structural validity is only the first test. A complete expression can still name the wrong entity or use the wrong relation and consequently return the wrong answer.

The two sides also differ in what their individual tokens contribute. A natural-language auxiliary can help form a question without contributing a distinct element to the query. A determiner or polite formulation can accompany an expression whose formal translation is quite short. In the other direction, a formal identifier can be required by the representation even when the question expresses that information through a place name alone. An alignment that tries to give every source word a partner can mistake regular co-occurrence for a meaningful correspondence. The mistake can then determine which whole phrases the grammar is allowed to learn.

Unseen words make the asymmetry particularly visible. A translation system may leave an unfamiliar spelling in its output. Here the output must be written in the query notation, where an ordinary input word may have no legal role. Some unfamiliar words are safely dispensable. Others express an entity, predicate, or distinction that the query needs. The paper treats omission and translation as separate possibilities because syntax alone cannot tell the parser which words matter.

What the authors take from translation research

Earlier semantic parsers had already used ideas from statistical translation. The direct starting point here is Semantic Parsing as Machine Translation, which adapts familiar translation components to pairs of natural-language questions and formal meanings. The basic maneuver is to express each meaning tree as a sequence. Once both sides of the training examples are sequences, an aligner can look for token correspondences, a rule extractor can collect recurring phrase pairs, and a decoder can assemble a target sequence for a new question. A final step rebuilds the tree.

The translation framework is Hierarchical Phrase-Based Translation. A rule can contain actual words as well as positions to be filled by other rules. This makes it possible to reuse a larger pattern when an entity or a relation changes. The linked positions on the source and target sides can also occur in different orders, which lets the grammar assemble a formal expression whose components appear in a different order from their counterparts in the question. In the ordinary hierarchical grammar described by the authors, the same general category labels these positions.

That general category makes the learner flexible. It can extract building blocks even when nothing corresponding to a conventional syntactic constituent has been supplied for the target. But the label also gives the decoder little guidance about which fragments are suitable for a given position. If a slot can take either a complete argument or the beginning of a function application, the grammar permits combinations that a later tree reconstruction step will reject. The paper’s structural labels are an attempt to move part of that decision into the grammar.

The authors distinguish their approach from WASP, another translation-inspired parser. WASP already uses multiple nonterminal categories to enforce well-formed output. Its category inventory comes from parses of the GeoQuery meaning representations, and it represents the target as a sequence of productions for alignment. The enriched grammar instead derives categories from the argument requirements of target fragments, keeps several alignments of each pair, and scores rules with the phrase and lexical information used in hierarchical translation. WASP uses rule identity as a scoring feature. Its role in the comparison is therefore important. The paper revisits how to use structural categories inside a translation system whose training and scoring differ from WASP’s. Learning for Semantic Parsing with Statistical Machine Translation

Other earlier systems paired language and meaning more directly as structures. HYBRIDTREE+ learns a generative account of a question and its meaning tree together. The system called tsVB uses tree transducers with a Bayesian treatment of the generative process. RHT and f-RHT use relaxed hybrid trees and constrained semantic forests, respectively. The paper also describes work that adds semantic information to syntactic parses, classifiers that attach parts of an utterance to meaning elements, and a parser that induces a combinatory categorial grammar lexicon. These approaches place different constraints on how pieces of the question can be associated with pieces of its meaning. The present paper asks how far the translation approach can go when its own rules carry more of those constraints. A Generative Model for Parsing Natural Language to Meaning Representations

The earlier work gives the authors reasons both to retain and to alter the translation pipeline. Paired strings make it practical to extract reusable phrases and their possible reorderings. The formal target supplies information about function arguments that plain phrase extraction ignores. The paper preserves the useful flexibility of extracting fragments while making their ability to combine depend on the target structure. Training from paired questions and formal queries gives the system access to both kinds of evidence.

The method, step by step

Turning the meaning tree into a sequence

Training starts with pairs of questions and their corresponding meanings. The authors lower-case the natural-language input and apply stemming to English and German. Stemming brings some related surface forms under a shared vocabulary entry, which can help when a collection is small. They refer to this preprocessed input as NL′. The target begins as an expression in a meaning representation language, abbreviated MRL. Its preprocessed sequence is MRL′.

To build MRL′, the authors visit a function before visiting its arguments. They use this order throughout the tree. Each function token carries its arity, the number of arguments the function takes. If a function takes another function application as an argument, that whole inner expression follows its parent in the sequence. Parentheses and commas can be removed because the argument counts provide the information needed to reconstruct the nesting. The token format is as follows.

A@B

A is the symbol that names a function or constant. @ separates the symbol from its annotation. B is either an arity or the marker s, which identifies a string. Constants, including strings, occupy positions as zero-argument expressions. A token annotated as a string supplies a value and opens no new argument positions.

The paper’s Texas example contains stateid@1 followed by texas@s. The first token heads an expression that takes one argument. The second supplies the string for that argument. Together, they describe a single expression that can itself be passed to another function. If a relation token came first and required an argument, this entire Texas expression could fill that position. The decoder works on individual tokens and spans, while reconstruction uses the annotations to determine how many tokens belong to each argument.

This representation makes reconstruction deterministic when a valid tree exists. Starting at the first token, the reconstruction procedure can follow the arities through each child and return to the enclosing expression once the child is complete. A sequence may end before all the required arguments arrive. It may also supply material that cannot be accommodated by a single tree. The paper’s example answer@1 state@1 illustrates an early end. The answer function has the start of an argument, but that argument opens an additional position. Until that position is filled, both the inner and outer expressions remain unfinished.

The conversion is the common foundation for the rest of the system. The aligner needs sequences to discover correspondences. The grammar uses the target’s arities to distinguish useful fragments. The decoder produces a sequence, and reconstruction turns the sequence back into a query before evaluation. The authors keep these stages separate enough to examine where changes to the rules, alignments, and vocabulary handling affect the outcome.

Learning and applying the enriched translation grammar

The steps in order.

Learning and applying the enriched translation grammarStep 1: Preprocess questions and serialize meaning trees1. Preprocess questions and serialize meaning treesStep 2: Align each pair in both directions2. Align each pair in both directionsStep 3: Extract rules from alternative alignments3. Extract rules from alternative alignmentsStep 4: Label fragments by their argument requirements4. Label fragments by their argument requirementsStep 5: Propose translations for unfamiliar words5. Propose translations for unfamiliar wordsStep 6: Decode the question into a target sequence6. Decode the question into a target sequenceStep 7: Rebuild the query and execute it7. Rebuild the query and execute it

Linking phrase patterns across the two sides

A synchronous rule describes a source pattern and a target pattern together. Its symbols include terminals, meaning literal items that appear in a sequence, and nonterminals, meaning slots that other rules can fill. Each source slot is linked to a particular target slot. Expanding one occurrence expands its partner as part of the same choice. The two sides can put the linked slots in different orders, so a change of order can be made without losing track of which pieces correspond.

The ordinary hierarchical rule has this form.

X → ⟨γ, α, ∼⟩

X is the rule’s nonterminal category. The arrow separates that category from the paired expansion. The angle brackets group the source string γ, the target string α, and the correspondence ∼. Both strings may contain literal items and slots. The correspondence links each slot occurrence on one side to its partner on the other. The commas divide the parts of the notation.

Consider the paper’s example involving a fragment of a question about states that border another place. A first rule can associate the phrase that border with a target predicate that still needs an argument. A larger pattern can add the source word state and the target token state@1 around the corresponding position. The links ensure that the material substituted for the source position also supplies the relevant predicate fragment on the target side. The ordinary X label knows that the position can be expanded. It carries no description of what will still be missing from the target fragment after that expansion.

Giving slots an argument structure

The enriched grammar labels a fragment by inspecting its target tokens. The authors denote a target span by eᵢⱼ. Here e is a sequence on the serialized meaning side, and i and j identify the positions that bound the span. The completeness test asks whether the functions inside it have all their required arguments and whether the span as a whole can fill a single argument position. A complete span receives the category C.

The two parts of the test matter. The Texas identifier passes because the string satisfies the identifier’s arity and the resulting expression constitutes one usable argument. A bag of well-formed tokens would be too weak a description. Even a span containing complete expressions needs to be considered as a unit. The category describes whether the whole span can serve as one argument to an enclosing function.

Useful rule fragments can also stop before a complete expression ends or begin inside one. The authors retain those fragments and record the context they need. The general notation is as follows.

(C∖Fₘ)/Aₙ

C is the completed category. F denotes a function, and m is the arity of the required function on the left. The backslash places that requirement on the left of the fragment. A denotes arguments, and n counts how many the fragment requires on its right. The forward slash marks the rightward requirement. The parentheses group the leftward part before the rightward requirement is attached. When m is 0, the leftward component is omitted. When n is 0, the rightward component is omitted.

A border predicate that needs one argument on its right receives C/A1. The number in this label describes the open requirement of the fragment as a whole. It can remain the same after composition. For example, putting state@1 before the unfinished relation lets the relation supply the start of the state function’s argument, but the inner relation still needs its own argument. The combined fragment continues to require one piece on its right. Once a complete identifier fills that position, the expression can close.

The notation can also state that a fragment needs context on its left. A span taken from the arguments of a function may contain usable material without functioning as a single expression on its own. Its category can require an enclosing function of a particular arity. This is how the grammar can preserve phrase boundaries found by alignment even where they cut through a target tree. A requirement at that boundary gives the decoder more information than the generic X would give.

The authors otherwise follow hierarchical phrase extraction. From aligned examples they collect bilingual phrase pairs and produce larger patterns with linked slots where smaller phrases can be substituted. In the enriched version the resulting categories reflect the target fragments’ internal structure. A pattern with a slot for a fragment that needs a right argument can be reused with another fragment carrying that category. A complete argument belongs to a different category and participates where that category is licensed. The same source text can consequently occur in several rules with distinct structural labels.

Categories determine which combinations are licensed. Scores help choose among licensed alternatives. Extracted rules have features for phrase translation in both directions, for lexical translation in both directions, and for the use of rules in a derivation. The four probability features can be written together as follows.

⟨p(α ∣ γ), p(γ ∣ α), pₗₑₓ(α ∣ γ), pₗₑₓ(γ ∣ α)⟩

The angle brackets collect the features, and the commas separate them. α is the target pattern and γ is the source pattern. The bar is read as “given.” p denotes a phrase translation probability, and pₗₑₓ denotes the corresponding lexical translation probability. In the first and third entries the target is evaluated given the source. In the second and fourth entries the direction is reversed. The rule penalty is a separate feature that lets tuning prefer derivations of different lengths.

Phrase and lexical evidence address different levels of the translation. A phrase score concerns a paired pattern as a whole. A lexical score draws on correspondences at the word level. Neither gives the same information as the fragment category. Two phrases can receive strong scores because they recur in training, while only one has the argument structure needed at a particular point in a new derivation. Conversely, several fragments can meet the same structural requirement while differing in how well they express the source words.

Joining neighboring fragments

Hierarchical decoders also use glue rules to compose neighboring translated spans. In the ordinary setup described by the paper, glue provides a way to continue when a regular rule cannot apply or when a candidate span exceeds the relevant length limit. A straight glue rule preserves the order of the adjacent pieces on the target side. This simplifies composition, but it can miss a query whose formal order differs from the order of those particular input phrases.

The enriched grammar adds inverted glue. This can join neighboring source pieces while placing their translations in the opposite order, provided the categories match the rule. The distinction between straight and inverted composition concerns the order of the same linked pieces. It does not change the internal order of the tokens within each piece. In the paper’s example about Texas and population, the phrase containing the geographic relation and the entity can contribute a complete argument, while the other translated span needs an argument on its right. Swapping the spans on the target side puts the argument where it is required.

The straight example in the paper shows a different possibility. A fragment can begin with the state expression and continue into the border predicate, leaving the predicate’s argument unfilled. The result remains a fragment with a rightward requirement. Glue can thus build an intermediate form as well as a complete one. Each glue rule combines two nonterminal pieces. The score uses a phrase translation probability and a glue penalty, and the rule may apply to neighboring translation nodes with matching categories.

This arrangement makes category matching and reordering work together. Inversion increases the number of possible arrangements. The categories restrict which arrangements can form the intended kind of expression. A rule can place a complete argument after a fragment that needs one, without treating any neighboring translation as equally suitable. The experiments evaluate the enriched grammar as a package, which is relevant when assigning credit to the labels and the new glue rules.

Keeping alternative alignments separate

Before the grammar can learn any of those rules, it needs alignments. An alignment marks which source and target tokens correspond in a training pair. The training sentences already have paired meanings, but the pairs do not ordinarily specify which word gives rise to each target token. The aligner must infer those links from the examples. The authors use GIZA++, which supplies directional alignments using the IBM approach. In a directional output, a token on the side being mapped is assigned a single partner or the null destination. Null records that no token on the other side is chosen. A Systematic Comparison of Various Statistical Alignment Models

Direction matters because the target frequently has fewer tokens and gives each of them a more specific job. In a source-to-target alignment, the procedure must account for source words such as auxiliaries and determiners. Some are connected to formal tokens whose meaning they do little to express. In a target-to-source alignment, the decision is instead where to anchor each piece of the formal representation in the question. That setup has fewer such source words demanding links, although a target symbol that marks a formal construction may still have an uncertain anchor.

A standard way to combine the directional results is symmetrization. It produces a new alignment by combining evidence from both directions. The paper uses grow-diag-final-and, abbreviated gdfa, for its symmetrized result. Symmetrization can retain links that appear in either directional analysis. For phrase extraction, however, an additional link can exclude an otherwise useful phrase. If a token inside a proposed phrase is aligned to material outside its counterpart, the phrase pair may fail the consistency test that determines which pairs are available for extraction.

The highest-population example illustrates the problem. In the symmetrized alignment, the target expression for the superlative wraps together correspondences to have, the, and highest. The extractor can then retain the longer source phrase, while the word highest by itself is blocked from pairing with the target expression. A more focused pairing would be useful in other questions whose surrounding words differ. In the same example, linking Texas to both the string token and the state identifier can block an entry translating the source word to the string alone. Whether the useful fragment is visible depends on which links are present together.

The authors supply alternative alignments to phrase extraction as separate instances of a pair. With the full combination, a question and its meaning appear under the source-to-target links, under the target-to-source links, and under the symmetrized links. The questions and reference meanings stay the same. What changes is the word-level evidence the extractor sees on each occurrence. A short phrase excluded under one alignment can be learned under another. The longer phrase may remain available, so the decoder and scoring features can still favor it where the input supports it.

This differs from handing the extractor a single alignment containing every available link. Phrase extraction can lose an entry when extra links cross its boundary. Extracting from separate versions gives each set of links its own opportunity to license a rule. The procedure can also affect the counts behind translation features, since the extractor sees several aligned instances. Its central purpose is to preserve useful alternative phrase boundaries when paired training material is scarce.

The authors compare the individual directions, the symmetrized alignment, pairwise combinations, the full automatic combination, and their own manual alignment. The manual version supplies a point of comparison for the automatic routes and supports a separate analysis of token links. It is not required by the system that combines the automatic alternatives.

Giving an unfamiliar word a translation candidate

When an input word has no learned translation, the paper evaluates a null rule that consumes the word on the source side without emitting a target token. The rule receives a feature identifying it as an unknown-word rule. This approach gives the rest of the sentence a chance to produce a complete query. It suits words whose role is confined to the form of the question. If the word expresses information needed by the query, omission can leave a missing argument or produce an executable expression that asks for something else.

The semantic variant uses word embeddings from Word2Vec to find similar words. Its search is over words in the training vocabulary. A useful neighbor needs both a similarity score and a link to a translation learned from the question–meaning pairs. A word outside the training vocabulary could be close in meaning and still offer no route to a known target token. This is why the search is anchored in the vocabulary from which the lexical translation tables were built.

The similarity computation in the algorithm is written as follows.

sᵢ = sim(wᵤ, wᵢ)

wᵤ is the unknown source word, with u marking it as unknown. wᵢ is a word from the source vocabulary W, indexed by i. The function sim returns their similarity, and sᵢ stores the resulting score for the candidate at index i. The equals sign assigns that score to the candidate. The paper describes the function through its role in ranking neighbors.

The algorithm ranks the training words by similarity and selects the top n. The experiments use 5 candidate neighbors per unknown word. The selected set has the following notation.

Wᴮ = {wb₁, …, wbₙ}

Wᴮ is the set of selected training words. wb₁ is the first listed neighbor, wbₙ is the neighbor at the final selected position, and n is the number selected. The ellipsis stands for the intervening neighbors. The braces enclose the members of the set. These are source-language words that act as intermediaries between the unknown input and an existing target translation.

The algorithm begins with an empty set of synthetic rules, called R. It looks up each selected word in the directional lexical translation tables T₁ and T₂. If a neighbor wbᵢ has a usable pairing with a target entry tⱼ in both tables, the algorithm can use that pairing to make a rule for the unfamiliar input. Here i indexes the neighbor and j indexes a target candidate. The synthetic rule translates the unknown word wᵤ to tⱼ. Its features are the similarity between the unknown word and its neighbor, the lexical probability from the neighbor to the target, and the probability in the reverse direction. The procedure adds the generated rules to R and returns that set.

A target candidate can be null because the lexical tables themselves include null correspondences. Thus the semantic rules can offer both omission and a formal token, depending on what the neighbors make available. The distributional similarity evidence proposes a source word that may behave similarly. The paired data supplies the actual target symbol and evidence for the correspondence. The decoder still has to choose a candidate that fits the surrounding translation. A useful neighbor can lead to several candidates, and a correct candidate can compete with poorer ones.

The authors choose Word2Vec because similar-word resources could be learned for another language if sufficient monolingual text were available. In the reported experiments they use the semantic variant for English. For German, Greek, and Thai they apply the null treatment. The shared multilingual system therefore includes the same grammatical and alignment changes, with a different treatment of unfamiliar words outside English.

Training, tuning, and returning a query

The authors use the hierarchical decoder cdec for training and decoding. Phrase extraction includes both tight and untight phrases. This allows both boundaries directly supported by alignment and phrases extended with unaligned material. The choice is pertinent when some source words go untranslated. A useful alignment should make it possible to learn a focused phrase where the links support one, while a longer phrase can still capture how a familiar construction is expressed. cdec

From the target sequences in the training data, the authors use IRSTLM to fit a 5-gram sequence scorer with modified Kneser–Ney smoothing. An n-gram concerns a run of consecutive tokens. This scoring component uses local target context to favor sequences consistent with the training data. The grammar’s categories contribute different information. They record whether a fragment has an open argument requirement, which can depend on the structure assembled across several rule applications.

The tuning procedure uses MIRA, a large-margin method, with the BLEU score as its objective. BLEU concerns agreement between a candidate sequence and a reference sequence. Tuning therefore uses target-string behavior, while the final evaluation uses the answer that the reconstructed query retrieves. The distinction matters because a sequence score can favor a candidate that resembles a reference without establishing that its query retrieves the right answer. Online Large-Margin Training of Syntactic and Structural Translation Features · BLEU

At test time the decoder searches for a scored derivation for the preprocessed question. A derivation specifies which rules were used and how their linked slots were filled and ordered. Its target side is the serialized meaning. Reconstruction uses the arities to restore the tree. An ill-formed sequence cannot proceed as a reconstructed query. A well-formed sequence can be executed and its answer compared with the reference answer. These stages distinguish finding a derivation, constructing a formal expression, and answering the question correctly.

Experiments and results

The split and the test for correctness

The tree-structured GeoQuery data consists of 880 question–meaning pairs. Following the earlier experimental setup, the authors reserve 280 pairs for testing and use the other 600 for training and tuning. They divide the development portion into 10 folds of 60 pairs. For each run, one fold is used for tuning and the other 540 pairs for training. The authors report averages across the 10 resulting systems. The reserved test portion serves the same role across the runs.

Each training run also receives the GeoQuery noun phrase list. The list supplies formal meanings for the noun phrases that occur in the questions of each language. The authors append these entries as extra training pairs and give them 50 times the weight of an ordinary training example so that the relevant translations are learned. The scores describe performance under that training procedure. Lexical coverage comes from both whole-question pairs and the additional noun phrase entries.

GeoQuery also has a version represented in lambda calculus. The paper notes that reported performance on that version is higher and treats the versions as separate setups. All the test results discussed here concern the tree-structured version. The annotations determine the target expressions the grammar sees, so changing the annotation formalism changes more than the way a result is printed.

To evaluate a prediction, the authors reconstruct its formal expression where possible and execute it. They execute the reference expression on the same database. A prediction counts as correct when the answers agree. This permits credit for different formal expressions that retrieve the same answer for that example. It also means the criterion tests the result of execution on that database, independently of whether the predicted expression resembles the reference string.

Accuracy is the share of all translations that produce the correct answer. For F1, precision concerns the share of correct answers among translations that produce an answer, and recall concerns the share of correct answers among all translations. F1 takes the harmonic mean of those two quantities. Taken alongside accuracy, it helps distinguish gaining correct answers from simply changing how often decoding produces an answer. The alignment evaluation later in the paper also uses precision, recall, and F1, but there the items being assessed are token links on the training data.

Changes to the English translation system

The paper’s internal baseline uses the non-enriched grammar with the symmetrized alignment. On the English test set it gets 77.5 accuracy and 83.5 F1. With the same alignment, the enriched grammar gets 78.9 accuracy and 83.9 F1. When the rule extractor has the full set of automatic alignments, the non-enriched grammar reaches 81.5 accuracy and 85.2 F1. The enriched grammar under the full alignment setting reaches 82.9 accuracy and 86.1 F1 before new rules for unknown words are added. These comparisons show how the grammatical change and the alignment change perform when the other setting is held fixed.

English GeoQuery test accuracy across grammar and vocabulary settings

The highest accuracy comes from combining the enriched grammar and alternative alignments with semantic rules for unfamiliar words.

English GeoQuery test accuracy across grammar and vocabulary settingsNon-enriched grammar, symmetrized alignment: 77.5Non-enriched grammar, symmetrizedalignment77.5Enriched grammar, symmetrized alignment: 78.9Enriched grammar, symmetrized alignment78.9Non-enriched grammar, all automatic alignments: 81.5Non-enriched grammar, all automaticalignments81.5Enriched grammar, all automatic alignments: 82.9Enriched grammar, all automaticalignments82.9Enriched grammar, all automatic alignments, null rules: 85.3Enriched grammar, all automaticalignments, null rules85.3Enriched grammar, all automatic alignments, semantic rules (this paper): 86.3Enriched grammar, all automaticalignments, semantic rules (this paper)86.3
The numbers
System or settingaccuracy %
Non-enriched grammar, symmetrized alignment77.5
Enriched grammar, symmetrized alignment78.9
Non-enriched grammar, all automatic alignments81.5
Enriched grammar, all automatic alignments82.9
Enriched grammar, all automatic alignments, null rules85.3
Enriched grammar, all automatic alignments, semantic rules (this paper)86.3

The English unknown-word comparison starts from the enriched grammar with all automatic alignments. Giving every unfamiliar word a null translation moves test accuracy from 82.9 to 85.3 and test F1 from 86.1 to 86.3. Generating semantic rules gives 86.3 accuracy and 87.1 F1. Omitting unfamiliar words accordingly recovers a substantial share of the accuracy gained by addressing them. The semantic rules contribute a further gain under both measures, consistent with the fact that some unfamiliar words need a meaningful translation.

The baseline and the final system appear in separate comparisons in the paper. The internal non-enriched baseline shares the authors’ experimental pipeline. SMT-SemParse is an earlier system reported separately in the comparison with published results. It has 80.5 English test accuracy and 81.8 F1. The scores answer related questions. A comparison within the pipeline tracks the effect of changing its components. A comparison with SMT-SemParse places the completed system relative to another translation-based parser.

Results across languages and earlier systems

The authors test the grammar and alignment changes across English, German, Greek, and Thai versions of the same benchmark. Starting with the non-enriched grammar and symmetrized alignment, German scores 66.0 accuracy and 74.9 F1, Greek scores 65.6 and 74.1, and Thai scores 65.4 and 72.4. The final settings bring German to 79.1 accuracy and 80.3 F1, Greek to 80.5 and 81.6, and Thai to 76.3 and 77.9. These are test scores. For those three languages the final settings use null rules for unknown words. English uses semantic rules and finishes at 86.3 accuracy and 87.1 F1.

The comparison with earlier work includes systems that learn from trees as well as systems that use translation or an induced lexicon. The chart shows English F1, where the enriched system has the highest reported score in that comparison. On English accuracy, f-RHT reaches 86.8 against 86.3 for the enriched system. The distinction is important because the paper’s concluding description claims the best score on both English measures. The English test values in the comparison support the F1 claim.

English GeoQuery test F1 for the enriched grammar and earlier systems

The enriched system has the highest F1 among the systems in the comparison.

English GeoQuery test F1 for the enriched grammar and earlier systemsWASP: 77.7WASP77.7SMT-SemParse: 81.8SMT-SemParse81.8HYBRIDTREE+: 81.0HYBRIDTREE+81.0tsVB: 79.3tsVB79.3RHT: 83.6RHT83.6f-RHT: 86.8f-RHT86.8UBL: 82.1UBL82.1Enriched grammar with all extensions (this paper): 87.1Enriched grammar with all extensions(this paper)87.1
The numbers
System or settingF1
WASP77.7
SMT-SemParse81.8
HYBRIDTREE+81.0
tsVB79.3
RHT83.6
f-RHT86.8
UBL82.1
Enriched grammar with all extensions (this paper)87.1

For German, the final system’s 79.1 accuracy and 80.3 F1 exceed the 75.7 accuracy and 75.7 F1 reported for f-RHT. For Greek, the comparison is 80.5 accuracy and 81.6 F1 for the enriched grammar against 79.3 accuracy and 79.3 F1 for f-RHT. The paper’s table places the enriched system first on both measures for those languages. This result is achieved with the simpler null handling of unfamiliar words. The improvements therefore do not depend on having similar-word candidates for these languages.

Thai shows the difference between improving a baseline and leading a benchmark. The final enriched system scores 76.3 accuracy and 77.9 F1. The comparison gives RHT 79.3 on both measures and f-RHT 80.7 on both. The extensions improve the authors’ own Thai system while leaving it behind those systems. The authors suggest the quality of the Thai alignments as a possible explanation. The experimental comparison establishes the relative scores, while the explanation remains a hypothesis.

What the ablations show

Structural labels help under matched alignment settings

The alignment experiments include an enriched and a non-enriched version for every setting. This is the clearest comparison for the grammar change because each pair uses the same source of alignment evidence. The enriched version scores higher on both English test measures in every matched pair. With target-to-source alignment alone, accuracy rises from 78.5 to 82.0 and F1 rises from 82.5 to 85.2. With source-to-target alignment alone, the corresponding movement is from 75.0 to 76.3 accuracy and from 82.5 to 82.9 F1. Structural enrichment is useful with either direction, although the observed gain depends on the alignment.

The authors also ask whether rejecting malformed outputs after decoding could accomplish much of the same work. They take the candidate list from a non-enriched system and look for a well-formed translation lower in the list when needed. With all automatic alignments, the English test accuracy moves from 81.5 to 82.0, while F1 falls from 85.2 to 84.5. Filtering can recover an executable candidate in some cases, but an executable candidate can give the wrong answer. It also depends on the desired translation already being in the candidate list.

A grammar with structural categories affects composition during the search itself. It changes which fragments can occupy a slot and which reordered combinations can be made. The filtering experiment is therefore relevant to the authors’ account of why enrichment helps. It shows that the tested candidate-list repair captures little of the measured advantage. The comparison is between grammar configurations, so it leaves the separate effect of inverted glue unresolved.

Alignment precision and useful phrase boundaries

With a single automatic alignment, target-to-source has the highest English test accuracy under both grammars. Under the enriched grammar it gives 82.0 accuracy and 85.2 F1. The symmetrized setting gives 78.9 accuracy and 83.9 F1, and source-to-target gives 76.3 accuracy and 82.9 F1. Under the non-enriched grammar, the symmetrized setting has higher test F1 than target-to-source, even though its accuracy is lower. The metric and the grammar therefore matter when describing which direction worked best.

The authors also compare the automatic links with their manual links on training data, excluding the noun phrase list. Source-to-target has 96.3 alignment recall and 68.8 alignment precision. Target-to-source has 90.0 recall and 77.0 precision. The symmetrized output has 95.1 recall and 62.7 precision. Against those manual links, target-to-source has the highest alignment F1, at 83.0. These measurements concern word links, so they diagnose a different stage from test answer accuracy.

The authors connect source-to-target errors to common functional words. A word such as the or a form of be can appear near many different target symbols without expressing the content of any one of them. The alignment analysis reports that those source words were linked to 15 different target words. A direction that tries to anchor each formal token in the question has less reason to find a formal counterpart for every such source word. Some target tokens remain difficult because their form comes from conventions of the query notation. For example, the state identifier has a regular position near the name it qualifies.

The measurements support the explanation that additional links can harm phrase extraction. An alignment with high recall supplies many of the expected links, yet spurious links can make a short phrase inconsistent with its intended target. A precise directional alignment can leave that phrase available. Retaining separate alignments uses this property directly. Different versions of a pair can license different rules even if no single version provides all the correspondences the parser would benefit from.

What combining alignments changes

Adding an alignment typically improves on the individual settings involved. There are exceptions, which help clarify the mechanism. In the non-enriched grammar, combining source-to-target with the symmetrized alignment gives 77.1 English test accuracy, compared with 77.5 for the symmetrized alignment alone. Under the enriched grammar the same combination gives 78.8, compared with 78.9 for the symmetrized setting alone. The extra extracted evidence can change rule availability and scoring. An improvement is an empirical outcome of that change.

The full automatic combination gives the non-enriched grammar 81.5 test accuracy and 85.2 test F1. Those are the highest automatic scores for that grammar in the alignment comparison. Under the enriched grammar, all automatic alignments give 82.9 accuracy and 86.1 F1. Using target-to-source together with the symmetrized alignment gives 83.1 accuracy and 86.1 F1. The paper’s description of the full combination as better than every pairwise combination is therefore stronger than the English table supports. The full setting is competitive and becomes the basis for the unknown-word tests. It ties the best automatic F1 under enrichment in the alignment comparison, while the pairwise setting has the higher accuracy there.

Using the manual links, the enriched grammar reaches 84.1 English test accuracy and 87.1 F1 in the alignment experiment. The non-enriched grammar with manual links reaches 82.4 accuracy and 86.2 F1. The automatically combined setting approaches the manual setting under either grammar. The comparison captures what automatic alternatives can recover in the rule inventory, even though manually supplied links still give higher scores within the same grammar. The separate English result of 87.1 F1 for the completed automatic system also includes semantic rules for unknown words. It describes a different configuration.

The paper also compares which English test questions change outcome as components are added. With symmetrized alignment fixed, the enriched and non-enriched systems both answer 211 test sentences correctly in the reported comparison. Such overlap helps interpret aggregate scores. A change can fix some questions and lose others, so a rise in accuracy need not mean that every previous success was preserved. Using these comparisons, the authors attribute more than half of the improvement along the path from the non-enriched symmetrized system to the enriched full-alignment system to the change in alignments. The attribution follows that comparison path. The scores under different alignment settings already show that the grammar gain varies with the available rules.

Which unfamiliar words can be recovered

The authors estimate that 5.7% of the English test sentences have unknown words. The individual systems are trained on 540 question pairs, together with the noun phrase list. The paper points out that this training procedure leaves more opportunity for unknown words than using the whole set of 600 development pairs for training would. The unknown-word experiment measures the effect of the new rules under the reported fold setup.

The null comparison shows that omission frequently makes the rest of the question translatable. With omission, the decoder has a way to consume the unfamiliar input without inserting an invalid word into the formal expression. The gain is clearer in English accuracy than in F1. This is consistent with the authors’ account that deletion helps some translations reach an answer, while in other cases the omitted word contributes meaning that the resulting query needs.

The authors manually examine the unknown words in the English test data. They judge that 11 of the 17 need a target token. The generated synthetic rule sets contain a correct rule for 8 of those words. This check assesses candidate availability. The scores from executing the full translations assess whether decoding and composition turn the available rules into correct answers. The candidate check shows one source of failure before the decoder chooses a derivation. Some words have no correct rule among the proposed candidates.

The multilingual comparisons provide an additional check on omission. In Thai, adding the unknown-word treatment to the enriched system with all automatic alignments moves test accuracy from 75.2 to 76.3 and leaves test F1 at 77.9. In German, the corresponding scores move from 75.4 accuracy and 79.5 F1 to 79.1 accuracy and 80.3 F1. The same omission mechanism has different measured effects across settings, just as the same alignment strategy can help more in one setting than another.

The cost of the larger rule inventory

The authors report phrase counts and decoder times for English test sentences. When they replace the undifferentiated nonterminal with enriched categories, the average number of phrases available per test sentence rises from 453 to 893. Mean decoding time rises from 0.11 seconds to 0.19 seconds per sentence. The decoder builds a phrase table for each sentence, so these counts describe the inventory available during decoding of a test example. A phrase that had one generic category can appear under several structural categories, accounting for the larger inventory.

Adding alternative alignments increases the average phrase count further, from 893 to 2055 per English test sentence. The average decoding time moves from 0.19 seconds to 0.38 seconds per sentence. The timing follows the authors’ account of coverage. Separate alignments expose phrases that were unavailable under a single alignment, and the decoder has more entries to consider. The enriched symbols improve guidance about combinations while also making more distinctions among entries.

The unknown-word rules have little measured effect on decoding time in this setup. The similarity search is limited to the training vocabulary, and unfamiliar words are sufficiently infrequent that few synthetic entries are needed for a typical example. The reported timing tracks this benchmark’s training and vocabulary conditions. The grammar and alignment changes account for the visibly larger per-sentence tables in the analysis.

Limitations

Limits identified by the authors

The experiments concern variable-free, tree-structured queries. The authors explicitly distinguish their results from those reported for the lambda-calculus GeoQuery annotations. Their structural categories depend on tracing the arities in a serialized tree. The paper discusses other semantic formalisms to situate the method, while measuring the enriched grammar on the representation for which those categories were designed.

The method learns from questions already paired with formal meanings. It uses those pairs to align words, extract rules, and estimate lexical probabilities. Word2Vec offers additional evidence about which source words resemble each other, while the target candidates still come from the aligned training data. The authors identify learning synthetic rules from weaker evidence, such as question–answer pairs, as future work. Earlier research on open-domain parsing from weak supervision is part of the motivation for that direction. Semantic Parsing on Freebase from Question-Answer Pairs

The authors also identify the quality of the similar-word candidates as a limit. An unfamiliar word benefits only if an appropriate training word is found and supplies a usable translation. For the other three languages in their experiments, the authors say they were unaware of public resources they could use to find semantically close words. Their results there concern omission of unknown words. The claim that the procedure can be adopted given suitable monolingual data is a statement about how the method could be transferred. The semantic variant is tested on English.

The Thai result receives a separate qualification. The authors suspect that alignment quality contributes to the remaining performance gap. Their detailed link measurements compare English alignments with manually supplied links. The Thai scores show that their changes help relative to their own baseline, while the alignment explanation for the gap to earlier systems remains untested by an equivalent link analysis.

They also discuss the option of using string-to-tree or tree-to-tree translation. Such methods could handle structural consistency directly. The authors note a coverage difficulty with requiring target phrases to coincide with tree constituents, especially when training data are scarce. Their own categories describe partial expressions so that a phrase can stay useful even if it falls short of a full constituent. The paper leaves the tradeoff between this design and a tree-based translation system for future investigation. A Syntax-Based Statistical Translation Model

Limits of what the experiments establish

Execution on one database is a practical criterion for these geography questions. It establishes agreement with the reference answer in the evaluation setting. Different expressions can agree on the facts in that database while behaving differently when those facts change. The reported answer scores therefore measure successful retrieval under the benchmark conditions. They do not measure equivalence between formal expressions across possible databases. This distinction also explains why BLEU and final evaluation can assign different value to a candidate.

The training setup supplies lexical information beyond the full questions through the heavily weighted noun phrase list. That resource is part of the reported comparison and should be part of any interpretation of coverage. The results leave open how well the enriched grammar would perform without those entries or with a different source of noun phrase meanings. The unfamiliar-word counts also reflect the decision to hold out a tuning fold in each run. A system that trained its rule inventory on more of the paired questions could encounter a different mix of unknown words.

The component experiments distinguish several practical configurations. They do not isolate every mechanism in those configurations. The enriched grammar changes nonterminal categories and adds an inverted form of glue. Separate alignments change the rules that can be extracted and the training counts behind their scores. The measured outcome is a comparison of ways of assembling the complete system. There is direct evidence for the performance of those settings, while finer attribution to an individual type of rule remains open.

The averages summarize the test behavior across the tuning runs. The paper’s analyses give matched comparisons, some overlaps in correct predictions, and a manual vocabulary check. They offer no measure of how much the scores vary across those runs. Small differences, such as the English alignment settings tied on F1, are best read as the ordering of reported scores under these conditions. The benchmark comparison likewise gives an ordering for each metric and language. The English accuracy result and the Thai results constrain the scope of any overall claim of leadership.

Finally, making a fragment composable establishes a structural property. Correct interpretation still depends on which words are linked, which rule is selected, and whether the query expresses the intended geography question. The manual unknown-word check is a concrete reminder of where one limitation arises. A parser can assemble only the target candidates it has learned or generated, and matching a structural requirement cannot supply a missing semantic candidate. The ability to produce a tree and the ability to produce the right answer are both necessary in this setup.

What came after

Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both? cites the enriched-grammar paper. Its title poses a broader question about two demands on a semantic parser. One is to combine familiar semantic pieces in unfamiliar ways. The other is to recognize expressions that differ in wording while conveying the same meaning. The GeoQuery paper touches both demands through changes to translation rules. Its categories describe when fragments can combine, while its alignment and unfamiliar-word procedures broaden the expressions that can contribute those fragments.

The connection is easiest to see in the border example. A rule that leaves room for a place argument can be reused with a different identifier. That is a source of compositional flexibility. A shorter learned correspondence for a relation can also survive changes to the words around it, which supports variation in phrasing. Both mechanisms may help a parser answer the same kind of question in more than one form. The GeoQuery test scores combine such effects with other sources of error, including alignment quality, unknown vocabulary, and choices among executable queries.

The citation establishes a link between the two papers, and the later title identifies the joint question it takes up. The title alone leaves the later work’s use of the grammar, its experimental setup, and its findings unspecified. The empirical conclusion from the earlier work is narrower. Structural categories and alternative lexical evidence improved answer retrieval under the reported GeoQuery setup, where composition and variation both matter to the final translation.

Cite

Cite as Junhui Li, Muhua Zhu, Wei Lu and Guodong Zhou. 2015. Improving Semantic Parsing with Enriched Synchronous Context-Free Grammar. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/d15-1170

@inproceedings{li2015improving,
  title = {{Improving Semantic Parsing with Enriched Synchronous Context-Free Grammar}},
  author = {Junhui Li, Muhua Zhu, Wei Lu and Guodong Zhou},
  booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1170},
  url = {https://doi.org/10.18653/v1/d15-1170}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/li-2015-improving-semantic-parsing-enriched-synchronous/