This ICLR 2019 paper, "Deep Convolutional Networks as Shallow Gaussian Processes," provides a theoretical bridge between the world of deep learning and the elegant framework of Bayesian non-parametrics. It demonstrates that as a Convolutional Neural Network (CNN) becomes infinitely wide, it converges to a Gaussian Process (GP).
TL;DR
The authors prove that a CNN with an infinite number of filters per layer is mathematically equivalent to a Gaussian Process. By deriving an efficient way to compute the "equivalent kernel" for these networks, they achieve state-of-the-art performance for GPs on MNIST (0.84% error). This approach successfully combines the spatial inductive bias of CNNs with the exact uncertainty quantification of GPs.
The Problem: Uncertainty in Deep Learning
Deep learning models like CNNs are incredibly powerful but often act as "black boxes" regarding uncertainty. They are prone to overconfidence and vulnerable to adversarial attacks. Bayesian Neural Networks (BNNs) offer a solution by treating weights as probability distributions, but they are notoriously difficult to train due to massive parameter spaces.
Gaussian Processes are an alternative Bayesian method allowing for exact inference and perfect uncertainty estimates. However, standard GPs lack the "spatial intelligence" (translation invariance) that makes CNNs so successful at image recognition. This paper asks: Can we create a GP that inherits the architectural strengths of a deep CNN?
Methods: From CNN to GP
The paper builds on a classic result from Radford Neal (1996), who showed that a single-layer fully connected network with infinite width is a GP. The authors extend this to deep convolutional architectures and ResNets.
- The Infinite Limit: If the number of channels in each layer goes to infinity, the Central Limit Theorem applies. The output of the network becomes a joint Gaussian distribution.
- Recursive Kernel Derivation: Instead of training weights, the authors compute a kernel function that describes how similar two images are according to the CNN's architecture. They derive a recursive formula where the covariance at layer $L+1$ is calculated using the covariance from layer $L$.
- Computational Efficiency: Normally, computing a kernel for every pixel location would be prohibitively expensive ($O(\text{pixels}^2)$). The authors show that you only need to track the "diagonal" covariance (variances at corresponding locations), reducing the cost of evaluating the kernel to roughly the same as a single forward pass of a standard CNN.
- ResNet Integration: Adding skip connections (the hallmark of ResNets) simply adds a term to the recursive kernel formula, making it easy to turn modern architectures into GPs.
Key Insights
- "Deep" Architecture, "Shallow" Model: While the CNN architecture is "deep," the resulting GP is "shallow" in the sense that it is a single-layer Bayesian model. The "depth" is entirely encapsulated within the complexity of the kernel function.
- The Power of the Prior: Unlike standard CNNs, these GPs are not "trained" in the traditional sense. The results come from the prior distribution—the inherent structure of the convolutional kernel itself. This proves that the architecture of a CNN provides a massive head start even before seeing data.
- ResNet Naturalness: The authors found that the "pre-activation" style of ResNet (where the skip connection happens before the nonlinearity) is the most mathematically natural way to define a Residual GP.
Key Results
The primary benchmark used is MNIST (handwritten digits), utilizing 50,000 images for training and 10,000 for testing. While MNIST is largely solved for standard CNNs, it serves as the gold standard for testing the limits of non-parametric methods like GPs.
- New Record for GPs: The "ResNet GP" achieved a 0.84% classification error on MNIST. This outperformed previous dense "Neural Network GPs" (1.21%) and other convolutional GP variants.
- Efficiency: Computing the kernel matrix for the entire dataset took about 3.5 hours on two Tesla P100 GPUs. While slower than training a small CNN, it is remarkably fast for an exact Bayesian method on 50,000 samples.
- Uncertainty Calibration: The GP provided well-calibrated uncertainty estimates, meaning when the model reports 80% confidence, it is accurate about 80% of the time—a property many standard deep networks lack.
Limitations and Future Work
- Scaling to Big Data: The main bottleneck is that GPs require inverting a kernel matrix, which scales cubically ($O(N^3)$) with the number of training examples ($N$). Scaling this to ImageNet-sized datasets would require "inducing point" approximations.
- Hyperparameter Tuning: In this paper, hyperparameters (like weight variance and number of layers) were found via random search. Future work could involve "learning" the kernel hyperparameters using gradient ascent on the marginal likelihood.
- Pooling: The current implementation avoids certain types of pooling (like average pooling) because they complicate the efficiency gains of the diagonal covariance propagation.
Summary updated