Incorporating Neural Network Structure in the Bayesian Learning Rule
Abstract
The Bayesian Learning Rule (BLR) specifies how loss gradients update an exponential family (EF) posterior, but computing these gradients efficiently through a neural network (NN) requires exploiting its layered structure. We introduce a constrained Lagrangian formulation that connects EF duality with NN backpropagation, coupling forward propagation, backward sensitivities, and BLR posterior updates. Backpropagating through the resulting distributional states yields approximate BLR loss-site natural parameters. For Gaussian weight posteriors, we instantiate this framework with a sampling-free projection of layer-state means and covariances. Under delta-method localization, its forward and backward recursions recover the point-estimate forward pass, backpropagation, and Hessian backpropagation as special cases. More generally, this connects forward moment propagation with the corresponding backward propagation of distributional sensitivities, bringing together two perspectives often studied separately. We use the resulting sampling-free gradient and diagonal-Hessian estimates in IVON, replacing its Monte Carlo-based estimators while retaining its practical update rules.