arXiv(opens in a new tab)cs.CVSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.01041

ViTAMINS: An Empirical Study of Training Self-Supervised Vision Transformers with Synthetic Hard Negatives

Nikos Giakoumoglou, Andreas Floros, Kleanthis-Marios Papadopoulos, Tania Stathaki

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Nikos Giakoumoglou

Andreas Floros

Kleanthis-Marios Papadopoulos

Tania Stathaki

Imperial College London

{nikos,andreas.floros18,kleanthis-marios.papadopoulos18,tania}@imperial.ac.uk

Code: https://github.com/giakoumoglou/vitamins

Figure

Figure 1. Vision Transformer (ViT-S/16) attention visualization of ViTAMINS. For each image set, we show the input image, CLS token attention, and patch attention maps from our method. Our approach with memory and synthetic hard negatives produces focused attention on semantically important regions with clear object boundaries and fine-grained details.

Abstract

We introduce ViTAMINS, a method that integrates synthetic hard negatives into unsupervised vision transformer pre-training to improve representation quality. Our approach is thoroughly benchmarked on ImageNet and transfer learning, image retrieval, copy detection, and image, video segmentation tasks. Notably, our proposed negatives give rise to emergent properties, where learned representations contain explicit information about the semantic content of an image and serve as excellent classifiers (up to +11.3% over baselines). ViTAMINS achieves these benefits through simple modifications to existing contrastive frameworks and outperforms competing methods while being more resource efficient, e.g., our ViT-B surpasses V-JEPA with ViT-L. Our findings motivate reconsidering contrastive learning as a simpler yet powerful alternative to dominant generative and self-distillation approaches.

1. Introduction

Transformers [68] have revolutionized computer vision as powerful alternatives to ConvNets [23, 48, 66], adopting an NLP-inspired strategy of pretraining on large data and finetuning on the target dataset [23, 66]. Scaling to bil-

lions of parameters on increasingly diverse datasets, they achieve state-of-the-art performance in both supervised and self-supervised paradigms [30, 33, 53].

Self-supervised learning has established itself as a powerful approach for visual representation learning, enabling models to extract meaningful patterns from vast amounts of unlabeled data [4, 8, 28, 46]. Self-supervised approaches for vision fall into three categories: (i) pretext task methods that solve auxiliary tasks such as rotation prediction [29, 52] or jigsaw puzzles [52]; (ii) generative methods that reconstruct or predict masked portions of inputs, such as MAE [33] inspired by masked language modeling [9, 22, 59, 60], and BEiT [5] following BERT-like pretraining [22, 45]; and (iii) joint embedding architecture methods that learn representations by comparing different views of data in a shared embedding space [14, 15, 31, 32, 61]. This work focuses on training transformers with joint embedding architectures, unlike prior works using generative methods [5, 33, 55].

The joint embedding methods adapted for vision transformers fall into three categories shown in Figure 2, each using different “tricks” to avoid representational collapse: (i) contrastive learning methods embed different augmented views of the same image into a joint space, maximizing similarity between same-instance embeddings while minimizing similarity across instances [15, 18, 32, 71] (Fig-

Figure

Figure 2. Self-supervised learning categories on vision transformers and this paper's contribution. From left to right: (a) contrastive learning method [18, 71]; (b), (c) self-distillation [14, 31]; (d) clustering-based [54]; and (e) ViTAMINS (ours). Our method introduces synthetic hard negatives generated "on-the-fly" to improve contrastive learning methods for vision transformers. Shaded circles ○ represent observed variables, dashed gray lines indicate the momentum update, // indicates a stop-gradient for backpropagation, white boxes represent functions, and red boxes represent loss functions. Abbreviations legend: Enc: encoder, Proj: projector, Pred: predictor.

ure 2a); (ii) self-distillation (teacher–student) methods train a student to match a teacher's embeddings without negatives [6, 7, 14, 31] (Figures 2b and 2c); and (iii) clustering-based methods employ clustering objectives [11–13, 54] (Figure 2d).

Transformers trained with joint embedding methods exhibit emergent properties beyond classification accuracy: their features encode explicit semantic segmentation information that emerges less clearly in supervised transformers or ConvNets [14]. Self-distillation methods like DINO [14, 53, 63] and iBOT [78] show strong unsupervised segmentation, with attention aligning to object boundaries without supervision. Such behaviors arise from extensive pretraining and architectural design.

Despite generative methods achieving higher accuracy [5, 33], joint embedding approaches remain competitive and often surpass them in linear probing [7, 53]. Among these, contrastive methods stand out for their simplicity and efficiency [18, 71], explicitly using negatives to define representation boundaries [15, 32], yet have received less attention recently.

We seek to answer the simple question:

Can simple modifications to negative sampling in contrastive learning unlock stronger representations and emergent properties for vision transformers comparable to or exceeding those of self-distillation methods?

In this paper, we address this question by integrating synthetic hard negative generation in transformer-based con-

trastive learning, a strategy previously demonstrated effective for convolutional networks [27, 38] but not investigated for vision transformers. Instead of using complex architectures or training schemes (like multi-crop, centering, sharpening, etc., see Section 2), we adapt established synthetic negative generation approaches to transformer architectures, generating challenging samples "on-the-fly".

Through extensive empirical evaluation, we demonstrate that integrating synthetic hard negatives into transformer-based self-supervised learning yields three key improvements over training without synthetic hard negatives or without negatives: (i) higher top-1 accuracy on ImageNet linear evaluation (Tables 1 and 2), achieving 73.1% and 77.1% with ViT-S/16 and ViT-B/16, and 75.4% and 78.0% with Swin-T and Swin-S, respectively; (ii) improved transfer learning performance across diverse downstream tasks (Tables 6 to 8); and (iii) strong emergent properties, where self-supervised vision transformer features encode explicit semantic segmentation information (Tables 3 to 5), producing precise attention maps that capture object boundaries (Figure 3) and serve as effective k-NN classifiers (Tables 1 and 2), achieving 73.3% top-1 accuracy with ViT-B/16.

References (76)

  • From overfitting to robustness: Quantity, quality, and variety oriented negative sample selection in graph contrastive learning, 2024
  • Self-supervised learning from images with a joint-embedding predictive architecture, 2023
  • Lejepa: Provable and scalable self-supervised learning without the heuristics, 2025
  • A cookbook of self-supervised learning, 2023
  • Beit: Bert pre-training of image transformers, 2022
  • Vicreg: Variance-invariance-covariance regularization for self-supervised learning, 2022
  • Revisiting feature prediction for learning visual representations from video (opens arXiv in a new tab)
  • Advances in neural information processing systems, 33:1877–1901, 2020
  • Cascade r-cnn: High quality object detection and instance segmentation, 2019
  • Deep clustering for unsupervised learning of visual features, 2019
  • Unsupervised pre-training of image features on non-curated data, 2019
  • Unsupervised learning of visual features by contrasting cluster assignments
  • Emerging properties in self-supervised vision transformers, 2021
  • A simple framework for contrastive learning of visual representations, 2020
  • Exploring simple siamese representation learning, 2020
  • Improved baselines with momentum contrastive learning, 2020
  • An empirical study of training self-supervised vision transformers, 2021
  • Context autoencoder for self-supervised representation learning, 2023
  • Describing textures in the wild
  • Imagenet: A large-scale hierarchical image database
  • Bert: Pre-training of deep bidirectional transformers for language understanding, 2018
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale, 2021
  • Evaluation of gist descriptors for web-scale image search
  • With a little help from my friends: Nearest-neighbor contrastive learning of visual representations, 2021
  • Whitening for self-supervised representation learning, 2021
  • Synco: Synthetic hard negatives for contrastive visual representation learning, 2025
  • A review on discriminative self-supervised learning methods in computer vision, 2025
  • Unsupervised representation learning by predicting image rotations, 2018
  • Self-supervised pretraining of visual features in the wild, 2021
  • Bootstrap your own latent: A new approach to self-supervised learning, 2020
  • Momentum contrast for unsupervised visual representation learning, 2020
  • Masked autoencoders are scalable vision learners, 2021
  • Learning deep representations by mutual information estimation and maximization, 2019
  • Deep networks with stochastic depth, 2016
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift, 2015
  • Space-time correspondence as a contrastive random walk
  • Hard negative mixing for contrastive learning, 2020
  • Supervised contrastive learning, 2021
  • Revisiting self-supervised visual representation learning, 2019
  • Do better imagenet models transfer better?, 2019
  • 3d object representations for fine-grained categorization
  • Rectified Ipjepa: Joint-embedding predictive architectures with sparse and maximum-entropy representations, 2026
  • Albert: A lite bert for self-supervised learning of language representations, 2020
  • Deep learning
  • Microsoft coco: Common objects in context, 2015
  • Swin transformer: Hierarchical vision transformer using shifted windows, 2021
  • Decoupled weight decay regularization, 2019
  • Rectified linear units improve restricted boltzmann machines vinod nair
  • Automated flower classification over a large number of classes
  • Unsupervised learning of visual representations by solving jigsaw puzzles, 2016
  • Dinov2: Learning robust visual features without supervision, 2023
  • Unsupervised visual representation learning by synchronous momentum grouping, 2022
  • Beit v2: Masked image modeling with vector-quantized visual tokenizers, 2022
  • Lost in quantization: Improving particular object retrieval in large scale image databases
  • The 2017 davis challenge on video object segmentation, 2018
  • Revisiting oxford and paris: Large-scale image retrieval benchmarking, 2018
  • Improving language understanding by generative pre-training
  • Language models are unsupervised multitask learners
  • Learning transferable visual models from natural language supervision, 2021
  • Contrastive learning with hard negative samples
  • Dinov3, 2025
  • What makes for good views for contrastive learning? In Advances in Neural Information Processing Systems, pages 6827–6839
  • Pushing the limits of self-supervised resnets: Can we outperform supervised learning without labels on imagenet?, 2022
  • Training data-efficient image transformers and distillation through attention, 2021
  • Representation learning with contrastive predictive coding, 2019
  • Attention is all you need
  • Sun database: Large-scale scene recognition from abbey to zoo
  • Unified perceptual parsing for scene understanding, 2018
  • Self-supervised learning with swin transformers, 2021
  • Simmim: A simple framework for masked image modeling, 2022
  • Decoupled contrastive learning, 2022
  • Learning efficient coding of natural images with maximum manifold capacity representations, 2023
  • Barlow twins: Self-supervised learning via redundancy reduction, 2021
  • Colorful image colorization, 2016
  • Semantic understanding of scenes through the ade20k dataset, 2018
  • ibot: Image bert pre-training with online tokenizer, 2022