Enhancing Diversity in Bayesian Deep Learning via Hyperspherical Energy Minimization of CKA

Particle-based Bayesian deep learning often requires a similarity metric to compare two networks. However, naive similarity metrics lack permutation invariance and are inappropriate for comparing networks. Centered Kernel Alignment (CKA) on feature kernels has been proposed to compare deep networks but has not been used as an optimization objective in Bayesian deep learning. In this paper, we explore the use of CKA in Bayesian deep learning to generate diverse ensembles and hypernetworks that output a network posterior. Noting that CKA projects kernels onto a unit hypersphere and that directly optimizing the CKA objective leads to diminishing gradients when two networks are very similar. We propose adopting the approach of hyperspherical energy (HE) on top of CKA kernels to address this drawback and improve training stability. Additionally, by leveraging CKA-based feature kernels, we derive feature repulsive terms applied to synthetically generated outlier examples. Experiments on both diverse ensembles and hypernetworks show that our approach significantly outperforms baselines in terms of uncertainty quantification in both synthetic and realistic outlier detection tasks.

Paper

References (47)

Scroll for more · 35 remaining

Similar papers

Peer review

Reviewer jUbb4/10 · confidence 3/52024-07-10

Summary

This paper introduces the hyperspherical energy as an objective to prompt the diversity of particles in BNNs. It claims that the hyperspherical energy approach can avoid permutation invariance in traditional diversity metrics.

Strengths

I agree that the diversity of particles in BNNs is an important problem. The proposed method introduces hyperspherical energy, which can avoid permutation invariance. This invariance is mainly due to the complex structures of DNNs, which previous Bayesian Inference methods have long ignored.

Weaknesses

The technical contribution of this paper is not strong enough. Only a new regularization term is added to the standard ensemble framework. The idea of hyperspherical energy comes from previous works, and I do not recognize significant changes from previous works.

Questions

1. The diversity evaluations are limited to synthetic data. I am not convinced that the proposed method can be scaled up. 2. Important ablation studies are missing. For example, different model architectures and the number of particles.

Rating

4

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

1. This paper is restricted to relatively small Bayesian neural networks, and does not discuss the scalability. 2. The proposed method can improve uncertainty estimation, but fails to improve accuracy.

Authorsrebuttal2024-08-13

We thank the reviewer for the recognition of our experimental results and the raised rating. We also appreciate the continuing discussion. We have discussed in our rebuttal the nontrivial changes and key properties of our proposed regularization method versus previous regularization techniques in ensemble training. As recognized by other reviewers, the combination of $\text{CKA}$ and $\text{HE}$ is a novel approach and a fresh perspective, and most importantly, it leads to improvements in practice for a long-standing important problem in ensemble learning, i.e., enabling better ensemble diversity (not attainable by merely switching channels within a network) which leads to significantly improved OOD performance. We disagree with the reviewer's attempt to dismiss any paper that works on regularization of networks to be not novel, without actually judging the contribution of the paper. Besides, our novel $\text{CKA}$+$\text{HE}$ kernel also allowed us to train for increased diversity on the synthetically generated outlier images which further significantly improved the OOD performance in all cases. To the best of our knowledge, this has not been explored in existing literature of ParVI methods.

Reviewer Wp137/10 · confidence 3/52024-07-12

Summary

The paper “Minimizing Hyperspherical Energy for Diverse Deep Ensembling” explores the use of Centered Kernel Alignment (CKA) and Minimization of Hyperspherical Energy (MHE) in Bayesian deep learning to enhance the diversity of ensemble models and parameters generated by hypernetworks. By incorporating these techniques, the authors aim to improve uncertainty quantification in both synthetic and real-world tasks, which is quantified by measuring OOD detection performance and calibration. The key contributions include proposing CKA as an optimization objective and utilizing MHE to address the diminishing gradient issue, leading to more stable training and better performance in uncertainty estimation.

Strengths

- **Original:** The paper introduces a novel approach by combining CKA and MHE to enhance the diversity of deep learning ensembles and hypernetworks, which is a fresh perspective in Bayesian deep learning. - **Detailed experiments:** The experimental results are comprehensive and demonstrate significant improvements in uncertainty quantification across various tasks, showing the practical effectiveness of the proposed methods. - **Well-written:** The paper is well-structured, with clear explanations of the methods and thorough discussions of the results. The figures and tables effectively illustrate the performance improvements.

Weaknesses

- The comparison of the approach in terms of OOD detection performance is slightly biased due to leveraging of generated OOD samples. Here in order to differentiate the contribution of the method from the incorporation of additional information a further experiments comparing against DDU would be warranted. In particular one could imagine adding a term to the loss which encourages low likelihood of the fitted GMM on OOD samples. - The comparisons in Figure 2 paint a slightly overly optimistic picture for the OOD HE approaches. In 2 dimensions the problem becomes quite trivial given negative / OOD samples. The difficulty of generating enough samples to cover the OOD volume becomes exponentially more difficult with increasing dimensionality of the input space and is especially easy when the diversity of the data is limited. - (Related to prior point) the datasets used to show the efficacy of the OOD approach are rather simple and small such that sample diversity is limited. Running one experiment on a larger dataset like imagenet would be very beneficial to show that the method can also work in the context of highly diverse input distributions and high dimensionality of the input space. - There seems to be a mistake in table 2 row Ensemble + HE, column PE - I recommend renaming Fig1 d and e to Cossim evaluation and HE evaluation as using objective gives the impression that the data shown is from models trained using these objectives. - As the work points out that applying the method to larger datasets would in principle be possible, this might be a good additional comparison to include. Many comparison approaches will have issues in this case, but comparison to other ensembling based approaches would be feasible.

Questions

- When running the LeNet comparisons agains DDU, was the model trained with spectral normalization (a requirement for DDU to function well) and how was the regularization strength determined? - Why was the normalization-free variant of LeNet used for some methods whereas the standard variant for the DDU baseline? - Page 9, line 289: Was the GMM fitted to the features of the pre-classification layer. I.e. to the features used by the last linear layer?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The work correctly points out that the small size of the datasets is one of the main limitations. Generally, seeing the efficacy of the approach in a larger scale training setup would significantly improve the paper.

Reviewer JKj86/10 · confidence 4/52024-07-14

Summary

The authors proposed to improve the quantification of particle diversity in deep ensemble with hyperspherical energy (HE) on top of the CKA kernel. They further integrate the HE kernel in particle-based variational inference (ParVI) and generative ensemble with hypernetwork frameworks. The methods are evaluated on both synthetic experiments and small-scale classification datasets.

Strengths

1. The motivation of the paper is clear: addressing mode collapse in deep ensemble by using a kernel that is more suitable to measure particle diversity of neural networks (HE kernel). 2. The advantage of HE kernel has been demonstrated in two different ensemble frameworks (parVI & generative ensemble with hypernetwork), and the empiricall performance of the method looks Ok.

Weaknesses

The datasets considered are a bit outdated and the networks considred seem to be quite small, such that overall the performance is on the lower end (e.g. 85% acc. for CIFAR10, while many BDL methods can easily achieve accuracy higher than 90%). Fuerthermore, recent BDL papers typically consider larger datasets (such as ImageNet) and deeper networks. It is necessary to consider larger datasets and larger models in order to assess the practical effectiveness of the method.

Questions

See weakness

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors do not address potential negative social impact since the paper is predominantly theoretical.

Reviewer jUbb2024-08-08

I acknowledge that the evaluations do cover MNIST/CIFAR10/CIFAR100. I am willing to raise my score to reflect that, along with the new experiments added in the rebuttal. However, I still do not think the technical contributions mentioned in the rebuttal are convincing. The rebuttal only discusses the meaning of this regulation term.

Authorsrebuttal2024-08-08

For the question you asked about larger dataset and larger models, results can also be found in the general remarks.

Reviewer JKj82024-08-12

Thanks for the rebuttal, which addresses my concern about the model perfoemance. I am willing to raise my score to 6.

Reviewer Wp132024-08-12

Thanks for answering the questions. I would have appreciated some comments on the weaknesses of the work I pointed out. Will leave my score unchanged as solely the issue of dataset size was addressed and other points remained unmentioned.

Authorsrebuttal2024-08-13

Thank you for pointing out the missing response to your comments on the weaknesses. We somehow forgot to include them and will post the answers here in addition to the experiments on the larger dataset. > Fair comparison against DDU. Instead of adding OOD examples to DDU as you suggested, which is also viable, in Tables (Paper 1-4. Rebuttal Table 1), we showed that even without OOD samples, our method/kernel still outperforms ensembles and DDU (Tables 1/2) in OOD detection, which are the apples-to-apples comparisons. Although, we can mark that row more clearly to indicate synthetic OOD sample usage. > In 2D with OOD examples the problem becomes quite trivial. The difficulty of generating enough samples to cover the OOD volume becomes exponentially more difficult with increasing dimensionality of the input space and is especially easy when the diversity of the data is limited. We agree that adding OOD to synthetic experiments is easy, however as mentioned earlier our methods outperform baselines even without OOD examples. For images, our main point is to show that we do not have to cover the entire OOD volume but just have to generate some random images to make sure the diversity is high on random outlier images. Our OOD detection experiments show that although our generated synthetic images (Fig. 7/8) are nowhere similar to the tested outliers, our approach still performs well for outlier detection. > Larger datasets This one is answered in the general remarks. > Table 2 and Figure 1: Thank you for pointing these out. We will correct the extra zero in the table, and further clarify the cossim/he figure name.

Authorsrebuttal2024-08-14

## TinyImageNet Correction We discovered a bug in our TinyImageNet dataloader for the HE + OOD experiment during the rebuttal period, which skewed our results for that one experiment. After fixing it and retraining, we obtained the following updated results. | Model | NLL $\downarrow$ | ID Accuracy $\uparrow$ | ID ECE $\downarrow$ | AUROC SVHN $\uparrow$ | AUROC CIFAR-10/CIFAR-100 $\uparrow$ | AUROC Textures (DTD) $\uparrow$ | | -------- | -------- | -------- | -------- | -------- | -------- | -------- | | ResNet18 + $\text{HE}$ OOD (5) | 0.786 | 61.88 | 8.02 | **99.31** | **81.56**/**87.64** | **90.94** |

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC