TL;DR
This paper introduces Partially Stochastic Infinitely Deep Bayesian Neural Networks (PSDE-BNNs), a novel architecture that applies stochasticity to only a subset of weights in continuous-depth models (Neural ODEs/SDEs). By restricting the stochasticity, these models achieve the robust uncertainty quantification of fully Bayesian networks while drastically reducing computational overhead, resulting in 74% faster overall training and 26% faster inference without sacrificing accuracy.
Introduction
In the realm of continuous-time neural networks, models are conceptualized as having infinite depth, where hidden states evolve according to ordinary differential equations (Neural ODEs). To capture model uncertainty—crucial for high-stakes domains like finance or healthcare—researchers have extended these to Bayesian Neural Networks using Stochastic Differential Equations (SDE-BNNs), which inject continuous noise (Brownian motion) into the weight dynamics.
However, fully stochastic infinite-depth BNNs are notoriously slow and resource-heavy. Estimating the posterior distribution of these continuous weights requires computationally intensive variational inference and heavy sampling. The authors tackle this bottleneck by asking: Can we retain the excellent uncertainty quantification and robustness of infinite-depth BNNs while only making a fraction of the network stochastic?
Methods
The authors propose Partially Stochastic Infinitely Deep BNNs (PSDE-BNNs). Instead of modeling the entire weight trajectory as an SDE, they partition the weights into deterministic (ODE-driven) and stochastic (SDE-driven) components. They introduce two primary ways to perform this partition:
- Vertical Separation (Time-based): The network's "depth" (represented as continuous time $t \in [0,1]$) is split into distinct phases. In one phase, the weights evolve deterministically via an ODE. In the other, they evolve stochastically via an SDE. The authors explore variants like
SDEfirst(starts stochastic, ends deterministic) andODEFirst(starts deterministic, ends stochastic).
- Horizontal Separation (Feature-based): At any given depth $t$, the weight vector itself is split. A subset of the parameters is updated deterministically, while the rest interact with Brownian motion and are treated as random variables.
To back this up, the authors provide rigorous mathematical proofs showing that while standard constrained infinitely deep BNNs fail to be Universal Approximators, their proposed PSDE-BNNs qualify as Universal Conditional Distribution Approximators (UCDAs), meaning they do not lose expressive power despite the restricted stochasticity.
Datasets
- MNIST & CIFAR-10: Standard benchmarks used for evaluating image classification accuracy and Expected Calibration Error (ECE).
- CIFAR-10-C: A corrupted version of CIFAR-10 featuring 17 different types of image degradation (e.g., noise, blur, snow) at 5 intensity levels. This was used specifically to stress-test the models' predictive entropy and out-of-distribution (OOD) uncertainty quantification.
Key Insights and Ideas
- A little noise goes a long way: You don't need full stochasticity to reap Bayesian benefits. The authors found that a stochasticity ratio of just 10% (e.g., only 10% of the continuous depth is stochastic) is sufficient to match or beat fully stochastic models in both accuracy and calibration.
- Better calibration through less overfitting: Fully stochastic SDE-BNNs tend to overfit during training, which progressively narrows their uncertainty estimates and degrades their Expected Calibration Error (ECE). PSDE-BNNs avoid this trap, maintaining excellent ECE throughout training.
- Theoretical guarantees hold: Counterintuitively, restricting stochasticity doesn't cripple the model's theoretical power. The mathematical proofs demonstrate that partial stochasticity is highly expressive, provided the input space is properly augmented.
Key Results
- Massive Speedups: PSDE-BNNs are 27.5% faster per epoch and 25.9% faster at inference compared to standard SDE-BNNs. Furthermore, because PSDE-BNNs converge in roughly 100 epochs (compared to the 300 needed for SDE-BNNs), the overall training time is reduced by 74.1%.
- Superior Accuracy and Calibration: On CIFAR-10, the
ODEFirstvariant achieved 87.84% accuracy with an ECE of $4.73 \times 10^{-2}$, outperforming the fully stochastic SDE-BNN baseline (86.04% accuracy, $9.13 \times 10^{-2}$ ECE). - Robust OOD Detection: When distinguishing between in-distribution and out-of-distribution samples, PSDE-BNNs achieved an AUC of 0.88, comfortably beating the SDE-BNN baseline (0.84 AUC).
Limitations and Future Work
- Limitations: The authors note that the "Horizontal Cut" method currently lacks an optimized numerical solver. Consequently, despite its theoretical efficiency, it is slightly slower in practice than the "Vertical Cut" models.
- Future Work: The authors plan to explore architectures that combine both horizontal and vertical cuts simultaneously. They also suggest implementing variance reduction techniques (like "Sticking The Landing") to further stabilize training, and plan to scale these models to higher-resolution datasets like ImageNet and few-shot learning tasks like Omniglot.
Summary updated