ConvNets Match Vision Transformers at Scale

Samuel L. Smith, Andrew Brock, Leonard Berrada, Soham DearXiv 2023

Abstract

Many researchers believe that ConvNets perform well on small or moderately sized datasets, but are not competitive with Vision Transformers (ViTs) when given access to datasets on the web-scale. We challenge this belief by evaluating a performant ConvNet architecture pre-trained on JFT-4B, a large labelled dataset of images often used for training foundation models. We consider pre-training compute budgets between 0.4k and 110k TPU-v4 core compute hours, and train a series of networks of increasing depth and width from the NFNet model family. We observe a log-log scaling law between held out loss and compute budget. After fine-tuning on ImageNet, NFNets match the reported performance of Vision Transformers with comparable compute budgets. Our strongest fine-tuned model achieves a Top-1 accuracy of 90.4%.

Introduction

In recent years, the computer vision community has largely pivoted from ConvNets to Vision Transformers, especially for "foundation models" trained on web-scale data. The common narrative is that while ConvNets are efficient on small datasets, ViTs possess superior scaling properties that allow them to dominate as data and compute increase. However, the authors argue that this comparison hasn't been entirely fair, often pitting modern ViTs against older ConvNet baselines like the original ResNet. This paper asks a fundamental question: If we give a modern ConvNet the same amount of data and compute as a ViT, does it still fall behind?

Methods and Scaling Laws

The researchers utilized the NFNet (Normalizer-Free Network) family—a convolutional architecture that replaces Batch Normalization with Adaptive Gradient Clipping (AGC). NFNets were designed to be highly efficient on modern TPU hardware while avoiding the complexities of normalization layers at scale.

Key methodological choices included scaling depth and width (from F0 to F7+) and exploring compute budgets ranging from 400 to 110,000 TPU-v4 core hours. A central finding was the observation of clear log-log scaling laws between validation loss and compute budget, mirroring the predictable scaling famously observed in Large Language Models.

JFT-4B Validation Loss vs. Compute Budget

To optimize performance, the team tuned the learning rate and epoch budget for each compute level. They found that as the total compute budget increases, the optimal strategy involves increasing both the model size and the number of training epochs at a similar rate.

Key Results

When compared at similar compute budgets, NFNets match the reported performance of flagship ViT models. Their strongest model, an NFNet-F7+ pre-trained for 8 epochs, achieved 90.3% Top-1 accuracy on ImageNet. With the addition of "repeated augmentation" (RA) during fine-tuning, this rose to 90.4%.

ImageNet Top-1 Error vs. Compute Budget

In terms of efficiency, the authors estimate that an NFNet-F7+ requires significantly less compute to reach these heights than some of the most famous ViT variants. For instance, the NFNet-F7+ requires ~110k TPU-v4 hours compared to the estimated ~280k for ViT-G/14. These results suggest that the specific architectural paradigm (CNN vs. Transformer) matters less than the total compute and data available, provided the model is sensibly designed.

Conclusion

This work reaffirms the "Bitter Lesson" of AI: scale and data often trump architectural nuances. While ViTs may hold a practical edge in multimodal research (like CLIP) due to unified building blocks for text and images, ConvNets remain highly competitive for pure vision tasks at the largest scales. Future work may address data pipeline inconsistencies and further optimize ConvNet kernels for non-TPU hardware to broaden their applicability.

Summary updated

BibTeX
@misc{smith2023convnets,
  author = {Samuel L. Smith and Andrew Brock and Leonard Berrada and Soham De},
  title = {{ConvNets Match Vision Transformers at Scale}},
  year = {2023},
  eprint = {2310.16764},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.16764},
}
Figure