The EOS Decision and Length Extrapolation

By Benjamin Newman, John Hewitt, Percy Liang, Christopher D. Manning. 2020

57 citations recorded by the source corpus.

Extrapolation to unseen sequence lengths is a challenge for neural generative models of language. In this work, we characterize the effect on length extrapolation of a modeling decision often overlooked: predicting the end of the generative process through the use of a special end-of-sequence (EOS) vocabulary item. We study an oracle setting - forcing models to generate to the correct sequence length at test time - to compare the length-extrapolative behavior of networks trained to predict EOS (+EOS) with networks not trained to (-EOS). We find that -EOS substantially outperforms +EOS, for example extrapolating well to lengths 10 times longer than those seen at training time in a bracket closing task, as well as achieving a 40% improvement over +EOS in the difficult SCAN dataset length generalization task. By comparing the hidden states and dynamics of -EOS and +EOS models, we observe that +EOS models fail to generalize because they (1) unnecessarily stratify their hidden states by their linear position is a sequence (structures we call length manifolds) or (2) get stuck in clusters (which we refer to as length attractors) once the EOS token is the highest-probability prediction.

Subfields: Artificial Intelligence, Cultural Studies, Large Language Models

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Yejin Choi
  2. Luke S. Zettlemoyer
  3. Hannaneh Hajishirzi
  4. Mohit Bansal
  5. Noah A. Smith
  6. Percy Liang
  7. Jianfeng Gao
  8. Michael Lewis

In Cultural Studies

  1. Xiang Ren
  2. Noah A. Smith
  3. Fei Sha
  4. Yejin Choi
  5. Emily Pitler

In Large Language Models

  1. Yejin Choi
  2. Noah A. Smith
  3. Xiang Ren
  4. Michael Lewis
  5. Luke S. Zettlemoyer
  6. Jimmy J. Lin
  7. Ronan Le Bras
  8. Bill Yuchen Lin

Citations in the corpus