Transport RJMCMC via Normalizing Flows
- The paper introduces transport RJMCMC as a method that leverages deep normalizing flows to construct diffeomorphic maps for near-optimal transdimensional proposals.
- It transforms complex, dimension-changing moves into tractable operations in a common reference space, achieving high acceptance (70%-90%) and improved mixing.
- Normalizing flows are trained via maximum likelihood or variational inference to approximate target distributions, enhancing scalability and effective posterior estimation.
Transport Reversible Jump Markov Chain Monte Carlo (RJMCMC) methods via normalizing flows represent a significant advance for efficient Bayesian model selection and transdimensional inference. These methods utilize deep normalizing flows to construct diffeomorphic transport maps between complex model posteriors and a common reference distribution, enabling near-optimal proposals for dimension-changing jumps in RJMCMC. This approach circumvents the low acceptance rates and poor mixing inherent in classic RJMCMC by transforming transdimensional moves into near-trivial operations under the reference measure, as formalized in the works of Davies et al. (Davies et al., 2022) and subsequent extensions (Yin et al., 14 Dec 2025).
1. Mathematical Structure of Transport RJMCMC
Transport RJMCMC (TRJ) operates on a state space
where each denotes a discrete model and parameterizes model . The conditional target is . To facilitate dimension-matching jumps, TRJ constructs for each model a transport diffeomorphism satisfying ideally for a reference (e.g., standard normal) product measure .
A transdimensional move from to proceeds by:
- Mapping to the reference ;
- If , drawing ; if , truncating appropriately;
- Establishing through a volume-preserving pairing , e.g., concatenation or permutation in reference space;
- Inverting by .
This construction reduces general dimension-changing proposals to invertible, tractable mappings in reference coordinates, leveraging the expressiveness of normalizing flows to approximate the necessary transports (Davies et al., 2022, Yin et al., 14 Dec 2025).
2. Metropolis–Hastings Acceptance Criteria
The TRJ acceptance probability for a proposed move is
where is the model-jump proposal probability and (resp. ) is the reference density for auxiliary variables (resp. ).
Exact Transport Case:
If each is an exact transport and the pairing preserves , the acceptance simplifies to
With , all cross-model moves are accepted (), yielding rejection-free RJMCMC (Davies et al., 2022).
Approximate Flows:
Empirically, with trained flows, acceptance rates for cross-model moves typically exceed – for expressive architectures such as rational-quadratic masked autoregressive flows (RQMA), far surpassing naive or affine RJMCMC (Davies et al., 2022, Yin et al., 14 Dec 2025).
3. Architecture and Training of Normalizing Flows
Flow Parameterization
- Davies et al. (Davies et al., 2022):
- : Affine standardization (empirical mean/variance).
- : Sigmoid/Logit transforms between and .
- : Stack of three masked-autoregressive spline transforms (RQMA) with rational-quadratic splines (10 bins/11 knots), conditioned by neural networks (two hidden layers, size ).
- Yin & Jiao (Yin et al., 14 Dec 2025):
Uses RealNVP coupling flows for each model, with "scale" and "translation" functions parameterized by neural networks. Flows are either model-specific or amortized via a single conditional network with the model index as context.
Training Objective
- Maximum Likelihood:
Train to maximize the expected likelihood of reference samples mapped by , i.e.,
- Variational Inference (VI):
Yin & Jiao (Yin et al., 14 Dec 2025) minimize the reverse KL divergence between the flow-based variational approximation and . Unlike pilot-run-based training, this enables fitting with samples drawn directly from the base distribution, promoting scalability and eschewing expensive MCMC pilot runs.
Amortized and Conditional Flows
For large or structured model spaces, conditional normalizing flows (CTRJ) are trained to map from a model-and-parameter-augmented reference to any model's parameterization, supporting efficient transport and dramatically reduced training cost (Davies et al., 2022, Yin et al., 14 Dec 2025).
4. Implementation Workflow and Pseudocode
A schematic pseudocode of the TRJ sampler is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Algorithm TRJ (Transport RJMCMC)
Input: Current state x=(k, θ_k), flows {T_k}, target π, model-jump probs j_k(·), reference ν, within-model reversible kernels P_k(θ,dθ′)
1. Draw k′ ∼ j_k(·)
2. If k′ = k:
Draw θ_k′ ∼ P_k(θ_k, ·) and return (k, θ_k′)
3. Else (cross-model jump):
a. Compute z_k = T_k(θ_k)
b. Set w = n_{k′} − n_k
c. If w > 0: draw u ~ ν^{w}; z_{k′} = \bar h_{k→k′}(z_k, u)
If w < 0: (z_{k′}, u) = \bar h_{k→k′}^{-1}(z_k)
If w = 0: z_{k′} = \bar h_{k→k′}(z_k)
d. θ_{k′}′ = T_{k′}^{−1}(z_{k′})
e. Formulate new state x′ = (k′, θ_{k′}′) and compute acceptance α
f. With probability α, set x ← x′
Return current x |
5. Empirical Performance and Benchmarks
Experimental Results
- Sinh–Arcsinh Toy Example:
With known analytic transports, TRJ achieves rejection-free moves. Approximate flows (RQMA or RealNVP) yield nearly the same performance; affine flows result in noticeably worse mixing and slower convergence of model probabilities (Davies et al., 2022, Yin et al., 14 Dec 2025).
- Bayesian Factor Analysis (6×6 covariance):
RQMA-based TRJ greatly outperforms classical Lopes–West proposals and affine flows in mixing and variance reduction (Bartolucci Bridge Estimator), offering lower RMSE in model-probability estimates at fixed computational cost (Davies et al., 2022, Yin et al., 14 Dec 2025).
- Block Variable Selection/Robust Regression:
Standard auxiliary-variable proposals nearly fail to mix between separated modes. Individual (affine/RQMA) flows and conditional flows (CTRJ) both achieve high acceptance and excellent mixing. CTRJ matches the performance of multiple separate flows at much lower training cost (Davies et al., 2022, Yin et al., 14 Dec 2025).
- TRJ-VI-NF Comparisons:
Directly minimizing the reverse KL produces maps that closely approximate the true transport, yielding higher acceptance rates, smaller variance in model probability estimates, and effective sample sizes for between-model jumps 2–3× larger than prior methods (Yin et al., 14 Dec 2025).
6. Practical Recommendations and Extensions
- Flow Design:
Choose architectures with analytic invertibility (e.g., RQMA, RealNVP). Use affine flows only when conditional posteriors are close to Gaussian.
- Preprocessing:
Standardize each training set with elementwise affine transformations computed from pilot samples to improve training efficiency and numerical stability.
- Data Requirements:
Obtain – samples per model for supervised flow training (via MCMC/SMC pilot runs or variational flows, depending on approach).
- Model Jump Probabilities:
If marginal model probabilities are estimable, use to improve cross-model mixing; otherwise adopt symmetric or local proposals.
- Marginal-Likelihood Estimation:
Use the tractable flow-based variational densities for efficient estimation of via importance sampling, enabling accurate Bayes-factor computation (Yin et al., 14 Dec 2025).
- Computational Cost:
The up-front cost of flow training is amortized by subsequent orders-of-magnitude speedups in cross-model mixing and typically dwarfed by likelihood evaluations in complex models.
- Conditional/Amortized Flows:
For large model spaces, employ amortized conditional normalizing flows (CTRJ) for scalability, training on saturated targets that pad all models to dimensions to share statistical strength and training cost across models (Davies et al., 2022, Yin et al., 14 Dec 2025).
7. Theoretical Foundations and Extensions
“Flows for Flows” (Klein et al., 2022) introduces the nested use of normalizing flows, allowing construction of bijective maps between arbitrary distributions with known Jacobians. This principle underpins the design of deterministic RJMCMC proposals via paired flows, extending to settings with both matching and mismatched dimensions by embedding auxiliary variables and constructing invertible mappings on the joint space . This framework enables the introduction of optimal transport penalties (e.g., , Wasserstein, entropy-regularized cost) to ensure semantically meaningful transports, and supports conditional flows parameterized by model indices or side-information, which can further regularize and scale TRJ to complex, structured model spaces.
The overall methodology centralizes around replacing the design of bespoke, problem-specific RJ proposals with a learned, mathematically principled class of transport maps, ensuring detailed balance via explicit Jacobian accounting and leveraging the full expressive power of modern flow architectures.
References:
- Davies, Lucas, Meinshausen, "Transport Reversible Jump Proposals" (Davies et al., 2022).
- Yin, Jiao, "Transport Reversible Jump Markov Chain Monte Carlo with proposals generated by Variational Inference with Normalizing Flows" (Yin et al., 14 Dec 2025).
- Foster, Papamakarios, "Flows for Flows: Training Normalizing Flows Between Arbitrary Distributions with Maximum Likelihood Estimation" (Klein et al., 2022).