paper-with-me

Papers

A Formal Framework for Understanding Length Generalization in Transformers

2024-10-03 · Xinting Huang, Andy Yang, Satwik Bhattamishra, Yash Sarrof, Andreas Krebs, Hattie Zhou, Preetum Nakkiran, Michael Hahn

A major challenge for transformers is generalizing to sequences longer than those observed during training. While previous works have empirically shown that transformers can either succeed or fail at length generalization depending on the task, theoretical understanding of this phenomenon remains limited. In this work, we introduce a rigorous theoretical framework to analyze length generalization in causal transformers with learnable absolute positional encodings. In particular, we characterize those functions that are identifiable in the limit from sufficiently long inputs with absolute positional encodings under an idealized inference scheme using a norm-based regularizer. This enables us to prove the possibility of length generalization for a rich family of problems. We experimentally validate the theory as a predictor of success and failure of length generalization across a range of algorithmic and formal language tasks. Our theory not only explains a broad set of empirical observations but also opens the way to provably predicting length generalization capabilities in transformers.

📄 PDF Abstract BibTeX arXiv:2410.02140

Code (1)

lacoco-lab/length_generalization 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically

Similar Papers 제목 키워드 기반

Quantitative Bounds for Length Generalization in Transformers

2025-10-30 · Zachary Izzo, Eshaan Nichani, Jason D. Lee arxiv

We study the problem of length generalization (LG) in transformers: the ability of a model trained on shorter sequences to maintain performance when evaluated on much longer, previously unseen inputs. Prior work by Huang…

Why are Sensitive Functions Hard for Transformers?

2024-02-15 · Michael Hahn, Mark Rofin

Empirical studies have identified a range of learnability biases and limitations of transformers, such as a persistent difficulty in learning to compute simple formal languages such as PARITY, and a bias towards low-degr…

Sensitivity

The Role of Sparsity for Length Generalization in Transformers

2025-02-24 · Noah Golowich, Samy Jelassi, David Brandfonbrener, Sham M. Kakade 외

Training large language models to predict beyond their training context lengths has drawn much attention in recent years, yet the principles driving such behavior of length generalization remain underexplored. We propose…

Position

Discovering Interpretable Algorithms by Decompiling Transformers to RASP

2026-02-09 · Xinting Huang, Aleksandra Bakalova, Satwik Bhattamishra, William Merrill 외 arxiv

Recent work has shown that the computations of Transformers can be simulated in the RASP family of programming languages. These findings have enabled improved understanding of the expressive capacity and generalization a…

Ghost in the Kernel: In-Context Learning with Efficient Transformers via Domain Generalization

2026-07-01 · Peilin Liu, Ding-Xuan Zhou arxiv

Transformer-based large models have demonstrated remarkable generalization abilities across different tasks by leveraging a context-aware attention module for in-context learning. With richer context, transformers adapt …

Domain Generalization