NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Compositional generalization through meta sequence-to-sequence learning

Brenden M. Lake

TL;DR

Standard neural networks fail to combine known concepts in novel ways—a skill called compositional generalization. This paper introduces meta sequence-to-sequence (meta seq2seq) learning, a training paradigm that teaches models the procedure of composition, allowing them to achieve near-perfect accuracy on benchmarks where traditional models fail catastrophically.

What Problem Does This Paper Address?

Human language is inherently compositional. If you learn the meaning of a new verb like "to blicket," you immediately understand what it means to "blicket twice" or "blicket slowly."

In contrast, powerful sequence-to-sequence (seq2seq) models—the backbone of modern translation and AI—struggle with this "algebraic" capacity. If a model learns "jump" in isolation and "walk twice" in context, it often fails to understand "jump twice." This lack of systematicity is a classic critique of connectionism. The paper aims to bridge this gap by moving away from static training and toward a "learning to learn" approach.

Methods

The author proposes meta seq2seq learning, which utilizes a memory-augmented neural network trained across a series of "episodes."

Illustration of meta-training and test episodes.
  • The Episode Structure: Instead of training on one massive dataset, the model faces many small, novel seq2seq problems. Each episode contains a support set (examples of input-output pairs, like "dax" $\rightarrow$ RED CIRCLE) and a query set (new inputs the model must translate using the support set as context).
  • Permutation Training: To force the model to use its memory rather than memorizing fixed mappings, the meanings of words are shuffled between episodes. This forces the model to learn the rules of the language (e.g., how "twice" modifies a verb) rather than specific word meanings.
The meta sequence-to-sequence architecture.
  • Architecture:
    • Encoders: Two bidirectional LSTMs (biLSTMs) process the query inputs and the support set (both inputs and outputs).
  • External Memory: A key-value memory stores the representations of the support set.
  • Decoder: An LSTM with attention that "queries" the external memory to produce the output sequence.

Datasets

The paper primarily evaluates the model on the SCAN benchmark, a set of navigation instructions (e.g., "walk twice and look right") that must be translated into action sequences (e.g., "WALK WALK RTURN LOOK").

The author tests several specific "splits" of SCAN:

  1. Add Jump: The model sees "jump" only in isolation during training but must use it compositionally at test time.
  2. Around Right: The model must generalize the concept of "around right" after only seeing "around left."
  3. Length: The model is tested on instructions that require longer action sequences than any seen during training.
  4. Mutual Exclusivity: A synthetic task where the model must infer the meaning of a novel word by process of elimination (a common human cognitive bias).

Key Insights and Ideas

  • Variables as Activations: By using meta-learning, the model learns to treat certain inputs as "variables." It doesn't just learn that "walk" means WALK; it learns a general procedure for mapping any primitive to its corresponding action based on the provided context.
  • Learning the "Absence" of Information: In the mutual exclusivity experiment, the model learned to assign a novel word to a novel meaning simply because that meaning wasn't already "taken" in its memory. This mimics how children learn language.
  • The Importance of Support Loss: The author found that forcing the model to reconstruct the support set (an auxiliary loss) was crucial for teaching it to actually use its external memory effectively.

Key Results

The results on the SCAN benchmark were transformative compared to previous baselines:

Task Split Standard Seq2Seq Meta Seq2Seq (Ours)
Add Jump 0.03% 99.95%
Around Right 0.0% 99.96%
Mutual Exclusivity N/A 100.0%
Length 7.71% 16.64%

While standard models failed completely on the "Add Jump" and "Around Right" tasks, Meta Seq2Seq achieved near-perfect accuracy. It also significantly outperformed "syntactic attention" models (which hit ~78% on Add Jump).

Limitations and Future Work

Despite the success in logic and composition, the Length split remains a major hurdle. The model still struggles to generalize to sequences significantly longer than those it saw during training (only 16.64% accuracy). This suggests that while the model has learned the rules of composition, it hasn't yet mastered the recursion or the "unbounded" nature of long sequences.

The author suggests that future work might involve hybrid neuro-symbolic models—combining the flexibility of neural networks with the rigid, symbolic machinery needed to handle infinite recursion and truly novel symbols.

Summary updated

BibTeX
@inproceedings{lake2019compositional,
  author = {Brenden M. Lake},
  title = {{Compositional generalization through meta sequence-to-sequence learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=u7o6o4V0m9},
}
Figure