Abstract
While recurrent neural networks (RNNs) demonstrate impressive performance across various sequence-to-sequence tasks, their ability to perform systematic compositionality remains a subject of intense scrutiny. This paper investigates whether standard RNN architectures can recombine familiar words into novel, predictable patterns. Using the SCAN dataset, we demonstrate that even when every word in a command is highly familiar, models fail to generalize to new structural combinations unless they have seen those specific patterns during training. Our findings suggest that RNNs perform sophisticated pattern matching rather than learning abstract algebraic rules.
Introduction: The Challenge of Compositionality
Human language is inherently compositional. A person who understands the command "run" and the modifier "slowly" can immediately comprehend "run slowly," even if they have never encountered that specific phrase. This algebraic capacity allows for infinite generalization from finite data.
Previous research has shown that sequence-to-sequence (seq2seq) models struggle when introduced to entirely new words. This study asks a more fundamental question: Do RNNs fail because they cannot learn new embeddings quickly, or is there a deeper flaw in how they handle the composition of familiar elements? The authors test this by evaluating if models can recombine highly familiar words in novel ways.
Experimental Methodology
The authors employ a standard, high-performing seq2seq architecture: a 2-layer, 200-unit Long Short-Term Memory (LSTM) network with dropout. The model is tasked with translating natural language commands into discrete action sequences within the SCAN (Simplified Command ActioN) environment.
The core of the experimental design involves creating "systematic gaps" in the training data. For instance, a model might be trained on "jump left" and "walk around right" but tested on "jump around right." In this setup, the model is familiar with all individual components (the verb "jump," the direction "right," and the modifier "around") but has never seen them in this specific configuration.
The SCAN Dataset
SCAN consists of 20,910 commands generated by a phrase-structure grammar across 12 base templates.
- Input: Commands like "turn right twice and jump around left."
- Output: Corresponding action sequences, such as
RTURN RTURN JUMP LTURN JUMP LTURN JUMP LTURN JUMP LTURN.
Key Insights: Pattern Matching vs. Rule Induction
The experiments reveal several critical insights into how RNNs process language:
- Template Dependency: Failure is primarily linked to structural templates rather than individual words. If a model has not seen a specific template (e.g.,
[Verb] around right) during training, it cannot infer its meaning through symmetry with other known templates (like[Verb] around left). - The Role of Fillers: Generalization success depends on the variety of "fillers" (verbs) seen within a template during training.
- Gradual Learning: Accuracy does not "click" into place as it might with the discovery of a logical rule. Instead, performance improves incrementally as more examples are provided, suggesting the network accumulates evidence for patterns rather than inducing abstract rules.
- Lack of Automatic Symmetry: RNNs do not automatically internalize geometric symmetries, such as the relationship between "left" and "right," which humans find intuitive.
Results and Discussion
The results highlight a significant gap between human-like generalization and RNN performance. In zero-shot scenarios where the model had to generalize to "jump around right" without prior exposure to the "around right" template, accuracy was near zero.
As shown in the table above, performance varies drastically based on the condition:
- High Generalization: When the model saw other verbs used with "around right" (e.g., "walk around right"), it achieved 98.43% accuracy on "jump around right."
- Low Generalization: Generalizing from "around left" to the simplest usage of "right" (the "Primitive right" condition) resulted in only 23.49% accuracy.
- Complex Failure: The "Primitive around right" condition, which requires inferring a complex modifier for a specific direction, saw a dismal 2.46% accuracy.
Furthermore, the models are remarkably data-hungry. To reach approximately 70% accuracy on a novel template, the model required roughly 64 distinct examples of that template, peaking only after 512 examples.
Conclusion and Future Work
This study demonstrates that standard LSTMs lack the inherent systematicity required for human-like compositional generalization. While they are powerful pattern matchers, they struggle to bridge structural gaps without extensive direct evidence. Future research should investigate architectural priors or training signals that could endow seq2seq models with systematicity, and evaluate if Transformer architectures handle these systematic gaps more effectively.
Summary updated