mlsanityData to 7 Oct 2026

How Do Neural Sequence Models Generalize? Local and Global Context Cues for Out-of-Distribution Prediction

arXiv 2111.03108 ↗First posted 4 Nov 2021cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

After a neural sequence model encounters an unexpected token, can its behavior be predicted? We show that RNN and transformer language models exhibit structured, consistent generalization in out-of-distribution contexts. We begin by introducing two idealized models of generalization in next-word prediction: a local context model in which generalization is consistent with the last word observed, and a global context model in which generalization is consistent with the global structure of the input. In experiments in English, Finnish, Mandarin, and random regular languages, we demonstrate that neural language models interpolate between these two forms of generalization: their predictions are well-approximated by a log-linear combination of local and global predictive distributions. We then show that, in some languages, noise mediates the two forms of generalization: noise applied to input tokens encourages global generalization, while noise in history representations encourages local generalization. Finally, we offer a preliminary theoretical explanation of these results by proving that the observed interpolation behavior is expected in log-linear models with a particular feature correlation structure. These results help explain the effectiveness of two popular regularization schemes and show that aspects of sequence model generalization can be understood and controlled.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 14 of its 48 references that are in the map. First posted on arXiv 4 Nov 2021.

Builds on

14 of 48 references.

References · 14

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
  4. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
  5. 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
  6. 2020Universal Dependencies v2: An Evergrowing Multilingual Treebank Collectioncited by 269
  7. 2015A Neural Network Approach to Context-Sensitive Generation of Conversational Responsescited by 98
  8. 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
  9. 2018Memorize or generalize? Searching for a compositional RNN in a haystackcited by 41
  10. 2020Language Model Prior for Low-Resource Neural Machine Translationcited by 37
  11. 2021Minimum Description Length Recurrent Neural Networkscited by 23
  12. 2016Recurrent Dropout without Memory Losscited by 22
2 more
  1. 2020What they do when in doubt: a study of inductive biases in seq2seq learnerscited by 20
  2. 2018The Fine Line between Linguistic Generalization and Failure in Seq2Seq-Attention Modelscited by 4

Built on by

Cited by year

Citing papers per year: 2022: 1; 2023: 0; 2024: 1.

2 papers.