Boundary-Seeking Policy Gradient for Safe Reinforcement Learning
Abstract
Safe reinforcement learning maximizes reward subject to safety constraints. For Constrained Markov Decision Processes, the linear-programming view over occupancy measures implies that whenever the constraint is active at optimality, the optimal policy lies exactly on the constraint boundary, yet standard gradient-based methods do not exploit this structure and often settle in the feasible interior. We introduce Boundary-Seeking Policy Gradient (BSPG), a first-order method whose update combines a tangential component that improves reward while preserving cost to first order with a signed, residual-driven normal component that regulates the policy toward the active boundary from either side; the combined direction admits an algebraic Lagrangian form with an induced coefficient and no learned dual variable. Under exact gradients and stated regularity conditions, the constraint residual converges to zero from either side with a finite-horizon bound, the tangential component is a reward-ascent direction on the boundary, and any convergent parameter sequence is stationary on the active constraint set, satisfying the KKT conditions when the limit is also a local maximizer over the feasible set. This complements existing analyses, which certify feasibility but do not characterize the constraint value at convergence. On a standard Safety-Gymnasium navigation task, BSPG attains higher reward while tracking the boundary more tightly than the compared baselines.
I Introduction
Reinforcement learning (RL) has achieved remarkable success in sequential decision-making tasks including game playing [1], autonomous driving [2], and robotics [3]. In safety-critical applications, however, maximizing reward alone is insufficient: a deployed policy must also satisfy operational constraints, a requirement commonly formalized through Constrained Markov Decision Processes (CMDPs) [4].
Existing constrained policy optimization follows several directions. Primal–dual methods [5, 6, 7, 8, 9, 10, 11] enforce the constraint through a learned multiplier, so the policy’s location relative to an active boundary is controlled only indirectly through the dual dynamics. Primal and projection-based methods [12, 13, 14, 15], and switching schemes such as CRPO [16], restrict or correct updates by feasibility — a one-sided condition that does not say how much of the remaining cost budget a feasible policy should use. Gradient-manipulation methods [17, 18, 19] coordinate the two objectives through gradient geometry, which captures local alignment but not where the policy sits relative to the cost limit. In short, standard updates do not separate reward improvement along a cost level set from signed regulation across cost levels toward an active boundary.
This separation matters because of a well-known structural property: when the CMDP model is known, safe RL admits an exact linear-programming solution over occupancy measures [4], and whenever the constraint is active at optimality, the optimal policy lies on the boundary of the feasible set. A strictly feasible policy therefore retains cost slack that can be locally converted into reward when the reward and cost gradients are positively aligned; Section IV makes both the global statement and this local trade-off precise.
Motivated by this structure, we propose Boundary-Seeking Policy Gradient (BSPG), which makes signed boundary regulation an explicit, separate component of the update. A tangential term removes from the reward gradient its component along the cost gradient, preserving cost to first order while retaining reward ascent; a normal term proportional to the signed residual decreases cost when the policy is infeasible and increases cost toward the limit when it is strictly feasible. The ideal update admits an algebraic Lagrangian representation with an induced coefficient and maintains no learned dual variable. Our contributions are:
-
1.
We characterize the boundary structure of constrained policy optimization: when no unconstrained reward maximizer is feasible, every constrained occupancy-measure maximizer uses the full cost budget, this target transfers to any policy class attaining the exact constrained optimum, and we identify when local slack supports first-order reward improvement.
-
2.
We propose BSPG and, for the ideal exact-gradient update, prove two-sided residual convergence with a finite-horizon bound, reward ascent of the tangential component, and a characterization of any convergent run: the limit is stationary on the active set and satisfies the KKT conditions when it is also a local maximizer over the feasible set.
-
3.
On a standard Safety-Gymnasium navigation task, BSPG achieves higher reward with tighter boundary adherence than the compared baselines.
II Related Work
Primal–dual methods enforce safety through a Lagrange multiplier balancing reward against violation. PPO- and TRPO-Lagrangian [20] update the multiplier from the observed violation, with coupled dynamics that can be sensitive and oscillatory; PID-Lagrangian [5] stabilizes the dual update at the cost of extra tuning, and RCPO [21] and CAL [22] refine cost estimation and the coupled updates. In all cases the residual acts on the multiplier, which then reshapes the policy step: boundary regulation is not an explicit component of the update itself.
Primal methods restrict or correct updates by feasibility. CPO [12] solves a constrained local subproblem with guarantees but added computational cost [20]; PCPO [13], FOCOPS [14], and CUP [15] give first-order and projection-based variants; CRPO [16] alternates reward and constraint steps by feasibility status, and CPPO [23] adds an infeasibility-recovery mechanism. Feasibility, however, is one-sided: a policy with large slack and one at the boundary satisfy the same inequality, and when slack is locally convertible into reward (Section IV), feasibility alone does not determine how much of the budget to use.
Gradient-manipulation methods are closest to our geometric view. PCRPO [17] selects or combines directions by the reward–cost gradient angle, GradS [19] extends this to multiple constraints, and ESPO [18] uses gradient interaction to improve efficiency. But gradient geometry is not boundary location: two policies with similar gradient directions can hold very different slack, so geometry alone determines neither the direction nor the magnitude of motion across cost levels. These methods can reach an active boundary, yet their updates do not use the signed residual as a separate normal correction regulating the policy toward it.
III Preliminaries
We consider a CMDP defined by the tuple , where and denote the state and action spaces, is the transition kernel, and are the reward and cost functions, is the discount factor, is the initial-state distribution, and is the cost threshold. A policy maps each state to a distribution over actions. For a policy parameterized by , define the expected discounted reward and cost as
| (1) | ||||
| (2) |
Safe RL aims to solve the following constrained optimization problem:
| (3) |
To describe the constraint geometry in policy parameter space, define
| (4) | ||||
| (5) | ||||
| (6) |
Since our method is a policy-gradient algorithm, we next introduce the reward and cost gradients that determine the local update direction. These quantities also provide the basis for the geometric decomposition developed later. By the policy gradient theorem [24], define the normalized discounted state distribution . Then
| (7) | ||||
| (8) |
where is the reward advantage, and is the cost advantage.
The key observation during policy improvements is that the reward and cost gradients may not be aligned. For a local update , differentiability gives , so improves reward to first order if and reduces cost if . When , a naive ascent step along increases both reward and cost to first order, the gradient conflict near an active constraint that our method is designed to handle.
IV Boundary Optimality Principle
We begin with a basic structural observation about the CMDP in (3) that motivates our algorithm design. When the constraint is active at the optimum, the optimal constrained solution should lie on the boundary of the feasible set rather than in its strict interior. Intuitively, if a feasible policy satisfies the constraint with strict inequality, i.e., , then, by continuity of in , there exists a neighborhood around in which the constraint remains inactive. In such a region, moving toward the feasible boundary can potentially improve reward without immediately violating the constraint. The following theorem formalizes this observation.
Theorem IV.1 (Boundary Optimality)
Consider a finite discounted CMDP(3) with finite state and action spaces over the class of all stationary policies. Suppose the feasible set is non-empty and that no unconstrained maximizer of over is feasible, i.e., every satisfies . Then every constrained-optimal policy satisfies .
Proof. For a stationary policy , define its (normalized) occupancy measure . The set is a compact convex polytope, and are linear functionals of : for [4]; hence the maxima below are attained.
Suppose, for contradiction, that some constrained-optimal satisfies , and write . Fix any unconstrained maximizer with occupancy measure ; by hypothesis . If , then would itself be a feasible unconstrained maximizer, contradicting the hypothesis; hence . For let (convexity). By linearity, , and for every , a strictly positive threshold. Thus, for small , the policy induced by is feasible with strictly larger reward than a contradiction. Hence .
The proof, which relies only on the convexity of the occupancy-measure polytope and the linearity of in the occupancy measure [4].
Corollary IV.2 (Boundary optimality under realizability)
Indeed, any global maximizer attains the constrained value, so the induced policy is constrained-optimal in , and Theorem IV.1 gives . Thus, nonconvex parameterization may create additional local stationary points, but it does not change the active cost level of a realizable global optimum.
Theorem IV.1 provides the basic theoretical motivation for BSPG: when the constraint is active at the optimum, the constrained optimum of the underlying CMDP uses the full cost budget. Thus, in safe RL, the objective is not merely to remain feasible, but to approach and optimize along the active constraint boundary, where the optimal constrained solution is attained.
Remark IV.3 (Occupancy-measure vs. parameter space)
Theorem IV.1 is a statement about the CMDP over all stationary policies: in occupancy-measure space the feasible set is a compact convex polytope and both objectives are linear, so the boundary property follows from convexity. In the parameter space used in (4)–(6), and are in general nonconcave, and the global property transfers only when the policy class can represent (near-)optimal policies, e.g., tabular softmax or sufficiently expressive parameterizations. Accordingly, our algorithm uses this geometry only locally: serves as the target set, and the guarantees of Section VI are first-order statements about the parameter-space iterates under Assumptions 1–3; they do not assert that every parameter-space constrained maximizer lies on .
Remark IV.4
Theorem IV.1 identifies as the target set of optimal constrained solutions, but it does not by itself quantify what an algorithm can gain locally when it stops at a strict interior point. The next proposition makes this local trade-off precise: when the reward and cost gradients are positively aligned, a strictly feasible policy can convert part of its unused cost budget into a first-order reward improvement while remaining strictly feasible.
Proposition IV.5
(Local reward improvement from unused budget) Suppose have -Lipschitz gradients near and (cf. Assumptions 1 and 2). Fix and consider the fractional normal step
| (10) |
Then
| (11) | ||||
where both remainders are bounded by . Consequently, if , , and
| (12) |
then is still strictly feasible and attains a strictly larger reward, with first-order gain .
Proof. By -smoothness, with . Direct computation gives and , hence . Identically, with . When , we have and , and both strictly dominate the remainders exactly when (12) holds, yielding strict feasibility and a strict reward increase.
Proposition IV.5 makes the intended claim precise: not every interior policy incurs a reward loss; rather, under positive gradient alignment, a fraction of the unused cost budget can be converted into a first-order reward gain of while preserving strict feasibility. This result motivates the constraint residual as a diagnostic of boundary tracking. The residual alone is not a universal surrogate for reward, because the local reward change also depends on the alignment and magnitudes of the reward and cost gradients.
V Boundary-Seeking Policy Gradient
Theorem IV.1 and Corollary IV.2 place the global constrained optimum on the active constraint set under their stated conditions; may also contain non-optimal points. A natural algorithmic strategy is therefore to improve reward along while regulating the iterates toward . Motivated by this, we propose Boundary-Seeking Policy Gradient (BSPG) Algorithm (algorithm 1) in this section, which implements this strategy through a gradient decomposition that separates the two goals into orthogonal components.
V-A Gradient Decomposition
BSPG seeks to improve reward along the constraint manifold while steering the iterates toward it when necessary. These two roles naturally correspond to the tangential and normal directions of , motivating the following decomposition. At any with , the tangent space of the cost level set (which coincides with the tangent space of when ) is The cost gradient is normal to the level set , which induces a natural splitting of any vector into the tangential part and the normal part where:
By construction, a first-order update along leaves the cost objective unchanged, since . We therefore define the tangential reward gradient as
| (13) |
Hence, whenever , it yields a first-order improvement in the reward objective while leaving the cost objective unchanged, irrespective of the angle .
V-B The BSPG Update
The tangential reward gradient captures reward-improving motion along the constraint manifold, but by construction it does not regulate the iterate’s distance to . To control this distance, we add a normal component that attracts the iterate toward the manifold from either side. Specifically, we define the boundary-attraction term as
| (14) |
where is the estimated constraint residual defined in Section V-D and is a numerical stabilizer. Note that is a residual in cost value, not a Euclidean distance in parameter space. The resulting BSPG update is
| (15) |
where is the boundary-attraction coefficient, and the parameter update is The update in (15) combines a tangential component and a normal component. The term performs reward ascent while preserving the cost objective to first order. The term provides signed attraction toward the boundary: when , the iterate is infeasible and acts to decrease ; when , the iterate lies in the feasible interior and acts to increase . In both cases, the strength of this attraction scales with .
Fig. 1 illustrates the resulting geometry against ESPO [18]: on the feasible side (Fig. 1b), points outward toward , reducing conservatism through a mechanism absent in ESPO (Fig. 1a); on the infeasible side (Fig. 1d), restores feasibility while continues reward improvement along the boundary, whereas ESPO (Fig. 1c) folds the cost correction into a single combined direction.
Fig. 2 traces both methods on a synthetic problem whose unconstrained reward maximizer lies beyond the boundary: from the same feasible start, ESPO remains interior while BSPG reaches the active boundary and then improves reward along it.
V-C Implicit Lagrangian Interpretation
Although BSPG is derived from a geometric decomposition into tangential and normal directions, its update also admits an equivalent Lagrangian interpretation. In particular, the combined direction in (15) can be rewritten as a gradient step on a Lagrangian objective with an automatically induced multiplier. Define the implicit multiplier as:
| (16) |
where the gradient in (18) is evaluated with held fixed at . Eq. (18) shows that each BSPG step is equivalent to a gradient-ascent step on the Lagrangian with the multiplier induced automatically by the local gradient geometry and the boundary signal.
The implicit multiplier in (16) consists of two terms with distinct roles. The first term, , is the projection coefficient of the reward gradient onto the cost gradient. The second term, , introduces a boundary-dependent correction that modulates the effective penalty according to the signed residual: in the feasible interior () it lowers , tilting the update toward higher cost, and under positive gradient alignment, higher reward, until the residual closes. We emphasize that is an algebraic coefficient rather than a learned dual variable, and it need not be nonnegative away from a KKT point. If the iterates converge to a stationary point on , then and approaches the equality-stationarity coefficient of Theorem VI.4, which is a valid KKT multiplier exactly when the limit is also locally optimal over .
V-D Boundary Distance Estimation
The BSPG update in (15), equivalently the implicit multiplier in (16), depends on the constraint residual , which is not directly observable during training. We therefore estimate it by combining the learned cost-value network with a residual batch correction:
| (19) |
where is the number of trajectories in the batch, are the initial states, is the mean discounted cost return from the batch, and is the number of state–action pairs. The first term estimates the cost objective from the initial-state distribution through the critic; the second is a batch calibration term that vanishes when matches the empirical cost returns. Because the two averages are taken under different state distributions, no general unbiasedness or variance-reduction claim follows without additional assumptions on the critic and the sampling process; we use (19) as an implementation heuristic. The theory in Section VI analyzes the exact residual and does not depend on this estimator.
V-E Practical BSPG Implementation
Algorithm 1 presents the practical implementation of BSPG built upon PPO[25]. Lines 5–7 estimate the boundary distance(Eq.(19)), while lines 11–16 compute the shaped update direction(Eq.(13),(15)); the remaining steps follow the standard PPO procedure. Relative to PPO, BSPG introduces only two additional hyperparameters: the boundary-attraction coefficient and the clipping threshold for .
VI Theoretical Analysis
We now establish the convergence properties of the ideal BSPG update with exact gradients and ; the statements below do not claim convergence of the stochastic normalized PPO implementation. Three results are proved: the constraint residual converges to zero from either side (with a finite-horizon rate), the tangential component is a reward-ascent direction on the boundary, and any convergent run is characterized at its limit. The proofs of Theorems VI.1–VI.4 are provided in Appendices -B–-D. We begin by collecting the regularity assumptions.
Assumption 1 (Smoothness and bounded gradients)
There is a compact set containing all exact BSPG iterates and the line segments between consecutive iterates. On , and have -Lipschitz gradients, and .
Assumption 2 (Constraint regularity)
There are constants and such that and for all .
Assumption 3 (Diminishing step sizes)
The step size sequence satisfies: and
Assumptions 1 and 3 are standard in first-order constrained policy optimization [16]; if and , the residual bound holds automatically with . Assumption 2 is a nondegeneracy (constraint-qualification) condition excluding points where the cost gradient vanishes; it makes the local cost level sets regular and ensures the decomposition (13) is well defined at every iterate.
We first show that BSPG drives the constraint residual to zero.
Theorem VI.1 (Boundary Convergence)
Corollary VI.2 (Finite-horizon residual bound)
Let and draw with . Then
| (22) |
In particular, for constant over a fixed horizon , the bound is .
The Lyapunov function is symmetric in the sign of the residual, so the ideal normal component regulates the target cost level from either side. This differs from a standard projected dual update: a negative residual can decrease the dual variable only until it reaches zero, after which the boundary signal is lost, whereas BSPG continues to apply a residual-proportional normal correction toward the prescribed cost level.
It is worth noting that the Lyapunov function is symmetric in the sign of , so the boundary-seeking mechanism operates identically whether the current iterate is feasible or infeasible. This contrasts with Lagrangian methods, where the multiplier update acts only on positive violations.
The boundary-attraction term drives ; however, it does not by itself guarantee reward improvement. The following theorem shows that the tangential component is a valid ascent direction for .
Theorem VI.3 (Reward Ascent)
For any with :
| (23) |
Equality holds iff . On the manifold (where and ), the BSPG update is a strict ascent direction for unless , i.e., unless is a first-order stationary point of the equality-constrained problem subject to .
We next characterize convergent runs of the exact update.
Theorem VI.4 (Convergent-limit characterization)
Under Assumptions 1–3, suppose the exact-gradient BSPG iterates converge: . Then and
| (24) |
i.e., is a first-order stationary point for maximizing on the active constraint set, and complementary slackness holds. If, in addition, is a local maximizer of on , then and satisfies the KKT conditions of (3).
Remark VI.5 (Limit-set extension)
The sequential hypothesis admits a fully elementary, self-contained proof (Appendix -D). Under the same assumptions, a limit-set version — every limit point of satisfies (24) — can be obtained through the ODE method and the chain-transitive form of LaSalle’s invariance principle [26]; we state the sequential version to keep the argument self-contained.
Remark VI.6 (Comparison with PCRPO)
PCRPO [17] establishes convergence to a KKT point satisfying , without further characterizing the constraint value at the limit. Under exact gradients, Theorem VI.1 drives the residual to zero, and Theorem VI.4 guarantees that the constraint is active, , at the limit of any convergent run. Moreover, whenever a method stops at an interior point with residual and , Proposition IV.5 shows that a fraction of the unused budget is locally convertible into a first-order reward gain of while preserving strict feasibility.
Remark VI.7 (Scope of the theory)
Theorem IV.1 and Corollary IV.2 identify the global constrained target; Theorems VI.1–VI.4 show that the ideal parameter update regulates this target cost level and characterize convergent runs. They do not establish global reward convergence for an arbitrary nonconvex policy class (which would require additional landscape structure or a separate tabular analysis), nor sample complexity or convergence guarantees for the stochastic normalized PPO implementation.
VII Experiments
Evaluation Setups. We evaluate our method on SafetyPointGoal1-v0 using the OmniSafe[27] framework. This task provides a standard constrained navigation setting for studying the reward–cost tradeoff in safe policy optimization.
Baselines. We compare BSPG against two closely related constrained RL baselines: CRPO[16] and ESPO[18]. CRPO is a constraint-driven policy optimization method that switches update behavior according to constraint satisfaction, emphasizing feasibility control. ESPO is a recent first-order safe policy optimization method that directly balances reward improvement and cost reduction through gradient-based policy updates.
Evaluation Metrics. We report three primary metrics throughout training: (i) average episodic reward, where higher values indicate better task performance; (ii) average episodic cost, where lower values indicate better constraint control; and (iii) boundary proximity, the empirical residual magnitude , where is the evaluation cost statistic; smaller values mean that the reported policy uses the prescribed budget more fully. The third metric is our primary diagnostic and, to our knowledge, has not been explicitly reported in prior Safe-RL work. By Theorem IV.1, smaller boundary proximity indicates tighter tracking of the active constraint boundary; by Proposition IV.5, under positive reward–cost gradient alignment, the remaining residual corresponds to locally recoverable reward. The residual alone is not a universal surrogate for reward, since the local reward change also depends on the gradient alignment and magnitudes.
As shown in Fig. 3, BSPG attains the highest episodic reward on SafetyPointGoal1-v0. At the same time, BSPG maintains episodic cost near the constraint limit, while both baselines remain more conservative and settle well inside the feasible region. This behavior is most clearly illustrated in the boundary-proximity plot, where BSPG remains consistently closest to zero, indicating tighter tracking of the active constraint boundary. Taken together, these results support the proposed boundary-regulation mechanism in the evaluated task; they do not by themselves imply a general performance ordering across environments.
VIII Conclusion
In this paper, we proposed Boundary-Seeking Policy Gradient (BSPG), a safe reinforcement learning method that explicitly drives policy updates toward the active constraint boundary while improving reward along it. By combining a tangential reward term with a signed boundary-attraction term, BSPG encourages boundary-aligned optimization rather than conservative interior solutions. On the theory side, occupancy-measure analysis identifies the active boundary as the global constrained target when no unconstrained reward maximizer is feasible, and the realizability corollary transfers this target to a policy class attaining the exact constrained value. For the ideal exact-gradient update, BSPG drives the signed residual to zero from either side with a finite-horizon bound, and any convergent run reaches a stationary point on the active constraint set, satisfying the KKT conditions when the limit is locally optimal over the feasible set. Empirically, BSPG attains a strong reward–safety trade-off in the evaluated task by making fuller use of the safety budget.
Acknowledgement
This work is partially supported by NSF ECCS Award #2534263.
References
- [1] D. Silver, T. Hubert, J. Schrittwieser, I. Antonoglou, M. Lai, A. Guez, M. Lanctot, L. Sifre, D. Kumaran, T. Graepel, T. Lillicrap, K. Simonyan, and D. Hassabis, “A general reinforcement learning algorithm that masters chess, shogi, and go through self-play,” Science, vol. 362, no. 6419, pp. 1140–1144, 2018.
- [2] Q. Li, Z. Peng, L. Feng, Q. Zhang, Z. Xue, and B. Zhou, “Metadrive: Composing diverse driving scenarios for generalizable reinforcement learning,” IEEE transactions on pattern analysis and machine intelligence, vol. 45, no. 3, pp. 3461–3475, 2022.
- [3] J. Kober, J. A. Bagnell, and J. Peters, “Reinforcement learning in robotics: A survey,” The International Journal of Robotics Research, vol. 32, no. 11, pp. 1238–1274, 2013.
- [4] E. Altman, Constrained Markov decision processes. CRC Press, 1999, vol. 7.
- [5] A. Stooke, J. Achiam, and P. Abbeel, “Responsive safety in reinforcement learning by pid lagrangian methods,” in Int. Conf. Machine Learning (ICML). PMLR, 2020, pp. 9133–9143.
- [6] S. Paternain, M. Calvo-Fullana, L. F. O. Chamon, and A. Ribeiro, “Safe policies for reinforcement learning via primal-dual methods,” IEEE Trans. Autom. Control, pp. 1–1, 2022.
- [7] H. Wei, X. Liu, and L. Ying, “Triple-Q: a model-free algorithm for constrained reinforcement learning with sublinear regret and zero constraint violation,” in Int. Conf. Artificial Intelligence and Statistics (AISTATS), 2022.
- [8] H. Wei, A. Ghosh, N. Shroff, L. Ying, and X. Zhou, “Provably efficient model-free algorithms for non-stationary CMDPs,” in Int. Conf. Artificial Intelligence and Statistics (AISTATS). PMLR, 2023, pp. 6527–6570.
- [9] H. Zhang, X. Peng, H. Wei, and X. Liu, “Safe and efficient: A primal-dual method for offline convex cmdps under partial data coverage,” in Advances Neural Information Processing Systems (NeurIPS), 2024.
- [10] D. Ding, X. Wei, Z. Yang, Z. Wang, and M. Jovanovic, “Provably efficient safe exploration via primal-dual policy optimization,” in Int. Conf. Artificial Intelligence and Statistics (AISTATS), vol. 130. PMLR, 2021, pp. 3304–3312.
- [11] J. Zhu, K. Yu, D. Lee, X. Liu, and H. Wei, “An optimistic algorithm for online cmdps with anytime adversarial constraints,” in Int. Conf. Machine Learning (ICML), ser. ICML’25. JMLR.org, 2025.
- [12] J. Achiam, D. Held, A. Tamar, and P. Abbeel, “Constrained policy optimization,” in Int. Conf. Machine Learning (ICML), vol. 70. JMLR, 2017, pp. 22–31.
- [13] T.-Y. Yang, J. Rosca, K. Narasimhan, and P. J. Ramadge, “Projection-based constrained policy optimization,” in Int. Conf. on Learning Representations (ICLR), 2020.
- [14] Y. Zhang, Q. Vuong, and K. Ross, “First order constrained optimization in policy space,” Advances in Neural Information Processing Systems, vol. 33, pp. 15 338–15 349, 2020.
- [15] L. Yang, J. Ji, J. Dai, L. Zhang, B. Zhou, P. Li, Y. Yang, and G. Pan, “Constrained update projection approach to safe policy optimization,” Advances in Neural Information Processing Systems, vol. 35, pp. 9111–9124, 2022.
- [16] T. Xu, Y. Liang, and G. Lan, “Crpo: A new approach for safe reinforcement learning with convergence guarantee,” in Int. Conf. Machine Learning (ICML), M. Meila and T. Z. 0001, Eds., vol. 139. PMLR, 2021, pp. 11 480–11 491.
- [17] S. Gu, B. Sel, Y. Ding, L. Wang, Q. Lin, M. Jin, and A. Knoll, “Balance reward and safety optimization for safe reinforcement learning: A perspective of gradient manipulation,” in AAAI Conf. Artificial Intelligence, vol. 38, no. 19, 2024, pp. 21 099–21 106.
- [18] S. Gu, L. Shi, Y. Ding, A. Knoll, C. Spanos, A. Wierman, and M. Jin, “Enhancing efficiency of safe reinforcement learning via sample manipulation,” Advances in Neural Information Processing Systems, vol. 37, pp. 17 247–17 285, 2024.
- [19] Y. Yao, Z. Liu, Z. Cen, P. Huang, T. Zhang, W. Yu, and D. Zhao, “Gradient shaping for multi-constraint safe reinforcement learning,” in 6th annual learning for dynamics & control conference. PMLR, 2024, pp. 25–39.
- [20] A. Ray, J. Achiam, and D. Amodei, “Benchmarking safe exploration in deep reinforcement learning,” arXiv preprint arXiv:1910.01708, vol. 7, no. 1, p. 2, 2019.
- [21] C. Tessler, D. J. Mankowitz, and S. Mannor, “Reward constrained policy optimization,” arXiv preprint arXiv:1805.11074, 2018.
- [22] Z. Wu, B. Tang, Q. Lin, C. Yu, S. Mao, Q. Xie, X. Wang, and D. Wang, “Off-policy primal-dual safe reinforcement learning,” arXiv preprint arXiv:2401.14758, 2024.
- [23] C. Xuan, F. Zhang, F. Yin, and H.-K. Lam, “Constrained proximal policy optimization,” arXiv preprint arXiv:2305.14216, 2023.
- [24] R. S. Sutton, D. McAllester, S. Singh, and Y. Mansour, “Policy gradient methods for reinforcement learning with function approximation,” in Advances Neural Information Processing Systems (NeurIPS), ser. NIPS’99, 1999.
- [25] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” 2017.
- [26] V. S. Borkar, Stochastic approximation: a dynamical systems viewpoint. Springer, 2009, vol. 48.
- [27] J. Ji, J. Zhou, B. Zhang, J. Dai, X. Pan, R. Sun, W. Huang, Y. Geng, M. Liu, and Y. Yang, “Omnisafe: An infrastructure for accelerating safe reinforcement learning research,” Journal of Machine Learning Research, vol. 25, no. 285, pp. 1–6, 2024.
-A Proof of Theorem IV.1
For a stationary policy , define its (normalized) occupancy measure . The set is a compact convex polytope, and are linear functionals of : for [4]; hence the maxima below are attained.
Suppose, for contradiction, that some constrained-optimal satisfies , and write . Fix any unconstrained maximizer with occupancy measure ; by hypothesis . If , then would itself be a feasible unconstrained maximizer, contradicting the hypothesis; hence . For let (convexity). By linearity, , and for every , a strictly positive threshold. Thus, for small , the policy induced by is feasible with strictly larger reward than a contradiction. Hence .
-B Proof of Theorem VI.1
Define . By the chain rule, . The function is -smooth with : for any ,
| (25) |
using (mean value theorem and Assumption 1), (Assumption 1), (Assumption 1), and (Assumption 2); the segment condition in Assumption 1 ensures these bounds hold along the update segments. By the descent lemma:
| (26) |
Since with exact gradients:
Tangential term.
Boundary term. (exact , exact ), so:
| (27) |
where we used (Assumption 2) and (Assumption 1). Therefore:
| (28) |
We know that , since and .
Finally, summing from to : . Letting gives .
To show : the recursion is a Robbins–Monro recursion with summable perturbation. Since , there exists with for all ; iterating from and using , , and the convolution with vanishes (standard argument), so and .
-C Proof of Theorem VI.3
Compute: . Also: . Both expressions are equal and non-negative by Cauchy–Schwarz. Equality holds iff iff confirming that for some scalar .
-D Proof of Theorem VI.4
By Theorem VI.1, ; since and is continuous, , i.e., .
Stationarity. Suppose, for contradiction, that . Since on (Assumption 2), the map is continuous at , and the normal component vanishes in the limit, . Hence , and there exists such that Projecting the recursion onto and summing from to : since (Assumption 3). This contradicts , whose left side converges to the finite value . Therefore , and since we may solve for : . Complementary slackness is immediate from .
Dual feasibility under local optimality. Suppose is a local maximizer of on and, for contradiction, . From stationarity, . Consider the direction : (reward increases to first order), (cost strictly decreases, so the point enters the feasible interior since ). Hence, for sufficiently small , the point attains strictly higher reward, contradicting local maximality. Therefore , and together with stationarity, primal feasibility, and complementary slackness, satisfies the KKT conditions of (3).