Introduction
Gaussian Processes (GPs) are widely regarded as the gold standard for uncertainty quantification in machine learning due to their ability to specify functional priors through kernel selection. However, the $O(N^3)$ computational complexity of GPs limits their applicability to large datasets. Bayesian Neural Networks (BNNs) offer a more scalable alternative, but they suffer from a significant "inverse problem": it is notoriously difficult to determine which weight-space priors will result in a desired function-space behavior. This often leads to "prior rot," where standard Gaussian priors produce uninformative or overconfident functional behaviors.
This paper addresses this gap by demonstrating that the activation function is the critical, often overlooked "lever" for shaping BNN functional priors. By optimizing activation functions alongside weight priors, the authors enable shallow BNNs to replicate complex GP behavior with high fidelity, even far outside the training data range.
Methodology: Prior Mapping and Posterior Learning
The proposed framework operates in two distinct stages: prior mapping and posterior learning. In the first stage, the BNN's parameters $\lambda$—which include weight variances and the parameters of the activation function—are optimized to minimize the discrepancy between the BNN's output distribution and a target GP prior.
2-Wasserstein Optimization
To measure the discrepancy between the BNN and the GP, the authors utilize the closed-form 2-Wasserstein distance. Unlike the Kullback-Leibler (KL) divergence, which can be unstable when distributions have disjoint supports, the 2-Wasserstein distance provides a robust, gradient-based objective for prior matching.
Learnable and Periodic Activations
A key innovation is the move away from fixed activation functions like ReLU. Instead, the authors employ Rational (Pade) activations, Piecewise Linear (PWL) functions, and even small sub-networks to act as activations. To address the "stationarity gap"—where BNNs become overconfident far from data—they introduce Fourier-inspired periodic activations: $$\phi(x|\psi, A) = \sum A_i \cos(2\pi\psi_i x) + \sum A_j \sin(2\pi\psi_j x)$$ This ensures that the BNN maintains GP-like properties, such as smoothness or periodicity, globally rather than just locally.
Key Insights
- Activations as the Primary Tool: The activation function is a far more efficient tool for shaping functional priors than network depth. A single-layer BNN with a learned activation can outperform deep BNNs with standard activations.
- Preserving the Central Limit Theorem: By keeping weight priors as simple zero-centered Gaussians and concentrating complexity in the activation function, the authors ensure the BNN adheres to the Central Limit Theorem, maintaining its theoretical equivalence to GPs in the wide limit.
- Amortized Priors: The prior-fitting process is a one-time cost. Once a BNN prior is matched to a specific GP kernel, it can be stored and reused for various downstream tasks, significantly reducing the overhead of model selection.
Experimental Results
The framework was validated on synthetic tasks, UCI regression benchmarks, and the large-scale HouseElectric dataset (2 million rows).
Superior Fidelity and Stationarity
On 1D regression tasks, the proposed method achieved a 2-Wasserstein loss of 7.06, significantly outperforming previous state-of-the-art methods. Qualitatively, the use of periodic activations allowed the BNN to maintain correct uncertainty levels and "wiggliness" far outside the training range $[-3, 3]$, a feat standard BNNs fail to achieve.
Scalability
In large-scale tests on the HouseElectric dataset, the BNN with learned priors achieved a Test NLL of -1.5155. This result not only outperformed Scalable Variational GPs (SVGP) but also matched the performance of Exact GPs, which required days of computation compared to just hours for the BNN.
Conclusion
By shifting the focus from complex weight priors to learnable activation functions, this work provides a practical and theoretically grounded method for transferring the benefits of GPs to the scalable BNN architecture. The ability to bake stationarity and specific kernel behaviors directly into the BNN architecture represents a significant step forward for reliable uncertainty quantification in deep learning.
Summary updated