Abstract
Self-supervised learning (SSL) has traditionally focused on instance discrimination, often leading to a "texture bias" that hinders spatial reasoning. We present DILEMMA (Detection of Incorrect Location EMbeddings with MAsked inputs), a novel SSL pretext task that forces Vision Transformers (ViTs) to perform spatial reasoning by identifying patches with incorrect positional embeddings in sparse inputs. This approach significantly enhances "shape bias," leading to substantial improvements in downstream tasks like pose estimation and semantic segmentation while simultaneously accelerating training through input sparsity.
Introduction
Deep learning models frequently rely on local textures rather than global shapes, a phenomenon known as texture bias. While effective for standard classification, this bias limits performance on tasks requiring deep spatial understanding, such as pose estimation or object segmentation. Existing SSL methods like MoCo or DINO primarily optimize for instance discrimination—ensuring different views of the same image have similar features—but do not explicitly model the spatial arrangement of object parts. DILEMMA addresses this by requiring the model to understand exactly where each image patch belongs within the global structure.
Methodology: The DILEMMA Framework
DILEMMA utilizes a student-teacher architecture based on the Vision Transformer (ViT). The core innovation lies in the "mismatch detection" task combined with input sparsification.
The workflow consists of four primary stages:
- Tiling and Sparsification: The input image is divided into a grid of patches. To increase task difficulty and computational efficiency, the student network receives only a random subset (e.g., 25-50%) of these patches.
- Corruption (The "Dilemma"): For a subset of the remaining patches, the student is provided with incorrect positional embeddings. For instance, a patch from the top-left might be assigned coordinates for the bottom-right.
- Dual Loss Function: The model is trained using a joint objective:
- Contrastive Loss: The student must match the global class token (CLS) of a teacher network viewing the full, uncorrupted image.
- DILEMMA Loss: A binary classification task where the student predicts for every input token whether its positional embedding is correct or incorrect.
- Efficiency Gains: By processing fewer tokens, the student network can utilize significantly larger batch sizes, accelerating training by up to 2.5x on identical hardware.
Experimental Setup
The effectiveness of DILEMMA was evaluated across diverse benchmarks:
- Pre-training: ImageNet-1K and ImageNet-100.
- Shape-Focused Tasks: Yoga-82 (fine-grained pose estimation) and the Humanoid Vision Engine (HVE).
- Dense Prediction: ADE20K (semantic segmentation) and DAVIS/VOC12 (object segmentation).
- Generalization: 13 downstream classification datasets including CIFAR and specialized domains like Aircraft and Flowers102.
Key Results and Discussion
DILEMMA consistently improves the performance of established SSL frameworks. On ImageNet-1K, adding DILEMMA to MoCoV3 and DINO resulted in linear probing accuracy gains of 4.41% and 3.97%, respectively, within the same training time budget.
The most striking improvements were observed in shape-dependent tasks. On the Yoga-82 pose dataset, DILEMMA outperformed the MoCoV3 baseline by over 8% (64.90% vs. 56.41%). Similarly, in semantic segmentation on ADE20K, DILEMMA improved mean Intersection over Union (mIoU) by 4.6% over MoCoV3 and 5.2% over DINO.
These results suggest that input sparsity is not merely a computational trick but a functional component of the pretext task. It prevents the model from relying on local edge-matching between adjacent patches, forcing it to learn more robust global representations.
Conclusion and Limitations
DILEMMA demonstrates that explicitly training for spatial reasoning via positional embedding detection significantly enhances the quality of learned representations, particularly for shape-sensitive tasks. While highly effective, the method is currently specific to Transformer architectures due to its reliance on positional embeddings. Future work may explore more complex corruption types, such as coordinate regression, to further push the boundaries of spatial self-supervision.
Summary updated