Skip to main content
QUICK REVIEW

[Paper Review] Revitalizing CNN Attentions via Transformers in Self-Supervised Visual Representation Learning

Chongjian Ge, Youwei Liang|arXiv (Cornell University)|Oct 11, 2021
Domain Adaptation and Few-Shot LearningComputer Science46 references6 citations
TL;DR

This paper proposes CARE, a novel framework that revitalizes CNN attention in self-supervised visual representation learning by using a parallel transformer stream to guide CNN encoder training. By leveraging transformer-extracted visual attention to supervise CNN features, CARE achieves state-of-the-art performance on image classification, object detection, and semantic segmentation benchmarks with minimal computational overhead in downstream tasks.

ABSTRACT

Studies on self-supervised visual representation learning (SSL) improve encoder backbones to discriminate training samples without labels. While CNN encoders via SSL achieve comparable recognition performance to those via supervised learning, their network attention is under-explored for further improvement. Motivated by the transformers that explore visual attention effectively in recognition scenarios, we propose a CNN Attention REvitalization (CARE) framework to train attentive CNN encoders guided by transformers in SSL. The proposed CARE framework consists of a CNN stream (C-stream) and a transformer stream (T-stream), where each stream contains two branches. C-stream follows an existing SSL framework with two CNN encoders, two projectors, and a predictor. T-stream contains two transformers, two projectors, and a predictor. T-stream connects to CNN encoders and is in parallel to the remaining C-Stream. During training, we perform SSL in both streams simultaneously and use the T-stream output to supervise C-stream. The features from CNN encoders are modulated in T-stream for visual attention enhancement and become suitable for the SSL scenario. We use these modulated features to supervise C-stream for learning attentive CNN encoders. To this end, we revitalize CNN attention by using transformers as guidance. Experiments on several standard visual recognition benchmarks, including image classification, object detection, and semantic segmentation, show that the proposed CARE framework improves CNN encoder backbones to the state-of-the-art performance.

Motivation & Objective

  • To address the under-explored visual attention in CNN encoders within self-supervised visual representation learning.
  • To improve CNN encoder performance by leveraging the attention mechanisms of vision transformers without altering the core SSL framework.
  • To develop a training paradigm that enables CNNs to learn attentive features comparable to those of transformers, while maintaining low inference cost.
  • To validate that transformer-guided attention supervision enhances feature quality in CNNs for downstream visual recognition tasks.

Proposed method

  • CARE employs a dual-stream architecture: a CNN stream (C-stream) and a parallel transformer stream (T-stream), both following a contrastive SSL pipeline with encoders, projectors, and predictors.
  • The T-stream takes features from CNN encoders as input and applies multi-head self-attention to produce enhanced, attentive representations.
  • The T-stream output is used to supervise the C-stream via a contrastive loss on attention-aware features, encouraging the CNN to learn similar attentive representations.
  • A weighted combination of the original SSL contrastive loss and an attention supervision loss (with hyperparameter λ) is used to jointly optimize both streams.
  • The T-stream uses learnable relative positional encoding to improve attention learning, outperforming fixed sinusoidal or no positional encoding.
  • The framework uses a parallel training design, where both streams are updated simultaneously, ensuring effective attention guidance to the CNN encoder.

Experimental results

Research questions

  • RQ1Can visual attention learned by vision transformers be effectively transferred to improve CNN encoder features in self-supervised learning?
  • RQ2Does using a parallel transformer stream to supervise CNN training lead to better feature representations than standard SSL training alone?
  • RQ3How does the choice of positional encoding and number of transformer blocks affect the performance of the supervised CNN encoder?
  • RQ4What is the optimal balance between the contrastive SSL loss and the attention supervision loss in the CARE framework?

Key findings

  • CARE achieves a top-1 accuracy of 72.06% on ImageNet using ResNet-50 with 100 training epochs, outperforming standard SSL methods.
  • Setting the attention loss weight λ = 100 yields the best performance, with a 1.54% improvement over λ = 0 (70.52%).
  • Using five transformer blocks (n = 5) in the T-stream achieves optimal performance, while increasing to six blocks degrades results due to loss imbalance.
  • Learnable relative positional encoding in the T-stream yields 72.06% top-1 accuracy, significantly outperforming fixed sinusoidal encoding (66.68%) and no encoding (69.49%).
  • The parallel design of the T-stream outperforms sequential training (72.02% vs. 69.32%), indicating that joint optimization is crucial for effective attention guidance.
  • On downstream tasks, CARE improves ResNet-50 performance to state-of-the-art levels on object detection (COCO AP: 57.2) and semantic segmentation (PASCAL VOC mIoU: 38.8).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.