---
title: 'MASLA: Subdifferential Langevin Sampling'
url: https://www.emergentmind.com/topics/metropolis-adjusted-subdifferential-langevin-algorithm-masla-bdcbfdab-fbfd-4501-a6d0-035b7aa7f9b7
type: topic
---

# MASLA: Subdifferential Langevin Sampling

Metropolis-adjusted Subdifferential Langevin Algorithm (MASLA) is a Metropolis–Hastings generalization of the Metropolis-Adjusted Langevin Algorithm (MALA) for target densities of the form $\pi(x)\propto e^{-U(x)}$ when the potential $U:\mathbb{R}^d\to[0,\infty)$ is only locally Lipschitz and may be non-convex and non-differentiable. In this formulation, the gradient $\nabla U$ is replaced by an element of a set-valued conservative field $D_U(x)$ that generalizes the Clarke subgradient, and exact stationarity is restored by an MH correction [2507.06950]. The acronym MASLA has also been used in related optimal-scaling work for a Moreau–Yosida regularized proximal MALA construction in which $U$ is replaced by its envelope $U_\lambda$ and the proposal is expressed through $\operatorname{prox}_{\lambda U}$ [2301.02446].

## 1. Problem setting and motivation

The target problem is to sample from a probability density $\pi$ on $\mathbb{R}^d$ of the form
\[
\pi(x)\propto e^{-U(x)},
\]
with $U$ assumed only to be locally Lipschitz. By Rademacher’s theorem, $U$ is differentiable almost everywhere, but global smoothness, and even convexity, are not assumed. This setting is outside the standard regularity regime of classical MALA, which requires $U\in C^1$ so that the Euler–Maruyama proposal
\[
Y_{n+1}=X_n-\gamma \nabla U(X_n)+\sqrt{2\gamma}\,Z_{n+1},\qquad Z_{n+1}\sim N(0,I),
\]
is well defined [2507.06950].

The motivation for MASLA is tied to three limitations of unadjusted or smoothness-dependent Langevin discretizations in the non-smooth regime. When $U$ is non-smooth, the unadjusted Langevin algorithm can fail to have the correct invariant law, can even be transient, and cannot exploit subgradient information. MASLA addresses these points by replacing $\nabla U$ with an element of $D_U(x)$ and by applying a Metropolis–Hastings accept–reject step, thereby extending Langevin-type sampling to locally Lipschitz, generally non-differentiable, and non-convex log-densities [2507.06950].

## 2. Algorithmic construction

MASLA is motivated by the generalized Langevin differential inclusion
\[
dX_t \in -D_U(X_t)\,dt+\sqrt{2}\,dB_t,
\]
where $D_U(x)\subset \mathbb{R}^d$ is a conservative field for $U$. The discrete proposal with step size $\gamma$ selects a subgradient $\beta\in D_U(X_n)$ and performs the Euler–Maruyama step
\[
\tilde X_{n+1}=X_n-\gamma\,\beta(X_n)+\sqrt{2\gamma}\,Z_{n+1},\qquad Z_{n+1}\sim N(0,I). \tag{1}
\]
If $U$ is differentiable at $X_n$, the natural choice is $\beta=\nabla U(X_n)$. At a non-differentiable point, one may compute a Clarke subgradient via automatic differentiation or backpropagation, or pick any element of a conservative field, for example from the convex hull of nearby gradients [2507.06950].

Let $q_\gamma(x,y)$ denote the density of the proposal in (1). The MH correction is then
\[
\alpha_\gamma(x,y)=\min\Bigl\{1,\,
\frac{e^{-U(y)}\,q_\gamma(y,x)}{e^{-U(x)}\,q_\gamma(x,y)}
\Bigr\}. \tag{2}
\]
The next state is $y$ with probability $\alpha_\gamma(X_n,y)$ and remains at $X_n$ otherwise. This structure preserves the Langevin-type local move while reinstating exact stationarity through detailed balance [2507.06950].

## 3. Stationarity, reversibility, and convergence status

The principal theoretical result states that if $U$ is $C^2$ on an open set whose complement has Lebesgue measure zero, and if $X_0$ has a density with respect to Lebesgue measure, then for almost every $\gamma>0$ the MASLA chain is reversible with respect to $\pi(x)\propto e^{-U(x)}$, and hence $\pi$ is its stationary distribution [2507.06950].

The proof strategy proceeds by showing that the proposal kernel $Q_\gamma(x,dy)$ admits a density $q_\gamma(x,y)$. This is done by verifying that the map
\[
x\mapsto x-\gamma \beta(x)+\sqrt{2\gamma}\,z
\]
is a local diffeomorphism for almost every $\gamma$ and almost every $x$, using the inverse-function theorem away from a null set of Hessian singularities. Detailed balance,
\[
\pi(x)Q_\gamma(x,dy)\alpha_\gamma(x,y)=\pi(y)Q_\gamma(y,dx)\alpha_\gamma(y,x),
\]
then yields stationarity [2507.06950].

The convergence-rate picture is more limited. Explicit nonasymptotic Wasserstein or total-variation error bounds are not given. The stated position is that, under standard dissipativity and smoothness-a.e. conditions, one expects MASLA to inherit the geometric ergodicity and $O(d/\epsilon^2)$ mixing-time behavior proved for MALA and related nonsmooth extensions [2507.06950]. This remains an expectation rather than a theorem in the cited work.

## 4. Implementation and computational profile

In practice, the step size $\gamma$ is tuned to achieve an average acceptance rate near $0.574$, identified as the optimal value for MALA in high dimensions. Small $\gamma$ reduces discretization bias but slows mixing, whereas large $\gamma$ lowers acceptance. The paper presents this as a practical guideline rather than a derived optimality result for the full non-smooth setting [2507.06950].

The per-iteration cost consists of one gradient or subgradient evaluation together with $O(d)$ operations to sample $N(0,I)$ and compute Gaussian densities for $q_\gamma(x,y)$. The implementation notes also identify several high-dimensional accelerations: subsampled or stochastic subgradient estimates, preconditioning, and blockwise updates. These are presented as compatible extensions of the core scheme rather than as parts of the proved theory [2507.06950].

## 5. Empirical evaluation

The reported experiments include a composite TV–$L^2$ example in dimension $d=2$ with
\[
U(x)=\tfrac12 \sigma^{-2}\|x-y\|^2+\lambda\,|Kx|,
\]
where $Kx=x_2-x_1$, $\lambda=5$, and $\sigma=1$. MASLA is compared with Grad-sub and Prox-sub from Habring et al. (2024) in Wasserstein-2 distance, and with P-MALA from Pereyra (2016) and MYULA from Durmus and Pereyra (2022) in total-variation distance. The stated result is that MASLA matches or slightly improves on state-of-the-art convergence rates across $\gamma\in\{10^{-3},10^{-4},10^{-5}\}$ and exhibits clear exponential ergodicity [2507.06950].

A second benchmark studies the non-proximal one-dimensional potential $f(x)=|x^2-1|$. This function is locally Lipschitz and path-differentiable, but its proximal operator at $y=0$ is multivalued, $\{\pm 1\}$, so prox-based samplers cannot apply. In this setting, Unadjusted Subdifferential Langevin (USLA) diverges from the true law, whereas MASLA with the MH correction closely tracks the exact target density. The reported quantitative errors are $\mathrm{TV}\approx 1.4\times 10^{-2}$ and $W_2\approx 8\times 10^{-3}$ for MASLA, while the corresponding USLA errors exceed $1\times 10^{-1}$ [2507.06950].

## 6. Relation to Moreau–Yosida and proximal formulations

A source of potential confusion is that the acronym MASLA also appears in the optimal-scaling literature for a Moreau–Yosida Metropolis-adjusted Langevin scheme. In that construction, $U:\mathbb{R}^d\to(-\infty,+\infty]$ is assumed convex, proper, and lower-semicontinuous, and one introduces the Moreau–Yosida envelope
\[
U_\lambda(x)\coloneqq \min_{u\in\mathbb{R}^d}\Bigl\{U(u)+\frac{\|u-x\|^2}{2\lambda}\Bigr\}.
\]
The regularized potential is $C^1$ with
\[
\nabla U_\lambda(x)=\frac{x-\operatorname{prox}_{\lambda U}(x)}{\lambda},
\]
and $\nabla U_\lambda$ is Lipschitz continuous with constant $1/\lambda$. The proposal is then
\[
y=x_n-\frac{\delta}{2}\nabla U_\lambda(x_n)+\sqrt{\delta}\,\xi
\]
or, equivalently,
\[
y=x_n-\frac{\delta}{2\lambda}\bigl[x_n-\operatorname{prox}_{\lambda U}(x_n)\bigr]+\sqrt{\delta}\,\xi,
\]
followed by the standard MH correction [2301.02446].

Crucinio et al. analyze optimal scaling for product-form targets $\pi_d(x)=\prod_{i=1}^d \pi(x_i)$ under regimes where
\[
\sigma_d^2=\ell^2 d^{-2\alpha},\qquad \lambda_d=c^2 d^{-2\beta}/2.
\]
For smooth targets, the optimal acceptance is reported as $0.452$ in one regime and $0.574$ in others; for the non-smooth Laplace target $U(x)=|x|$, the only non-degenerate scaling has $\alpha=1/3$, with asymptotically optimal acceptance $0.360$. The practical guidance given there is to choose $\delta$ proportional to $d^{-2/3}$ for non-smooth targets and to $d^{-1/3}$ for smooth targets, and to set $\lambda\sim O(\delta)$ unless the target is very smooth [2301.02446].

These two usages of MASLA are related but not identical. The Moreau–Yosida construction smooths the target first and works through proximal maps; the 2025 “Metropolis-adjusted Subdifferential Langevin Algorithm” uses a conservative field directly and is explicitly designed for locally Lipschitz, generally non-differentiable, non-convex potentials. This suggests two distinct nonsmooth Metropolized Langevin paradigms within the same acronymic neighborhood: proximal regularization and direct subdifferential dynamics.

## 7. Applications, extensions, and open questions

The stated domain in which MASLA is especially useful consists of high-dimensional sampling problems where $U$ is non-smooth or non-convex, such as $\ell_1$-penalized posteriors, ReLU-net losses, and nonsmooth composite objectives, provided that a subgradient can be computed through automatic differentiation [2507.06950].

The same source identifies several extensions: nonasymptotic error bounds under non-convex dissipativity assumptions, stochastic-gradient MASLA using mini-batch subgradients, Riemann-manifold or preconditioned MASLA via variable-metric conservative fields, and subdifferential Hamiltonian Monte Carlo. The open questions are the dimension dependence of mixing times for general conservative fields, optimal acceptance rates in nonsmooth regimes, and adaptive tuning of $\gamma$ in the presence of set-valued drift [2507.06950].

Within the broader MCMC landscape, MASLA therefore occupies a specific niche: it retains the exact-stationarity guarantee of a Metropolis correction while extending Langevin methodology beyond differentiable targets. The main unresolved issue is not whether such a scheme can be defined, but how far its theoretical performance can be characterized under the weak regularity and non-convexity assumptions that motivate it.

Source: https://www.emergentmind.com/topics/metropolis-adjusted-subdifferential-langevin-algorithm-masla-bdcbfdab-fbfd-4501-a6d0-035b7aa7f9b7