Introduction
While Vision Transformers (ViTs) have demonstrated remarkable potential in computer vision, they often struggle with data efficiency compared to traditional Convolutional Neural Networks (CNNs). Standard ViTs typically require massive datasets or complex distillation techniques to match CNN performance. This paper introduces the Convolution-enhanced image Transformer (CeiT), which bridges this gap by re-incorporating architectural "inductive biases"—specifically locality and spatial correlation—into the Transformer framework.
The Problem with Pure Transformers
The authors identify three primary limitations in vanilla Transformer architectures for vision tasks:
- Inefficient Low-Level Feature Extraction: Hard-splitting images into large, non-overlapping patches makes it difficult to capture fundamental structures like edges and corners.
- Lack of Locality: The standard Feed-Forward Network (FFN) processes tokens independently, ignoring spatial relationships between neighboring pixels.
- Underutilized Hierarchical Information: Most ViTs rely solely on the final layer's class token for prediction, discarding useful features from earlier layers.
The CeiT Architecture
CeiT addresses these issues through three targeted structural modifications designed to combine the strengths of CNNs and Transformers.
1. Image-to-Tokens (I2T) Module
Instead of simple patch splitting, CeiT utilizes a lightweight convolutional stem (a 7x7 convolution followed by max-pooling). This extracts low-level features and produces a feature map that is sampled into smaller 4x4 patches, making the embedding process more robust and easier for the model to optimize.
2. Locally-enhanced Feed-Forward (LeFF) Layer
The standard point-wise FFN is replaced with the LeFF module. In this layer, tokens are reshaped into a 2D grid and processed by a 3x3 depth-wise convolution to capture local spatial correlations before being flattened back into tokens. This ensures that the model maintains a sense of spatial locality throughout its depth.
3. Layer-wise Class token Attention (LCA)
To leverage multi-scale features, CeiT collects the "class tokens" from every encoder layer. A final Transformer-style attention block, the LCA, processes this sequence of tokens, allowing the model to integrate hierarchical information from the entire network for the final classification.
Key Results and Efficiency
CeiT demonstrates significant improvements in both accuracy and training efficiency. The CeiT-S variant achieves 82.0% Top-1 accuracy on ImageNet-1K, outperforming DeiT-S (79.9%) and ResNet-50 (76.7%) with a similar parameter count (~24M).
One of the most striking advantages is the convergence speed. By re-introducing convolutional priors, the model becomes much easier to train; a CeiT model trained for only 100 epochs can match the performance of a standard DeiT model trained for 300 epochs, representing a significant reduction in computational cost.
Conclusion
CeiT proves that inductive biases like locality and spatial hierarchy are not just "crutches" for small datasets, but essential features for efficient visual learning. By adding a small amount of convolutional overhead, CeiT achieves state-of-the-art performance and superior convergence. While the architecture is slightly more complex than a vanilla ViT, its robustness across downstream tasks—including iNaturalist and CIFAR—suggests that hybrid CNN-Transformer designs are a powerful direction for future computer vision research.
Summary updated