Length Generalization Bounds for Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Andy, Bergsträßer, Pascal, Zetzsche, Georg, Chiang, David, Lin, Anthony W.
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913175434166272
author Yang, Andy
Bergsträßer, Pascal
Zetzsche, Georg
Chiang, David
Lin, Anthony W.
author_facet Yang, Andy
Bergsträßer, Pascal
Zetzsche, Georg
Chiang, David
Lin, Anthony W.
contents Length generalization is a key property of a learning algorithm that enables it to make correct predictions on inputs of any length, given finite training data. To provide such a guarantee, one needs to be able to compute a length generalization bound, beyond which the model is guaranteed to generalize. This paper concerns the open problem of the computability of such generalization bounds for C-RASP, a class of languages which is closely linked to transformers. A positive partial result was recently shown by Chen et al. for C-RASP with only one layer and, under some restrictions, also with two layers. We provide complete answers to the above open problem. Our main result is the non-existence of computable length generalization bounds for C-RASP (already with two layers) and hence for transformers. To complement this, we provide a computable bound for the positive fragment of C-RASP, which we show equivalent to fixed-precision transformers. For both positive C-RASP and fixed-precision transformers, we show that the length complexity is exponential, and prove optimality of the bounds.
format Preprint
id arxiv_https___arxiv_org_abs_2603_02238
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Length Generalization Bounds for Transformers
Yang, Andy
Bergsträßer, Pascal
Zetzsche, Georg
Chiang, David
Lin, Anthony W.
Machine Learning
Formal Languages and Automata Theory
Logic in Computer Science
Length generalization is a key property of a learning algorithm that enables it to make correct predictions on inputs of any length, given finite training data. To provide such a guarantee, one needs to be able to compute a length generalization bound, beyond which the model is guaranteed to generalize. This paper concerns the open problem of the computability of such generalization bounds for C-RASP, a class of languages which is closely linked to transformers. A positive partial result was recently shown by Chen et al. for C-RASP with only one layer and, under some restrictions, also with two layers. We provide complete answers to the above open problem. Our main result is the non-existence of computable length generalization bounds for C-RASP (already with two layers) and hence for transformers. To complement this, we provide a computable bound for the positive fragment of C-RASP, which we show equivalent to fixed-precision transformers. For both positive C-RASP and fixed-precision transformers, we show that the length complexity is exponential, and prove optimality of the bounds.
title Length Generalization Bounds for Transformers
topic Machine Learning
Formal Languages and Automata Theory
Logic in Computer Science
url https://arxiv.org/abs/2603.02238