acceptodds
Published as a conference paper at NeurIPS 2026

A Revisit of Hamiltonian Monte Carlo Efficiency on Bayesian Neural Networks

Cuong Ngoc Nguyen, Lam Ho, Vu Dinh, Georgios Karagiannis, Cuong V. Nguyen

Abstract

Bayesian neural networks (BNNs) offer principled uncertainty quantification, yet sampling from their posteriors via Hamiltonian Monte Carlo (HMC) remains challenging. While recent work theoretically identified the efficiency degradation of ReLU-based networks, smooth unbounded activations ( e.g., GELU, Swish, Mish), which are prevalent in modern architectures, were assumed to be efficient due to their smoothness. In this work, we challenge this existing justification by deriving explicit local error formulas for the leapfrog integrator. Our analyses reveal that, in addition to differentiability, third-order curvatures of the potential energy also have a significant influence on HMC efficiency of BNNs inference. Empirically, we found that even smooth unbounded activations may degrade sampling performance as severely as piecewise linear activations. Thus, optimally tuning the step size for these networks may require a comparable empirical step size scaling as their piecewise counterparts. This result sheds light on the implications for architectural design in Bayesian deep learning.

Keywords:
Paris, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 1%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 3.33 over 3 reviews, above 0% of the others.
Reviewer_6F5vOpenReview ↗
Rating
5
Clarity
4
Confidence
2
Originality
3
Quality
3
Significance
3
Read review
Summary

This work is a careful self contained analysis of the errors introduced in the Hamiltonian Monte Carlo's (HMC's) leapfrog integrator as a function of the loss function. This ties in with the efficiency (related to the acceptance ratio) of the HMC. The authors express the error as the third derivative of the loss function and difference between the gradients. This form of the error allows the authors to examine the role of various activation functions in the efficency of the HMC. They challenge the latent assumption that an activation simply being smooth is enough for efficiency guarantees.They complete their investigation with an empirical work on efficiency of simple feed forward neural networks with varying activation functions.

Strengths and weaknesses

I think this paper carefully identifies an unfounded assumption in the literature and investigates it. I don't really have much weak points but there are small typos and some points that would benefit clarification.

  • On line 148 on page 4 the three-times continuously differentiable class is written with a blackboard C (indicating complex numbers)
  • Exact equality on equation (8) is correct, but the proof writes the trapezoidal rule (equation 14 in the appendix) as an approximation. Actually trapezoidal rule in this form (with an arbitrary xi in a range) is exact.
  • Line 203 on page 5 "\emph{an} upper bound for the ...". This is a non-pedantic point actually. There can be many upper bounds, and since they are not lower bounds, they can only be heuristics on how the third order derivative affects the behavior. (that tracks, since being smooth or bounded or unbounded didn't end up being the sole determinants of HMC efficiency later on in the paper).
  • There is some inconsistency with defining efficiency. On line 6 it is defined in terms of a tunable linear parameter ℓ\ell, for the step size (with step size ϵ=ℓd−1/4\epsilon = \ell d^{-1/4}) however down on line 314 it is defined as eff(ε) = ε·α(ε), without any reference to the dimension d. It is not important asymptotically, but this affects the actual value of eff(ε).

I agree that following up on NUTS and other variants may be a promising direction. But also, beyond the efficiency (acceptance rate) it might be interesting to play with the temperature parameter, and make the model performance one of the metrics that are being measured. Right now there is no explicit temperature, and decreasing it (equivalently rescaling the potential loss component U) might show the interplay between the right temperature (right for getting a reasonably performant model at most MC samples) and efficiency.

Questions

see strengths and weaknesses

Limitations

yes

Paper formatting concerns

NA

Final justification

After the discussion period with sJJK I chose to maintain my score. I do not believe that this work is unimportant because it only deals with HMC in the full batch case. However the later remarks in the discussion regarding the definition of efficiency made me rethink my confidence. Because I do agree that this is a misleading notion of efficiency and it should have been called local efficiency or effective step size. I am worried that this definition would be later picked up by other authors.

Reviewer_sJJKOpenReview ↗
Rating
2
Clarity
3
Confidence
5
Originality
1
Quality
2
Significance
1
Read review
Summary

The paper studies acceptance rate of Hamiltonian Monte Carlo (HMC) methods for posterior distributions of Bayesian neural networks. Some theoretical and empirical results are obtained about this, related to the third order derivatives of the potential. The choice of the activation functions play a significant role in this quantity.

Strengths and weaknesses

The strength of the submission is that it is attempting to contribute to the domain of Bayesian inference for neural networks, which holds potential for better uncertainty quantification and more robust algorithms.

Nevertheless, we do not think that the submission has significant new ideas, and no new algorithms have been proposed. The field of Bayesian inference for neural networks is not so much focused any more on HMC with Metropolis/Hastings accept-reject step (hence full dataset needs to be used during each step), but more on scalable methods using stochastic gradients, which are much more practical. The experimental evaluation is not convincing.

Questions
  1. In what sense is your theoretical results about HMC acceptance rates improve on existing results in the literature, such as "When does Metropolized Hamiltonian Monte Carlo provably outperform Metropolis-adjusted Langevin algorithm?", https://arxiv.org/abs/2304.04724, and "Fast mixing of Metropolized Hamiltonian Monte Carlo: Benefits of multi-step gradients", https://jmlr.csail.mit.edu/papers/volume21/19-441/19-441.pdf?

  2. How do you justify using HMC for Bayesian neural networks when each step takes one epoch and "What are Bayesian neural network posteriors really like?" has shown that even for small datasets such as CIFAR-10, full convergence in Gelman-Rubin (Rhat) is not reached after 20 million epochs?

Limitations

Authors have adequately addressed the limitations of their work.

Paper formatting concerns

No concerns.

Final justification

I have updated the contribution type to theory. This doesn't change my rating - the theoretical results here are not sufficiently deep and only cover local errors in a few pages. They are also not important enough because HMC with full gradients is not a practically relevant algorithm for deep learning. The experimental evaluation for Rhat diagnostics in the rebuttal is not convincing since not all step sizes were tuned to reach a target acceptance rate, small acceptance rate indicates that too large steps were used. Finally, the whole story about activation functions would change if normalisation layers such as layer norm would be included in the networks, as it's often done in practice. These would make the differences between smooth activation functions less noticeable.

Reviewer_bRgfOpenReview ↗
Rating
3
Clarity
2
Confidence
3
Originality
3
Quality
2
Significance
2
Read review
Summary

This paper studies the efficiency of leapfrog HMC for Bayesian neural networks with different activation functions. It argues that smoothness alone is not sufficient, while smooth but unbounded activations (e,g., GELU, Mish, Softplus) can also produce large local energy errors through large third-order curvature terms in the potential energy. The paper derives explicit local-error expressions for both smooth and piecewise-smooth activation regimes, and empirically investigates how these terms relate to acceptance rate and sampling efficiency across synthetic and real-world BNN experiments.

Strengths and weaknesses

Strengths:

  1. The paper studies an underexplored but practically important question of understanding how activation functions affect the efficiency of HMC for BNNs.
  2. The explicit decomposition of leapfrog local error highlights the role of third-order curvature, providing a new perspective beyond the conventional smooth/non-smooth distinction.

Weaknesses:

  1. It is not entirely clear for me which parts of the derivation are fundamentally new beyond applying classical leapfrog error analysis to BNN potentials.
  2. The experiments mainly rely on acceptance rate and the proposed efficiency metric, while standard MCMC diagnostics (e.g., ESS/sec, R^\hat{R}, autocorrelation, energy error distributions) are missing.
  3. Most experiments are conducted on relatively small synthetic or toy-scale BNNs. It is unclear whether the conclusions generalize to larger modern network architectures.
  4. Some claims appear stronger than the empirical evidence supports. In particular, the conclusion that smooth unbounded activations can degrade HMC "as severely as" piecewise activations may depend on the specific experimental settings and should be stated more cautiously.
  5. Typo: the likelihood term L(q∣xi,yi)\mathcal{L} (\mathbf{q} | \mathbf{x}_{i}, y_i ) in Bayes' rule in Eq. (1) should be L(yi∣xi,q)\mathcal{L} (y_i | \mathbf{x}_i , \mathbf{q} ).
Questions
  1. Can you clarify the novelty of Theorem 1 relative to standard leapfrog local-error/Taylor expansion results for smooth Hamiltonian systems? Is the main novelty the BNN-specific interpretation of the constants, or is there a technically new bound?
  2. Can you report more standard MCMC diagnostics (e.g., ESS, R^\hat{R}, and integrated autocorrelation time) for the experiments? This would help determine whether lower acceptance rates actually translate into poorer posterior exploration, rather than only poorer proposal acceptance.
  3. How sensitive are the results to HMC tuning choices, especially mass matrix, step-size adaptation, and trajectory length? For example, would diagonal/full mass-matrix adaptation reduce the observed gap between bounded and unbounded activations?
  4. The experiment focuses primarily on feed-forward networks. Can the conclusions be extended to other structures, such as ResNet?
  5. Can you include an ablation using rescaled activations or prior scales to distinguish the effect of activation unboundedness from the effect of posterior parameter scale?
Limitations

The limitations are partially addressed, but I think the paper should more explicitly discuss: limited model scale, reliance on acceptance-rate-based efficiency, lack of extensive diagnostics such as ESS and R^\hat{R}, dependence on HMC tuning choices, and the fact that the conclusions may not directly transfer to adaptive HMC/NUTS or alternative parameterizations.

Paper formatting concerns

No major formatting or anonymity concerns noticed.

Final justification

The rebuttal of the authors has addressed most of my concerns about the paper, including the theoretical novelty of Theorem1, the standard MCMC diagnostics, generalization to modern network architecture, and rescaled ablation. So, I have decided to raise my score to 3.

Comments on the paper

1 comment
Meta-review

The paper re-visits prevailing assumptions in Hamiltonian Monte Carlo for Bayesian neural networks. A core finding is that third order curvature has a substantial effect on the sampling efficiency, challenging the assumption that smooth activation functions are enough to ensure efficiency.

The reviews are mixed and the reviewers have raised several concerns. In particular the questions and weaknesses of bRgf shall please be addressed in detail.

Also sJJK raised some concerns that shall be addressed in the review. However, the AC notes at this point that

  • proposing a new algorithm is not necessarily required for a NeurIPS paper, but a strong analysis of existing methods can be a valuable contribution as well; and
  • a paper does not necessarily need to be tailored to more active areas (e.g. MALA vs. HMC), but studying established methods can certainly be of value. Hence, these two points per se are not decisive for acceptance of the paper. The authors should however provide arguments for the concerns of sJJK as well.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.