To Stay or Not to Stay in the Pre-train Basin: Insights on Ensembling in Transfer Learning

Ildus Sadrtdinov, Dmitrii Pozdeev, Dmitry P. Vetrov, Ekaterina Lobacheva

Abstract

Fine-tuning multiple models from a single pre-trained checkpoint often results in low-diversity ensembles that reside within the same "pre-train basin." This paper investigates the diversity gap in transfer learning and proposes StarSSE, a parallel ensembling strategy designed to explore the local basin effectively. By launching independent "rays" from a central anchor model, StarSSE achieves superior accuracy and robustness compared to traditional sequential ensembling methods, maintaining the benefits of pre-training while maximizing ensemble diversity.

Introduction

In modern deep learning, transfer learning and ensembling are two of the most effective strategies for improving model performance. Transfer learning leverages pre-trained weights to jumpstart training on a target task, while ensembling combines multiple models to reduce variance and improve generalization. However, combining these techniques presents a unique challenge: models fine-tuned from the same pre-trained checkpoint tend to be highly similar, lacking the diversity necessary for a powerful ensemble.

Researchers have identified that these models typically reside within the same "pre-train basin"—a region of the loss landscape connected by paths of high accuracy. While increasing diversity is possible by using higher learning rates to escape this basin, doing so often incurs a "drift penalty," where models lose the general knowledge gained during pre-training and overfit the target task.

Methodology

The Limitations of Snapshot Ensembling (SSE)

Snapshot Ensembling (SSE) uses cyclical learning rates to collect model snapshots during a single training run. In the context of transfer learning, the authors find that standard SSE is inherently sequential. Each subsequent snapshot drifts further from the initial pre-trained weights, leading to a progressive degradation in individual model quality and, consequently, the ensemble's overall effectiveness.

StarSSE: Parallel Exploration

To overcome the sequential drift of SSE, the authors propose StarSSE. This method follows a "star" topology:

  1. Anchor Model: A single model is fine-tuned from the pre-trained checkpoint using standard hyperparameters.
  2. Independent Rays: Multiple short training runs (rays) are launched independently, starting from the anchor model rather than the previous snapshot.
  3. Controlled Diversity: These rays use higher learning rates to push models toward different boundaries of the local pre-train basin without drifting into the overfitting zone.

Additionally, the authors explore Model Soups, where the weights of the ensemble members are averaged to create a single, robust model, which is particularly effective within the high-connectivity region of the pre-train basin.

Experimental Results

The proposed methods were evaluated across several datasets, including CIFAR-10, CIFAR-100, and SUN-397, using both supervised (SV) and self-supervised (SSL) pre-training.

Performance comparison of StarSSE against baselines across multiple datasets and pre-training regimes.

As shown in the results above, StarSSE consistently outperforms "Local Deep Ensembles" (independent runs from the same checkpoint) and standard SSE. For instance, on CIFAR-100 with supervised pre-training, StarSSE achieved an accuracy of 86.30%, surpassing the 85.65% of the standard local ensemble approach. The plots further illustrate that StarSSE maintains higher test accuracy as the ensemble size increases, demonstrating its ability to capture beneficial diversity while staying within the high-quality pre-train basin.

Robustness and Scale

Beyond standard classification, StarSSE showed significant improvements in robustness to out-of-distribution (OOD) data, such as the corrupted images in CIFAR-100C. The method also scaled effectively to large-scale foundation models, such as CLIP (ViT-B/32) on ImageNet, where it significantly outperformed baseline fine-tuning strategies.

Conclusion

The study concludes that for transfer learning, a parallel exploration strategy like StarSSE is fundamentally superior to sequential snapshot methods. By resetting to a high-quality anchor model for each ensemble member, practitioners can maximize diversity while avoiding the "drift penalty" associated with leaving the pre-train basin. This approach offers a computationally efficient path to building more accurate and robust models in transfer learning scenarios.

Summary updated

BibTeX
@inproceedings{sadrtdinov2023stay,
  author = {Ildus Sadrtdinov and Dmitrii Pozdeev and Dmitry P. Vetrov and Ekaterina Lobacheva},
  title = {{To Stay or Not to Stay in the Pre-train Basin: Insights on Ensembling in Transfer Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=NNooZoQpP4},
}
Figure