MALA

The Metropolis-Adjusted Langevin Algorithm (MALA) is a gradient-informed Metropolis-Hastings sampler whose proposal is a discretized step of Langevin dynamics toward higher log-density. Given the current state and step size , the proposal is

The proposal density

is not symmetric — because the drift depends on the current position — so the Hastings correction does not drop out. The acceptance ratio is the standard MH expression

The drift term pushes every proposal uphill in before the Metropolis correction, so MALA systematically proposes moves into higher-density regions. In high dimensions this allows a much larger step size than random-walk Metropolis while maintaining a reasonable acceptance rate, often – (theory suggests tuning toward for isotropic Gaussian targets).

Mechanical interpretation. MALA can be viewed as Newton’s second law with constant acceleration : starting at position with random velocity and accelerating uniformly in the direction of steepest ascent of for time gives

which is exactly the MALA proposal. This contrasts with random-walk Metropolis (free-particle, no force) and HMC (position-dependent acceleration updated continuously along the trajectory).

Cost per iteration. One MALA step requires one gradient evaluation at , one Gaussian draw , one evaluation of and at the proposal, and one acceptance check. Each iteration is more expensive than random-walk Metropolis but the chain mixes dramatically faster on smooth targets, giving a better effective-sample-size-per-unit-time in almost every realistic setting.

Prerequisites

  • 3.11.1 Metropolis-Hastings — MALA is an instance of MH with an asymmetric, gradient-informed proposal.
  • 3.11 MCMC — detailed balance, ergodic theorem, acceptance-rate tuning.
  • 5.4 Reversibility — the detailed-balance condition that MALA satisfies by construction.

Intuition

Random-walk Metropolis explores blindly: the proposal has no idea where the high-density regions are, so it frequently wanders into low-probability areas and gets rejected. In high dimensions this is crippling. MALA fixes it by using the gradient of the log-target as a compass. The proposal still contains a Gaussian random-walk component () to maintain irreducibility and diffusion-like exploration, but a deterministic drift () nudges every proposal toward higher . Conceptually, MALA is noisy gradient ascent on — if it were pure gradient ascent the chain would converge to the MAP rather than sampling from ; the Gaussian noise keeps the chain exploring, and the Metropolis correction ensures that the stationary distribution is exactly .

The central design tension is between the step size and the Metropolis correction. Small keeps the proposal close to , making the gradient information accurate locally and the acceptance rate high — but the chain then moves slowly. Large takes big steps, so the linear gradient approximation of (used implicitly in the drift) breaks down and many proposals fall into regions of low probability, pushing the acceptance rate to zero. The optimal step size scales like for MALA versus for random-walk Metropolis, which is the quantitative reason MALA outperforms RWM in high dimensions.

Properties

(Asymmetric Proposal) The drift depends on , so , and the full MH acceptance formula is needed.

For random-walk Metropolis, symmetry collapses the acceptance probability to . For MALA the drift differs from , so both the forward and reverse proposal densities must be computed explicitly. The acceptance ratio becomes

(Detailed Balance) The Metropolis correction makes MALA satisfy detailed balance exactly, not just approximately.

The drift was derived in the first place by requiring for close to (see Derivation), so without the Metropolis correction MALA would sample from a distribution close to — but not exactly — as . Adding the MH accept/reject step restores detailed balance exactly for any : where is the MALA transition kernel. This is the key difference between MALA and the unadjusted Langevin algorithm (ULA), which runs the same proposal without Metropolis correction and samples from a -biased distribution rather than itself.

(Optimal Step Size) For high-dimensional product targets, the optimal acceptance rate is approximately and .

Roberts and Rosenthal (1998) showed that for i.i.d. target , the MALA chain with step size converges (after rescaling) to a Langevin diffusion as . The expected squared jumping distance is maximized when the acceptance rate tends to , giving a practical tuning target. This is markedly better than random-walk Metropolis, whose optimal step size scales like with acceptance rate : in dimensions, MALA takes steps times larger than RWM while accepting at a similar rate.

(Requires Gradients) MALA is inapplicable unless can be computed efficiently.

This is the price paid for gradient-informed exploration. For Bayesian models where the target is the posterior , the gradient is , and both pieces are typically available analytically or via automatic differentiation. For models with intractable likelihoods or discrete parameters, gradients do not exist and MALA cannot be used — random-walk Metropolis or bespoke samplers are needed instead.

(Preconditioning) A mass-matrix replaces to match the local curvature of .

The isotropic Gaussian noise in the basic MALA proposal is the wrong shape when the coordinates of live on very different scales or are strongly correlated under . A preconditioned MALA proposal is

where is a positive-definite mass matrix (typically the posterior covariance estimated from a preliminary run or from a Laplace approximation at the MAP). This rescales the proposal to match the local geometry: equal numbers of acceptable jumps in every direction. Without preconditioning, MALA on ill-scaled posteriors behaves similarly to unpreconditioned gradient descent — slow along narrow valleys, oscillatory across steep ones.

(Relation to Langevin SDE) The MALA proposal is the Euler-Maruyama discretization of the overdamped Langevin SDE.

The stochastic differential equation

where is standard Brownian motion, has as its unique stationary distribution (Fokker-Planck argument). Discretizing with Euler-Maruyama at step size gives exactly the proposal . This continuous-time perspective is why MALA is often called “Langevin Monte Carlo” and why its theory borrows heavily from SDE analysis (exponential ergodicity, contraction rates, coupling arguments).

(MALA vs. RWM in High Dimensions) MALA scales much better with dimension for smooth targets.

For random-walk Metropolis, the step size must shrink as to keep acceptance away from zero, and the number of iterations to reach stationarity scales as . For MALA, and the mixing time scales as . For HMC (the next step up in sophistication), and mixing scales as . The practical consequence: as grows from tens to hundreds to thousands, RWM becomes unusable while MALA remains workable, and HMC is workable even beyond.

(Failure Modes) MALA fails when has heavy tails or the gradient is expensive.

For targets with sub-Gaussian tails, the drift can be very large in the tails, leading to proposals that overshoot into the opposite tail and are rejected. Chains can get stuck in tail regions where the gradient points back toward the mode but the noise is too small to escape. Heavy-tailed targets (e.g., Cauchy) require truncated or tamed variants of the drift. Separately, if each gradient evaluation is expensive (large dataset, implicit model), the per-iteration cost may offset the per-iteration improvement in mixing — stochastic-gradient MALA (SGLD, SGLD-type) addresses this by subsampling the data at each step.

Examples

Derivation

Goal. Derive the MALA drift from the requirement that detailed balance hold approximately to leading order in , then check that the Metropolis correction restores detailed balance exactly.

Consider a proposal of the form with , where is a drift to be determined. The forward proposal density is

Compute the log-ratio:

Expanding the squared norms and cancelling terms,

Combine with the target ratio:

Leading-order expansion. When is close to (small , so is of size ), Taylor-expand:

For the ratio, the dominant term is since to leading order; the difference is and drops.

Summing,

For this to be — the condition for approximate detailed balance — the bracketed vector must vanish:

This is the MALA drift. Plugging back into the proposal gives

Exact detailed balance via Metropolis correction. The drift is derived for approximate balance; the MH acceptance step

repairs the remaining imbalance exactly. Computing , which is symmetric in , gives as required. The construction is the general MH argument; see 3.11.1 Metropolis-Hastings for details.

Why the expansion works. When is small the Taylor expansion of is accurate, and the leading-order approximate detailed balance gives an acceptance probability . As grows, the linear expansion degrades and drops; the optimal (corresponding to acceptance in high dimensions) is the one that balances step size against acceptance rate.

See Also