arXiv:2610.31574cs.LGOct 2026

Manuscript Offprint

arXiv:2610.31574

Rethinking Sequence Compression with Test-time Regression

Sihan Yang, Jie Huang, Hanxuan Li, Yifan Guo, Weigao Sun, Yiran Zhong, Weiyang Liu

Sihan Yang 1^{1} Jie Huang 2^{2} Hanxuan Li 1^{1} Yifan Guo 1^{1} Weigao Sun 3^{3} Yiran Zhong 3^{3} Weiyang Liu 1,∗^{1,*}

1^{1}The Chinese University of Hong Kong 2^{2}Independent Researcher 3^{3}Token Foundry, Alibaba Group

∗^{*}Corresponding author spherelab.ai/ttr-compressor

Pooling

Channel-wise aggregation without interaction

Figure

Projection

Fixed channel map at each position

TTR-Compressor

Fit all tokens jointly

Figure

(a) Comparison of three sequence compression paradigms

Block-wise sparse attention

Figure

Visual token merger

Figure

RULER Retrieval Accuracy

Multimodal Understanding Score

(b) Applications and empirical comparison

Figure 1: Overview of TTR-Compressor. (a) Unlike pooling and projection, which process tokens independently, TTR-Compressor fits all tokens jointly and thereby captures the interplay among them. (b) TTR-Compressor outperforms existing methods on both block-wise sparse attention and visual token merging.

ABSTRACT

Sequence compression is a fundamental operation and a critical information bottleneck in efficient language and multimodal models, and yet prevailing approaches based on pooling or learned projections remain underperforming. We revisit sequence compression through the lens of test-time regression: input tokens define a regression problem whose fitted coefficients form the compressed representation. Importantly, the regression problem is learned end-to-end via backpropagation, while its coefficients are computed efficiently in closed form during the forward pass. This leads to TTR-Compressor, a general alternative to conventional pooling and projection-based compression. We evaluate TTR-Compressor as the compressor for block-wise sparse attention and the visual token merger for multimodal large language models. On block-wise sparse attention, TTR-Compressor improves RULER performance over attention-based compressors by a large margin. For visual token merging, it consistently outperforms the standard MLP merger and matches its performance with 55.6% fewer visual tokens. These results establish test-time regression as an effective primitive for sequence compression in efficient language and multimodal models.

1 INTRODUCTION

Sequence compression is a ubiquitous operation in modern efficient large model architectures (Qwen Team, 2026b; DeepSeek-AI, 2026), and yet remains surprisingly underexplored. For example, block-wise sparse attention compresses each token block into a summary vector used to score and select relevant blocks (Jiang et al., 2024; Lu et al., 2025; Yuan et al., 2025), while multimodal large language models (MLLMs) merge neighboring visual features into compact tokens before feeding them into the language backbone (Wang et al., 2025; Bai et al., 2025; Team et al., 2026a). In both settings, the compressor acts as a critical information bottleneck. Once information is discarded, it cannot be recovered downstream. One would expect compression to be a carefully designed architectural component. However, most models rely on simple mechanisms, such as parameter-free pooling, learned projections over concatenated tokens, or at best, attention-weighted pooling.

We argue that these default compressors share a fundamental structural limitation, i.e., they aggregate tokens using weights that do not account for inter-token relationships. Mean pooling uses uniform weights, linear projection uses fixed position-dependent weights, and attention-weighted pooling scores each token independently. As a result, redundant tokens can reinforce one another, while distinctive information is diluted. From a statistical perspective, these methods primarily exploit first-order token statistics while ignoring second-order inter-token correlations, the very structure that reveals which information is redundant and which is distinctive.

We introduce a fundamentally different compression strategy. Rather than asking which weighted average best summarizes a set of tokens, we let the tokens define a regression problem and take its fitted coefficients as the summary. Specifically, our proposed TTR-Compressor, constructs a self-supervised ridge-regression problem directly from the input tokens, requiring no external labels, and uses its closed-form solution as the compressed representation. This formulation creates a natural division: the outer training loop meta-learns which regression problem produces task-useful representations, while the inner closed-form solution determines how that problem should be fitted to each input. The key distinction from conventional pooling and projection arises from the Gram matrix in the regression solution. By explicitly capturing inter-token correlations, TTR-Compressor fits correlated tokens jointly, so redundant evidence has diminishing rather than purely additive influence. This input-adaptive behavior cannot be reproduced by a fixed projection or additive token combination. Moreover, learning the regularizer removes the need for ridge hyperparameter tuning in large-scale pretraining. Because the compression window is typically smaller than the channel dimension (i.e., T<dT < d), we solve the dual problem with an efficient T×TT \times T Cholesky factorization. Thus, TTR-Compressor incurs minimal overhead and introduces only 2d learnable parameters per compressor, making it an effective drop-in replacement for sequence compression.

We evaluate TTR-Compressor on two applications that impose fundamentally different requirements on compression. In block-wise sparse attention, the compressed summary must act as a faithful retrieval key. In this setting, TTR-Compressor consistently outperforms traditional baselines on RULER (Hsieh et al., 2024) retrieval tasks, surpassing sophisticated attention-based compressors (Hu et al., 2026) by a considerable margin. In visual token merging, by contrast, the compressed summary must preserve a faithful representation. Here, TTR-Compressor consistently outperforms the widely used MLP merger across diverse compression ratios, and achieves comparable performance with 55.6% fewer visual tokens. Our contributions are summarized below:

• A novel compression framework. We introduce a test-time regression framework for sequence compression, reframing token summarization as an instance-adaptive optimization problem.

• A practical operator. We derive an efficient dual closed-form solution and eliminate hyperparameter tuning, making TTR-Compressor fully practical and scalable for large-scale pretraining.

• Empirical effectiveness. As a drop-in component in large models, TTR-Compressor consistently outperforms conventional baselines in both block-wise sparse attention and visual token merging.

References (50)