How Good is a Single Basin?

Kai Lion, Lorenzo Noci, Thomas Hofmann, Gregor Bachmann

Abstract

The multi-modal nature of neural loss landscapes is often considered to be the main driver behind the empirical success of deep ensembles. In this work, we probe this belief by constructing various "connected" ensembles which are restricted to lie in the same basin. Through our experiments, we demonstrate that increased connectivity indeed negatively impacts performance. However, when incorporating the knowledge from other basins implicitly through distillation, we show that the gap in performance can be mitigated by re-discovering (multi-basin) deep ensembles within a single basin. Thus, we conjecture that while the extra-basin knowledge is at least partially present in any given basin, it cannot be easily harnessed without learning it from other basins.

Introduction

In deep learning, the loss landscape—the multidimensional terrain of error values for model weights—is notoriously complex and multi-modal. Standard deep ensembles achieve high performance by training multiple models from different random initializations, causing them to land in distinct "basins" or valleys of low error. This separation provides predictive diversity, as models in different basins tend to make different types of errors.

Historically, it was believed that this diversity required models to be separated by "high-loss barriers." If two models are linearly mode-connected (LMC)—meaning the loss remains low along a straight line between their weights—they are considered to be in the same basin and are typically thought to lack the diversity necessary for a strong ensemble. This paper investigates whether visiting multiple basins is strictly necessary for high performance, or if a single basin can harbor sufficient diversity if properly explored.

Methods: Constructing Connected Ensembles

The authors explore several techniques to create "connected ensembles" where all members reside within the same basin:

  1. Stochastic Weight Ensembling (SWE): A baseline that explores a single basin by saving checkpoints during training with a constant learning rate.
  2. Constrained Ensembles: Models initialized from the same mid-training checkpoint but trained with different data orderings to maintain linear mode connectivity.
  3. Permutation Alignment: Using algorithms like Git Re-Basin to permute neurons of independent models to bring them into the same basin.
  4. Distilled Ensembles: The core contribution of this work. A standard multi-basin ensemble acts as a teacher. A student model in a specific basin is then "nudged" via distillation to match the predictions of models from other basins while being constrained to stay within its original basin.
Conceptual overview of the proposed distillation method. By leveraging knowledge from models in distant basins, we can re-discover diverse solutions within a single basin, bypassing the high-loss barriers that typically separate them.

Key Results and Discussion

The experiments reveal a fundamental "Diversity-Connectivity Trade-off": simple methods that force connectivity often sacrifice the predictive diversity that makes ensembles powerful. Furthermore, the authors identify a "Joint Connectivity Trap," where it is significantly harder to connect an entire ensemble simultaneously than it is to connect pairs of models.

However, the Distilled Ensemble approach successfully bridges this gap. On CIFAR-100 with ResNet20, a standard deep ensemble achieves 78.15% accuracy, while a simple connected ensemble (SWE) reaches only 74.95%. The Distilled Ensemble significantly recovers this performance, reaching 77.56% while remaining in a single basin.

Linear mode connectivity analysis across different architectures and datasets. The 'distilled' ensembles (orange dashed lines) consistently eliminate the high-loss barriers found in standard 'base' ensembles (blue solid lines).

As shown in the connectivity analysis, the distilled models exhibit a flat loss curve between members, confirming they reside in the same basin. This suggests that the information found in distant basins is latent within any given basin but requires a "map"—provided here by distillation—to be accessed by standard optimization techniques.

Conclusion

This work demonstrates that while the multi-modal nature of loss landscapes is a natural source of diversity, it is not an absolute requirement for high-performing ensembles. Single basins are information-rich enough to match the performance and robustness of multi-basin ensembles when guided by distillation. Future research will focus on unlocking this latent diversity natively within a single basin without the need for a multi-basin teacher, potentially offering the benefits of deep ensembles at a significantly lower computational cost.

Summary updated

BibTeX
@inproceedings{lion2024how,
  author = {Kai Lion and Lorenzo Noci and Thomas Hofmann and Gregor Bachmann},
  title = {{How Good is a Single Basin?}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=Hagh421e9n},
}
Figure