NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Asymptotically exact variational flows via involutive MCMC kernels

Zuheng Xu, Trevor CampbellNeurIPS 2025

In the world of probabilistic machine learning, practitioners often face a difficult trade-off between two flavors of inference. Variational Inference (VI) is fast and provides a tractable density, but it is often biased. Conversely, Markov Chain Monte Carlo (MCMC) is asymptotically exact but can be slow and does not easily provide density estimates.

A new paper presents a general recipe to get the best of both worlds. By transforming standard MCMC kernels into invertible, measure-preserving maps, the authors have created a new class of variational flows that are guaranteed to converge to the true target distribution.

The Challenge of Combining VI and MCMC

Normalizing flows are a powerful VI tool that transforms a simple distribution into a complex one using a sequence of invertible maps. However, they come with a major catch: their theoretical guarantees typically only hold if you find the global optimum of a non-convex optimization problem—a rarity in practice.

MCMC, on the other hand, is asymptotically exact; running it long enough guarantees convergence to the right answer. Previous attempts to bridge these two approaches (such as MixFlows) tried to use MCMC-like steps as flow layers. Unfortunately, they hit a wall with the Metropolis-Hastings (MH) step. The MH step involves an accept/reject decision that is inherently non-invertible. Without invertibility, the model loses the ability to calculate the probability density, which is the foundational "variational" component of Variational Inference.

A Novel Solution: Invertible MCMC Kernels

The core innovation of this work is a methodology to make general MCMC kernels invertible and measure-preserving.

  1. Involutive MCMC as IRFs: The authors leverage the framework of "involutive MCMC," which covers popular algorithms like Hamiltonian Monte Carlo (HMC) and the Metropolis-Adjusted Langevin Algorithm (MALA). They represent these as Iterated Random Functions (IRFs).
  2. The Invertibility Trick: To make the MH step invertible, the state space is augmented with auxiliary variables that track the randomness of the accept/reject decision. By explicitly "caching" the dice roll used for the decision, the entire step becomes a measure-preserving bijection.
  3. New Variational Families: Building on this trick, the authors introduce three specific architectures:
  4. IRF MixFlows: A mixture of pushforwards through a random stream of MCMC steps.
  5. Backward IRF MixFlows: A modification that reduces the computational cost of density evaluation from $O(T^2)$ to $O(T)$, where $T$ is the flow length.
  6. Ensemble IRF MixFlows: An approach that uses multiple trajectories to reduce variance and improve convergence rates.

Key Insights and Performance

The realization that the non-invertible "accept/reject" step can be made perfectly invertible by tracking auxiliary randomness is a significant breakthrough. It allows for exact measure preservation without sacrificing density tractability. Because the maps are measure-preserving, the Jacobian determinant simplifies beautifully, meaning the density of the flow is essentially just a weighted average of the target density at different points in the trajectory.

Furthermore, unlike previous work that required the flow map itself to be "ergodic" (a condition that is notoriously hard to prove), this framework only requires the underlying Markov kernel to be irreducible—a much more standard and easily satisfied condition in MCMC.

The authors evaluated their flows on a mix of synthetic distributions (Banana, Neal’s funnel, a cross-shaped Gaussian mixture, and a warped Gaussian) and high-dimensional real-world benchmarks.

  • Outperforming Black-Box VI: On the Funnel and Banana targets, the IRF flows consistently achieved higher Evidence Lower Bounds (ELBO) and more accurate normalization constant estimates ($\log Z$) than standard normalizing flows like RealNVP or Neural Spline Flows (NSF).
  • Competitive with MCMC: In high-dimensional tasks like a 1600D Log-Gaussian Cox process, the IRF flows matched or outperformed the state-of-the-art No-U-Turn Sampler (NUTS) in terms of estimation error, often at a lower computational cost.

Limitations and Future Work

While the theoretical foundations are strong, the authors note a few practical limitations.

Invertibility error across different MCMC kernels on synthetic datasets. Notice how uncorrected HMC and others accumulate numerical drift over longer trajectories.

Numerical Drift: Although the maps are theoretically exact inverses, floating-point errors can accumulate over very long trajectories. As shown in the invertibility error evaluations across synthetic datasets, numerical drift remains a factor to watch, even though the "shadowing" property of chaotic systems helps mitigate catastrophic failures compared to uncorrected baselines.

Hyperparameter Selection: While the method is "tuning-free" in the sense of variational optimization, practitioners still need to choose MCMC parameters like step size. Future work could pair this framework with automatic-tuning MCMC methods to create a truly "set-and-forget" inference engine.

Parallelization: The $O(T^2)$ cost of the standard IRF MixFlow is a bottleneck, though the authors successfully mitigate this with the "Backward" variant and parallel GPU implementations.

Summary updated

BibTeX
@inproceedings{xu2025asymptotically,
  author = {Zuheng Xu and Trevor Campbell},
  title = {{Asymptotically exact variational flows via involutive MCMC kernels}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=MykdD1wZDV},
}
Figure