TL;DR
This paper introduces Sparse Hamiltonian Flows (SHF), a novel variational inference method that combines Bayesian coresets with Hamiltonian normalizing flows. By uniformly subsampling data once and optimizing a flow with unique deterministic "quasi-refreshment" steps, SHF achieves exponential data compression and accurate posterior approximations. This results in an order-of-magnitude speedup in density evaluation and sampling compared to standard dynamical-system-based inference methods.
What Problem Does This Paper Address?
Bayesian inference is foundational for uncertainty quantification, but scaling it to massive datasets remains a major bottleneck. Standard approaches like Markov chain Monte Carlo (MCMC) and Variational Inference (VI) typically require evaluating the log-likelihood or its gradient across all data points at every single step, leading to an expensive $\mathcal{O}(Nd)$ computational complexity (where $N$ is the dataset size and $d$ is the parameter dimension).
While mini-batching or random subsampling seems like an obvious fix, doing so at each step introduces stochastic noise that causes MCMC chains to mix poorly and yields inaccurate posterior approximations.
An alternative is Bayesian coresets—finding a fixed, small, weighted subset of the data to replace the full dataset. However, existing coreset construction methods are either painfully slow, require a cumbersome secondary inference step, or fail to provide tractable bounds on the marginal evidence (the normalization constant $Z$). The authors tackle these challenges head-on, aiming for a method that is fast to train, easy to sample from, and theoretically sound.
Methods
Sparse Hamiltonian Flows (SHF) introduces three key algorithmic innovations:
- One-Time Uniform Subsampling: Instead of using complex greedy algorithms to pick coreset points, the authors show that simply subsampling the dataset uniformly once provides an excellent basis for approximation. The weights of these points are then optimized downstream.
- Sparse Hamiltonian Normalizing Flows: The authors construct a normalizing flow based on sparsified Hamiltonian dynamics. Instead of targeting the expensive full posterior, the flow targets the coreset posterior. This drops the computational complexity per leapfrog step from $\mathcal{O}(Nd)$ to $\mathcal{O}(Md)$, where $M \ll N$.
- Periodic Momentum Quasi-Refreshment: Standard Hamiltonian flows use "tempering" (scaling the momentum) to add flexibility to the flow. The authors prove that tempering alone cannot accurately match even a simple Gaussian target because it cannot shift or recenter the momentum distribution. To fix this, they introduce quasi-refreshment steps—deterministic shift-and-scale mappings ($R_\lambda(x) = \Lambda(x-\mu)$) applied periodically to the momentum. Crucially, because these steps are invertible bijections, the exact density and normalization constants remain completely tractable.
Datasets
The authors evaluated their method on both synthetic and real-world problems:
- Synthetic Gaussian Location Model: Used to validate the theoretical claims of exponential compression and exact posterior recovery.
- Real-World Airline Dataset: Combined with weather data ($N = 100,000$ flights, $p = 10$ features) to evaluate performance on both Bayesian Linear Regression (predicting flight delays) and Bayesian Logistic Regression (predicting flight cancellations).
Key Insights and Ideas
- Exponential Compression is Possible: The paper provides a striking theoretical result (Proposition 3.1): for a representative Gaussian model, a coreset of size $M = \mathcal{O}(\log N)$ chosen via uniform subsampling can achieve an exact posterior approximation (KL divergence of 0) with high probability. This justifies why one-time uniform selection is a viable strategy.
- Tempering is Insufficient: A key mathematical insight is that standard momentum tempering limits flow flexibility. If the flow's current momentum expectation $\mathbb{E}[\rho] \neq 0$, scaling it cannot force it to be zero. The proposed quasi-refreshment steps solve this by explicitly standardizing and recentering the momentum.
- Drastic ELBO Optimization: As shown in the paper's experiments, while the Evidence Lower Bound (ELBO) stays relatively flat during standard leapfrog steps, it jumps drastically during the quasi-refreshment phases, proving their vital role in minimizing KL divergence.
Key Results
- Speed and Efficiency: SHF reduced density evaluation and sample generation times by more than an order of magnitude compared to full-data methods like Hamiltonian Importance Sampling (HIS-Full) and Unadjusted Hamiltonian Annealing (UHA-Full).
- Higher Quality Approximations: In both linear and logistic regression experiments, SHF achieved a higher ELBO (a tighter lower bound on the log normalization constant) and lower KL divergence than competing coreset and flow-based methods.
- Robustness to Non-Gaussianity: When the posterior was non-Gaussian (as in logistic regression), SHF significantly outperformed traditional coreset methods like Hilbert-OMP, which rely on Laplace approximations and fail to capture complex posterior shapes.
Limitations and Future Work
- Data Compressibility Assumption: The core limitation of SHF is that the dataset must be inherently "compressible." The method assumes that the log-likelihood functions of a small subset can accurately represent the full dataset. If the data does not lie on a lower-dimensional manifold, performance may degrade.
- Simplistic Quasi-Refreshment Design: The current shift-and-scale quasi-refreshment mechanism assumes that the marginal distribution of the momentum is Gaussian. While this works well in practice, the authors note that developing more general-purpose, non-Gaussian quasi-refreshment moves is an important direction for future research.
Summary updated