Explorerโ€บComputational Linguisticsโ€บNLP
Research PaperResearchia:202609.11009

Distance generalization in transformers: why bother with positional encoding?

Daniel Henrik Nevermann

Abstract

Out-of-distribution length generalization, namely to extrapolate a task from short to longer context, has been studied intensively for transformers. Here we focus on distance generalization, which probes performance when inter-token distances are changed between training and inference, while keeping a fixed context length. We construct two synthetic delay copy tasks, both involving finite distances between source and recall, where tokens are copied either fully or selectively, and test models on...

Submitted: September 11, 2026Subjects: NLP; Computational Linguistics

Description / Details

Out-of-distribution length generalization, namely to extrapolate a task from short to longer context, has been studied intensively for transformers. Here we focus on distance generalization, which probes performance when inter-token distances are changed between training and inference, while keeping a fixed context length. We construct two synthetic delay copy tasks, both involving finite distances between source and recall, where tokens are copied either fully or selectively, and test models on delays unseen during training. We address three questions: (A) Do positional encoding schemes such as RoPE and ALiBi improve distance resolution relative to no positional encoding (NoPE)? (B) How does data diversity, the number of inter-token distances seen in training, affect performance? (C) When is distance transfer learning positive or negative? We present a thorough investigation, finding that it is paramount to improve our understanding of the underlying mechanisms.


Source: arXiv:2609.11913v1 - http://arxiv.org/abs/2609.11913v1 PDF: https://arxiv.org/pdf/2609.11913v1 Original Link: http://arxiv.org/abs/2609.11913v1

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Access Paper
View Source PDF
Submission Info
Date:
Sep 11, 2026
Topic:
Computational Linguistics
Area:
NLP
Comments:
0
Bookmark
Distance generalization in transformers: why bother with positional encoding? | Researchia