Implicit Neural Representation Inference for Low-Dimensional Bayesian Deep Learning

Panagiotis Dimitrakopoulos, Giorgos Sfikas, Christophoros Nikou

Bayesian Deep Learning (BDL) offers a "gold standard" for uncertainty quantification, but scaling it to modern, overparameterized neural networks usually requires making severe compromises. This paper proposes a clever workaround: instead of performing inference on millions of network weights, the authors perform it on a tiny "Implicit Neural Representation" (INR) that generates stochastic factors for those weights. This approach achieves state-of-the-art uncertainty calibration at a fraction of the usual computational cost.

The Challenge of Scaling Bayesian Inference

In safety-critical fields like medicine or autonomous driving, it is not enough for an AI to be accurate; it needs to know when it might be wrong. Bayesian Neural Networks (BNNs) provide this capability by treating weights as probability distributions rather than fixed point estimates.

However, modern deep learning models contain millions of weights, making full Bayesian inference computationally intractable. To cope, researchers typically resort to "cheap" approximations:

  1. Restrictive assumptions: Assuming weights are independent (diagonal covariance), which ignores how different features interact.
  2. Last-layer only inference: Only making the final classification layer Bayesian, which severely limits the model's ability to express uncertainty about its internal, learned features.

The core challenge is finding a way to induce stochasticity across the entire network without the massive computational overhead of full-parameter inference.

The Solution: Factoring Weights with INRs

The authors introduce a framework that factors the model parameters into two distinct components:

  • Deterministic ($w$): A standard point estimate of the weights, found via standard Maximum A Posteriori (MAP) estimation.
  • Stochastic ($\xi$): A "nuisance factor" that multiplies the deterministic weights ($w \circ \xi$).

The breakthrough lies in how the framework handles $\xi$. Instead of treating every $\xi$ as an independent variable, the authors use an Implicit Neural Representation (INR). An INR is a tiny auxiliary neural network (a hypernetwork) that takes weight coordinates—such as layer index, channel, and spatial position—as input and outputs the stochastic factor $\xi$.

Because this INR is extremely small (often just a few hundred parameters), high-quality Bayesian inference can be performed on the INR's parameters rather than the main network's parameters. The authors test three flavors of this approach:

  • INR-Laplace: Using a Gaussian approximation of the posterior.
  • INR-SWAG: Using the trajectory of Stochastic Gradient Descent to estimate uncertainty.
  • INR-RealNVP: Using Normalizing Flows to model complex, non-Gaussian distributions.
1D Regression Uncertainty Comparison

Key Insights and Advantages

  • Global Stochasticity on a Budget: By using an INR, the model induces randomness across every single weight in massive architectures like a ResNet-50, yet the actual Bayesian inference only happens in a tiny 260-parameter space.
  • The SIREN Advantage: The authors found that using sinusoidal activations (SIREN) in the INR hypernetwork was crucial. These activations are much better at capturing the "high-frequency" perturbations needed to make weights stochastic compared to standard ReLU activations.
  • Non-Gaussian by Design: Even if a simple Gaussian approximation (Laplace) is used for the INR parameters, the resulting distribution of the main weights becomes non-Gaussian because it passes through the INR's non-linear layers. This allows for much more expressive uncertainty than traditional diagonal approximations.
  • Efficiency through Sharing: The INR hypernetwork can be shared across all layers of the main network, keeping the parameter count for inference constant regardless of the main model's depth.

Experimental Validation

The authors evaluated their method across a wide range of benchmarks, including 1D synthetic regression, UCI datasets, and image classification (MNIST, CIFAR-10, CIFAR-100).

Superior Calibration on Shifted Data: On corrupted CIFAR-100 data (where images are subjected to noise, blur, etc.), the INR-based methods—especially INR-RealNVP—significantly outperformed standard baselines like MC Dropout and Last-Layer Laplace in terms of Expected Calibration Error (ECE) and Log-Likelihood.

CIFAR-100 Corruption Results

Competitive with Deep Ensembles: Deep Ensembles (training 5+ separate models) is the current industry standard for uncertainty but is notoriously expensive. The INR approach achieved similar or better results while being significantly faster and more memory-efficient. Furthermore, in Out-of-Distribution (OOD) rejection-classification tests, the INR models were better at identifying "don't know" cases, leading to higher accuracy on the remaining confident predictions.

Limitations and Future Work

While inference is incredibly cheap, the initial training phase is about 1.2x slower than a standard vanilla network due to the overhead of evaluating the hypernetwork. Additionally, like many Bayesian methods, performance can be sensitive to hyperparameters such as the choice of prior precision and the specific architecture of the tiny INR.

Future work will explore "Alternative Training" schemes where the INR is updated less frequently to further reduce training costs. The authors also aim to integrate the method with more advanced sampling techniques like Hamiltonian Monte Carlo (HMC) to push the boundaries of scalable Bayesian Deep Learning even further.

Summary updated

BibTeX
@inproceedings{dimitrakopoulos2024implicit,
  author = {Panagiotis Dimitrakopoulos and Giorgos Sfikas and Christophoros Nikou},
  title = {{Implicit Neural Representation Inference for Low-Dimensional Bayesian Deep Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=5KUiMKRebi},
}
Figure