Representation Shift: Unifying Token Compression with Flashattention

Joonmyung Choi, Sanghyeok Lee, Byungoh Ko, Eunseo Kim, Jihyung Kil +1 more
8/1/2025
8 citations
transformer-attention

No official code found. Best implementation: mlvlab/Representation-Shift (36 stars, MIT, last commit 2026-02-22).

Abstract

Transformers have demonstrated remarkable success across vision, language, and video. Yet, increasing task complexity has led to larger models and more tokens, raising the quadratic cost of self-attention and the overhead of GPU memory access.

Show full abstract

To reduce the computation cost of self-attention, prior work has proposed token compression techniques that drop redundant or less informative tokens. Meanwhile, fused attention kernels such as FlashAttention have been developed to alleviate memory overhead by avoiding attention map construction and its associated I/O to HBM. This, however, makes it incompatible with most training-free token compression methods, which rely on attention maps to determine token importance. Here, we propose Representation Shift, a trainingfree, model-agnostic metric that measures the degree of change in each token's representation. This seamlessly integrates token compression with FlashAttention, without attention maps or retraining. Our method further generalizes beyond Transformers to CNNs and state space models. Extensive experiments show that Representation Shift enables effective token compression compatible with FlashAttention, yielding significant speedups of up to $5.5 \times$ and $4.4 \times$ in video-text retrieval and video $Q A$, respectively. Code is available at https://github.com/mlvlab/Representation-Shift.

View on arXivView PDF

Code Implementations(1)

MIT

Official Implementation (Pytorch) of the "Representation Shift: Unifying Token Compression with FlashAttention", ICCV 2025

363Jul 16, 20259 months agoMIT
efficient-vision-transformersiccv2025token-pruning

Similar Papers

Cite this paper

@article{choi2025representation,
  title  = {Representation Shift: Unifying Token Compression with Flashattention},
  author = {Joonmyung Choi and Sanghyeok Lee and Byungoh Ko and Eunseo Kim and Jihyung Kil and Hyunwoo J. Kim},
  year   = {2025},
  eprint = {2508.00367},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2508.00367},
  journal = {IEEE International Conference on Computer Vision}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.00367.svg)](https://codeofpaper.com/paper/2508.00367)

Discussion