Improving Infinitely Deep Bayesian Neural Networks with Nesterov's Accelerated Gradient Method
Organizations: Shenzhen Institutes of Advanced Technology Chinese Academy of Sciences Shenzhen, P.R.China
Abstract
As a representative continuous-depth neural network approach, stochastic differential equation (SDE)-based Bayesian neural networks (BNNs) have attracted considerable attention due to their solid theoretical foundations and strong potential for real-world applications. However, their reliance on numerical SDE solvers inevitably incurs a large number of function evaluations (NFEs), resulting in high computational cost and occasional convergence instability. To address these challenges, we propose a Nesterov-accelerated gradient (NAG) enhanced SDE-BNN model. By integrating NAG into the SDE-BNN framework along with an NFE-dependent residual skip connection, our method accelerates convergence and substantially reduces NFEs during both training and testing. Extensive empirical results show that our model consistently outperforms conventional SDE-BNNs across various tasks, including image classification and sequence modeling, achieving lower NFEs and improved predictive accuracy.
Figures & tables
| Experiments | |||||
| Model | Hyper-parameter | 1D Regression | MNIST [ 30 ] | CIFAR-10 [ 31 ] | Walker2D [ 32 ] |
| SDE-BNN (fixed step) | |||||
| and Nesterov-SDE-BNN (fixed step) | Augment dim. | 2 | 2 | 2 | 0 |
| # blocks | 1 | 1 | 1-1-1 | 1 | |
| Diffusion | 0.2 | 0.1 | 0.1 | 0.1 | |
| KL coef. | 0.0 | 1e-5 | 100 | 1 |
| MNIST | CIFAR-10 | ||||||
|---|---|---|---|---|---|---|---|
| Model | Accuracy (%) | AUC (%) | NLL ( ) | Accuracy (%) | AUC (%) | NLL ( ) | |
| SDE-BNN(fixed step) | 98.90 0.07 | 97.59 0.04 | 14.37 0.89 | 87.56 0.36 | 83.05 0.29 | 9.89 0.22 | |
| Nesterov-SDEBNN(fixed step) | 99.04 0.12 | 97.87 0.06 | 7.37 0.65 | 88.36 0.24 | 85.61 0.45 | 5.97 0.11 | |
| SDE-BNN(adaptive step) | 98.87 0.12 | 97.57 0.03 | 13.85 1.26 | 85.87 0.28 | 78.42 0.60 | 6.77 0.09 | |
| Nesterov-SDEBNN(adaptive step) | 99.04 0.03 | 97.88 0.04 | 7.15 0.34 | 86.99 0.23 | 83.94 0.32 | 5.32 0.10 | |