Exact closed-form Gaussian moments of residual layers
Simon Kuang, Xinfan Lin
TL;DR
This work introduces exact closed-form Gaussian moment propagation through deep neural networks by deriving layer-wise moment maps for activations including probit, GeLU, ReLU, Heaviside, and sine, and extending to residual connections. The authors define an analytic framework, Y_ana, that computes the exact mean and covariance after each layer and chain them across layers, while benchmarking against ground-truth and Gaussian proxies. They provide a theoretical Wasserstein-based guarantee and demonstrate substantial empirical improvements on random networks, regression and classification under input uncertainty, Bayesian network inference, and exploratory stochastic activations. The results indicate that layer-wise exact moment matching markedly improves uncertainty propagation, calibration, and predictive reliability in practical settings, with a priori error control and extensions to stochastic neurons.
Abstract
We study the problem of propagating the mean and covariance of a general multivariate Gaussian distribution through a deep (residual) neural network using layer-by-layer moment matching. We close a longstanding gap by deriving exact moment matching for the probit, GeLU, ReLU (as a limit of GeLU), Heaviside (as a limit of probit), and sine activation functions; for both feedforward and generalized residual layers. On random networks, we find orders-of-magnitude improvements in the KL divergence error metric, up to a millionfold, over popular alternatives. On real data, we find competitive statistical calibration for inference under epistemic uncertainty in the input. On a variational Bayes network, we show that our method attains hundredfold improvements in KL divergence from Monte Carlo ground truth over a state-of-the-art deterministic inference method. We also give an a priori error bound and a preliminary analysis of stochastic feedforward neurons, which have recently attracted general interest.
