Abstract
Vision Transformers naturally accommodate sparsity, yet standard tokenization methods confine features to discrete patch grids. This constraint prevents models from fully exploiting sparse regimes, forcing awkward compromises. We propose Subpixel Placement of Tokens (SPoT), a novel tokenization strategy that positions tokens continuously within images, effectively sidestepping grid-based limitations. With our proposed oracle-guided search, we uncover substantial performance gains achievable with ideal subpixel token positioning, drastically reducing the number of tokens necessary for accurate predictions during inference. SPoT provides a new direction for flexible, efficient, and interpretable ViT architectures, redefining sparsity as a strategic advantage rather than an imposed limitation.
The Grid Constraint in Vision Transformers
Since their inception, Vision Transformers (ViTs) have inherited a "bag-of-words" approach from natural language processing. To transform an image into a sequence of tokens, standard methods typically partition the image into a fixed grid of non-overlapping square patches.
This rigid grid acts as a fundamental limitation, particularly in sparse regimes. If a critical feature—such as the eye of a bird—straddles the boundary between four patches, the model must either process all four patches to capture the feature or settle for a fragmented, incomplete view. This misalignment forces models to process redundant information, which the authors liken to "eating soup with a fork." SPoT addresses this inefficiency by allowing the model to select precise locations for feature extraction, down to the subpixel level.
Methods: Breaking the Grid
The core innovation of this work is Subpixel Placement of Tokens (SPoT). Rather than adhering to a fixed grid, SPoT defines a continuous space of potential positions.
To extract features at specific subpixel coordinates $(h, w)$, the method employs bilinear interpolation. Because this operation is differentiable, gradient-based optimization can be used to identify optimal token locations. The researchers explored two primary applications of SPoT:
- Spatial Priors: Evaluating different initializations for token placement, including Uniform sampling, Gaussian (center-biased), and Salient (using pre-trained saliency models).
- SPoT-ON (Oracle-guided Neighborhood search): An analysis tool that freezes the model and uses gradient descent per image to find mathematically "perfect" token placements. While computationally intensive for real-time inference, SPoT-ON establishes an empirical upper bound on the performance gains possible when grid constraints are removed.
Key Insights and Results
The study reveals that the grid is a significant constraint rather than a beneficial feature. Moving tokens off-grid by just a few pixels can yield a 16.9 percentage point improvement in accuracy compared to the best possible on-grid selection.
In "sparse" regimes with very few tokens, object-centric priors (focusing on the center or salient objects) are most effective. Conversely, in "dense" regimes with many tokens, a regular grid remains advantageous for ensuring broad spatial coverage. Furthermore, the "perfect" token locations discovered by one model (e.g., a supervised ViT) transfer effectively to different architectures (e.g., a self-supervised MAE), suggesting that SPoT-ON identifies objective structural information within images.
Performance Highlights
- Extreme Efficiency: Using SPoT-ON, a ViT-B/16 achieved 90.9% accuracy on ImageNet-1k with only 25 tokens—approximately 12.5% of the standard 196 tokens.
- Throughput Gains: SPoT achieved a 3.31x speedup compared to state-of-the-art token reduction methods like Token Merging (ToMe), while maintaining significantly higher accuracy.
- Robustness: SPoT consistently outperformed baselines across various sparsity levels, demonstrating that subpixel flexibility is a robust architectural advantage.
Limitations and Future Directions
The primary hurdle for widespread deployment is that SPoT-ON requires an iterative gradient search for every image. To address this, the authors propose developing a "Policy Network"—a lightweight auxiliary model capable of predicting optimal subpixel placements in a single forward pass. This would bridge the gap between high-performance oracle results and the requirements of high-speed inference. Additionally, SPoT holds promise for video tasks, where tokens could be tracked continuously across frames to maintain temporal consistency.
Summary updated