Decoder-Agnostic Token Merging for Vision Transformers: A Systematic Study of G2TM
Victor Bercy, Martyna Poreba, Michal Szczepanski, Samia Bouchafa
Abstract
Vision Transformers (ViTs) have achieved state-of-the-art performance across a range of computer vision tasks, mainly thanks to the self-attention mechanism. However, its complexity, increasing quadratically with the number of tokens, remains the major obstacle to ViT efficiency and deployment at scale. Token merging reduces this cost by aggregating redundant tokens. Yet existing methods are typically evaluated within a single architecture, leaving open whether their effectiveness stems from the merging mechanism itself or from the specific decoder they are paired with. We extend Graph-Guided Token Merging (G2TM), a single module inserted early in a ViT-based network, beyond its original Segmenter setting. We evaluate G2TM across three semantic segmentation frameworks (Segmenter, SETR, EoMT) and three decoder families (Linear, Transformer-, convolution-based), as well as standard ViT image classification. Our results show that G2TM's behavior and accuracy-efficiency trade-off are consistent across every tested architecture for a given backbone size, indicating that its effectiveness is a property of the encoder rather than the decoder. G2TM also generalizes well to image classification, achieving an even smaller degradation in accuracy compared to semantic segmentation. We further find that G2TM's optimal hyperparameters, resulting in a consistent drop in GFLOPs of 22-47% and an increase in throughput by up to 74% for segmentation models on ADE20K dataset, depend primarily on the backbone's pre-training recipe and on the target dataset, rather than on the decoder choice.
Create a lesson
Metadata
- Comments
- Extended version of https://cea.hal.science/cea-05578363, to be published in Communications in Computer and Information Science (CCIS), Springer. Codes are available at https://github.com/vbercy/g2tm
Related papers
Focus Only on What's Important: Training-Free Focus Maps for Frozen Vision Transformers in Long-Video Object Segmentation
Shared title terminologycs.CVHarsha Karipineni, Rajesh Reddy Chintha
Fragment-Aware Vision Transformers for Fresco-Fragment Style Classification
Shared title terminologycs.CVSara Miketek, Biagio Barchielli, Nadeem Iqbal Kajla et al.
Riemannian--Lorentz Fusion of Vision Transformers and State-Space Models
Shared title terminologycs.CVBadri N. Patro, Vijay S. Agneeswaran
Decodable but Misrouted: Sparse Features Uncover a Readout Gap in Vision-Language Models for Harmful Meme Detection
Shared title terminologycs.CVGirish A. Koushik, Diptesh Kanojia, Helen Treharne
AgenTeeth: A Model-Agnostic Framework for Suppressing Hallucination in Frozen Vision-Language Models on Dental X-Rays via Tool Evidence Injection
Shared title terminologycs.CVAhmed Rafid, Fariya Ahmed, Rumman Adib et al.
High-Fidelity Image Matting with Pixel-Space Diffusion Transformers
Shared title terminologycs.CVBaihan Yang, Xin Lin, Yufan Wei et al.