# A Revisit of Hamiltonian Monte Carlo Efficiency on Bayesian Neural Networks

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

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152689) · [OpenReview](https://openreview.net/forum?id=RAcqfke8WC) · [Open on the map](../papers.html#p152689)

Category: [Time Series, PDEs & Probabilistic ML](../pcat/9.md) › [Bayesian Inference and Posterior Estimation](../pgroup/306.md) · Type: empirical study · Keywords: Hamiltonian Monte Carlo, Bayesian neural networks, leapfrog integrator, activation functions, sampling efficiency

Areas: [Model Architectures & Sequence Modeling](../areas/architectures.md) › Dynamic and relational architectures › Density and Generative Architectures

## Summary
The paper derives explicit local error formulas for the leapfrog integrator and shows that third-order curvature of the potential energy significantly impacts HMC efficiency in Bayesian neural networks with smooth activations.

## Explained to a 5-year-old
We study a type of computer brain that tries to guess its own uncertainty. The brain uses smooth functions to decide what to do, but we found these smooth functions can cause the guessing method to work poorly, just like simpler functions. By writing down formulas, we understand why this happens. This helps us build better brains that give more reliable guesses.

## Explained to a 5-year-old, longer
Imagine a computer brain that wants to know how sure it is about its answers. To do this, it uses a method called Hamiltonian Monte Carlo, which is like a special random walk that helps explore many possible answers. Usually, people think that if the brain uses smooth functions (like GELU, Swish, Mish) for its decisions, the random walk will be efficient and fast. However, we discovered that even these smooth functions can make the random walk slow and ineffective, similar to using simple step functions. We wrote down detailed formulas that show how the shape of the energy landscape, especially its third-order curvature, influences the random walk's performance. Our experiments confirmed that smooth activations can be just as problematic as the simpler ones, meaning we need to adjust the step size similarly. This insight helps us design better computer brains that give more trustworthy predictions.

## For a technical reader
The paper investigates why Hamiltonian Monte Carlo sampling can be inefficient for Bayesian neural networks, focusing on smooth activation functions. It derives precise error formulas for the leapfrog integrator and highlights the role of third-order curvature in the energy landscape. Empirically, the authors show that smooth activations degrade sampling performance comparably to piecewise linear ones, requiring similar step-size adjustments. These findings inform the design of more efficient Bayesian deep learning architectures.

## Problem
Sampling from posterior distributions of Bayesian neural networks using Hamiltonian Monte Carlo can be inefficient, especially when the network uses smooth unbounded activations, contrary to prior assumptions.

## Method
The authors derive explicit local error formulas for the leapfrog integrator and analyze the influence of third-order curvature of the potential energy on sampling efficiency.

## Results
The empirical results show that smooth unbounded activations can degrade HMC sampling performance as much as piecewise linear activations, implying similar step size scaling is needed.

## Contributions
The paper provides theoretical analysis of leapfrog integrator error linked to third-order curvature and demonstrates that smooth activations can be as inefficient as ReLU, informing architectural design.

## Practical relevance
The findings guide the design of more efficient Bayesian neural network architectures for reliable uncertainty quantification.

## Research questions this paper is counted under

- [How can we achieve efficient sampling from complex, high-dimensional probability distributions?](../q/516.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152689)
