betaFeedback

WorksComputer Science

Reachability-Aware Diffusion Policy Optimization

Abstract

Diffusion policies provide expressive action distributions for continuous-control reinforcement learning. However, safety-aware online diffusion policy optimization remains underexplored, particularly methods that use predictive reachability information without an explicit dynamics model. We propose Reachability-Aware Diffusion Policy Optimization (RADPO), a model-free method that combines predictive first-hit safety estimation with cumulative-cost budget feedback. RADPO learns a discounted first-hit reachability value that captures the discounted risk of a cost event, assigns larger weight to events that occur sooner, and uses this signal to shape the reward. A separate dual-like multiplier adjusts the shaping strength according to realized episodic costs relative to a prescribed budget. The diffusion actor improves through weighted denoising regression on candidate actions scored by the reward critic. Our approach requires neither a learned dynamics model, action gradients through the critics, nor differentiation through the reverse diffusion sampler. We establish theoretical properties of the reachability value and show that accumulated reachability penalty provides a conservative surrogate for future discounted cumulative cost. Across ten continuous-control safety tasks, RADPO achieves competitive reward-cost trade-offs, with substantial reductions in constraint violations on several tasks relative to the compared baselines. Our theoretical and empirical analysis supports that combining reachability with cumulative budget feedback is a viable approach to safety-aware diffusion policies.

Introduction

A common formulation of safe reinforcement learning aims to maximize task performance while keeping expected cumulative safety cost below some budget [1, 26]. A central challenge is anticipating unsafe outcomes: an action may incur no immediate cost yet move the agent toward future violations. Cost critics address this by estimating accumulated future cost [18, 30], which captures violation magnitude and repeated exposure but does not explicitly isolate when the first cost encounter occurs. Reachability-based safety estimation provides a complementary perspective by explicitly predicting future constraint violations [10] (Yu et al. 2022) instead. Discounted first-hit reachability captures whether a cost will be encountered while assigning greater weight to earlier encounters. We investigate whether this predictive signal can guide policy improvement while cumulative-cost feedback separately regulates the safety budget.

Diffusion policies provide expressive action distributions for continuous control [29, 6] and can be optimized online through value-weighted denoising regression [19]. However, most online diffusion-policy optimization methods focus on reward maximization [32, 23, 24, 19], while incorporating predictive safety information without an explicit dynamics model is relatively underexplored. We therefore propose Reachability-Aware Diffusion Policy Optimization (RADPO), a model-free approach that combines discounted first-hit reachability with cumulative-cost budget feedback.

RADPO learns a discounted first-hit reachability value and uses the predicted reachability of successor states to shape the reward. An adaptive safety multiplier controls the shaping strength according to realized episodic costs relative to the prescribed budget, preserving information about cost magnitudes and repeated violations. The diffusion actor then improves through weighted denoising regression on candidate actions scored by the reward critic. This requires neither a learned dynamics model, action gradients through the critics, nor differentiation through the reverse diffusion sampler. This mechanism guides learning toward safer behavior. Figure 1.A illustrates this behavior in a navigation scenario. SAC-Lag follows a greedier path close to the hazard boundaries and occasionally enters them, whereas RADPO takes a more conservative route with greater clearance.

Figure 1. (A) Evaluation paths obtained from fully trained policies on the same fixed PointGoal1 layout. See Figure 6 for clearance distribution of these paths. (B) Illustrative diagram for the RADPO algorithm.

Our main contributions are:

  • We introduce RADPO, a novel algorithm that combines discounted first-hit reachability with cumulative-cost budget feedback and integrates these signals into online diffusion policy optimization through value-weighted denoising regression.

  • We provide theoretical results for the discounted reachability value, including its first-hit interpretation and bounds relating accumulated reachability to discounted cumulative cost and repeated cost exposure. We further establish finite-candidate mirror-descent guarantees and analyze the safety-multiplier controller’s response to observed budget violations.

  • We evaluate RADPO on ten continuous-control safety tasks, showing competitive reward–cost trade-offs and substantial reductions in constraint violations on several tasks relative to the compared baselines, complemented by design ablations.

Related Work

Constrained reinforcement learning. Safe reinforcement learning is commonly formulated using constrained Markov decision processes (CMDPs), where expected return is maximized subject to cumulative-cost constraints. Some methods ([1, 33, 18, 20] (Zhang et al. 2020)) enforce these constraints through constrained or trust-region policy updates, while primal-dual approaches ([27, 26, 30]) adapt Lagrange multipliers according to observed constraint violations. Beyond changing the policy update itself, other works modify the learned safety signal used by the optimizer; for example, USPC (Demiray et al. [7]) replaces standard cost estimates with uncertainty-aware conservative safety surrogates. RADPO follows a similar approach, but instead introduces a distinct predictive reachability value alongside the cumulative-cost signal: episodic costs adapt the safety multiplier, while reachability shapes the reward used for policy improvement.

Reachability-based safety and control. Reachability analysis attempts to determine whether target or unsafe sets can be reached under a dynamical system. Classical Hamilton-Jacobi (HJ) methods compute backward reachable or viable sets from known dynamics ([21, 3], with subsequent work connecting reachability analysis to learning-based control and reinforcement learning [9, 2, 15]. More recently, λ\lambda-Reachability [4] introduces geometric-horizon Bellman targets that interpolate between discounted local updates and long-horizon max-over-trajectory safety values. In model-free safe RL, RCRL (Yu et al., 2022) learns a reachability-based safety value to characterize feasible states, while RESPO [10] extends this idea to stochastic systems using a learned estimate of future constraint violation. RADPO instead targets a policy-conditional discounted first-hit cost value, assigning greater weight to violations occurring sooner. This predictive signal shapes the reward, while cumulative episodic cost is handled separately through budget feedback.

Online diffusion policy optimization. Several recent methods optimize diffusion policies using online reinforcement learning. DIPO [32] and Q-Score Matching [23] use critic gradients to improve actions or policy scores, respectively. Other approaches optimize a Q-weighted variational objective [8], backpropagate critic gradients through the diffusion sampling process [28], or apply PPO-style policy-gradient optimization to the denoising process [24, 17] (Zou et al. 2026). Most closely related to RADPO, DPMD [19] derives diffusion-policy improvement from policy mirror descent using value-weighted denoising regression, avoiding both critic action gradients and differentiation through the reverse sampler. RADPO builds on this policy-improvement mechanism but evaluates candidate actions using a reward critic learned from rewards shaped by predictive reachability and an adaptive safety multiplier.

Constrained and safety-aware diffusion policies. Safety and constraints have also been incorporated into diffusion-based decision making. Offline methods use cost-conditioned or feasibility-guided trajectory generation [16] (Zheng et al. 2024), while barrier- and constraint-guided planners incorporate safety directly into diffusion sampling or denoising [31, 22] (Zhang et al. 2025). In the online setting, ALGD [5] uses an augmented-Lagrangian energy to guide diffusion-policy optimization under safety costs. Beyond environmental safety, diffusion policies have also been subject to behavior- or trust-region constraints that limit deviation during offline or online optimization [11, 14, 25]. RADPO instead combines fully online model-free diffusion-policy learning with a policy-conditional first-hit signal, separate episodic budget feedback, and value-weighted denoising without critic gradients or reverse-sampler differentiation.

Preliminaries

Constrained Markov Decision Processes We consider a CMDP with states s∈Ss \in\mathcal{S}, actions a∈Aa \in\mathcal{A}, transition kernel P\mathcal{P}, reward rr, nonnegative cost cc, and initial-state distribution ρ0\rho_0. For a policy π\pi, reward discount γ∈[0,1)\gamma\in[0,1), and episode length TT, define

Jr(π)=Eπ[∑t=0T−1γtrt],Jc(π)=Eπ[∑t=0T−1ct].(1)J_r(\pi)=\mathbb{E}_{\pi}\left[\sum_{t=0}^{T-1}\gamma^t r_t\right], \qquad J_c(\pi)=\mathbb{E}_{\pi}\left[\sum_{t=0}^{T-1}c_t\right]. \tag*{(1)}

The objective is to maximize Jr(π)J_r(\pi) subject to Jc(π)≤dJ_c(\pi) \le d, where d>0d > 0 is the episodic budget. A Lagrangian formulation uses J(π,λ)=Jr(π)−λ(Jc(π)−d)\mathcal{J}(\pi,\lambda)=J_r(\pi)-\lambda\left(J_c(\pi)-d\right), λ≥0\lambda\ge0. RADPO instead uses an adaptive safety multiplier to scale predictive reward shaping, instead of directly optimizing J(π,λ)\mathcal{J}(\pi,\lambda).

Diffusion Policies and Policy Mirror Descent A diffusion policy πθ(a∣s)\pi_\theta(a \mid s) generates actions through iterative denoising [12]. We denote its state-conditioned denoising loss by ℓdiff(θ;s,a)\ell_{\mathrm{diff}}(\theta; s,a). Let Q(s,a)Q(s,a) denote the action-value function used for policy improvement. For a reference policy πold\pi_{\mathrm{old}}, KL-regularized πMD(a∣s)=πold(a∣s)exp⁡(Q(s,a)/τ)Z(s)\pi_{\mathrm{MD}}(a \mid s)=\frac{\pi_{\mathrm{old}}(a \mid s)\exp(Q(s,a)/\tau)}{Z(s)}, where τ>0\tau> 0 is the temperature and Z(s)=Ea∼πold[exp⁡(Q(s,a)/τ)]Z(s)=\mathbb{E}_{a\sim\pi_{\mathrm{old}}}[\exp(Q(s,a)/\tau)]. This update motivates value-weighted denoising regression [19]:

LMD(θ)=Es∼μa∼πold(⋅∣s)[exp⁡(Q(s,a)/τ)Z(s)ℓdiff(θ;s,a)],(2)\mathcal{L}_{\mathrm{MD}}(\theta)=\mathbb{E}_{\substack{s\sim\mu\\a\sim\pi_{\mathrm{old}}(\cdot\mid s)}}\left[\frac{\exp(Q(s,a)/\tau)}{Z(s)}\ell_{\mathrm{diff}}(\theta;s,a)\right], \tag*{(2)}

where μ\mu is the state-sampling distribution. Actions and weights are detached during regression, avoiding differentiation through critics or the reverse diffusion sampler.

Discounted Cost Reachability Define the binary cost indicator ht=1{ct>0}h_t = 1\{c_t > 0\}. For a fixed policy π\pi and discount γc∈[0,1)\gamma_c \in[0,1), discounted first-hit reachability satisfies

Vreachπ(st)=Eπ[ht+(1−ht)(1−dt)γcVreachπ(st+1)∣st].(3)V^\pi_{\mathrm{reach}}(s_t) = \mathbb{E}_{\pi}\left[h_t + (1-h_t)(1-d_t)\gamma_c V^\pi_{\mathrm{reach}}(s_{t+1}) \mid s_t\right]. \tag*{(3)}

where dtd_t indicates termination and terminal values are zero. This value weights the first future cost by γc\gamma_c raised to its arrival time, with zero contribution if no cost occurs before termination. It therefore captures both cost likelihood and timing, while remaining distinct from JcJ_c, which counts cost magnitudes and repeated violations.

RADPO combines predictive safety shaping with value-weighted diffusion policy optimization. A learned reachability critic predicts future cost exposure, while an adaptive safety multiplier controls the shaped penalty strength using realized episodic costs. The diffusion actor learns from candidates scored by the resulting reward critic. We describe these components below and describe some theoretical properties. All proofs for theoretical results are provided in Appendix A. A simplified illustrative diagram is available in Figure 1.B and the full pseudocode is available in Appendix § 17.§ 2.

Predictive Safety Shaping

Standard cost critics propagate future violations backward through Bellman updates, thus safe states leading to unsafe outcomes can already receive high predicted cost. However, cumulative cost does not explicitly distinguish how soon the next cost may be incurred. RADPO instead shapes the reward using discounted first-hit reachability, which is higher when constraint violation is more likely or expected to occur sooner. Repeatedly applying this penalty along the trajectory can thus discourage behavior that approaches violations, even when the immediate cost is zero.

We learn an ensemble of bounded reachability critics Vreach,m(s)∈[0,1]V_{\mathrm{reach},m}(s) \in[0,1], m=1,…,Mm = 1,\ldots,M. For a replay transition (st,at,rt,ct,st+1,dt)(s_t, a_t, r_t, c_t, s_{t+1}, d_t), each head minimizes binary cross entropy against the target

yt,mc=ht+(1−ht)(1−dt)γcV‾reach,m(st+1),(4)y^c_{t,m} = h_t + (1-h_t)(1-d_t)\gamma_c\overline{V}_{\mathrm{reach},m}(s_{t+1}), \tag*{(4)}

where V‾reach,m\overline{V}_{\mathrm{reach},m} denotes its target network and ht=1{ct>0}h_t = 1\{c_t > 0\}. The following proposition describes the exact fixed-policy value counterpart of this update.

Proposition 1 (First-hit interpretation). Fix a stationary policy π\pi and 0<γc<10 < \gamma_c < 1. Let

τH=inf⁡{k≥0:hk=1},inf⁡∅:=∞,\tau_H = \inf\{k \ge0 : h_k = 1\}, \qquad\inf\varnothing:= \infty,

and let τend∈N∪{∞}\tau_{\mathrm{end}} \in\mathbb{N} \cup\{\infty\} denote the number of transitions before termination, with τend=∞\tau_{\mathrm{end}} = \infty for a nonterminating trajectory. Then the unique bounded fixed point of Equation (3) satisfies 0≤Vreachπ(s)≤10 \le V^\pi_{\mathrm{reach}}(s) \le1 and is

Vreachπ(s)=Esπ[γcτH1{τH<τend}].(5)V^\pi_{\mathrm{reach}}(s) = \mathbb{E}^{\pi}_{s}\left[\gamma_c^{\tau_H}1\{\tau_H < \tau_{\mathrm{end}}\}\right]. \tag*{(5)}

Proposition 1 shows that discounted first-hit reachability combines the likelihood and timing of a future constraint violation. A smaller value can reflect either a lower violation probability or a more distant violation. The proof is given in Appendix A.1.

The shaping signal uses the online ensemble mean Vreach(s)=1M∑m=1MVreach,m(s)V_{\mathrm{reach}}(s) = \frac{1}{M}\sum_{m=1}^{M} V_{\mathrm{reach},m}(s):

r~t=rt−βλVreach(st+1),(6)\widetilde{r}_t = r_t - \beta\lambda V_{\mathrm{reach}}(s_{t+1}), \tag*{(6)}

where β>0\beta> 0 is a fixed shaping coefficient, and λ≥0\lambda\ge0 is the adaptive safety multiplier (§ 6). Twin reward critics are trained against

ytr=r~t+(1−dt)γQr−(st+1,at+1),(7)y^r_t = \widetilde{r}_t + (1-d_t)\gamma Q^-_r(s_{t+1}, a_{t+1}), \tag*{(7)}

where Qr−(s,a)=min⁡j∈{1,2}Qr,j−(s,a)Q^-_r(s,a) = \min_{j\in\{1,2\}} Q^-_{r,j}(s,a) and at+1a_{t+1} denotes the bootstrap action. The actor uses no separate cost term in its reweighting logits; safety is incorporated through the shaped reward.

Relation to cumulative cost. To understand how reachability shaping relates to the original safety objective, consider exact evaluation under a fixed policy π\pi. Define accumulated reachability and discounted cumulative cost:

Gγ,γcπ(s,a)=Es,aπ[∑k≥0γkVreachπ(St+k+1)],Qcπ,δ(s,a)=Es,aπ[∑k≥0δkct+k],0<δ<1,(8)G^{\pi}_{\gamma,\gamma_c}(s,a)=\mathbb{E}^{\pi}_{s,a}\left[\sum_{k\ge0}\gamma^k V^{\pi}_{\mathrm{reach}}(S_{t+k+1})\right],\quad Q^{\pi,\delta}_{c}(s,a)=\mathbb{E}^{\pi}_{s,a}\left[\sum_{k\ge0}\delta^k c_{t+k}\right],\quad0<\delta<1, \tag*{(8)}

with zero continuation after termination.

Theorem 1 (Conservative cumulative-cost surrogate). Assume 0≤ct≤cmax⁡ht0\le c_t\le c_{\max}h_t, with cmax⁡>0c_{\max}>0, and δ≤γ<1\delta\le\gamma<1. Then

Qcπ,δ(s,a)≤E[ct∣s,a]+cmax⁡δGγ,γcπ(s,a).(9)Q^{\pi,\delta}_{c}(s,a)\le\mathbb{E}[c_t\mid s,a]+c_{\max}\delta G^{\pi}_{\gamma,\gamma_c}(s,a). \tag*{(9)}

If ct=0c_t=0 almost surely for the initial (s,a)(s,a), then

Gγ,γcπ(s,a)≥Qcπ,δ(s,a)cmax⁡δ.(10)G^{\pi}_{\gamma,\gamma_c}(s,a)\ge\frac{Q^{\pi,\delta}_{c}(s,a)}{c_{\max}\delta}. \tag*{(10)}

Theorem 1 shows that, after separating the immediate cost, the accumulated reachability signal provides a conservative surrogate for future discounted cumulative cost: a large future cost must be accompanied by a correspondingly large accumulated reachability penalty, up to a fixed factor. When ct=0c_t=0, we obtain a bound relating Gγ,γcπG^{\pi}_{\gamma,\gamma_c} with Qcπ,δQ^{\pi,\delta}_{c}. Consequently, reachability can also assign predictive penalties to safe predecessor states before the cost is incurred. The proof is in Appendix A.2.

Each reachability value depends only on the first subsequent cost, but RADPO applies this signal repeatedly along the trajectory. To show how this relates to repeated cost exposure, let

Dhπ,+(s,a)=Es,aπ[∑k≥1γk−1ht+k].(11)D^{\pi,+}_{h}(s,a)=\mathbb{E}^{\pi}_{s,a}\left[\sum_{k\ge1}\gamma^{k-1}h_{t+k}\right]. \tag*{(11)}

Corollary 1 (Repeated cost exposure). If 0≤γc<γ<10\le\gamma_c<\gamma<1, then

Dhπ,+(s,a)≤Gγ,γcπ(s,a)≤Dhπ,+(s,a)1−γc/γ.(12)D^{\pi,+}_{h}(s,a)\le G^{\pi}_{\gamma,\gamma_c}(s,a)\le\frac{D^{\pi,+}_{h}(s,a)}{1-\gamma_c/\gamma}. \tag*{(12)}

Corollary 1 shows that accumulated reachability is bounded above and below by discounted repeated cost exposure, up to a fixed scaling factor. Thus, although each reachability value is first-hit, repeatedly applying it preserves sensitivity to multiple future violations. Its proof is in Appendix A.3.

Diffusion Policy Improvement by Candidate Reweighting

Critic regression uses replay state-action pairs, whereas actor targets are generated at replay next states s′s'. For each s′s', we sample KK candidates aˉi∼πθ(⋅∣s′)\bar{a}_i\sim\pi_\theta(\cdot\mid s') and perturb them before scoring, i.e. ai=ΠA(aˉi+ϵi)a_i=\Pi_{\mathcal{A}}(\bar{a}_i+\epsilon_i), ϵi∼N(0,σexp2I)\epsilon_i\sim\mathcal{N}(0,\sigma_{\mathrm{exp}}^2I), where ΠA\Pi_{\mathcal{A}} clips actions to their bounds. The exploration scale is σexp=σ0exp⁡(ξ)\sigma_{\mathrm{exp}}=\sigma_0\exp(\xi), with fixed σ0\sigma_0 and a learned log-scale ξ\xi adapted toward a target Gaussian entropy.

Candidates receive scores qi=min⁡j∈{1,2}Qr,j(s′,ai)q_i=\min_{j\in\{1,2\}}Q_{r,j}(s',a_i). Let qˉ=1K∑iqi\bar{q}=\frac{1}{K}\sum_iq_i and σ=max⁡(σA,10−6)\sigma=\max(\sigma_A,10^{-6}), where σA\sigma_A is the advantage-normalization scale. We center, normalize, and clip the scores: zi=clip⁡(qi−qˉσ,−3,3)z_i=\operatorname{clip}\left(\frac{q_i-\bar{q}}{\sigma},-3,3\right), A^i=zi/τ\hat{A}_i=z_i/\tau, where τ>0\tau>0 controls the reweighting strength. The regression weights are wi=Kexp⁡(A^i)∑jexp⁡(A^j)w_i=K\frac{\exp(\hat{A}_i)}{\sum_j\exp(\hat{A}_j)}, 1K∑iwi=1\frac{1}{K}\sum_iw_i=1. The actor minimizes the weighted denoising objective

Lπ(θ)=E[1K∑i=1Kwiℓdiff(θ;s′,ai)],(13)\mathcal{L}_{\pi}(\theta)=\mathbb{E}\left[\frac{1}{K}\sum_{i=1}^{K}w_i\ell_{\mathrm{diff}}(\theta;s',a_i)\right], \tag*{(13)}

where the expectation covers replay successor states and candidate generation. Candidates and weights are detached, thus the update requires neither action gradients through critics nor differentiation through the reverse diffusion sampler.

Finite-candidate improvement. Building on the policy-mirror-descent interpretation underlying DPMD [19], we describe the finite-candidate reweighting used by RADPO. Although the subsequent diffusion regression is approximate, candidate reweighting step itself admits a mirror-descent interpretation over the sampled actions.

Theorem 2 (Finite-candidate mirror descent). For a fixed candidate set, let pi=wi/Kp_i = w_i/K, ui=1/Ku_i = 1/K, and let ΔK\Delta_K denote the probability simplex. Then

p=arg⁡max⁡v∈ΔK{∑ivizi−τDKL(v∥u)}.(14)p = \underset{v \in\Delta_K}{\arg\max}\left\{\sum_i v_i z_i - \tau D_{\mathrm{KL}}(v\mathbin\Vert u)\right\}. \tag*{(14)}

Moreover,

∑ipiqi−1K∑iqi≥τσ[DKL(p∥u)+DKL(u∥p)]≥0.(15)\sum_i p_i q_i - \frac{1}{K}\sum_i q_i \ge\tau\sigma\left[D_{\mathrm{KL}}(p\mathbin\Vert u) + D_{\mathrm{KL}}(u\mathbin\Vert p)\right] \ge0. \tag*{(15)}

Theorem 2 shows that the weights implement a KL-regularized mirror-descent update over the sampled candidates, starting from uniform weights. Moreover, despite normalization and clipping of the scores used to compute the weights, reweighted candidates cannot have a lower mean reward-critic score than the original candidate set. Safety affects this improvement through the reward critic, which is trained on the reachability-shaped reward. The proof is given in Appendix § 12.4.

Adaptive Safety Multiplier

The reachability signal predicts first-hit cost exposure, while the safety-multiplier controller uses the original undiscounted episodic costs, including their magnitudes and repeated violations. Let J^c\hat{J}_c denote a recent-window estimate of episodic cost constructed from completed training episodes, as detailed in Appendix § 17.§ 1. The safety multiplier follows the projected update

λ←Π[0,λmax⁡][λ+ηλJ^c−dd],(16)\lambda\leftarrow\Pi_{[0,\lambda_{\max}]}\left[\lambda+ \eta_\lambda\frac{\hat{J}_c - d}{d}\right], \tag*{(16)}

where ηλ>0\eta_\lambda> 0 is the controller step size. The multiplier increases when observed cost exceeds the budget and decreases below budget, subject to projection.

Budget-tracking property. The controller admits a pathwise bound on the average episodic-cost statistic supplied to it, without requiring convergence of the actor or critics.

Proposition 2 (Average observed-budget tracking). Let λ0∈[0,λmax⁡]\lambda_0 \in[0,\lambda_{\max}] and let J^c,j\hat{J}_{c,j} denote the controller statistic at safety-multiplier update jj. If upper clipping remains inactive for the first NN updates, then

1N∑j=0N−1J^c,j≤d+d(λmax⁡−λ0)ηλN.(17)\frac{1}{N}\sum_{j=0}^{N-1}\hat{J}_{c,j} \le d + \frac{d(\lambda_{\max}-\lambda_0)}{\eta_\lambda N}. \tag*{(17)}

If upper clipping remains inactive for all updates, then

lim sup⁡N→∞1N∑j=0N−1J^c,j≤d.(18)\limsup_{N\to\infty}\frac{1}{N}\sum_{j=0}^{N-1}\hat{J}_{c,j} \le d. \tag*{(18)}

Proposition 2 shows that, as long as the upper bound is not active, sustained average budget violations cannot persist: the average controller statistic exceeds dd by at most an O(1/N)O(1/N) term and is asymptotically no greater than dd. Note that this result applies only to the statistic supplied to the controller and does not imply per-policy or per-episode feasibility. The proof and the corresponding bound when upper clipping occurs are given in Appendix § 12.§ 7.

Experiments

Experimental Setup

We evaluate RADPO on ten continuous-control safety tasks in Safety Gymnasium [13] against CAL [30], SAC-Lag, PPO-Lag, RESPO [10], ALGD Cheng et al., 2026)2 and an unconstrained reward-only RADPO ablation. The experimental protocol evaluates six random seeds per configuration. The episodic cost budget is set to d=25d = 25, except for RESPO, which still enforces a zero-cost threshold by its formulation but is included as a hard-safety baseline. We report the mean and standard deviation of episodic return and episodic cost across seeds. The full list of hyperparameters is available in Appendix § 19.

Main Results

Figure 2 shows that RADPO substantially reduces constraint violations relative to reward-only RADPO while maintaining competitive returns, especially on the navigation tasks. The reward-only variant attains high returns but generally incurs severe constraint violations. Figure 3 summarizes the corresponding late-training reward–cost trade-offs. RADPO achieves both higher mean return and lower mean cost than the evaluated baselines on the two Circle tasks, and the highest mean return on both Goal tasks. On the Velocity tasks, RADPO is non-dominated on HalfCheetah, Humanoid, Swimmer, and Walker2d, while baselines attain better operating points on Ant and Hopper. Overall, RADPO provides favorable trade-offs across most evaluated tasks.

Training performance across ten continuous-control safety tasks

Figure 2. Training performance across ten continuous-control safety tasks. Episodic return (top rows) and episodic cost (bottom rows) for RADPO and baseline methods. Curves show empirical means across six random seeds; shaded regions denote one standard deviation. Dashed horizontal lines indicate the safety budget d=25d = 25.

Late-training return versus safety cost

Figure 3. Late-training return versus safety cost. Markers indicate mean performance across seeds, computed over the final ten logged training points per run. Error bars represent one standard deviation across seed averages. Optimal performance lies toward the top-left quadrant (high return, low cost). Vertical dashed lines denote the budget d=25d = 25 and the shaded region is infeasible.

Ablation Studies

We investigate two key design decisions in adapting diffusion policies to safe reinforcement learning: the choice of safety signal and the structural placement of the safety penalty. Using CarGoal1, PointCircle1, and HalfCheetah, we compare RADPO against three ablations: (1) replacing reachability estimation with a standard discounted cost critic, (2) applying cost-only reward shaping, and (3) enforcing a Lagrangian safety penalty directly within candidate action weights. Additional ablation studies for hyperparameter values are available in Appendix § 14.

Safety-signal formulation. On CarGoal1, RADPO recovers target task returns while maintaining asymptotic costs close to the constraint boundary. Cost-only shaping yields higher returns but consistently breaches the safety limit, whereas discounted cost estimates result in worse returns and elevated violation rates. On PointCircle1, all three variants reach comparable asymptotic returns, but RADPO maintains lower late-training violation rates. On HalfCheetah, RADPO enforces the most conservative behavior, achieving the lowest cost among all variants at the expense of peak return. These results indicate that predictive reachability shaping offers an effective middle ground on obstacle avoidance tasks and robust constraint satisfaction in high-dimensional locomotion.

Penalty placement in diffusion optimization. Penalizing candidate action weights directly via Lagrangian multipliers causes severe optimization instability: returns plummet sharply before partially recovering on CarGoal1, and drop permanently on PointCircle1. In contrast, incorporating safety into reward shaping stabilizes policy learning, yielding superior returns and tighter constraint adherence across both domains. On HalfCheetah, candidate-weight penalization preserves higher returns while operating near the constraint boundary.

Discussion

Reachability interpretation. RADPO uses reachability as a policy-conditional prediction of cost exposure rather than as a certificate that costs can be avoided under an optimal controller. Proposition 1 shows that the value combines the probability of a positive-cost event with the timing of its first occurrence. Consequently, a smaller value can indicate either a less likely or a later violation, and should not be interpreted as an undiscounted violation probability. The discount γc\gamma_c controls this temporal emphasis. RADPO therefore uses reachability as a predictive learning signal rather than as a safety certificate, since such guarantees would generally require additional assumptions in the model-free setting.

Separating reachability and budget feedback. A first-hit value does not encode violation severity or the number of subsequent violations, hence it cannot directly represent an episodic cost budget. RADPO instead uses the original episodic costs to adapt λ\lambda, while reachability determines the predictive penalty used to shape the reward. Repeated shaping nevertheless remains sensitive to repeated exposure: Equation (21) decomposes accumulated reachability into discounted cost exposure and an additional nonnegative predictive term assigned to safe predecessor states. Theorem 1 and Corollary 1 further relate this accumulated signal to cumulative cost and repeated violations under exact policy evaluation. Budget feedback adjusts the strength of this surrogate but does not recover the cost-magnitude information discarded by binarization. Because λ\lambda is updated from episodic cost but scales a reachability-based surrogate, it acts as a feedback multiplier rather than as a standard dual variable for the actor’s objective.

Constraint structure and predictive reachability. We expect reachability shaping to be most useful when violations can be anticipated and avoided before cost is incurred, as in localized obstacle avoidance. In such settings, first-hit risk can distinguish trajectories that approach costs from those that maintain greater clearance, even when both have low immediate cost. The behavior in Figure 1 is consistent with this interpretation. Its benefit may diminish when unsafe behavior persists for many steps, thus cumulative cost already provides a strong signal, or when safety directly conflicts with reward. The stronger CarGoal1 benefit and the smaller HalfCheetah effect in Figure 4 are consistent with this hypothesis.

Figure 4. Ablations on safety-signal formulation and penalty placement. Training return (top) and episodic cost (bottom). Curves depict means across evaluated seeds with one standard deviation shaded. Solid lines show smoothing over raw trajectories (faint curves). Inset axes provide magnified views around the cost budget d=25d = 25.

Limitations. Our theoretical analysis establishes properties of individual RADPO components rather than an end-to-end feasibility result. Such a result would require stronger assumptions, for example on function approximation, data coverage, and optimization convergence, than we make here for RADPO. In particular, the reachability analysis assumes exact fixed-policy evaluation, whereas the implemented state-only reachability critic is deliberately trained from replay for off-policy data reuse, so its population target reflects the replay behavior mixture rather than exactly the current policy. Likewise, the candidate-improvement guarantee applies before approximate diffusion regression, and the multiplier bound applies only to the observed cost statistic. Reachability remains a surrogate rather than an exact representation of the CMDP cost. Successor-state shaping does not directly penalize the current transition cost, and first-hit shaping changes the temporal weighting of violations. For nonbinary costs, ht=1{ct>0}h_t = 1\{c_t > 0\} also discards magnitude information, although per-step costs are binary in all ten tasks considered here. Finally, budget regulation is indirect: episodic cost adjusts λ\lambda, which scales reachability shaping and influences the policy only through subsequent critic and actor updates. Transient violations and sensitivity to the controller timescale or multiplier cap can therefore still occur, as in primal-dual methods.

Conclusion

We introduced Reachability-Aware Diffusion Policy Optimization (RADPO), a model-free approach to the relatively unexplored setting of safe online diffusion-policy optimization under cumulative-cost constraints. RADPO combines predictive first-hit reachability with episodic budget feedback, while retaining candidate reweighting without dynamics models, critic action gradients, or reverse-process differentiation. Our theoretical analysis relates accumulated reachability to cumulative cost and repeated violations, and our experiments show substantial reductions in constraint violations on several tasks while maintaining competitive returns.

AI Use Statement

We used Generative AI tools to assist with parts of the conceptual and methodological development, mathematical claim formulation and refinement, and proof development and writing, as well as with experimental-design feedback and software implementation and debugging. In addition, they were used for literature search and summarization, manuscript drafting, and editing for typos, clarity and structure. AI tools were not used to propose or refine research hypotheses, interpret experimental results, generate, clean, or reformat datasets, perform translation, or conduct qualitative or thematic data analysis. All AI-assisted content, including mathematical arguments, code, and citations, was reviewed and verified by the authors. We take responsibility for the final content of our work.

Reproducibility Statement

Complete proofs of the theoretical results are provided in Appendix A. Task definitions are given in Appendix B, algorithmic and implementation details in Appendix F, and the complete experimental protocols, hyperparameters, baseline adaptations, and ablation configurations in Appendix H. We additionally provide the code used for the experiments as supplementary material.

Theoretical Analysis

Discounted reachability as a stopping-time value

For a fixed policy π\pi, define the Bellman operator

(TπU)(s):=Eπ[h0+(1−h0)(1−d0)γcU(S1)∣S0=s].(19)(\mathcal{T}^{\pi}U)(s) := \mathbb{E}_{\pi}\left[h_0 + (1-h_0)(1-d_0)\gamma_c U(S_1) \mid S_0=s\right]. \tag*{(19)}

Lemma 1 (Contraction). For 0≤γc<10 \le\gamma_c < 1,

∥TπU−TπW∥∞≤γc∥U−W∥∞.\lVert\mathcal{T}^{\pi}U-\mathcal{T}^{\pi}W\rVert_{\infty}\le\gamma_c\lVert U-W\rVert_{\infty}.

Proof. For every state ss,

∣(TπU)(s)−(TπW)(s)∣=γc∣Eπ[(1−h0)(1−d0)(U(S1)−W(S1))∣S0=s]∣≤γcEπ[∣U(S1)−W(S1)∣∣S0=s]≤γc∥U−W∥∞.\begin{aligned} \left|(\mathcal{T}^{\pi}U)(s)-(\mathcal{T}^{\pi}W)(s)\right| &=\gamma_c\left|\mathbb{E}_{\pi}\left[(1-h_0)(1-d_0)(U(S_1)-W(S_1))\mid S_0=s\right]\right|\\ &\le\gamma_c\mathbb{E}_{\pi}\left[\left|U(S_1)-W(S_1)\right|\mid S_0=s\right]\\ &\le\gamma_c\lVert U-W\rVert_{\infty}. \end{aligned}

Taking the supremum over ss proves the claim. Since γc<1\gamma_c<1, the operator is a contraction and therefore admits a unique bounded fixed point.

Proof of Proposition 1. By Lemma 1, Tπ\mathcal{T}^{\pi} has a unique bounded fixed point. Moreover, Tπ\mathcal{T}^{\pi} maps functions with values in [0,1][0,1] to functions with values in [0,1][0,1]. Iterating from the zero function therefore shows that

0≤Vreachπ(s)≤1.0\le V_{\mathrm{reach}}^{\pi}(s)\le1.

Unrolling (3) for nn transitions gives

Vreachπ(s)=Esπ[∑k=0n−1γckhk∏j=0k−1(1−hj)(1−dj)+γcnVreachπ(Sn)∏j=0n−1(1−hj)(1−dj)].V_{\mathrm{reach}}^{\pi}(s)=\mathbb{E}_{s}^{\pi}\left[\sum_{k=0}^{n-1}\gamma_c^k h_k\prod_{j=0}^{k-1}(1-h_j)(1-d_j)+\gamma_c^nV_{\mathrm{reach}}^{\pi}(S_n)\prod_{j=0}^{n-1}(1-h_j)(1-d_j)\right].

The absolute value of the final term is bounded by

γcn∥Vreachπ∥∞.\gamma_c^n\lVert V_{\mathrm{reach}}^{\pi}\rVert_{\infty}.

which converges to zero as n→∞n \to\infty because 0<γc<10 < \gamma_c < 1. Hence

Vreachπ(s)=Esπ[∑k≥0γckhk∏j=0k−1(1−hj)(1−dj)].V_{\mathrm{reach}}^{\pi}(s)=\mathbb{E}_{s}^{\pi}\left[\sum_{k\geq0}\gamma_c^k h_k\prod_{j=0}^{k-1}(1-h_j)(1-d_j)\right].

On any realized trajectory, if the first cost occurs at transition τH=k<τend\tau_H=k<\tau_{\mathrm{end}}, then all terms vanish except the one at kk, which equals γck\gamma_c^k. If no cost occurs before termination, or if neither a cost nor termination ever occurs, every first-hit term is zero. Therefore

Vreachπ(s)=Esπ[γcτH1{τH<τend}].V_{\mathrm{reach}}^{\pi}(s)=\mathbb{E}_{s}^{\pi}\left[\gamma_c^{\tau_H}\mathbf{1}\{\tau_H<\tau_{\mathrm{end}}\}\right].

For the random-horizon interpretation, let LγcL_{\gamma_c} be independent of the trajectory with

Pr⁡(Lγc=ℓ)=(1−γc)γcℓ,ℓ=0,1,2,….\Pr(L_{\gamma_c}=\ell)=(1-\gamma_c)\gamma_c^\ell,\qquad\ell=0,1,2,\ldots.

Then

Pr⁡(Lγc≥k)=γck.\Pr(L_{\gamma_c}\geq k)=\gamma_c^k.

Conditioning on τH=k\tau_H=k therefore gives

Pr⁡sπ(τH≤Lγc,τH<τend)=∑k≥0Pr⁡sπ(τH=k,τH<τend)Pr⁡(Lγc≥k)=∑k≥0γckPr⁡sπ(τH=k,τH<τend)=Vreachπ(s).\begin{aligned} \Pr_{s}^{\pi}(\tau_H\leq L_{\gamma_c},\tau_H<\tau_{\mathrm{end}}) &=\sum_{k\geq0}\Pr_{s}^{\pi}(\tau_H=k,\tau_H<\tau_{\mathrm{end}})\Pr(L_{\gamma_c}\geq k)\\ &=\sum_{k\geq0}\gamma_c^k\Pr_{s}^{\pi}(\tau_H=k,\tau_H<\tau_{\mathrm{end}})\\ &=V_{\mathrm{reach}}^{\pi}(s). \end{aligned}

Lemma 2 (Population consistency under fixed-policy sampling). Fix a stationary policy π\pi and a target function Vˉ:S→[0,1]\bar{V}:S\to[0,1]. Suppose that, conditional on St=sS_t=s, the transition (At,ht,dt,St+1)(A_t,h_t,d_t,S_{t+1}) is generated under policy π\pi and the environment dynamics. Define

Y:=ht+(1−ht)(1−dt)γcVˉ(St+1).Y:=h_t+(1-h_t)(1-d_t)\gamma_c\bar{V}(S_{t+1}).

For a fixed state ss, the minimizer of the conditional population binary-cross-entropy loss

Eπ[−Ylog⁡v−(1−Y)log⁡(1−v)∣St=s]\mathbb{E}_{\pi}[-Y\log v-(1-Y)\log(1-v)\mid S_t=s]

is

v∗(s)=Eπ[Y∣St=s]=(TπVˉ)(s).v^*(s)=\mathbb{E}_{\pi}[Y\mid S_t=s]=(T^{\pi}\bar{V})(s).

Proof. Let

m(s):=Eπ[Y∣St=s].m(s):=\mathbb{E}_{\pi}[Y\mid S_t=s].

Linearity of expectation gives

Ls(v)=−mlog⁡v−(1−m)log⁡(1−v).L_s(v)=-m\log v-(1-m)\log(1-v).

Subtracting the value at v=mv=m,

Ls(v)−Ls(m)=DKL(Ber⁡(m)∥Ber⁡(v))≥0.L_s(v)-L_s(m)=D_{\mathrm{KL}}(\operatorname{Ber}(m)\Vert\operatorname{Ber}(v))\geq0.

Hence the population minimizer is v=mv=m. Under the fixed-policy sampling assumption of the lemma, m(s)=(TπVˉ)(s)m(s)=(T^{\pi}\bar{V})(s) by Equation (19).

Off-policy replay. Lemma 2 explains population regression under fixed-policy sampling. RADPO instead trains the state-only reachability critic from replay, consistent with its off-policy backbone. Let βD(a∣s)\beta_D(a\mid s) denote the effective conditional behavior distribution represented in the replay buffer. For fixed Vˉ\bar{V}, the same BCE argument gives

vD∗(s)=ED[Y∣St=s]=(TβDVˉ)(s),v_D^*(s)=\mathbb{E}_{D}[Y\mid S_t=s]=(T^{\beta_D}\bar{V})(s),

which generally differs from (TπVˉ)(s)(T^{\pi}\bar{V})(s) for the current policy. This is a deliberate trade-off: replay permits reuse of safety transitions and retains previously observed cost encounters that may become sparse as the policy improves. Since RADPO uses VreachV_{\mathrm{reach}} as a predictive shaping signal rather than as a safety certificate, the implementation favors this data reuse over exact on-policy evaluation. The resulting discrepancy should therefore be viewed as replay-distribution approximation error.

Conservative relation to cumulative cost

Proof of Theorem 1. Start from the cumulative cost value:

Qcπ,δ(s,a)=E[ct∣s,a]+∑k≥1δkE[ct+k∣s,a].Q_c^{\pi,\delta}(s,a)=\mathbb{E}[c_t\mid s,a]+\sum_{k\geq1}\delta^k\mathbb{E}[c_{t+k}\mid s,a].

Because

0≤ct+k≤cmax⁡ht+k,0\leq c_{t+k}\leq c_{\max}h_{t+k},

we obtain

Qcπ,δ(s,a)≤E[ct∣s,a]+cmax⁡∑k≥1δkE[ht+k∣s,a].(20)Q_c^{\pi,\delta}(s,a)\leq\mathbb{E}[c_t\mid s,a]+c_{\max}\sum_{k\geq1}\delta^k\mathbb{E}[h_{t+k}\mid s,a]. \tag*{(20)}

The reachability Bellman equation implies

Vreachπ(s)≥E[ht∣St=s],V_{\mathrm{reach}}^\pi(s)\geq\mathbb{E}[h_t\mid S_t=s],

because its continuation term is nonnegative. Applying the tower property,

E[Vreachπ(St+k)∣s,a]≥E[ht+k∣s,a].\mathbb{E}\left[V_{\mathrm{reach}}^\pi(S_{t+k})\mid s,a\right]\geq\mathbb{E}[h_{t+k}\mid s,a].

Furthermore, δ≤γ\delta\leq\gamma implies, for k≥1k\geq1,

δk=δδk−1≤δγk−1.\delta^k=\delta\delta^{k-1}\leq\delta\gamma^{k-1}.

Hence

∑k≥1δkE[ht+k∣s,a]≤δ∑k≥1γk−1E[Vreachπ(St+k)∣s,a]=δGγ,γcπ(s,a).\begin{aligned} \sum_{k\geq1}\delta^k\mathbb{E}[h_{t+k}\mid s,a] &\leq\delta\sum_{k\geq1}\gamma^{k-1}\mathbb{E}\left[V_{\mathrm{reach}}^\pi(S_{t+k})\mid s,a\right]\\ &=\delta G_{\gamma,\gamma_c}^\pi(s,a). \end{aligned}

Substituting into (20) proves (9).

If ct=0c_t=0 almost surely under (s,a)(s,a), the immediate term vanishes and (10) follows by rearranging. □

The source of the additional conservatism can be made explicit. Applying the reachability Bellman equation yields

Gγ,γcπ(s,a)=Dhπ,+(s,a)+γcPpredπ(s,a).(21)G_{\gamma,\gamma_c}^\pi(s,a)=D_h^{\pi,+}(s,a)+\gamma_cP_{\mathrm{pred}}^\pi(s,a). \tag*{(21)}
Ppredπ(s,a):=Es,aπ[∑k≥0γk(1−ht+k+1)(1−dt+k+1)Vreachπ(St+k+2)]≥0.P_{\mathrm{pred}}^\pi(s,a):=\mathbb{E}_{s,a}^\pi\left[\sum_{k\geq0}\gamma^k(1-h_{t+k+1})(1-d_{t+k+1})V_{\mathrm{reach}}^\pi(S_{t+k+2})\right]\geq0.

Thus the difference between accumulated reachability and immediate discounted cost exposure consists of a nonnegative predictive term assigned to safe predecessor states.

Repeated cost exposure

Proof of Corollary 1. From the reachability Bellman recursion,

Vreachπ(St+k)≥E[ht+k∣St+k].V_{\mathrm{reach}}^\pi(S_{t+k})\geq\mathbb{E}[h_{t+k}\mid S_{t+k}].

Taking conditional expectation from the initial (s,a)(s,a), multiplying by the corresponding powers of γ\gamma, and summing gives

Gγ,γcπ(s,a)≥Dhπ,+(s,a).G_{\gamma,\gamma_c}^\pi(s,a)\geq D_h^{\pi,+}(s,a).

For the upper bound, first-hit reachability is pathwise bounded by the discounted sum of all future costs:

Vreachπ(Sn)≤E[∑j≥0γcjhn+j∣Sn].V_{\mathrm{reach}}^\pi(S_n)\leq\mathbb{E}\left[\left.\sum_{j\geq0}\gamma_c^j h_{n+j}\right|S_n\right].

Therefore

Gγ,γcπ(s,a)≤∑k≥0∑j≥0γkγcjEs,aπ[ht+k+1+j].G^{\pi}_{\gamma,\gamma_c}(s,a) \le\sum_{k\ge0}\sum_{j\ge0}\gamma^k\gamma_c^j\mathbb{E}^{\pi}_{s,a}[h_{t+k+1+j}].

Set u=k+1+ju=k+1+j. For each fixed u≥1u\ge1, the coefficient multiplying E[ht+u]\mathbb{E}[h_{t+u}] is

∑j=0u−1γu−1−jγcj=γu−1∑j=0u−1(γcγ)j.\sum_{j=0}^{u-1}\gamma^{u-1-j}\gamma_c^j=\gamma^{u-1}\sum_{j=0}^{u-1}\left(\frac{\gamma_c}{\gamma}\right)^j.

Since γc<γ\gamma_c<\gamma,

∑j=0u−1(γcγ)j≤11−γc/γ.\sum_{j=0}^{u-1}\left(\frac{\gamma_c}{\gamma}\right)^j\le\frac{1}{1-\gamma_c/\gamma}.

Hence

Gγ,γcπ(s,a)≤11−γc/γDhπ,+(s,a),G^{\pi}_{\gamma,\gamma_c}(s,a)\le\frac{1}{1-\gamma_c/\gamma}D^{\pi,+}_h(s,a),

which proves the result.

Finite-candidate mirror descent

Lemma 3 (Empirical Gibbs variational identity). Let

pi=exp⁡(zi/τ)∑jexp⁡(zj/τ),ui=1K.p_i=\frac{\exp(z_i/\tau)}{\sum_j\exp(z_j/\tau)},\qquad u_i=\frac{1}{K}.

Then

p=arg⁡max⁡v∈ΔK{⟨v,z⟩−τDKL(v∥u)},p=\underset{v\in\Delta_K}{\arg\max}\{\langle v,z\rangle-\tau D_{\mathrm{KL}}(v\|u)\},

and

⟨p−u,z⟩=τ[DKL(p∥u)+DKL(u∥p)].\langle p-u,z\rangle=\tau[D_{\mathrm{KL}}(p\|u)+D_{\mathrm{KL}}(u\|p)].

Proof. Let

Zu:=1K∑iexp⁡(zi/τ).Z_u:=\frac{1}{K}\sum_i\exp(z_i/\tau).

Then

pi=uiexp⁡(zi/τ)Zu,p_i=\frac{u_i\exp(z_i/\tau)}{Z_u},

so

log⁡piui=ziτ−log⁡Zu.\log\frac{p_i}{u_i}=\frac{z_i}{\tau}-\log Z_u.

For arbitrary v∈ΔKv\in\Delta_K,

DKL(v∥p)=DKL(v∥u)−1τ⟨v,z⟩+log⁡Zu.D_{\mathrm{KL}}(v\|p)=D_{\mathrm{KL}}(v\|u)-\frac{1}{\tau}\langle v,z\rangle+\log Z_u.

Rearranging,

⟨v,z⟩−τDKL(v∥u)=τlog⁡Zu−τDKL(v∥p),\langle v,z\rangle-\tau D_{\mathrm{KL}}(v\|u)=\tau\log Z_u-\tau D_{\mathrm{KL}}(v\|p),

which is uniquely maximized at v=pv=p.

Moreover,

DKL(p∥u)+DKL(u∥p)=∑i(pi−ui)log⁡piui=1τ∑i(pi−ui)zi,\begin{aligned} D_{\mathrm{KL}}(p\|u)+D_{\mathrm{KL}}(u\|p) &=\sum_i(p_i-u_i)\log\frac{p_i}{u_i}\\ &=\frac{1}{\tau}\sum_i(p_i-u_i)z_i, \end{aligned}

because ∑i(pi−ui)=0\sum_i(p_i-u_i)=0.

Proof of Theorem 2. The first statement follows directly from Lemma 3. For the raw-QQ bound, define

σ:=max⁡(σA,10−6),Ri:=qi−σzi.\sigma:= \max(\sigma_A,10^{-6}), \qquad R_i := q_i-\sigma z_i.

Then

qi=σzi+Ri.q_i=\sigma z_i+R_i.

For fixed qˉ\bar{q}, the scalar function

R(q)=q−σclip⁡(q−qˉσ,−3,3)R(q)=q-\sigma\operatorname{clip}\left(\frac{q-\bar{q}}{\sigma},-3,3\right)

is non-decreasing in qq. The softmax probability pip_i is also non-decreasing with qiq_i, because both clipping and exponentiation preserve order. Consequently,

(pi−pj)(Ri−Rj)≥0∀i,j.(p_i-p_j)(R_i-R_j)\geq0 \qquad\forall i,j.

Using the pairwise covariance identity,

∑i(pi−ui)Ri=1K∑i<j(pi−pj)(Ri−Rj)≥0.\sum_i(p_i-u_i)R_i=\frac{1}{K}\sum_{i<j}(p_i-p_j)(R_i-R_j)\geq0.

Therefore

∑i(pi−ui)qi=σ∑i(pi−ui)zi+∑i(pi−ui)Ri≥σ∑i(pi−ui)zi.\sum_i(p_i-u_i)q_i=\sigma\sum_i(p_i-u_i)z_i+\sum_i(p_i-u_i)R_i \geq\sigma\sum_i(p_i-u_i)z_i.

Applying Lemma 3,

∑i(pi−ui)qi≥τσ[DKL(p∥u)+DKL(u∥p)]≥0.\sum_i(p_i-u_i)q_i\geq\tau\sigma\left[D_{\mathrm{KL}}(p\Vert u)+D_{\mathrm{KL}}(u\Vert p)\right]\geq0.

This is (15).

Safety-multiplier budget tracking

For update index jj, define the normalized observed budget error

ej:=J^c,j−dd.e_j:=\frac{\widehat{J}_{c,j}-d}{d}.

Define the amount discarded by upper clipping as

uj:=[λj+ηλej−λmax⁡]+.u_j:=[\lambda_j+\eta_\lambda e_j-\lambda_{\max}]_+.

Proposition 3 (Capped budget-tracking bound). For every N≥1N\geq1,

1N∑j=0N−1J^c,j≤d+dηλN[λmax⁡−λ0+∑j=0N−1uj].(22)\frac{1}{N}\sum_{j=0}^{N-1}\widehat{J}_{c,j} \leq d+\frac{d}{\eta_\lambda N}\left[\lambda_{\max}-\lambda_0+\sum_{j=0}^{N-1}u_j\right]. \tag*{(22)}

Proof. Let

xj:=λj+ηλejx_j:=\lambda_j+\eta_\lambda e_j

be the unprojected update and define the lower-projection correction

ℓj:=[−xj]+.\ell_j:=[-x_j]_+.

Projection onto [0,λmax⁡][0,\lambda_{\max}] can be written exactly as

λj+1=λj+ηλej+ℓj−uj.\lambda_{j+1}=\lambda_j+\eta_\lambda e_j+\ell_j-u_j.

Rearranging and summing,

η∑j=0N−1ej=λN−λ0−∑j=0N−1ℓj+∑j=0N−1uj≤λmax⁡−λ0+∑j=0N−1uj\begin{aligned} \eta\sum_{j=0}^{N-1} e_j = \lambda_N - \lambda_0 - \sum_{j=0}^{N-1} \ell_j + \sum_{j=0}^{N-1} u_j \\ &\le\lambda_{\max} - \lambda_0 + \sum_{j=0}^{N-1} u_j \end{aligned}

because λN≤λmax⁡\lambda_N \le\lambda_{\max} and ℓj≥0\ell_j \ge0. Substituting

ej=J^c,j−dde_j = \frac{\widehat{J}_{c,j} - d}{d}

and rearranging proves (22). If the upper projection never activates, then uj=0u_j = 0 for all jj, reducing (22) exactly to (17).

At any converged interior fixed point, 0<λ∗<λmax⁡0 < \lambda^* < \lambda_{\max}, with limiting controller statistic J^c∗\widehat{J}_c^*, the projection is inactive. Therefore

λ∗=λ∗+ηλJ^c∗−dd\lambda^* = \lambda^* + \eta_\lambda\frac{\widehat{J}_c^* - d}{d}

implies J^c∗=d\widehat{J}_c^* = d. Boundary fixed points instead satisfy the corresponding one-sided conditions:

λ∗=0⇒J^c∗≤d,λ∗=λmax⁡⇒J^c∗≥d.\lambda^* = 0 \Rightarrow\widehat{J}_c^* \le d, \qquad\lambda^* = \lambda_{\max} \Rightarrow\widehat{J}_c^* \ge d.

These conditions resemble complementary slackness, but λ\lambda is not a standard Lagrange multiplier for the same objective optimized by the actor, consequently we use them only as an interpretation of the controller equilibrium.

Task Details

We evaluate on ten environments from Safety Gymnasium [13]: four safe-navigation tasks obtained by combining the Point and Car agents with the Goal1 and Circle1 tasks, and six velocity-constrained MuJoCo locomotion tasks.

Navigation agents. The Point agent is a simple planar robot with two control inputs: forward/backward motion and rotation about the vertical axis. The Car agent uses two independently actuated parallel wheels together with a free-rolling rear wheel, such that steering and forward motion must be coordinated through the two wheel controls. We evaluate both agents on the Goal1 and Circle1 tasks.

Navigation tasks. In Goal1, the agent is rewarded for reducing its distance to a target and receives an additional reward when the target is reached, after which a new target is generated. The Level-1 environment contains eight hazard regions and one movable vase; entering a hazard produces safety cost, whereas the vase is not part of the safety constraint. In Circle1, the agent is rewarded for moving around a prescribed circular path while remaining close to its radius. Two virtual boundary walls restrict the admissible region, and crossing from the interior to the exterior produces safety cost.

Velocity-constrained locomotion. The remaining six environments augment the standard Gymnasium MuJoCo locomotion tasks with a velocity constraint. We consider Ant, a 3D quadruped; HalfCheetah, a planar running robot; Hopper, a planar monoped; Humanoid, a 3D biped; Swimmer, an articulated swimming agent; and Walker2d, a planar biped. The underlying task rewards locomotion according to the corresponding MuJoCo environment, while Safety Gymnasium produces a binary cost whenever the agent’s velocity exceeds an environment-specific threshold. For Swimmer the constraint is applied to the xx-axis velocity; for the other agents the relevant planar velocity magnitude is used.

Additional Ablations

To justify our hyperparameter choices, we show our ablations for reachability discount γc\gamma_c, shaping coefficient β\beta and candidates per state KK in Figure 5. As expected, higher values of γc\gamma_c yield a more conservative policy, especially for HalfCheetah. Similarly, higher β\beta results in a more conservative policy; for PointGoal1, when β\beta is too high the reward signal is drowned out and the policy fails to learn. Finally for KK, we only possibly see a slight improvement in safety for higher values in exchange for a higher computational cost.

Figure 5. Ablations on hyperparameter values. Ablation results for reachability discount γc\gamma_c, shaping coefficient β\beta and candidates per state KK. Curves depict means across evaluated seeds with one standard deviation shaded.

Computational Costs

Table 1 shows computational cost comparison of ALGD, Lagrangian-style shaping and RADPO on PointGoal1. Runs were taken on a computer with one RTX 3090 Ti and i9-12900F. Lagrangian-style and RADPO runs were taken with our codebase. ALGD uses the official implementation provided by their authors, modified only to use Safety Gymnasium and log the timing details shown in this table. Note that these runs retain the 10/0.25/0.25 actual learner updates per transition for ALGD, Lagrangian-style and RADPO respectively, as described in their default configurations, which means that ALGD has 40×\times more updates per environment step, hence the significantly longer times.

MethodSample acquisitionCritic optimizationDiffusion-policy optimizationOther learningOverall
ALGD3.29816.05778.89241.524139.771
Lagrangian-style0.4180.5450.4593.3874.809
RADPO0.6160.4230.4062.6974.142

Table 1. Computational cost on PointGoal1. All entries are ms per environment step.

Additional Figures

Figure 6 shows the state distribution of the paths shown in Figure 1.

Figure 6. Distribution of states for trajectories in Figure 1.A.

Implementation Details

Safety-multiplier Cost Estimate

The safety-multiplier controller operates on completed training episodes. For each collection event jj with a nonempty set of completed episodes Ej\mathcal{E}_j, we compute the mean undiscounted episodic cost

Cˉj=1∣Ej∣∑e∈Ej∑t=0Le−1ct(e).(23)\bar{C}_j = \frac{1}{\lvert\mathcal{E}_j\rvert} \sum_{e \in\mathcal{E}_j} \sum_{t=0}^{L_e-1} c_t^{(e)} . \tag*{(23)}

The controller statistic averages these completion-batch means over a recent window W\mathcal{W}:

J^c=1∣W∣∑j∈WCˉj.(24)\hat{J}_c = \frac{1}{\lvert\mathcal{W}\rvert} \sum_{j \in\mathcal{W}} \bar{C}_j . \tag*{(24)}

Pseudocode

We present the pseudocode for RADPO training in Algorithm 1.

Extension to Graded Costs and Multiple Constraints

Since the RADPO algorithm as described assumes a single constraint with a binary per-step cost signal, in this section we discuss extension of RADPO to graded (continuous) costs and multiple constraint settings. Note that our Safety Gymnasium tasks have single constraints with binary costs by default.

Graded Costs

The bounded-cost assumption in Theorem 1 does not require binary costs. For any nonnegative graded cost ct∈[0,cmax⁡]c_t \in[0,c_{\max}] and ht=1{ct>0}h_t = 1\{c_t > 0\}, the condition ct≤cmax⁡htc_t \le c_{\max}h_t holds automati-

Algorithm 1 Reachability-Aware Diffusion Policy Optimization (RADPO)

Require: Cost budget dd, candidate count KK

  1. Initialize actor, critics, target networks, replay buffer D\mathcal{D}, and safety multiplier λ\lambda

  2. while training do

    1. Collect experience using candidate selection and exploration

    2. Store transitions in D\mathcal{D}

    3. Adapt λ\lambda using recent episodic costs Equation (16)

    4. for each gradient update do

      1. Sample (s,a,r,c,s′,dt)(s, a, r, c, s', d_t) from D\mathcal{D}

      2. Compute reachability targets Equation (4)

      3. Shape rewards: r~=r−βλVreach(s′)\tilde{r}=r-\beta\lambda V_{\mathrm{reach}}(s')

      4. Compute reward-critic targets Equation (7)

      5. Sample and perturb KK actor candidates at s′s'

      6. Score candidates with QrQ_r and compute weights wiw_i

      7. Update reachability and reward critics

      8. Update actor using Lπ=Es′[1K∑i=1Kwiℓdiff(θ;s′,ai)]\mathcal{L}_{\pi}=\mathbb{E}_{s'}[\frac{1}{K}\sum_{i=1}^{K}w_i\ell_{\mathrm{diff}}(\theta;s',a_i)] with detached candidates and weights

      9. Update exploration scale, statistics, and targets as scheduled

    5. end for

  3. end while

cally. Thus, the cumulative-cost bound continues to apply without modification. Binarization only removes cost-magnitude information from the predictive reachability signal; the original graded episodic costs are still retained by the safety-multiplier update. Hence RADPO can be applied directly to bounded graded costs, although its reachability shaping distinguishes the timing and likelihood of positive-cost events rather than their severity.

Multiple Constraints

For constraints Jci(π)≤diJ_{c_i}(\pi)\le d_i, i=1,…,mi=1,\ldots,m, RADPO can be extended by maintaining a reachability critic and adaptive safety multiplier for each constraint. Each multiplier is updated from its corresponding realized episodic cost and budget, while reward shaping becomes

r~t=rt−∑i=1mβiλiVreachi(st+1).(25)\tilde{r}_t=r_t-\sum_{i=1}^{m}\beta_i\lambda_iV_{\mathrm{reach}}^i(s_{t+1}). \tag*{(25)}

The reachability and cumulative-cost relations of Theorem 1 then apply separately to each constraint. This preserves the individual budgets and predictive safety signals rather than collapsing multiple constraints into a single scalarized cost.

Experimental Details and Hyperparameters

This appendix specifies every setting used to produce Figure 2–Figure 4. Section H.1 fixes the tasks, budgets and evaluation protocol shared by all methods; Section H.2 gives RADPO’s hyperparameters, split into settings that are constant across all ten tasks and the small set that varies per task; Section H.3 gives the baseline configurations; and Section H.4 gives the ablation arms of § 7.3.

Interaction budgets and evaluation protocol

All experiments use Safety Gymnasium [13]: six MuJoCo velocity-constrained locomotion tasks and four navigation tasks, described in Appendix § 13. Every task uses an episode horizon of T=1000T=1000 steps and the episodic cost budget d=25d=25, except where a baseline’s own formulation prescribes otherwise (Section H.3). Per-step costs are binary on all ten tasks, so the binarisation ht=1{ct>0}h_t=1\{c_t>0\} discards no magnitude information here.

Evaluation. Training curves report the episodic return and cost of the on-policy training rollouts; the latter are used to construct the safety-multiplier statistic. Deterministic evaluation runs 20 episodes at the cadence in Table 2. The late-training scatter of Figure 3 averages each run’s final ten logged training points, then reports the mean and standard deviation over the runs of an arm.

FamilyTaskHorizon TTEnv. stepsEval. every
VelocitySafetyAntVelocity-v110001M25k
VelocitySafetyHalfCheetahVelocity-v110001M25k
VelocitySafetyHopperVelocity-v110001M25k
VelocitySafetyHumanoidVelocity-v110003M25k
VelocitySafetySwimmerVelocity-v110001M25k
VelocitySafetyWalker2dVelocity-v110001M25k
NavigationSafetyCarCircle1-v010003M100k
NavigationSafetyCarGoal1-v010003M100k
NavigationSafetyPointCircle1-v010003M100k
NavigationSafetyPointGoal1-v010003M100k

Table 2. Tasks, interaction budgets and evaluation cadence.

Implementation and compute. All methods except RESPO and ALGD are implemented in a single JAX code base that shares the environment wrappers, replay buffer, vectorised sampler, evaluation loop and logging, hence cross-method differences come from the algorithms and not from the harness. RESPO and ALGD are run from their authors’ released implementations. Runs were executed on a heterogeneous pool of consumer and workstation NVIDIA GPUs (GTX 1080, RTX 4090, RTX 5090, RTX 6000 Ada/Pro), one run per GPU.

RADPO

Settings shared by all ten tasks

Table 3 lists every RADPO hyperparameter that is identical on all ten tasks; Algorithm 1 in Appendix § 17.§ 2 gives the update order these settings parameterise. The diffusion actor, the twin reward critics and the reachability critics are all 3×2563 \times256 MLPs with Mish activations; the actor additionally takes the denoising-step embedding as input (§ 3). Updates are Adam. The actor’s learning rate is linearly annealed from 3×10−43 \times10^{-4} to 3×10−53 \times10^{-5} between gradient steps 2.5×1042.5 \times10^{4} and 7.5×1047.5 \times10^{4}; the critic learning rates are constant. The exploration scale is σexp=σ0exp⁡(ξ)\sigma_{\mathrm{exp}} = \sigma_0 \exp(\xi), with ξ\xi adapted every 250 gradient steps toward a fixed Gaussian entropy target proportional to the action dimension. Safety enters RADPO only through reachability shaping of the reward critic, r~t=rt−βλVreach(st+1)\tilde{r}_t = r_t - \beta\lambda V_{\mathrm{reach}}(s_{t+1}), on every task; the candidate weights of Equation 4.2 carry no separate cost term.

GroupHyperparameterValue
NetworksCritic / reachability-critic MLP3×2563 \times256, Mish
NetworksDiffusion actor MLP3×2563 \times256, Mish
NetworksDenoising steps20
NetworksNoise schedulecosine
NetworksReward critics (twin)2
OptimisationOptimiserAdam
OptimisationCritic learning rate3×10−43 \times10^{-4}
OptimisationActor learning rate3×10−4→3×10−53 \times10^{-4} \to3 \times10^{-5} (linear)
OptimisationReplay capacity10610^{6} transitions
OptimisationBatch size256
OptimisationWarm-up (uniform-random) transitions30k
OptimisationActor / target update periodevery 2 gradient steps
OptimisationTarget smoothing τPolyak\tau_{\mathrm{Polyak}}0.005
Candidate reweightingCandidates per state KK32
Candidate reweightingReweighting temperature τ\tau1.0
Candidate reweightingScore clip[−3,3][-3, 3]
Candidate reweightingAdvantage scale σA\sigma_AEMA of batch std, coefficient 10−310^{-3}
ExplorationEntropy-target update periodevery 250 gradient steps
Explorationξ\xi learning rate3×10−43 \times10^{-4}
ExplorationAction projection ΠA\Pi_Aclip to box bounds
SafetyShaping signalVreach(st+1)V_{\mathrm{reach}}(s_{t+1}) (reachability)
SafetyReachability ensemble size MM8
SafetyReachability lossbinary cross-entropy
SafetyReachability discount γc\gamma_c0.9
SafetyReward discount γ\gamma0.99
Multiplier controllerBudget dd25
Multiplier controllerλ\lambda initialisation0
Multiplier controllerλ\lambda lower bound0
Multiplier controllerλ\lambda cap λmax⁡\lambda_{\max}10
Multiplier controllerCost window ∣W∣\lvert\mathcal{W} \rvert10 completion batches (App. § 17.§ 1)
Multiplier controllerUpdate triggereach collection event with ≥1\ge1 completed episode
EvaluationDeterministic episodes20
EvaluationCandidate selection at deploymenthighest reward-critic score

Table 3. RADPO hyperparameters held constant across all ten tasks.

Per-task settings

Table 4 lists the settings that vary across tasks. We tune the update-to-data ratio, initial exploration temperature α0\alpha_0, exploration scale σ0\sigma_0, shaping coefficient β\beta, and controller step size ηλ\eta_\lambda.

TaskUTDα0\alpha_0σ0\sigma_0β\betaηλ\eta_\lambda
Ant1.00.20.51.50.010
HalfCheetah1.00.20.51.50.010
Hopper0.60.20.50.80.002
Humanoid1.00.20.12.40.120
Swimmer0.20.20.50.0250.100
Walker2d0.20.20.51.50.010
CarCircle11.00.50.10.050.005
CarGoal11.00.50.10.050.055
PointCircle11.00.50.10.050.005
PointGoal10.250.50.10.100.005

Table 4. Per-task RADPO hyperparameters. UTD is the number of optimiser updates per collected transition, α0\alpha_0 the initial exploration temperature (σexp=σ0α0\sigma_{\mathrm{exp}} = \sigma_0\alpha_0 at initialisation), σ0\sigma_0 the exploration scale, β\beta the shaping coefficient and ηλ\eta_\lambda the controller step size. Everything else is as in Table 3.

Among these, ηλ\eta_\lambda is the least transferable across tasks. The update

λ←Π[0,λmax⁡][λ+ηλJ^c−dd]\lambda\leftarrow\Pi_{[0,\lambda_{\max}]}\left[\lambda+ \eta_\lambda\frac{\hat{J}_c-d}{d}\right]

scales with the relative budget violation (J^c−d)/d(\hat{J}_c-d)/d, which depends on the task. For example, Car-Goal1 requires ηλ=0.055\eta_\lambda= 0.055, whereas the Circle tasks use 0.005. Swimmer also requires a relatively large value, ηλ=0.10\eta_\lambda= 0.10, because its episodes do not terminate early. The controller, which updates only when episodes are completed, therefore receives substantially fewer updates during training, and a smaller step size adapts too slowly within the available interaction budget.

Baselines

Baselines

All baselines use the same budget d=25d = 25 and the same interaction budgets as Table 2, except RESPO (which enforces a zero-cost threshold by formulation). Each baseline is initialized from its published configuration; any adaptations or tuning are stated below.

SAC-Lagrangian

Soft actor–critic with a Lagrangian multiplier updated by Adam on log⁡λ\log\lambda from the realised episodic cost. Two backbones are used, matching the two task families (Table 5): the velocity family uses the standard SAC backbone; the Goal tasks use the slower actor of the reference safe-RL implementations, which we verified is necessary on these tasks (raising the actor learning rate from 5×10−65 \times10^{-6} to 3×10−43 \times10^{-4} collapses PointGoal1 to approximately zero return). The cost critic is floored at zero: because the actor minimises λQc\lambda Q_c without a lower bound, an unfloored cost critic diverges (we observed Qc≈−800Q_c \approx-800 against a theoretical range of [0,100][0, 100], with the run’s return collapsing).

HyperparameterVelocity / CircleGoal
Critic / actor MLP3 × 256, GELU2 × 256, ReLU
Actor learning rate3×10−43 \times10^{-4}5×10−65 \times10^{-6}
Critic learning rate3×10−43 \times10^{-4}1×10−31 \times10^{-3}
Entropy temperature α\alphalearned, α0=0.2\alpha_0 = 0.2fixed 10−510^{-5}
α\alpha learning rate3×10−43 \times10^{-4}—
Policy delay12
Gradient-norm clip—40
Multiplier learning rate1×10−41 \times10^{-4}1×10−51 \times10^{-5}
Multiplier initialisation10−310^{-3}0
Multiplier upper bound100100
Multiplier updateper completed episodeper gradient step after 100k steps
Cost window110
Non-negative cost criticyesyes
Batch size / replay256 / 10610^6256 / 10610^6
UTD ratio0.250.25
Warm-up transitions30k10k
Discounts γ,γc\gamma, \gamma_c0.99, 0.990.99, 0.99
Polyak τ\tau0.0050.005

Table 5. SAC-Lagrangian. “Velocity” covers the six velocity tasks and the two Circle tasks; “Goal” covers CarGoal1 and PointGoal1.

CAL

CAL [30] is initialized from its published configuration. Because the published navigation experiments use fixed layouts, we retune the SAC backbone for the randomized Circle tasks. Specifically, we change the actor learning rate from 5×10−65 \times10^{-6} to 3×10−43 \times10^{-4}, replace the fixed entropy temperature α=10−5\alpha= 10^{-5} with a learned temperature, increase the network depth from two to three hidden layers, change the policy delay from 2 to 1, and adjust the discounted per-step cost threshold from 1.0 to 0.5. CAL’s safety-specific coefficients and multiplier update are otherwise unchanged. The Goal tasks retain the published backbone.

Common settings are a four-member cost-critic ensemble with ReLU activations, target updates every two gradient steps, multiplier initialization at zero, discounts γ=0.99\gamma= 0.99 except γc=0.9\gamma_c = 0.9 on the Circle tasks, batch size 256, replay capacity 10610^6, UTD ratio 0.25, and Polyak coefficient τ=0.005\tau= 0.005. Table 6 gives the per-task settings.

TaskkkccMultiplier LRInternal ddExtra
Ant0.00.011×10−51 \times10^{-5}25—
HalfCheetah0.00.31×10−41 \times10^{-4}25Qc≥0Q_c \ge0
Hopper0.50.21×10−51 \times10^{-5}25done-mask, Qc≥0Q_c \ge0
Humanoid0.00.011×10−51 \times10^{-5}25done-mask
Swimmer0.00.011×10−51 \times10^{-5}25—
Walker2d0.00.21×10−41 \times10^{-4}25done-mask
CarCircle10.00.055×10−75 \times10^{-7}25retuned backbone, cost threshold 0.5
CarGoal10.00.35×10−75 \times10^{-7}25published backbone
PointCircle10.010.05×10−75 \times10^{-7}25retuned backbone, cost threshold 0.5
PointGoal10.010.05×10−75 \times10^{-7}25published backbone

Table 6. CAL per-task settings. kk is the cost-critic UCB coefficient, cc the rectification coefficient. “done-mask” indicates that termination is masked in the cost backup; “Qc≥0Q_c \ge0” that the cost critic is floored at zero.

PPO-Lagrangian

The on-policy reference is run at its published settings, except that we reduce the number of epochs for the navigation tasks so that their total interaction budget matches the 3M environment steps used by the other methods. No per-task hyperparameter tuning is applied. Table 7 lists the resulting configuration; rollout lengths follow the published protocol, while the navigation interaction budget differs only through this change in the number of epochs.

HyperparameterVelocityHumanoidNavigation
Policy / value MLP2 × 64, tanh2 × 64, tanh2 × 64, tanh
Learning rate3×10−43 \times10^{-4}3×10−43 \times10^{-4}3×10−43 \times10^{-4}
Steps per epoch2048600020000
Epochs500500150
Total environment steps1.024M3M3M
Update iterations / epoch404040
Minibatch size646464
Clip ratio0.20.20.2
Target KL (early stop)0.020.020.02
γ\gamma / GAE λ\lambda0.99 / 0.950.99 / 0.950.99 / 0.95
Cost GAE λ\lambda0.950.950.95
Entropy coefficient000
Gradient-norm clip404040
Critic ℓ2\ell_2 coefficient10−310^{-3}10−310^{-3}10−310^{-3}
Multiplier learning rate0.0350.0350.035
Multiplier initialisation10−310^{-3}10−310^{-3}10−310^{-3}
Lagrange window100 epochs100 epochs100 epochs

Table 7. PPO-Lagrangian.

RESPO

We adapt the authors’ released PyTorch RESPO implementation (Ganai et al., [10]) to Safety Gymnasium, preserving its policy objective, reachability targets, and multiplier update. The Gaussian actor and three value networks use two 256-unit tanh layers. Training uses four MPI workers, full-batch updates, and linearly decaying learning rates. We performed hyperparameter tuning on selected tasks, varying the actor learning rate, rollout size, target KL, and initial policy standard deviation. We additionally used observation normalization for Humanoid, which improves the performance compared to the default setting. The selected settings in Table 8 were then held fixed across the subsequent training seeds. All tasks use a 1,000-step episode limit and action repeat one; observation normalization is applied only to Humanoid.

TaskBudgetRolloutActor LRσ0\sigma_0Target KL
Ant1M10,0006×10−46 \times10^{-4}0.20.03
HalfCheetah1M10,0006×10−46 \times10^{-4}0.20.03
Hopper1M10,0006×10−46 \times10^{-4}0.20.03
Humanoid3M5,0001×10−41 \times10^{-4}0.20.03
Swimmer1M10,0006×10−46 \times10^{-4}0.20.03
Walker2d1M10,0003×10−43 \times10^{-4}0.20.03
CarCircle13M30,0001×10−41 \times10^{-4}0.20.01
CarGoal13M30,0001×10−41 \times10^{-4}e−0.5e^{-0.5}0.01
PointCircle13M30,0003×10−43 \times10^{-4}e−0.5e^{-0.5}0.01
PointGoal13M30,0003×10−43 \times10^{-4}e−0.5e^{-0.5}0.01

Table 8. RESPO per-task settings. Budgets and rollout sizes count total environment transitions across four workers. Actor LR and σ0\sigma_0 are the initial learning rate and policy standard deviation. Observation normalization is used only for Humanoid.

We retain RESPO’s released training constraint of zero. The common episodic cost threshold d=25d = 25 is used only for reporting and assessing feasibility, not for its multiplier update. Learning curves show training-rollout return and cost.

ALGD

We run ALGD [5] from the authors’ released PyTorch implementation (commit 1f6820b), with the training harness adapted so that ALGD sees the same environments, horizons, budgets and evaluation as the other methods (Table 9). Table 10 lists the released hyperparameters, which we keep, and Table 11 the per-task settings.

Released codeThis paper
EnvironmentsSafety-Gym (Safexp-*), MuJoCoSafety Gymnasium (all ten tasks)
Navigation layoutfixed for every episode and seedresampled every episode
Episode horizon400 (navigation)1000
Goal reachedepisode terminatesnew goal spawned, episode continues
Cost budget10 (navigation) / raw velocityd=25d = 25 on all tasks
Evaluation1 episode20 deterministic episodes

Table 9. ALGD: released training protocol versus the protocol used here.

GroupHyperparameterValue
NetworksReward critics (twin)2×2562 \times256, ReLU
NetworksCost-critic ensemble4 members, 2×2562 \times256, SiLU
NetworksScore / noise network3×1283 \times128, ReLU, time embedding
NetworksDenoising steps KK5
DiffusionDDPM noise schedulelinear β∈[10−4,0.02]\beta\in[10^{-4}, 0.02]
DiffusionVE-SDE noise scalegeometric σ∈[0.01,1.0]\sigma\in[0.01, 1.0]
Augmented LagrangianPenalty coefficient ρ\rho1.0
Augmented LagrangianMultiplier initialisationλ0=0.6931\lambda_0 = 0.6931
Augmented LagrangianMultiplier updateAdam on log λ\lambda, lr 3×10−43 \times10^{-4}
Score estimationMonte-Carlo samples4
Score estimationScore temperature β\beta1.0
OptimisationOptimiserAdam
OptimisationActor / critic / cost-critic lr3×10−43 \times10^{-4}
OptimisationBatch size / replay256 / 10610^6
OptimisationDiscounts γ,γc\gamma, \gamma_c0.99, 0.99
OptimisationPolyak τ\tau / target period0.005 / every 2 updates
OptimisationWarm-up (uniform-random) steps5k
OptimisationUpdates per environment step10 (default), see Table 11

Table 10. ALGD hyperparameters (released defaults, shared by the DDPM and VE-SDE agents).

TaskAgentUTD
AntDDPM10
HalfCheetahDDPM10
HopperDDPM10
HumanoidDDPM10
SwimmerDDPM10
Walker2dDDPM10
CarCircle1VE-SDE10
CarGoal1DDPM10
PointCircle1VE-SDE10
PointGoal1VE-SDE10

Table 11. ALGD per-task settings. UTD is gradient updates per environment step.

Cost threshold. ALGD constrains a discounted cost critic, and its released code converts an episodic budget into a per-step threshold h=d(1−γcH)/((1−γc)H)h = d (1 - \gamma_c^H) / ((1 - \gamma_c)H). We apply this conversion on all ten tasks with d=25d = 25, γc=0.99\gamma_c = 0.99 and HH the number of decisions per episode, giving h≈2.50h \approx2.50 for the Goal and velocity tasks (H=1000H = 1000) and h≈9.19h \approx9.19 for the Circle tasks (H=250H = 250 at action repeat 4).

Ablation configurations

The ablations of Figure 4 are one-factor changes to the corresponding constrained arm of Table 4; every other hyperparameter is held fixed.

  • Discounted critic. Replaces the reachability critic with a standard discounted cost critic, keeping the same successor-state reward-shaping structure.

  • Cost-only shaping. Shapes with the realised cost, r~t=rt−βλct\tilde{r}_t = r_t - \beta\lambda c_t, instead of the predicted reachability of the successor state.

  • Lag-style shaping. Removes reward shaping entirely and puts the cost term into the candidate weights, i.e. the logits become A^i−λA^ic\hat{A}_i - \lambda\hat{A}^c_i with the cost advantage clipped symmetrically to [−3,3][-3, 3] to match the reward advantage’s clip.

Gain matching. The shaping coefficient β\beta deliberately differs between arms, because the quantity it multiplies differs in scale: a reachability value is a probability in [0,1][0, 1], whereas a discounted cost value and a realised cost are not. Holding β\beta fixed would therefore run the alternatives at a different penalty magnitude and measure “too much penalty” rather than “worse safety signal”. We instead measured the realised magnitude of each shaping term on a matched run and set β\beta so that the mean penalty matches RADPO’s; Table 12 reports the resulting β\beta.

TaskArmCost criticShaping targetβ\beta
CarGoal1RADPOreachabilityVreach(s′)V_{\mathrm{reach}}(s')0.05
CarGoal1discounted criticdiscountedVc(s′)V_c(s')0.01
CarGoal1cost-only shaping-ctc_t0.05
CarGoal1lag-style shapingdiscountednone (cost in weights)—
PointCircle1RADPOreachabilityVreach(s′)V_{\mathrm{reach}}(s')0.05
PointCircle1discounted criticdiscountedVc(s′)V_c(s')0.01
PointCircle1cost-only shaping-ctc_t0.05
PointCircle1lag-style shapingdiscountednone (cost in weights)—
HalfCheetahRADPOreachabilityVreach(s′)V_{\mathrm{reach}}(s')1.5
HalfCheetahdiscounted criticdiscountedVc(s′)V_c(s')0.254
HalfCheetahcost-only shaping-ctc_t2.467
HalfCheetahlag-style shapingdiscountednone (cost in weights)—

Table 12. Ablation arms. Every arm shares its task’s ηλ\eta_\lambda, σ0\sigma_0, α0\alpha_0, UTD and interaction budget with the RADPO arm beside it, and all settings of Table 3.

Deterministic-evaluation curves

Figure 2 in the main text plots the on-policy training rollouts, which are the statistics the safety-multiplier controller regulates. Figure 7 plots the deterministic-evaluation counterpart over the same interaction budgets: 20 evaluation episodes at every checkpoint, with exploration noise disabled. The two views can differ appreciably in absolute cost, thus we report both rather than choosing one.

Figure 7. Deterministic-evaluation return and cost across the ten tasks. Evaluation return (upper row of each block) and evaluation cost (lower row), measured over 20 deterministic episodes per checkpoint; the training-rollout counterpart is Figure 2. Curves are means over the runs of an arm with one standard deviation shaded, and dashed horizontal lines mark the budget d=25d = 25.

References

  1. [1]Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization, 2017. URL https://arxiv.org/abs/1705.10528.
  2. [2]Anayo K. Akametalu, Shromona Ghosh, Jaime F. Fisac, Vicenc Rubies-Royo, and Claire J. Tomlin. A minimum discounted reward hamilton-jacobi formulation for computing reachable sets. IEEE Transactions on Automatic Control, 69(2):1097–1103, February 2024. ISSN 0018-9286. doi: 10.1109/TAC.2023.3327159. Publisher Copyright: © 1963-2012 IEEE.DOI
  3. [3]Somil Bansal, Mo Chen, Sylvia Herbert, and Claire J. Tomlin. Hamilton-jacobi reachability: A brief overview and recent advances, 2017. URL https://arxiv.org/abs/1709.07523.
  4. [4]Rui Chen, Shangtao Li, Yifan Sun, and Changliu Liu. λ-reachability: Geometric-horizon safety bellman equations for humanoid safety, 2026. URL https://arxiv.org/abs/2606.16022.
  5. [5]Xiaoyuan Cheng, Wenxuan Yuan, Boyang Li, Yuan chao Xu, Yiming Yang, Hao Liang, Bei Peng, Robert Loftin, Zhuo Sun, and Yukun Hu. How does the lagrangian guide safe reinforcement learning through diffusion models? In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=mK3xWE7p2T.arxiv.org/abs/2602.02924
  6. [6]Cheng Chi, Zhenjia Xu, Siyuan Feng, Eric Cousineau, Yilun Du, Benjamin Burchfiel, Russ Tedrake, and Shuran Song. Diffusion policy: Visuomotor policy learning via action diffusion, 2024. URL https://arxiv.org/abs/2303.04137.
  7. [7]Kutay Demiray, Efe Eren Ceyani, and Ozgur S. Oguz. Uncertainty-aware safety propagation critics for safe reinforcement learning. Transactions on Machine Learning Research, 2026. ISSN 2835-8856. URL https://openreview.net/forum?id=b8GWqgLEHh.
  8. [8]Shutong Ding, Ke Hu, Zhenhao Zhang, Kan Ren, Weinan Zhang, Jingyi Yu, Jingya Wang, and Ye Shi. Diffusion-based reinforcement learning via q-weighted variational policy optimization. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://arxiv.org/abs/2405.16173.
  9. [9]Jaime F. Fisac, Anayo K. Akametalu, Melanie N. Zeilinger, Shahab Kaynama, Jeremy Gillula, and Claire J. Tomlin. A general safety framework for learning-based control in uncertain robotic systems, 2018. URL https://arxiv.org/abs/1705.01292.
  10. [10]Milan Ganai, Zheng Gong, Chenning Yu, Sylvia Herbert, and Sicun Gao. Iterative reachability estimation for safe reinforcement learning, 2023. URL https://arxiv.org/abs/2309.13528.
  11. [11]Chen-Xiao Gao, Chenyang Wu, Mingjun Cao, Chenjun Xiao, Yang Yu, and Zongzhang Zhang. Behavior-regularized diffusion policy optimization for offline reinforcement learning, 2025. URL https://arxiv.org/abs/2502.04778.
  12. [12]Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. arXiv preprint arxiv:2006.11239, 2020.arxiv.org/abs/2006.11239
  13. [13]Jiaming Ji, Borong Zhang, Jiayi Zhou, Xuehai Pan, Weidong Huang, Ruiyang Sun, Yiran Geng, Yifan Zhong, Juntao Dai, and Yaodong Yang. Safety-gymnasium: A unified safe reinforcement learning benchmark, 2024. URL https://arxiv.org/abs/2310.12567.
  14. [14]Huy Le, Onur Celik, Denis Blessing, Tai Hoang, Claas A Voelcker, Axel Brunnbauer, Felix Richter, Michael Volpp, and Gerhard Neumann. Trust-region diffusion policies for massively parallel on-policy RL. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=mGu2fs7kJt.arxiv.org/abs/2606.15260
  15. [15]Jiaxing Li, Hanjiang Hu, Yujie Yang, and Changliu Liu. Verifiable safety q-filters via hamilton-jacobi reachability and multiplicative q-networks, 2025. URL https://arxiv.org/abs/2506.15693.
  16. [16]Qian Lin, Bo Tang, Zifan Wu, Chao Yu, Shangqin Mao, Qianlong Xie, Xingxing Wang, and Dong Wang. Safe offline reinforcement learning with real-time budget constraints, 2024. URL https://arxiv.org/abs/2306.00603.
  17. [17]Ben Liu, Shunpeng Yang, and Hua Chen. Diffusion policy through conditional proximal policy optimization, 2026. URL https://openreview.net/forum?id=sOSdvn2sM2.arxiv.org/abs/2603.04790
  18. [18]Zuxin Liu, Zhepeng Cen, Vladislav Isenbaev, Wei Liu, Zhiwei Steven Wu, Bo Li, and Ding Zhao. Constrained variational policy optimization for safe reinforcement learning, 2022. URL https://arxiv.org/abs/2201.11927.
  19. [19]Haitong Ma, Tianyi Chen, Kai Wang, Na Li, and Bo Dai. Efficient online reinforcement learning for diffusion policy. arXiv preprint arXiv:2502.00361, 2025.arxiv.org/abs/2502.00361
  20. [20]Nikola Milosevic, Johannes Müller, and Nico Scherf. Embedding safety into RL: A new take on trust region methods. In Forty-second International Conference on Machine Learning, 2025. URL https://openreview.net/forum?id=4zRb89SbZg.arxiv.org/abs/2411.02957
  21. [21]I.M. Mitchell, A.M. Bayen, and C.J. Tomlin. A time-dependent hamilton-jacobi formulation of reachable sets for continuous dynamic games. IEEE Transactions on Automatic Control, 50(7): 947–957, 2005. doi: 10.1109/TAC.2005.851439.DOI
  22. [22]Kazuki Mizuta and Karen Leung. Cobl-diffusion: Diffusion-based conditional robot planning in dynamic environments using control barrier and lyapunov functions. In IEEE/RSJ International Conference on Intelligent Robots and Systems, 2024.arxiv.org/abs/2406.05309
  23. [23]Michael Psenka, Alejandro Escontrela, Pieter Abbeel, and Yi Ma. Learning a diffusion model policy from rewards via q-score matching. In Proceedings of the 41st International Conference on Machine Learning, 2024.arxiv.org/abs/2312.11752
  24. [24]Allen Z. Ren, Justin Lidard, Lars L. Ankile, Anthony Simeonov, Pulkit Agrawal, Anirudha Majumdar, Benjamin Burchfiel, Hongkai Dai, and Max Simchowitz. Diffusion policy policy optimization. In arXiv preprint arXiv:2409.00588, 2024.arxiv.org/abs/2409.00588
  25. [25]Hikmet Simsir and Ozgur S. Oguz. Lagrangian perturbation diffusion steering: Latent reinforcement learning for generative policies, 2026. URL https://arxiv.org/abs/2606.01151.
  26. [26]Adam Stooke, Joshua Achiam, and Pieter Abbeel. Responsive safety in reinforcement learning by pid lagrangian methods, 2020. URL https://arxiv.org/abs/2007.03964.
  27. [27]Chen Tessler, Daniel J. Mankowitz, and Shie Mannor. Reward constrained policy optimization, 2018. URL https://arxiv.org/abs/1805.11074.
  28. [28]Yinuo Wang, Likun Wang, Yuxuan Jiang, Wenjun Zou, Tong Liu, Xujie Song, Wenxuan Wang, Liming Xiao, Jiang Wu, Jingliang Duan, et al. Diffusion actor-critic with entropy regulator. Advances in Neural Information Processing Systems, 37:54183–54204, 2024.arxiv.org/abs/2405.15177
  29. [29]Zhendong Wang, Jonathan J Hunt, and Mingyuan Zhou. Diffusion policies as an expressive policy class for offline reinforcement learning. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=AHvFDpi-FA.arxiv.org/abs/2208.06193
  30. [30]Zifan Wu, Bo Tang, Qian Lin, Chao Yu, Shangqin Mao, Qianlong Xie, Xingxing Wang, and Dong Wang. Off-policy primal-dual safe reinforcement learning. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=vy42bYs1Wo.arxiv.org/abs/2401.14758
  31. [31]Wei Xiao, Tsun-Hsuan Wang, Chuang Gan, Ramin Hasani, Mathias Lechner, and Daniela Rus. Safediffuser: Safe planning with diffusion probabilistic models. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=ig2wk7kK9J.arxiv.org/abs/2306.00148
  32. [32]Long Yang, Zhixiong Huang, Fenghao Lei, Yucun Zhong, Yiming Yang, Cong Fang, Shiting Wen, Binbin Zhou, and Zhoucheng Lin. Policy representation via diffusion probability model for reinforcement learning, 2023. URL https://arxiv.org/abs/2305.13122.
  33. [33]Tsung-Yen Yang, Justinian Rosca, Karthik Narasimhan, and Peter J. Ramadge. Projection-based constrained policy optimization, 2020. URL https://arxiv.org/abs/2010.03152.

Paper details

vlnc:W_y37efv4m
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
  • Computer Science

Generative AI tools

View statement
Looking for related papers…
Contents