arXiv:2610.09886stat.MLOct 2026

Manuscript Offprint

arXiv:2610.09886

Sparsifying Stochasticity, Not Capacity: Partial Stochasticity via Deep Weight Factorization of Prior Scales

Marius P Linhard, Maurizio Filippone

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Bayesian neural networks need not be fully stochastic to be universal conditional density approximators, but it remains open which parameters should be stochastic. We learn this split by applying deep weight factorization to the prior scales, which are the standard deviations of the parameter priors, while fitting the functional prior to a Gaussian process with a maximum mean discrepancy objective. A parameter whose prior scale falls below a cutoff becomes deterministic and is optimized during inference, so the regularizer sparsifies stochasticity rather than capacity. We give a certificate for universal conditional density approximation that is checkable in linear time, together with a minimal repair when it fails. We further show that the common hybrid scheme of sampling some parameters and optimizing the others is stochastic approximation for a type-II maximum a posteriori objective, and that coupled step sizes can leave a tracking error that does not vanish as the step size shrinks. On a bimodal target, the learned split stays close to an unconstrained reference across all budgets and is insensitive to the cutoff, while random masks that distribute the same prior scales across layers are worse by up to two orders of magnitude. On UCI benchmarks, our method performs on par with a fully stochastic network while keeping about half of its parameters deterministic.

1 INTRODUCTION

As neural networks are increasingly deployed in real-world applications, reliable uncertainty quantification becomes essential. Bayesian neural networks address this by treating their parameters as random variables, which combines the flexibility of neural networks with principled uncertainty estimates.

Maurizio Filippone

KAUST, Saudi Arabia

A recent work (Sharma et al., 2023) has shown theoretically and empirically that it is not necessary to treat all parameters in a stochastic way to obtain good uncertainty estimates. It is even enough to make the number of stochastic parameters of the network match the target dimension as long as stochasticity is introduced in the early layers and the downstream network has general function approximation properties (Leshno et al., 1993). This result is promising since it allows for the reduction in the number of stochastic parameters.

However, partial stochasticity complicates model selection by adding another modeling choice: which parameters should we treat in a stochastic way? The theory does not give any indication on how to make this choice. Due to the combinatorially large number of possible ways to assign parameters to the stochastic and deterministic groups, it is computationally impractical to find a solution via brute force. An additional complication is how to choose sensible priors over stochastic parameters, which is crucial for obtaining good performance and sound uncertainty quantification.

Building on deep weight factorization (Kolb et al., 2025), we apply the factorization not to the network weights but to the prior standard deviations, which we refer to as prior scales. Sparsity in the scales means sparsity in stochasticity: a parameter whose prior scale collapses to zero is deterministic. Unlike pruning and spike-and-slab-based constructions, which keep pruned parameters at zero in the posterior, our deterministic parameters remain free to be optimized during inference, so the capacity of the fitted network is retained.

Learning the split changes the inference problem. Partially stochastic networks are typically fitted by a hybrid scheme that samples the stochastic parameters while optimizing the deterministic ones. Despite its widespread use, it has not been established what this scheme approximates: it does not sample the joint posterior, nor is the deterministic block a standard maximum a posteriori (MAP) estimate, since the stochastic parameters are integrated throughout optimization. With this work, we aim to close this gap.

Our contributions are: (1) a method that learns the deterministic/stochastic split by imposing deep weight factorization on prior scales. This sparsifies stochasticity rather than capacity, and for a factorization depth of D≥3D \geq 3 the non-zero scales are bounded away from zero at stationary points (Theorem 4.1); (2) a functional prior fitted by the maximum mean discrepancy (MMD), where the degree-two polynomial kernel reduces to moment matching with weights fixed by the kernel, together with a decomposition of the Kullback-Leibler (KL) divergence that explains why a sparse network can match at most the moments (Proposition 4.3, Lemma A.3); (3) a deterministic certificate for the universal conditional density approximation property, that is checkable in linear time, and a minimal repair when it fails (Proposition 4.7, Corollary A.9); (4) a characterization of the hybrid inference scheme as stochastic approximation for a type-II MAP objective, and a tracking bound showing that coupled sampler and optimizer step sizes leave an error term that does not shrink with the step size, which is attained by a Gaussian example (Theorem 4.9, Theorem A.13, Corollary 4.10, Proposition A.14).

References (64)