Visual-Word Tokenizer: Beyond Fixed Sets of Tokens in Vision Transformers

Leonidas Gee, Wing Yan Li, Viktoriia Sharmanska, Novi Quadrianto
11/23/2024
2 citations
cs.CV
transformer-attention

Official code: wearepal/visual-word-tokenizer (2 stars, Python, GPL-3.0, last commit 2025-11-27).

Abstract

The cost of deploying vision transformers increasingly represents a barrier to wider industrial adoption. Existing compression techniques require additional end-to-end fine-tuning or incur a significant drawback to energy efficiency, making them ill-suited for online (real-time) inference, where a prediction is made on any new input as it comes in.

Show full abstract

We introduce the $\textbf{Visual-Word Tokenizer}$ (VWT), a training-free method for reducing energy costs while retaining performance. The VWT groups visual subwords (image patches) that are frequently used into visual words, while infrequent ones remain intact. To do so, $\textit{intra}$-image or $\textit{inter}$-image statistics are leveraged to identify similar visual concepts for sequence compression. Experimentally, we demonstrate a reduction in energy consumed of up to 47%. Comparative approaches of 8-bit quantization and token merging can lead to significantly increased energy costs (up to 500% or more). Our results indicate that VWTs are well-suited for efficient online inference with a marginal compromise on performance. The experimental code for our paper is also made publicly available.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

[TMLR 2025] Visual-Word Tokenizer: Beyond Fixed Sets of Tokens in Vision Transformers

20PythonSep 30, 20241 years agoGPL-3.0

Similar Papers

Cite this paper

@article{gee2024visualword,
  title  = {Visual-Word Tokenizer: Beyond Fixed Sets of Tokens in Vision Transformers},
  author = {Leonidas Gee and Wing Yan Li and Viktoriia Sharmanska and Novi Quadrianto},
  year   = {2024},
  eprint = {2411.15397},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.15397v4}
}

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/2411.15397.svg)](https://codeofpaper.com/paper/2411.15397)

Discussion