[Paper Review] Compromise-free Bayesian neural networks
This paper proposes compromise-free Bayesian neural networks (BNNs) that use exact nested sampling to numerically sample full, non-Gaussian posterior distributions and compute precise Bayesian evidence (marginal likelihood) for model comparison. It finds strong correlation between Bayesian evidence and out-of-sample performance, with ReLU networks consistently outperforming tanh networks, and demonstrates that ensembling BNNs across architectures further improves predictive accuracy beyond individual models.
We conduct a thorough analysis of the relationship between the out-of-sample performance and the Bayesian evidence (marginal likelihood) of Bayesian neural networks (BNNs), as well as looking at the performance of ensembles of BNNs, both using the Boston housing dataset. Using the state-of-the-art in nested sampling, we numerically sample the full (non-Gaussian and multimodal) network posterior and obtain numerical estimates of the Bayesian evidence, considering network models with up to 156 trainable parameters. The networks have between zero and four hidden layers, either $ anh$ or $ReLU$ activation functions, and with and without hierarchical priors. The ensembles of BNNs are obtained by determining the posterior distribution over networks, from the posterior samples of individual BNNs re-weighted by the associated Bayesian evidence values. There is good correlation between out-of-sample performance and evidence, as well as a remarkable symmetry between the evidence versus model size and out-of-sample performance versus model size planes. Networks with $ReLU$ activation functions have consistently higher evidences than those with $ anh$ functions, and this is reflected in their out-of-sample performance. Ensembling over architectures acts to further improve performance relative to the individual BNNs.
Motivation & Objective
- To investigate the relationship between Bayesian evidence and out-of-sample performance in Bayesian neural networks.
- To evaluate the impact of activation functions (ReLU vs. tanh), network depth, and hierarchical priors on model evidence and predictive performance.
- To develop and test an ensemble method that reweights individual BNNs by their Bayesian evidence for improved generalization.
- To provide a rigorous, non-approximate benchmark for BNN performance using state-of-the-art nested sampling.
- To compare the performance of compromise-free BNNs against traditional neural networks trained via standard backpropagation.
Proposed method
- The study employs the PolyChord nested sampling algorithm to numerically sample the full, non-Gaussian, and multimodal posterior distributions of BNNs with up to 156 trainable parameters.
- Bayesian evidence (marginal likelihood) is computed directly from the nested sampling output, enabling exact model comparison without Gaussian or Laplace approximations.
- Networks are trained with varying architectures: 0–4 hidden layers, ReLU or tanh activation functions, and different hierarchical prior structures (input, layer, or variable hyperparameter granularity).
- Ensembles of BNNs are constructed by reweighting individual network posterior samples using their respective Bayesian evidence values, forming a model-averaged predictive distribution.
- The performance of individual BNNs and their ensembles is evaluated on the Boston housing dataset using 10 random data splits, with test loss and Bayesian evidence as primary metrics.
- A baseline comparison is conducted using traditional neural networks (TNNs) trained via Adam optimization with no regularization, using the same architectures and data splits.
Experimental results
Research questions
- RQ1Is there a strong correlation between Bayesian evidence and out-of-sample predictive performance in Bayesian neural networks?
- RQ2Do ReLU-activated BNNs consistently achieve higher Bayesian evidence and better test performance than tanh-activated BNNs?
- RQ3How does ensembling BNNs, weighted by their Bayesian evidence, affect predictive performance compared to individual BNNs?
- RQ4How do different hierarchical prior structures (granularity of hyperparameters) influence model evidence and generalization?
- RQ5How do compromise-free BNNs compare in performance to standard backpropagation-trained neural networks (TNNs) without regularization?
Key findings
- There is a strong positive correlation between Bayesian evidence and out-of-sample performance across all BNN architectures, validating evidence as a reliable model selection criterion.
- ReLU-activated BNNs achieve significantly higher Bayesian evidence and lower test loss than tanh-activated BNNs, with the best ReLU model achieving a test loss of 0.1732.
- Ensembling BNNs across architectures—particularly combining models with layer-granularity hyperparameters—yields a test loss of 0.1732, outperforming the best individual BNN (0.1791).
- The ensemble of all models trained with layer-granularity hyperparameters achieved the lowest test loss, demonstrating that evidence-weighted ensembling improves generalization.
- All BNNs with variable hyperparameters outperformed their corresponding TNN counterparts, while TNNs with tanh activations outperformed ReLU TNNs in most cases, highlighting the advantage of Bayesian regularization.
- The Bayesian evidence values of combined models lie between those of the individual models, confirming that evidence is linearly combined under model averaging.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.