A Spitting Image: Modular Superpixel Tokenization in Vision Transformers

Marius Aasan, Odd Kolbjørnsen, Anne Schistad Solberg, Adín Ramirez Rivera
8/14/2024
cs.CVcs.AIcs.LG

No official code found. Best implementation: dsb-ifi/SPiT (23 stars, MIT, last commit 2025-09-12).

Abstract

Vision Transformer (ViT) architectures traditionally employ a grid-based approach to tokenization independent of the semantic content of an image. We propose a modular superpixel tokenization strategy which decouples tokenization and feature extraction; a shift from contemporary approaches where these are treated as an undifferentiated whole. Using on-line content-aware tokenization and scale- and shape-invariant positional embeddings, we perform experiments and ablations that contrast our approach with patch-based tokenization and randomized partitions as baselines. We show that our method significantly improves the faithfulness of attributions, gives pixel-level granularity on zero-shot unsupervised dense prediction tasks, while maintaining predictive performance in classification tasks. Our approach provides a modular tokenization framework commensurable with standard architectures, extending the space of ViTs to a larger class of semantically-rich models.

View on arXivView PDF

Code Implementations(1)

dsb-ifi/SPiTCommunity100%
MIT

A Spitting Image: Modular Superpixel Tokenization in Vision Transformers

235Cuda, PythonAug 8, 20241 years agoMIT

Similar Papers

Cite this paper

@article{aasan2024spitting,
  title  = {A Spitting Image: Modular Superpixel Tokenization in Vision Transformers},
  author = {Marius Aasan and Odd Kolbjørnsen and Anne Schistad Solberg and Adín Ramirez Rivera},
  year   = {2024},
  eprint = {2408.07680},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.07680v2}
}

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

Discussion