Vision Transformers (ViTs) process images by slicing them into a grid of non-overlapping patches, which are then projected into a sequence of visual tokens. In early ViT formulations, a patch size of $16 \times 16$ pixels became the standard default. However, this choice represents a strict compromise between spatial resolution and computational feasibility rather than an optimal configuration for all visual tasks.
When a model needs to resolve fine-grained structures—such as thin handwritten strokes in historical documents, cellular boundaries in pathology slides, or minute textures in generative image synthesis—large patches are fundamentally inadequate. They collapse complex local details into a single averaged token vector. To capture these details, the intuitive solution is to reduce the patch size. Yet, doing so triggers an explosive computational penalty. Because standard self-attention scales quadratically with the number of tokens, shrinking the patch dimension causes a fourth-power increase in computational and memory complexity relative to the patch size. This tension defines the patch-granularity computational trade-off.
Why High Granularity is Essential
To understand why researchers actively confront this quadratic wall, we must examine the representational benefits unlocked by smaller patch granularities.
In self-supervised learning, the authors of Emerging Properties in Self-Supervised Vision Transformers demonstrated that decreasing input patch sizes drastically improves a model's ability to capture fine-grained local-to-global correspondences. This allows the network to automatically learn high-quality semantic segmentations without explicit human labels. Similarly, for dense prediction tasks like medical imaging, Chen Chen et al. showed in TransBTS: Multimodal Brain Tumor Segmentation Using Transformer that increasing token density directly translates to superior segmentation accuracy along intricate structural boundaries.
The necessity of fine tokenization is equally pronounced in generative modeling and restoration. In All are Worth Words: A ViT Backbone for Diffusion Models, Fan Bao et al. established that diffusion models achieve optimal image synthesis quality when utilizing very small patch sizes to capture fine-grained details. However, this creates a severe bottleneck during high-resolution generation.
In image restoration, the authors of Structure-Guided Diffusion Transformer for Low-Light Image Enhancement noted that while smaller patches improve detail recovery, they frequently cause out-of-memory errors on standard hardware. For document processing, Mohamed Ali Souibgui et al. demonstrated in DocEnTr: An End-to-End Document Image Enhancement Transformer that high-resolution tokenization is a strict prerequisite for precise character-level restoration and thin stroke preservation.
The Hidden Costs of Small Patches
The trade-off involves more than just execution latency; it fundamentally alters token representation capacity and model calibration.
First, shrinking patch sizes introduces a conflict regarding the representational capacity of individual tokens. In Contraction d'une image en une petite séquence de tokens avec des modules d'attention croisée, Natacha Luka et al. observed that while smaller patches provide richer spatial detail, they restrict the internal dimensionality available to encode complex features within each token. When an image is fragmented too finely, each token contains less contextual information, forcing the network to rely entirely on subsequent attention layers to reconstruct basic structural meaning.
Second, fine-grained tokenization can degrade the reliability of a model's uncertainty estimation. In The BRAVO Semantic Segmentation Challenge Results in UNCV2024, Eduardo Valle et al. discovered that while reducing patch size improves spatial segmentation accuracy, it often leads to less reliable confidence scores. Balancing hyper-local detail with the preservation of global uncertainty context remains a persistent challenge in model design.
Strategies for Bypassing the Quadratic Wall
To circumvent the resource constraints imposed by small patches, researchers have developed several distinct architectural strategies to decouple spatial granularity from quadratic scaling.
Adaptive and Non-Uniform Tokenization
Instead of uniformly slicing an image into tiny squares, models can allocate tokens dynamically based on local complexity. In SHF: Symmetrical Hierarchical Forest with Pretrained Vision Transformer Encoder for High-Resolution Medical Segmentation, Enzhi Zhang et al. introduce a tree-based patching strategy. By focusing computational power on high-detail regions (such as cellular structures) and using larger patches for uniform backgrounds, they achieve up to a 32× speedup without modifying the underlying transformer architecture.
Sub-Quadratic and Linear-Time Backbones
Another strategy replaces the standard self-attention mechanism entirely when dealing with the long token sequences generated by small patches. In Scalable Diffusion Models with State Space Backbone, Changqian Yu et al. leverage State Space Models (SSMs) via the Mamba architecture. This allows the model to process long sequences in linear time, capturing fine spatial granularity without a quadratic explosion in resource requirements. Similarly, Sarah Hooper et al. demonstrate in A Study on Context Length and Efficient Transformers for Biomedical Image Analysis that sub-quadratic alternatives like Hyena and MambaVision provide substantial speedups while maintaining high performance at long context lengths.
Localized and Deformable Attention
Rather than computing global interactions across an inflated token set, models can restrict attention to relevant neighborhoods. In Swin Deformable Attention U-Net Transformer (SDAUT) for Explainable Fast MRI, Jiahao Huang et al. utilize deformable attention to dynamically balance granularity and resource consumption. For deepfake detection, Dat Nguyen et al. introduce FakeFormer: Efficient Vulnerability-Driven Transformers for Generalisable Deepfake Detection, which uses local attention modules to force the network to focus exclusively on "vulnerable patches" where manipulation artifacts typically manifest, lowering computational overhead.
Virtual Resolution via Sub-Token Shifts
Rather than physically shrinking the patch size during training or inference, fine-grained details can be recovered post-hoc. In Sub-token ViT Embedding via Stochastic Resonance Transformers, Dong Lao introduces a training-free method that applies sub-token shifts to input images and aggregates the resulting features. This approach effectively recovers the fine-grained spatial details lost during standard tokenization without incurring the inference costs of a small-patch architecture.
Key Foundational Work
Emerging Properties in Self-Supervised Vision Transformers (2021) — contributed 3 concept elements to this direction.
Segmenter: Transformer for Semantic Segmentation (2021) — contributed 2 concept elements to this direction.
TransBTS: Multimodal Brain Tumor Segmentation Using Transformer (2021) — contributed 2 concept elements to this direction.