On the "Induction Bias" in Sequence Models
Organizations: Qualcomm AI Research is an initiative of Qualcomm Technologies, Inc.
Abstract
Despite the remarkable practical success of transformer-based language models, recent work has raised concerns about their ability to perform state tracking. In particular, a growing body of literature has shown this limitation primarily through failures in out-of-distribution (OOD) generalization, such as length extrapolation. In this work, we shift attention to the in-distribution implications of these limitations. We conduct a large-scale experimental study of the data efficiency of transformers and recurrent neural networks (RNNs) across multiple supervision regimes. We find that the amount of training data required by transformers grows much more rapidly with state-space size and sequence length than for RNNs. Furthermore, we analyze the extent to which learned state-tracking mechanisms are shared across different sequence lengths. We show that transformers exhibit negligible or even detrimental weight sharing across lengths, indicating that they learn length-specific solutions in isolation. In contrast, recurrent models exhibit effective amortized learning by sharing weights across lengths, allowing data from one sequence length to improve performance on others. Together, these results demonstrate that state tracking remains a fundamental challenge for transformers, even when training and evaluation distributions match.
Figures & tables
| Fixed | Uniform | Short-to-Long | ||||||||||||
| Length | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | ||
| Model | Format | Modulus | ||||||||||||
| Transformer | Outcome Supervision | 2 | 19 | 364 | – | – | 37 | 549 | – | – | 45 | 913 | – | – |
| 3 | 119 | – | – | – | – | – | – | – | 243 | – | – | – | ||
| 5 | 1.1K | – | – | – | 2.6K | – | – | – | 1.5K | – | – | – | ||
| 10 | – | – | – | – | – | – | – | – | – | – | – | – | ||
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Fixed | Uniform | Short-to-Long | ||||||||||||
| Length | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | ||
| Model | Format | Modulus | ||||||||||||
| Transformer | Outcome Supervision | 2 | 0.00 | 0.00 | 0.01 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| 3 | 0.01 | 0.00 | 0.01 | 0.00 | 0.00 | 0.04 | 0.00 | 0.00 | 0.00 | 0.03 | 0.00 | 0.00 | ||
| 5 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.03 | 0.01 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||
| 10 | 0.00 | 0.02 | 0.00 | 0.00 | 0.00 | 0.00 | 0.01 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | ||
| Fixed | Uniform | Short-to-Long | ||||||||||||
| Length | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | ||
| Model | Format | Modulus | ||||||||||||
| LSTM Dim | Outcome Supervision | 2 | 14 | 202 | 257 | 413 | 26 | 34 | 67 | 109 | 12 | 13 | 26 | 16 |
| 3 | 151 | 620 | – | – | 84 | 122 | 317 | 686 | 81 | 180 | 132 | 178 | ||
| 5 | 1.3K | 6.7K | – | – | 487 | 876 | – | – | 788 | 1.4K | – | – | ||
| 10 | 6.3K | – | – | – | 3.4K | – | – | – | 5.1K | – | – | – | ||
| Fixed | Uniform | Short-to-Long | ||||||||||||
| Length | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | 5 | 10 | 20 | 30 | ||
| Model | Format | Modulus | ||||||||||||
| Transformer Layers | Outcome Supervision | 2 | – | 594 | – | – | 48 | 807 | – | – | 48 | 971 | – | – |
| 3 | 134 | – | – | – | – | – | – | – | – | – | – | – | ||
| 5 | 1.5K | – | – | – | 1.7K | – | – | – | – | – | – | – | ||
| 10 | – | – | – | – | – | – | – | – | – | – | – | – | ||
Transformer
Transformers are neural architectures that use attention to model relationships among sequence elements in language, vision, and scientific data.
See all 528 papers