Contrastive View Design Strategies to Enhance Robustness to Domain Shifts in Downstream Object Detection

Kyle Buettner, Adriana KovashkaarXiv 2022 · DOI

Abstract

Self-supervised contrastive learning has become a standard for pretraining computer vision models, yet these models often exhibit brittleness when deployed in real-world scenarios. This paper identifies that standard random cropping strategies inadvertently teach models to rely on "shortcuts" such as background context or local textures. To address this, we introduce novel view-generation strategies, including saliency-based cropping and shortcut-reducing augmentations like Poisson blending and texture flattening. These methods force models to learn robust object shapes, significantly improving detection performance across diverse domain shifts, including varying weather conditions, artistic styles, and unusual contexts.

The Problem: Contextual and Texture Biases

While frameworks like MoCo and SimCLR are powerful, their reliance on aggressive random cropping introduces two primary biases that limit generalization:

  1. Contextual Bias: Random crops often capture an object alongside its typical background (e.g., a boat on water). Consequently, the model learns to recognize the background rather than the object itself, leading to failure in "out-of-context" scenarios.
  2. Texture Bias: Small crops may only capture local patches of an object, encouraging the model to focus on textures (like fur or scales) instead of global shape. This makes models vulnerable to distortions caused by weather (fog, snow) or stylistic changes.
Standard random cropping often captures irrelevant background context or limited object patches, leading to shortcut learning.

Proposed Methods

We utilize Instance Localization (InsLoc) as a base pretext task and modify its view design through three strategic pillars:

Geometric Constraints

By increasing the minimum crop size (to 70% of the image) and enforcing an Intersection over Union (IoU) constraint between views, we ensure that positive pairs share larger, spatially consistent object parts. This shift encourages the model to prioritize global shape over local features.

Shortcut-Reducing Augmentations

To prevent the model from exploiting easy edge or color shortcuts, we introduced three novel augmentations:

  • Poisson Blending: Seamlessly blends objects into backgrounds to eliminate high-contrast edge shortcuts.
  • Texture Flattening: Preserves edges while washing out internal textures, forcing a focus on geometry.
  • Elastic Deformation: Applies displacement fields to pixels, making features invariant to local noise.
Texture Flattening preserves object edges while removing internal texture details to mitigate texture bias.

Saliency-Based Priors

Using an unsupervised saliency detector (DeepUSPS), we generate "Tightened" crops focused on the most important image regions. Combined with Texture Flattening of Non-Salient regions (TFNS), this strategy effectively isolates the object from its background context.

Key Results and Insights

Our experiments demonstrate that these view-design strategies yield substantial gains in robustness:

  • Weather and Style Robustness: On the VOC-Weather benchmark, combining Poisson blending with larger crops improved Average Precision (AP) by +3.07 over the baseline. Similar gains were observed on "Abstract" datasets (Clipart, Comic), with a +2.16 AP improvement.
  • Contextual Robustness: The "DeepUSPS-Tight" strategy provided a significant +3.51 AP50 boost on the UnRel dataset, which features objects in unusual relations (e.g., a car under an elephant), proving reduced reliance on background "crutches."
  • Strategic Synergy: The most effective models utilized a hybrid approach: using saliency to localize the object and applying shortcut-reducing augmentations to the surrounding background.

Conclusion and Future Work

This research highlights that how we construct "views" in contrastive learning is as critical as the learning architecture itself. By constraining the model to ignore shortcuts, we can build object detectors that are far more resilient to the complexities of the real world. Future work will explore the scalability of these strategies to larger datasets like ImageNet-21k and their interaction with emerging architectures like Vision Transformers (ViTs).

Summary updated

BibTeX
@misc{buettner2022contrastive,
  author = {Kyle Buettner and Adriana Kovashka},
  title = {{Contrastive View Design Strategies to Enhance Robustness to Domain Shifts in Downstream Object Detection}},
  year = {2022},
  eprint = {2212.04613},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.04613},
}
Figure