Skip to main content
QUICK REVIEW

[Paper Review] PeCo: Perceptual Codebook for BERT Pre-training of Vision Transformers

Xiaoyi Dong, Jianmin Bao|arXiv (Cornell University)|Nov 24, 2021
Advanced Neural Network ApplicationsComputer Science64 references32 citations
TL;DR

PeCo introduces a perceptual visual codebook learned with a perceptual loss to guide BERT-style pre-training of vision transformers, achieving stronger transfer to downstream tasks than BEiT and MAE.

ABSTRACT

This paper explores a better prediction target for BERT pre-training of vision transformers. We observe that current prediction targets disagree with human perception judgment.This contradiction motivates us to learn a perceptual prediction target. We argue that perceptually similar images should stay close to each other in the prediction target space. We surprisingly find one simple yet effective idea: enforcing perceptual similarity during the dVAE training. Moreover, we adopt a self-supervised transformer model for deep feature extraction and show that it works well for calculating perceptual similarity.We demonstrate that such learned visual tokens indeed exhibit better semantic meanings, and help pre-training achieve superior transfer performance in various downstream tasks. For example, we achieve $ extbf{84.5\%}$ Top-1 accuracy on ImageNet-1K with ViT-B backbone, outperforming the competitive method BEiT by $ extbf{+1.3\%}$ under the same pre-training epochs. Our approach also gets significant improvement on object detection and segmentation on COCO and semantic segmentation on ADE20K. Equipped with a larger backbone ViT-H, we achieve the state-of-the-art ImageNet accuracy ( extbf{88.3\%}) among methods using only ImageNet-1K data.

Motivation & Objective

  • Motivate a prediction target for masked image modeling that aligns with human perception.
  • Introduce a perceptual loss to learn a discrete visual codebook via VQ-VAE.
  • Demonstrate that perceptual tokens yield more semantically meaningful representations.
  • Show transfer improvements on image classification, object detection, and semantic segmentation.

Proposed method

  • Use VQ-VAE to convert images into discrete visual tokens with a learnable codebook of size K=8192.
  • Incorporate a perceptual loss computed from multi-scale features of a self-supervised ViT (MoCo v3) to train the VQ-VAE encoder/quantizer.
  • Apply a BERT-like masked image modeling objective over the perceptual codebook tokens where a classifier predicts masked token IDs.
  • Pre-train ViT backbones (ViT-B/16, ViT-L, ViT-H) using the PeCo tokens and standard masking strategy.
  • Fine-tune on downstream tasks: ImageNet-1K classification, COCO object detection, and ADE20K semantic segmentation.

Experimental results

Research questions

  • RQ1Can perceptual similarity-based tokenization lead to better semantic learning than pixel- or DALL·E-based tokens?
  • RQ2Does a perceptual codebook improve transfer performance for ViT models across classification, detection, and segmentation tasks?
  • RQ3How does PeCo compare to BEiT and MAE under similar pre-training settings and data constraints?

Key findings

  • PeCo achieves 84.5% Top-1 accuracy on ImageNet-1K with ViT-B, surpassing BEiT by 1.3% at the same 800 pre-training epochs.
  • With a larger backbone ViT-H, PeCo reaches 88.3% Top-1 on ImageNet-1K using only ImageNet-1K data, achieving state-of-the-art in this setting.
  • PeCo shows substantial gains on COCO object detection and ADE20K semantic segmentation compared to prior self-supervised methods.
  • A lite tokenizer variant retains competitive performance while reducing encoding costs.
  • Codewords learned with the perceptual loss exhibit higher semantic meaning as evidenced by improved linear probing and reconstruction classification results.

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.