Organizations: China Merchants Research Institute of Advanced Technology, China Merchants Group, Hong Kong, China · The Chinese University of Hong Kong, Hong Kong, China · Generative AI Lab, College of Computing and Data Science, Nanyang Technological University, Singapore · the School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University, Shenzhen, China
Primal-dual methods enforce safety constraints in reinforcement learning through Lagrangian relaxation. For a fixed policy, the exact bounded multiplier response exhibits bang-bang switching at the constraint boundary. Practical gradient updates can oscillate through coupling with policy optimization. We propose Structural DuaL Adaptation (SDLA), which replaces this bang-bang response with a unique continuous response through current-cost centering, trajectory weighting, and quadratic regularization. We characterize activation thresholds and response sensitivity. Ternary search computes multipliers without a dual gradient stepsize. For entropy-regularized tabular policies, we bound equilibrium constraint violations alongside reward gaps. We establish convergence of delayed updates under mild assumptions. Neural PPO/SAC experiments on OmniSafe and HASARD demonstrate competitive rewards with improved constraint tracking. On HASARD, PPO-SDLA achieves higher reported mean reward than the human baseline in six of eighteen settings while meeting the respective mean-cost budgets, including four with lower mean cost. To the best of our knowledge, this is the first report of higher mean reward at lower mean cost than the human baseline across multiple HASARD settings.
Figures & tables
Method
Inner Solve
Avoids Bang-Bang
Lagrangian
O(1) (closed form)
✗
Lagrangian-PID
No closed form
—
Entropy-Regularized
O(1) (closed form)
✗
SDLA (ours)
O(log(λmax/ελ))
✓
TABLE I: Single-constraint multiplier responses with policy and return statistics fixed. Inner solve counts scalar optimization steps to multiplier accuracy ελ . Linear objectives admit an exact closed-form solution ( 4 ); SDLA uses ternary search. Bang-bang refers to the exact response. For PID, “No closed form” denotes feedback updates without a closed-form optimal response; — denotes not applicable. Entropy-Regularized refers to policy entropy.
Level
Method
Armament
Volcanic
Remedy
Collateral
Precipice
Detonator’s
Burden
Venture
Rush
Damage
Plunge
Dilemma
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
1
PPO
9.68
109.30
51.64
172.93
50.78
52.44
78.61
41.06
243.42
475.62
29.67
14.28
PPOCost
5.47
3.67
30.73
5.44
28.21
6.75
68.71
24.04
237.72
0.69
27.60
8.45
PPOLag
7.51
52.41
42.40
52.00
36.37
5.25
29.09
5.61
147.24
44.96
21.49
5.62
PPOSaute
2.33
32.87
32.68
62.00
20.50
9.18
26.08
7.09
241.37
424.35
28.69
8.78
TABLE II: Rewards and costs over five SDLA runs and available archived baseline runs. The cost threshold is 5 for Remedy Rush, Collateral Damage, and Detonator’s Dilemma, and 50 for all other environments. Green : mean cost meets the budget. Bold Green : highest mean reward among methods meeting the mean cost budget.
Level
Method
Armament
Volcanic
Remedy
Collateral
Precipice
Detonator’s
Burden
Venture
Rush
Damage
Plunge
Dilemma
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
1
Human
18.60
42.83
57.12
45.97
51.04
5.65
42.33
4.11
243.09
46.88
31.54
4.49
PPO-SDLA (ours)
19.46
12.80
44.49
29.49
39.07
2.71
43.96
3.01
243.30
43.09
27.24
2.97
2
Human
16.85
31.50
42.91
45.09
34.72
1.22
17.34
3.10
226.11
44.35
34.66
3.09
PPO-SDLA (ours)
14.22
19.01
33.71
28.01
44.02
4.67
31.09
4.44
172.40
40.98
22.72
4.19
TABLE III: Human player rewards and costs averaged over 10 episodes compared to PPO-SDLA terminal training summaries. Bold : PPO-SDLA achieves higher reported mean reward than human.
Method
Ant
HalfCheetah
Hopper
Swimmer
Walker2d
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
R↑
C↓
PPO
5977.73 ± 885.65
958.13 ± 134.50
6921.83 ± 1721.79
919.20 ± 173.08
2337.11 ± 942.06
550.02 ± 237.70
119.77 ± 13.80
165.27 ± 20.15
6239.52 ± 879.99
902.68 ± 100.93
PPOLag
3205.96 ± 85.16
22.46 ± 4.82
2939.58 ± 307.19
18.72 ± 2.87
961.92 ± 752.87
13.96 ± 19.33
64.74 ± 17.67
28.02 ± 4.09
2982.27 ± 681.55
13.49 ± 14.55
P3O
2636.62 ± 181.09
20.69 ± 10.23
2117.84 ± 313.55
27.60 ± 8.36
1231.52 ± 465.35
16.33 ± 11.38
38.02 ± 34.18
18.40 ± 12.13
2713.57 ± 313.20
20.51 ± 14.09
FOCOPS
3184.48 ± 305.59
14.75 ± 6.36
2965.20 ± 290.43
2.37 ± 3.50
1437.75 ± 446.87
10.13 ± 8.87
53.87 ± 17.90
29.75 ± 7.33
3117.05 ± 53.60
8.78 ± 12.38
PPOSaute
2978.74 ± 93.65
16.77 ± 0.92
2901.40 ± 25.49
16.20 ± 0.60
1650.91 ± 152.65
17.87 ± 1.33
35.61 ± 4.37
3.44 ± 1.35
2410.89 ± 241.22
18.88 ± 2.38
TABLE IV: Performance on OmniSafe’s MuJoCo Velocity Benchmark. Mean ± std over 5 random seeds. Green : mean cost ≤ 25. Bold Green : highest mean reward within the same algorithm family (PPO-based or SAC-based) among methods meeting this budget.
Fig. 1: HASARD Level 1: reward (top) and cost (bottom). Lines show means and shading one standard deviation over five SDLA runs and three runs per baseline. Dashed lines mark budgets of 50 for Armament Burden and 5 for the other tasks. PPOCost shows task reward with its logged penalty added back.
Fig. 2: HASARD Level 2: reward (top) and cost (bottom) for the same four tasks, with methods, budgets, and statistical conventions as in Figure 1 .
Task
Method
Mean ∣Δλ∣
Violation (%)
Overshoot
CrossRate (%)
Ant
PPOLag
0.0075±0.0007
38.7±3.5
3.2546±0.2850
5.2±0.8
Ant
PPO-SDLA
0.0865±0.0162
6.7±4.5
0.1807±0.1653
3.4±1.8
Walker2d
PPOLag
0.0115±0.0031
41.7±2.1
4.8960±0.4163
9.0±2.1
Walker2d
PPO-SDLA
0.1154±0.0380
13.0±6.9
1.4061±1.2572
4.0±1.2
TABLE V: Training-time constraint tracking with d=25 . All statistics use the complete training logs. Violation and CrossRate are percentages; overshoot is averaged over all logged updates, including those below the budget.
Algorithm
Reward ( ↑ )
Cost ( ↓ )
Violation (%, ↓ )
Ant
PPO-SDLA (ours)
3200.4±75.6
19.73±2.46
6.7±4.5
PPOEntropy
3136.4±86.6
40.86±22.39
27.8±3.5
PPO-QR
3226.8±124.7
51.35±50.00
52.9±7.2
PPO-QR- 2d
3169.3±112.6
25.47±0.37
24.8±4.9
Swimmer
TABLE VI: Adaptive feedback versus fixed early penalization on Ant and Swimmer ( d=25 ; five runs per method). Entries report mean ± standard deviation. PPO-QR- d/2 uses β=0.2 versus SDLA’s β=0.1 , matching their constant-cost activation threshold and response slope. Violation % is the fraction of logged updates exceeding the cost limit.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Symbol
Description
CMDP
S,A,P
State space, action space, and transition kernel
r,c,γ,d
Reward, cost, discount factor, and cost budget
Jr(π),Jc(π)
Expected discounted reward and cost under policy π
R,C
Complete discounted trajectory returns
Cˉ
Cost-return bound Cmax/(1−γ)
Appendix
TABLE S1: Notation Table
T={ξi}i=1M.
Appendix
Algorithm S2 PPO-SDLA
Ri=∑t≥0γtrti,Ci=∑t≥0γtcti,i=1,…,M.
Appendix
Algorithm S3 SAC-SDLA
Fig. S1: Reward, cost, and logged multiplier trajectories on Ant (top) and Swimmer (bottom). Lines show means over five distinct seeds per method and environment; shading shows one standard deviation, clipped at zero for cost and λ . Curves use all 500 logged points without temporal smoothing. Dashed cost lines mark d=25 . Swimmer uses τ=1 , with β=10 for PPO-QR, β=0.1 for SDLA, and β=0.2 for PPO-QR- d/2 .
β
τ
Reward ( ↑ )
Cost ( ↓ )
Mean ∣Δλ∣
0.1
1
3200.44±75.58
19.73±2.46
0.0865±0.0162
0.5
1
3132.15±115.28
12.44±3.12
0.3587±0.0250
1.0
1
3088.90±97.37
15.31±3.31
0.4969±0.0598
2.0
1
3095.12±129.66
10.49±4.61
0.5589±0.0671
5.0
1
3107.92±50.84
11.65±5.40
0.7639±0.1144
∞
1
3086.35±93.44
12.33±5.18
0.8037±0.1017
Appendix
TABLE S2: Regularization ablation on SafetyAntVelocity-v1 with d=25 . The β sweep uses a 10M-step horizon and τ=1 ; β=∞ removes quadratic regularization. Mean ∣Δλ∣ measures the average change between consecutive logged multipliers.
τ
Reward ( ↑ )
Cost ( ↓ )
Mean ∣Δλ∣
1
3200.44 ± 75.58
19.73±2.46
0.0865±0.0162
1.5
3192.72±62.06
20.24±1.36
0.08649±0.01625
2
3098.98±61.66
20.34±1.07
0.08890±0.00939
Appendix
TABLE S3: Temperature ablation on SafetyAntVelocity-v1 with d=25 and the default β=0.1 . Entries report mean ± standard deviation. Mean ∣Δλ∣ reports the average absolute change between consecutive logged multipliers. Bold marks the highest mean reward.
Fig. S2: PPO-SDLA on Safety-Gym velocity tasks. Rows show episode reward, episode cost, and the dual variable λ , respectively.
Fig. S3: Full-training constraint tracking on Ant and Walker2d, using the values in main Table V . Points show means and error bars show one standard deviation. Panels report mean absolute multiplier change, violation rate, average overshoot, and constraint-boundary crossing rate. The cost budget is d=25 ; overshoot includes all logged updates.
Environment
Near-cap frequency (%)
SafetyAntVelocity-v1
0.000
SafetyHalfCheetahVelocity-v1
0.000
SafetyHopperVelocity-v1
0.000
SafetySwimmerVelocity-v1
2.400
SafetyWalker2dVelocity-v1
0.000
Appendix
TABLE S4: Fraction of logged PPO-SDLA updates with λt≥0.95λmax , using λmax=10 .
Fig. S4: SAC-SDLA on Safety-Gym velocity tasks. Rows show episode reward, episode cost, and the dual variable λ , respectively.
Safe reinforcement learning (Safe RL) aims to maximize expected return while satisfying safety constraints, typically modeled as Constrained Markov Decision Processes (CMDPs). While primal-dual methods scale well to deep RL, they often suffer from delayed constraint correction, leading to oscillatory behavior and prolonged safety violations. In this paper, we propose Constraint-Sensitive Policy Optimization (CSPO), a first-order primal-dual method that incorporates local constraint sensitivity into policy updates. CSPO augments the primal objective with a constraint-sensitive correction derived from the shortest signed distance to the safety boundary, enabling smarter recovery steps back to safety, compensating for delayed Lagrange multiplier updates, reducing oscillations near the boundary, and preserving the KKT solutions of the original constrained problem. Experiments on navigation and locomotion benchmarks demonstrate that CSPO achieves faster safety recovery and high reward preservation, resulting in higher constrained returns compared to state-of-the-art primal-dual and penalty-based methods
Safety is a primary challenge in real-world reinforcement learning (RL). Formulating safety requirements as state-wise constraints has become a prominent paradigm. Handling state-wise constraints with the Lagrangian method requires a distinct multiplier for every state, necessitating neural networks to approximate them as a multiplier network. However, applying standard dual gradient ascent to multiplier networks induces severe training oscillations. This is because the inherent instability of dual ascent is exacerbated by network generalization -- local overshoots and delayed updates propagate to adjacent states, further amplifying policy fluctuations. Existing stabilization techniques are designed for scalar multipliers, which are inadequate for state-dependent multiplier networks. To address this challenge, we propose an augmented Lagrangian multiplier network (ALaM) framework for stable learning of state-wise multipliers. ALaM consists of two key components. First, a quadratic penalty is introduced into the augmented Lagrangian to compensate for delayed multiplier updates and establish the local convexity near the optimum, thereby mitigating policy oscillations. Second, the multiplier network is trained via supervised regression toward a dual target, which stabilizes training and promotes convergence. Theoretically, we show that ALaM guarantees multiplier convergence and thus recovers the optimal policy of the constrained problem. Building on this framework, we integrate soft actor-critic (SAC) with ALaM to develop the SAC-ALaM algorithm. Experiments demonstrate that SAC-ALaM outperforms state-of-the-art safe RL baselines in both safety and return, while also stabilizing training dynamics and learning well-calibrated multipliers for risk identification.
Jiaming Zhang, Yujie Yang, Yao Lyu +2
School of Vehicle and Mobility & College of AI, Tsinghua University, Beijing, 100084, China
In safety-critical domains, reinforcement learning (RL) systems must satisfy strict, zero-cost safety constraints while achieving meaningful task performance. Existing model-free methods can struggle to achieve high safety without substantially compromising task performance. We introduce Safety-Biased Trust Region Policy Optimisation (SB-TRPO), a principled approach to RL with zero-cost constraints, which requires only a fixed fraction of the maximal cost reduction achievable within the trust region, thus retaining flexibility for reward optimisation. We show that the idealised update nevertheless converges to zero cost and maximal reward amongst zero-cost policies in finite MDPs. A practical gradient-based approximation provides local improvements in both safety and reward under suitable gradient alignment. Experiments on Safety Gymnasium demonstrate high safety alongside strong task performance.