arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2608.10204v1 [cs.LG] 10 Aug 2026

Boundary-Seeking Policy Gradient for Safe Reinforcement Learning

Chenhua Fan1†, Jiahui Zhu1†, Yuhang Zhang1, and Honghao Wei1∗ contributed equally, corresponding author1School of EECS, Washington State University, Pullman, WA 99163, USA (E-mails: {chenhua.fan,jiahui.zhu, yuhang.zhang1, honghao.wei}@wsu.edu)
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 O(1/T)O(1/\sqrt{T}) 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. 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. 2.

    We propose BSPG and, for the ideal exact-gradient update, prove two-sided residual convergence with a finite-horizon O(1/T)O(1/\sqrt{T}) 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. 3.

    On a standard Safety-Gymnasium navigation task, BSPG achieves higher reward with tighter boundary adherence than the compared baselines.

Refer to caption
Figure 1: Local update geometry of ESPO [18] and BSPG. ESPO shapes its direction from the reward–cost gradient relation; BSPG adds a normal component set by the signed constraint residual. For the ideal update (δ^=δ\hat{\delta}=\delta), this component points toward \mathcal{M} from both the feasible (δ^<0\hat{\delta}<0) and infeasible (δ^>0\hat{\delta}>0) sides.

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 (𝒮,𝒜,P,r,c,γ,μ0,d)(\mathcal{S},\mathcal{A},P,r,c,\gamma,\mu_{0},d), where 𝒮\mathcal{S} and 𝒜\mathcal{A} denote the state and action spaces, P(ss,a)P(s^{\prime}\mid s,a) is the transition kernel, r:𝒮×𝒜r:\mathcal{S}\times\mathcal{A}\to\mathbb{R} and c:𝒮×𝒜c:\mathcal{S}\times\mathcal{A}\to\mathbb{R} are the reward and cost functions, γ(0,1)\gamma\in(0,1) is the discount factor, μ0\mu_{0} is the initial-state distribution, and dd\in\mathbb{R} is the cost threshold. A policy π:𝒮Δ(𝒜)\pi:\mathcal{S}\to\Delta(\mathcal{A}) maps each state to a distribution over actions. For a policy π𝜽\pi_{\bm{\theta}} parameterized by 𝜽p\bm{\theta}\in\mathbb{R}^{p}, define the expected discounted reward and cost as

Jr(π𝜽)\displaystyle J_{r}(\pi_{\bm{\theta}}) =𝔼τπ𝜽[t=0γtr(st,at)],\displaystyle=\mathbb{E}_{\tau\sim\pi_{\bm{\theta}}}\!\left[\sum_{t=0}^{\infty}\gamma^{t}r(s_{t},a_{t})\right], (1)
Jc(π𝜽)\displaystyle J_{c}(\pi_{\bm{\theta}}) =𝔼τπ𝜽[t=0γtc(st,at)].\displaystyle=\mathbb{E}_{\tau\sim\pi_{\bm{\theta}}}\!\left[\sum_{t=0}^{\infty}\gamma^{t}c(s_{t},a_{t})\right]. (2)

Safe RL aims to solve the following constrained optimization problem:

max𝜽Jr(π𝜽)s.t.Jc(π𝜽)d.\max_{\bm{\theta}}\;J_{r}(\pi_{\bm{\theta}})\;\;\textit{s.t.}\;\;J_{c}(\pi_{\bm{\theta}})\leq d. (3)

To describe the constraint geometry in policy parameter space, define

δ(𝜽)Jc(π𝜽)d,\displaystyle\delta(\bm{\theta})\triangleq J_{c}(\pi_{\bm{\theta}})-d, (constraint residual),\displaystyle\text{(constraint residual)}, (4)
{𝜽p:δ(𝜽)0},\displaystyle\mathcal{F}\triangleq\{\bm{\theta}\in\mathbb{R}^{p}:\delta(\bm{\theta})\leq 0\}, (feasible parameter set),\displaystyle\text{(feasible parameter set)}, (5)
{𝜽p:δ(𝜽)=0},\displaystyle\mathcal{M}\triangleq\{\bm{\theta}\in\mathbb{R}^{p}:\delta(\bm{\theta})=0\}, (active constraint set).\displaystyle\text{(active constraint set)}. (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 dγπ𝜽(s)=(1γ)t=0γtPrπ𝜽(st=s)d_{\gamma}^{\pi_{\bm{\theta}}}(s)=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\Pr_{\pi_{\bm{\theta}}}(s_{t}=s). Then

𝒈r\displaystyle\bm{g}_{r} =11γ𝔼sdγπ𝜽,aπ𝜽[Arπ𝜽(s,a)𝜽logπ𝜽(as)],\displaystyle=\frac{1}{1-\gamma}\mathbb{E}_{s\sim d_{\gamma}^{\pi_{\bm{\theta}}},\,a\sim\pi_{\bm{\theta}}}\!\left[A_{r}^{\pi_{\bm{\theta}}}(s,a)\,\nabla_{\bm{\theta}}\log\pi_{\bm{\theta}}(a\mid s)\right], (7)
𝒈c\displaystyle\bm{g}_{c} =11γ𝔼sdγπ𝜽,aπ𝜽[Acπ𝜽(s,a)𝜽logπ𝜽(as)],\displaystyle=\frac{1}{1-\gamma}\mathbb{E}_{s\sim d_{\gamma}^{\pi_{\bm{\theta}}},\,a\sim\pi_{\bm{\theta}}}\!\left[A_{c}^{\pi_{\bm{\theta}}}(s,a)\,\nabla_{\bm{\theta}}\log\pi_{\bm{\theta}}(a\mid s)\right], (8)

where Arπ𝜽(s,a)=Qrπ𝜽(s,a)Vrπ𝜽(s)A_{r}^{\pi_{\bm{\theta}}}(s,a)=Q_{r}^{\pi_{\bm{\theta}}}(s,a)-V_{r}^{\pi_{\bm{\theta}}}(s) is the reward advantage, and Acπ𝜽(s,a)=Qcπ𝜽(s,a)Vcπ𝜽(s)A_{c}^{\pi_{\bm{\theta}}}(s,a)=Q_{c}^{\pi_{\bm{\theta}}}(s,a)-V_{c}^{\pi_{\bm{\theta}}}(s) 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 𝜽=𝜽+α𝒗\bm{\theta}^{\prime}=\bm{\theta}+\alpha\bm{v}, differentiability gives Jk(𝜽)Jk(𝜽)=α𝒈k,𝒗+o(α)J_{k}(\bm{\theta}^{\prime})-J_{k}(\bm{\theta})=\alpha\left\langle\bm{g}_{k},\,\bm{v}\right\rangle+o(\alpha), so 𝒗\bm{v} improves reward to first order if 𝒈r,𝒗>0\left\langle\bm{g}_{r},\,\bm{v}\right\rangle>0 and reduces cost if 𝒈c,𝒗<0\left\langle\bm{g}_{c},\,\bm{v}\right\rangle<0. When 𝒈r,𝒈c>0\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle>0, a naive ascent step along 𝒈r\bm{g}_{r} 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 π𝜽\pi_{\bm{\theta}} satisfies the constraint with strict inequality, i.e., Jc(π𝜽)<dJ_{c}(\pi_{\bm{\theta}})<d, then, by continuity of JcJ_{c} in 𝜽\bm{\theta}, there exists a neighborhood around 𝜽\bm{\theta} 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 Π\Pi of all stationary policies. Suppose the feasible set {πΠ:Jc(π)d}\{\pi\in\Pi:J_{c}(\pi)\leq d\} is non-empty and that no unconstrained maximizer of JrJ_{r} over Π\Pi is feasible, i.e., every πrargmaxπΠJr(π)\pi_{r}^{\star}\in\arg\max_{\pi\in\Pi}J_{r}(\pi) satisfies Jc(πr)>dJ_{c}(\pi_{r}^{\star})>d. Then every constrained-optimal policy πargmaxπΠ:Jc(π)dJr(π)\pi^{\star}\in\arg\max_{\pi\in\Pi:\,J_{c}(\pi)\leq d}J_{r}(\pi) satisfies Jc(π)=dJ_{c}(\pi^{\star})=d.

Proof. For a stationary policy π\pi, define its (normalized) occupancy measure ρπ(s,a)=(1γ)t=0γtPrπ,μ0(st=s,at=a)\rho_{\pi}(s,a)=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\Pr_{\pi,\mu_{0}}(s_{t}=s,a_{t}=a). The set Λ={ρπ:πΠ}\Lambda=\{\rho_{\pi}:\pi\in\Pi\} is a compact convex polytope, and Jr,JcJ_{r},J_{c} are linear functionals of ρ\rho: Jk(π)=11γs,aρπ(s,a)k(s,a)J_{k}(\pi)=\frac{1}{1-\gamma}\sum_{s,a}\rho_{\pi}(s,a)\,k(s,a) for k{r,c}k\in\{r,c\} [4]; hence the maxima below are attained.

Suppose, for contradiction, that some constrained-optimal π\pi^{\star} satisfies Jc(π)<dJ_{c}(\pi^{\star})<d, and write ρ=ρπ\rho^{\star}=\rho_{\pi^{\star}}. Fix any unconstrained maximizer πr\pi_{r}^{\star} with occupancy measure ρr\rho_{r}; by hypothesis Jc(ρr)>dJ_{c}(\rho_{r})>d. If Jr(ρr)=Jr(ρ)J_{r}(\rho_{r})=J_{r}(\rho^{\star}), then π\pi^{\star} would itself be a feasible unconstrained maximizer, contradicting the hypothesis; hence Jr(ρr)>Jr(ρ)J_{r}(\rho_{r})>J_{r}(\rho^{\star}). For λ(0,1]\lambda\in(0,1] let ρλ=(1λ)ρ+λρrΛ\rho_{\lambda}=(1-\lambda)\rho^{\star}+\lambda\rho_{r}\in\Lambda (convexity). By linearity, Jr(ρλ)=(1λ)Jr(ρ)+λJr(ρr)>Jr(ρ)J_{r}(\rho_{\lambda})=(1-\lambda)J_{r}(\rho^{\star})+\lambda J_{r}(\rho_{r})>J_{r}(\rho^{\star}), and Jc(ρλ)=(1λ)Jc(ρ)+λJc(ρr)dJ_{c}(\rho_{\lambda})=(1-\lambda)J_{c}(\rho^{\star})+\lambda J_{c}(\rho_{r})\leq d for every λ(dJc(ρ))/(Jc(ρr)Jc(ρ))\lambda\leq\bigl(d-J_{c}(\rho^{\star})\bigr)/\bigl(J_{c}(\rho_{r})-J_{c}(\rho^{\star})\bigr), a strictly positive threshold. Thus, for small λ>0\lambda>0, the policy induced by ρλ\rho_{\lambda} is feasible with strictly larger reward than π,\pi^{\star}, a contradiction. Hence Jc(π)=dJ_{c}(\pi^{\star})=d. \blacksquare

The proof, which relies only on the convexity of the occupancy-measure polytope and the linearity of Jr,JcJ_{r},J_{c} in the occupancy measure [4].

Corollary IV.2 (Boundary optimality under realizability)

Suppose the assumptions of Theorem IV.1 hold, the maximum below is attained, and

max𝜽Jr(π𝜽)=maxπΠ:Jc(π)dJr(π).\max_{\bm{\theta}\in\mathcal{F}}J_{r}(\pi_{\bm{\theta}})\;=\;\max_{\pi\in\Pi:\,J_{c}(\pi)\leq d}J_{r}(\pi). (9)

Then every global maximizer of the parameterized problem (3) belongs to \mathcal{M}.

Indeed, any global maximizer 𝜽\bm{\theta}^{\star} attains the constrained value, so the induced policy π𝜽\pi_{\bm{\theta}^{\star}} is constrained-optimal in Π\Pi, and Theorem IV.1 gives Jc(π𝜽)=dJ_{c}(\pi_{\bm{\theta}^{\star}})=d. 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), Jr(π𝛉)J_{r}(\pi_{\bm{\theta}}) and Jc(π𝛉)J_{c}(\pi_{\bm{\theta}}) 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: \mathcal{M} serves as the target set, and the guarantees of Section VI are first-order statements about the parameter-space iterates under Assumptions 13; they do not assert that every parameter-space constrained maximizer lies on \mathcal{M}.

Remark IV.4

Theorem IV.1 identifies \mathcal{M} 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 Jr,JcJ_{r},J_{c} have LL-Lipschitz gradients near 𝛉\bm{\theta} and 𝐠c(𝛉)𝟎\bm{g}_{c}(\bm{\theta})\neq\bm{0} (cf. Assumptions 1 and 2). Fix β(0,1)\beta\in(0,1) and consider the fractional normal step

Δβ(𝜽)=βδ(𝜽)𝒈c(𝜽)2𝒈c(𝜽).\Delta_{\beta}(\bm{\theta})\;=\;-\,\beta\,\frac{\delta(\bm{\theta})}{\left\|\bm{g}_{c}(\bm{\theta})\right\|^{2}}\,\bm{g}_{c}(\bm{\theta}). (10)

Then

δ(𝜽+Δβ)\displaystyle\delta(\bm{\theta}+\Delta_{\beta}) =(1β)δ(𝜽)+O(δ(𝜽)2),\displaystyle=(1-\beta)\,\delta(\bm{\theta})+O\!\bigl(\delta(\bm{\theta})^{2}\bigr), (11)
Jr(π𝜽+Δβ)Jr(π𝜽)\displaystyle J_{r}(\pi_{\bm{\theta}+\Delta_{\beta}})-J_{r}(\pi_{\bm{\theta}}) =βδ(𝜽)𝒈r,𝒈c𝒈c2+O(δ(𝜽)2),\displaystyle=-\,\beta\,\delta(\bm{\theta})\,\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}+O\!\bigl(\delta(\bm{\theta})^{2}\bigr),

where both remainders are bounded by Lβ22𝐠c2δ(𝛉)2\frac{L\beta^{2}}{2\left\|\bm{g}_{c}\right\|^{2}}\,\delta(\bm{\theta})^{2}. Consequently, if δ(𝛉)<0\delta(\bm{\theta})<0, 𝐠r,𝐠c>0\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle>0, and

|δ(𝜽)|<2Lβmin{(1β)𝒈c2β,𝒈r,𝒈c},|\delta(\bm{\theta})|\;<\;\frac{2}{L\beta}\,\min\!\left\{\frac{(1-\beta)\left\|\bm{g}_{c}\right\|^{2}}{\beta},\;\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle\right\}, (12)

then 𝛉+Δβ\bm{\theta}+\Delta_{\beta} is still strictly feasible and attains a strictly larger reward, with first-order gain β|δ(𝛉)|𝐠r,𝐠c/𝐠c2\beta\,|\delta(\bm{\theta})|\,\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2}.

Proof. By LL-smoothness, δ(𝜽+Δβ)=δ(𝜽)+𝒈c,Δβ+Rc\delta(\bm{\theta}+\Delta_{\beta})=\delta(\bm{\theta})+\left\langle\bm{g}_{c},\,\Delta_{\beta}\right\rangle+R_{c} with |Rc|L2Δβ2|R_{c}|\leq\tfrac{L}{2}\left\|\Delta_{\beta}\right\|^{2}. Direct computation gives 𝒈c,Δβ=βδ(𝜽)\left\langle\bm{g}_{c},\,\Delta_{\beta}\right\rangle=-\beta\,\delta(\bm{\theta}) and Δβ=β|δ(𝜽)|/𝒈c\left\|\Delta_{\beta}\right\|=\beta|\delta(\bm{\theta})|/\left\|\bm{g}_{c}\right\|, hence |Rc|Lβ22𝒈c2δ(𝜽)2|R_{c}|\leq\frac{L\beta^{2}}{2\left\|\bm{g}_{c}\right\|^{2}}\delta(\bm{\theta})^{2}. Identically, Jr(π𝜽+Δβ)Jr(π𝜽)=𝒈r,Δβ+Rr=βδ(𝜽)𝒈r,𝒈c/𝒈c2+RrJ_{r}(\pi_{\bm{\theta}+\Delta_{\beta}})-J_{r}(\pi_{\bm{\theta}})=\left\langle\bm{g}_{r},\,\Delta_{\beta}\right\rangle+R_{r}=-\beta\,\delta(\bm{\theta})\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2}+R_{r} with |Rr|Lβ22𝒈c2δ(𝜽)2|R_{r}|\leq\frac{L\beta^{2}}{2\left\|\bm{g}_{c}\right\|^{2}}\delta(\bm{\theta})^{2}. When δ(𝜽)<0\delta(\bm{\theta})<0, we have (1β)δ(𝜽)<0(1-\beta)\delta(\bm{\theta})<0 and β|δ(𝜽)|𝒈r,𝒈c/𝒈c2>0\beta|\delta(\bm{\theta})|\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2}>0, and both strictly dominate the remainders exactly when (12) holds, yielding strict feasibility and a strict reward increase. \blacksquare

Proposition IV.5 makes the intended claim precise: not every interior policy incurs a reward loss; rather, under positive gradient alignment, a fraction β\beta of the unused cost budget can be converted into a first-order reward gain of β|δ|𝒈r,𝒈c/𝒈c2\beta|\delta|\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2} 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 \mathcal{M} under their stated conditions; \mathcal{M} may also contain non-optimal points. A natural algorithmic strategy is therefore to improve reward along \mathcal{M} while regulating the iterates toward \mathcal{M}. 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 \mathcal{M}, motivating the following decomposition. At any 𝜽\bm{\theta} with 𝒈c𝟎\bm{g}_{c}\neq\bm{0}, the tangent space of the cost level set {𝜽:Jc(π𝜽)=Jc(π𝜽)}\{\bm{\theta}^{\prime}:J_{c}(\pi_{\bm{\theta}^{\prime}})=J_{c}(\pi_{\bm{\theta}})\} (which coincides with the tangent space of \mathcal{M} when 𝜽\bm{\theta}\in\mathcal{M}) is T𝜽={𝒗p:𝒗,𝒈c=0}.T_{\bm{\theta}}\mathcal{M}=\{\bm{v}\in\mathbb{R}^{p}:\left\langle\bm{v},\,\bm{g}_{c}\right\rangle=0\}. The cost gradient 𝒈c\bm{g}_{c} is normal to the level set {Jc=const}\{J_{c}=\text{const}\}, which induces a natural splitting of any vector 𝒈p\bm{g}\in\mathbb{R}^{p} into the tangential part and the normal part 𝒈=𝒈+𝒈\bm{g}=\bm{g}^{\perp}+\bm{g}^{\parallel} where:

𝒈\displaystyle\bm{g}^{\perp} =𝒈𝒈,𝒈c𝒈c2𝒈cT𝜽,\displaystyle=\bm{g}-\frac{\left\langle\bm{g},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}\;\in\;T_{\bm{\theta}}\mathcal{M},
𝒈\displaystyle\bm{g}^{\parallel} =𝒈,𝒈c𝒈c2𝒈cspan(𝒈c).\displaystyle=\frac{\left\langle\bm{g},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}\;\in\;\mathrm{span}(\bm{g}_{c}).

By construction, a first-order update along 𝒈\bm{g}^{\perp} leaves the cost objective unchanged, since 𝜽Jc,𝒈=𝒈c,𝒈=0\left\langle\nabla_{\bm{\theta}}J_{c},\,\bm{g}^{\perp}\right\rangle=\left\langle\bm{g}_{c},\,\bm{g}^{\perp}\right\rangle=0. We therefore define the tangential reward gradient as

𝒈r=𝒈r𝒈r,𝒈c𝒈c2𝒈c.\displaystyle\bm{g}_{r}^{\perp}=\bm{g}_{r}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}. (13)

Hence, whenever 𝒈r𝟎\bm{g}_{r}^{\perp}\neq\bm{0}, it yields a first-order improvement in the reward objective while leaving the cost objective unchanged, irrespective of the angle θrc\theta_{rc}.

V-B The BSPG Update

The tangential reward gradient 𝒈r\bm{g}_{r}^{\perp} captures reward-improving motion along the constraint manifold, but by construction it does not regulate the iterate’s distance to \mathcal{M}. 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

𝒈b=δ^𝒈c𝒈c+ε,\bm{g}_{b}=-\hat{\delta}\cdot\frac{\bm{g}_{c}}{\left\|\bm{g}_{c}\right\|+\varepsilon}, (14)

where δ^\hat{\delta} is the estimated constraint residual defined in Section V-D and ε>0\varepsilon>0 is a numerical stabilizer. Note that δ=Jcd\delta=J_{c}-d is a residual in cost value, not a Euclidean distance in parameter space. The resulting BSPG update is

𝒈up=𝒈r+η𝒈b,\bm{g}_{\mathrm{up}}=\bm{g}_{r}^{\perp}+\eta\cdot\bm{g}_{b}, (15)

where η>0\eta>0 is the boundary-attraction coefficient, and the parameter update is 𝜽t+1=𝜽t+αt𝒈up,t.\bm{\theta}_{t+1}=\bm{\theta}_{t}+\alpha_{t}\bm{g}_{\mathrm{up},t}. The update in (15) combines a tangential component and a normal component. The term 𝒈r\bm{g}_{r}^{\perp} performs reward ascent while preserving the cost objective to first order. The term 𝒈b\bm{g}_{b} provides signed attraction toward the boundary: when δ^>0\hat{\delta}>0, the iterate is infeasible and 𝒈b\bm{g}_{b} acts to decrease JcJ_{c}; when δ^<0\hat{\delta}<0, the iterate lies in the feasible interior and 𝒈b\bm{g}_{b} acts to increase JcJ_{c}. In both cases, the strength of this attraction scales with |δ^||\hat{\delta}|.

Fig. 1 illustrates the resulting geometry against ESPO [18]: on the feasible side (Fig. 1b), 𝒈b\bm{g}_{b} points outward toward \mathcal{M}, reducing conservatism through a mechanism absent in ESPO (Fig. 1a); on the infeasible side (Fig. 1d), 𝒈b\bm{g}_{b} restores feasibility while 𝒈r\bm{g}_{r}^{\perp} continues reward improvement along the boundary, whereas ESPO (Fig. 1c) folds the cost correction into a single combined direction.

Refer to caption
Figure 2: Update trajectories of BSPG and ESPO on a synthetic constrained problem; the example only visualizes the two update components.

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:

λt=𝒈r,𝒈c𝒈c2+ηδ^𝒈c+ε.\lambda_{t}=\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}+\frac{\eta\hat{\delta}}{\left\|\bm{g}_{c}\right\|+\varepsilon}. (16)

Substituting (13) into (15) and collecting the terms along 𝒈c\bm{g}_{c} yields

𝒈up\displaystyle\bm{g}_{\mathrm{up}} =𝒈r𝒈r,𝒈c𝒈c2𝒈cηδ^𝒈c𝒈c+ε\displaystyle=\bm{g}_{r}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}-\eta\hat{\delta}\frac{\bm{g}_{c}}{\left\|\bm{g}_{c}\right\|+\varepsilon}
=𝒈r(𝒈r,𝒈c𝒈c2+ηδ^𝒈c+ε)λt𝒈c\displaystyle=\bm{g}_{r}-\underbrace{\left(\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}+\frac{\eta\hat{\delta}}{\left\|\bm{g}_{c}\right\|+\varepsilon}\right)}_{\displaystyle\lambda_{t}}\bm{g}_{c} (17)
=𝜽[Jr(π𝜽)λJc(π𝜽)]|λ=λt,\displaystyle=\nabla_{\bm{\theta}}\!\left[J_{r}(\pi_{\bm{\theta}})-\lambda J_{c}(\pi_{\bm{\theta}})\right]\!\bigg|_{\lambda=\lambda_{t}}, (18)

where the gradient in (18) is evaluated with λ\lambda held fixed at λt\lambda_{t}. Eq. (18) shows that each BSPG step is equivalent to a gradient-ascent step on the Lagrangian L(θ,λ)=Jr(πθ)λJc(πθ),L(\theta,\lambda)=J_{r}(\pi_{\theta})-\lambda J_{c}(\pi_{\theta}), with the multiplier λt\lambda_{t} 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, 𝒈r,𝒈c/𝒈c2\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2}, is the projection coefficient of the reward gradient onto the cost gradient. The second term, ηδ^/(𝒈c+ε)\eta\hat{\delta}/\!(\left\|\bm{g}_{c}\right\|+\varepsilon), introduces a boundary-dependent correction that modulates the effective penalty according to the signed residual: in the feasible interior (δ^<0\hat{\delta}<0) it lowers λt\lambda_{t}, tilting the update toward higher cost, and under positive gradient alignment, higher reward, until the residual closes. We emphasize that λt\lambda_{t} 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 \mathcal{M}, then δ^0\hat{\delta}\to 0 and λt\lambda_{t} approaches the equality-stationarity coefficient λ\lambda^{*} of Theorem VI.4, which is a valid KKT multiplier exactly when the limit is also locally optimal over \mathcal{F}.

V-D Boundary Distance Estimation

The BSPG update in (15), equivalently the implicit multiplier in (16), depends on the constraint residual δ(𝜽t)=Jc(π𝜽t)d\delta(\bm{\theta}_{t})=J_{c}(\pi_{\bm{\theta}_{t}})-d, which is not directly observable during training. We therefore estimate it by combining the learned cost-value network VcV_{c} with a residual batch correction:

δ^t=1Ni=1NVc(s0i)critic at s0+(c¯batch1|τ|(s,a)τVc(s))residual bias correctiond.\hat{\delta}_{t}=\underbrace{\frac{1}{N}\sum_{i=1}^{N}V_{c}(s_{0}^{i})}_{\text{critic at }s_{0}}+\underbrace{\left(\bar{c}_{\mathrm{batch}}-\frac{1}{|\tau|}\sum_{(s,a)\in\tau}V_{c}(s)\right)}_{\text{residual bias correction}}-d. (19)

where NN is the number of trajectories in the batch, s0is_{0}^{i} are the initial states, c¯batch\bar{c}_{\mathrm{batch}} is the mean discounted cost return from the batch, and |τ||\tau| 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 VcV_{c} 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 δ^t=δt\hat{\delta}_{t}=\delta_{t} 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 η\eta and the clipping threshold δmax\delta_{\max} for δ^\hat{\delta}.

Algorithm 1 BSPG
1:Input: Policy π𝜽\pi_{\bm{\theta}}, value networks VV, VcV_{c}, threshold dd, coefficient η\eta, stabilizer ε\varepsilon, clip range εclip\varepsilon_{\mathrm{clip}}, residual clip δmax\delta_{\max}, step size α\alpha
2:while not converged do
3:  Collect rollout τπ𝜽\tau\sim\pi_{\bm{\theta}} for TT steps
4:  Compute GAE reward advantages A^\hat{A} using VV; cost advantages A^c\hat{A}_{c} using VcV_{c}
5:  //Boundary estimation (Eq. 19)
6:  δ^1NiVc(s0i)+(c¯batch1|τ|sτVc(s))d\hat{\delta}\!\leftarrow\!\frac{1}{N}\sum_{i}V_{c}(s_{0}^{i})\!+\!\bigl(\bar{c}_{\mathrm{batch}}\!-\!\frac{1}{|\tau|}\sum_{s\in\tau}V_{c}(s)\bigr)-d
7:  δ^clip(δ^,δmax,δmax)\hat{\delta}\leftarrow\mathrm{clip}\!\left(\hat{\delta},\,-\delta_{\max},\,\delta_{\max}\right)
8:  //Surrogate gradients (PPO clipped objectives)
9:  Lr(𝜽)PPO-clip surrogate for reward using A^L_{r}(\bm{\theta})\leftarrow\text{PPO-clip surrogate for reward using }\hat{A}
10:  Lc(𝜽)PPO-clip surrogate for cost using A^cL_{c}(\bm{\theta})\leftarrow\text{PPO-clip surrogate for cost using }\hat{A}_{c}
11:  𝒈r𝜽Lr(𝜽)\bm{g}_{r}\leftarrow\nabla_{\bm{\theta}}L_{r}(\bm{\theta}); 𝒈c𝜽Lc(𝜽)\bm{g}_{c}\leftarrow\nabla_{\bm{\theta}}L_{c}(\bm{\theta})
12:  Normalize: 𝒈r^𝒈r/(𝒈r+ε)\hat{\bm{g}_{r}}\leftarrow\bm{g}_{r}/(\left\|\bm{g}_{r}\right\|+\varepsilon); 𝒈c^𝒈c/(𝒈c+ε)\hat{\bm{g}_{c}}\leftarrow\bm{g}_{c}/(\left\|\bm{g}_{c}\right\|+\varepsilon)
13:  //Gradient decomposition
14:  𝒈r𝒈r^𝒈r^,𝒈c^𝒈c^2+ε𝒈c^\bm{g}_{r}^{\perp}\leftarrow\hat{\bm{g}_{r}}-\dfrac{\left\langle\hat{\bm{g}_{r}},\,\hat{\bm{g}_{c}}\right\rangle}{\left\|\hat{\bm{g}_{c}}\right\|^{2}+\varepsilon}\hat{\bm{g}_{c}}
15:  // Boundary attraction
16:  𝒈bδ^𝒈c^/(𝒈c^+ε)\bm{g}_{b}\leftarrow-\hat{\delta}\cdot\hat{\bm{g}_{c}}/(\left\|\hat{\bm{g}_{c}}\right\|+\varepsilon)
17:  // Shaped gradient update
18:  𝜽𝜽+α(𝒈r+η𝒈b)\bm{\theta}\leftarrow\bm{\theta}+\alpha\,(\bm{g}_{r}^{\perp}+\eta\,\bm{g}_{b})
19:  Update VV and VcV_{c} via MSE on GAE return targets
20:end while

VI Theoretical Analysis

We now establish the convergence properties of the ideal BSPG update with exact gradients and δ^t=δt\hat{\delta}_{t}=\delta_{t}; 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.1VI.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 Θ\Theta containing all exact BSPG iterates and the line segments between consecutive iterates. On Θ\Theta, JrJ_{r} and JcJ_{c} have LL-Lipschitz gradients, and 𝐠r,𝐠cG\left\|\bm{g}_{r}\right\|,\left\|\bm{g}_{c}\right\|\leq G.

Assumption 2 (Constraint regularity)

There are constants μ>0\mu>0 and D<D<\infty such that 𝐠c(𝛉)μ\left\|\bm{g}_{c}(\bm{\theta})\right\|\geq\mu and |δ(𝛉)|D|\delta(\bm{\theta})|\leq D for all 𝛉Θ\bm{\theta}\in\Theta.

Assumption 3 (Diminishing step sizes)

The step size sequence {αt}t0\{\alpha_{t}\}_{t\geq 0} satisfies: t=0αt=,\sum_{t=0}^{\infty}\alpha_{t}=\infty, and t=0αt2<.\sum_{t=0}^{\infty}\alpha_{t}^{2}<\infty.

Assumptions 1 and 3 are standard in first-order constrained policy optimization [16]; if 0c(s,a)cmax0\leq c(s,a)\leq c_{\max} and 0dcmax/(1γ)0\leq d\leq c_{\max}/(1-\gamma), the residual bound holds automatically with D=max{d,cmax/(1γ)d}D=\max\{d,\,c_{\max}/(1-\gamma)-d\}. 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 Jc(π𝜽t)dJ_{c}(\pi_{\bm{\theta}_{t}})-d to zero.

Theorem VI.1 (Boundary Convergence)

Under Assumptions 13, let δtδ(𝛉t)=Jc(π𝛉t)d\delta_{t}\triangleq\delta(\bm{\theta}_{t})=J_{c}(\pi_{\bm{\theta}_{t}})-d denote the signed constraint violation at iteration tt. The sequence {δt}\{\delta_{t}\} generated by exact-gradient BSPG satisfies:

V(𝜽t+1)V(𝜽t)μαtδt2+CRαt2,V(\bm{\theta}_{t+1})\leq V(\bm{\theta}_{t})-\mu^{\prime}\alpha_{t}\,\delta_{t}^{2}+C_{R}\alpha_{t}^{2}, (20)

where V(𝛉)=12δ(𝛉)2V(\bm{\theta})=\tfrac{1}{2}\delta(\bm{\theta})^{2}, μ=ημ2G+ε\mu^{\prime}=\frac{\eta\mu^{2}}{G+\varepsilon}, and CR=(G2+LD)(G2+η2D2)C_{R}=(G^{2}+LD)(G^{2}+\eta^{2}D^{2}). Consequently:

t=0αtδt2<andδt0.\sum_{t=0}^{\infty}\alpha_{t}\,\delta_{t}^{2}<\infty\qquad\text{and}\qquad\delta_{t}\to 0. (21)

Thus, Jc(π𝛉t)dJ_{c}(\pi_{\bm{\theta}_{t}})\to d from either side of the boundary.

Corollary VI.2 (Finite-horizon residual bound)

Let AT=t=0T1αtA_{T}=\sum_{t=0}^{T-1}\alpha_{t} and draw τ{0,,T1}\tau\in\{0,\ldots,T-1\} with Pr(τ=t)=αt/AT\Pr(\tau=t)=\alpha_{t}/A_{T}. Then

𝔼[δτ2]V0+CRt=0T1αt2μAT.\mathbb{E}[\delta_{\tau}^{2}]\;\leq\;\frac{V_{0}+C_{R}\sum_{t=0}^{T-1}\alpha_{t}^{2}}{\mu^{\prime}A_{T}}. (22)

In particular, for constant αt=α¯/T\alpha_{t}=\bar{\alpha}/\sqrt{T} over a fixed horizon TT, the bound is O(1/T)O(1/\sqrt{T}).

The corollary follows by summing (20) over t<Tt<T and dividing by μAT\mu^{\prime}A_{T}; see Appendix -B.

The Lyapunov function V=12δ2V=\tfrac{1}{2}\delta^{2} 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 V=12δ2V=\frac{1}{2}\delta^{2} is symmetric in the sign of δ\delta, 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 δ0\delta\to 0; however, it does not by itself guarantee reward improvement. The following theorem shows that the tangential component 𝒈r\bm{g}_{r}^{\perp} is a valid ascent direction for JrJ_{r}.

Theorem VI.3 (Reward Ascent)

For any 𝛉\bm{\theta} with 𝐠c𝟎\bm{g}_{c}\neq\bm{0}:

𝒈r,𝒈r=𝒈r20.\left\langle\bm{g}_{r},\,\bm{g}_{r}^{\perp}\right\rangle=\left\|\bm{g}_{r}^{\perp}\right\|^{2}\geq 0. (23)

Equality holds iff 𝐠r𝐠c\bm{g}_{r}\parallel\bm{g}_{c}. On the manifold \mathcal{M} (where δ=0\delta=0 and 𝐠up=𝐠r\bm{g}_{\mathrm{up}}=\bm{g}_{r}^{\perp}), the BSPG update is a strict ascent direction for JrJ_{r} unless 𝐠r𝐠c\bm{g}_{r}\parallel\bm{g}_{c}, i.e., unless 𝛉\bm{\theta} is a first-order stationary point of the equality-constrained problem maxJr\max J_{r} subject to Jc=dJ_{c}=d.

We next characterize convergent runs of the exact update.

Theorem VI.4 (Convergent-limit characterization)

Under Assumptions 13, suppose the exact-gradient BSPG iterates converge: 𝛉t𝛉\bm{\theta}_{t}\to\bm{\theta}^{*}. Then 𝛉\bm{\theta}^{*}\in\mathcal{M} and

𝒈r(𝜽)=λ𝒈c(𝜽),λ=𝒈r(𝜽),𝒈c(𝜽)𝒈c(𝜽)2,\bm{g}_{r}(\bm{\theta}^{*})=\lambda^{*}\bm{g}_{c}(\bm{\theta}^{*}),\qquad\lambda^{*}=\frac{\left\langle\bm{g}_{r}(\bm{\theta}^{*}),\,\bm{g}_{c}(\bm{\theta}^{*})\right\rangle}{\left\|\bm{g}_{c}(\bm{\theta}^{*})\right\|^{2}}, (24)

i.e., 𝛉\bm{\theta}^{*} is a first-order stationary point for maximizing JrJ_{r} on the active constraint set, and complementary slackness λ(Jc(π𝛉)d)=0\lambda^{*}(J_{c}(\pi_{\bm{\theta}^{*}})-d)=0 holds. If, in addition, 𝛉\bm{\theta}^{*} is a local maximizer of JrJ_{r} on \mathcal{F}, then λ0\lambda^{*}\geq 0 and 𝛉\bm{\theta}^{*} satisfies the KKT conditions of (3).

Remark VI.5 (Limit-set extension)

The sequential hypothesis 𝛉t𝛉\bm{\theta}_{t}\to\bm{\theta}^{*} admits a fully elementary, self-contained proof (Appendix -D). Under the same assumptions, a limit-set version — every limit point of {𝛉t}\{\bm{\theta}_{t}\} 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 𝛉\bm{\theta}^{\dagger} satisfying Jc(π𝛉)dJ_{c}(\pi_{\bm{\theta}^{\dagger}})\leq d, 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, Jc(π𝛉)=dJ_{c}(\pi_{\bm{\theta}^{*}})=d, at the limit of any convergent run. Moreover, whenever a method stops at an interior point 𝛉\bm{\theta}^{\dagger} with residual δ=Jc(π𝛉)d<0\delta^{\dagger}=J_{c}(\pi_{\bm{\theta}^{\dagger}})-d<0 and 𝐠r,𝐠c>0\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle>0, Proposition IV.5 shows that a fraction β\beta of the unused budget is locally convertible into a first-order reward gain of β|δ|𝐠r,𝐠c/𝐠c2\beta|\delta^{\dagger}|\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle/\left\|\bm{g}_{c}\right\|^{2} 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.1VI.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 |C^d||\widehat{C}-d|, where C^\widehat{C} 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.

Refer to caption
Figure 3: Results on SafetyPointGoal1-v0.

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 O(1/T)O(1/\sqrt{T}) 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 π\pi, define its (normalized) occupancy measure ρπ(s,a)=(1γ)t=0γtPrπ,μ0(st=s,at=a)\rho_{\pi}(s,a)=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\Pr_{\pi,\mu_{0}}(s_{t}=s,a_{t}=a). The set Λ={ρπ:πΠ}\Lambda=\{\rho_{\pi}:\pi\in\Pi\} is a compact convex polytope, and Jr,JcJ_{r},J_{c} are linear functionals of ρ\rho: Jk(π)=11γs,aρπ(s,a)k(s,a)J_{k}(\pi)=\frac{1}{1-\gamma}\sum_{s,a}\rho_{\pi}(s,a)\,k(s,a) for k{r,c}k\in\{r,c\} [4]; hence the maxima below are attained.

Suppose, for contradiction, that some constrained-optimal π\pi^{\star} satisfies Jc(π)<dJ_{c}(\pi^{\star})<d, and write ρ=ρπ\rho^{\star}=\rho_{\pi^{\star}}. Fix any unconstrained maximizer πr\pi_{r}^{\star} with occupancy measure ρr\rho_{r}; by hypothesis Jc(ρr)>dJ_{c}(\rho_{r})>d. If Jr(ρr)=Jr(ρ)J_{r}(\rho_{r})=J_{r}(\rho^{\star}), then π\pi^{\star} would itself be a feasible unconstrained maximizer, contradicting the hypothesis; hence Jr(ρr)>Jr(ρ)J_{r}(\rho_{r})>J_{r}(\rho^{\star}). For λ(0,1]\lambda\in(0,1] let ρλ=(1λ)ρ+λρrΛ\rho_{\lambda}=(1-\lambda)\rho^{\star}+\lambda\rho_{r}\in\Lambda (convexity). By linearity, Jr(ρλ)=(1λ)Jr(ρ)+λJr(ρr)>Jr(ρ)J_{r}(\rho_{\lambda})=(1-\lambda)J_{r}(\rho^{\star})+\lambda J_{r}(\rho_{r})>J_{r}(\rho^{\star}), and Jc(ρλ)=(1λ)Jc(ρ)+λJc(ρr)dJ_{c}(\rho_{\lambda})=(1-\lambda)J_{c}(\rho^{\star})+\lambda J_{c}(\rho_{r})\leq d for every λ(dJc(ρ))/(Jc(ρr)Jc(ρ))\lambda\leq\bigl(d-J_{c}(\rho^{\star})\bigr)/\bigl(J_{c}(\rho_{r})-J_{c}(\rho^{\star})\bigr), a strictly positive threshold. Thus, for small λ>0\lambda>0, the policy induced by ρλ\rho_{\lambda} is feasible with strictly larger reward than π,\pi^{\star}, a contradiction. Hence Jc(π)=dJ_{c}(\pi^{\star})=d. \blacksquare

-B Proof of Theorem VI.1

Define V(𝜽)=12δ(𝜽)2V(\bm{\theta})=\tfrac{1}{2}\delta(\bm{\theta})^{2}. By the chain rule, 𝜽V=δ𝒈c\nabla_{\bm{\theta}}V=\delta\bm{g}_{c}. The function VV is LVL_{V}-smooth with LV=G2+LDL_{V}=G^{2}+LD: for any 𝜽,𝜽p\bm{\theta},\bm{\theta}^{\prime}\in\mathbb{R}^{p},

𝜽V(𝜽)𝜽V(𝜽)\displaystyle\left\|\nabla_{\bm{\theta}}V(\bm{\theta}^{\prime})\!-\!\nabla_{\bm{\theta}}V(\bm{\theta})\right\|\leq (|δδ|𝒈c+|δ|𝒈c𝒈c)\displaystyle\bigl(|\delta^{\prime}-\delta|\!\cdot\!\left\|\bm{g}_{c}^{\prime}\right\|+|\delta|\!\cdot\!\left\|\bm{g}_{c}^{\prime}-\bm{g}_{c}\right\|\bigr)
\displaystyle\leq (G2+LD)𝜽𝜽,\displaystyle(G^{2}+LD)\left\|\bm{\theta}^{\prime}-\bm{\theta}\right\|, (25)

using |δδ|G𝜽𝜽|\delta^{\prime}-\delta|\leq G\left\|\bm{\theta}^{\prime}-\bm{\theta}\right\| (mean value theorem and Assumption 1), 𝒈cG\left\|\bm{g}_{c}\right\|\leq G (Assumption 1), 𝒈c𝒈cL𝜽𝜽\left\|\bm{g}_{c}^{\prime}-\bm{g}_{c}\right\|\leq L\left\|\bm{\theta}^{\prime}-\bm{\theta}\right\| (Assumption 1), and |δ|D|\delta|\leq D (Assumption 2); the segment condition in Assumption 1 ensures these bounds hold along the update segments. By the descent lemma:

Vt+1Vt+αtδt𝒈ct,𝒈upt+LVαt22𝒈upt2.V_{t+1}\leq V_{t}+\alpha_{t}\delta_{t}\left\langle\bm{g}_{c}^{t},\,\bm{g}_{\mathrm{up}}^{t}\right\rangle+\frac{L_{V}\alpha_{t}^{2}}{2}\left\|\bm{g}_{\mathrm{up}}^{t}\right\|^{2}. (26)

Since 𝒈up=𝒈r+η𝒈b\bm{g}_{\mathrm{up}}=\bm{g}_{r}^{\perp}+\eta\bm{g}_{b} with exact gradients:

Tangential term. 𝒈c,𝒈r=𝒈c,𝒈r𝒈r,𝒈c𝒈c2𝒈c=𝒈c,𝒈r𝒈r,𝒈c=0.\left\langle\bm{g}_{c},\,\bm{g}_{r}^{\perp}\right\rangle=\left\langle\bm{g}_{c},\,\bm{g}_{r}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}\right\rangle=\left\langle\bm{g}_{c},\,\bm{g}_{r}\right\rangle-\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle=0.

Boundary term. 𝒈b=δt𝒈c/(𝒈c+ε)\bm{g}_{b}=-\delta_{t}\bm{g}_{c}/(\left\|\bm{g}_{c}\right\|+\varepsilon) (exact δt\delta_{t}, exact 𝒈c\bm{g}_{c}), so:

δt𝒈c,𝒈b=δt2𝒈c2𝒈c+εδt2μ2G+ε,\delta_{t}\left\langle\bm{g}_{c},\,\bm{g}_{b}\right\rangle=-\delta_{t}^{2}\frac{\left\|\bm{g}_{c}\right\|^{2}}{\left\|\bm{g}_{c}\right\|+\varepsilon}\leq-\delta_{t}^{2}\frac{\mu^{2}}{G+\varepsilon}, (27)

where we used 𝒈cμ\left\|\bm{g}_{c}\right\|\geq\mu (Assumption 2) and 𝒈cG\left\|\bm{g}_{c}\right\|\leq G (Assumption 1). Therefore:

δt𝒈ct,𝒈upt=ηδt𝒈ct,𝒈btημ2G+εμδt2.\delta_{t}\left\langle\bm{g}_{c}^{t},\,\bm{g}_{\mathrm{up}}^{t}\right\rangle=\eta\delta_{t}\left\langle\bm{g}_{c}^{t},\,\bm{g}_{b}^{t}\right\rangle\leq-\underbrace{\frac{\eta\mu^{2}}{G+\varepsilon}}_{\mu^{\prime}}\delta_{t}^{2}. (28)

We know that 𝒈up22𝒈r2+2η2𝒈b22G2+2η2D2C1\left\|\bm{g}_{\mathrm{up}}\right\|^{2}\leq 2\left\|\bm{g}_{r}^{\perp}\right\|^{2}+2\eta^{2}\left\|\bm{g}_{b}\right\|^{2}\leq 2G^{2}+2\eta^{2}D^{2}\triangleq C_{1}, since 𝒈r𝒈rG\left\|\bm{g}_{r}^{\perp}\right\|\leq\left\|\bm{g}_{r}\right\|\leq G and 𝒈b=|δt|𝒈c/(𝒈c+ε)|δt|D\left\|\bm{g}_{b}\right\|=|\delta_{t}|\left\|\bm{g}_{c}\right\|/(\left\|\bm{g}_{c}\right\|+\varepsilon)\leq|\delta_{t}|\leq D.

Substituting the two bounds above into (26):

Vt+1Vtμαtδt2+CRαt2,CR=LVC12.V_{t+1}\leq V_{t}-\mu^{\prime}\alpha_{t}\delta_{t}^{2}+C_{R}\alpha_{t}^{2},\quad C_{R}=\tfrac{L_{V}C_{1}}{2}. (29)

This is (20).

Finally, summing from 0 to T1T-1: μt=0T1αtδt2V0+CRt=0αt2<\mu^{\prime}\sum_{t=0}^{T-1}\alpha_{t}\delta_{t}^{2}\leq V_{0}+C_{R}\sum_{t=0}^{\infty}\alpha_{t}^{2}<\infty. Letting TT\to\infty gives αtδt2<\sum\alpha_{t}\delta_{t}^{2}<\infty.

To show δt0\delta_{t}\to 0: the recursion Vt+1(12μαt)Vt+CRαt2V_{t+1}\leq(1-2\mu^{\prime}\alpha_{t})V_{t}+C_{R}\alpha_{t}^{2} is a Robbins–Monro recursion with summable perturbation. Since αt0\alpha_{t}\to 0, there exists NN with 012μαt10\leq 1-2\mu^{\prime}\alpha_{t}\leq 1 for all tNt\geq N; iterating from NN and using 1xex1-x\leq e^{-x}, s=Nt(12μαs)exp(2μs=Ntαs)0\prod_{s=N}^{t}(1-2\mu^{\prime}\alpha_{s})\leq\exp(-2\mu^{\prime}\sum_{s=N}^{t}\alpha_{s})\to 0, and the convolution with αs2\alpha_{s}^{2} vanishes (standard argument), so Vt0V_{t}\to 0 and δt0\delta_{t}\to 0.

Proof of Corollary VI.2. Summing (20) over t=0,,T1t=0,\ldots,T-1 gives μt=0T1αtδt2V0+CRt=0T1αt2\mu^{\prime}\sum_{t=0}^{T-1}\alpha_{t}\delta_{t}^{2}\leq V_{0}+C_{R}\sum_{t=0}^{T-1}\alpha_{t}^{2}. Since 𝔼[δτ2]=1ATt=0T1αtδt2\mathbb{E}[\delta_{\tau}^{2}]=\frac{1}{A_{T}}\sum_{t=0}^{T-1}\alpha_{t}\delta_{t}^{2}, dividing by μAT\mu^{\prime}A_{T} yields (22). With αt=α¯/T\alpha_{t}=\bar{\alpha}/\sqrt{T}, AT=α¯TA_{T}=\bar{\alpha}\sqrt{T} and tαt2=α¯2\sum_{t}\alpha_{t}^{2}=\bar{\alpha}^{2}, giving the O(1/T)O(1/\sqrt{T}) rate. \blacksquare

-C Proof of Theorem VI.3

Compute: 𝒈r,𝒈r=𝒈r,𝒈r𝒈r,𝒈c𝒈c2𝒈c=𝒈r2𝒈r,𝒈c2𝒈c2\left\langle\bm{g}_{r},\,\bm{g}_{r}^{\perp}\right\rangle=\left\langle\bm{g}_{r},\,\bm{g}_{r}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}\right\rangle=\left\|\bm{g}_{r}\right\|^{2}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle^{2}}{\left\|\bm{g}_{c}\right\|^{2}}. Also: 𝒈r2=𝒈r22𝒈r,𝒈c2𝒈c2+𝒈r,𝒈c2𝒈c2=𝒈r2𝒈r,𝒈c2𝒈c2\left\|\bm{g}_{r}^{\perp}\right\|^{2}=\left\|\bm{g}_{r}\right\|^{2}-2\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle^{2}}{\left\|\bm{g}_{c}\right\|^{2}}+\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle^{2}}{\left\|\bm{g}_{c}\right\|^{2}}=\left\|\bm{g}_{r}\right\|^{2}-\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle^{2}}{\left\|\bm{g}_{c}\right\|^{2}}. Both expressions are equal and non-negative by Cauchy–Schwarz. Equality holds iff 𝒈r=0\|\bm{g}_{r}^{\perp}\|=0 iff 𝒈r𝒈c,\bm{g}_{r}\parallel\bm{g}_{c}, confirming that 𝒈r=α𝒈c\bm{g}_{r}=\alpha\bm{g}_{c} for some scalar α\alpha.

-D Proof of Theorem VI.4

By Theorem VI.1, δt0\delta_{t}\to 0; since 𝜽t𝜽\bm{\theta}_{t}\to\bm{\theta}^{*} and δ\delta is continuous, δ(𝜽)=0\delta(\bm{\theta}^{*})=0, i.e., 𝜽\bm{\theta}^{*}\in\mathcal{M}.

Stationarity. Suppose, for contradiction, that 𝒖𝒈r(𝜽)𝟎\bm{u}\triangleq\bm{g}_{r}^{\perp}(\bm{\theta}^{*})\neq\bm{0}. Since 𝒈cμ\left\|\bm{g}_{c}\right\|\geq\mu on Θ\Theta (Assumption 2), the map 𝜽𝒈r(𝜽)\bm{\theta}\mapsto\bm{g}_{r}^{\perp}(\bm{\theta}) is continuous at 𝜽\bm{\theta}^{*}, and the normal component vanishes in the limit, η𝒈b(𝜽t)η|δt|0\left\|\eta\bm{g}_{b}(\bm{\theta}_{t})\right\|\leq\eta|\delta_{t}|\to 0. Hence 𝒈up(𝜽t)=𝒈r(𝜽t)+η𝒈b(𝜽t)𝒖\bm{g}_{\mathrm{up}}(\bm{\theta}_{t})=\bm{g}_{r}^{\perp}(\bm{\theta}_{t})+\eta\bm{g}_{b}(\bm{\theta}_{t})\to\bm{u}, and there exists NN such that 𝒖,𝒈up(𝜽t)12𝒖2,tN.\left\langle\bm{u},\,\bm{g}_{\mathrm{up}}(\bm{\theta}_{t})\right\rangle\;\geq\;\tfrac{1}{2}\left\|\bm{u}\right\|^{2},\qquad\forall t\geq N. Projecting the recursion 𝜽t+1𝜽t=αt𝒈up(𝜽t)\bm{\theta}_{t+1}-\bm{\theta}_{t}=\alpha_{t}\bm{g}_{\mathrm{up}}(\bm{\theta}_{t}) onto 𝒖\bm{u} and summing from NN to T1T-1: 𝒖,𝜽T𝜽N=t=NT1αt𝒖,𝒈up(𝜽t)12𝒖2t=NT1αtT,\left\langle\bm{u},\,\bm{\theta}_{T}-\bm{\theta}_{N}\right\rangle=\sum_{t=N}^{T-1}\alpha_{t}\left\langle\bm{u},\,\bm{g}_{\mathrm{up}}(\bm{\theta}_{t})\right\rangle\;\geq\;\tfrac{1}{2}\left\|\bm{u}\right\|^{2}\sum_{t=N}^{T-1}\alpha_{t}\;\xrightarrow[T\to\infty]{}\;\infty, since tαt=\sum_{t}\alpha_{t}=\infty (Assumption 3). This contradicts 𝜽T𝜽\bm{\theta}_{T}\to\bm{\theta}^{*}, whose left side converges to the finite value 𝒖,𝜽𝜽N\left\langle\bm{u},\,\bm{\theta}^{*}-\bm{\theta}_{N}\right\rangle. Therefore 𝒈r(𝜽)=𝟎\bm{g}_{r}^{\perp}(\bm{\theta}^{*})=\bm{0}, and since 𝒈c(𝜽)μ>0\left\|\bm{g}_{c}(\bm{\theta}^{*})\right\|\geq\mu>0 we may solve for 𝒈r\bm{g}_{r}: 𝒈r(𝜽)=𝒈r,𝒈c𝒈c2𝒈c=:λ𝒈c(𝜽)\bm{g}_{r}(\bm{\theta}^{*})=\frac{\left\langle\bm{g}_{r},\,\bm{g}_{c}\right\rangle}{\left\|\bm{g}_{c}\right\|^{2}}\bm{g}_{c}=:\lambda^{*}\bm{g}_{c}(\bm{\theta}^{*}). Complementary slackness λ(Jc(π𝜽)d)=0\lambda^{*}(J_{c}(\pi_{\bm{\theta}^{*}})-d)=0 is immediate from 𝜽\bm{\theta}^{*}\in\mathcal{M}.

Dual feasibility under local optimality. Suppose 𝜽\bm{\theta}^{*} is a local maximizer of JrJ_{r} on \mathcal{F} and, for contradiction, λ<0\lambda^{*}<0. From stationarity, 𝒈r=λ𝒈c\bm{g}_{r}=\lambda^{*}\bm{g}_{c}. Consider the direction 𝒗=𝒈c\bm{v}=-\bm{g}_{c}: 𝒈r,𝒗=λ𝒈c2>0\left\langle\bm{g}_{r},\,\bm{v}\right\rangle=-\lambda^{*}\left\|\bm{g}_{c}\right\|^{2}>0 (reward increases to first order), 𝒈c,𝒗=𝒈c2<0\left\langle\bm{g}_{c},\,\bm{v}\right\rangle=-\left\|\bm{g}_{c}\right\|^{2}<0 (cost strictly decreases, so the point enters the feasible interior since Jc(π𝜽)=dJ_{c}(\pi_{\bm{\theta}^{*}})=d). Hence, for sufficiently small ε0>0\varepsilon_{0}>0, the point 𝜽ε0𝒈c\bm{\theta}^{*}-\varepsilon_{0}\bm{g}_{c}\in\mathcal{F} attains strictly higher reward, contradicting local maximality. Therefore λ0\lambda^{*}\geq 0, and together with stationarity, primal feasibility, and complementary slackness, 𝜽\bm{\theta}^{*} satisfies the KKT conditions of (3). \blacksquare