SlowGuess/NeurIPS_2023_OCR huggingface dataset:
We discuss the choice of this norm to perform the "involution checking step" in Appendix K. If both of these conditions are satisfied, we finally set  $(X_{n}^{\prime},P_{n}^{\prime}) = (s\circ \mathrm{S}_{h / 2})(Z_{n}^{(1)})$ , to ensure the reversibility of the update of  $(X_n',P_n')$ . Otherwise,  $(X_{n}^{\prime},P_{n}^{\prime})$  is not updated and we go to Step 3.
2Note that  $s\circ \mathrm{R}_h^\Phi$  is a function and not a set-valued map.
Algorithm 1: n-BHMC with Momentum Refresh
Input:  $(X_0,P_0)\in \mathrm{T}^{\star}\mathsf{M},\beta \in (0,1],N\in \mathbb{N},h > 0,\eta >0,\Phi_h$  with domain  $\mathrm{dom}_{\Phi_h}$  Output:  $(X_{n},P_{n})_{n\in [N]}$    
for  $n = 1,\ldots ,N$  do   
Step 1:  $G_{n}\sim \mathrm{N}_{x}(0,\mathrm{I}_{d}),\tilde{P}_{n}\gets \sqrt{1 - \beta} P_{n - 1} + \sqrt{\beta} G_{n}$    
Step 2: solving a discretized version of ODE (3)   
 $X_{n}^{\prime},P_{n}^{\prime}\leftarrow X_{n - 1},\tilde{P}_{n};\quad X_{n}^{(0)},P_{n}^{(0)}\leftarrow (s\circ S_{h / 2})(X_{n},\tilde{P}_{n})$    
if  $Z_{n}^{(0)} = (X_{n}^{(0)},P_{n}^{(0)})\in \mathrm{dom}_{\Phi_{h}}$  then   
 $Z_{n}^{(1)} = \Phi_{h}(Z_{n}^{(0)})$    
err0=|Zn(0)-Φh(Zn(1))|Zn(0), err1=|Zn(0)-Φh(Zn(1))|Φh(Zn(1)) (if defined)   
if  $Z_{n}^{(1)}\in \mathrm{dom}_{\Phi_{h}}\& \mathrm{err}_{0} + \mathrm{err}_{1}\leq \eta$  then  $X_n',P_n'\gets (s\circ S_{h / 2})(Z_n^{(1)})$    
end   
Step 3:  $A_{n}\gets \min (1,\exp [-H(X_{n}',P_{n}') + H(X_{n - 1},\tilde{P}_{n})])$  .  $U_{n}\sim U[0,1]$    
if  $U_{n}\leq A_{n}$  then  $\bar{X}_n,\bar{P}_n\gets X_n',P_n'$    
else  $\bar{X}_n,\bar{P}_n\gets X_{n - 1},\tilde{P}_n$    
Step 4:  $X_{n},\hat{P}_{n}\gets s(\bar{X}_{n},\tilde{P}_{n})$    
Step 5:  $G_{n}^{\prime}\sim \mathrm{N}_{x}(0,\mathrm{I}_{d}),P_{n}\gets \sqrt{1 - \beta}\hat{P}_{n} + \sqrt{\beta} G_{n}^{\prime}$
Step 3: computing the acceptance filter. We denote by  $a(x', p'|x, p)$  the acceptance probability to move from  $(x, p) \in \mathrm{T}^{\star}\mathsf{M}$  to  $(x', p') \in \mathrm{T}^{\star}\mathsf{M}$ , which is given by
$$
a \left(x ^ {\prime}, p ^ {\prime} \mid x, p\right) = 1 \wedge \exp \left[ - H \left(x ^ {\prime}, p ^ {\prime}\right) + H (x, p) \right]. \tag {9}
$$
After Step 2, we perform a simple MH filter by accepting the proposal with probability  $A_{n} = a(X_{n}^{\prime},P_{n}^{\prime}|X_{n - 1},\tilde{P}_{n})$  similarly to a classical HMC algorithm.
Step 4: applying momentum reversal. To ensure a move along the dynamics of  $H$  with step-size  $h$ , we reverse the momentum after the acceptance step. Indeed, if the acceptance filter is successful, then  $(X_{n},\hat{P}_{n}) = (s\circ \mathrm{R}_{h}^{\Phi})(X_{n - 1},\tilde{P}_{n - 1})$  approximates the Hamiltonian dynamics (3) on a step-size  $h$  starting at  $(X_{n - 1},\tilde{P}_{n - 1})$ , as seen in Section 3.1. Otherwise,  $(X_{n},\hat{P}_{n}) = (X_{n - 1}, - \tilde{P}_{n - 1})$ .
3.3 About the usefulness of the "involution checking step"
In their paper, Kook et al. (2022a) also incorporate self-concordance into RMHMC to sample from distributions supported on polytopes. To integrate the Hamiltonian dynamics, they propose to use a numerical version of the Implicit Midpoint integrator (Hairer et al., 2006, Theorem VI.3.5.), which shares the same theoretical properties as the Störmer-Verlet scheme. This results in CRHMC (Kook et al., 2022a, Algorithm 3), whose main difference compared to n-BHMC is the lack of the "involution checking step" (Line 8 in Algorithm 1). Crucially, Kook et al. (2022a) assume that their implicit integrator admits a unique solution given any starting point and any step-size  $h$ , which is then approximated by their numerical scheme. However, this statement may not be true in the self-concordant setting, as we explain below with a simple example. This explains why we always refer to the implicit integrator as a set-valued map. In their setting, the numerical integrator is not guaranteed to be involutive, which results in an asymptotic bias that the MH filter cannot solve.
In our paper, we do not make such an assumption on the Störmer-Verlet integrator, and consider a numerical solver which outputs one approximate solution to this implicit scheme. By doing so, our analysis is meant to be as close as possible to the practical implementation of RMHMC. Then, the "involution checking step" is critical to make the numerical integrator locally involutive, which enables us to derive rigorous reversibility results, see Theorem 3, and to solve the issue of asymptotic bias caused by implicit integration, see Section 6. We refer to Appendix J for a detailed comparison between n-BHMC and CRHMC. We now present a simple setting where the assumption made by Kook et al. (2022a) does not hold in the case of the Störmer-Verlet integrator, which is defined in (6).
Consider the 1-dimensional setting  $\mathsf{M} = (-\infty, 0)$  with  $\mathfrak{g}: x \mapsto 1 / x^2$ . Assume that  $\beta = 1$ . Let  $h > 0$  and let  $X_0 \in \mathsf{M}$  be the (position) state of the Markov chain at the beginning of the first iteration in n-BHMC. In this case,  $\tilde{P}_0 \sim \mathrm{N}(0, 1 / X_0^2)$  and we have  $P_0^{(0)} = \tilde{P}_0 - (h / 2)\partial_x H_1(X_0, \tilde{P}_0)$ , where the function  $H_1$  is defined in Section 3.1. Using (4), we have  $P_0^{(0)} \sim \mathrm{N}(\mu_0, 1 / X_0^2)$ , where
$\mu_0 = -(h / 2)\partial_xH_1(X_0,\tilde{P}_0)$  only depends on  $X_0$ . Then, the implicit equation in  $P_0^{(1 / 2)}$ , given by the first equation of (6), reads as  $P_0^{(1 / 2)} = P_0^{(0)} - (h / 2)\partial_xH_2(X_0,P_0^{(1 / 2)})$ . Using (5), it can be rewritten as a polynomial equation of degree 2 in  $P_0^{(1 / 2)}$
$$
\frac {h}{2} X _ {0} \left(P _ {0} ^ {(1 / 2)}\right) ^ {2} + P _ {0} ^ {(1 / 2)} - P _ {0} ^ {(0)} = 0. \tag {10}
$$
Denote  $\Delta = 1 + 2hX_0P_0^{(0)}$ . Then, (10) may admit 0,1 or 2 solutions depending on the sign of  $\Delta$ . If  $P_0^{(0)} \leq -1 / (2hX_0)$ , i.e.,  $\Delta \geq 0$ , then (10) admits 1 or 2 solutions. However, if  $h$  is small enough, only one solution is valid when considering the constraint on the position update in (6). Whenever  $P_0^{(0)} > -1 / (2hX_0)$ , i.e.,  $\Delta < 0$ , (10) admits no solution. Recalling that  $P_0^{(0)} \sim \mathrm{N}(\mu_0, 1 / X_0^2)$ , this event occurs with positive probability, thus violating the assumption made by Kook et al. (2022a).
We now study the reversibility of n-BHMC with respect to the target distribution. To do so, we first present theoretical results on the exact integrators of the discretized Hamiltonian dynamics in Section 4.1, from which we derive our assumption on the numerical integrator used in n-BHMC. Finally, we state our main result on n-BHMC in Section 4.2.
4.1 From implicit to numerical integrators
We show in Proposition 2 that even though  $\mathrm{F}_h$  is a set-valued map, it can locally be identified with a  $\mathbf{C}^1$ -diffeomorphism. In a manner akin to Lelièvre et al. (2022), this justifies our assumption A3 that the numerical map  $\Phi_h$  used to approximate  $\mathrm{F}_h$  in Step 2 of Algorithm 1 is locally a  $\mathbf{C}^1$ -involution.
Proposition 2. Assume A1, A2. Let  $z^{(0)} \in \mathrm{T}^{\star}\mathsf{M}$ , then there exists  $h^{\star} > 0$  (explicit in Appendix G) such that for any  $h \in (0,h^{\star})$ , there exist  $z_h^{(1)} \in \mathrm{F}_h(z^{(0)})$ , a neighborhood  $\mathsf{U} \subset \mathrm{T}^{\star}\mathsf{M}$  of  $z^{(0)}$  and a  $\mathrm{C}^1$ -diffeomorphism  $\gamma_h: \mathsf{U} \to \gamma_h(\mathsf{U}) \subset \mathrm{T}^{\star}\mathsf{M}$  with
(a)  $\gamma_h(z^{(0)}) = z_h^{(1)}$  and  $|\operatorname{det}\operatorname{Jac}(\gamma_h)| = 1$ .
(b)  $\gamma_h(z)$  is the only element of  $\mathrm{F}_h(z)$  in  $\gamma_h(\mathsf{U})$  for any  $z\in \mathsf{U}$
Proposition 2 shows that while  $\mathrm{F}_h$  can take multiple (or none) values on  $\mathrm{T}^{\star}\mathsf{M}$ , for any  $z^{(0)}\in \mathrm{T}^{\star}\mathsf{M}$ , there exists  $h$  small enough and a neighborhood  $\mathsf{U}$  of  $z^{(0)}$  such that the set-valued map  $\mathrm{F}_h$  is locally symplectic on  $\mathsf{U}$ . The proof of Proposition 2 is given in Appendix G. It first relies on considering the Störmer-Verlet scheme introduced in (6) as the composition of maps for which we derive the existence of solutions and secondly applying the implicit function theorem on these maps. Motivated by this result on the implicit map  $\mathrm{F}_h$  and the fact that for any  $z\in \mathrm{T}^{\star}\mathsf{M}$  with  $|\mathrm{F}_h(z)| > 0$ ,  $z\in \mathrm{F}_h\circ \mathrm{F}_h(z)$  (see Section 3.1), we make the following assumption on the numerical map  $\Phi_h$ .
A3. There exists  $\lambda \in (0,1)$  s.t. for any  $z^{(0)}\in \mathrm{T}^{\star}\mathsf{M}$ , there exists  $h_\star >0$  and for any  $h\in (0,h_{\star})$
(a)  $\mathsf{B} = \mathsf{B}_{\| \cdot \|_{z(0)}}(z^{(0)},\lambda r^{\star}(x^{(0)}))\subset \mathrm{dom}_{\Phi_h},$
(b)  $\Phi_h\in \mathrm{C}^1 (\mathsf{B},\mathrm{T}^\star \mathsf{M})$  and  $\Phi_h\circ \Phi_h = \operatorname {Id}$  on  $\mathsf{B}$
with  $r^{\star}:\mathsf{M}\to (0, + \infty)$  depending only on  $\mathfrak{g}$  and defined in Appendix I.
Assumption A3 can be thought as a strengthening of Proposition 2-(a), where (i)  $h_\star$  refers to  $h^\star$ , and (ii)  $\mathsf{B}$  and  $\Phi_h$  correspond to explicit versions of  $\mathsf{U}$  and  $\gamma_h$ . We conjecture that the involution condition in A3-(b) could in fact be replaced by the condition that for any  $z \in \mathsf{B}$ ,  $\Phi_h(z) \in \mathrm{F}_h(z)$ , in a manner akin to Lelievre et al. (2022). We leave this study for future work.
4.2 Reversibility results
Beyond n-BHMC. While Algorithm 1 can be implemented practically, it cannot be easily analysed under A1, A2 and A3. The main reason for this limitation is that the self-concordance properties are defined locally, whereas deriving reversibility results require global control. In particular, we cannot ensure that  $\Phi_h$  is locally an involution around  $z^{(0)}$  if  $h > h_{\star}$ . To circumvent this issue, we enforce a condition on  $h$  to be small enough in n-BHMC. Using the notation from A3, we define the set
$$
\mathsf {A} _ {h} = \left\{z \in \mathrm {T} ^ {\star} \mathsf {M}: h <   \min  _ {\tilde {z} \in \mathsf {B} _ {\| \cdot \| z} (z, 1)} h _ {\star} (\tilde {z}) \right\} \subset \operatorname {d o m} _ {\Phi_ {h}}.
$$
Let  $z^{(0)} \in \mathsf{A}_h$ . By A3, we know that  $\Phi_h$  is an involution on a neighbourhood of  $z^{(0)}$ ; in particular, it comes that  $(\Phi_h \circ \Phi_h)(z^{(0)}) = z^{(0)}$ . Hence, the condition (b) of the "involution checking step" in Algorithm 1 is de facto satisfied. This naturally leads to replace " $Z_n^{(1)} \in \mathrm{dom}_{\Phi_h}$ ", i.e., the condition (a) of the "involution checking step", by the more restrictive condition " $Z_n^{(1)} \in \mathsf{A}_h$ ", as presented in Algorithm 3 (see Appendix H), for which we are able to derive a reversibility result.
We denote by  $\mathrm{Q}:\mathrm{T}^{\star}\mathsf{M}\times \mathcal{B}(\mathrm{T}^{\star}\mathsf{M})\to [0,1]$ , the transition kernel of the (homogeneous) Markov chain  $(X_{n},P_{n})_{n\in \mathbb{N}}$  obtained with Algorithm 3. We now state our main result on n-BHMC.
Theorem 3. Assume A1, A2, A3. Then, Q is reversible up to momentum reversal, i.e., we have for any  $f \in \mathrm{C}(\mathrm{T}^{\star}\mathsf{M} \times \mathrm{T}^{\star}\mathsf{M},\mathbb{R})$  with compact support
$$
\int_ {\mathrm {T} ^ {*} \mathrm {M} \times \mathrm {T} ^ {*} \mathrm {M}} f (z, z ^ {\prime}) \mathrm {d} \bar {\pi} (z) \mathrm {Q} (z, \mathrm {d} z ^ {\prime}) = \int_ {\mathrm {T} ^ {*} \mathrm {M} \times \mathrm {T} ^ {*} \mathrm {M}} f (s (z ^ {\prime}), s (z)) \mathrm {d} \bar {\pi} (z) \mathrm {Q} (z, \mathrm {d} z ^ {\prime}).
$$
In particular,  $\bar{\pi}$  is an invariant measure for Q.
Proof. We provide here a sketch of the proof, technical details being postponed to Appendix I. The reversibility (up to momentum reversal) of the momentum update is straightforward. To establish the reversibility up to momentum reversal of the numerical Hamiltonian integration step, we cover the compact support of  $f$  with a finite family of open balls with respect to the metric  $\mathfrak{g}$ . Combining A2 and A3, we show that  $\Phi_h$  is a volume-preserving  $C^1$ -diffeomorphism on each one of these sets. We then conclude upon combining this result with the fact that  $\mathrm{R}_h^\Phi \circ s \circ \mathrm{S}_{h/2} = s \circ \mathrm{S}_{h/2} \circ \Phi_h$ .
Although Algorithm 3 may be implemented, this would come with a huge (and unrealistic) computational cost since verifying that  $z \in \mathsf{A}_h$  implies to find the minimal critical step-size  $h_\star$  on a neighborhood of  $z$ . The question of the existence of a global step-size  $h$  such that Algorithm 1 can be properly analyzed is not the topic of this paper and is left for future work.
Comparison with Theorem 8 in Kook et al. (2022a). Although Kook et al. (2022a) present a theoretical result similar to Theorem 3, we claim that their statement is not correct. Indeed, the authors make a critical confusion between the ideal integrator as considered in Hairer et al. (2006) and the numerical version they implement. Then, in the proof of reversibility for their scheme, they act as if the two algorithms were the same while it is not true (see Appendix J for further details). On the other hand, (i) we make a clear distinction between the ideal integrator and its numerical implementation (see Section 3.1), and (ii) implement the "involution checking step" to enforce reversibility (Line 8 in Algorithm 1).
Sampling on manifolds. Traditional constrained sampling methods in Euclidean spaces include the Hit-and-Run algorithm (Lovasz & Vempala, 2004), the Random Walk Metropolis-Hastings (RWMH) algorithm, also referred to as Ball Walk (Lee & Vempala, 2017a), and HMC, (Duane et al., 1987). However, it has been empirically demonstrated that RWMH and HMC require small step-sizes in order to correctly sample from a target distribution  $\pi$  over a submanifold  $M \subset \mathbb{R}^d$ , thus resulting in poor mixing time (Girolami & Calderhead, 2011, Figures 1 and 3). In the specific case where  $M = \{x \in \mathbb{R}^d : c(x) = 0\}$  for some  $c : \mathbb{R}^d \to \mathbb{R}^m$ , Brubaker et al. (2012) combine HMC with the RATTLE integrator (Leimkuhler & Skeel, 1994), incorporating the constraints of  $M$  in the Hamiltonian dynamics via Lagrange multipliers. Girolami & Calderhead (2011) adopt an original approach by endowing  $M$  with a Riemannian metric  $\mathfrak{g}$  and propose RMHMC (Riemannian Manifold HMC), a version of HMC where the Hamiltonian depends on  $\mathfrak{g}$  as in (1). It consists of integrating the Hamiltonian dynamics of (3) on short-time steps using the generalized Leapfrog integrator (6) and the acceptance filter defined in (9). This method does not include an "involution checking step", and thus the reversibility of the algorithm cannot be ensured in practice and in theory. Similarly, Byrne & Girolami (2013) propose to design a numerical integrator for RMHMC using geodesics.
Choice of the metric in RMHMC. There are various ways to design a meaningful metric  $\mathfrak{g}$  given a submanifold M. In a Bayesian perspective, Girolami & Calderhead (2011) aim at computing the a posteriori distribution of a statistical model of interest and thus choose  $\mathfrak{g}$  to be the Fisher-Rao metric. In this paper, we consider another approach which exploits the geometrical structure of M. For instance, one can always define a self-concordant barrier  $\phi$  when M is a convex body, (Nesterov & Nemirovskii, 1994), and choose  $\mathfrak{g} = D^2\phi$ , as done by Kook et al. (2022a).
Self-concordance in RMHMC. Elaborating on Riemannian geodesics, Lee & Vempala (2018) provide theoretical guarantees of fast mixing time for RMHMC when (i)  $\mathsf{M}$  is a polytope, and (ii)  $\mathfrak{g}$  is the Hessian of a self-concordant function  $\phi$  (as in our setting). Their result notably improves the complexity of uniform polytope sampling from algorithms relying on self-concordance such as the Dikin Walk (Kannan & Narayanan, 2009) and the Geodesic Walk (Lee & Vempala, 2017b). However, they only consider the case where the exact continuous Hamiltonian dynamics is used, as in c-BHMC (see Appendix D). On the other hand, Kook et al. (2022a) integrate the Hamiltonian dynamics via implicit schemes without any "involution checking step" in a similar self-concordant setting. In particular, they consider a convex body  $\mathsf{K}$  equipped with a self-concordant barrier  $\phi$ , combined with a linear equality constraint  $\mathrm{Ax} = b$ . This is a special case of our framework (see A1 and A2) by rewriting this whole set as  $\mathsf{K}' = \{\mathrm{A}^\dagger b + u \in \mathsf{K} : u \in \mathrm{Ker}(\mathrm{A})\}^3$ , equipped with the self-concordant barrier  $u \mapsto \phi (\mathrm{A}^\dagger b + u)$ . Besides this, Kook et al. (2022a) provide an efficient implementation of their algorithm (CRHMC) in the case of a convex bounded manifold of the form  $\mathsf{M} = \{x \in \mathbb{R}^d : \mathrm{Ax} = b, \ell < x < u\}$ . Although CRHMC demonstrates empirical fast mixing time, we show in Section 6 that it suffers from an asymptotic bias. More recently, Kook et al. (2022b) built upon the empirical results of Kook et al. (2022a) to derive theoretical results of fast mixing time. However, they do not question the issue of asymptotic bias in CRHMC.
Enforcing reversibility. Zappa et al. (2018) propose a version of RWMH including projection steps after each proposal. To our knowledge, they are the first to practice "involution checking" of the proposal, and thus enforce the reversibility of the Markov chain with respect to  $\pi$ . Lelievre et al. (2019) notably combine this method with the discretization suggested by Brubaker et al. (2012) to also enforce the constraints of the manifold. Lelievre et al. (2022) elaborate on this framework, by designing a symplectic numerical integrator with multiple possible outputs, and provide a rigorous proof of reversibility. Note that it only applies when  $\mathfrak{g}$  is induced by the flat metric of  $\mathbb{R}^d$  and therefore cannot be combined with our approach as such.
In our experiments<sup>4</sup>, we illustrate the performance of n-BHMC (Algorithm 1) to sample from target distributions which are supported on polytopes. We compare our method with the numerical implementation of CRHMC<sup>5</sup> provided by Kook et al. (2022a). In all of our settings, we compute  $\mathfrak{g}$  as the Hessian of the logarithmic barrier, see Section 2.2. The algorithms are always initialized at the center of mass of the considered polytope. At each iteration of n-BHMC, we perform one step of numerical integration, using the Störmer-Verlet scheme with  $K = 30$  fixed-point steps and keep the refresh parameter  $\beta$  equal to 1. We refer to Appendix K for more details on the setting of our experiments and additional results.
Synthetic data. We first consider the problem of sampling from the truncated Gaussian distribution
$$
(\mathrm {d} \pi / \mathrm {d L e b}) (x) = \exp [ - \| x - \mu \| ^ {2} / 2 ] \mathbb {1} _ {\mathsf {M}} (x) / \int_ {\mathsf {M}} \exp [ - \| \tilde {x} - \mu \| ^ {2} / 2 ] \mathrm {d} \tilde {x}, \quad \forall x \in \mathbb {R} ^ {d},
$$
where  $M$  is the hypercube or the simplex, and  $\mu \in \mathbb{R}^d$  is defined by
$$
\mu = (1 0 / \sqrt {d - 1}) \times \left\{\mathbf {1} - e _ {1} + (\sqrt {d - 1} - 1) e _ {2} \right\},
$$
where  $e_i$  stands for the  $i$ -th canonical vector of  $\mathbb{R}^d$  and  $\mathbf{1} = \sum_{i=1}^{d} e_i$ . In particular,  $\mu_1 = 0$ ,  $\mu_2 = 10$  and  $\mu_j = \frac{\mu_2}{\sqrt{d - 1}}$  for any  $j \in \{3, \ldots, d\}$ . Therefore, the mass of  $\pi$  is not evenly distributed on the boundary of  $\mathsf{M}$ , which is key to observe the impact of the reversibility condition. For this experiment, we consider the low-dimensional setting  $d \in \{5, 10\}$ . To sample from  $\pi$ , we run 10 times the algorithms CRHMC and n-BHMC for  $N = 10^5$  iterations, and update the step-size  $h$  such that the average acceptance rate in the MH filter is roundly equal to 0.5, following Roberts & Rosenthal (2001). We discuss the setting of the tolerance parameter  $\eta$  for n-BHMC in Appendix K. In order to correctly assess the bias of each numerical method, we aim at accurately computing the target quantity  $Q = \int_{\mathsf{M}} \langle x, \mu \rangle_2 \mathrm{d}\pi(x)$ . Although our choice of  $Q$  is arbitrary, it highlights well the bias in CRHMC, which is corrected when using n-BHMC.
${}^{3}{\mathrm{\;A}}^{ \dagger  }$  is the pseudo-inverse of  $\mathrm{A}$  .
4Our code: https://github.com/maxencenoble/barrier-hamiltonian-monte-carlo.
<sup>5</sup>https://github.com/ConstrainedSampler/PolytopeSamplerMatlab
Figure 2: Comparison between n-BHMC and CRHMC on the hypercube (left) and the simplex (right).
We evaluate their performance by taking as ground truth the estimate given by (i) the Metropolis-Adjusted Langevin Algorithm (MALA) (Roberts & Stramer, 2002) for the hypercube and (ii) the Independent MH (IMH) algorithm (Liu, 1996) for the simplex, which are also run 10 times, but 10 times longer than n-BHMC and CRHMC, i.e., for  $N = 10^{6}$  iterations. To compute the target quantity  $Q$ , we keep the whole trajectories and report the confidence intervals in Figure 2. For both polytopes, we notably observe that our method is less biased than CRHMC.
Real-world data. We then consider 10 polytopes given in the COBRA Toolbox v3.0 (Heirendt et al., 2019), which model molecular systems, and follow the method provided in (Kook et al., 2022a, Appendix A) to pre-process them. Here, we aim at uniformly sampling from these polytopes. However, we do not have access to a realistic baseline that yields an unbiased estimator, since the sampling dimension is too high and running MALA or IMH would be too costly. Hence, instead of assessing the bias of the algorithms, we rather want to highlight that the "involution checking step" does not hurt the convergence properties of BHMC compared to CRHMC. We evaluate the efficiency of the
Model	d	NNZ	n-BHMC	CRHMC
ecoli	95	291	0.08822	5.719
cardiac-mit	220	228	0.1905	5.304
Aci-D21	851	1758	141.9	46.17
Aci-MR95	994	2859	325.1	61.34
Abi-49176	1069	2951	179.4	74.22
Aci-20731	1090	2946	0.7124	88.82
Aci-PHEA	1561	4640	2.343	100.8
iAF1260	2382	6368	537.9	170.5
iJO1366	2583	7284	537.9	169.4
Recon1	3742	8717	3.740	3280
Table 1: Real-world data setting: comparison with Kook et al. (2022a).
algorithms by computing the sampling time per effective sample (in seconds), defined as the total sampling time until termination divided by the Effective Sample Size. We set the initial step-size to 0.01 for both algorithms and  $\eta = 10$  in n-BHMC. We then follow the exact same procedure as in (Kook et al., 2022a, Table 1) by drawing 1000 uniform samples with limit on running time set to 1 day. Results are given in Table 1. For each molecular model, we specify by NNZ the number of non-zero entries in the matrix A defining the corresponding pre-processed polytope, which thus reflects its complexity. In particular, the sampling dimension  $d$  corresponds to the number of columns of A. Note that the sampling time values are not of interest in themselves, but are only meant to compare CRHMC and n-BHMC. While it is clear that adding an "involution checking step" implies a trade-off between accuracy and complexity of the method, our results demonstrate that it does not penalize BHMC in the considered settings, and may even make it more efficient in some cases.