NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Transfer Learning for Fine-grained Classification Using Semi-supervised Learning and Visual Transformers

Manuel Lagunas, Brayan Impata, Victor Martinez, Virginia Fernandez, Christos Georgakis, Sofia Braun, Felipe BertrandarXiv 2023 · DOI

Introduction

Fine-grained classification involves distinguishing between highly similar sub-categories, such as different neck styles on a vest or specific patterns on a phone case. In the e-commerce domain, while images are plentiful, obtaining high-quality human-annotated labels is expensive and time-consuming. This paper explores bridging this "label gap" by combining Vision Transformers (ViT) with semi-supervised learning (SSL) to leverage vast amounts of unlabeled data.

Visual examples of fine-grained classification tasks for vests, phone cases, and aprons.

Methods

The study evaluates three primary architectures:

  1. ResNet18: A standard Convolutional Neural Network (CNN) baseline.
  2. ViT-Base: A Vision Transformer pretrained with Masked Autoencoders (MAE).
  3. Semi-ViT: A ViT model integrated with an SSL framework during fine-tuning.

The core of the Semi-ViT approach is an EMA-Teacher framework. A teacher model (an exponential moving average of the student's weights) generates pseudo-labels for unlabeled images, which the student model then learns to predict. To enhance robustness, the authors implemented probabilistic pseudo mixup, interpolating between unlabeled samples and their pseudo-labels to improve regularization and prevent over-reliance on incorrect predictions.

Datasets

The researchers curated three new datasets from Amazon’s marketplace, specifically targeting fine-grained attributes:

  • Vest Neck Style: 29K labeled and 227K unlabeled images (13 classes).
  • Phone Case Pattern: 37K labeled and 287K unlabeled images (21 classes).
  • Apron Food Bib Pattern: 39K labeled and 284K unlabeled images (26 classes).

Labels were obtained via crowdsourcing, requiring consensus from at least two of three annotators to ensure high-quality ground truth.

Key Results and Insights

The experimental results demonstrate that Semi-ViT significantly outperforms both the CNN baseline and standard ViT models across all tasks.

Comparative performance metrics for all three datasets across different models and label percentages.

The 50% Rule

A pivotal finding is that Semi-ViT achieves performance comparable to or better than a standard ViT using only 50% of the labeled data. For instance, in the Vest Neck Style task, Semi-ViT with 50% labels matches the performance of a standard ViT with 100% labels. This suggests that SSL can drastically reduce the costs associated with manual data annotation while maintaining high accuracy.

Transformers vs. CNNs

Even without SSL, ViT architectures consistently surpassed the ResNet18 baseline. This confirms that the self-attention mechanism in Transformers is more effective at capturing global spatial relationships necessary for fine-grained distinctions than traditional CNNs.

The "Unlabeled Collapse"

The study also identified a limit to the benefits of unlabeled data. When the unlabeled pool for the Apron dataset was increased to 400% of its original size, performance declined. The authors suggest that an extreme skew in the ratio of labeled to unlabeled data can cause the unlabeled data to "drive" the training, leading to a loss of precision.

Conclusion

This research highlights the power of combining Vision Transformers with semi-supervised learning for fine-grained classification in data-scarce environments. While the approach shows great promise for e-commerce applications, future work is needed to address label noise in crowdsourced data and to optimize the balance between labeled and unlabeled samples. Additionally, moving toward multi-attribute models could further improve efficiency in large-scale marketplace settings.

Summary updated

BibTeX
@misc{lagunas2023transfer,
  author = {Manuel Lagunas and Brayan Impata and Victor Martinez and Virginia Fernandez and Christos Georgakis and Sofia Braun and Felipe Bertrand},
  title = {{Transfer Learning for Fine-grained Classification Using Semi-supervised Learning and Visual Transformers}},
  year = {2023},
  eprint = {2305.10018},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10018},
}
Figure