LapMerge: Differentiable Exact-Budget Token Merging in Linear Time
cs.CV
Submitted: 2026-10-09
Updated: 2026-10-12
License: http://creativecommons.org/licenses/by/4.0/
The gist: Modern vision and language models process ever longer token sequences, and reducing them is the main lever on downstream cost.
Abstract
Modern vision and language models process ever longer token sequences, and reducing them is the main lever on downstream cost. Token compression, however, faces a fundamental trade-off: selecting tokens discards information, while existing merging methods preserve it only through pairwise token-to-token matching or MN token-to-output interactions. We introduce LapMerge, a differentiable merging operator that resolves this trade-off for ordered sequences: a learned mass distribution partitions the sequence into exactly N equal-mass segments under a Laplace-kernel density, and prefix/suffix scans aggregate each segment, so both the forward and the backward pass run in O(M+N) time. This combination - an exact output budget, end-to-end differentiability, and linear cost - is precisely what previous reducers trade off against one another. The budget can be changed without changing operator parameters, and the learned mass doubles as a token-level map of where the budget is allocated. Across vision and vision-language tasks, LapMerge matches or improves on strong token reducers while being up to two orders of magnitude faster at large sequence lengths; it is particularly effective when token order reflects spatial or temporal locality, and works both as a drop-in reduction module and as a trainable architectural component.
Sources
- Qwen2.5-VL Technical Report
- Longformer: The Long-Document Transformer
- Generating Long Sequences with Sparse Transformers
- Mamba: Linear-Time Sequence Modeling with Selective State Spaces
- DiffPrune: differentiable information throttling for token pruning in vision-language models
- The Model Knows Which Tokens Matter: Automatic Token Selection via Noise Gating
- Removing Speaker Information from Speech Representation using Variable-Length Soft Pooling
- Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizations
- Learning to Merge Tokens in Vision Transformers
- Fast LapSum: Exact Differentiable Top- k at Million Scale
- VisionSelector: End-to-End Learnable Visual Token Compression for Efficient Multimodal LLMs
Related papers
- Loss Knows Best: Detecting Annotation Errors in Videos via Loss Trajectories
- AnchorWeave: World-Consistent Video Generation with Retrieved Local Spatial Memories
- Benchmarking the Robustness of Foundation Models for Mammography under Domain Shift
- MambaX-Net: Dual-Input Mamba-Enhanced Cross-Attention Network for Longitudinal MRI Segmentation
- TeleOCR: Navigating Document Parsing Across Digital and Camera-Captured Documents
- A Survey on Efficient Vision-Language-Action Models