Abstract
Current semantic parsing benchmarks like COGS primarily measure lexical generalization, where models learn to use known words in familiar structures. However, they fail to capture structural generalization—the ability to interpret novel syntactic configurations. We introduce SLOG (Structural LOng-distance dependencies Generalization), a benchmark focusing on recursion and long-distance dependencies. Our evaluation shows that while modern Transformers achieve near-perfect scores on lexical tasks, their performance drops significantly on SLOG, often reaching 0% accuracy on complex structures like center embedding.
Introduction: The Generalization Gap
In semantic parsing, the goal is to map natural language to logical forms. While recent advances in Transformer-based models have led to high scores on existing benchmarks, these results are often misleading. Most current benchmarks are biased toward lexical generalization. For instance, a model might learn a new verb in one context and successfully apply it in another familiar sentence structure. This "slot-filling" capability does not necessarily imply a deep understanding of linguistic composition.
The authors argue that the field has neglected structural generalization: the capacity to handle syntactic structures never encountered during training. SLOG is designed to address this by stress-testing models on long-distance dependencies and deep recursion, which are fundamental to human language but challenging for standard neural architectures.
The SLOG Dataset and Methodology
SLOG extends the COGS framework using a Synchronous Context-Free Grammar (SCFG) to generate 17 distinct structural generalization cases. These cases target two primary linguistic phenomena:
- Recursion: Nested phrases that increase in depth.
- Filler-gap dependencies: Structures where a constituent (the filler) is associated with a missing element (the gap) later in the sentence, such as in relative clauses or $wh$-questions.
The dataset includes approximately 33,000 training examples and 17,000 test examples. To ensure fair evaluation, the researchers introduced a reformatted exact-match metric that ignores semantically irrelevant differences like variable naming or conjunct ordering.
Experimental Setup
The study evaluated four model architectures:
- Vanilla Transformer: A standard sequence-to-sequence model trained from scratch.
- T5-base: A pretrained encoder-decoder model.
- LLaMA-7B: A large-scale autoregressive model fine-tuned via LoRA.
- AM-Parser: A structure-aware parser that predicts dependency trees as an intermediate step.
Key Insights and Results
The experiments revealed a stark contrast between lexical and structural performance, termed the "COGS Illusion." Models scoring over 80% on COGS saw their performance halved on SLOG.
The Depth Wall and Center Embedding
Transformers exhibit a "depth wall," where accuracy plummets as recursion depth increases, even when sentence length remains within training bounds. Most notably, all tested Transformers achieved 0% accuracy on center-embedded structures (e.g., "The cat that the dog that the man saw chased ran").
Structure-Awareness vs. Long-Distance Dependencies
The AM-Parser, which explicitly models tree structures, significantly outperformed Transformers, reaching 70.8% overall accuracy. However, it failed completely on non-projective dependencies—cases where dependency lines cross, common in complex $wh$-questions. This suggests that while structural priors help, current implementations still struggle with the full range of human linguistic complexity.
Conclusion
SLOG highlights a critical deficiency in current semantic parsers: the inability to generalize to novel syntactic structures. While pretraining offers some benefits for shallower structural changes, it does not solve the fundamental challenges of deep recursion and long-distance movement. Future research must bridge the gap between the flexible pattern matching of Transformers and the robust structural logic required for true linguistic understanding.
Summary updated