ElasticTok: Adaptive Tokenization for Image and Video
Wilson Yan, Volodymyr Mnih, Aleksandra Faust, Matei Zaharia, Pieter Abbeel, Hao Liu
TL;DR
ElasticTok introduces adaptive tokenization for images and videos by training autoencoders with a left-aligned, mask-based token selection that conditions on prior frames. This approach enables dynamic allocation of tokens at inference time, guided by reconstruction thresholds or target lengths, and scales to long video sequences via Blockwise RingAttention. Empirically, ElasticTok achieves up to 2-5x token savings while preserving reconstruction quality and demonstrates comparable downstream performance to fixed-token baselines in vision-language tasks, with flexible inference strategies and objective- dependent token allocation. The work highlights practical benefits for multimodal models and agents by reducing token budgets and enabling content-aware representations, while suggesting avenues for future improvements in masking and modality generalization.
Abstract
Efficient video tokenization remains a key bottleneck in learning general purpose vision models that are capable of processing long video sequences. Prevailing approaches are restricted to encoding videos to a fixed number of tokens, where too few tokens will result in overly lossy encodings, and too many tokens will result in prohibitively long sequence lengths. In this work, we introduce ElasticTok, a method that conditions on prior frames to adaptively encode a frame into a variable number of tokens. To enable this in a computationally scalable way, we propose a masking technique that drops a random number of tokens at the end of each frames's token encoding. During inference, ElasticTok can dynamically allocate tokens when needed -- more complex data can leverage more tokens, while simpler data only needs a few tokens. Our empirical evaluations on images and video demonstrate the effectiveness of our approach in efficient token usage, paving the way for future development of more powerful multimodal models, world models, and agents.
