Semantic-Aware Generation for Self-Supervised Visual Representation Learning

Yunjie Tian, Lingxi Xie, Xiaopeng Zhang, Jiemin Fang, Haohang Xu, Wei Huang, Jianbin Jiao, Qi Tian, Qixiang YearXiv 2021

Abstract

Self-supervised learning (SSL) has seen significant progress through discriminative and generative approaches. However, discriminative methods often discard fine-grained details, while generative methods frequently over-focus on low-level pixel noise. We present SaGe (Semantic-aware Generation), a framework that integrates these two paradigms. By utilizing a frozen, pre-trained evaluator to supervise image reconstruction in a high-level feature space rather than pixel space, SaGe learns representations that capture both global semantics and local structural details. Our method achieves state-of-the-art performance on ImageNet-1K benchmarks and demonstrates superior transferability to downstream tasks like object detection and semantic segmentation.

Introduction

The field of self-supervised visual representation learning is currently dominated by two main strategies: discriminative and generative. Discriminative methods, such as contrastive learning (e.g., MoCo, SimCLR) and asymmetric networks (e.g., BYOL), focus on learning representations invariant to data augmentations. While effective, these methods can lose "view-specific" information essential for dense prediction tasks. Conversely, generative methods like autoencoders aim to reconstruct the input image, preserving more detail but often failing to distinguish between semantically meaningful structures and irrelevant pixel-level noise.

The core challenge lies in the objective function for generation. Standard Mean Squared Error (MSE) in pixel space treats all pixels equally, regardless of their semantic importance. SaGe addresses this by introducing a "Semantic-aware Generation" branch that shifts the reconstruction target from raw pixels to the feature space of a pre-trained evaluator.

Methodology: The SaGe Framework

SaGe builds upon the BYOL architecture, adding a generative component that works in tandem with the discriminative branch. The architecture, illustrated in Figure 1, comprises three primary modules:

  1. The Encoder ($f_E$): The target network responsible for learning visual features.
  2. The Decoder ($f_D$): An auxiliary network that attempts to reconstruct the original image from the encoder's latent representations.
  3. The Evaluator ($f'_E$): A frozen, pre-trained SSL model that provides semantic supervision.
The SaGe architecture combines a discriminative branch (top) with a generative branch (bottom) supervised by a frozen evaluator.

During training, two augmented views of an image, $x^{(1)}$ and $x^{(2)}$, are processed. The discriminative loss ($L_D$) encourages the online encoder to predict the target encoder's representation. Simultaneously, the generative branch takes the features from the online encoder and passes them through the decoder to produce a recovered image $\tilde{x}^{(2)}$.

Instead of a pixel-wise comparison, the generation loss ($L_G$) is computed by passing both the original image $x$ and the recovered image $\tilde{x}^{(2)}$ through the frozen evaluator. The loss is calculated across multiple hierarchical scales ($h_G$), from global 1x1 vectors to 28x28 feature maps. This hierarchical supervision ensures the model captures both high-level context and mid-level textures.

Key Insights: Why Semantic-Awareness Matters

The fundamental motivation for SaGe is that pixel-level similarity does not equate to semantic similarity. As shown in Figure 2, different reconstructions can have the same pixel-level MSE relative to the original image, yet vary significantly in how well they preserve the object's identity and structure.

Comparison of pixel-level vs. semantic-level similarity. While pixel loss may be identical for different reconstructions, semantic loss correctly identifies the most semantically accurate image.

By moving the loss function into the feature space of a semantic evaluator, SaGe forces the encoder to prioritize features that are semantically relevant. This approach balances invariance (from the discriminative task) with equivariance (from the generative task), preventing the "semantic degradation" often caused by aggressive data augmentations in purely discriminative models.

Experimental Results

SaGe was evaluated on ImageNet-1K and several downstream benchmarks, consistently outperforming baselines.

ImageNet-1K Performance

On the ImageNet-1K linear probe benchmark, SaGe achieved 75.0% Top-1 accuracy after 800 epochs of pre-training. This surpasses the BYOL baseline (74.3%) and other prominent methods like SwAV and DINO (without multi-crop). Notably, SaGe showed a substantial improvement in Nearest Neighbor (k-NN) evaluation, reaching 68.7% compared to BYOL's 64.8%. This suggests that SaGe's feature space is more semantically organized and robust.

Transfer Learning and Downstream Tasks

The benefits of semantic-aware generation are most evident in dense prediction tasks:

  • MS-COCO: For object detection and instance segmentation, SaGe improved the bounding box AP ($AP^{bb}$) to 40.8%, outperforming MoCo v2 and DenseCL.
  • Cityscapes: In semantic segmentation, SaGe achieved 76.9 mIoU, demonstrating its ability to learn features that transfer well to complex urban environment understanding.

Conclusion and Future Work

SaGe successfully bridges the gap between discriminative and generative self-supervised learning. By replacing pixel-level reconstruction with semantic-level feature matching, it learns more robust and transferable visual representations.

While SaGe requires a pre-trained evaluator and additional compute for the decoder during training, the resulting performance gains on downstream tasks justify the overhead. Future research will explore integrating SaGe with masked image modeling (MIM) and investigating methods to reduce the dependency on a pre-trained evaluator, potentially through a self-evolving teacher mechanism.

Summary updated

BibTeX
@misc{tian2021semantic,
  author = {Yunjie Tian and Lingxi Xie and Xiaopeng Zhang and Jiemin Fang and Haohang Xu and Wei Huang and Jianbin Jiao and Qi Tian and Qixiang Ye},
  title = {{Semantic-Aware Generation for Self-Supervised Visual Representation Learning}},
  year = {2021},
  eprint = {2111.13163},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.13163},
}
Figure