TL;DR
Hierarchical Vision Transformers (HViTs) that use padded downsampling consistently develop a bizarre quirk: a single, massive-norm token pinned to the top-left corner of the feature map, which acts as a persistent attention sink. The authors trace this "Corner Sink" to asymmetric zero-padding in strided convolutions and a learned query bias, and introduce two training-free fixes—Dual-Padding Register (DPR) and Informative Value Readout (IVR)—that clean up spatial features and boost dense prediction tasks without needing to retrain the model.
What Problem Does This Paper Address?
In plain Vision Transformers (ViTs) like DINOv2 and CLIP, researchers have previously noticed "high-norm outlier" tokens—tokens that soak up disproportionate attention and encode global image information, often popping up at random, image-dependent background locations.
Hierarchical ViTs (HViTs) work differently: they shrink spatial resolution progressively using strided convolutions and depthwise convolutions. How these architectural choices affect attention sinks was largely a mystery. Looking across a wide range of vision and vision-language models, the authors uncovered a striking pattern: HViTs with padded downsampling (like PVTv2, TransNeXt, CSWin, VSSD, FastVLM, and DeepSeek-OCR-2) always grow a massive-norm token at the exact same spot—the top-left (TL) corner—regardless of what is in the image. Plain ViTs and HViTs without padded downsampling (like SwinV2 and PVTv1) don't do this.
Methods
To figure out why this happens, the authors run a controlled study on PVTv2-B2-NoSN (a version of PVTv2 with intermediate LayerNorms removed to match plain pre-norm ViTs). They trace the Corner Sink's lifecycle from birth to attention-sink selection, and then design two complementary, training-free interventions:
- Dual-Padding Register (DPR): Instead of modifying weights, DPR copies the top-left token into an auxiliary "register" token and splits the forward pass into two branches. The spatial branch switches to modified padding (like replicate padding) to stop the corner artifact from forming, while the register branch keeps zero padding so it can continue acting as the learned attention sink. The register is routed independently using its own state and three spatial neighbors, participates in attention, and is excluded from spatial pooling and dense outputs.
- Informative Value Readout (IVR): While DPR preserves the sink's attention allocation, the register itself doesn't necessarily carry useful image content. IVR fixes this in the final Stage-4 attention block by replacing the register's value with the mean of all spatial values within each attention head. This leaves queries, keys, and attention weights untouched, effectively turning the sink into an informative global readout.
Datasets
- ImageNet-1K: 1,000 validation images were used for the mechanistic analysis, and the full validation set for measuring top-1 classification accuracy.
- OmniDocBench: 1,000 document images were used to evaluate DeepSeek-OCR-2.
- ADE20K: Used for frozen-backbone semantic segmentation (measured via mIoU with linear probing).
- NYUv2: Used for frozen-backbone monocular depth estimation (measured via RMSE with linear probing).
Key Insights and Ideas
- Symmetric padding isn't actually symmetric: When a strided convolution (e.g., $3 \times 3$, stride 2, zero-pad 1) processes an even-sized feature map, it reads zero-padding asymmetrically. The top-left output sees five zero-padded entries, while the bottom-right sees none.
- Convolutions learn to love the corner: Depthwise convolutions (DWConvs) in the feed-forward networks develop TL-selective kernels with L-shaped negative weights aligned to the top-left padding. Zero-padding removes these inhibitory signals, causing a shared, image-independent TL component to snowball across Stage 3.
- Query bias flips the switch: In Stage 4, spatial reduction is turned off, making the TL token an individual key. A learned query bias ($b_q$) aligns strongly with this TL key (cosine similarity 0.84–0.86), giving it a built-in logit advantage across all spatial queries—causing it to vacuum up ~66% of the attention.
- Formation and selection are separable: Suppressing the query-bias preference drops ImageNet top-1 accuracy by 4.42% while leaving the TL norm virtually unchanged (252 vs. 260). Conversely, DPR+IVR removes the spatial artifact while keeping the sink's helpful global role intact.
Key Results
- Universal in padded HViTs: Every examined HViT with padded downsampling showed a top-left norm ratio $R_{\text{TL}} > 2$ (ranging from 2.39 to 16.06) and $P_{\text{TL}} = 100\%$ (meaning TL was the largest-norm token in every single evaluated image). Plain ViTs and non-padded HViTs stayed at $R_{\text{TL}} < 1$ and $P_{\text{TL}} \le 2\%$.
- Cleaner spatial features: DPR pushes $R_{\text{TL}}$ below 1.0 across PVTv2-B2, TransNeXt-B, CSWin-B, VSSD-S, and FastVLM. With a minor adaptation placing the register at sequence position zero (DPR*), it also drops $R_{\text{TL}}$ from 13.8 to 0.62 in DeepSeek-OCR-2.
- Better dense prediction, minimal accuracy loss: Across PVTv2-B2-NoSN, B3, B4, and B5, DPR+IVR improves ADE20K segmentation by 0.41–1.49 mIoU and reduces NYUv2 depth RMSE by 0.0082–0.0445 compared to the original models. Meanwhile, ImageNet-1K top-1 accuracy drops by only 0.02–0.34 points (compared to 0.08–2.50 points for Test-Time Registers).
Limitations and Future Work
While DPR+IVR preserves classification accuracy better than Test-Time Registers (TTR-TL), neither method consistently dominates the other on dense prediction tasks across all model sizes. Additionally, architectures that inject positional information outside the standard padded-downsampling pathway (like DeepSeek-OCR-2) require adapting the register placement (DPR*). The authors suggest that their separation principle can be generalized to other architectures with alternative positional injection mechanisms.
Summary updated