Introduction
Self-supervised learning (SSL) has become a cornerstone of modern machine learning, enabling the training of powerful representations from unannotated data. However, these models often suffer from poor uncertainty estimation, frequently producing overconfident predictions. While "Deep Ensembles"—averaging the outputs of multiple independently trained models—are the gold standard for improving calibration and robustness in supervised settings, they are computationally prohibitive for large-scale SSL. Training and maintaining multiple massive encoders (e.g., ResNet-50 or ViT) multiplies compute and memory costs linearly, making them impractical for many real-world applications.
Proposed Methodology: Efficient Diversity
To address these challenges, this work introduces an ensemble of independent sub-networks. Instead of ensembling the entire model, the architecture utilizes a single shared encoder $f_\theta$ followed by $M$ independent, lightweight projection heads $g_1, \dots, g_M$.
The training objective combines a standard SSL loss (e.g., contrastive or self-distillation) with a novel diversity regularization term $\ell_{div}$. The SSL loss is calculated based on the mean embedding of the sub-networks. To prevent these sub-networks from collapsing into identical functions, the diversity loss applies a hinge penalty to the standard deviation of embeddings across the ensemble, ensuring they maintain a minimum margin of disagreement ($\alpha$). This "shallow" ensembling approach provides the benefits of model diversity at a fraction of the cost.
Experimental Evaluation
The method was evaluated across diverse domains, including computer vision (CIFAR-10/100, ImageNet), natural language processing (SentEval), and genomics (SecReT6).
Key Results
The proposed approach demonstrates significant improvements in both predictive performance and calibration:
- Efficiency: While a 10-model deep ensemble incurs a 900% increase in compute and memory, this method adds only ~6% compute and ~10% memory overhead for 10 sub-networks.
- Calibration and Accuracy: As shown in the comparative results, the method consistently matches or exceeds the accuracy of baselines while significantly reducing the Expected Calibration Error (ECE) and Negative Log-Likelihood (NLL).
- Robustness: The method improved Out-of-Distribution (OOD) detection AUROC by up to 6% and showed superior performance in semi-supervised fine-tuning scenarios with limited labels (1% or 10%).
Conclusion
By ensembling lightweight projection heads and enforcing representation diversity through a dedicated loss term, this work provides a scalable path toward robust and well-calibrated self-supervised models. It achieves the benefits of deep ensembles—improved uncertainty estimation and robustness—without the prohibitive computational costs typically associated with multi-model training. Future work may explore the application of this technique to larger foundation models and automated hyperparameter tuning for the diversity margin.
Summary updated