Sharpness-diversity tradeoff: improving flat ensembles with SharpBalance
Haiquan Lu, Xiaotian Liu, Yefan Zhou, Qunli Li, Kurt Keutzer, Michael W. Mahoney, Yujun Yan, Huanrui Yang, Yaoqing Yang
TL;DR
The paper addresses the challenge that reducing per-model sharpness in deep ensembles via sharpness-aware optimization can unintentionally diminish ensemble diversity, limiting gains in performance. It provides theoretical and empirical evidence for a sharpness-diversity trade-off and introduces SharpBalance, a data-subset training strategy where each ensemble member minimizes sharpness on a distinct subset, improving diversity for a given sharpness level. The approach is backed by theoretical bounds and validated on CIFAR-10/100 and TinyImageNet, showing improved ID and OOD generalization with only minor training overhead. Overall, the work advances ensemble robustness by balancing local minima flatness with inter-model diversity, enabling more reliable uncertainty quantification and generalization to out-of-distribution data.
Abstract
Recent studies on deep ensembles have identified the sharpness of the local minima of individual learners and the diversity of the ensemble members as key factors in improving test-time performance. Building on this, our study investigates the interplay between sharpness and diversity within deep ensembles, illustrating their crucial role in robust generalization to both in-distribution (ID) and out-of-distribution (OOD) data. We discover a trade-off between sharpness and diversity: minimizing the sharpness in the loss landscape tends to diminish the diversity of individual members within the ensemble, adversely affecting the ensemble's improvement. The trade-off is justified through our theoretical analysis and verified empirically through extensive experiments. To address the issue of reduced diversity, we introduce SharpBalance, a novel training approach that balances sharpness and diversity within ensembles. Theoretically, we show that our training strategy achieves a better sharpness-diversity trade-off. Empirically, we conducted comprehensive evaluations in various data sets (CIFAR-10, CIFAR-100, TinyImageNet) and showed that SharpBalance not only effectively improves the sharpness-diversity trade-off, but also significantly improves ensemble performance in ID and OOD scenarios.
