Manuscript Offprint
arXiv:2610.32753Sparse Bayesian Neural Networks via Sticky Piecewise Deterministic Markov Processes
Abstract
There is growing evidence that the performance of a neural network depends largely on a small subset of its weights, which are typically identified by training a dense network and pruning it afterwards. Within a Bayesian framework, pruning can be directly incorporated through a spike-and-slab prior, providing a proper treatment of the uncertainties involved, both with respect to pruning and to parameter uncertainty. In Bayesian neural networks (BNNs), sampling by MCMC is notoriously hard. We demonstrate that modern Monte Carlo methods based on piecewise deterministic Markov processes (PDMPs) can be used to sample posteriors of BNNs asymptotically exact whenever numerically constructed rate bounds hold. Spike-and-slab priors can be incorporated through sticky versions of the PDMPs, setting weights exactly to zero during sampling. We examine the predictive performance and convergence of the samplers, and show that sparse BNNs sampled this way can be more robust to input noise than dense ones.
1 Introduction
Bayesian neural networks (BNNs) quantify uncertainty for models that are otherwise prone to overconfidence, but characterizing their posterior over the network weights is difficult. Variational inference (Graves, 2011) replaces the posterior with a tractable distribution, whereas stochastic gradient samplers (Welling and Teh, 2011; Chen et al., 2014) use minibatches, which scales well but introduces bias. Asymptotically exact samplers target the posterior without bias and have been shown feasible for larger networks (Izmailov et al., 2021b; Sommer et al., 2024), but remain too costly to be practical.
Computational cost is not the only problem in BNNs. The networks are highly over-parametrized, which makes Bayesian inference difficult as the parameters are not identifiable due to symmetries (Papamarkou et al., 2022). Furthermore, weights that do not affect the data fit, such as those connected to inputs that are zero across the training set, retain their prior variance in the posterior, which can make BNNs less robust to covariate shift than networks trained by SGD (Izmailov et al., 2021b,a). Setting such weights to zero removes this source of variance, and BNNs can indeed be pruned substantially with little loss of predictive performance (Molchanov et al., 2017; Hubin and Storvik, 2024), suggesting that a subset of the parameters suffices to characterize the posterior predictive. The canonical method for sparsifying a Bayesian model is the spike-and-slab prior (Mitchell and Beauchamp, 1988), which places positive prior probability on parameters being exactly zero, so that parameters the data do not inform are exactly zero in most draws. Traditionally, it has been hard to make use of spike-and-slab priors in Bayesian deep learning, as the efficient gradient-based samplers require a differentiable density, which a prior with point masses at zero does not have. Thus, such priors have been applied only approximately (Hubin and Storvik, 2024).
Piecewise deterministic Markov process samplers (PDMPs, Fearnhead et al., 2018) are a class of non-reversible, continuous-time Markov chain Monte Carlo (MCMC) samplers. A trajectory is simulated over a time horizon T from a process that evolves deterministically between random event times, constructed so that the target distribution is the position marginal of its stationary distribution. Once the trajectory is long enough, samples are obtained by evaluating the position at time points along the path. Such methods have received great interest recently (Bierkens et al., 2019; Corbella et al., 2022; Fearnhead et al.,
*Corresponding authors: augusa@math.uio.no, filippo.pagani@warwick.ac.uk, ltronneb@math.uio.no

f(x)
Figure 1: Sticky PDMPs sample exact zeros. (a) Example of a sticky ZigZag parameter path. (b) Posterior inclusion probabilities of weights in a BNN sampled with sticky PDMPs. (c) Inclusion probabilities of the MNIST input pixel weights, low where pixels carry no information.
2024; Chevallier et al., 2025), as exact subsampling can keep their cost per effective sample constant in the dataset size (super-efficiency). Furthermore, the PDMP samplers can be made sticky (Bierkens et al., 2023b), so that they target the posterior under a spike-and-slab prior directly, and sparsity arises during sampling without any post-processing or thresholding.
Contributions In this paper, we show that PDMPs can sample the posterior of a BNN under a spike-and-slab prior, which mixes a continuous density with a point mass at zero. With full-batch gradients, the sampling is asymptotically exact, provided the numerical bounds used to simulate the event times hold. This brings PDMPs closer to practical use in Bayesian deep learning. In particular, we
• adapt sticky and non-sticky PDMPs to BNNs with cheap numerical bounds;
• provide a PyTorch implementation for any network module with GPU acceleration;
• evaluate the samplers against NUTS and a sparse variational method;
• show that exact zeros give high sparsity and can improve robustness to input noise.
Regardless of sampling technique, the choice of prior has always been important. While the i.i.d. Gaussian prior has been the standard choice (Fortuin, 2022), it has also been subject to criticism (Wenzel et al., 2020; Tran et al., 2022). This has sparked literature on priors that are better designed to handle neural networks. Fortuin et al. (2022) find that the weights of networks trained by SGD are heavy-tailed, motivating priors such as the Laplace and Student-t, but these do not resolve the lack of robustness of BNNs under covariate shift (Izmailov et al., 2021a). Sparsity-inducing global-local priors such as the horseshoe instead shrink most weights towards zero (Louizos et al., 2017; Ghosh et al., 2019), but rely on specifying a threshold for pruning after sampling, which can be challenging. The spike-and-slab prior instead assigns a non-zero probability to a parameter being exactly zero. Polson and Ročková (2018) establish posterior concentration at the near-minimax rate for deep networks under such a prior, but propose no algorithm for sampling the posterior they describe. Within VI, where the atom can be placed in the variational family by construction, Hubin and Storvik (2024) report substantial sparsification at little cost to predictive accuracy.
PDMP samplers originate in the physics literature (Peters and de With, 2012), and were brought to general use with the bouncy particle sampler (BPS) of Bouchard-Côté et al. (2018), followed by the
ZigZag (Bierkens et al., 2019) and Boomerang (Bierkens et al., 2020) samplers.
Implementing PDMPs is non-trivial, as event times are drawn from an inhomogeneous Poisson process, usually by thinning (Lewis and Shedler, 1979), which requires an upper bound on the rate. Sutton and Fearnhead (2023) derive bounds from a concave-convex decomposition of the rate when it has a closed form. For general targets, Corbella et al. (2022) construct the bounds numerically on short horizons, and Andral and Kamatani (2024) make this adaptive with a tighter, grid-based bound implemented in JAX (Bradbury et al., 2018). Goan et al. (2023) apply PDMPs to BNNs in TensorFlow (Abadi et al., 2015), with a different bounding strategy. Chevallier et al. (2025) instead discretise the dynamics and correct the discretisation error with a Metropolis adjustment, removing the need for explicit bounds.
Sticky PDMPs were introduced by Bierkens et al. (2023b) to sample targets that mix a continuous density with point masses at zero, such as spike-and-slab posteriors. Parameters can then stay exactly zero, giving non-reversible moves between sub-models (Bierkens et al., 2023b), closely related to the reversible jump PDMPs of Chevallier et al. (2023). Later, stickiness was generalized as a boundary condition, alongside hard and soft walls, and teleportation (Bierkens et al., 2023a). Fearnhead et al. (2024) introduced stochastic gradient PDMPs, including a sticky ZigZag, which discretise time to avoid rate bounds at the cost of a bias of the order of the step size, and applied them to a BNN with one hidden layer. To the best of our knowledge, continuous-time sticky PDMPs have only been applied to targets with a tractable upper bound on the rate.
3 Bayesian neural networks
For some input , let denote a neural network with parameters consisting of weights and biases. We seek the posterior distribution where denotes the training data , is the likelihood and the prior. Predictive distributions for unseen data can be calculated as
where is the predictive distribution of the data for some value of the parameters. This integral is not available in closed form for neural networks. However, if samples from the posterior are available, a Monte Carlo estimate of the predictive distribution can be applied:
Posterior samples are typically drawn with discrete-time MCMC such as HMC. We will consider the alternative PDMPs, which are continuous time samplers and extend naturally to spike-and-slab priors.
4 Piecewise deterministic Markov processes
A piecewise deterministic Markov process (PDMP) evolves deterministically between random event times, at which its state changes stochastically. PDMP samplers target an extended distribution with as its marginal, where the auxiliary velocity drives the deterministic motion. With , a PDMP is specified by
• a deterministic flow between events, given as the solution of an ordinary differential equation ;
• an event rate determining when events occur;
• a transition kernel describing how the state changes at an event.
A simple example is the ZigZag sampler (Bierkens et al., 2019), with and linear motion
The time to the next event is the first event of an inhomogeneous Poisson process with rate function . The function is defined through the distribution . In particular, by defining
(2) we have for the ZigZag
Then, the parameter where the change occurs is selected with probability . Upon an event in parameter , the transition kernel of the ZigZag reverses the velocity using the flip operator
The main computational challenge for PDMP samplers is the simulation of the next event time. Along the deterministic trajectory, the event rate generally varies with time. In general, assuming current time is zero, the next event has survival function
If the integral can be inverted in closed form (e.g. constant or piecewise constant ), can be sampled by inversion, setting with .
As the flow is deterministic, the process is fully determined by its skeleton points , the event times , with , and the states and , which form a discrete-time Markov chain (Bierkens and Duncan, 2017). Skeleton points are not samples from the target, as they concentrate where the rate is high, in its tails (Bierkens et al., 2019). Samples are instead read off the trajectory on , for example at equally spaced times in (1), or at uniformly drawn times as we do (Section A).
An alternative to the ZigZag sampler is the Boomerang sampler (Bierkens et al., 2020), which moves on elliptical paths around a Gaussian reference measure chosen to resemble the posterior. We also consider the Boomerang sampler, and describe it in Section C.
4.1 Sticky PDMPs
The ZigZag and Boomerang samplers target distributions with a density on , meaning all coordinates of are almost surely nonzero. However, sparse networks, where some of the weights are put to zero, can have both statistical and computational benefits. A particularly interesting prior is the spike-and-slab prior
where is the slab density, and is the Dirac measure at zero. Bierkens et al. (2023b) introduced the Sticky PDMP samplers for such settings.
The notion of stickiness is introduced as a new event type, independent of the rate function. If the trajectory of parameter hits zero, its velocity is set to zero, freezing the parameter for an exponential time with rate , where is the velocity as the parameter hits 0 while . After staying frozen for the exponentially distributed time, the parameter thaws and continues motion with the same velocity it had before freezing. Stickiness thus allows parameters to spend a positive amount of time exactly at zero, and the fraction of time a parameter is frozen estimates its posterior probability of being zero (Bierkens et al., 2023b).
In practice, we treat freezing and thawing as separate events. Let and denote the active and frozen coordinates, and the reflection rate summed over (since for ). Freezing times are deterministic functions of the trajectory, and we care only about the next active coordinate that hits zero. Upon freezing, coordinate draws a thawing clock , with for the ZigZag, which counts down as time elapses. For more details on the construction of stickiness we refer to Bierkens et al. (2023b) and one can see Schauer and Grazzi (2021) for implementations.
Algorithm 1 Sticky ZigZag step. Every reflection, freeze and thaw is a skeleton point.
Require: , , active set , frozen set with clocks
1:
2: build on
3: repeat
4: ,
5: until or ,
6: , , for
7: if then
8: with drawn w.p.
9: else if reached zero then
10: move from to , ,
11: else if then
12: move from to , restore
13: end if
4.2 Piecewise constant bounds
As the solution to the integral in (3) is generally not available in closed form, practical implementations often rely on Poisson thinning (Corbella et al., 2022; Bertazzi and Bierkens, 2022; Sutton and Fearnhead, 2023). Poisson thinning (Lewis and Shedler, 1979) proposes an event time based on a tractable upper bound and accepts it with probability . Following Corbella et al. (2022), the rate is only bounded over a short window from the current state. The process is moved deterministically to and a new window starts from there. If the event is accepted, a new skeleton point appears at . For the sticky samplers, the window is cut short at the horizon , the earliest of , the next freezing time and the thawing clocks, and reflections are proposed by thinning on , see Algorithm 1.
We build on the tangent bound of Andral and Kamatani (2024), but apply it to a whole window rather than a grid of segments. On an interval , the rate and its time derivative are evaluated at both ends, and
where is the height at which the tangents to at and intersect. A rate that is concave on lies below both tangents, and one that is convex lies below the line between and , so bounds the rate whenever it does not switch between concave and convex within . Andral and Kamatani (2024) further divide the window into segments and bound each one in this way, which gives a tight piecewise constant bound whose evaluations can be computed in parallel. In a BNN, however, every evaluation of the rate and its time derivative costs a full gradient of the log posterior and a Hessian-vector product, and all evaluations are paid before it is known where in the window the event falls. We therefore depart from their scheme and use the tangent bound with a single segment, , letting the window length , adapted as in Andral and Kamatani (2024), take the role of the segment width. Building a window then costs two evaluations, and only one when the previous window ended without an event, since its right end is the left end of the next window. This reduces the cost per event by a factor of 1.6 to 2.5 on one of our UCI models (Section E.7). As in Andral and Kamatani (2024), the ZigZag rate is bounded coordinate-wise and summed, while the Boomerang bounds its scalar rate directly.
For a BNN, the rate may switch between concave and convex within a window, so our samplers are exact only when the bound holds at all times in the window. At every proposed time , a rate exceeding the bound is detected as a violation, counted and reported, and the window is rebuilt (Section D.5). The rate is only evaluated at proposed times, so a violation elsewhere in the window goes unnoticed.
Implementation The only model-specific inputs to our samplers are a standard nn.Module in PyTorch (Paszke et al., 2019), which defines the likelihood, and a prior on its parameters, which together give the energy in (2). Any architecture that can be written in PyTorch can therefore be used without changes to the sampler, with support for GPU acceleration. As in Corbella et al. (2022) and Andral and Kamatani (2024), the user does not need to derive bounds on the event rates, which is usually the main obstacle to applying PDMPs to new models. Sparsity is controlled by the prior inclusion probabilities alone, from which the sticking rates follow in closed form. Every violation detected at a proposal is counted and reported, so the user can check the output. All code is available at https://github.com/ltronneb/sticky_bnns.
5 Experiments
We now evaluate the PDMP samplers on posterior inference for BNNs. The dense, non-sticky PDMPs target the usual posterior, and here HMC sampling using the No-U-Turn-Sampler (NUTS, Hoffman and Gelman (2014)) will serve as our baseline. The sticky samplers target the posterior based on the spike-and-slab prior, exploring subspaces that HMC cannot reach. For this model there is no exact sampler to compare with. The stochastic gradient sticky ZigZag of Fearnhead et al. (2024) discretises time and needs a tuned step size, and we leave a comparison with it to future work. We instead compare with the LBBNN model of Hubin and Storvik (2024), which approximates the spike-and-slab posterior based on mean field variational inference.
All samplers start at the same reference MAP estimate, as do the variational means of the LBBNN, except NUTS on the one-dimensional data, which uses its default random initialization. The dense models have fan-in scaled Gaussian priors, and the sticky models a spike-and-slab prior with the same Gaussian as slab. Details on the priors, the MAP and the reference measure are given in Section B, and the settings of every experiment in Table 3. Each PDMP run is given a fixed budget of either P skeleton points or G gradient evaluations, specified per experiment, where G counts gradients only, not the Hessian-vector products that the bounds also need (Section 4.2). Posterior samples are obtained by evaluating the trajectory at S = 4000 times drawn uniformly after discarding the first 20% of its time as burn-in. NUTS runs four chains of 1000 warmup and 1000 retained draws, giving S = 4000, and we draw S = 4000 samples from the fitted LBBNN (Section D.4.1). For regression, we form the posterior predictive
and report the RMSE of its mean, the NLL and the CRPS on held-out test data (details in Section D.3).
We first consider a one-dimensional regression problem (Section 5.1), before turning to the Boston Housing dataset, our main benchmark, where we evaluate predictive performance (Section 5.2) and convergence (Section 5.3). Finally, we scale to image classification on MNIST (Section 5.4). Section E contains additional experiments.
5.1 A one-dimensional non-linear example
We fit the PDMP samplers, NUTS and the LBBNN, each in a single run, to a simulated data set using a BNN with one hidden layer of 100 units. The PDMPs use gradient evaluations and the sticky samplers and LBBNN apply a prior inclusion weight . The responses are
at 40 inputs drawn uniformly on and 20 more on that oversample the sharp bump of . We call this dataset sharp. The metrics in Table 1 are computed on evenly spaced test points in , the range of the training inputs.
As seen in Figure 2, all samplers capture the bump, with the peak slightly underestimated. The predictive means of the non-sticky PDMPs and NUTS are visually indistinguishable within the range of the data, which is expected as they target the same posterior. Away from the bump, the dense posteriors follow spurious oscillations on the flat parts of f and widen quickly outside the range of the data. The sticky samplers instead recover the flat, saturating parts of f closely. This is reflected in Table 1, where the sticky samplers reach a test RMSE of 0.109, close to the noise level of 0.1, against 0.115 to 0.116 for the dense samplers, and also improve NLL and CRPS. The two sticky samplers agree closely with each other as they target the same posterior, and resemble the LBBNN, which achieves greater sparsity. On the other one-dimensional datasets in Section E.3, the LBBNN performs on par with the sticky samplers on the gap data but worse on the Hernandez and multiscale data, most clearly on multiscale.

Figure 2: Posterior predictive fits on the sharp dataset. The dashed black line is the true function , solid lines are posterior predictive means, and thin lines lie two predictive standard deviations away from the mean.
| Sampler | Sparsity | RMSE | NLL | CRPS |
|---|---|---|---|---|
| Boomerang | - | 0.115 | -0.740 | 0.066 |
| ZigZag | - | 0.116 | -0.739 | 0.067 |
| NUTS | - | 0.115 | -0.742 | 0.066 |
| Sticky Boomerang | 85% | 0.109 | -0.801 | 0.062 |
| Sticky ZigZag | 87% | 0.109 | -0.799 | 0.062 |
| LBBNN | 95% | 0.111 | -0.778 | 0.063 |
Table 1: Predictive performance on the sharp dataset, on evenly spaced test points in , for a single run of each method. Sparsity is the percentage of weights that are exactly zero, averaged over draws. Lower is better for RMSE, NLL and CRPS, and the best value is in bold.
5.2 Benchmark datasets
We benchmark on the Boston Housing dataset (Harrison and Rubinfeld, 1978) and three UCI regression datasets (concrete, energy and yacht, see Kelly et al. (2024)), using five independent train/test splits per dataset. We consider two BNN architectures, namely a small network with one hidden layer of 50 units and a medium network with three hidden layers of 50 units each. The PDMPs are given a budget of gradient evaluations, and the sticky samplers are run with prior inclusion weights and . The LBBNN is given the same spike-and-slab prior with .
The metrics in Table 2 and in Section E.4 are evaluated on the held-out test set of a 90/10 split, and we additionally report the coverage of the central predictive interval (Section D.3). In Table 2, the non-sticky samplers and NUTS have a slight edge over the sticky samplers. The difference in RMSE, NLL and CRPS between the dense and the sticky samplers is small relative to the between-split variation for the small network. It is somewhat larger for the medium network, most clearly in the NLL of the sticky Boomerang. Coverage is close to nominal for all samplers on the small network, while on the medium network all Boomerang samplers produce too narrow predictive intervals, in line with their higher NLL. The sticky samplers sample about two-thirds of the network weights as exactly zero at , and about 85 to at , so the cost in predictive accuracy buys a substantial reduction in the effective dimensionality of the model. The LBBNN is behind all samplers in RMSE and CRPS on both networks, even at matched sparsity ( for the LBBNN against for the sticky samplers). The effect of on sparsity is studied further in Section E.6, and results for the remaining UCI datasets are given in Section E.4. They show essentially the same pattern as for Boston, with the sticky samplers comparable to the dense PDMPs and NUTS, the LBBNN performing worse on every dataset, and the Boomerang samplers on the medium network giving too narrow intervals on concrete. Lastly, no bound violations were detected in any of the one-dimensional or benchmark runs.
5.3 Convergence analysis
To assess convergence, we run four chains of every sampler in Table 2 on the first of the five train/test splits. We fit four MAP estimates from different random initialisations, which end in different local modes of the multimodal posterior, and start one chain from each, with the Laplace covariance at that MAP. The PDMPs are given a budget of gradient evaluations per chain, and NUTS starts from
| Network | Sampler | w | Sparsity | RMSE | NLL | CRPS | |
|---|---|---|---|---|---|---|---|
| d = 752 | Boomerang | - | - | 2.88 ± .19 | 2.48 ± .08 | 1.58 ± .10 | 90% |
| ZigZag | - | - | 2.88 ± .22 | 2.49 ± .08 | 1.58 ± .12 | 91% | |
| NUTS | - | - | 2.86 ± .22 | 2.48 ± .08 | 1.57 ± .12 | 91% | |
| Sticky Boomerang | 0.3 | 64% | 2.98 ± .18 | 2.51 ± .06 | 1.62 ± .10 | 89% | |
| Sticky ZigZag | 0.3 | 67% | 2.97 ± .23 | 2.51 ± .08 | 1.63 ± .12 | 92% | |
| Sticky Boomerang | 0.1 | 85% | 3.07 ± .19 | 2.54 ± .06 | 1.67 ± .10 | 90% | |
| Sticky ZigZag | 0.1 | 86% | 3.07 ± .25 | 2.55 ± .08 | 1.68 ± .13 | 92% | |
| LBBNN | 0.3 | 86% | 3.27 ± .24 | 2.61 ± .07 | 1.79 ± .13 | 92% | |
| d = 5852 | Boomerang | - | - | 2.75 ± .13 | 2.55 ± .08 | 1.48 ± .06 | 82% |
| ZigZag | - | - | 2.78 ± .19 | 2.45 ± .10 | 1.50 ± .10 | 88% | |
| NUTS | - | - | 2.73 ± .20 | 2.44 ± .09 | 1.48 ± .11 | 89% | |
| Sticky Boomerang | 0.3 | 67% | 2.87 ± .20 | 2.69 ± .09 | 1.56 ± .09 | 81% | |
| Sticky ZigZag | 0.3 | 69% | 2.90 ± .24 | 2.49 ± .10 | 1.56 ± .12 | 88% | |
| Sticky Boomerang | 0.1 | 87% | 2.89 ± .20 | 2.70 ± .10 | 1.58 ± .10 | 81% | |
| Sticky ZigZag | 0.1 | 89% | 2.99 ± .24 | 2.52 ± .09 | 1.63 ± .12 | 87% | |
| LBBNN | 0.3 | 88% | 3.62 ± .28 | 2.72 ± .07 | 1.99 ± .15 | 89% |
Table 2: Predictive performance on the Boston Housing test splits, given as mean ± standard error (SEM) over 5 independent train/test splits. d is the number of parameters of the small and medium networks. Sparsity is the percentage of weights sampled exactly zero, averaged over draws. is the share of test responses inside the central 90% predictive interval, with a SEM of 2 to 3 percentage points (omitted for space).
the same four MAPs. We compare the chains on the noise level and test RMSE, and summarise their agreement with the rank-normalised of Vehtari et al. (2021). On the small network, every sampler converges (Figure 3), with and ESS larger than 400 for both statistics except for the sticky Boomerang at w = 0.1 as seen in Table 8. On the medium network, the ZigZag chains agree ( ) and reach the same and test RMSE regardless of MAP. However, with a bulk ESS of 70 to 170, they mix slowly and we do not claim full convergence. The Boomerang samplers on the medium network do not converge and seem stuck close to whatever MAP they start off in. We attribute this to the Gaussian reference of the Boomerang (Section C.1). A MAP that overfits the training data will underestimate the noise level , and since the Laplace precision of the weights scales roughly with , the reference becomes narrow. The Boomerang then moves on small orbits around the MAP, so the chain stays close to where it started. Consistent with this, all four MAPs underestimate the noise level (Figure 3), and while the ZigZag and NUTS chains all rise to the same , the Boomerang chains only move part of the way and settle below it. NUTS converges on both networks as expected, and is more effective per gradient evaluation.
The convergence analysis matters for Table 2 in two ways. First, for the small network, and the ZigZag samplers on the medium network, the test RMSE is already close to its final value at the budget of used in the table, while mixes more slowly (Figure 9), consistent with the finding of Papamarkou et al. (2022) that non-converged chains can still predict accurately. Furthermore, the table averages over five splits, and the variation between splits is several times larger than the variation between chains. The Boomerang samplers on the medium network are the exception, as their chains differ about as much as the splits do. More diagnostics and details can be found in Section E.5.
5.4 Image data
To demonstrate scalability, we apply the dense and sticky ZigZag to MNIST (LeCun et al., 1998), with a feedforward network (FFN) with two hidden layers of 256 ReLU units and a LeNet-5 with tanh activations. Each sampler is run once for skeleton points with minibatch gradients of size 1024, which makes the samplers approximate, and we briefly discuss the effects of minibatching in Section E.9. The sticky ZigZag starts at a pruned MAP, , in which weights that can be set to zero without degrading the validation accuracy start frozen, and the dense ZigZag at the unpruned MAP . We compare with an SGD baseline, which is described in Section D.4. As we do not expect the samplers to converge on these networks, we focus on the ZigZag, which converged most reliably on the UCI data
Chain mean sd
Starting MAP

Figure 3: Chain means of (top) and test RMSE (bottom) on the first Boston split. Filled dots show each chain's mean with one posterior standard deviation, and hollow dots the MAP it started from.

(a)
(b)
Figure 4: Analyses following Izmailov et al. (2021a) (a) and Izmailov et al. (2021b) (b), adapted to our samplers for the MNIST FFN. (a) First-layer weights of four hidden units. (b) Robustness to Gaussian noise of standard deviation on the [0, 1] pixel scale.
(Section 5.3). Furthermore, with ReLU activations the rate can jump discontinuously, so the tangent bound carries no guarantee for the FFN. Neither ZigZag sampler reports any bound violations, while the sticky Boomerang, reported in Section E.8, records 71 and 79 bound violations for the FFN and LeNet-5.
On the test images, all samplers stay within 0.8 percentage points of the accuracy of SGD, while the sticky ZigZag sets 92 to 98% of the weights exactly to zero (Table 9). Izmailov et al. (2021b) find that BNNs sampled with HMC are less robust than SGD to Gaussian noise on MNIST, and Izmailov et al. (2021a) attribute this to pixels that are zero in all training images, as the posterior of the weights connected to them equals the prior. We adapt both analyses to our samplers in Figure 4. In our draws, the weights of these pixels are indeed at their prior, but under the spike-and-slab prior only 5% of them are nonzero, against all of them for the dense ZigZag. More broadly, the first-layer weights of the dense ZigZag look like noise, while the nonzero weights of the sticky ZigZag form stroke-like patterns similar to those of SGD (Figure 4a). Under unclipped Gaussian noise, the sticky ZigZag is clearly more robust than the dense ZigZag, which these weight patterns may partly explain, although it remains less robust than SGD and both MAPs (Figure 4b). On the LeNet-5, whose filters are shared across pixel positions, the two samplers behave alike (Figure 12).
6 Discussion
In this work we have shown that sticky PDMPs can sample the posterior of BNNs under a spike-and-slab prior. The samplers set a large share of the weights exactly to zero without thresholding or other post-processing, at a modest cost in predictive performance compared with dense samplers. The samplers predict more accurately than a sparse variational approximation under the same prior on all our benchmark datasets.
To make PDMPs more efficient, we bound the rate with a cheap single tangent segment over an adaptive window, valid whenever the rate does not switch between concave and convex within it. The samplers only need a differentiable log density, specified as a PyTorch module, and can run on GPUs. On the UCI benchmarks we study convergence across chains started in different MAPs, and on MNIST we show that sticky PDMPs can make a sparse feedforward BNN more robust to Gaussian input noise than a dense one.
Limitations In the convergence analysis on the first Boston split (Section 5.3), the PDMPs mix more slowly than NUTS per gradient evaluation, for the dense ZigZag by a factor of about 20 on the small and 50 on the medium network in effective sample size of . The comparison is approximate, as the effective sample sizes come from draws rather than the continuous trajectory and the gradient count leaves out the Hessian-vector products, but neither explains a gap of this size. On the medium network the ZigZag chains agree but mix slowly, and the Boomerang samplers do not converge, as their reference becomes too narrow when the MAP overfits. The test RMSE stabilises before mixes, so predictive results are reached before full convergence. Exactness also rests on bounds that cannot be verified for a BNN, and the MNIST results are single minibatch runs that we do not expect to have converged. Finally, all chains start at a MAP and explore the posterior locally, so a single chain cannot be expected to visit several modes.
Further work Several directions could improve PDMP samplers. We believe the largest and simplest gain lies in the velocities of the ZigZag. All coordinates currently move at unit speed, although their posterior scales differ widely. Speeds proportional to the standard deviations of the Laplace approximation at the MAP, or learned during sampling by the adaptive preconditioning of Bertazzi and Bierkens (2022), could account for this. Bounds that remain valid with subsampled gradients, for instance through statistically estimated bounds as in Corbella et al. (2022), could remove the bias of minibatching and significantly lower the cost per event. For the Boomerang, a reference that adapts during sampling and accounts for the frozen weights could reduce its dependence on the MAP. On the modelling side, a hyperprior on w, structured priors that freeze whole units, or input-skip connections (Høyheim et al., 2026) could make the networks even sparser. Finally, scaling to larger architectures and developing Python software of the kind NumPyro provides for HMC would make PDMPs more practical for Bayesian deep learning.
AI use statement
In this work, we used generative AI tools for feedback on research methodology, design and feedback on experiments, implementing methods, formulating mathematical claims, translation, cleaning and reformatting of datasets and in interpreting results. We have not used generative AI tools for generating synthetic datasets, designing research methodology, developing theoretical models and conceptual frameworks, providing critical ingredients for proving mathematical claims, assisting in writing proofs, proposing or refining hypotheses. Support in qualitative and thematic data analysis is not applicable to this work. The invariance argument in Section C.2 was discussed with an AI tool and checked by the authors.
Additionally, we used generative AI tools for creating or modifying scientific figures, images and plots, creating and editing software code, drafting parts of a paper, summarizing and analyzing existing literature, brainstorming, sourcing and searching for information, editing text to improve readability, identifying relevant literature and suggesting a structure for a research paper.
We have reviewed all AI-assisted work. The authors have checked and discussed all research methodology present in the paper, and are confident it is sound. The implemented methods have been verified with existing literature rigorously and LLM generated code has been subject to numerical verification to known ground truths and code produced by the authors. All literature-related output from LLMs was checked against the original sources. Additionally, we did not rely on any LLM-provided information that could not be traced to a source we were able to verify. All text drafts and edits have been verified to reflect what the authors wish to express.
We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
Acknowledgements
The authors wish to thank Aliaksandr Hubin and Alice Corbella for the fruitful discussions. AA and GOS were supported by the Research Council of Norway through its Centre of Excellence Integreat - The Norwegian Centre for knowledge-driven machine learning, project number 332645. FP was supported by the UKRI grant EP/Y014650/1 as part of the ERC Synergy project OCEAN. LR was supported by the European Union's Horizon Europe research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 101126636.
References
Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., and Zheng, X. (2015). TensorFlow: Large-scale machine learning on heterogeneous systems. Software available from tensorflow.org.
Andral, C. and Kamatani, K. (2024). Automated techniques for efficient sampling of piecewise-deterministic Markov processes. arXiv preprint arXiv:2408.03682.
Bertazzi, A. and Bierkens, J. (2022). Adaptive schemes for piecewise deterministic Monte Carlo algorithms. Bernoulli, 28(4):2404 – 2430.
Bierkens, J. and Duncan, A. (2017). Limit theorems for the zig-zag process. Advances in Applied Probability, 49(3):791–825.
Bierkens, J., Fearnhead, P., and Roberts, G. (2019). The Zig-Zag process and super-efficient sampling for Bayesian analysis of big data. Ann. Statist., 47(3):1288–1320.
Bierkens, J., Grazzi, S., Kamatani, K., and Roberts, G. (2020). The boomerang sampler. In International conference on machine learning, pages 908–918. PMLR.
Bierkens, J., Grazzi, S., Roberts, G., and Schauer, M. (2023a). Methods and applications of PDMP samplers with boundary conditions. arXiv preprint arXiv:2303.08023.
Bierkens, J., Grazzi, S., van der Meulen, F., and Schauer, M. (2023b). Sticky PDMP samplers for sparse and local inference problems. Statistics and Computing, 33(1):8.
Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. (2015). Weight uncertainty in neural network. In Bach, F. and Blei, D., editors, Proc. 32nd International Conference on Machine Learning, volume 37 of Proc. Machine Learning Research, pages 1613–1622, Lille, France. PMLR.
Bouchard-Côté, A., Vollmer, S., and Doucet, A. (2018). The Bouncy Particle Sampler: A Nonreversible Rejection-Free Markov Chain Monte Carlo Method. Journal of the American Statistical Association, 113(522):855–867.
Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q. (2018). JAX: composable transformations of Python+NumPy programs. http://github.com/jax-ml/jax.
Chao, M. T. (1982). A general purpose unequal probability sampling plan. Biometrika, 69(3):653–656.
Chen, T., Fox, E., and Guestrin, C. (2014). Stochastic Gradient Hamiltonian Monte Carlo. In Xing, E. P. and Jebara, T., editors, Proc. of the 31st International Conference on Machine Learning, volume 32 of Proc. Machine Learning Research, pages 1683–1691, Beijing, China. PMLR.
Chevallier, A., Fearnhead, P., and Sutton, M. (2023). Reversible Jump PDMP Samplers for Variable Selection. Journal of the American Statistical Association, 118(544):2915–2927.
Chevallier, A., Power, S., and Sutton, M. (2025). Towards practical PDMP sampling: Metropolis adjustments, locally adaptive step-sizes, and NUTS-based time lengths. arXiv preprint arXiv:2503.11479.
Corbella, A., Spencer, S. E., and Roberts, G. O. (2022). Automatic Zig-Zag sampling in practice. Statistics and Computing, 32(6):107.
Fearnhead, P., Bierkens, J., Pollock, M., and Roberts, G. O. (2018). Piecewise deterministic Markov processes for continuous-time Monte Carlo. Statistical Science, 33(3):386–412.
Fearnhead, P., Grazzi, S., Nemeth, C., and Roberts, G. O. (2024). Stochastic gradient piecewise deterministic Monte Carlo samplers. arXiv preprint arXiv:2406.19051.
Fortuin, V. (2022). Priors in Bayesian Deep Learning: A Review. International Statistical Review, 90(3):563–591.
Fortuin, V., Garriga-Alonso, A., Ober, S. W., Wenzel, F., Rätsch, G., Turner, R. E., van der Wilk, M., and Aitchison, L. (2022). Bayesian neural network priors revisited. In International Conference on Learning Representations.
George, E. I. and McCulloch, R. E. (1997). Approaches for Bayesian variable selection. Statistica Sinica, 7(2):339–373.
Ghosh, S., Yao, J., and Doshi-Velez, F. (2019). Model Selection in Bayesian Neural Networks via Horseshoe Priors. Journal of Machine Learning Research, 20(182):1–46.
Goan, E., Perrin, D., Mengersen, K., and Fookes, C. (2023). Piecewise Deterministic Markov Processes for Bayesian Neural Networks. In The 39th Conference on Uncertainty in Artificial Intelligence.
Graves, A. (2011). Practical Variational Inference for Neural Networks. In Shawe-Taylor, J., Zemel, R., Bartlett, P., Pereira, F., and Weinberger, K., editors, Advances in Neural Information Processing Systems, volume 24. Curran Associates, Inc.
Harrison, Jr., D. and Rubinfeld, D. L. (1978). Hedonic housing prices and the demand for clean air. Journal of Environmental Economics and Management, 5(1):81–102.
Hernández-Lobato, J. M. and Adams, R. P. (2015). Probabilistic backpropagation for scalable learning of Bayesian neural networks. In Proceedings of the 32nd International Conference on Machine Learning - Volume 37, ICML'15, page 1861–1869. JMLR.org.
Hoffman, M. D. and Gelman, A. (2014). The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res., 15(1):1593–1623.
Høyheim, E., Skaaret-Lund, L., Sæbø, S., and Hubin, A. (2026). Explainable Bayesian deep learning through input-skip latent binary Bayesian neural networks. Journal of Artificial Intelligence Research, 86.
Hubin, A. and Storvik, G. (2024). Sparse Bayesian Neural Networks: Bridging Model and Parameter Uncertainty through Scalable Variational Inference. Mathematics, 12(6).
Izmailov, P., Nicholson, P., Lotfi, S., and Wilson, A. G. (2021a). Dangers of Bayesian model averaging under covariate shift. Advances in Neural Information Processing Systems, 34:3309–3322.
Izmailov, P., Vikram, S., Hoffman, M. D., and Wilson, A. G. (2021b). What Are Bayesian Neural Network Posteriors Really Like? In Meila, M. and Zhang, T., editors, Proc. 38th International Conference on Machine Learning, volume 139 of Proc. Machine Learning Research, pages 4629–4640. PMLR.
Kelly, M., Longjohn, R., and Nottingham, K. (2024). The UCI Machine Learning Repository. UCI Machine Learning Repository. Accessed: October 2026.
Krüger, F., Lerch, S., Thorarinsdottir, T., and Gneiting, T. (2021). Predictive Inference Based on Markov Chain Monte Carlo Output. International Statistical Review, 89(2):274–301.
LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324.
Lewis, P. A. W. and Shedler, G. S. (1979). Simulation of nonhomogeneous Poisson processes by thinning. Naval Research Logistics Quarterly, 26(3):403–413.
Louizos, C., Ullrich, K., and Welling, M. (2017). Bayesian compression for deep learning. In Advances in Neural Information Processing Systems, volume 30, pages 3288–3298.
MacKay, D. J. (1992). Bayesian Methods for Adaptive Models. PhD thesis, California Institute of Technology.
Martin, O. A., Abril-Pla, O., Deklerk, J., Axen, S. D., Carroll, C., Hartikainen, A., and Vehtari, A. (2026). ArviZ: a modular and flexible library for exploratory analysis of Bayesian models. Journal of Open Source Software, 11(119):9889.
Mitchell, T. J. and Beauchamp, J. J. (1988). Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83(404):1023–1032.
Molchanov, D., Ashukha, A., and Vetrov, D. (2017). Variational dropout sparsifies deep neural networks. In International conference on machine learning, pages 2498–2507. PMLR.
Neal, R. M. (1996). Bayesian Learning for Neural Networks, volume 118 of Lecture Notes in Statistics. Springer-Verlag, New York. PhD thesis, University of Toronto (1995).
O'Hara, R. B. and Sillanpää, M. J. (2009). A review of Bayesian variable selection methods: What, how and which. Bayesian Analysis, 4(1):85–117.
Pagani, F., Wiegand, M., and Nadarajah, S. (2022). An n-dimensional Rosenbrock distribution for Markov chain Monte Carlo testing. Scandinavian Journal of Statistics, 49(2):657–680.
Papamarkou, T., Hinkle, J., Young, M. T., and Womble, D. (2022). Challenges in Markov chain Monte Carlo for Bayesian neural networks. Statistical Science, 37(3):425–442.
Paszke, A., Gross, S., Massa, F., et al. (2019). PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems, volume 32.
Peters, E. A. J. F. and de With, G. (2012). Rejection-free Monte Carlo sampling for general potentials. Phys. Rev. E, 85:026703.
Phan, D., Pradhan, N., and Jankowiak, M. (2019). Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro. arXiv preprint arXiv:1912.11554.
Polson, N. G. and Ročková, V. (2018). Posterior concentration for sparse deep learning. In Advances in Neural Information Processing Systems, NIPS'18, page 938–949, Red Hook, NY, USA. Curran Associates Inc.
Schauer, M. and Grazzi, S. (2021). ZigZagBoomerang.jl: Piecewise deterministic Monte Carlo in Julia. https://github.com/mschauer/ZigZagBoomerang.jl.
Sommer, E., Wimmer, L., Papamarkou, T., Bothmann, L., Bischl, B., and Rügamer, D. (2024). Connecting the Dots: Is Mode-Connectedness the Key to Feasible Sample-Based Inference in Bayesian Neural Networks? In Salakhutdinov, R., Kolter, Z., Heller, K., Weller, A., Oliver, N., Scarlett, J., and Berkenkamp, F., editors, Proc. 41st International Conference on Machine Learning, volume 235 of Proc. Machine Learning Research, pages 45988–46018. PMLR.
Sutton, M. and Fearnhead, P. (2023). Concave-convex PDMP-based sampling. Journal of Computational and Graphical Statistics, 32(4):1425–1435.
Tran, B.-H., Rossi, S., Milios, D., and Filippone, M. (2022). All you need is a good functional prior for Bayesian deep learning. J. Mach. Learn. Res., 23(74):1–56.
Vehtari, A., Gelman, A., Simpson, D., Carpenter, B., and Bürkner, P.-C. (2021). Rank-Normalization, Folding, and Localization: An Improved for Assessing Convergence of MCMC (with Discussion). Bayesian Analysis, 16(2):667 – 718.
Welling, M. and Teh, Y. W. (2011). Bayesian Learning via Stochastic Gradient Langevin Dynamics. In Proc. 28th International Conference on Machine Learning, pages 681–688.
Wenzel, F., Roth, K., Veeling, B. S., Świątkowski, J., Tran, L., Mandt, S., Snoek, J., Salimans, T., Jenatton, R., and Nowozin, S. (2020). How good is the Bayes posterior in deep neural networks really? In Proc. 37th International Conference on Machine Learning, volume 119 of Proc. Machine Learning Research, pages 10248–10259. PMLR.
A Obtaining samples from the continuous trajectory
Given a sampled trajectory , we discard the first 20% of the trajectory time as burn-in and denote by the start of the remaining part. The optimal estimator for is then
where are the skeleton points after the burn-in and where the integrals to the right are over deterministic paths. When these integrals are difficult to compute, as for the predictive quantities of a BNN, we instead select sample points and use (1) with . One option is an equally spaced grid on , as in Bierkens et al. (2019), which gives a Riemann-sum approximation of . In all our experiments we instead draw independently and uniformly on , and sort them into time order. Then for every , so the sample average is an unbiased estimate of , and, unlike a grid, the scheme carries over to the case below where is not known in advance. Note that we can rewrite to
where . A time drawn uniformly on is therefore equivalently obtained by first choosing an interval with probability and then drawing a time uniformly within it.
For the one-dimensional models and the small UCI networks, the entire skeleton is kept in memory, so is known when sampling and the times are drawn directly. For the larger models, keeping the skeleton in memory can pose issues. Their skeletons are generated in time-segments , with and , where each segment is discarded from memory before the next is generated, so and are not known while the segments are processed. We can however generate uniformly distributed time samples by relying on reservoir sampling (Chao, 1982). Consider retaining slots, each holding a time and the corresponding state of the PDMP. For the first segment, fill the slots with times drawn uniformly on and the corresponding states. Before generating the next segment, the skeleton of the current one is discarded, except its last point, from which the next segment continues. When segment has been generated, each of the slots is independently replaced, with probability , by a time drawn uniformly on and the corresponding state. If a slot held a time uniform on before this update, it holds a time uniform on after it, so by induction the slots hold independent times drawn uniformly on once all segments are processed. We then discard the slots with times before . The remaining slots hold independent times drawn uniformly on , and we keep of them at random. The resulting draws have the same distribution as if had been drawn uniformly on directly, but only one segment of the skeleton is held in memory at a time.
B Implementation details
For an input , the network output is defined recursively by the forward pass
where is a non-linear activation applied elementwise, and are the weight matrix and bias vector of layer , , and . We use for all models except the MNIST feedforward network, which uses ReLU. The network output parametrizes a task-dependent likelihood .
B.1 Model specifications
Classification tasks on MNIST are assigned a categorical likelihood. Regression tasks are assigned a Gaussian likelihood, where the network output serves as the mean and an additional noise scale is introduced. For the one-dimensional datasets, the noise scale is fixed at the true value, and for all other regressions it is learned. For non-sticky PDMPs and NUTS, the prior over all network weights is a fan-in scaled Gaussian prior with , where is the number of inputs to layer and is a prior scale. For sticky PDMPs we apply a spike and slab prior on the network weights with a prior inclusion weight and a Gaussian slab
This spike and slab prior is parametrized via the sticking parameter determined by w and the slab, which is described more in detail in Section E.6. For all samplers, the bias terms are not freezable and given a Gaussian prior
without a fan-in scale. Collecting the weights and biases, the prior covariance matrix is diagonal, with for weights and for biases. In the implementation, the parameters of the nn.Module are stored as named tensors, one per layer, so these priors are assigned layerwise before the parameters are flattened into the single vector . For regression, the noise scale of the likelihood is excluded from freezing, since it must be positive. It is given a half-normal prior with scale chosen per dataset. The values of , and for each experiment are given in Table 3.
B.2 MAP and initialisation
For each dataset and split, we compute a MAP estimate of a neural network with the same architecture as the relevant BNN. The MAP is found by minimising, up to a normalizing constant,
with the Adam optimizer using either a constant learning rate for simpler targets, or a cosine-annealed learning rate for more complex models. For the image models, the MAP is then pruned. Weights with below times their prior standard deviation are set to zero, for the largest on a logarithmic grid in for which the accuracy on 2000 test images, that are left out of all reported metrics, stays within a tolerance of the unpruned MAP (1 and 3 percentage points for LeNet-5 and the feedforward network). The remaining weights are then refitted with the pruned ones fixed at zero, and the sticky samplers start from this pruned MAP with the pruned weights frozen.
All samplers are initialized at the MAP, in order to get a fair comparison. The MAP also serves as the centre of the Boomerang reference measure (Section C.1). Starting at the MAP is analogous to the notion of control variates in the PDMP literature (Bierkens et al., 2019, 2020). The drawbacks are of course that the samplers will be initialized within a mode of the multimodal loss-landscape. This might hinder full exploration of the state space, but for complex tasks the MAP is also essential for a well-behaving sampler.
C The Boomerang sampler
In the main body we also included results from sampling with the Boomerang sampler, which is described in the following. Instead of linear motion with constant velocities, the Boomerang sampler is defined on by the elliptical flow
Here is the mean and the covariance of a Gaussian reference measure , typically chosen to resemble the posterior and defines the velocity distribution . By adopting this reference, the posterior can be written as
The flow rotates and thus leaves invariant, so the Gaussian part of the target is handled exactly and only measures the departure of the posterior from the reference. If the posterior is close to Gaussian, will be small and events are rare, meaning sampling is very efficient. More details on how we choose and can be found in Section C.1. In contrast to the ZigZag, the rate of the Boomerang does not factorise, and takes the general form
To sample event times, we simply perform thinning on directly. When an event occurs, the Boomerang transition is a contour reflection defined by
Contour reflections alone do not make the Boomerang sampler ergodic (Bierkens et al., 2020). Velocities are therefore refreshed by drawing at event times sampled from a homogeneous Poisson process with rate .
C.1 Reference measure for BNNs
The Boomerang samplers require a Gaussian product measure , and so we must find candidates for and . We set to the MAP of Section B.2, and obtain from a Laplace approximation at the MAP. For the reference covariance, we use a diagonal approximation that combines the prior precision of Section B.1 and the diagonal empirical Fisher information. Concretely, we calculate
for a uniform sample without replacement. The factor turns the -point sum into an unbiased estimate of the full-data Fisher sum , so that is comparable across training-set sizes. Each diagonal entry is floored at .
In practice the Boomerang sampler’s mixing is sensitive to the overall scale of the reference measure. We therefore multiply the reference precision by a scalar , set by hand by inspecting how developed along pilot trajectories (Table 3). Values loosen the reference measure, while tighten it. For regression tasks, the entry of corresponding to is set to the curvature of the log noise prior at the MAP, for a half-normal prior with scale , instead of the empirical Fisher term, since the likelihood curvature in ignores its coupling to the weights and makes the reference overly concentrated. This entry is not multiplied by .
C.2 Sticky Boomerang sampler
The sticky Boomerang is similar to the sticky ZigZag and we follow Bierkens et al. (2023b). When an active coordinate hits zero, it freezes with its velocity stored, and thaws after an exponential time with rate , continuing with the stored velocity. While frozen, it is excluded from the event rate and from reflections. At a refreshment, a frozen coordinate keeps the sign of its stored velocity and redraws its magnitude (Bierkens et al., 2023b), together with its thawing time. Unlike Bierkens et al. (2023b), who centre the reference at zero, we centre it at the MAP with a diagonal covariance. The centre only changes how the active coordinates move, not the sticky dynamics, and in stationarity the rates of freezing and thawing at zero are set by the target density there. We therefore take the invariance argument of Bierkens et al. (2023b, Proposition B.3) to carry over to centring the sticky Boomerang at the MAP.
D Experimental settings
D.1 Data
The Boston Housing and UCI datasets are split at random into 90% training and 10% test data, with the five splits drawn with seeds 42 to 46. Inputs and responses are standardised with the mean and standard deviation of the training split, and all metrics are reported on the original scale. The one-dimensional datasets are generated as described in Section 5.1 and Section E.3, with test responses drawn from the same model at 300 evenly spaced points in ( for Hernandez). The image models use the full
| One-dimensional | UCI small | UCI medium | MNIST FFN | MNIST LeNet-5 | |
|---|---|---|---|---|---|
| Hidden layers | [100] | [50] | [50, 50, 50] | [256, 256] | LeNet-5 |
| Activation | tanh | tanh | tanh | ReLU | tanh |
| Likelihood | Gaussian, fixed | Gaussian, learned | Gaussian, learned | Categorical | Categorical |
| 3, 3 | 1, 1 | 1, 1 | 2, 2 | 2, 2 | |
| Noise prior scale | - | per dataset* | per dataset* | - | - |
| Inclusion weight | 0.1 | 0.3, 0.1 | 0.3, 0.1 | 0.05 | 0.05 |
| Gradient batch | full | full | full | 1024 | 1024 |
| ZigZag base rate | |||||
| Boomerang refresh rate | 1 | 1 | 1 | 1 | 1 |
| Reference scale | 0.1 | 0.1 | per dataset* | 1 | 1 |
| Initial , ZigZag | |||||
| Initial , Boomerang | |||||
| Adaptation | 1.01 | 1.01 | 1.01 | 1.02 | 1.02 |
| shrink after a violation | 2 | 2 | 2 | 1.1 | 1.1 |
| MAP, Adam steps | |||||
| MAP, learning rate | |||||
| MAP, batch | full | full | full | full | 512 |
| Fisher sample size | 128 | 128 | 128 | 1024 | 1024 |
Table 3: Settings per experiment. *Per dataset, in the order Boston, Energy, Concrete and Yacht, , 0.03, 0.2, 0.01 and , 0.5, 10, 0.5.
MNIST training sets of 60,000 images. Of the 10,000 test images, 2000 are used to choose the pruning threshold of the MAP (Section B.2), and all reported metrics are computed on the remaining 8000. We recognise the ethical concerns with the Boston Housing dataset, and use it only because it remains a widely used benchmark, formerly part of the UCI repository. For brevity, we sometimes count it among the UCI datasets in the text.
D.2 Hyperparameters
Table 3 lists the settings of every experiment. The prior scales and were fixed in advance for each experiment. On the UCI data, the prior inclusion weights and give two levels of sparsity, and Section E.6 covers the full range of . The image models use smaller , given their size. The reference scale was tuned per dataset for the Boomerang. Furthermore, in practice, the ZigZag adds a constant excess switching rate to the rate of each moving coordinate, , which ensures ergodicity (Bierkens et al., 2019). The initial only sets the starting point of the adaptation in Section D.5, and is not critical. The number of Adam steps for the MAP was chosen so that the training loss had flattened.
D.3 Performance metrics
We here include more details on how the predictive metrics are computed. The responses are standardised with the training mean and standard deviation , and all metrics are reported on the original scale. Write and for the mean and noise level of draw at test point . The reported RMSE and NLL are calculated as
with . The continuous ranked probability score (CRPS) of a predictive distribution with CDF at an observation is
where lower is better. Since each draw induces a Gaussian predictive, the posterior predictive is an equally weighted Gaussian mixture, for which this integral is available in closed form (Krüger et al., 2021). We compute the mean CRPS across the test set as
where , and is a fixed uniform subsample of size , drawn once with a common seed so all samplers are scored on the same draws. We compute the coverage as the share of test responses that fall inside the central 90% interval of the posterior predictive. With the predictive CDF at , , the interval runs from to , so we compute
from all S draws. Values above 0.9 indicate intervals that are too wide, and values below intervals that are too narrow.
For the UCI data we report the mean and standard error over the five splits. The one-dimensional and image experiments are single runs. For the image models, we average the class probabilities over 500 posterior draws and report the accuracy, the NLL of the averaged probabilities, the expected calibration error (ECE) with 15 equal-width confidence bins, and the Brier score.
D.4 Baselines
We here add additional information on the NUTS and stochastic gradient descent (SGD) baselines, and present the LBBNN method in more depth. NUTS is run with NumPyro (Phan et al., 2019) on the same priors and likelihood as the dense PDMPs, with a target acceptance probability of 0.9 and the default maximum tree depth of 10, using four chains of 1000 warmup and 1000 retained draws. For the image models, we also report a standard non-Bayesian network trained by stochastic gradient descent (SGD). It is a dense network trained by maximum likelihood, without the prior, and is fitted separately from the MAP , which is described in Section B.2. SGD uses Nesterov momentum 0.9, batch size 128 and a learning rate of 0.05, annealed by a cosine schedule over 40 epochs.
D.4.1 LBBNN method
As a variational analogy to the sticky samplers, we have implemented the latent binary Bayesian neural network (LBBNN) from Hubin and Storvik (2024), based on their Git repository. In the LBBNN, one augments each weight with a binary inclusion variable , which is then multiplied with the weight matrix, setting parameters to exactly zero. This is equivalent to placing a spike-and-slab prior on the weights. Bias terms carry no inclusion variable, analogous to biases being exempt from freezing in the sticky PDMPs.
The joint prior over layers factorizes as
where , with the same prior inclusion probability as the sticky samplers, in place of the Beta-Binomial prior used by the authors. The slab variance and bias variance are those of Section B.1, so the LBBNN shares the spike-and-slab prior of the sticky PDMPs. Inference for the LBBNN is performed via the variational family
to maximize the evidence lower bound
Unlike Hubin and Storvik (2024), who fix the noise variance and tune it externally, we learn it on the UCI data as a point estimate under the same half-normal prior as the samplers, which puts the LBBNN on the same model as the samplers and requires no external tuning. During training the binary indicators are sampled by the continuous relaxation of Hubin and Storvik (2024) with temperature , tuned briefly to for the one-dimensional data and for the UCI data. During posterior draws we sample , so that weights can become exactly zero. We fit the models with Adam, using a single Monte Carlo sample per gradient evaluation, and the full dataset. For the one-dimensional data, the inclusion logits are drawn as , with , and the learning rate is fixed at over epochs. For the UCI data, the inclusion probabilities are instead initialized close to one, with , and the learning rate decays from to by a cosine schedule over epochs. The variational means of the weights and biases start at the same MAP as the samplers, as does the noise level on the UCI data, while the slab standard deviations start small. These settings were chosen from brief tuning runs on two splits of the energy and yacht datasets, without the MAP start.
The LBBNN was developed with a Beta-Binomial prior and settings that differ from ours, so we also fit it with the noise variance fixed at a tuned value rather than learned. For each split, 20% of the training data is held out for validation. Then is chosen, together with the initialisation of the inclusion probabilities, by the validation NLL among eight candidates, given by the residual variance of a least-squares linear fit scaled by factors between 0.005 and 1. The chosen model, started from random means, is refitted on all the training data of the split. Compared with the LBBNN started at the MAP, this tuning lowers the RMSE on every dataset for the medium network, but for the small network only on energy, and the RMSE remains behind the sticky samplers throughout. As the noise variance is then fixed in advance rather than learned, this LBBNN targets a different model than the samplers, and the main text reports the version with a learned noise variance.
D.5 The bounding strategy
After every window we set , where is the number of rejected proposals and a window is empty when it reached its full length without an event (Andral and Kamatani, 2024, Section 3.4). We use for the one-dimensional and UCI experiments, and for the image models. The window then settles where empty windows and rejected proposals are equally frequent, balancing the two ways a window can spend gradient evaluations without producing an event. The tangent bound is inflated by a factor with for numerical slack.
When a violation is detected at a proposed time , the rest of the window is replaced by a rebuilt window of half the remaining width starting at , and is shrunk by a factor 2, or 1.1 for the image models, similar to Andral and Kamatani (2024).
D.6 Computing infrastructure
Experiments ran on an Apple M3 laptop (8 cores, 16GB), used for the one-dimensional and small UCI runs, and on a server with two Intel Xeon Gold 6226R CPUs (64 threads, 753GB RAM) and four NVIDIA A10 GPUs (24GB each). The medium UCI runs and NUTS used one CPU core per run, and the image models one GPU each. A one-dimensional PDMP run took about 6 minutes, a small UCI run about 30 minutes, a medium UCI run 2.5 to 4.5 hours and the MNIST models about 16 hours.
E Additional experiments
This section contains material that validates the ZigZag and Boomerang samplers on a banana-shaped target (Section E.1) and the sticky samplers on a sparse linear regression against a Gibbs sampler (Section E.2). It also contains further one-dimensional examples (Section E.3), three more UCI datasets (Section E.4), an ablation on the prior inclusion weight (Section E.6), and details on the convergence analysis, the bounding scheme and minibatching.
E.1 Banana distribution
As a validity check, we test our samplers on a 2-D banana-shaped target with a known closed-form density (Pagani et al., 2022), and compare the resulting marginals and joint distribution against the analytic ground truth. In Figure 5 we sample from the banana target
with , , using the ZigZag and Boomerang samplers with events and draws after a burn-in of half the trajectory time. The Boomerang uses the reference with , and refreshment rate . As this is only two dimensions we have no reason to be sparse, so we do not apply the sticky samplers.
The draws of both samplers cover the banana target, including its tails, and the sampled marginals are very similar and closely approximate the true distribution. This serves as a good indicator that the


Figure 5: ZigZag and Boomerang on the banana target. (a) Posterior draws overlaid on the target's density contours, and (b) the marginals against the exact analytic density.
implementation is sound and that the samplers behave as expected. Furthermore, we test the sensitivity of the Boomerang with respect to its reference covariance and the refreshment rate. In Figure 6, we scale the reference precision by and vary the refreshment rate , giving nine settings with the ZigZag sampler as a fixed benchmark. With a wide reference ( ) the Boomerang covers the target as well as the ZigZag within the same budget, while a narrow reference ( ) confines it to the centre of the banana and misses the arms. The sampler is ergodic for every setting, but how well it explores within a fixed budget depends strongly on the reference measure. The refreshment rate plays a smaller role, with giving the least accurate results.

Figure 6: Boomerang (blue) on the banana target for reference precision scalings c (columns) and refreshment rates (rows), with the ZigZag (green) as a fixed benchmark in every panel.
E.2 Sparse linear regression
We consider the model
where are the observations, are the covariates, are the regression coefficients and is i.i.d. Gaussian noise . In our experiment we treat as known, set , , and generate covariates as . Furthermore, we let 5 of the coefficients be nonzero and geometrically decay them from with alternating signs. We place a spike-and-slab prior on the coefficients by introducing binary inclusion variables , ,
so that, marginally over ,
which places positive mass on and is the prior targeted by the sticky samplers, with the same prior inclusion weight . The model is sampled via Gibbs sampling (George and McCulloch, 1997; O'Hara and Sillanpää, 2009), exploiting conjugacy. Conditionally on , the likelihood is , which is conjugate to the slab in (4), so can be integrated out in closed form and
Each Gibbs sweep updates the one at a time from their Bernoulli full conditionals, after which is drawn from its Gaussian conditional given . As both conditionals are available exactly, we use the resulting draws as a reference posterior for the sticky samplers. The same , and are used for the sticky samplers, so that all methods target the same posterior.
The sticky samplers start at the posterior mode of the dense model, with , which also centres the diagonal Gaussian reference of the sticky Boomerang, with precision , while Gibbs starts from the five covariates most correlated with . Both sticky samplers run for events, and draws are taken uniformly over the trajectory after a burn-in of 20% of its time, while Gibbs runs 2000 burn-in sweeps followed by retained sweeps. We use and , and repeat the experiment on five data sets generated with different seeds.
The results are seen in Figure 7, which pools the results from the five seeds. In the left panel, Gibbs and the sticky PDMPs agree closely on the posterior coefficient means, consistent with sampling the same target. The right panel shows the deviation of the sticky samplers' posterior inclusion probabilities from those of Gibbs. The deviations scatter symmetrically about zero with no trend in , and lie mostly within the shaded band of two Monte Carlo standard deviations, computed from the median effective sample sizes of the Gibbs and PDMP inclusion indicators.

Sticky ZigZag ▲ Sticky Boomerang
Figure 7: Sparse linear regression, pooled over five data sets, with Gibbs as a reference sampler. Left, posterior means of the first nine coefficients with posterior standard deviation, and the true coefficients . Right, deviation of the sticky PDMPs' posterior inclusion probabilities from those of Gibbs, with a band of two Monte Carlo standard deviations.
E.3 More one-dimensional examples
With , we fit the same models, using the same settings as in the main text, to three more one-dimensional datasets. The Hernandez data follow Hernández-Lobato and Adams (2015),
| Sampler | Hernandez | Multiscale | Gap | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sparsity | RMSE | NLL | CRPS | Sparsity | RMSE | NLL | CRPS | Sparsity | RMSE | NLL | CRPS | |
| Boomerang | - | 4.129 | 2.782 | 2.293 | - | 0.119 | -0.710 | 0.067 | - | 0.199 | -0.277 | 0.118 |
| ZigZag | - | 3.989 | 2.762 | 2.134 | - | 0.119 | -0.707 | 0.066 | - | 0.224 | -0.167 | 0.128 |
| NUTS | - | 4.121 | 2.781 | 2.309 | - | 0.119 | -0.713 | 0.067 | - | 0.214 | -0.275 | 0.116 |
| Sticky Boomerang | 87% | 4.498 | 2.832 | 2.425 | 85% | 0.127 | -0.626 | 0.071 | 85% | 0.210 | -0.140 | 0.117 |
| Sticky ZigZag | 87% | 4.369 | 2.811 | 2.383 | 84% | 0.123 | -0.665 | 0.069 | 86% | 0.196 | -0.141 | 0.111 |
| LBBNN | 95% | 4.677 | 2.942 | 2.570 | 95% | 0.177 | -0.084 | 0.105 | 89% | 0.201 | -0.185 | 0.111 |
Table 4: Predictive performance on the one-dimensional datasets.
with , and 20 points drawn uniformly from . The multiscale data combine a slow and a fast oscillation, with , and 80 points drawn uniformly from . The gap data have , and 30 points drawn uniformly from each of and , leaving a deliberate gap in . The metrics in Table 4 are computed on evenly spaced test points within the range of the training inputs, for the Hernandez data and otherwise, so for the gap data they include the gap.

Figure 8: Posterior predictive fits on the Hernandez (top left), multiscale (top right) and gap (bottom) datasets. In each panel, the dashed black line is the true function, the solid coloured lines are the posterior predictive means, and the thin lines of the same colour lie two predictive standard deviations above and below the mean.
The non-sticky PDMPs and NUTS again give nearly identical fits. On the Hernandez and multiscale data the dense samplers are slightly better than the sticky samplers, which are in turn better than the LBBNN, most clearly on the multiscale data. On the gap data all methods perform alike, with the sticky ZigZag lowest in RMSE, the sticky ZigZag and the LBBNN tied in CRPS, and the dense Boomerang and NUTS lowest in NLL.
E.4 More UCI datasets
Tables 5 to 7 show the results for the UCI datasets not included in the main text, with the same settings as for Boston. They show the same overall pattern. The sticky samplers are competitive with the non-sticky samplers and NUTS, with differences mostly within the between-split variation, and the LBBNN is clearly behind in RMSE and CRPS on every dataset. The cost of sparsity is most visible for the small network on concrete, where the RMSE of the sticky samplers grows from 5.15 to 5.64 as they become sparser.
Sparsity grows as decreases, but how many weights are set to zero also depends on the dataset and the network. For the medium network the sparsity stays close to the prior sparsity , as for Boston. For the small network it is clearly lower on all three datasets, with 42 to at and 51 to at .
For the medium network on concrete, both the non-sticky and the sticky Boomerang have a clearly higher NLL than the other samplers and cover only 80 to of the test responses, as for Boston. This matches the convergence analysis on Boston (Section 5.3), where the Boomerang samplers on the
| Network | Sampler | w | Sparsity | RMSE | NLL | CRPS | |
|---|---|---|---|---|---|---|---|
| Boomerang | - | - | |||||
| ZigZag | - | - | |||||
| NUTS | - | - | |||||
| Sticky Boomerang | 0.3 | ||||||
| Sticky ZigZag | 0.3 | ||||||
| Sticky Boomerang | 0.1 | ||||||
| Sticky ZigZag | 0.1 | ||||||
| LBBNN | 0.3 | ||||||
| Boomerang | - | - | |||||
| ZigZag | - | - | |||||
| NUTS | - | - | |||||
| Sticky Boomerang | 0.3 | ||||||
| Sticky ZigZag | 0.3 | ||||||
| Sticky Boomerang | 0.1 | ||||||
| Sticky ZigZag | 0.1 | ||||||
| LBBNN | 0.3 |
Table 5: Predictive performance on the UCI energy dataset, mean ± SEM over 5 independent train/test splits. Sparsity denotes the percentage of weights sampled exactly zero, averaged over draws. is the share of test responses inside the central 90% predictive interval, with an SEM of 1 to 3 percentage points.
medium network stay close to the MAP they start from. For the medium network on energy, NUTS is clearly better than all PDMP samplers, while on yacht it is the weakest of the samplers for the medium network. We expect these differences to be a result of samplers not converging, although it is hard to be completely sure as the convergence analysis was only done for the Boston dataset. The LBBNN covers 89 to 96% of the test responses, close to or above the nominal level despite its larger errors.
E.5 More convergence diagnostics
Table 8 reports the rank-normalised and bulk effective sample size (ESS) of Vehtari et al. (2021) for the convergence runs of Section 5.3, computed with ArviZ (Martin et al., 2026). Following Vehtari et al. (2021), we take and a bulk ESS above 400 as signs of convergence. For the PDMPs, the ESS is computed from the draws of each chain, ordered in time. This is not the effective sample size of the continuous-time average over the trajectory, as defined for the ZigZag by Bierkens and Duncan (2017, Section 5), but of the draws we use for prediction. The last two columns divide the ESS by the gradient evaluations spent, which puts the PDMPs and NUTS on the same budget per gradient evaluation, leaving out the Hessian-vector products of the bounds.
E.6 Effect of prior inclusion weight
Sampling from sticky PDMPs with sticking parameters targets the posterior arising from a spike and slab prior (Bierkens et al., 2023b). The parameters play a central part of the modelling and are assumed known a priori. In our experiments the slab is Gaussian with the variance scaled by the fan-in This gives the relation to from Bierkens et al. (2023b) as
where is the prior inclusion probability, shared across all weights in the network. Since has a more direct interpretation as the prior probability that a parameter is included in the model, we focus our sparsity ablation study on the effect has on the sticky PDMPs.
In Figure 10 we vary from 0.01 to 0.9 for both sticky samplers on the first split of the Boston dataset, for the small and the medium network, and report the achieved sparsity together with the test RMSE and NLL. Every run uses gradient evaluations and starts from the same MAP, and dense NUTS serves as a reference. On Boston, the achieved sparsity, measured as the share of weights that are
| Network | Sampler | w | Sparsity | RMSE | NLL | CRPS | |
|---|---|---|---|---|---|---|---|
| Boomerang | - | - | 87% | ||||
| ZigZag | - | - | 88% | ||||
| NUTS | - | - | 89% | ||||
| Sticky Boomerang | 0.3 | 54% | 88% | ||||
| Sticky ZigZag | 0.3 | 61% | 88% | ||||
| Sticky Boomerang | 0.1 | 72% | 87% | ||||
| Sticky ZigZag | 0.1 | 80% | 88% | ||||
| LBBNN | 0.3 | 82% | 89% | ||||
| Boomerang | - | - | 81% | ||||
| ZigZag | - | - | 87% | ||||
| NUTS | - | - | 88% | ||||
| Sticky Boomerang | 0.3 | 75% | 81% | ||||
| Sticky ZigZag | 0.3 | 68% | 89% | ||||
| Sticky Boomerang | 0.1 | 85% | 80% | ||||
| Sticky ZigZag | 0.1 | 88% | 87% | ||||
| LBBNN | 0.3 | 88% | 90% |
Table 6: Predictive performance on the UCI concrete dataset, mean ± SEM over 5 independent train/test splits. Sparsity denotes the percentage of weights sampled exactly zero, averaged over draws. is the share of test responses inside the central 90% predictive interval, with an SEM of 0 to 2 percentage points.
| Network | Sampler | w | Sparsity | RMSE | NLL | CRPS | |
|---|---|---|---|---|---|---|---|
| Boomerang | - | - | 92% | ||||
| ZigZag | - | - | 87% | ||||
| NUTS | - | - | 88% | ||||
| Sticky Boomerang | 0.3 | 54% | 85% | ||||
| Sticky ZigZag | 0.3 | 56% | 86% | ||||
| Sticky Boomerang | 0.1 | 67% | 85% | ||||
| Sticky ZigZag | 0.1 | 70% | 90% | ||||
| LBBNN | 0.3 | 85% | 92% | ||||
| Boomerang | - | - | 88% | ||||
| ZigZag | - | - | 93% | ||||
| NUTS | - | - | 79% | ||||
| Sticky Boomerang | 0.3 | 67% | 90% | ||||
| Sticky ZigZag | 0.3 | 68% | 86% | ||||
| Sticky Boomerang | 0.1 | 87% | 91% | ||||
| Sticky ZigZag | 0.1 | 87% | 85% | ||||
| LBBNN | 0.3 | 88% | 96% |
Table 7: Predictive performance on the UCI yacht dataset, mean ± SEM over 5 independent train/test splits. Sparsity denotes the percentage of weights sampled exactly zero, averaged over draws. is the share of test responses inside the central 90% predictive interval, with an SEM of 1 to 5 percentage points.
| Network | Sampler | bulk ESS | bulk ESS per grad. evals | |||||
| test RMSE | test RMSE | test RMSE | ||||||
| ZigZag | - | 1.00 | 1.00 | 2,362 | 3,799 | 591 | 950 | |
| Boomerang | - | 1.01 | 1.00 | 2,622 | 9,629 | 656 | 2,407 | |
| NUTS | - | 1.00 | 1.00 | 4,854 | 3,961 | 12,965 | 10,580 | |
| Sticky ZigZag | 0.3 | 1.00 | 1.00 | 2,763 | 3,529 | 691 | 882 | |
| Sticky Boomerang | 0.3 | 1.01 | 1.00 | 1,676 | 4,095 | 419 | 1,024 | |
| Sticky ZigZag | 0.1 | 1.00 | 1.00 | 2,236 | 2,385 | 559 | 596 | |
| Sticky Boomerang | 0.1 | 1.04 | 1.00 | 62 | 2,151 | 16 | 538 | |
| ZigZag | - | 1.03 | 1.01 | 173 | 547 | 43 | 137 | |
| Boomerang | - | 1.63 | 1.73 | 6.5 | 6.1 | 1.6 | 1.5 | |
| NUTS | - | 1.00 | 1.00 | 1,624 | 3,478 | 2,276 | 4,875 | |
| Sticky ZigZag | 0.3 | 1.04 | 1.04 | 67 | 191 | 17 | 48 | |
| Sticky Boomerang | 0.3 | 1.70 | 2.03 | 6.2 | 5.3 | 1.5 | 1.3 | |
| Sticky ZigZag | 0.1 | 1.03 | 1.01 | 109 | 294 | 27 | 74 | |
| Sticky Boomerang | 0.1 | 1.79 | 2.00 | 5.9 | 5.4 | 1.5 | 1.3 | |
Table 8: Convergence diagnostics on the first Boston split, four chains per sampler started from different MAPs, with gradient evaluations per PDMP chain and one NUTS chain per MAP. Rank-normalised and bulk ESS of and the test RMSE, pooled over the four chains, which hold 16,000 draws for the PDMPs and 4000 for NUTS. The last two columns are rates, the bulk ESS per gradient evaluations, the budget of one PDMP chain. For NUTS, warmup is included when counting gradients.
exactly zero averaged over the posterior draws, closely follows the prior sparsity for both networks and both samplers (Figure 10a), which makes a direct handle on the size of the model. This is not the case for every dataset. For the small network on energy, concrete and yacht, the samplers keep clearly more weights than implies (Section E.4), so the data can override the prior. Still, must be chosen in advance, and it largely decides how sparse the model becomes.
In the small network, predictive performance improves as grows and levels off from about , where the sticky samplers follow NUTS closely, while very sparse models lose accuracy (Figure 10b,c). In the larger network, the sticky ZigZag shows the same pattern, although the curves fluctuate more between neighbouring values of . The sticky Boomerang varies little across and stays above NUTS throughout. These curves should also be read with the convergence analysis of Section 5.3 and Section E.5 in mind. On the small network, the test RMSE and NLL of all samplers stabilise early (Figure 9), so we take these curves at face value. For the medium network, the same holds for the trend of the ZigZag, but we interpret the Boomerang's flat curve as a result of slow mixing rather than an effect of .
E.7 Comparison of bounding strategies
In Andral and Kamatani (2024), an interval is divided into subsegments, and a piecewise constant upper bound is found on the rate function . In this section, we compare this with the approach used throughout this paper, where the whole interval is bounded by a single constant, . We demonstrate that fewer gradient evaluations are then needed, as the rate is no longer evaluated at grid points beyond the proposed event time.
In our implementation of the Andral and Kamatani (2024) procedure, for a grid spacing , and was adapted similarly to Andral and Kamatani (2024), divided by 1.04 after a window with any rejection and otherwise multiplied by 1.01 after an empty window. Our scheme uses , with adapted similarly.
To compare the two schemes, consider a constant rate as a simple model of the cost. The bounds from both bounding schemes are then exact up to the inflation , accepted proposals arrive at rate and rejections at rate . The time of the first accepted proposal is , and we define as the probability that a window ends without an event.
The cost of a window depends on whether it ends in an event, and on whether the previous window did. The grid evaluates its grid points and the single segment its 2 end points. If the previous window was empty, its right end is the left end of the current window and can be reused, so the grid needs evaluations and the single segment 1. On top of this, every proposal costs one evaluation of the rate, and an accepted proposal one more for the reflection. With rejected proposals in the window, the four cases are
| Previous | Current | Single segment | Grid |
| Empty (q) | Empty (q) | ||
| Empty (q) | Event | ||
| Event | Empty (q) | ||
| Event | Event |
Since the windows are independent under a constant rate and fixed , the expected cost of a window is
Rejections arrive at rate along the distance travelled, which is if the window ends in an event and otherwise, so
A window holds at most one event, so dividing by gives the expected cost per event,
With the adaptation rule of Section D.5, both schemes settle where , that is and for a constant rate. There
so the single segment needs about times fewer gradient evaluations per event. Since empty windows are rare at the adapted window, the reuse of the end point matters little, and the gain comes from building each window from 2 evaluations instead of . For the sticky samplers, freezes and thaws are not proposed by thinning. Their times are known in advance, and the window simply ends there. Such windows are usually short and contain no proposal, so they only cost the construction of the bound, 2 evaluations with a single segment and with the grid. For short windows the grid uses its minimum of segments, so the gain is about per freeze or thaw. A simulation of both schemes agrees with these expressions (Figure 11, a).
On real data, we compare the two schemes on the small network for Boston split 0 at , where every run of both versions used exactly gradient evaluations (Figure 11, b). The single segment produces 1.84 (ZigZag), 2.52 (sticky ZigZag), 1.66 (Boomerang) and 1.58 (sticky Boomerang) times as many events per gradient evaluation. The gain for the sticky Boomerang, whose events are mostly freezes and thaws, is close to the predicted above for such events.
E.8 More MNIST results
Table 9 reports the predictive performance on the 8000 MNIST test images not used for pruning. The sticky samplers are sparser than , with against of the weights at zero for the FFN, and lose at most percentage points of accuracy against SGD. The pruned MAP has the lowest NLL on the FFN. The dense ZigZag has the lowest accuracy but the lowest calibration error on the FFN, and the highest accuracy, second to lowest NLL and lowest Brier score on the LeNet-5. The sticky Boomerang is slightly behind the sticky ZigZag on every predictive metric.
The weight plots show the last draw of each sampler on a colour scale shared across rows. For the FFN, each row shows the four hidden units with the largest input-weight norm. Units are not matched across rows, as SGD is fitted separately. LeNet-5 has no weight per pixel, and its first layer consists of six filters shared across all positions (Figure 12a). These filters are structured for both samplers, and the dense and sticky ZigZag are about equally robust to noise (Figure 12b).
Like Algorithm 4 of Andral and Kamatani (2024), our grid runs did not reuse the end point of an empty window. Under the constant-rate model this raises their cost more where empty windows are frequent.
Both implementations recompute the gradient for the bounce. Reusing the one from the accepted proposal would save one evaluation per bounce for both bounds, so the reported costs are conservative.
| Model | FFN | LeNet-5 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Sparsity | Acc | ECE | NLL | Brier | Sparsity | Acc | ECE | NLL | Brier | |
| SGD | - | 0.9836 | 0.0117 | 0.0854 | 0.0277 | - | 0.9912 | 0.0053 | 0.0342 | 0.0148 |
| - | 0.9812 | 0.0070 | 0.0620 | 0.0284 | - | 0.9908 | 0.0048 | 0.0297 | 0.0146 | |
| ZigZag | - | 0.9756 | 0.0065 | 0.0806 | 0.0370 | - | 0.9923 | 0.0088 | 0.0307 | 0.0142 |
| 91% | 0.9821 | 0.0073 | 0.0585 | 0.0273 | 89% | 0.9909 | 0.0055 | 0.0310 | 0.0144 | |
| Sticky ZigZag | 98% | 0.9797 | 0.0164 | 0.0759 | 0.0339 | 92% | 0.9904 | 0.0107 | 0.0369 | 0.0163 |
| Sticky Boomerang | 98% | 0.9766 | 0.0210 | 0.0840 | 0.0373 | 94% | 0.9883 | 0.0147 | 0.0447 | 0.0192 |
Table 9: Predictive performance on the 8000 MNIST test images not used for pruning, for the FFN and LeNet-5.
| Boston | Energy | Concrete | Yacht | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RMSE | NLL | CRPS | RMSE | NLL | CRPS | RMSE | NLL | CRPS | RMSE | NLL | CRPS | |
| Boomerang | -.08 | -.08 | -.11 | -.00 | -.03 | -.00 | -.01 | -.03 | -.06 | .01 | .04 | .04 |
| ZigZag | -.11 | -.08 | -.07 | -.00 | -.08 | -.00 | .09 | -.07 | .09 | -.01 | -.31 | -.01 |
| Sticky Boomerang | -.02 | -.01 | .01 | -.00 | -.00 | -.00 | .08 | .03 | .06 | -.00 | .19 | -.00 |
| Sticky ZigZag | .04 | .00 | .03 | -.01 | -.07 | -.00 | .42 | -.00 | .27 | -.01 | -.69 | -.01 |
Table 10: Difference in predictive performance between full-batch and minibatch runs of the small network, averaged over the 5 splits of each UCI dataset. Values are full batch minus minibatch on the original scale, so negative values indicate a performance loss from minibatching. The minibatch runs use batches of 32 observations and events, the full-batch runs gradient evaluations. Both use the grid bound of an earlier version of our implementation.
E.9 Minibatching
One of the most attractive properties of PDMPs is that they admit exact subsampling. Assuming i.i.d. data, the full-data gradient can be replaced by an unbiased estimate based on a single randomly chosen observation without changing the invariant distribution, provided the rate bound dominates the switching rate of every observation-specific gradient estimate along the trajectory (Bierkens et al., 2019). For BNNs, to our knowledge, no such bound is available, and constructing one numerically by evaluating every per-observation rate over the bounding horizon is at least as costly as a full-batch pass. Corbella et al. (2022) instead estimate the population bound statistically, fitting a generalized Pareto distribution to the maxima of a subset of observation-specific rates and extrapolating to the largest one. The resulting bound is not guaranteed to dominate every rate, and extending such schemes to high-dimensional BNNs is an interesting direction for future work. For this paper however, we use an approximate scheme. Each time the rate bound is constructed, we draw a fresh minibatch of observations and use it for all gradient evaluations in that bounding step, both for the bound and for the accept–reject decisions. Within one bounding horizon, the sampler therefore simulates the PDMP targeting the rescaled minibatch posterior, and a new minibatch is drawn for each horizon. The noise in the minibatch gradients introduces bias, so the process no longer has the exact posterior as its invariant distribution. We apply minibatching to our MNIST models.
To assess the effect of this approximation, Table 10 compares minibatched and full-batch runs of the small BNN on the UCI datasets. Minibatching does not change predictive performance systematically. It is worse in some cases, most notably the Yacht NLL of both ZigZag samplers and the Boomerang on Boston, and better in others, most notably the Sticky ZigZag on Concrete. While this does not guarantee the same behaviour for the MNIST models, where a full-batch comparison is infeasible within our budget, it suggests that the approximation has a limited effect on predictive performance.

Fraction of the run after burn-in
Figure 9: Traces after burn-in on the first Boston split, with (coloured) and (grey) gradient evaluations per chain. The NLL is per draw, not of the predictive mixture.
(a) Achieved sparsity

(b) RMSE
(c) NLL
Sticky Boomerang
Sticky ZigZag
NUTS
Figure 10: Effect of the prior inclusion weight w on Boston for the small (d = 752, top) and medium (d = 5852, bottom) networks. (a) Share of weights that are exactly zero, averaged over the posterior draws, with the prior sparsity 1 - w dotted. (b) Test RMSE and (c) test NLL, with dense NUTS as a horizontal reference.


Figure 11: Single segment against the grid bound. (a) Gradient evaluations per event under a constant rate as a function of the window length, from the expressions above (lines) and a simulation of both schemes (dots), with the window the adaptation settles at dotted. (b) Events per gradient evaluation with the grid (hatched) and the single segment (solid), on the small network for a single split of the Boston data.

(a)

(b)
Figure 12: The analyses of Figure 4 for the LeNet-5. (a) The six first-layer filters. (b) Robustness to Gaussian noise of standard deviation on the [0, 1] pixel scale.