ViT-ProtoNet for Few-Shot Image Classification: A Multi-Benchmark Evaluation

Abdulvahap Mutlu, Şengül Doğan, Türker Tuncer
7/12/2025
cs.CVcs.AIcs.LG

No official code found. Best implementation: abdulvahapmutlu/vit-protonet (1 star, MIT, PyTorch, last commit 2025-07-12).

Abstract

The remarkable representational power of Vision Transformers (ViTs) remains underutilized in few-shot image classification. In this work, we introduce ViT-ProtoNet, which integrates a ViT-Small backbone into the Prototypical Network framework. By averaging class conditional token embeddings from a handful of support examples, ViT-ProtoNet constructs robust prototypes that generalize to novel categories under 5-shot settings. We conduct an extensive empirical evaluation on four standard benchmarks: Mini-ImageNet, FC100, CUB-200, and CIFAR-FS, including overlapped support variants to assess robustness. Across all splits, ViT-ProtoNet consistently outperforms CNN-based prototypical counterparts, achieving up to a 3.2\% improvement in 5-shot accuracy and demonstrating superior feature separability in latent space. Furthermore, it outperforms or is competitive with transformer-based competitors using a more lightweight backbone. Comprehensive ablations examine the impact of transformer depth, patch size, and fine-tuning strategy. To foster reproducibility, we release code and pretrained weights. Our results establish ViT-ProtoNet as a powerful, flexible approach for few-shot classification and set a new baseline for transformer-based meta-learners.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

A lightweight PyTorch implementation of Prototypical Networks using a ViT-Small/16 backbone for few-shot classification on standard benchmarks (Mini-ImageNet, CUB-200, CIFAR-FS, FC100). Includes both production scripts for training & evaluation and Jupyter notebooks for interactive analysis.

10Python, Jupyter NotebookJul 12, 20251 years agoMIT
artificial-intelligencecomputer-visiondeep-learningfew-shot-classificationfew-shot-learning+8 more

Cite this paper

@article{mutlu2025vitprotonet,
  title  = {ViT-ProtoNet for Few-Shot Image Classification: A Multi-Benchmark Evaluation},
  author = {Abdulvahap Mutlu and Şengül Doğan and Türker Tuncer},
  year   = {2025},
  eprint = {2507.09299},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.09299v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.09299.svg)](https://codeofpaper.com/paper/2507.09299)

Discussion