Skip to main content
QUICK REVIEW

[Paper Review] Incorporating Convolution Designs into Visual Transformers

Kun Yuan, Shaopeng Guo|arXiv (Cornell University)|Mar 22, 2021
Advanced Neural Network ApplicationsComputer Science5 citations
TL;DR

This paper proposes CeiT, a vision Transformer that integrates convolutional inductive biases to improve feature extraction and optimization. By introducing an Image-to-Tokens module, Locally-enhanced Feed-Forward layers, and Layer-wise Class token Attention, CeiT achieves state-of-the-art accuracy on ImageNet (83.3% top-1 with 384×384 input) and converges 3× faster than DeiT, without requiring large-scale data or knowledge distillation.

ABSTRACT

Motivated by the success of Transformers in natural language processing (NLP) tasks, there emerge some attempts (e.g., ViT and DeiT) to apply Transformers to the vision domain. However, pure Transformer architectures often require a large amount of training data or extra supervision to obtain comparable performance with convolutional neural networks (CNNs). To overcome these limitations, we analyze the potential drawbacks when directly borrowing Transformer architectures from NLP. Then we propose a new extbf{Convolution-enhanced image Transformer (CeiT)} which combines the advantages of CNNs in extracting low-level features, strengthening locality, and the advantages of Transformers in establishing long-range dependencies. Three modifications are made to the original Transformer: extbf{1)} instead of the straightforward tokenization from raw input images, we design an extbf{Image-to-Tokens (I2T)} module that extracts patches from generated low-level features; extbf{2)} the feed-froward network in each encoder block is replaced with a extbf{Locally-enhanced Feed-Forward (LeFF)} layer that promotes the correlation among neighboring tokens in the spatial dimension; extbf{3)} a extbf{Layer-wise Class token Attention (LCA)} is attached at the top of the Transformer that utilizes the multi-level representations. Experimental results on ImageNet and seven downstream tasks show the effectiveness and generalization ability of CeiT compared with previous Transformers and state-of-the-art CNNs, without requiring a large amount of training data and extra CNN teachers. Besides, CeiT models also demonstrate better convergence with $3 imes$ fewer training iterations, which can reduce the training cost significantly\footnote{Code and models will be released upon acceptance.}.

Motivation & Objective

  • To address the poor generalization of pure Transformers on small datasets by incorporating inductive biases from CNNs.
  • To improve feature representation by extracting low-level features before tokenization, enhancing locality and spatial correlation.
  • To accelerate training convergence by embedding local inductive biases into the Transformer architecture.
  • To achieve competitive performance on ImageNet and downstream tasks without relying on large-scale pretraining or knowledge distillation.

Proposed method

  • Introduces an Image-to-Tokens (I2T) module that generates low-level features via convolutional layers before patch tokenization, improving feature quality without increasing computation.
  • Replaces the standard feed-forward network with a Locally-enhanced Feed-Forward (LeFF) layer using depthwise convolutions to strengthen spatial correlation among neighboring tokens.
  • Applies a Layer-wise Class token Attention (LCA) mechanism that aggregates multi-level features to refine the class token representation.
  • Uses a multi-stage attention mechanism that leverages features from different encoder layers to improve final classification performance.
  • Employs BatchNorm and Max-pooling in the I2T and LeFF modules to stabilize training and boost performance.
  • Designs the architecture to maintain computational efficiency while embedding inductive biases from CNNs into the Transformer framework.

Experimental results

Research questions

  • RQ1Can incorporating convolutional inductive biases improve the generalization of vision Transformers on small datasets?
  • RQ2Does replacing raw image patch tokenization with feature-based tokenization enhance feature representation in vision Transformers?
  • RQ3Can local inductive biases in the feed-forward module improve spatial correlation modeling and training stability?
  • RQ4To what extent does the proposed architecture reduce training cost compared to standard Transformers like DeiT?
  • RQ5Can a hybrid CNN-Transformer design achieve SOTA performance without knowledge distillation or large-scale pretraining?

Key findings

  • CeiT-S achieves 82.0% top-1 accuracy on ImageNet with standard 224×224 input, outperforming ViT and DeiT variants.
  • When fine-tuned at 384×384 resolution, CeiT-S reaches 83.3% top-1 accuracy, demonstrating strong generalization.
  • CeiT models converge 3× faster than DeiT, achieving comparable performance in 100 epochs vs. DeiT’s 300 epochs.
  • The ablation study confirms that BatchNorm and kernel size of 3×3 in LeFF layers yield the best performance, improving accuracy by 2.2% over baseline.
  • The I2T module with Max-pooling and BatchNorm outperforms alternatives, proving critical for stable and effective feature extraction.
  • The LCA module improves top-1 accuracy by 0.6% over the baseline, confirming the value of multi-level feature aggregation.

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.