The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalization
Authors:
Preprint
Abstract
Despite progress across a broad range of applications, Transformers have limited success in systematic generalization. The situation is especially frustrating in the case of algorithmic tasks, where they often fail to find intuitive solutions that route relevant information to the right node/operation at the right time in the grid represented by Transformer columns. To facilitate the learning of useful control flow, we propose two modifications to the Transformer architecture, copy gate and geometric attention. Our novel Neural Data Router (NDR) achieves 100% length generalization accuracy on the classic compositional table lookup task, as well as near-perfect accuracy on the simple arithmetic task and a new variant of ListOps testing for generalization across computational depths. NDR's attention and gating patterns tend to be interpretable as an intuitive form of neural routing. Our code is public.Keywords
All Related Versions
This publication has 7 references indexed in Scilit:
- Making Transformers Solve Compositional Tasks2022
- Can Transformers Jump Around Right in Natural Language? Assessing Performance Transfer from SCAN2021
- Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?2021
- Compositionality Decomposed: How do Neural Networks Generalise?Journal of Artificial Intelligence Research, 2020
- Learning Complex, Extended Sequences Using the Principle of History CompressionNeural Computation, 1992
- Connectionism and the problem of systematicity: Why Smolensky's solution doesn't workCognition, 1990
- Connectionism and cognitive architecture: A critical analysisCognition, 1988