Source-linked AI summary

Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks

Brenden M. Lake, Marco Baroni

arXiv:1711.00350v3cs.CLcs.AIcs.LG

TL;DR

The paper asks whether recurrent seq2seq networks can achieve the systematic compositionality that lets humans generalize rules to novel combinations. It introduces SCAN, a controlled navigation-command benchmark, and evaluates recurrent models on zero-shot generalization. Models succeed when train-test differences support mix-and-match strategies but fail dramatically when systematic rule application is required, with a proof-of-concept suggesting the issue may extend to machine translation.

  • Problem

    The paper investigates whether recurrent neural networks can capture human-like systematic compositionality rather than relying on associative pattern matching.

  • Method

    The authors introduce SCAN and evaluate recurrent seq2seq architectures on zero-shot generalization from compositional navigation commands to action sequences.

  • Results

    Recurrent networks generalize well when novel commands mix trained constructions, but systematic generalization remains poor; with 32 composed commands observed during training, accuracy reached 88.4%.

  • Takeaways & Limitations

    The results suggest that current seq2seq models are missing the ability to extract and apply systematic rules from training data.

  • Takeaways & Limitations

    The study focuses on recurrent seq2seq models and leaves convolutional seq2seq architectures for future work.

Abstract

from arXiv · show

Humans can understand and produce new utterances effortlessly, thanks to their compositional skills. Once a person learns the meaning of a new verb "dax," he or she can immediately understand the meaning of "dax twice" or "sing and dax." In this paper, we introduce the SCAN domain, consisting of a set of simple compositional navigation commands paired with the corresponding action sequences. We then test the zero-shot generalization capabilities of a variety of recurrent neural networks (RNNs) trained on SCAN with sequence-to-sequence methods. We find that RNNs can make successful zero-shot generalizations when the differences between training and test commands are small, so that they can apply "mix-and-match" strategies to solve the task. However, when generalization requires systematic compositional skills (as in the "dax" example above), RNNs fail spectacularly. We conclude with a proof-of-concept experiment in neural machine translation, suggesting that lack of systematicity might be partially responsible for neural networks' notorious training data thirst.

1. Introduction

The paper examines whether recurrent neural networks can reproduce humans’ systematic compositionality, especially when generalization requires applying learned rules to novel combinations. SCAN provides a controlled test of this ability, motivated by the contrast between strong practical generalization and neural networks’ sample inefficiency.

  • Motivation: Human systematic compositionality supports understanding and producing potentially infinite novel combinations from known components.The paper illustrates this with learning a new verb and immediately composing it with familiar operators such as “twice” and “and.”
  • Motivation: Neural networks have been criticized as implausible models of the mind because associative mechanisms may not capture systematic compositionality.The paper situates this criticism in influential arguments by Fodor, Pylyshyn, Marcus, and others.
  • Motivation: End-to-end recurrent networks achieve strong generalization in machine translation, despite most sentences or word sequences occurring only once.This practical success suggests substantial generalization, while the paper notes that neural networks are nevertheless commonly observed to be highly sample inefficient.
  • Paper approach: SCAN tests recurrent architectures by translating simplified navigation commands into action sequences, enabling controlled evaluation of compositional generalization.The authors report good generalization when test commands mix constructions seen during training, but catastrophic failure when training-test differences require systematic rules.

2. The SCAN tasks

SCAN is a supervised semantic-parsing benchmark whose grammar generates unambiguous navigation commands and corresponding action sequences. Its compositional structure supports zero-shot tests in which familiar modifiers and operators must be applied to novel primitives or combinations.

  • Dataset and task: SCAN is a simplified CommAI Navigation dataset in which each natural-language command maps unambiguously to one action sequence.This makes the task a supervised sequence-to-sequence semantic-parsing problem with command words as inputs and available actions as outputs.
  • Grammar: The SCAN grammar combines primitive actions such as JUMP, WALK, and LTURN with modifiers and conjunctions that compositionally build action sequences.Directional modifiers transform undirected primitive commands into directed counterparts, while other constructions express sequential or repeated actions.
  • Dataset and task: The benchmark contains 13 input words, 6 output actions, and 20,910 unambiguous commands generated by a finite nonrecursive grammar.The grammar’s interpretation function defines the action sequence associated with each command.
  • Generalization tests: SCAN supports zero-shot tests such as applying meanings learned for “after,” “twice,” and “around left” to a primitive command unseen in training.A learner could therefore decode “jump around left after jump twice” after seeing the relevant constructions with other verbs.

3. Models and setup

The study applies recurrent encoder-decoder seq2seq models to SCAN, comparing standard architectures and attention mechanisms under controlled training and zero-shot evaluation. Models achieve very high training accuracy, allowing the experiments to probe generalization rather than basic fitting.

  • Seq2seq framework: The seq2seq system encodes each command into a representation, then decodes the corresponding action sequence while backpropagation updates both recurrent networks.The encoder processes the input word-by-word; the decoder generates actions sequentially and is trained against the ground truth.
  • Models: The evaluation compares SRNs, LSTMs, and GRUs, each tested with and without Bahdanau-style attention.The authors use a broad architecture comparison and focus detailed analyses on the overall-best model selected through hyperparameter search.
  • Scope and implementation: The study focuses on recurrent seq2seq models, while convolutional seq2seq networks are left for future work despite comparable or superior machine-translation performance.A small number of runs also failed to complete, so not every network received five runs.
  • Training and evaluation: Training uses 100,000 trials with ADAM, gradient clipping, and two strategies for feeding decoder outputs back into subsequent steps.The experiments train on background commands and evaluate new commands requiring zero-shot compositional extrapolation.
  • Training and evaluation: Training accuracy exceeded 99.5% for the overall-best network in each key experiment and reached at least 95% for experiment-level top performers.Thus, the setup provides high training performance while assessing whether models generalize beyond the commands they observed.

4. Experiments

Across SCAN experiments, recurrent networks generalized well when test commands recombined familiar pieces, but struggled when systematic compositionality or unseen sequence lengths were required. Adding composed examples improved “jump” generalization, while a machine-translation test showed similarly poor generalization for a newly introduced word.

  • Experiment 4: Compositionality in machine translation: 99.8% correct was achieved by the top-performing network in the machine-translation generalization experiment, while adding “daxy” yielded only 1/8 correct translations.The translation result was highly successful overall, but systematic generalization to constructions containing a new word remained poor.
  • Unseen sequence lengths: Generalization to unseen action-sequence lengths was very challenging: the overall-best model achieved 13.8% accuracy, with success concentrated at the shortest test lengths.The model generalized mainly to cases most similar to training instances, including some long commands whose action sequences were short relative to other commands.
  • Representation analysis: The network’s “jump” representations failed to capture their similarity to commands from the fully composed paradigms because “jump” had a different training distribution.The representation analysis compared isolated “jump” training with compositionally trained primitives such as “run.”
  • Composed “jump” training: With 8 composed “jump” commands in training, accuracy reached 38.3%; it rose to 77.8% with 16 and 88.4% with 32 commands.These results show that recurrent networks can generalize powerfully, but require more positive examples rather than exhibiting all-or-nothing systematic behavior.

5. Discussion

The discussion presents a mixed picture: recurrent seq2seq models can make powerful zero-shot generalizations, but fail when success requires extracting systematic rules. The authors argue that rule-learning mechanisms and more structured architectures are promising directions, while noting that proposed solutions may remain task-specific.

  • Discussion of results: Standard recurrent models can reach very high zero-shot accuracy from relatively few examples, but fail spectacularly when train-test generalization depends on systematic rules.The positive and negative results together produce the paper’s central mixed conclusion about modern seq2seq models.
  • Discussion of results: The failures persist even when training data provide enough evidence to learn the composition rules needed for the test generalizations.Experiments 2 and 3 include the relevant modifiers, connectives, and combinations, yet models still fail on systematically novel applications.
  • Interpretation: The authors propose that current models need to extract systematic rules and operate in “rule space” rather than rely on shallower statistical patterns.They illustrate rules such as translate(x and y) = translate(x) translate(y) and translate(x twice) = translate(x) translate(x).
  • Future directions: Suggested remedies include learning across related environments, adding modular functions for primitives and modifiers, and using structured memory such as differentiable stacks or tapes.These approaches are presented as non-mutually exclusive avenues for encouraging abstract rule learning.
  • Limitations and scope: The proposed approaches may solve SCAN specifically without providing a general solution for sequence-to-sequence problems.The authors explicitly leave open whether any proposed method achieves truly general systematicity.
  • Broader implications: A proof-of-concept translation experiment suggests that systematicity limitations may contribute to neural networks’ need for very large training sets.The paper connects this possibility to potential benefits for machine translation, language modeling, and related applications.

Supplementary materials

The supplementary materials specify SCAN’s phrase-structure grammar and interpretation functions, alongside standard and attention-based encoder–decoder RNN formulations.

  • Supplementary materials: In the standard encoder–decoder, an RNN encodes input words into hidden states, passes the final state to the decoder, and generates actions sequentially.
  • Supplementary materials: The attention decoder instead accesses all encoder hidden states through a weighted context vector at each output step.
  • Supplementary materials: The grammar and interpretation rules operationalize primitive commands, modifiers, conjunctions, and action-sequence composition in SCAN.
  • Supplementary materials: Figure 6 defines the phrase-structure grammar that generates SCAN commands, using indexed dominated elements to support infixing.
  • Supplementary materials: Figure 7 defines the interpretation function that maps linguistic commands to temporally ordered uppercase action sequences.
Loading 1711.00350v3…