Sequential Token Merging: Revisiting Hidden States

Yan Wen, Peng Ye, Lin Zhang, Baopu Li, Jiakang Yuan, Yaoxin Yang, Tao ChenarXiv 2025 · DOI

Introduction

Vision Mambas (ViMs) have emerged as a compelling alternative to Vision Transformers (ViTs), offering sub-quadratic complexity that promises better scalability for high-resolution image processing. However, as resolution increases, the number of image patches (tokens) still grows quadratically, necessitating efficient token reduction strategies. While Transformers can easily prune or merge tokens based on global attention scores, the sequential nature of Mamba models presents a unique challenge. This paper introduces Sequential Token Merging (STM), a data-free method that accelerates ViMs by respecting the model's internal "chain" of information flow.

The Challenge of Sequential Dependency

In a Mamba architecture, information is processed as a sequence where each token's state depends on the previous ones. Removing a token is not merely a matter of deleting a data point; it is akin to removing a link from a chain. This disruption affects the "hidden states" that carry semantic information forward, leading to significant accuracy degradation in existing methods borrowed from the Transformer literature. These methods often require expensive retraining to compensate for the "uncontrollable loss" in internal representations.

Sequential Token Merging (STM)

To address these issues, the authors propose STM, which integrates three core innovations designed to maintain the stability of Mamba’s hidden states:

  1. Bidirectional Nearest Neighbor Merging (BNNM): Instead of using global importance metrics, BNNM merges redundant tokens with their immediate neighbors in the sequence toward the class token. This approach preserves the spatial and sequential structure essential for Mamba's scan mechanism.
  2. Hidden States Protection (HSP): By analyzing the selective scan mechanism, the authors developed HSP to estimate information loss during merging. It injects a compensation term into the process, using parameters from preceding layers to stabilize the transition.
  3. Distance Fading Rule: The researchers mathematically demonstrated that perturbations in hidden states decay exponentially over the sequence. STM leverages this "forgetfulness" by merging tokens further from the class token first, allowing any introduced noise to dissipate before reaching the final output layers.

Key Insights: Hidden States vs. Attention

A pivotal finding of this research is that Mamba’s hidden states are significantly more semantically rich than the attention maps typically used in Transformers. While attention maps often focus on isolated high-contrast regions, hidden states provide a more comprehensive representation of the scene's objects and structure.

Visualizing the sparse information captured by standard attention maps in vision models.
Mamba's hidden states capture dense semantic information, providing a more stable basis for token reduction.

This observation led to the concept of Limited Directional Sequential Dependence (LDSD), where the model is viewed as a chain of individuals passing a message. STM ensures that even if some "messengers" are merged, the integrity of the message remains intact by the time it reaches the end of the chain.

Experimental Results

STM was evaluated on the ImageNet-1K dataset across multiple model scales (ViM-Ti, ViM-S, and ViM-B). The results demonstrate a superior Pareto front compared to existing state-of-the-art techniques:

  • Efficiency: On ViM-Ti, STM achieved a 22.3% reduction in FLOPs with only a 1.0% drop in top-1 accuracy.
  • Robustness: At a 40% token reduction rate, ViM-S maintained high performance with only a 1.4% degradation.
  • Zero-Shot Capability: Unlike competing methods like R-MeeTo or Hidden State Alignment, STM is entirely data-free and requires no retraining, outperforming them by over 20% in accuracy when tested out-of-the-box.

Conclusion and Future Work

Sequential Token Merging represents a significant step forward in making Vision Mambas practical for real-world, high-resolution applications. By shifting the focus from attention-based pruning to hidden state protection, STM achieves high efficiency without the need for costly fine-tuning. Future research may explore optimizing these strategies for specific domains like medical imaging, where preserving fine-grained spatial information is critical.

Summary updated

BibTeX
@misc{wen2025sequential,
  author = {Yan Wen and Peng Ye and Lin Zhang and Baopu Li and Jiakang Yuan and Yaoxin Yang and Tao Chen},
  title = {{Sequential Token Merging: Revisiting Hidden States}},
  year = {2025},
  eprint = {2509.22691},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.22691},
}
Figure