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

Improving Robustness and Efficiency in Active Learning with Contrastive Loss

Ranganath Krishnan, Nilesh Ahuja, Alok Sinha, Mahesh Subedar, Omesh Tickoo, Ravi IyerarXiv 2021

Abstract

We introduce supervised contrastive active learning (SCAL) and propose efficient query strategies in active learning based on the feature similarity (featuresim) and principal component analysis based feature-reconstruction error (fre) to select informative data samples with diverse feature representations. We demonstrate our proposed method achieves state-of-the-art accuracy, model calibration and reduces sampling bias in an active learning setup for balanced and imbalanced datasets on image classification tasks. We also evaluate robustness of model to distributional shift derived from different query strategies in active learning setting. Using extensive experiments, we show that our proposed approach outperforms high performing compute-intensive methods by a big margin resulting in 9.9% lower mean corruption error, 7.2% lower expected calibration error under dataset shift and 8.9% higher AUROC for out-of-distribution detection.

Introduction

Active Learning (AL) is a powerful paradigm designed to minimize labeling costs by strategically selecting the most informative samples for human annotation. Despite its potential, traditional AL methods often suffer from three critical shortcomings: a lack of robustness to distributional shifts, inherent sampling bias that degrades performance on imbalanced datasets, and high computational overhead. Methods like BALD or CoreSet, while effective, are often too compute-intensive to scale efficiently to large-scale real-world applications.

This paper introduces Supervised Contrastive Active Learning (SCAL), a framework that addresses these challenges by combining supervised contrastive loss with novel, high-speed query strategies. SCAL not only improves accuracy but also enhances model calibration and robustness, outperforming state-of-the-art methods while being up to 26x faster.

Methodology

The core of SCAL lies in the synergy between Supervised Contrastive Learning (SCL) and feature-guided data selection. Unlike standard cross-entropy loss, SCL pulls features of the same class together while pushing different classes apart in the embedding space, creating highly organized, well-separated clusters.

Building on this structured feature space, we propose two efficient query strategies:

  1. featuresim (Feature Similarity): This strategy utilizes cosine similarity to identify unlabeled samples that are most distinct from the currently labeled set. It prioritizes samples with the lowest similarity to existing data clusters.
  2. fre (Feature-Reconstruction Error): Leveraging Principal Component Analysis (PCA), this method identifies samples whose features cannot be well-reconstructed using the PCA components of their predicted class. High reconstruction error indicates novel, informative features that the model has yet to master.

To mitigate sampling bias, SCAL employs a Balanced Selection mechanism, ensuring an equal number of samples are selected for each predicted class during every iteration.

t-SNE visualization of selected samples across different query strategies. SCAL (featuresim) demonstrates a more diverse and representative selection compared to BALD, which exhibits higher sampling bias.

Experimental Results

We evaluated SCAL across several benchmarks, including CIFAR-10, SVHN, and an imbalanced version of CIFAR-10. The results demonstrate that SCAL consistently achieves superior performance with significantly less data.

Accuracy and Data Efficiency

On imbalanced datasets, SCAL achieved 5.1% higher accuracy than BALD. Furthermore, to reach 80% of maximum possible accuracy on imbalanced data, SCAL required 48% fewer labeled samples than random selection. The efficiency of our query strategies is also notable: SCAL is 26x faster than BALD and 11x faster than CoreSet.

Test accuracy vs. number of labeled images for Imbalanced-CIFAR10, CIFAR10, and SVHN. SCAL variants consistently outperform baseline methods across different data distributions.

Robustness and Calibration

Beyond raw accuracy, SCAL significantly improves model reliability. Under dataset shifts (tested on CIFAR10-C), SCAL resulted in a 9.9% lower mean corruption error and a 7.2% lower expected calibration error. This indicates that the model is not only more accurate but also more "honest" about its uncertainty, a critical requirement for safety-critical applications.

Conclusion

SCAL represents a significant step forward in making Active Learning both robust and efficient. By leveraging the structured feature space provided by contrastive learning, we can employ simple yet powerful distance-based query strategies that outperform complex Bayesian alternatives. Future work will focus on expanding these strategies to other domains such as Natural Language Processing and 3D point clouds, as well as further optimizing the PCA recomputation process for high-dimensional spaces.

Summary updated

BibTeX
@misc{krishnan2021improving,
  author = {Ranganath Krishnan and Nilesh Ahuja and Alok Sinha and Mahesh Subedar and Omesh Tickoo and Ravi Iyer},
  title = {{Improving Robustness and Efficiency in Active Learning with Contrastive Loss}},
  year = {2021},
  eprint = {2109.06873},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.06873},
}
Figure