arXiv:2604.05718cs.CV2026-04中稿 · CVPR被引 1

无需训练的视觉Transformer token压缩方法,显著降低分割任务延迟。

MPM: Mutual Pair Merging for Efficient Vision Transformers

  • 基于余弦空间互近邻配对平均,生成可重建的压缩序列
  • 在Raspberry Pi 5上降低60%图像延迟,H100上吞吐提升20%
  • 无参数、无超参,适合部署受限设备的实时语义分割

减少序列长度是加速Transformer的常见手段,但以往工作多针对分类任务,使用代理指标而非端到端延迟。对于语义分割,token压缩还受限于需重建密集像素对齐特征,且在现代加速器上,计算合并图的开销可能抵消预期收益。本文提出互对合并(MPM),一种无需训练的token聚合模块:在余弦空间中形成互近邻对,平均每对并记录合并图,使解码器前可通过gather操作重建,从而保持现有分割头不变。MPM不引入任何可学习参数或连续压缩控制(如保留率或阈值),速度-精度权衡由离散插入调度决定。我们在NVIDIA H100 GPU(含与不含FlashAttention-2)和Raspberry Pi 5上评测端到端延迟,覆盖标准分割数据集。在ADE20K上,MPM使ViT-Tiny在Raspberry Pi 5上每图像延迟降低高达60%,在H100+FlashAttention-2下吞吐提升达20%,同时mIoU下降低于3%。结果表明,简单、重建感知、无需训练的token合并可在显式考虑开销后带来实际运行时收益。

原文摘要 · Abstract (English)

Decreasing sequence length is a common way to accelerate transformers, but prior token reduction work often targets classification and reports proxy metrics rather than end-to-end latency. For semantic segmentation, token reduction is further constrained by the need to reconstruct dense, pixel-aligned features, and on modern accelerators the overhead of computing merge maps can erase expected gains. We propose Mutual Pair Merging (MPM), a training-free token aggregation module that forms mutual nearest-neighbor pairs in cosine space, averages each pair, and records a merge map enabling a gather-based reconstruction before the decoder so that existing segmentation heads can be used unchanged. MPM introduces no learned parameters and no continuous compression knob (no keep-rate or threshold). The speed-accuracy trade-off is set by a discrete insertion schedule. We benchmark end-to-end latency on an NVIDIA H100 GPU (with and without FlashAttention-2) and a Raspberry Pi 5 across standard segmentation datasets. On ADE20K, MPM reduces per-image latency by up to 60% for ViT-Tiny on Raspberry Pi 5, and increases throughput by up to 20% on H100 with FlashAttention-2 while keeping the mIoU drop below 3%. These results suggest that simple, reconstruction-aware, training-free token merging can translate into practical wall-clock gains for segmentation when overhead is explicitly accounted for.

视觉Transformer语义分割高效推理token压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。