CVJul 5, 2023

MSViT: Dynamic Mixed-Scale Tokenization for Vision Transformers

arXiv:2307.02321v223 citationsh-index: 26
Originality Incremental advance
AI Analysis

This work addresses computational inefficiency in Vision Transformers for computer vision applications, offering a lightweight, backbone-agnostic solution that is incremental in improving tokenization methods.

The authors tackled the inefficiency of uniform tokenization in Vision Transformers by proposing MSViT, a dynamic mixed-scale tokenization scheme that selects optimal token scales per image region, resulting in improved accuracy-complexity trade-offs for classification and segmentation tasks.

The input tokens to Vision Transformers carry little semantic meaning as they are defined as regular equal-sized patches of the input image, regardless of its content. However, processing uniform background areas of an image should not necessitate as much compute as dense, cluttered areas. To address this issue, we propose a dynamic mixed-scale tokenization scheme for ViT, MSViT. Our method introduces a conditional gating mechanism that selects the optimal token scale for every image region, such that the number of tokens is dynamically determined per input. In addition, to enhance the conditional behavior of the gate during training, we introduce a novel generalization of the batch-shaping loss. We show that our gating module is able to learn meaningful semantics despite operating locally at the coarse patch-level. The proposed gating module is lightweight, agnostic to the choice of transformer backbone, and trained within a few epochs with little training overhead. Furthermore, in contrast to token pruning, MSViT does not lose information about the input, thus can be readily applied for dense tasks. We validate MSViT on the tasks of classification and segmentation where it leads to improved accuracy-complexity trade-off.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes