Skip to main content
QUICK REVIEW

[Paper Review] Efficient Training of Visual Transformers with Small-Size Datasets

Yahui Liu, Enver Sangineto|arXiv (Cornell University)|Jun 7, 2021
Advanced Neural Network ApplicationsComputer Science75 references12 citations
TL;DR

This paper proposes a self-supervised task that enhances Visual Transformers (VTs) for small-data regimes by encouraging spatial relation learning with minimal computational cost. When combined with standard supervised training, it significantly improves VT robustness and accuracy on small datasets across multiple architectures and benchmarks.

ABSTRACT

Visual Transformers (VTs) are emerging as an architectural paradigm alternative to Convolutional networks (CNNs). Differently from CNNs, VTs can capture global relations between image elements and they potentially have a larger representation capacity. However, the lack of the typical convolutional inductive bias makes these models more data-hungry than common CNNs. In fact, some local properties of the visual domain which are embedded in the CNN architectural design, in VTs should be learned from samples. In this paper, we empirically analyse different VTs, comparing their robustness in a small training-set regime, and we show that, despite having a comparable accuracy when trained on ImageNet, their performance on smaller datasets can be largely different. Moreover, we propose a self-supervised task which can extract additional information from images with only a negligible computational overhead. This task encourages the VTs to learn spatial relations within an image and makes the VT training much more robust when training data are scarce. Our task is used jointly with the standard (supervised) training and it does not depend on specific architectural choices, thus it can be easily plugged in the existing VTs. Using an extensive evaluation with different VTs and datasets, we show that our method can improve (sometimes dramatically) the final accuracy of the VTs. The code will be available upon acceptance.

Motivation & Objective

  • Address the data-hungry nature of Vision Transformers (VTs), which lack the inductive bias of CNNs and underperform on small datasets.
  • Investigate why VTs show large performance variations on small training sets despite similar ImageNet accuracy.
  • Develop a self-supervised training component that improves VT generalization under data scarcity without architectural changes.
  • Ensure the method is plug-and-play, compatible with existing VT architectures and training pipelines.

Proposed method

  • Introduce a self-supervised task that encourages Vision Transformers to learn spatial relationships within images by predicting masked patches based on global context.
  • Integrate the self-supervised task as an auxiliary loss during training, alongside the standard supervised cross-entropy loss.
  • Apply the self-supervised task during pre-training or fine-tuning with negligible computational overhead.
  • Use a standard VT backbone (e.g., ViT) and train jointly on both supervised and self-supervised objectives using the same input data.
  • Design the self-supervised task to be architecture-agnostic, enabling easy integration into existing VT frameworks.
  • Train using standard optimization protocols, with the self-supervised loss weighted to balance with the main classification objective.

Experimental results

Research questions

  • RQ1How do different Vision Transformer architectures perform when trained on small datasets, despite similar ImageNet accuracy?
  • RQ2Can a lightweight self-supervised task improve the robustness of Vision Transformers in low-data regimes?
  • RQ3Does the proposed self-supervised task enhance spatial understanding in VTs without increasing computational cost?
  • RQ4To what extent can the method be generalized across different VT architectures and datasets?

Key findings

  • Vision Transformers exhibit significant performance variance on small datasets, even when achieving comparable accuracy on ImageNet.
  • The proposed self-supervised task improves VT accuracy on small datasets, with improvements observed across multiple architectures.
  • The method achieves substantial accuracy gains—sometimes dramatic—on benchmarks such as CIFAR-100 and Stanford Cars with limited training data.
  • The self-supervised component adds minimal computational overhead, making it practical for real-world deployment.
  • The method is effective regardless of the underlying VT architecture, demonstrating broad compatibility and plug-and-play usability.
  • Joint training with the self-supervised task leads to better feature learning and improved generalization, especially in data-scarce settings.

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.