Video, How Do Your Tokens Merge?
Sam Pollard, Michael Wray
TL;DR
This work tackles the prohibitive compute cost of video transformers by introducing training-free video token merging that progressively reduces token counts during inference. It extends image-based token merging to video via two schemes—Spatio-Temporal and Divided Space-Time—merging tokens based on token-key similarity and weighting by multiplicity, with proportional attention to stabilize subsequent layers. Across four models and three action datasets, the method yields around 2.5x throughput with modest accuracy loss, and is particularly robust for spatio-temporal models like ViViT and VideoMAE, while divided space-time variants suffer on fine-grained temporal tasks. Qualitative analyses indicate merging is largely visual rather than semantic, and layer choice governs the trade-off between speed and accuracy, offering a practical drop-in acceleration for video understanding systems.
Abstract
Video transformer models require huge amounts of compute resources due to the spatio-temporal scaling of the input. Tackling this, recent methods have proposed to drop or merge tokens for image models, whether randomly or via learned methods. Merging tokens has many benefits: it can be plugged into any vision transformer, does not require model re-training, and it propagates information that would otherwise be dropped through the model. Before now, video token merging has not been evaluated on temporally complex datasets for video understanding. In this work, we explore training-free token merging for video to provide comprehensive experiments and find best practices across four video transformers on three datasets that exhibit coarse and fine-grained action recognition. Our results showcase the benefits of video token merging with a speedup of around $2.5$X while maintaining accuracy (avg. $-0.55\%$ for ViViT). Code available at https://github.com/sjpollard/video-how-do-your-tokens-merge.
