Skip to main content
. Author manuscript; available in PMC: 2025 Jul 8.
Published in final edited form as: J Mach Learn Res. 2024 Mar;25:87.

Algorithm 2.

The mth iteration of Simplified Manifold Preconditioner Adaptation.

Setup and inputs: d-dimensional random vector X𝒳Rd,XP whose density p(·)>0 is continuous with respect to the Lebesgue measure, assume K is a compact subset of 𝒳, fix the constants D0,κ>0,0<Tadapt<, step size 0<ε<D, denote gx=xlogp(x) g~x=gxminDmaxigx[i],1,Gx-1=-δ2δx2logp(x),G~x-1=Gx-1minDmaxiGx[i,i],1, let the sequence γm,mN be such that γm>0,γm0.
function SiMPA:
1:  Sample zU(0,1),vU(0,1), uN(0,Id).
2:  Let μ(new)=x(m-1)+ε22M(m-1)g~x(m-1) and propose x(new)=μ(new)+εM(m-1)12u.
3:  Let μ(back)=x(new)+ε22M(m-1)g~x(new).
4:  Compute
α=px(new)px(m-1)Nx(m-1);μ(back),ε2M(m-1)Nx(new);μ(new),ε2M(m-1).
5: if α<v and x(new)-x(m)<D, ⊳ proposal accepted
6:   Set x(m)=x(new).
7: else: set x(m)=x(m-1). ⊳ proposal rejected
if z<γm and x(m)K or m<Tadapt: ⊳ adapting
8:   Set M(m)-1=M(m-1)-1+κ(G˜x(m)-1-M(m-1)-1) and compute M(m)12.
else: ⊳ not adapting
9:   Set M(m)=M(m-1).