Implicit Priors for Knowledge Sharing in Bayesian Neural Networks

Jack K. Fitzsimons, Sebastian M. Schmon, Stephen J. RobertsarXiv 2019

Introduction

Knowledge sharing between neural networks, often realized through distillation or transfer learning, is a cornerstone of modern deep learning. In the Bayesian framework, this typically involves defining a prior distribution over model parameters. However, traditional weight-space priors face significant challenges: they are sensitive to architectural differences (weight mismatch) and often fail to capture the complex intermediate representations that drive model performance. This paper proposes a shift from weight-space to function-space, introducing "implicit priors" that align the internal features of a student network with those of a teacher.

Methodology: Function-Space Alignment

The core innovation lies in moving the prior from weight space to function space by treating neural network layers as realizations of Gaussian Processes (GPs). By leveraging the theory that infinite-width networks converge to GPs, the authors define a prior based on the distribution of features ($\phi$) rather than raw weights.

The KL-Divergence Prior

Instead of matching point-wise feature values, the method minimizes the Kullback-Leibler (KL) divergence between the student’s feature GP and the teacher’s feature GP. This approach ensures that the student learns the covariance structure of the teacher—how features co-vary across different inputs—rather than merely mimicking specific outputs.

Alignment of features between a teacher network (left) and a student network (right).

Architecture Agnosticism

Because the alignment occurs in a latent Hilbert space defined by the kernels of the induced GPs, the student and teacher networks do not need to share the same architecture. A dense student network can effectively inherit the inductive biases (e.g., spatial reasoning) of a convolutional teacher.

Multi-Level Distillation

The framework naturally extends to multi-level distillation, where multiple intermediate layers are aligned simultaneously. This allows for a more granular transfer of knowledge throughout the network hierarchy, which is particularly useful for complex tasks like CIFAR-10 classification where single-layer alignment might be insufficient.

Multi-level feature alignment between teacher and student networks.

Experimental Evaluation

The authors evaluated the approach on two benchmarks: Fashion-MNIST (distilling a CNN into a dense network) and CIFAR-10 (distilling VGG layers into a dense network).

Key Results

  • Performance Gains: On Fashion-MNIST, the dense student’s accuracy improved from 80.6% (naive) to 89.8% with the implicit prior, nearing the teacher's 92.7%.
  • Overcoming Failure Modes: On CIFAR-10, where both naive training and standard distillation methods failed (remaining at ~10% accuracy), the proposed Bayesian approach achieved 51.9% accuracy.
  • Regularization and Stability: The implicit prior significantly reduced standard error across training runs, acting as a robust regularizer that stabilizes the learning process.

Conclusion

By moving priors into function space, this work provides a flexible, architecture-agnostic framework for knowledge sharing in Bayesian Neural Networks. This method allows simpler architectures to benefit from the complex feature hierarchies of larger models, opening new avenues for efficient model compression and cross-domain transfer learning.

Summary updated

Abstract

Bayesian interpretations of neural network have a long history, dating back to early work in the 1990's and have recently regained attention because of their desirable properties like uncertainty estimation, model robustness and regularisation. We want to discuss here the application of Bayesian models to knowledge sharing between neural networks. Knowledge sharing comes in different facets, such as transfer learning, model distillation and shared embeddings. All of these tasks have in common that learned "features" ought to be shared across different networks. Theoretically rooted in the concepts of Bayesian neural networks this work has widespread application to general deep learning.
BibTeX
@misc{fitzsimons2019implicit,
  author = {Jack K. Fitzsimons and Sebastian M. Schmon and Stephen J. Roberts},
  title = {{Implicit Priors for Knowledge Sharing in Bayesian Neural Networks}},
  year = {2019},
  eprint = {1912.00874},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.00874},
}
Figure