DropPos: Pre-Training Vision Transformers by Reconstructing Dropped Positions

Haochen Wang, Junsong Fan, Yuxi Wang, Kaiyou Song, Tong Wang, Zhaoxiang Zhang

The Problem: Location Awareness in ViTs

A fundamental characteristic of Vision Transformers (ViTs) is their inherent insensitivity to the order of input tokens. Unlike Convolutional Neural Networks (CNNs), which have a built-in "inductive bias" for spatial structure, ViTs treat an image as a bag of unordered patches unless explicitly provided with Positional Embeddings (PEs).

Current self-supervised learning (SSL) paradigms, such as Contrastive Learning (CL) and Masked Image Modeling (MIM), have been wildly successful. However, they do not explicitly teach the model where things are in relation to each other. This lack of "location awareness" can limit performance on dense prediction tasks like object detection or segmentation, where spatial precision is critical.

Comparison of DropPos with other self-supervised learning paradigms.

To address this, the authors of DropPos ask: can we improve representation learning by making the model solve a giant, visual jigsaw puzzle?

How DropPos Works

DropPos is a novel self-supervised pretext task that improves ViTs by forcing them to reconstruct the original positions of image patches after their positional embeddings have been "dropped." The core idea is to make the model predict the actual grid position of a patch based solely on its visual appearance.

However, simply dropping all positional information can lead to trivial solutions or training discrepancies. To make this work effectively, the authors introduce three key components:

  1. Position Dropping with Partial Visibility: Instead of showing the model the whole image, DropPos masks a large subset of patches (similar to Masked Autoencoders, or MAE). For the patches that are visible, the model drops the positional embeddings for a large majority of them. The model must then classify the correct position for these "PE-dropped" patches among all possible grid locations.
  2. Position Smoothing: In a standard classification task, being "off by one" is penalized just as heavily as being "off by a mile." The authors argue that for spatial reasoning, predicting a neighboring position is a more acceptable mistake. They use a Gaussian-like smoothing strategy based on Euclidean distance to relax the loss function.
  3. Attentive Reconstruction: Some patches look nearly identical (e.g., two patches of clear blue sky). It is physically impossible—and semantically useless—to distinguish their exact original positions. The authors use the similarity between the [CLS] token and patch tokens to further relax the reconstruction target for patches that share similar visual features.
The DropPos pre-training pipeline.

The architecture remains a standard ViT backbone followed by a lightweight "projector" (a simple MLP or shallow Transformer) that performs the patch-wise position classification.

Key Insights

  • Spatial Reasoning is a Signal: The core insight is that position itself is a rich supervisory signal. By forcing the model to figure out where a patch belongs, it naturally learns about the layouts and shapes of objects.
  • Avoiding the Triviality Trap: If you give a ViT too much information (like all patches), it can solve the position task using low-level textures or "counting" shortcuts. By combining patch masking with position dropping, the model is forced to use high-level semantic context to place a patch correctly.
  • Handling Ambiguity: The introduction of Attentive Reconstruction is a clever way to handle the inherent ambiguity of natural images, ensuring the model isn't penalized for swapping visually indistinguishable patches.

Empirical Evaluation & Results

The researchers evaluated DropPos using standard, high-impact benchmarks, primarily utilizing ViT-Base (ViT-B/16) and ViT-Large (ViT-L/16) architectures pre-trained on ImageNet-1K.

DropPos demonstrated impressive efficiency and accuracy compared to established baselines:

  • ImageNet-1K Classification: Using a ViT-B/16, DropPos achieved 84.2% top-1 accuracy with 800 epochs of pre-training. This outperforms the popular MAE (83.6%) even though MAE was trained for twice as long (1600 epochs).
  • Dense Downstream Tasks: On COCO object detection, DropPos outperformed MAE by +0.4 AP (at 800 epochs) and showed even larger gains (+2.0 AP) when compared at shorter training durations (200 epochs).
  • Semantic Segmentation: On the ADE20k benchmark, DropPos consistently surpassed MAE, suggesting that the improved location awareness directly translates to better pixel-level understanding.

Limitations and Future Work

While the results are strong, the authors note a few areas for future exploration. Due to computational constraints, DropPos was not tested on "Huge" models (ViT-H), leaving its scaling behavior at the extreme high end an open question. Additionally, while the current work focuses on self-supervised pre-training, exploring how to integrate these location-aware strategies into supervised training could be a fruitful next step. Finally, adapting this grid-dependent method to more flexible or hierarchical architectures (like Swin Transformers) presents an exciting avenue for future research.

Summary updated

BibTeX
@inproceedings{wang2023droppos,
  author = {Haochen Wang and Junsong Fan and Yuxi Wang and Kaiyou Song and Tong Wang and Zhaoxiang Zhang},
  title = {{DropPos: Pre-Training Vision Transformers by Reconstructing Dropped Positions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=VhcsIxVEd9},
}
Figure