potentialpaper

On the Measurement and Efficient Mitigation of Length Generalization Gaps in Large Language Models

Jiaqi WANG, Binghui Xie, Dongchi Huang, Ming Hu, Qiguang Chen, Feilong Tang, Junjun He, James Cheng

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Large Language Models (LLMs) typically train on short text due to the quadratic complexity of their self-attention architectures. As a result, their performance suffers drastically on inputs longer than those encountered during training, substantially limiting their applications in real-world tasks involving long contexts. In this paper, we rigorously establish an upper bound on length generalization in the measurement space and identify two length-related factors that limit performance. Our theory explains two recent observations: (i) out-of-distribution positions in longer contexts reduce length generalization, and (ii) fine-tuning on entire sequences is not necessary. Motivated by these insights, we propose Virtual-context Learning (VCL), a flexible method that requires minimal modifications to most fine-tuning approaches. Experiments on various tasks show that VCL allows LLMs to generalize to 4 ×\times context windows while retaining perplexity and improving performance on downstream tasks such as Passkey Retrieval and LongBench. VCL brings substantial efficiency improvements, reducing decoding time and memory usage by up to 50% compared with fine-tuning baselines.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…