---
title: "Compositional Generalization and Natural Language Variation:"
description: "The paper tests whether semantic parsers can handle varied human wording and unfamiliar combinations, using new dataset splits and a…"
canonical: "https://research.elamur.ai/free/en/papers/shaw-2021-compositional-generalization-natural-language-variation/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/shaw-2021-compositional-generalization-natural-language-variation/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?

# Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?

Paper · 2021 · Peter Shaw, Ming-Wei Chang, Panupong Pasupat et al.

**Authors:** [Peter Shaw](https://md.research.elamur.ai/free/en/authors/peter-shaw/), [Ming-Wei Chang](https://md.research.elamur.ai/free/en/authors/ming-wei-chang/), [Panupong Pasupat](https://md.research.elamur.ai/free/en/authors/panupong-pasupat/) and [Kristina Toutanova](https://md.research.elamur.ai/free/en/authors/kristina-toutanova/) · **Year:** 2021 · **Venue:** Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**113** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3093630174|W6948218651) · [Cited by **109** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/shaw-2021-compositional-generalization-natural-language-variation/cited-by/) · [Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)](https://aclanthology.org/volumes/2021.acl-long/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.acl-long.75/)
- [PDF](https://aclanthology.org/2021.acl-long.75.pdf)
- [DOI 10.18653/v1/2021.acl-long.75](https://doi.org/10.18653/v1/2021.acl-long.75)
- [arXiv 2010.12725](https://arxiv.org/abs/2010.12725)
- [OpenAlex](https://openalex.org/W3093630174)

Citations: OpenAlex, 2026-10-14.

## Summary

A system that converts questions into database queries has to deal with two kinds of unfamiliarity. People can ask a familiar question in different words, and they can ask a new question by combining operations the system has seen separately. The paper asks whether a single approach to [semantic parsing](https://md.research.elamur.ai/free/en/concepts/semantic-parsing/) can handle both. Earlier studies commonly examined these abilities in separate settings. Synthetic commands made it possible to control which combinations appeared in training, while standard evaluations on questions written by people exposed systems to variation in wording. The authors bring the two demands together by changing how examples from existing datasets are assigned to training and test sets.

Their new procedure, Target Maximum Compound Divergence, or TMCD, uses the structure of the expected answers to decide what counts as a familiar part or an unfamiliar combination. For GeoQuery, a dataset of US geography questions, individual symbols in a formal query are the parts, and connections between symbols in the query tree supply the combinations. For [Spider](https://md.research.elamur.ai/free/en/papers/yu-2018-spider-large-scale-human-labeled/), the procedure works with SQL tokens and the structure of parsed SQL queries. Each target part must appear in training, while the distributions of combinations are pushed apart. This lets the authors select challenging test examples while keeping the original human questions.

The proposed parser, NQG-T5, first tries NQG, a system that learns reusable grammar rules from paired questions and formal answers. A learned scorer helps it choose among derivations, the sequences of rule applications that produce a parse. When NQG can return a valid parse, the hybrid uses it. Otherwise, it takes the output of [T5](https://md.research.elamur.ai/free/en/papers/raffel-2019-exploring-limits-transfer-learning-unified/), which generates a target sequence directly after training on the task. Over 8 evaluations on SCAN and GeoQuery, NQG-T5 achieved an average rank of 1.0 among 5 approaches, compared with 2.9 for T5. The hybrid improved on T5 in several tests of unfamiliar combinations and preserved its strong performance on standard evaluations. On Spider, it remained competitive by relying on T5 when the grammar could rarely construct an answer.

The error analysis shows why the problem remains open. Among incorrect T5-Base predictions on GeoQuery TMCD, 26% first went wrong where the correct symbol had zero probability under a simple predictor fitted to training queries. In 53% of the incorrect predictions, the correct query included an atom seen in only 1 training example. Those groups can overlap. NQG was frequently reliable on the questions it could parse, but changes in phrasing and the structure of SQL could leave it without an applicable derivation. The authors released the code and data splits in the `nqg` directory of the `google-research/language` repository.

## Deep dive: Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?

The paper tests whether semantic parsers can handle varied human wording and unfamiliar combinations, using new dataset splits and a hybrid parser. · about 38 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Two things can change between training and use

A semantic parser takes an utterance and produces a formal representation of its meaning. For the tasks in this paper, that representation may be a sequence of actions or a structured query. A question about the longest river, for instance, calls for a query that applies a selection operation to rivers. The desired output has an explicit structure even when the original question leaves that structure implicit. The parser has to recover what the words refer to, which operations the speaker intends, and how those operations fit together.

Natural language variation concerns the different ways a speaker can express a meaning. A familiar operation may be described with different words, and a familiar relationship may be expressed through a different sentence construction. Compositional generalization concerns what happens when the operations or concepts themselves occur in an unfamiliar arrangement. Familiarity with an operation in one context gives a learner something to reuse in another, provided it can recognize the operation and carry it over. A test can stress either dimension by itself, or it can require both from the same parser.

The authors use SCAN to explain the distinction. Its inputs are generated commands, and its outputs specify actions. A learner might see `jump` by itself and see how `twice` changes a walking command. A primitive split can then ask it to interpret a command combining jumping with repetition. A primitive is an elementary command whose behavior has already been demonstrated. Here the individual meanings are available in training, while the combination is held out. Because a program supplies the commands, the benchmark can control that distinction closely. The same control makes the benchmark a narrower sample of wording than one collected from people.

Earlier SCAN studies also used a length split. In that setting, test examples extend beyond the lengths seen in training, so the learner has to carry its behavior farther than demonstrated. Both the length and primitive tests are interpretable because the split identifies a particular departure from training. Each tests a different transfer. A learner might have acquired a pattern for repeating an action and still fail when it has to continue generating a longer action sequence. The paper also situates SCAN alongside synthetic benchmarks such as CFQ, NACS and [COGS](https://md.research.elamur.ai/free/en/papers/kim-2020-cogs-compositional-generalization-challenge-based/), whose designs give researchers additional ways to investigate composition.

The authors give a scientific and a practical reason to pursue these tests. Evidence that people can learn and reuse compositional patterns helped motivate proposals for more systematic language understanding. For applications, ordinary random splits can put closely related examples on both sides of the train–test boundary. Strong performance then establishes that a parser can handle the resulting test distribution. How it responds to a meaningful change in that distribution is a separate empirical question. The paper connects this concern with prior work on behavioral testing, which sought to expose kinds of error that an aggregate accuracy figure can hide. [CheckList](https://md.research.elamur.ai/free/en/papers/ribeiro-2020-beyond-accuracy-behavioral-testing-nlp/)

#### How earlier evaluations created unfamiliar examples

One predecessor to TMCD is Maximum Compound Divergence, or MCD, introduced with CFQ. Its basic distinction is between atoms, the elementary pieces from which examples are made, and compounds, the larger structures those pieces form. The split procedure looks for a large difference in the distributions of compounds while keeping the distributions of atoms reasonably close. A learner then encounters familiar ingredients in structurally different surroundings. The original method draws its atoms and compounds from the procedure that generated the paired inputs and outputs. A collection of questions written by people supplies no corresponding record of how a generator built each utterance.

Another predecessor is the template split, also called a query split. As described in earlier text-to-SQL work, the procedure anonymizes entities in an answer query and uses the remaining form as its template. The same template cannot occur in both training and test. A learner therefore faces a new complete query shape, even if it has seen substantial parts of that shape before. That property matters because familiarity with a whole template can make it easier to produce an answer when the main change is a value or entity. The split also leaves open how familiar the individual operations are and how frequently local structures recur across different templates. [Improving Text-to-SQL Evaluation Methodology](https://md.research.elamur.ai/free/en/papers/dollak-2018-improving-text-sql-evaluation-methodology/)

These designs make different changes to the evidence a parser receives. A primitive split chooses an elementary command and controls where it can occur. A length split separates examples by size. A template split separates complete expressions after a specified anonymization. MCD instead asks how parts and combinations are distributed across each set as a whole. The paper keeps several of these evaluations because the property that defines a split also shapes the failures a reader can interpret from it. For human-written questions, the authors needed a way to obtain the structural information for a compound-based split without having to regenerate or annotate the questions themselves.

#### Why the two demands suggested different approaches

Sequence-to-sequence systems had already been applied to semantic parsing, including work that directly learned to map language to logical forms and work that augmented the available examples through recombination. Such systems learn to produce an output string conditioned on an input string. They can use the wording of the entire input when predicting the next part of an answer. Prior work considered by the authors found that large-scale pretraining helped on a broad range of language tasks and still left several compositional challenges unresolved. [Language to Logical Form with Neural Attention](https://md.research.elamur.ai/free/en/papers/dong-2016-language-logical-form-neural-attention/) · [Data Recombination for Neural Semantic Parsing](https://md.research.elamur.ai/free/en/papers/jia-2016-data-recombination-neural-semantic-parsing/)

Other approaches built for SCAN incorporated discrete structures that let a learner reuse pieces of an interpretation explicitly. The paper identifies practical differences among these approaches. Some need resources supplied for the task, such as a mapping for elementary commands or a grammar that resembles the generator behind the training data. Such resources are more difficult to supply for a corpus of naturally phrased questions. The authors also discuss a span-based parser that had already addressed both SCAN and GeoQuery. Its use of task-specific engineering makes it an important comparison for a grammar induction procedure intended to work from pairs of strings. [Span-based Semantic Parsing for Compositional Generalization](https://md.research.elamur.ai/free/en/papers/herzig-2021-span-based-semantic-parsing-compositional/)

Grammar-based semantic parsing itself has a longer history in the paper’s account. Earlier parsers used categorial grammars or synchronous grammars to connect the structure of an utterance with the structure of a logical form. In related work on machine translation, a hierarchical phrase rule could connect pieces of a source string with pieces of a target string and leave places for smaller translations to be inserted. The premise of NQG is that paired rules can serve a similar purpose in semantic parsing, with an automatically learned inventory and scores that use context from the question. [Online Learning of Relaxed CCG Grammars for Parsing to Logical Form](https://md.research.elamur.ai/free/en/papers/zettlemoyer-2007-online-learning-relaxed-ccg-grammars/) · [Hierarchical Phrase-Based Translation](https://md.research.elamur.ai/free/en/papers/chiang-2007-hierarchical-phrase-based-translation/)

### The method, step by step

#### Put familiar parts into unfamiliar query structures

TMCD starts with a collection of question–answer pairs in which each answer is written as a formal string. The question can remain exactly as collected for purposes of defining compounds. The authors get the structural information they need from the answer. They identify basic units, or atoms, and patterns made from those units, or compounds. Their search tries to make train and test differ in the weighted frequencies of compounds, with a basic safeguard for the atoms. Every atom must occur somewhere in training.

In GeoQuery, the target language is a variant of Functional Query Language, abbreviated FunQL. Its brackets make the nesting explicit. The paper’s example `longest(river)` contains the atoms `longest` and `river`, and their connection in the tree defines a compound. The parent is the operation that selects the longest member of a collection. The child supplies the collection of rivers. Holding back that connection is compatible with giving the parser other instances of `longest` and other instances of `river`. The paper also gives a compound such as `exclude(longest(_), _)`. The underscores stand for material left unspecified by the pattern, so the same compound can occur inside different complete queries.

For Spider, the authors first split the SQL answer into tokens. Individual tokens are atoms. An unambiguous [context-free grammar](https://md.research.elamur.ai/free/en/concepts/context-free-grammar/) gives each SQL string a parse tree, and the authors use first- and second-order edges in that tree to define compounds. This makes a compound sensitive to where tokens or constructions occur in SQL structure. A pair or pattern associated with a particular structural connection can be tracked even if it occurs inside queries that differ in other respects. The definition is tailored to the available representation. FunQL already displays the relevant nesting in brackets, while SQL is parsed to obtain it.

To score a proposed split, the authors retain the compound divergence measure from MCD.

```
𝒟꜀ = 1 − C₀.₁(ℱtrain ∥ ℱtest)
```

Here `𝒟꜀` is compound divergence. `ℱtrain` and `ℱtest` are the weighted compound-frequency distributions in the training and test sets. `C₀.₁` is the Chernoff coefficient at the paper’s setting of `0.1`. The double bar separates the distributions in their specified order. Subtracting the coefficient from `1` makes a smaller overlap score correspond to a larger divergence.

```
Cα(P ∥ Q) = ∑ₖ pₖ^α qₖ^(1−α)
```

`Cα` denotes the coefficient at exponent `α`. `P` and `Q` are the distributions being compared. For compound index `k`, `pₖ` and `qₖ` are the corresponding entries of `P` and `Q`. The sum runs over compounds and multiplies the entries after raising them to the powers `α` and `1 − α`, respectively. With the authors’ setting, the different exponents make the order of train and test relevant to the calculation.

Construction proceeds by swaps. The authors first partition the examples at random, then exchange examples between the sets until training contains every atom. After that, they look for pairs of examples whose exchange will raise compound divergence while retaining atom coverage. They accept qualifying swaps sequentially and stop when they can identify no further improving exchange. This is a greedy search. Its result depends on the partition and the improving moves the search finds, and the objective is optimized approximately. The atom safeguard is a presence condition. An atom supported by a single training example satisfies it just as an atom supported by many examples does.

The split is prepared before either parser is trained. Its use of the target syntax is a property of benchmark construction. At prediction time, the parser still receives a question, with the task’s designated input information, and is evaluated against the hidden target. The benchmark designer has access to the corpus of paired examples in order to decide which examples can serve as a test of transfer. The parser learns from the pairs placed in training. Keeping these roles distinct is important because the compound definitions guide the evaluation, whereas the QCFG rules described next are learned for prediction.

#### Learn a grammar that pairs questions with answers

NQG is the grammar component of NQG-T5. Its training starts with grammar induction, which means learning the rules from the paired training examples. A second stage learns to score applications of the induced rules to particular spans of an input. T5 is adapted to the same task separately. Once both components are trained, the hybrid tries the grammar first and draws on T5 if the grammar returns no output.

Training and using NQG-T5 The steps in order.

The grammar pairs fragments of the input language with fragments of the output language. A terminal is a literal symbol that contributes directly to the string. A non-terminal is a place where a rule can supply further structure. The paper introduces the rule notation for a synchronous context-free grammar before explaining the relaxation used in NQG.

```
S → ⟨α, β⟩
```

`S` is the non-terminal being expanded. The arrow indicates a rule, and the angle brackets enclose its paired expansions. `α` is the source-side string of terminal and non-terminal symbols, and `β` is its target-side counterpart. Non-terminal occurrences carry indices. If an occurrence in `α` and one in `β` share an index, the rule links them. Filling the source slot through a rule application also determines what fills the corresponding target slot.

Suppose part of an example maps the word `state` to the FunQL symbol `state`, while the surrounding material maps a request for the largest member of a collection to the target operation `largest`. A rule for the surrounding context can leave a linked slot where the collection belongs. The pairing carries the slot’s meaning to the right position in the query. A complete derivation records which rules were used and how their source and target sides fit together. A new interpretation is available when a sequence of known rules can account for the entire new input and build its target.

NQG uses a quasi-synchronous context-free grammar, or QCFG. In the version used here, the same linked non-terminal can appear more than once on the target side. This lets the target reuse material corresponding to a single source span. The induced grammar has a single non-terminal type, `NT`. An index identifies a linked occurrence of that type. The source side permits at most 2 non-terminal occurrences and excludes productions whose source is just one non-terminal. Those restrictions make it possible to parse with a chart algorithm similar to CKY without first converting longer source rules into binary ones.

The appendix uses a derivation relation to describe how rules change a pair of strings.

```
⟨α¹, β¹⟩ ⇒ʳ ⟨α², β²⟩
```

The pair on the left contains a source string `α¹` and a target string `β¹` before the application of rule `r`. The right pair contains the resulting strings `α²` and `β²`. The superscripts on the string symbols distinguish the stages. The superscript `r` on the arrow identifies the rule. An unadorned `⇒` leaves the rule unspecified, a chain of arrows denotes successive applications, and `⇒*` permits any number of applications, including none.

#### Compress the training pairs while keeping them derivable

Induction begins with a grammar that can reproduce each training pair directly.

```
NT → ⟨x, y⟩
```

`NT` is the grammar’s non-terminal, `x` is a complete source string and `y` is its paired target. The rule arrow gives the expansion, and the brackets hold the two strings together. A direct rule for every training pair is a straightforward starting point, but it leaves recurring patterns duplicated across the grammar. For GeoQuery and Spider, initialization also adds identity rules. Such a rule pairs a substring with itself when it occurs on both sides of a training example. SCAN has no exact token overlap between the source and target strings and therefore supplies no such rules.

To decide which generalizations are worth making, the authors use [minimum description length](https://md.research.elamur.ai/free/en/concepts/minimum-description-length/). They imagine a code with two parts. One describes the grammar, and the other describes the training targets when the grammar and the inputs are already known. Replacing several long rules with a shared pattern can make the grammar easier to encode. A shared pattern can also create competing derivations for the same question, some yielding the wrong target. The objective assigns a cost to that ambiguity, giving the search a reason to retain distinctions that help explain the paired data.

```
H(𝒢) − ∑₍ₓ,ᵧ₎∈𝒟 log₂ P𝒢(y ∣ x)
```

`𝒢` denotes the grammar and `H(𝒢)` its encoding cost. `𝒟` is the dataset of source–target pairs. Each term of the sum concerns a source `x` and its observed target `y`. `P𝒢(y ∣ x)` is the probability the grammar assigns to that target given the source. `log₂` is the logarithm to base `2`, and the minus sign turns a log probability into a coding cost. A training target that accounts for a smaller share of the possible derivations costs more to encode under this criterion.

The implementation approximates the grammar cost by charging for terminals and non-terminals. For the target cost, it treats every derivation of the input as equally likely during induction. The probability of a correct target is then the share of those derivations that yield it.

```
L(ℛ) = lₙ Cₙ(ℛ) + lₜ Cₜ(ℛ)
       − ∑₍ₓ,ᵧ₎∈𝒟 log₂ (|Z𝒢₍ₓ,ᵧ₎| / |Z𝒢₍ₓ,∗₎|)
```

`ℛ` is the mutable rule set of `𝒢`, and `L(ℛ)` is its approximate total codelength. `Cₙ` counts non-terminal symbols in those rules and `Cₜ` counts terminal symbols. The respective costs per occurrence are `lₙ` and `lₜ`. For training pair `(x, y)` in `𝒟`, `Z𝒢₍ₓ,ᵧ₎` contains the grammar derivations that yield that pair, and `Z𝒢₍ₓ,∗₎` contains all derivations of source `x`, with `∗` standing for any target. The vertical bars count the members of each set, and the division gives the proportion of derivations that yield the observed target. The sum of negative base-`2` log probabilities is added to the rule-symbol costs. The non-terminal cost is `1` throughout the experiments. The terminal cost is `8` for GeoQuery and Spider and `32` for SCAN.

This objective is used while choosing rules. The eventual parser assigns different probabilities to different derivations with a trained scorer. Treating derivations uniformly during induction lets the authors evaluate rule changes without first training that scorer. It also means that a rule can be costly at induction time if it creates many incorrect possibilities, even if some of those possibilities could later be scored poorly by the trained parser.

The search preserves the ability to derive every pair under consideration. To state what a rule set can already express, the paper defines the collection of rules that can be reproduced by a derivation.

```
d(ℛ) = {NT → ⟨α, β⟩ ∣ ⟨NT, NT⟩ ⇒* ⟨α, β⟩}
```

`d(ℛ)` is the collection derivable using the rules in `ℛ`. The braces describe a set, and the vertical bar means “such that.” Each member is a rule expanding `NT` to a source string `α` and a target string `β`. On the right of the bar, the pair of non-terminals is the starting point. The starred arrow says that a sequence of rule applications from `ℛ` can reach the indicated pair. A rule can thus be available for use in the search even if its expansion is achieved through other rules.

The basic operation for proposing reusable pieces is to break an existing paired expansion into two rules. The operation examines pairs of source and target substrings that can be factored out and represented by a linked non-terminal.

```
SPLIT(NT → ⟨α, β⟩) =
  {(g, h) ∣ ⟨NT, NT⟩ ⇒ᵍ ⇒ʰ ⟨α, β⟩
         ∨ ⟨NT, NT⟩ ⇒ʰ ⇒ᵍ ⟨α, β⟩}
```

`SPLIT` takes a rule whose right-hand side pairs `α` and `β`. It returns pairs of rules `g` and `h` capable of reproducing the expansion. The initial pair `⟨NT, NT⟩` represents the two sides before expansion. The superscripts on the arrows identify the rules, and `∨` means that either order qualifies if it produces the specified strings. The intermediate string pair is implicit. In the GeoQuery example involving `largest state`, one rule handles the context for the `largest` operation and the other handles `state`. If `state` is already derivable, the context rule can be considered for addition on its own.

Splitting can involve reassigning indices so that the intended occurrences are still linked. The authors also let the operation introduce repeated occurrences of a linked non-terminal on the target side for SCAN and Spider when the target contains repeated substrings. This option is disabled for GeoQuery, where their FunQL representation needs no such repetitions. The choice matters at the candidate-generation stage because it determines which paired patterns the search can propose in the first place.

The algorithm looks for candidates by requiring one half of a proposed split to be available already.

```
NEW(ℛ) = {g ∣ (g, h) ∈ SPLIT(f) ∧ f ∈ ℛ ∧ h ∈ d(ℛ)}
```

`NEW(ℛ)` is the candidate set for the current rules `ℛ`. The symbol `∈` means membership and `∧` joins requirements. An existing rule `f` must belong to `ℛ`, and a possible split of `f` must contain the candidate `g` together with another rule `h`. That other rule must be derivable with the current rule set, expressed by `h ∈ d(ℛ)`. This condition gives the algorithm a way to replace a longer rule through the addition of one missing piece.

A candidate’s value also depends on how many existing rules it makes redundant. The paper defines this set separately.

```
ELIM(ℛ, f) = {h ∣ (f, g) ∈ SPLIT(h) ∧ g ∈ d(ℛ) ∧ h ∈ ℛ}
```

`ELIM(ℛ, f)` is the set of rules eligible for removal when candidate `f` is introduced into `ℛ`. Here `h` is an existing rule under consideration for removal, and `g` is the other piece of a split that reproduces `h`. The membership conditions require `h` to be in the current rule set and `g` to be derivable from it. The conjunction `∧` requires all the conditions inside the braces. This is the same factoring operation viewed from the opposite direction. The search can ask which longer expansions the new piece would help replace.

```
ℛ′ = (ℛ ∪ {f}) ∖ ELIM(ℛ, f)
```

`ℛ′` is the proposed updated rule set. The union sign `∪` adds candidate `f` to the current set `ℛ`, and `∖` removes the set of redundant rules identified by `ELIM`. The prime distinguishes the proposed set from the current one.

```
−ΔL(ℛ, f) = L(ℛ) − L(ℛ′)
```

`−ΔL(ℛ, f)` is the reduction in codelength from adding `f` and applying the associated removals. `L(ℛ)` is the cost before the change, and `L(ℛ′)` is the cost after it. A positive value represents an improvement because the updated grammar and training targets require a shorter code.

```
MAX(ℛ) = argmax over f ∈ NEW(ℛ) of −ΔL(ℛ, f)
```

`MAX(ℛ)` selects the candidate rule with the greatest estimated codelength reduction. `argmax` returns the rule attaining that score. The search ranges over `f` in `NEW(ℛ)`, with the score given by `−ΔL(ℛ, f)`. The procedure repeats while it can find an improving addition and associated removals that preserve access to the training pairs. This local choice can arrive at different grammars depending on the opportunities available along the way.

The implementation economizes on both candidate scoring and search. To estimate how a proposed rule changes the proportion of incorrect derivations, it samples up to `10` training examples with the source-side terminal substrings needed to use that rule. The authors also run the search on the shortest `N` training examples for larger datasets, because long string pairs yield more candidate splits. The threshold is `500` examples for SCAN and `1000` for Spider. The entire GeoQuery training set is used because it contains fewer than `500` unique examples. After induction on the shorter examples, the procedure adds direct rules for any remaining training pairs that the grammar still cannot derive. During search, it also reuses computations when a change in rules leaves them unaffected.

#### Score derivations in context

The induced grammar determines which interpretations the parser can build. The next stage trains a scorer to tell those interpretations apart. The training pairs specify only the source and target strings. Which sequence of rule applications produced the correct target is a latent variable, meaning that the training data leave it unobserved. Several derivations can reach the same correct answer, so the target probability collects their contributions.

```
p(y ∣ x) = ∑₍𝓏∈Z𝒢₍ₓ,ᵧ₎₎ p(𝓏 ∣ x)
```

`p(y ∣ x)` is the learned probability of target string `y` given source string `x`. The sum runs over derivations `𝓏` in `Z𝒢₍ₓ,ᵧ₎`, the set that produces the specified pair under grammar `𝒢`. Each `p(𝓏 ∣ x)` is the conditional probability of that derivation. The probability of the target pools evidence from all derivations yielding it.

```
p(𝓏 ∣ x) = exp(s(𝓏, x)) / ∑₍𝓏′∈Z𝒢₍ₓ,∗₎₎ exp(s(𝓏′, x))
```

`p(𝓏 ∣ x)` is the probability of a particular derivation for `x`, and `s(𝓏, x)` is its score. The exponential function `exp` converts a score into a positive weight. The denominator sums these weights for every derivation `𝓏′` in `Z𝒢₍ₓ,∗₎`, the set of derivations compatible with `x` regardless of target. The prime distinguishes a derivation being summed over from the particular one in the numerator. The denominator is the partition function, which makes the probabilities across those derivations sum to `1`.

A rule is *anchored* when it is applied to a particular span of the source. The same rule can receive different scores at different locations or in different questions. A derivation’s total comes from the scores of all such applications in it.

```
s(𝓏, x) = ∑₍ᵣ,ᵢ,ⱼ₎∈𝓏 φ(r, i, j, x)
```

`s(𝓏, x)` is the total score for derivation `𝓏` on source `x`. Each triple in the sum contains a rule index `r` and source positions `i` and `j` that delimit its span. `φ(r, i, j, x)` is the score for the rule applied at that location. The decomposition lets the parser reuse scores for rule applications shared by multiple derivations.

To construct the scores, the authors encode the source with [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/). Its representation at a position depends on the surrounding input. The scoring function uses the encoder’s representations for the boundary wordpieces, the units into which the encoder divides the text. It combines a term based on the span with a term measuring how compatible that span is with the particular rule.

```
φ(r, i, j, x) = fₛ([wᵢ, wⱼ]) + eᵣᵀ fᵣ([wᵢ, wⱼ])
```

`φ` scores rule index `r` on the span from `i` to `j` in `x`. The vectors `wᵢ` and `wⱼ` are the contextual representations of the first and last wordpieces of that span. The bracketed pair `[wᵢ, wⱼ]` concatenates them. The feed-forward network `fₛ` produces a scalar, and the feed-forward network `fᵣ` produces a vector with `d` dimensions. Both networks use hidden size `d`. The learned rule vector `eᵣ` also has `d` dimensions. The transpose `ᵀ` allows it to take the dot product with the output of `fᵣ`, producing the rule-specific scalar. The two scalar terms are added. The experiments use `d = 256`.

The parser is trained by maximum marginal likelihood. For each example, the authors prepare a parse forest for derivations that yield the correct target and another for derivations that yield any target for that input. A forest is a compact representation that shares pieces of derivations where they have substructures in common. A dynamic program combines the relevant weights during training. That gives an exact calculation of the marginal likelihood for the induced grammar without enumerating all its complete derivations individually or approximating the sum by keeping a beam of candidates.

In use, the parser searches for the highest-scoring derivation with a CKY-like chart procedure. Training sums over alternative derivations of a target, while the stated decoding procedure selects a single derivation and takes its associated target. The target is returned if it can itself be derived under a context-free grammar specifying valid constructions for the task. The source-side grammar supplies the candidate mappings, the scorer chooses a derivation, and the target-side check enforces formal validity. Correct interpretation still depends on the mapping chosen for the question.

#### Train the fallback separately

T5 is a pretrained text-to-text system based on the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). The authors use [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) to adapt it to the paired examples for each task. Its output is generated directly as a sequence. The hybrid’s decision rule is fixed at inference. An output from NQG takes precedence, and T5 supplies the answer if NQG returns no output. The components train separately, and the decision uses the presence of a grammar output as its signal. A wrong grammar answer can therefore displace a correct T5 answer, just as a correct grammar answer can replace a wrong one.

The paper uses the same hyper-parameter settings across the splits of a given dataset and reports limited tuning on random partitions of the GeoQuery and Spider training data. For T5 the chosen learning rate is `1e−4`, with fine-tuning lasting `3,000` steps on GeoQuery and `10,000` on Spider. The NQG scorer uses BERT Tiny on SCAN and Spider and BERT Base on GeoQuery. The encoder’s pretrained parameters are updated during training. The scorer is fine-tuned for `256` steps with a batch size of `256` and a learning rate of `1e−4`. These stages train a contextual scorer for a fixed induced grammar on one branch and adapt a direct string generator on the other.

### Experiments and results

#### SCAN and GeoQuery test different sources of difficulty

SCAN and GeoQuery are the main comparison because both are closed-domain tasks with comparatively straightforward target syntax, while their input sentences have different origins. SCAN provides synthetic commands and action sequences. The authors use its length split, the primitive tests for `jump` and `turn left`, and its MCD evaluation. These tests ask a parser to extend to longer examples, combine a primitive with constructions seen elsewhere, or handle a shift in the distribution of compounds. SCAN needs no dataset-specific preprocessing for the proposed approach.

GeoQuery contains people’s questions about US geography. The authors use variable-free FunQL, meaning that the formal queries use nested operations without explicit variables for intermediate results. They expand some functions into forms that make the operations more explicit. For instance, a construction for states neighboring states is expressed using an intersection of the set of states with the result of the neighboring operation. The authors replace entity mentions on both sides of an example with placeholders such as `m0` and `m1`. That allows the experiment to focus on operations and their composition while holding down variation due solely to the names of entities.

In addition to the standard GeoQuery split, the authors construct a query-length split and a TMCD split, each with 440 training and 440 test examples. They construct a separate template split with 441 training and 439 test examples. Building the template split directly for FunQL matters because reusing a partition designed around SQL templates could place the same FunQL template on both sides after conversion. The three compositional splits expose different kinds of change even though they draw on the same corpus.

The metric for SCAN and GeoQuery is exact-match accuracy. A prediction scores as correct when its target string matches the reference, and an unanswered example counts as incorrect when NQG is evaluated alone. The latter convention keeps overall accuracy distinct from precision on the subset the grammar handles. On GeoQuery the authors report means over 3 runs for the grammar-based comparison. They also present run variability, with a shared fine-tuned T5 checkpoint in the hybrid runs. Thus the variation reported for those hybrid runs covers the varying part of the setup while holding the fallback checkpoint fixed.

#### Comparison systems and the overall result

The central comparison includes direct T5 prediction, the standalone NQG parser, the hybrid, and two earlier approaches developed for SCAN, Syntactic Attention and CGPS. T5 and the hybrid are examined with Base and 3B versions of the fallback. The paper gives 220 million parameters for T5-Base and 3 billion for T5-3B. The authors selected Syntactic Attention and CGPS because available implementations and the absence of required task-specific resources made it feasible to evaluate them on the new splits. For SCAN, the paper draws on previously reported results for these systems and for T5.

Additional comparisons give context, with some differences in setup. LANE and NSSM are specialized approaches associated with strong SCAN performance. At the time of the study the authors describe LANE’s code as tailored to SCAN and NSSM’s code as unavailable. GECA is a data augmentation method whose reported GeoQuery setting uses Prolog logical forms and retains entity names. Its results reflect both the additional examples and the parser trained on them. SpanBasedSP adds program-level supervision in SCAN preprocessing and uses a somewhat different GeoQuery setup. These comparisons are informative about the range of approaches, while their conditions matter when interpreting the scores.

The overall ranking summarizes consistency across the chosen SCAN and GeoQuery evaluations. The paper reports an average rank of 1.0 for NQG-T5 and 2.9 for T5, the highest-ranked previous approach, among 5 approaches across 8 evaluations.

Average rank across the SCAN and GeoQuery evaluations NQG-T5 ranks ahead of the strongest earlier approach across the evaluation suite.

**The numbers**

| System or setting | Average rank |
| --- | --- |
| T5 | 2.9 |
| NQG-T5 (this paper) | 1.0 |

The rank pools results from very different tests. Its value is that it shows how consistently an approach compares with the others across the suite. The paper also reports that ordering on compositional SCAN tests was a poor guide to ordering on compositional GeoQuery tests. On the length challenge, it describes the earlier specialized approach as ahead of T5 on SCAN and behind T5 on GeoQuery. On the compound-divergence evaluations, much of the ordering also changes between the datasets. The upshot for interpreting the aggregate rank is that the suite rewards results across tests whose difficulty falls in different places.

On the standard GeoQuery split, the authors regard both T5 and the hybrid as reaching what they believe to be the best published accuracy for that setting. They also compare exact match with denotation accuracy, which measures whether the predicted query gives the correct answer when interpreted. The hybrid’s denotation accuracy on standard GeoQuery is 2.1 points higher than its exact-match accuracy there. This is a comparison of metrics for the same system and split. It helps explain how a comparison with SpanBasedSP, which reports denotation accuracy on GeoQuery, can depend on the chosen measure as well as on preprocessing.

#### Spider separates familiar databases from unfamiliar ones

Spider presents a distinct parsing problem. Its targets are SQL queries, and an answer has to identify the appropriate tables and columns as well as assemble the query. According to reports, the full corpus spans 138 domains and includes 10,181 questions along with 5,693 distinct SQL queries. Its regular cross-database evaluation places examples involving unseen databases in the test set. The paper calls that setting Spider-XSP. Here the names and organization of the relevant tables and columns can differ from those encountered in training, so generalization to schemas is a major part of the task.

For the paper’s primary compositional tests on Spider, the authors share databases between training and test and call this setting Spider-SSP. They use examples from the original training portion for databases with more than 50 examples, retaining 51 databases. This selection gives the training sets more opportunity to include references to table and column names. The random, source-length and TMCD splits each contain 3,282 training examples and 1,094 test examples. A template split, obtained by anonymizing integers and quoted strings, contains 3,280 training examples and 1,096 test examples. The source-length split sorts by the length of the question, a different choice from GeoQuery’s query-length test.

The authors prepend the target database name to questions. For T5 they also append the schema in text form, including the names of tables and their columns. The maximum T5 source length is 512, and schema truncation affects about 5% of training examples. The paper includes a T5-Base comparison that omits the appended schema string. This input comparison addresses the provision of database information, whereas the choice among random, length, template and TMCD splits changes which questions and SQL targets are available for training.

The reported Spider metric is exact set match without values, the standard measure used by the benchmark. It assesses the predicted SQL structure under Spider’s comparison procedure while leaving out literal values. This differs from the target-string match used for GeoQuery and SCAN. An accuracy result under that metric concerns the match Spider defines, with literal-value prediction outside its scope.

NQG’s grammar provides little coverage on Spider, and NQG-T5 stays competitive with T5 by using the fallback on questions for which the grammar has no output. In Spider-XSP, the authors found T5-3B competitive with then-leading approaches that operated with table and column names and lacked further access to database contents. The hybrid is competitive there for the same practical reason as on Spider-SSP. The fallback can supply a prediction even when the induced grammar contributes very little. The cross-database comparison thus demonstrates how the combined system behaves when one component is rarely usable, alongside the separate compositional tests on shared databases.

### What the ablations show

#### Compare the components where the grammar can answer

The most revealing comparison treats the standalone components and the hybrid as systems with different opportunities to make a correct prediction. NQG can abstain by returning no output, so the authors report its coverage, the fraction of examples it answers, and its precision, the fraction of those answers that are correct. T5’s correctness on that same subset is the relevant comparison for understanding the hybrid. Overall T5 accuracy also reflects the questions outside the grammar’s coverage, and predictions on those questions are identical in the hybrid and T5 under the stated decision rule.

This gives a direct interpretation of the component results. On covered examples, NQG helps when it corrects a T5 error and hurts when it replaces a correct T5 output with a wrong answer. When both produce a correct answer or both fail, taking the grammar result leaves accuracy unchanged on that example. The precision comparison on the covered subset captures the balance of those cases. Coverage tells how much of the test set is exposed to that balance. A grammar can be highly precise and still make little difference overall if it rarely has a usable interpretation.

This pattern explains why the GeoQuery and Spider results have different implications for the hybrid. On GeoQuery, the grammar can compose useful target fragments for a portion of the questions and is often accurate where it has coverage. On Spider, coverage is much poorer, and reliance on T5 accounts for the hybrid’s competitiveness. The authors inspect the induced SQL rules and find that many capture substitutions of table names, column names or values. The rules less frequently represent nested pieces of the query that would generalize across questions. The paper also notes that identity rules can make the induced Spider grammar larger than the dataset. A large inventory can contain many useful local substitutions and still offer few ways to construct a complete target for a new question.

The authors suggest an explanation in the correspondence between input and output spans. A FunQL operation and its argument can often be expressed as nested target fragments linked to recognizable pieces of the question. SQL may require information associated with one phrase to be coordinated across separate clauses. A QCFG can express some reuse, including repeating a linked target fragment, but the authors’ inspection indicates that productive nested rules were harder to obtain for SQL. They mention SemQL as an intermediate representation that might make the source and target structures correspond more closely. That explanation is based on the learned grammars and the structure of the task. The paper leaves a controlled representation change for future investigation.

#### Compare what the splits hold out

The authors compare splits using compound divergence, the incidence of unseen target atoms and T5-Base accuracy. GeoQuery’s TMCD split is substantially harder for T5-Base than the template split. For Spider, the template and TMCD splits present comparable overall difficulty to T5-Base. The two datasets make clear why forbidding shared full templates and shifting the distribution of compounds are different interventions. A new template can be made from familiar local structures. A change in the compound distribution can also disrupt the use of familiar structures across many examples at once.

Template splitting can introduce a further demand because it has no explicit requirement that every test atom occur in training. On Spider’s template test, 30.3% of examples contain an atom that the training set never shows. T5-Base’s exact set match without values is 53.9% on that subset and 61.6% on the remaining test examples. This is a comparison of existing subgroups within the test split. It supports the authors’ suggestion that unfamiliar atoms contribute to template-split difficulty, while other aspects of those questions or queries can differ between the subgroups as well.

T5-Base exact set match without values on the Spider-SSP template test T5-Base scores higher on queries whose atoms all appeared in training.

**The numbers**

| System or setting | Exact set match without values % |
| --- | --- |
| Examples with an unseen atom | 53.9 |
| Examples with all atoms seen in training (this paper) | 61.6 |

Length splits bring out a more recognizable pattern. The authors observe that T5 generally produces test outputs near the range of lengths it saw during training, even where the test task calls for longer outputs. No matter how much of the query is generated correctly, this behavior can keep the full query from matching exactly. The paper relates this observation to earlier work on predicting the end of a sequence. It presents the length result as a diagnostic pattern and treats the more varied errors on compound-divergence splits as harder to account for with a single output property.

#### Inspect where T5 first goes wrong

For GeoQuery TMCD, the authors compare T5-Base’s mistakes with the statistics of correct targets in training. In 52 of the 201 wrong predictions, or 26%, the first incorrect symbol occurs where the correct symbol has probability `0` according to a trigram predictor fitted to the training targets. A trigram is an [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) of length three. Here the diagnostic uses the local context of the preceding symbols to assess whether the correct continuation is supported by combinations found in the training queries. It gives one way to identify a locally unfamiliar continuation at the exact point a prediction first diverges from the reference.

The trigram predictor is an external diagnostic. Its zero probability describes the statistics of the training sequences under that predictor. The authors interpret the overlap with T5 errors as evidence consistent with excessive reliance on familiar target sequences during generation. A target may consist of known FunQL symbols, yet the next symbol required in a particular context can still be unfamiliar as a continuation. TMCD can therefore confront the decoder with a new local pattern while satisfying its constraint that every atom occur somewhere in training.

The authors also find that in 53% of the wrong T5-Base predictions on GeoQuery TMCD, the reference target contains an atom seen in only 1 training example. This observation concerns the amount of evidence available about an individual symbol. An atom’s presence in training establishes that the system has encountered it, while its frequency affects how many opportunities the system has to associate that symbol with useful contexts. The rare-atom and trigram findings can apply to the same wrong prediction. Other inspected errors led the authors to suggest that the system sometimes relied on accidental associations between the input and output. The analysis offers several plausible sources of failure, with their evidence tied to particular observed mistakes.

### Limitations

#### Limits the authors identify

NQG needs exact lexical overlap with the induced rule patterns to produce a derivation. A question can express a familiar operation in wording for which the grammar has no suitable expansion. The contextual scorer helps choose among available derivations, but a score can only be assigned to a rule application the grammar permits. When the necessary mapping falls outside that inventory, the hybrid’s accuracy depends on T5. This is a consequential limitation precisely because unfamiliar wording and unfamiliar composition can occur in the same example.

The authors distinguish the expressiveness of the grammar from the quality of the induced rule inventory. The QCFG formalism, as used here, has no direct relation for grouping source expressions by semantic similarity. It also has no direct way to recognize target equivalence, such as switching the arguments to an intersection whose result stays the same. Explicit support for these relations could give a parser more ways to reuse what it has learned, but the authors point out that richer formalisms bring additional costs in learning and inference. A more flexible grammar would still need a tractable search procedure.

Greedy induction is another limit the authors state. The search acts on locally useful rule changes, and the estimated description length uses a sample when examining part of a candidate’s cost. The availability of reusable rules therefore depends on which candidates the procedure considers and which path it takes through the possible grammars. Failure to cover a test input reflects the grammar learned by this particular procedure. The experiments leave open how much coverage a stronger search using the same formalism could recover.

The authors evaluate English datasets only. The results therefore concern variation within those datasets, including the wording of the human-collected questions used in GeoQuery and Spider. Whether the approach helps with languages poorly represented in training remains open. The authors also identify the cost of adapting and running larger versions of T5. For GeoQuery, fine-tuning T5 takes about 5 hours for Base and 37 hours for 3B on the reported setup of 32 Cloud TPU v3 cores. For Spider, the corresponding times are about 5 and 77 hours. The paper uses existing pretrained releases. It also reports that the Base hybrid is comparable to or stronger than T5-3B on the non-SQL tasks, so the size of the fallback is relevant when comparing the computational demands of approaches.

#### Limits of what the comparisons establish

TMCD defines novelty through the target representation chosen for the corpus. A FunQL parent–child pattern is evidence of structural composition under that definition, and a SQL tree supplies a different unit of structural evidence. The divergence score concerns the distribution of these chosen compounds. It gives no direct measurement of paraphrase diversity, the novelty of an individual question’s wording or the kinds of real-world requests a dataset omits. The study combines human wording with an engineered shift in targets, which is a particular test of the two abilities the authors want to study together.

The requirement that each atom appear at least once also limits what can be inferred from a TMCD result. The rare-atom finding shows that nominal familiarity can come with very little usable evidence. The split can test composition at the level of the chosen compounds while making some of their parts hard to learn from the examples available. The authors’ comparison with template splits clarifies the distinction between rare and absent atoms. It leaves open how performance would change if training guaranteed more examples per atom or if atoms and compounds were defined at a different level of abstraction.

The scores reflect different notions of correctness across the datasets. Exact match on GeoQuery can penalize a query whose result agrees with the gold query, as the denotation comparison illustrates. Spider’s exact set match without values omits literal values by design. As a result, neither metric by itself establishes that a parser is reliable on every aspect of answering a database question. The aggregate rank summarizes relative performance on the chosen suite. It does not express the size of the gap between systems on each test, or the expected frequency of these tests’ error conditions in an application.

The two branches also receive different forms of help in the Spider setup. T5 can use an appended schema description, and the grammar induction branch operates with the database name prepended to the question. The same-database and cross-database results answer different questions, and the evidence offered for the grammar’s difficulty comes from this particular representation and input setup. A controlled comparison that changed the SQL representation or the information supplied to the grammar would address a narrower causal question. The paper establishes that the learned grammar had poor coverage in the tested configuration and that the hybrid remained competitive by falling back to T5.

### What came after

The citing work extends the subject in several directions, including how to choose examples, how to expose intermediate structure and how to evaluate systems that query databases. A citation establishes a connection to the paper. Claims about reusing its splits, implementing NQG or obtaining gains on the same tests require details of the later experiments. The connections below concern the methodological focus of the citing works, with a more direct comparison available for the span-based parser that the authors also discuss.

#### Composition through decomposition and examples

*Least-to-most prompting* approaches complex reasoning by breaking a problem into simpler steps and working up to the whole. This connects to the paper’s interest in transferring familiar operations into a new combination. NQG composes through recurring rules learned from paired strings, while least-to-most prompting places the decomposition in the process of answering a question. The relevant link is the role of intermediate steps in making the overall construction possible. [Least-to-most Prompting](https://md.research.elamur.ai/free/en/papers/al-2022-least-most-prompting-enables-complex/)

*Diverse Demonstrations* addresses in-context compositional generalization through the examples supplied with a request. This shifts attention to which combinations are illustrated when the system makes a prediction. The paper’s distinction between atoms and compounds helps frame why a set of demonstrations may be informative even when none has the full structure of the test example. *Compositional Exemplars* addresses the related question of how examples for in-context learning can serve a compositional task. Both works put example selection alongside the original paper’s question of what happens when a test requires a new arrangement of known pieces. [Diverse Demonstrations](https://md.research.elamur.ai/free/en/papers/levy-2023-diverse-demonstrations-improve-context-compositional/) · [Compositional Exemplars](https://md.research.elamur.ai/free/en/papers/ye-2023-compositional-exemplars-context-learning/)

*Improving Compositional Generalization with Latent Structure and Data Augmentation* brings together hidden structure and the construction of additional examples. In NQG, the hidden structure is the derivation connecting an observed question and its target, and the grammar determines how parts can be recombined at prediction time. Data augmentation addresses a related problem through the evidence available to a learner during training. The citing work’s focus connects ways of representing composition with ways of exposing the learner to it. [Improving Compositional Generalization with Latent Structure and Data Augmentation](https://md.research.elamur.ai/free/en/papers/qiu-2022-improving-compositional-generalization-latent-structure/)

#### Structure and evaluation in database queries

*RESDSQL* separates schema linking from parsing the skeleton of a SQL query. Schema linking concerns which tables or columns a question refers to. The skeleton concerns the broad structure of the query to be constructed. The distinction recalls the paper’s observation that induced Spider rules often learned substitutions for database names and values while providing less support for assembling larger SQL structures. RESDSQL makes that division of labor part of its approach to the task. [RESDSQL](https://md.research.elamur.ai/free/en/papers/li-2023-resdsql-decoupling-schema-linking-skeleton/)

*UnifiedSKG* studies structured knowledge grounding through a unified text-to-text treatment of multiple tasks. Its connection to the paper lies on the side of general-purpose text-to-text prediction. NQG-T5 uses such prediction as a fallback within individual parsing tasks. UnifiedSKG makes a shared interface across structured grounding tasks its focus. A separate citing work asks whether a system can already serve as a database interface and frames the question through a large benchmark for database-grounded text-to-SQL. This carries forward the paper’s concern that claims about semantic parsing abilities depend on the conditions in which database questions are evaluated. [UnifiedSKG](https://md.research.elamur.ai/free/en/papers/xie-2022-unifiedskg-unifying-multi-tasking-structured/) · [BIg Bench for Database-Grounded Text-to-SQL](https://md.research.elamur.ai/free/en/papers/li-2023-llm-already-serve-database-interface/)

*Span-based Semantic Parsing for Compositional Generalization* is a closely related case because the paper already compares against its approach. It assembles interpretations over spans and reports results on SCAN and on standard and template evaluations of GeoQuery. As the authors describe it, its SCAN setup adds supervision at the program level, and its GeoQuery comparison uses a different preprocessing and scoring setup. It shares the goal of carrying a structured parser from synthetic commands to human questions. The direct comparison illustrates why shared benchmark names alone leave important details unresolved when judging how well different uses of structure transfer. [Span-based Semantic Parsing for Compositional Generalization](https://md.research.elamur.ai/free/en/papers/herzig-2021-span-based-semantic-parsing-compositional/)

## Cite

Cite as Peter Shaw, Ming-Wei Chang, Panupong Pasupat and Kristina Toutanova. 2021. Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.acl-long.75](https://doi.org/10.18653/v1/2021.acl-long.75) · [arXiv 2010.12725](https://arxiv.org/abs/2010.12725)

```bibtex
@inproceedings{shaw2021compositional,
  title = {{Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?}},
  author = {Peter Shaw, Ming-Wei Chang, Panupong Pasupat and Kristina Toutanova},
  booktitle = {Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.75},
  eprint = {2010.12725},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/2021.acl-long.75}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
