# Can we run the Metropolis-Hastings algorithm with a proposal also generated by the Metropolis-Hastings algorithm?

In the Metropolis-Hastings algorithm, depending on the current state $$x$$, I have a distribution $$\rho_x$$ and I want to use a sample from $$\rho_x$$ as the proposal in the next iteration. (I guess technically this means to start the Metropolis-Hastings algorithm afresh with a new proposal kernel and for only one single iteration.)

Now the crucial thing is that I cannot sample from $$\rho_x$$ directly, but also need to run the Metropolis-Hastings algorithm to obtain a sample $$y$$ from it.

What I worry about is that $$y$$ is not exactly distributed according to $$\rho_x$$; since the Metropolis-Hastings algorithm only guarantees that the limiting distribution is $$\rho_x$$. So, am I allowed to use the density of $$\rho_x$$ inside the "outer" Metropolis-Hastings algorithm as the density for the proposal kernel or does this lead to any issues? If not, is there a reference on that topic which shows that we are allowed to do that?

• What exactly is $\rho$ in your case and the distribution you want to sample from? The proposal distribution is not exact in MH algorithm.
– Tim
Commented Mar 10, 2023 at 5:33
• @Tim In my application, $\rho_x=e^{-\frac{E_x}T}$ for some energy functional $E_x$ and temperature $T>0$. Commented Mar 10, 2023 at 14:42
• This is your proposal distribution or the distribution that you want to generate the samples from? What is the distribution you want to generate the samples from? Are you sure you didn't confuse MH with simulated annealing?
– Tim
Commented Mar 10, 2023 at 14:56
• @Tim Yes, I'm sure. I want to use this distribution as a proposal distribution. Commented Mar 10, 2023 at 17:59
• What is $E_x$? Is it known and deterministic?
– Tim
Commented Mar 10, 2023 at 20:13

## 1 Answer

Referring to your comments, if the proposal distribution is

$$\rho_x=e^{-\frac{E_x}T}$$

with $$E_x$$ being known, deterministic function, then it's just a Laplace distribution for $$E_x$$ with a location parameter equal to zero and scale equal to $$T$$. You can sample from it directly.

• Thank you for your answer. The precise distribution is in equation $(4)$ on p. 4 of this paper. It is of the form above (without the $x$ dependence), but $E$ is a function on a highly-dimensional space ($([0,1)^d)^n$). I think we cannot sample directly from this, but please correct me if I'm wrong. I'm currently using MALA for this (as the paper does). Commented Mar 11, 2023 at 14:17
• I guess you thought $E$ (and my samples) would be real-valued Commented Mar 11, 2023 at 14:19
• @0xbadf00d I don't see anywhere paper discussing the proposal distribution, but maybe I missed something? Are you sure you're not confusing it with the acceptance probability..?
– Tim
Commented Mar 11, 2023 at 14:23
• Look, the idea is the following: I normally run the MH algorithm with a proposal from the uniform distributon on $[0,1)^{dn}$. But now I want that the proposals have the "blue noise" property which the samples from $(4)$ in the paper have. That's why I want to use them as a proposal. (The "spatial density" $\rho$ in the paper is simply $\rho\equiv1$ here). Commented Mar 11, 2023 at 14:34
• (Don't get confused: The paper uses MH to obtain samples from $(4)$. Now I simply want to use such samples as a proposal in another MH setting.) Commented Mar 11, 2023 at 14:40