NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Self-Supervised Learning Across Domains

Silvia Bucci, Antonio D'Innocente, Yujun Liao, Fabio Maria Carlucci, Barbara Caputo, Tatiana Tommasi

TL;DR

This paper introduces a multi-task learning framework that bridges the "domain gap" in computer vision by combining standard supervised object recognition with self-supervised "pretext" tasks like solving jigsaw puzzles or predicting image rotation. By forcing a model to understand the structural regularities of an image (like spatial orientation and part correlation) alongside semantic labels, the authors achieve state-of-the-art performance in generalizing to unseen styles, such as recognizing a "horse" whether it appears in a photo, a sketch, or an oil painting.

What Problem Does This Paper Address?

Deep learning models are notoriously brittle when faced with domain shift—the phenomenon where a model trained on one type of data (e.g., real-world photos) fails when tested on another (e.g., cartoons or sketches). While humans can easily generalize because we understand the underlying "shape" and "structure" of objects, AI often overfits to specific textures or lighting conditions.

The authors tackle three specific challenges:

  1. Domain Generalization (DG): Training on multiple source domains to perform well on a completely unseen target domain.
  2. Domain Adaptation (DA): Leveraging unlabeled data from a specific target domain during training.
  3. Partial Domain Adaptation (PDA): A more realistic scenario where the target domain only contains a subset of the classes present in the source domain.

Methods

The core idea is inspired by how children learn: parents provide a few labels ("that's a dog"), but the child autonomously learns about the world's structure by playing. The authors implement this via a multi-task architecture:

  • The Backbone: A shared convolutional feature extractor (like ResNet or AlexNet).
  • Task A (Supervised): A standard classifier that predicts object labels (e.g., "car," "house") using cross-entropy loss.
  • Task B (Self-Supervised): A secondary "pretext" task that requires no manual labels. The authors use two main variants:
  • Jigsaw: An image is split into a $3 \times 3$ grid, the patches are shuffled, and the model must predict which permutation was used to reassemble them.
  • Rotation: The model predicts whether an image has been rotated by $0^\circ, 90^\circ, 180^\circ,$ or $270^\circ$.

By training on both tasks simultaneously, the self-supervised task acts as a powerful regularizer. It prevents the network from "cheating" by looking at local textures and instead forces it to learn global shapes and spatial relationships that are consistent across different artistic styles.

Datasets

The authors evaluate their approach on several diverse benchmarks:

  • PACS: The gold standard for domain generalization, featuring 7 classes across four domains: Photo, Art Painting, Cartoon, and Sketch.
  • Office-Home: 65 categories of everyday objects across four domains (Art, Clipart, Product, Real-World).
  • VLCS: Aggregates images from four classic datasets (PASCAL VOC, LabelMe, Caltech, Sun).
  • Digits: MNIST, MNIST-M, and SVHN for single-source generalization tests.
  • Office-31 & VisDA2017: Used for the Partial Domain Adaptation (PDA) experiments.
  • CompCars: Used for "Predictive" Domain Adaptation, involving car types across different years and viewpoints.

Key Insights and Ideas

  • Shape over Texture: Self-supervision (especially Jigsaw) forces the model to focus on how object parts fit together. This is "style-agnostic" information. A sketch of a horse has the same part-correlations as a photo of a horse, even if the pixel values are wildly different.
  • The Power of "No Labels": Because self-supervised tasks don't require human annotation, they can be run on the unlabeled target data during Domain Adaptation. This "anchors" the model's feature space to the target domain's distribution without needing target-side labels.
  • Simplicity Wins: The authors show that this multi-task approach often outperforms much more complex adversarial training methods or specialized domain-alignment layers.
  • Task Sensitivity: Interestingly, they found that Rotation is often more effective than Jigsaw for Domain Adaptation, likely because it’s a simpler global signal that is less disruptive to the feature maps than patch-shuffling.

Key Results

  • Domain Generalization: On the PACS dataset using a ResNet-18 backbone, the multi-task (Jigsaw+Rotation) approach achieved an average accuracy of 81.41%, outperforming several specialized state-of-the-art methods like MASF and Epi-FCR.
  • Partial Domain Adaptation: In the challenging VisDA2017 (Synthetic $\to$ Real) scenario, their method reached 71.95% accuracy, a significant jump over the ResNet-50 baseline of 45.26% and even specialized PDA methods like PADA (53.53%).
  • Visual Evidence: Using Class Activation Maps (CAM), the authors demonstrated that their model consistently "looks" at the actual object (e.g., the body of a dog) across domains, whereas standard models often get distracted by background elements or style-specific textures.

Limitations and Future Work

  • Hyper-parameter Tuning: The model introduces weights ($\alpha$ and $\beta$) to balance the supervised and self-supervised losses. While the authors claim robustness, finding the optimal balance for a new dataset still requires some validation effort.
  • Task Selection: The paper focuses on Jigsaw and Rotation. While effective, these are "pre-designed" tasks. Future work could explore more modern self-supervised techniques like contrastive learning (e.g., SimCLR or MoCo) within this multi-task framework.
  • Computational Overhead: Training on multiple tasks simultaneously increases the computational cost per epoch, though the authors argue the generalization benefits outweigh this.

Summary updated

BibTeX
@article{bucci2022self,
  author = {Silvia Bucci and Antonio D'Innocente and Yujun Liao and Fabio Maria Carlucci and Barbara Caputo and Tatiana Tommasi},
  title = {{Self-Supervised Learning Across Domains}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  url = {https://openreview.net/forum?id=GpSVdaIlS5K},
}

Loading related content...

Figure