Introduction
Biological agents instinctively prioritize safety while mastering diverse tasks to ensure efficient, harm-free exploration. Safe Reinforcement Learning (Safe RL) captures this paradigm, aiming to learn near-optimal policies with strict safety assurances. Existing methods typically formalize this balance either by treating safety as a soft constraint during optimization or by theoretically enforcing hard safety guarantees .
Some of the early works formalized safe RL as a Constrained Markov Decision Process (CMDP), solving safety-constrained optimization problems using Lagrangian relaxation with dual multiplier methods [5 , 23 ] (Ray et al. 2019), with subsequent extensions via trust-region projections [1 ] (Yang et al. 2020; Xu et al. 2021; Milosevic et al. 2025), state-augmentation (Sootla et al., 2022), and offline distribution shaping (Yao et al., 2024). While these model-free techniques jointly optimize task performance and safety, they inherently bound expected cumulative costs , yielding only probabilistic safety guarantees. Conversely, model-based methods achieve strict safety via predictive rollouts , epigraph formulation of the value function (for deterministic control problems), or by strictly avoiding unsafe future sets [4 ] (Huang et al. 2024; Jayant & Bhatnagar 2022; Pfrommer et al. 2022). However, they suffer from compounding model biases and computational overhead to infer safe actions in real-time, particularly in environments with complex or unmodeled dynamics. Motivated by these tradeoffs, we seek a model-free approach that strictly adheres to safety specifications while optimizing task performance.
Some of the control-theoretic approaches that rigorously hard-guarantee safety are based on Hamilton-Jacobi (HJ) reachability analysis , casting safety and reach-avoid problems as *zero-sum differential games (Isaacs, 1965; Mitchell et al., 2005). While deep RL techniques have enabled tractable neural solutions for the time-discounted HJI avoid/reach-avoid Bellman operators for safety analysis [22 , 7 ] (Hsu et al. 2021), it is not immediately obvious how these techniques can be extended to generic tasks specified by dense, continuous reward functions. Consequently, a dominant paradigm employs a decoupled approach , where an a priori learned task-oblivious safety filter preemptively intercepts and projects nominal unsafe task actions onto a plausible safe set [15 , 16 , 9 ] (Hsu et al. 2024; Nguyen et al. 2024). However, these switch-type interventions only occur near the boundary, causing erratic, jittery interventions when a safety-oblivious task policy persistently tries to exit the boundary. This is seldom desirable, especially in human-in-the-loop scenarios (Oh et al., 2025).
Recent offline feasibility-guided models instead utilize diffusion, flow-matching, or world-models to approximate the largest feasible region using HJ-reachability and steer task-driven actions to strictly lie within the safe envelope [17 ] (Zheng et al. 2024; Tayal et al. 2026). However, they either introduce iterative online inference latency or rely on post-hoc distillation that weakens strict safety guarantees. Alternatively, using precomputed safety value functions as Control Barrier Functions (Q-CBF) (Hsu et al., 2024; Lu et al., 2025; Oh et al., 2025; 2026) avoids planning latency, but necessitates computing action projections online. Additionally, relying on external projections introduces action aliasing , which can be detrimental (Markgraf et al., 2026). If the safe action set is known a priori, neural-based methods such as (Suttle et al., 2024) can hard-guarantee safety; we instead assume no access to an oracle safe action set and learn from data. Thus, a growing subset of literature advocates for unified architectures that embed safety directly into the policy (Gu et al., 2024a;b; Cen et al., 2024). Yet, jointly optimizing rewards and costs frequently destabilizes learning due to gradient conflicts, necessitating algorithmic workarounds like gradient manipulation and explicit latent decoupling (Gu et al., 2024a;b; Kim et al., 2025; Cen et al., 2024; Yang et al., 2025).
In this paper, we combine safety and task objectives directly at the value-function level , rather than at the policy level, and jointly optimize safety-constrained task performance using a single joint policy via a novel, joint Bellman operator under adversarial disturbances. Our contributions are:
Unified Formulation: We propose a robust Bellman operator and derive the corresponding objective function from robust optimal stopping theory. We propose a two-timescale stochastic approximation framework that enables learning of its fixed point, the joint value function .
Theoretical Safety and Optimality Guarantees: We prove forward invariance of the safe set under the joint policy, and show convergence to the optimal robust task performance within the safe set.
Empirical Validation: We conduct experiments using neural approximations on a set of continuous control tasks from the Gymnasium and SafetyGymnasium suites under adversarial disturbances, demonstrating stable training convergence and near-zero safety violations during evaluation.
Preliminaries
This section introduces key definitions, followed by preliminaries on Constrained Markov Decision Processes and Hamilton-Jacobi safety analysis. Refer to Appendix § 10 for more details.
Definitions and Notations
We consider a discounted MDP with finite state, action and disturbance spaces: S ⊂ R n \mathcal{S} \subset\mathbb{R}^{n} S ⊂ R n , A ⊂ R m \mathcal{A} \subset\mathbb{R}^{m} A ⊂ R m , and D ⊂ R l \mathcal{D} \subset\mathbb{R}^{l} D ⊂ R l respectively, with the transition kernel P ( ⋅ ∣ s , a , d ) ∈ Δ ( S ) P(\cdot\mid s,a,d) \in\Delta(\mathcal{S}) P ( ⋅ ∣ s , a , d ) ∈ Δ ( S ) . A deterministic joint policy π = ( μ , ν ) \pi= (\mu,\nu) π = ( μ , ν ) pairs the mappings μ : S → A \mu:\mathcal{S}\to\mathcal{A} μ : S → A and ν : S × A → D \nu:\mathcal{S}\times\mathcal{A}\to\mathcal{D} ν : S × A → D , yielding π ( s ) = ( μ ( s ) , ν ( s , μ ( s ) ) ) \pi(s)=(\mu(s),\nu(s,\mu(s))) π ( s ) = ( μ ( s ) , ν ( s , μ ( s ))) . The reward and the safety margin are given by r : S × A × D → [ 0 , R max ] r:\mathcal{S}\times\mathcal{A}\times\mathcal{D}\to[0,R_{\max}] r : S × A × D → [ 0 , R m a x ] , R max > 0 R_{\max}>0 R m a x > 0 w.l.o.g, and g : S → [ − G min , G max ] g:\mathcal{S}\to[-G_{\min},G_{\max}] g : S → [ − G m i n , G m a x ] , with G min , G max > 0 G_{\min},G_{\max}>0 G m i n , G m a x > 0 respectively. We assume the extended class-K ∞ \mathcal{K}_{\infty} K ∞ scaling function β ( ⋅ ) \beta(\cdot) β ( ⋅ ) into g ( s ) g(s) g ( s ) to align with task return scales (unless stated otherwise). The constraint set is F c : = { s ∈ S : g ( s ) ≥ 0 } \mathcal{F}^{c}:=\{s\in\mathcal{S}:g(s)\geq0\} F c := { s ∈ S : g ( s ) ≥ 0 } , complementing the failure set F \mathcal{F} F . The viability kernel Q ⊆ F c \mathcal{Q}\subseteq\mathcal{F}^{c} Q ⊆ F c is the subset of states from which a control policy exists that can keep the agent away from the failure set F \mathcal{F} F for all times, regardless of the adversarial disturbance. Finally, the value and action-value function spaces are defined as V : = R ∣ S ∣ \mathcal{V}:=\mathbb{R}^{|\mathcal{S}|} V := R ∣ S ∣ and Q : = R ∣ S ∣ ∣ A ∣ ∣ D ∣ \mathcal{Q}:=\mathbb{R}^{|\mathcal{S}||\mathcal{A}||\mathcal{D}|} Q := R ∣ S ∣∣ A ∣∣ D ∣ , equipped with the supremum norm ∥ ⋅ ∥ ∞ \lVert\cdot\rVert_{\infty} ∥ ⋅ ∥ ∞ .
Constrained Markov Decision Processes
A Constrained Markov Decision Process (CMDP) [5 ] extends an MDP by introducing auxiliary costs to encode safety constraints. It is defined by the tuple M = ( S , A , P , r , c , γ , μ 0 ) \mathcal{M} = (\mathcal{S}, \mathcal{A}, P, r, c, \gamma, \mu_0) M = ( S , A , P , r , c , γ , μ 0 ) , where r r r and c c c are the task reward and constraint cost functions, respectively, γ ∈ [ 0 , 1 ) \gamma\in[0, 1) γ ∈ [ 0 , 1 ) is the discount factor, and μ 0 : S → [ 0 , 1 ] \mu_0 : \mathcal{S} \to[0, 1] μ 0 : S → [ 0 , 1 ] denotes the initial state distribution. For a stochastic policy π : S → Δ ( A ) \pi: \mathcal{S} \to\Delta(\mathcal{A}) π : S → Δ ( A ) , let J r ( π ) J_r(\pi) J r ( π ) and J c ( π ) J_c(\pi) J c ( π ) denote the expected discounted cumulative return and cost. The CMDP objective seeks an optimal policy that maximizes returns subject to a predefined safety threshold d ∈ R d \in\mathbb{R} d ∈ R , typically solved via Lagrangian relaxation, yielding an equivalent unconstrained min-max saddle-point problem: min λ ≥ 0 max π ∈ Π ( J r ( π ) − λ ( J c ( π ) − d ) ) \min_{\lambda\ge0} \max_{\pi\in\Pi} (J_r(\pi) - \lambda(J_c(\pi) - d)) min λ ≥ 0 max π ∈ Π ( J r ( π ) − λ ( J c ( π ) − d )) , where λ ≥ 0 \lambda\ge0 λ ≥ 0 is the Lagrange multiplier and Π \Pi Π is the set of stationary stochastic policies. More details can be found in [5 , 1 ] (Tessler et al. 2019; Stooke et al. 2020).
Hamilton-Jacobi Safety Analysis
Hamilton-Jacobi (HJ) reachability analysis seeks to find the safe set Ω ⊆ F c \Omega\subseteq\mathcal{F}^{c} Ω ⊆ F c (Mitchell et al., 2005). Formulated as a zero-sum differential game , the robust safety value function is V ϕ ( s ) = inf N [ d ] sup a inf t ≥ 0 g ( ξ a , N [ d ] ( t ) ) V^{\phi}(s) = \inf_{\mathcal{N}^{[d]}} \sup_{a} \inf_{t \ge0} g(\xi^{a,\mathcal{N}^{[d]}}(t)) V ϕ ( s ) = inf N [ d ] sup a inf t ≥ 0 g ( ξ a , N [ d ] ( t )) , where ξ a , N [ d ] ( ⋅ ) \xi^{a,\mathcal{N}^{[d]}}(\cdot) ξ a , N [ d ] ( ⋅ ) denotes the trajectory starting at s 0 s_0 s 0 and evolving according to the control and disturbance trajectories ( a , N [ d ] ) (a,\mathcal{N}^{[d]}) ( a , N [ d ] ) , with N [ d ] \mathcal{N}^{[d]} N [ d ] the set of non-anticipative disturbance strategies [19 , 21 ] . By Dynamic Programming, V ( s ) V(s) V ( s ) is the unique viscosity solution to the Hamilton-Jacobi-Isaacs (HJI) variational inequality. As the corresponding infinite-horizon Bellman operator does not induce a contraction mapping, [22 ] introduces a discount factor γ ∈ ( 0 , 1 ) \gamma\in(0, 1) γ ∈ ( 0 , 1 ) to enable TD-learning, resulting in the time-discounted robust Bellman equation under stochastic dynamics
V ( s ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , max a ∈ A min d ∈ D E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ ) ] } . V(s) = (1-\gamma)g(s) + \gamma\min\left\{g(s), \max_{a \in\mathcal{A}} \min_{d \in\mathcal{D}} \mathbb{E}_{s' \sim p(\cdot\mid s,a,d)}[V(s')]\right\}. V ( s ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , a ∈ A max d ∈ D min E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ )] } .
More details can be found in [22 , 21 , 19 ] (Mitchell et al. 2005).
Learning Safety-Constrained Task Action-Value Function
This section presents our unified formulation to learn a joint safety-constrained task value function. We show that the corresponding joint Bellman operator induces a contraction mapping when the auxiliary safety value function is held fixed. We further see that the coupled system possesses a discontinuity due to changing joint greedy policies, and discuss its resolution.
The Joint Formulation
For clarity, we first introduce the joint Bellman equation to intuit its formulation. In the presence of adversarial disturbances, the time-discounted task action-value function Q ψ Q^{\psi} Q ψ purely corresponding to task return maximization can be extended to the following robust stochastic equation:
Q t a s k ( s , a , d ) = r ( s , a , d ) + γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q t a s k ( s ′ , a ′ , d ′ ) ] (1) Q^{\mathrm{task}}(s,a,d) = r(s,a,d) + \gamma\mathbb{E}_{s' \sim p(\cdot\mid s,a,d)}\left[\max_{a' \in\mathcal{A}} \min_{d' \in\mathcal{D}} Q^{\mathrm{task}}(s',a',d')\right] \tag*{(1)} Q task ( s , a , d ) = r ( s , a , d ) + γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q task ( s ′ , a ′ , d ′ ) ] (1)
Next, consider the time-discounted safety value function , as introduced in [22 ] . We’d like to use this value function to instead assess the safety value of some given policy π : = ( μ , ν ) \pi:= (\mu,\nu) π := ( μ , ν ) , yielding the following safe action-value function evaluated π \pi π :
Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } (2) Q^{\phi}_{\pi}(s,a,d) = (1-\gamma)g(s) + \gamma\min\left\{g(s), \mathbb{E}_{s' \sim p(\cdot\mid s,a,d)}\left[\max_{a' \in\mu(s')} \min_{d' \in\nu(s',a')} Q^{\phi}_{\pi}(s',a',d')\right]\right\} \tag*{(2)} Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } (2)
We can use Q π ϕ Q^{\phi}_{\pi} Q π ϕ to cap the further accrual of task rewards, i.e., truncate task accrual for the policy π \pi π when the corresponding task action-value goes above Q π ϕ Q^{\phi}_{\pi} Q π ϕ , enabling the agent to instead optimize task performance subject to safety . Since γ \gamma γ serves as the probability of episode continuation , by the notion of principled time-discounting [22 ] , we can combine Eq. 2 with Eq. (1) , yielding the stochastic time-discounted joint action-value function as follows:
Q ( s , a , d ) = ( 1 − γ ) min { r ( s , a , d ) , g ( s ) } + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) ] , Q π ϕ ( s , a , d ) } (3) \begin{aligned}
Q(s,a,d) &= (1-\gamma)\min\{r(s,a,d),g(s)\} \\
&\quad+ \gamma\min\left\{r(s,a,d) + \mathbb{E}_{s' \sim p(\cdot\mid s,a,d)}\left[\max_{a' \in\mathcal{A}}\min_{d' \in\mathcal{D}} Q(s',a',d')\right], Q^{\phi}_{\pi}(s,a,d)\right\} \tag*{(3)}
\end{aligned} Q ( s , a , d ) = ( 1 − γ ) min { r ( s , a , d ) , g ( s )} + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ] , Q π ϕ ( s , a , d ) } (3)
where, with probability 1 − γ 1-\gamma 1 − γ , the agent receives the reward min { r ( s , a , d ) , g ( s ) } \min\{r(s,a,d),g(s)\} min { r ( s , a , d ) , g ( s )} , or continues with probability γ \gamma γ . The corresponding maximin joint policy π : = ( μ , ν ) \pi:= (\mu,\nu) π := ( μ , ν ) is defined through a measurable selection as:
μ ( s ) : = arg max a ∈ A min d ∈ D Q ( s , a , d ) , ν ( s , μ ( s ) ) : = arg min d ∈ D Q ( s , μ ( s ) , d ) (4) \mu(s) := \arg\max_{a \in A}\min_{d \in D} Q(s,a,d), \qquad\nu(s,\mu(s)) := \arg\min_{d \in D} Q(s,\mu(s),d) \tag*{(4)} μ ( s ) := arg a ∈ A max d ∈ D min Q ( s , a , d ) , ν ( s , μ ( s )) := arg d ∈ D min Q ( s , μ ( s ) , d ) (4)
Here, the disturbance gets the advantage of observing the controller’s action, while the controller must optimize for the adversarial disturbance. Note that we do not assume Q π ϕ Q^\phi_\pi Q π ϕ to be given; instead, Q π ϕ Q^\phi_\pi Q π ϕ is learned alongside Q Q Q , estimating the safety values of the joint policy π \pi π . Note the coupling : the joint policy π \pi π is derived from the joint value Q Q Q , which is evaluated by Q π ϕ Q^\phi_\pi Q π ϕ , whose values in turn update Q Q Q . Next, we show that the safety and joint Bellman operators are contractions given a fixed policy and fixed safety value, respectively. The joint value function is conceptualized in Figure 1 .
Figure 1. (Left) The Joint Value function is conceptualized as a 2D figure, with the state-space indicated on the x x x -axis, and joint values on the y y y -axis. (Right) The corresponding regions within the safe set Ω π \Omega^\pi Ω π are depicted. The locus of points where V Q ϕ = V Q ψ V_Q^\phi= V_Q^\psi V Q ϕ = V Q ψ indicates the boundary between Ω ϕ \Omega^\phi Ω ϕ and Ω ψ \Omega^\psi Ω ψ as defined in Definition 1. Trajectories must stay within Ω ψ \Omega^\psi Ω ψ to maximize episodic return.
Safety Action-Value of the Joint Policy
Given a joint policy π \pi π , the safety Bellman operator T π ϕ : Q → Q T^\phi_\pi: \mathcal{Q} \to\mathcal{Q} T π ϕ : Q → Q corresponding to Eq. 2 is defined as:
T π ϕ [ Q ϕ ] ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q ϕ ( s ′ , a ′ , d ′ ) ] } (5) T^\phi_\pi[Q^\phi](s,a,d) = (1-\gamma)g(s) + \gamma\min\left\{g(s), \mathop{\mathbb{E}}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')} Q^\phi(s',a',d')\right]\right\} \tag*{(5)} T π ϕ [ Q ϕ ] ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q ϕ ( s ′ , a ′ , d ′ ) ] } (5)
Note that ν ( ⋅ , a ′ ) \nu(\cdot,a') ν ( ⋅ , a ′ ) refers to the specific sample a ′ a' a ′ drawn from μ ( ⋅ ) \mu(\cdot) μ ( ⋅ ) by the max a ′ ∈ μ \max_{a'\in\mu} max a ′ ∈ μ operation.
Proposition 1 (Contraction Mapping of T π ϕ T^\phi_\pi T π ϕ ). For any arbitrary fixed joint policy π \pi π , the time-discounted Bellman operator defined in Eq. 5 induces a γ \gamma γ -contraction mapping under the supremum norm. That is, for a given discount factor γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) , and any Q π ϕ , Q ~ π ϕ ∈ Q Q^\phi_\pi,\widetilde{Q}^\phi_\pi\in\mathcal{Q} Q π ϕ , Q π ϕ ∈ Q , we have
∥ T π ϕ [ Q π ϕ ] − T π ϕ [ Q ~ π ϕ ] ∥ ∞ ≤ γ ∥ Q π ϕ − Q ~ π ϕ ∥ ∞ . \left\|T^\phi_\pi[Q^\phi_\pi]-T^\phi_\pi[\widetilde{Q}^\phi_\pi]\right\|_\infty\le\gamma\left\|Q^\phi_\pi-\widetilde{Q}^\phi_\pi\right\|_\infty. T π ϕ [ Q π ϕ ] − T π ϕ [ Q π ϕ ] ∞ ≤ γ Q π ϕ − Q π ϕ ∞ . (Proof in Appendix B.1)
Hence, there exists a unique fixed point, Q π ϕ Q^\phi_\pi Q π ϕ , which we call the safety action-value of the fixed joint policy π \pi π . The corresponding safety value function is obtained as V π ϕ ( s ) = max a ∈ μ min d ∈ ν Q π ϕ ( s , a , d ) V^\phi_\pi(s)=\max_{a\in\mu}\min_{d\in\nu}Q^\phi_\pi(s,a,d) V π ϕ ( s ) = max a ∈ μ min d ∈ ν Q π ϕ ( s , a , d ) . The set Ω π = { s ∈ S : V π ϕ ( s ) ≥ 0 } \Omega^\pi=\{s\in\mathcal{S}:V^\phi_\pi(s)\ge0\} Ω π = { s ∈ S : V π ϕ ( s ) ≥ 0 } is then the safe set of policy π \pi π (under γ → 1 \gamma\to1 γ → 1 as discussed in Fisac et al. [22 ] , i.e., the set of all states from which the joint policy π \pi π keeps the agent safe. Note that, in general, Ω π ⊆ Ω \Omega^\pi\subseteq\Omega Ω π ⊆ Ω , where the maximal robust safe set, Ω \Omega Ω , (viability kernel) is given by
Ω = { s ∈ S : ∃ μ such that ∀ ν , V ( μ , ν ) ϕ ( s ) ≥ 0 } . \Omega= \{s\in\mathcal{S}:\exists\ \mu\ \text{such that}\ \forall\nu,\ V^\phi_{(\mu,\nu)}(s)\ge0\}. Ω = { s ∈ S : ∃ μ such that ∀ ν , V ( μ , ν ) ϕ ( s ) ≥ 0 } .
Joint Action-Value Function
Next, for any fixed safety action-value function, Y ∈ Q Y\in\mathcal{Q} Y ∈ Q , the joint Bellman operator T Y : Q → Q T_Y:\mathcal{Q}\to\mathcal{Q} T Y : Q → Q corresponding to Eq. (3) is given by:
T Y [ Q ] ( s , a , d ) = ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V Q ( s ′ ) ] , Y ( s , a , d ) } (6) T_Y[Q](s,a,d)=(1-\gamma)m(s,a,d)+\gamma\min\left\{r(s,a,d)+\mathop{\mathbb{E}}_{s'\sim p(\cdot\mid s,a,d)}[V_Q(s')],Y(s,a,d)\right\} \tag*{(6)} T Y [ Q ] ( s , a , d ) = ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V Q ( s ′ )] , Y ( s , a , d ) } (6)
where m ( s , a , d ) = min { r ( s , a , d ) , g ( s ) } m(s,a,d)=\min\{r(s,a,d),g(s)\} m ( s , a , d ) = min { r ( s , a , d ) , g ( s )} and V Q ( s ) = max a ∈ A min d ∈ D Q ( s , a , d ) V_Q(s)=\max_{a\in A}\min_{d\in D}Q(s,a,d) V Q ( s ) = max a ∈ A min d ∈ D Q ( s , a , d ) .
Proposition 2 (Contraction Mapping of T Y T_Y T Y ). For any arbitrary, fixed Y ∈ Q Y\in\mathcal{Q} Y ∈ Q , the Bellman operator defined in Eq. 6 induces a γ \gamma γ -contraction mapping under the supremum norm. That is, for a given discount factor γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) , and any Q , Q ~ ∈ Q Q,\widetilde{Q}\in\mathcal{Q} Q , Q ∈ Q , we have
∥ T Y [ Q ] − T Y [ Q ~ ] ∥ ∞ ≤ γ ∥ Q − Q ~ ∥ ∞ . \left\|T_Y[Q]-T_Y[\widetilde{Q}]\right\|_\infty\le\gamma\left\|Q-\widetilde{Q}\right\|_\infty. T Y [ Q ] − T Y [ Q ] ∞ ≤ γ Q − Q ∞ . (Proof in Appendix B.2)
Thus, for a fixed safety action-value function Y Y Y , there exists a unique fixed point Q Y Q_Y Q Y of the joint Bellman operator.
Objective Function of Joint Action-Value Function
Given the value functions ( Q , Y ) (Q,Y) ( Q , Y ) , we derive the joint objective function from robust optimal stopping theory to provide a principled interpretation of the joint value function. To this end, we first define the task-optimizing and safety-maximizing regions, as illustrated in Figure 1 . For a given joint action-value function q q q , safety critic y y y and the joint policy π = ( μ , ν ) \pi=(\mu,\nu) π = ( μ , ν ) , let V π q ( s ) : = r ( s , μ ( s ) , ν ( s , μ ( s ) ) ) + E [ V q ( s ′ ) ] V^q_\pi(s):=r(s,\mu(s),\nu(s,\mu(s)))+\mathbb{E}[V_q(s')] V π q ( s ) := r ( s , μ ( s ) , ν ( s , μ ( s ))) + E [ V q ( s ′ )] , where V q ( s ) = max a min d q ( s , a , d ) V_q(s)=\max_a\min_d q(s,a,d) V q ( s ) = max a min d q ( s , a , d ) . Define the safety value function $V^\phi_\pi(s):=Q^\phi_\pi(s,\mu(s),\nu(s,\mu(s))).
Definition 1 (Task and safety optimizing regions). The region where the task value function is strictly lower than the safe value function is defined as the task-optimizing region: Ω ψ = { s ∈ S ∣ V Q ψ ( s ) < V Q ϕ ( s ) } \Omega^\psi= \{s \in\mathcal{S} \mid V_Q^\psi(s) < V_Q^\phi(s)\} Ω ψ = { s ∈ S ∣ V Q ψ ( s ) < V Q ϕ ( s )} . The region where the task value function is greater than the safe value function is defined as the safety-optimizing region: Ω ϕ = { s ∈ S ∣ V Q ψ ( s ) ≥ V Q ϕ ( s ) } \Omega^\phi= \{s \in\mathcal{S} \mid V_Q^\psi(s) \ge V_Q^\phi(s)\} Ω ϕ = { s ∈ S ∣ V Q ψ ( s ) ≥ V Q ϕ ( s )} .
Theorem 1 (Objective Function). Given a Borel-measurable safety maximizing region, Ω ϕ ∈ B ( S ) \Omega^\phi\in\mathcal{B}(\mathcal{S}) Ω ϕ ∈ B ( S ) , define the first switching time τ : W → { 0 , ⋯ , T } \tau: \mathcal{W} \to\{0,\cdots,T\} τ : W → { 0 , ⋯ , T } as τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } \tau= \inf\{k \in\{0,\cdots,T\}:s_k \in\Omega^\phi\} τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } , where T T T is the time horizon and inf ∅ = T \inf\varnothing= T inf ∅ = T (T → ∞ T \to\infty T → ∞ for infinite horizon setting). Let Λ k \Lambda_k Λ k be the set of stopping times τ \tau τ bounded by time horizon k k k , i.e., 0 ≤ τ ≤ k 0 \le\tau\le k 0 ≤ τ ≤ k . Let ω \omega ω be trajectories sampled using the joint policy as a t , d t ∼ π ( s t ) a_t,d_t \sim\pi(s_t) a t , d t ∼ π ( s t ) , with the dynamics s t + 1 ∼ p ( ⋅ ∣ s t , a t , d t ) s_{t+1} \sim p(\cdot\mid s_t,a_t,d_t) s t + 1 ∼ p ( ⋅ ∣ s t , a t , d t ) . Then, the corresponding joint objective function that the joint policy maximizes is given by: (Proof in Appendix § 11 .§ 3 )
J ( π ) : = inf τ ∈ Λ T E ω ∼ π [ ∑ t = 0 τ − 1 γ t r ( s t , a t , d t ) + γ τ ( ( 1 − γ ) min { r ( s τ , a τ , d τ ) , g ( s τ ) } + γ V Q ϕ ( s τ ) ) | s 0 = s ] (7) J(\pi) := \inf_{\tau\in\Lambda_T} \mathbb{E}_{\omega\sim\pi}\left[\sum_{t=0}^{\tau-1}\gamma^t r(s_t,a_t,d_t) + \gamma^\tau\left((1-\gamma)\min\{r(s_\tau,a_\tau,d_\tau),g(s_\tau)\}+\gamma V_Q^\phi(s_\tau)\right)\middle|s_0=s\right] \tag*{(7)} J ( π ) := τ ∈ Λ T inf E ω ∼ π [ t = 0 ∑ τ − 1 γ t r ( s t , a t , d t ) + γ τ ( ( 1 − γ ) min { r ( s τ , a τ , d τ ) , g ( s τ )} + γ V Q ϕ ( s τ ) ) s 0 = s ] (7)
Intuitively, the stopping time τ ∈ Λ T \tau\in\Lambda_T τ ∈ Λ T serves as a safety inspector : once the trajectory leaves Ω ψ \Omega^\psi Ω ψ , the further accrual of expected return is replaced by the terminal safety value J τ J_\tau J τ (dominated by V Q ϕ V_Q^\phi V Q ϕ as γ → 1 \gamma\to1 γ → 1 ). Hence, task performance can be optimized as long as the trajectory remains inside Ω ψ \Omega^\psi Ω ψ . We next analyze the coupled evolution of the safety and joint value functions.
Coupled Fixed Point
Let π Q = ( μ Q , ν Q ) \pi_Q = (\mu_Q,\nu_Q) π Q = ( μ Q , ν Q ) be the maximin policy derived from Q Q Q , as in Eq. (4) . Since the map Q ↦ π Q Q \mapsto\pi_Q Q ↦ π Q is generally discontinuous, small perturbations of Q Q Q can change the argmax/argmin completely. The optimal solution we seek is a pair ( Q ∗ , Y ∗ ) (Q^*,Y^*) ( Q ∗ , Y ∗ ) satisfying Y ∗ = Q π Q ∗ ϕ Y^* = Q_{\pi_{Q^*}}^\phi Y ∗ = Q π Q ∗ ϕ , Q ∗ = T Y ∗ Q ∗ Q^* = T_{Y^*}Q^* Q ∗ = T Y ∗ Q ∗ . This is a coupled system: the safety critic Y ∗ Y^* Y ∗ equals the safety value of the greedy policy of Q ∗ Q^* Q ∗ , and Q ∗ Q^* Q ∗ is the fixed point of its own Bellman operator, “truncated” by Y ∗ Y^* Y ∗ . Thus, in the iteration Q k + 1 = T Q k ϕ ( Q k ) Q_{k+1}=T_{Q_k}^\phi(Q_k) Q k + 1 = T Q k ϕ ( Q k ) , the composition Q ↦ T Q ϕ ( Q ) Q \mapsto T_{Q}^\phi(Q) Q ↦ T Q ϕ ( Q ) is not guaranteed to induce a contraction by our current analysis, as Q π Q ϕ Q_{\pi_Q}^\phi Q π Q ϕ can change discontinuously due the discontinuous mapping Q ↦ π Q Q \mapsto\pi_Q Q ↦ π Q . This motivates a two-timescale stochastic approximation learning framework in § 4 , where the joint and safety value functions are learned on separate timescales.
Two-Timescale Stochastic Approximation
In this section, we analyze the coupled learning dynamics in finite/tabular settings. For clarity, we present a synchronous update analysis here, under which every state-action-disturbance coordinate is updated at each iteration; extension to asynchronous settings is discussed in Appendix § 11 .§ 8 . Let T ^ n + 1 , π Q n ϕ \widehat{T}_{n+1,\pi_{Q_n}}^\phi T n + 1 , π Q n ϕ and T ^ n + 1 , Y \widehat{T}_{n+1,Y} T n + 1 , Y denote the stochastic estimators of the Bellman targets, with π Q n ∈ Π ( Q n ) \pi_{Q_n} \in\Pi(Q_n) π Q n ∈ Π ( Q n ) . where for q ∈ Q q \in\mathcal{Q} q ∈ Q , Π ( q ) \Pi(q) Π ( q ) denotes the finite correspondence of the maximin policies:
Π ( q ) : = { ( μ , ν ) : μ ( s ) ∈ arg max a min d q ( s , a , d ) , ν ( s , μ ( s ) ) ∈ arg min d q ( s , μ ( s ) , d ) } (8) \Pi(q) := \left\{(\mu,\nu) : \mu(s) \in\underset{a}{\arg\max}\ \underset{d}{\min}\ q(s,a,d),\ \nu(s,\mu(s)) \in\underset{d}{\arg\min}\ q(s,\mu(s),d)\right\} \tag*{(8)} Π ( q ) := { ( μ , ν ) : μ ( s ) ∈ a arg max d min q ( s , a , d ) , ν ( s , μ ( s )) ∈ d arg min q ( s , μ ( s ) , d ) } (8)
Assumption 1 (Conditional unbiasedness and Martingale-difference noise (Tsitsiklis & Van Roy, 1997)). Let { H n } n ≥ 0 \{\mathcal{H}_n\}_{n\geq0} { H n } n ≥ 0 denote the filtration generated by the learning history up to iteration n n n . Then,
E [ T ^ n + 1 , π Q n ϕ [ Y n ] ∣ H n ] = T π Q n ϕ [ Y n ] , E [ T ^ n + 1 , Y n [ Q n ] ∣ H n ] = T Y n [ Q n ] (9) \mathbb{E}\left[\widehat{T}^{\phi}_{n+1,\pi_{Q_n}}[Y_n]\mid\mathcal{H}_n\right]=T^{\phi}_{\pi_{Q_n}}[Y_n],\qquad\mathbb{E}\left[\widehat{T}_{n+1,Y_n}[Q_n]\mid\mathcal{H}_n\right]=T_{Y_n}[Q_n] \tag*{(9)} E [ T n + 1 , π Q n ϕ [ Y n ] ∣ H n ] = T π Q n ϕ [ Y n ] , E [ T n + 1 , Y n [ Q n ] ∣ H n ] = T Y n [ Q n ] (9)
Assumption 2 (Step-size conditions (Robbins & Monro, 1951)). The step-sizes, α n , β n ∈ ( 0 , 1 ] \alpha_n,\beta_n \in(0,1] α n , β n ∈ ( 0 , 1 ] , satisfy Robbins-Monro conditions: ∑ n = 0 ∞ α n = ∑ n = 0 ∞ β n = ∞ \sum_{n=0}^{\infty}\alpha_n=\sum_{n=0}^{\infty}\beta_n=\infty ∑ n = 0 ∞ α n = ∑ n = 0 ∞ β n = ∞ , ∑ n = 0 ∞ ( α n 2 + β n 2 ) < ∞ \sum_{n=0}^{\infty}(\alpha_n^2+\beta_n^2)<\infty ∑ n = 0 ∞ ( α n 2 + β n 2 ) < ∞ , lim n → ∞ α n → 0 \lim_{n\to\infty}\alpha_n\to0 lim n → ∞ α n → 0 , lim n → ∞ β n → 0 \lim_{n\to\infty}\beta_n\to0 lim n → ∞ β n → 0 , and additionally, lim n → ∞ α n / β n = 0 \lim_{n\to\infty}\alpha_n/\beta_n=0 lim n → ∞ α n / β n = 0 .
Additionally, the total martingale noise is assumed to have uniformly bounded conditional variance under bounded iterates. Next, under Temporal difference learning, the bootstrapped updates with step-size sequences { α n } , { β n } \{\alpha_n\},\{\beta_n\} { α n } , { β n } are given by:
Y n + 1 = Y n + β n [ T ^ n + 1 , π Q n ϕ [ Y n ] − Y n + ξ n + 1 ϕ ] , Q n + 1 = Q n + α n [ T ^ n + 1 , Y n [ Q n ] − Q n + ξ n + 1 ] (10) Y_{n+1}=Y_n+\beta_n\left[\widehat{T}^{\phi}_{n+1,\pi_{Q_n}}[Y_n]-Y_n+\xi^\phi_{n+1}\right],\qquad Q_{n+1}=Q_n+\alpha_n\left[\widehat{T}_{n+1,Y_n}[Q_n]-Q_n+\xi_{n+1}\right] \tag*{(10)} Y n + 1 = Y n + β n [ T n + 1 , π Q n ϕ [ Y n ] − Y n + ξ n + 1 ϕ ] , Q n + 1 = Q n + α n [ T n + 1 , Y n [ Q n ] − Q n + ξ n + 1 ] (10)
where ξ n + 1 ϕ \xi^\phi_{n+1} ξ n + 1 ϕ and ξ n + 1 \xi_{n+1} ξ n + 1 are martingale difference perturbations (Borkar, [13 ] ), with E [ ξ n + 1 ϕ ∣ H n ] = E [ ξ n + 1 ∣ H n ] = 0 \mathbb{E}[\xi^\phi_{n+1}\mid\mathcal{H}_n]=\mathbb{E}[\xi_{n+1}\mid\mathcal{H}_n]=0 E [ ξ n + 1 ϕ ∣ H n ] = E [ ξ n + 1 ∣ H n ] = 0 . As the map Q ↦ Y π Q Q\mapsto Y_{\pi_Q} Q ↦ Y π Q need not be continuous or Lipschitz, the standard two-timescale stochastic approximation need not apply. Thus, we analyze the fast timescale recursion as a stochastic recursive inclusion in § 4.1 using the set-valued two-timescale framework (Yaji & Bhatnagar, (2020); Borkar [14 ] ).
Fast Timescale: Safety Critic Tracking
Under Assumption 2, even with a quasi-static Q n Q_n Q n , at the switching time , two or more policies can have ties in Eq. (8) , but can have different safety-critic evaluations. This motivates a set-valued fast tracking analysis. To characterize the asymptotic behavior of the discrete TD recursion, let h π ( y ) : = T π ϕ [ y ] − y h_\pi(y):=T^\phi_\pi[y]-y h π ( y ) := T π ϕ [ y ] − y denote the limiting dynamics induced by Assumption 2 for each π ∈ Π ( q ) \pi\in\Pi(q) π ∈ Π ( q ) . Thus, for a given q ∈ Q q\in\mathcal{Q} q ∈ Q , the limiting differential inclusion is given by:
y ˙ ( t ) ∈ Ψ ( q , y ( t ) ) , with Ψ ( q , y ) : = conv { h π ( y ) : π ∈ Π ( q ) } (11) \dot{y}(t)\in\Psi(q,y(t)),\qquad\text{with }\Psi(q,y):=\operatorname{conv}\{h_\pi(y):\pi\in\Pi(q)\} \tag*{(11)} y ˙ ( t ) ∈ Ψ ( q , y ( t )) , with Ψ ( q , y ) := conv { h π ( y ) : π ∈ Π ( q )} (11)
where conv { ⋅ } \operatorname{conv}\{\cdot\} conv { ⋅ } denotes a closed convex hull of a set. Next, let Λ ( q ) : = { y ( 0 ) : y : R → Y is a bounded complete solution of Eq. 11 } \Lambda(q):=\{y(0):y:\mathbb{R}\to\mathcal{Y}\text{ is a bounded complete solution of Eq. 11}\} Λ ( q ) := { y ( 0 ) : y : R → Y is a bounded complete solution of Eq. 11 } .
Lemma 1 (Set-valued fast timescale tracking). Under Assumptions 1-2, suppose the iterates are almost surely bounded. Then,
for every quasi-static q q q , Eq. (11) admits a nonempty compact global attracting set Λ ( q ) \Lambda(q) Λ ( q ) ;
q ↦ Λ ( q ) q\mapsto\Lambda(q) q ↦ Λ ( q ) is upper semicontinuous; and
the coupled iterates satisfy dist ( ( Y n , Q n ) , Gr Λ ) → 0 \operatorname{dist}((Y_n,Q_n),\operatorname{Gr}\Lambda)\to0 dist (( Y n , Q n ) , Gr Λ ) → 0 almost surely, where Gr Λ : = { ( y , q ) : y ∈ Λ ( q ) } \operatorname{Gr}\Lambda:=\{(y,q):y\in\Lambda(q)\} Gr Λ := {( y , q ) : y ∈ Λ ( q )} is the graph of Λ \Lambda Λ . (Proof in Appendix § 11 .§ 4 )
Note that when there are no ties, Π ( q ) = { π q } \Pi(q)=\{\pi_q\} Π ( q ) = { π q } , and Eq. (11) reduces to an ODE, and Λ ( q ) = { Y π q } \Lambda(q)=\{Y_{\pi_q}\} Λ ( q ) = { Y π q } , recovering the usual single-policy fast timescale behavior locally.
Slow Timescale: Averaged Differential Inclusion
Section 4.1 shows that the coupled iterates asymptotically approach the graph of the compact global attractor Λ ( q ) \Lambda(q) Λ ( q ) for some quasi-static q q q . In this section, we show that the slow recursion is governed by a differential inclusion obtained by averaging over admissible occupation measures associated with the equilibrated fast time-scale dynamics. For y ∈ Y y\in\mathcal{Y} y ∈ Y and q ∈ Q q\in\mathcal{Q} q ∈ Q , define the slow-timescale Bellman residual map to be G ( y , q ) : = T y [ q ] − q G(y,q):=T_y[q]-q G ( y , q ) := T y [ q ] − q . Next, following (Yaji & Bhatnagar, 2020), let D ( q ) \mathcal{D}(q) D ( q ) denote the set of admissible limiting occupation measures describing the equilibrated fast time-scale dynamics at some q q q ; in particular, every P ∈ D ( q ) \mathbb{P}\in\mathcal{D}(q) P ∈ D ( q ) is supported on Λ ( q ) \Lambda(q) Λ ( q ) . The corresponding averaged slow-timescale residual is given by:
G ‾ ( q ) : = { ∫ Λ ( q ) G ( y , q ) P ( d y ) : P ∈ D ( q ) } (12) \overline{G}(q):=\left\{\int_{\Lambda(q)}G(y,q)\mathbb{P}(dy):\mathbb{P}\in\mathcal{D}(q)\right\} \tag*{(12)} G ( q ) := { ∫ Λ ( q ) G ( y , q ) P ( d y ) : P ∈ D ( q ) } (12)
Note that when Λ ( q ) = { y π q } \Lambda(q)=\{y_{\pi_q}\} Λ ( q ) = { y π q } , D ( q ) = { δ y π q } \mathcal{D}(q)=\{\delta_{y_{\pi_q}}\} D ( q ) = { δ y π q } , and thus, G ‾ ( q ) = { G ( y π q , q ) } \overline{G}(q)=\{G(y_{\pi_q},q)\} G ( q ) = { G ( y π q , q )} . The integral in Eq. (12) captures the long-run average effect of the equilibrated fast timescale behavior in y y y on the slow-timescale variable q q q .
Theorem 2 (Slow-timescale differential-inclusion limit). Let Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) denote the continuous affine interpolation of { Q n } \{Q_n\} { Q n } on the slow-timescale. Under Assumptions 1-2, Lemma 1, and almost surely bounded iterates { ( Y n , Q n ) } \{(Y_n,Q_n)\} {( Y n , Q n )} , Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) is almost surely an asymptotic pseudotrajectory of the averaged differential inclusion q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t)\in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) . Consequently, its ω \omega ω -limit set U : = ω ( Q ‾ ) \mathcal{U}:=\omega(\overline{Q}) U := ω ( Q ) is a nonempty compact invariant internally chain-transitive set of the limiting differential-inclusion dynamics. (Proof in Appendix § 11 .§ 5 )
Safe Configuration Set and Forward Invariance
Having established the limiting dynamics of the discrete TD learning iterates, we now show that these dynamics preserve the safety certificate: the set of joint action-value functions whose induced policy is everywhere safe is forward invariant, so a configuration that certifies safety cannot evolve into one that does not.
Definition 2 (Kernel-preserving actions). An action is kernel-preserving at state s s s , if it keeps the next state inside the viability kernel against every disturbance A Ω ( s ) : = { a ∈ A : P ( s ′ ∈ Ω ∣ s , a , d ) = 1 ∀ d ∈ D } \mathcal{A}^{\Omega}(s):=\{a\in\mathcal{A}:P(s'\in\Omega\mid s,a,d)=1\ \forall d\in\mathcal{D}\} A Ω ( s ) := { a ∈ A : P ( s ′ ∈ Ω ∣ s , a , d ) = 1 ∀ d ∈ D } , where κ , ϵ 0 > 0 \kappa,\epsilon_0>0 κ , ϵ 0 > 0 without loss of generality.
Definition 3 (Index Sets and Relaxed Constraint Sets). For each state s ∈ Ω s\in\Omega s ∈ Ω and each action a ∉ A Ω ( s ) a\notin\mathcal{A}^{\Omega}(s) a ∈ / A Ω ( s ) , fix a disturbance d ^ ( s , a ) ∈ D \hat{d}(s,a)\in\mathcal{D} d ^ ( s , a ) ∈ D with P ( s ′ ∉ Ω ∣ s , a , d ^ ( s , a ) ) > 0 P(s'\notin\Omega\mid s,a,\hat{d}(s,a))>0 P ( s ′ ∈ / Ω ∣ s , a , d ^ ( s , a )) > 0 . Then the index sets are defined as follows: I : = { ( s , a , d ) : s ∈ Ω , a ∈ A Ω ( s ) , d ∈ D } \mathcal{I}:=\{(s,a,d):s\in\Omega,\ a\in\mathcal{A}^{\Omega}(s),\ d\in\mathcal{D}\} I := {( s , a , d ) : s ∈ Ω , a ∈ A Ω ( s ) , d ∈ D } and J : = { ( s , a , d ^ ( s , a ) ) : s ∈ Ω , a ∉ A Ω ( s ) } \mathcal{J}:=\{(s,a,\hat{d}(s,a)):s\in\Omega,\ a\notin\mathcal{A}^{\Omega}(s)\} J := {( s , a , d ^ ( s , a )) : s ∈ Ω , a ∈ / A Ω ( s )} . Let C ϵ : = { q ∈ Q : q ( x ) ≥ − ϵ ∀ x ∈ I , q ( x ) ≤ − κ + ϵ ∀ x ∈ J } \mathcal{C}_{\epsilon}:=\{q\in\mathcal{Q}:q(x)\geq-\epsilon\ \forall x\in\mathcal{I},q(x)\leq-\kappa+\epsilon\ \forall x\in\mathcal{J}\} C ϵ := { q ∈ Q : q ( x ) ≥ − ϵ ∀ x ∈ I , q ( x ) ≤ − κ + ϵ ∀ x ∈ J } denote the relaxed constraint set, for ϵ ≥ 0 \epsilon\geq0 ϵ ≥ 0 i.e., C ϵ \mathcal{C}_{\epsilon} C ϵ relaxes each defining inequality of C 0 \mathcal{C}_0 C 0 by ϵ \epsilon ϵ .
Definition 4 (Safe Configuration Set). The safe configuration set is defined as the set of joint Q Q Q -functions whose induced policy is kernel-preserving :
Q c f g : = C 0 = { q ∈ Q : q ( x ) ≥ 0 ∀ x ∈ I , q ( x ) ≤ − κ ∀ x ∈ J } (13) \mathcal{Q}_{\mathrm{cfg}}:=\mathcal{C}_0=\{q\in\mathcal{Q}:q(x)\geq0\ \forall x\in\mathcal{I},q(x)\leq-\kappa\ \forall x\in\mathcal{J}\} \tag*{(13)} Q cfg := C 0 = { q ∈ Q : q ( x ) ≥ 0 ∀ x ∈ I , q ( x ) ≤ − κ ∀ x ∈ J } (13)
Next, let ρ ( q ) : = dist ( q , Q c f g ) \rho(q):=\operatorname{dist}(q,\mathcal{Q}_{\mathrm{cfg}}) ρ ( q ) := dist ( q , Q cfg ) denote the distance to the set Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg . Details on the geometry of the set is provided in Appendix § 11 .6.1. Throughout, we take ϵ 0 ∈ ( 0 , κ / 2 ) \epsilon_0\in(0,\kappa/2) ϵ 0 ∈ ( 0 , κ /2 ) , which ensures that the two families of constraints remain strictly separated on all of C ϵ 0 \mathcal{C}_{\epsilon_0} C ϵ 0 . As the coupled iterates approach the graph of Λ ( ⋅ ) \Lambda(\cdot) Λ ( ⋅ ) , safety certification (both positive and negative) must hold throughout Λ ( q ) \Lambda(q) Λ ( q ) .
Assumption 3 (Negative Certification of the fast attractor). ∃ σ Λ > 0 \exists\ \sigma_{\Lambda}>0 ∃ σ Λ > 0 , such that, at unit margin scale, y ( x ) ≤ − σ Λ ∀ x ∈ J , y ∈ Λ 1 ( q ) , q ∈ C ϵ 0 y(x)\leq-\sigma_{\Lambda}\ \forall x\in\mathcal{J},y\in\Lambda_1(q),q\in\mathcal{C}_{\epsilon_0} y ( x ) ≤ − σ Λ ∀ x ∈ J , y ∈ Λ 1 ( q ) , q ∈ C ϵ 0 .
The corresponding condition on I \mathcal{I} I is preserved in the fast inclusion, and hence, the certificate holds throughout Λ ( q ) \Lambda(q) Λ ( q ) . Note that Π ( q ) \Pi(q) Π ( q ) is greedy with respect to q q q and is hence independent of margin scale, and the safety Bellman operator of Eq. 5 is positively homogeneous of degree one in that margin, i.e., Λ κ ( q ) = κ Λ 1 ( q ) \Lambda_{\kappa}(q)=\kappa\Lambda_1(q) Λ κ ( q ) = κ Λ 1 ( q ) . Let the Assumption 3 hold and let Θ : = ( ( 1 − γ ) R max + κ ) / γ \Theta:=((1-\gamma)R_{\max}+\kappa)/\gamma Θ := (( 1 − γ ) R m a x + κ ) / γ . Then, for every K ≥ K ‾ : = ( ( 1 − γ ) R max + κ ) / ( γ σ Λ ) K\geq\underline{K}:=((1-\gamma)R_{\max}+\kappa)/(\gamma\sigma_{\Lambda}) K ≥ K := (( 1 − γ ) R m a x + κ ) / ( γ σ Λ ) , one has y ( x ) ≤ − Θ y(x)\leq-\Theta y ( x ) ≤ − Θ for all x ∈ J x\in\mathcal{J} x ∈ J , all y ∈ Λ ( q ) y\in\Lambda(q) y ∈ Λ ( q ) , and all q ∈ C ϵ 0 q\in\mathcal{C}_{\epsilon_0} q ∈ C ϵ 0 . If J = ∅ \mathcal{J}=\varnothing J = ∅ , the bound on K K K and the conclusion hold trivially. (Proof in Appendix § 11 .§ 6 )
Theorem 3 (Forward invariance and exponential attraction). Let Assumption 3 hold and let K ≥ K ‾ K\geq\underline{K} K ≥ K . If ρ ( q ( 0 ) ) < ϵ 0 \rho(q(0))<\epsilon_0 ρ ( q ( 0 )) < ϵ 0 , then every solution of q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t)\in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) satisfies ρ ( q ( t ) ) ≤ ρ ( q ( 0 ) ) e − ( 1 − γ ) t ∀ t ≥ 0 \rho(q(t))\leq\rho(q(0))e^{-(1-\gamma)t}\ \forall t\geq0 ρ ( q ( t )) ≤ ρ ( q ( 0 )) e − ( 1 − γ ) t ∀ t ≥ 0 . In particular, if q ( 0 ) ∈ Q c f g q(0)\in\mathcal{Q}_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg , then Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg is positively invariant and globally attracting with basin containing the open neighbourhood { q : ρ ( q ) < ϵ 0 } \{q:\rho(q)<\epsilon_0\} { q : ρ ( q ) < ϵ 0 } . (Proof in Appendix § 11 .§ 6 )
We next check that membership in Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg certifies safety of the induced policy.
Corollary 1 (Safety of the induced policy). Let q ( 0 ) ∈ Q c f g q(0)\in\mathcal{Q}_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg . Then at every t ≥ 0 t\geq0 t ≥ 0 the induced policy π q ( t ) \pi_{q(t)} π q ( t ) satisfies inf s ∈ Ω V π q ( t ) ( s ) ϕ ( s ) ≥ 0 \inf_{s\in\Omega}V^{\phi}_{\pi_{q(t)}(s)}(s)\geq0 inf s ∈ Ω V π q ( t ) ( s ) ϕ ( s ) ≥ 0 from any s 0 ∈ Ω s_0\in\Omega s 0 ∈ Ω , the state trajectory generated by μ q ( t ) \mu_{q(t)} μ q ( t ) remains in Ω \Omega Ω almost surely, for all time and against every disturbance sequence. (Proof in Appendix § 11 .§ 6 )
Convergence to Optimal Safety-Constrained Task Performance
Forward invariance ensures that the agent eventually learns a policy that is guaranteed to be safe. In this section, we show that the system not only remains safe but also maximizes task performance in the safe set.
Definition 5 (Optimal safety-constrained task value function). Let Q Ω : = R I = { q : I → R } Q_{\Omega} := \mathbb{R}^{\mathcal{I}} = \{q : \mathcal{I} \to\mathbb{R}\} Q Ω := R I = { q : I → R } denote the restricted action-value space on the index set I \mathcal{I} I . Define the robust safety-constrained task Bellman operator T Ω : Q Ω → Q Ω T_{\Omega} : Q_{\Omega} \to Q_{\Omega} T Ω : Q Ω → Q Ω :
T Ω [ q ] ( s , a , d ) = r ( s , a , d ) + γ E a ′ ∈ A Ω ( s ) d ′ ∈ D [ min a ′ ∈ A Ω ( s ′ ) max d ′ ∈ D q ( s ′ , a ′ , d ′ ) ] , ( s , a , d ) ∈ I (14) T_{\Omega}[q](s,a,d) = r(s,a,d) + \gamma\mathbb{E}_{\substack{a' \in A^{\Omega}(s) \\ d' \in D}} \left[ \min_{a' \in A^{\Omega}(s')} \max_{d' \in D} q(s',a',d') \right], \qquad(s,a,d) \in\mathcal{I} \tag*{(14)} T Ω [ q ] ( s , a , d ) = r ( s , a , d ) + γ E a ′ ∈ A Ω ( s ) d ′ ∈ D [ a ′ ∈ A Ω ( s ′ ) min d ′ ∈ D max q ( s ′ , a ′ , d ′ ) ] , ( s , a , d ) ∈ I (14)
Note that since A Ω ( s ) ≠ ∅ A^{\Omega}(s) \ne\varnothing A Ω ( s ) = ∅ for s ∈ Ω s \in\Omega s ∈ Ω , by contraction, T Ω [ ⋅ ] T_{\Omega}[\cdot] T Ω [ ⋅ ] has a unique fixed point Q Ω ∗ = T Ω Q Ω ∗ Q_{\Omega}^{*} = T_{\Omega}Q_{\Omega}^{*} Q Ω ∗ = T Ω Q Ω ∗ , and thus, the optimal safety-constrained task value function is given by V Ω ∗ ( s ) = max a ∈ A Ω ( s ) min d ∈ D Q Ω ∗ ( s , a , d ) V_{\Omega}^{*}(s) = \max_{a \in A^{\Omega}(s)} \min_{d \in D} Q_{\Omega}^{*}(s,a,d) V Ω ∗ ( s ) = max a ∈ A Ω ( s ) min d ∈ D Q Ω ∗ ( s , a , d ) , which is the maximum expected return that a safe policy can accrue by keeping the agent in Ω \Omega Ω . Moreover, let Q ∗ : = { q ∈ Q c f g : q ∣ I = Q Ω ∗ } Q^{*} := \{q \in Q_{\mathrm{cfg}} : q|_{\mathcal{I}} = Q_{\Omega}^{*}\} Q ∗ := { q ∈ Q cfg : q ∣ I = Q Ω ∗ } . Thus, every q ∈ Q ∗ ⊆ Q q \in Q^{*} \subseteq Q q ∈ Q ∗ ⊆ Q corresponds to a policy that is safe and attains the maximal possible return among all safe policies.
Let Q π ϕ , 1 Q_{\pi}^{\phi,1} Q π ϕ , 1 denote the safety critic obtained by scaling the margin g ( ⋅ ) g(\cdot) g ( ⋅ ) by K = 1 K=1 K = 1 . By homogeneity, Q π ϕ , K = K Q π ϕ , 1 Q_{\pi}^{\phi,K} = KQ_{\pi}^{\phi,1} Q π ϕ , K = K Q π ϕ , 1 . Next, let δ Ω : = inf q ∈ Q c f g min π ∈ Π ( q ) min s ∈ Ω V π π > 0 \delta_{\Omega} := \inf_{q \in Q_{\mathrm{cfg}}} \min_{\pi\in\Pi(q)} \min_{s \in\Omega} V_{\pi}^{\pi} > 0 δ Ω := inf q ∈ Q cfg min π ∈ Π ( q ) min s ∈ Ω V π π > 0 represent the margin of the safe policy that comes closest to ∂ Ω \partial\Omega ∂ Ω .
Theorem 4 (Convergence to optimal safety-constrained task performance). Let the sufficient margin scale K ∗ K^{*} K ∗ be defined as K ∗ : = R max + V ‾ δ Ω = ( 2 − γ ) R max ( 1 − γ ) δ Ω K^{*} := \frac{R_{\max}+\overline{V}}{\delta_{\Omega}} = \frac{(2-\gamma)R_{\max}}{(1-\gamma)\delta_{\Omega}} K ∗ := δ Ω R m a x + V = ( 1 − γ ) δ Ω ( 2 − γ ) R m a x , with V ‾ : = R max 1 − γ \overline{V} := \frac{R_{\max}}{1-\gamma} V := 1 − γ R m a x . Let U ⊂ { q : ρ ( q ) < ϵ 0 } U \subset\{q : \rho(q) < \epsilon_{0}\} U ⊂ { q : ρ ( q ) < ϵ 0 } . Then, under Theorems 2-3, almost surely bounded iterates ( Y n , Q n ) (Y_n,Q_n) ( Y n , Q n ) and K ≥ K ∗ ≥ K ‾ K \ge K^{*} \ge\overline{K} K ≥ K ∗ ≥ K , δ Ω > 0 \delta_{\Omega} > 0 δ Ω > 0 , every internally chain-transitive set of the averaged slow-timescale differential inclusion contained in Q c f g Q_{\mathrm{cfg}} Q cfg is a subset of Q ∗ Q^{*} Q ∗ : U ⊆ Q ∗ : = { q ∈ Q c f g : q ∣ I = Q Ω ∗ } U \subseteq Q^{*} := \{q \in Q_{\mathrm{cfg}} : q|_{\mathcal{I}} = Q_{\Omega}^{*}\} U ⊆ Q ∗ := { q ∈ Q cfg : q ∣ I = Q Ω ∗ } , and thus, dist ( Q n , Q ∗ ) → 0 \operatorname{dist}(Q_n,Q^{*}) \to0 dist ( Q n , Q ∗ ) → 0 almost surely. Moreover, on U U U the averaged slow-timescale residual on kernel-preserving coordinates I \mathcal{I} I is given by G ‾ ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } \overline{G}(q)|_{\mathcal{I}} = \{T_{\Omega}[q|_{\mathcal{I}}] - q|_{\mathcal{I}}\} G ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } . Thus, every corresponding limiting controller attains the optimal task value V Ω ∗ V_{\Omega}^{*} V Ω ∗ on Ω \Omega Ω while selecting only kernel-preserving actions. (Proof in Appendix § 11 .§ 7 ).
The sufficient margin scale K ∗ K^{*} K ∗ ensures that the safety truncation is never active when δ Ω > 0 \delta_{\Omega} > 0 δ Ω > 0 . Consequently, if δ Ω → 0 \delta_{\Omega} \to0 δ Ω → 0 , then K ∗ → ∞ K^{*} \to\infty K ∗ → ∞ ; if δ Ω = 0 \delta_{\Omega} = 0 δ Ω = 0 , Theorem 4 no longer guarantees convergence to the optimal safety-constrained task value for any finite K K K , motivating a finite-K K K characterization. Let Γ Ω \Gamma_{\Omega} Γ Ω be the set of kernel-preserving controller policies, and for ζ ≥ 0 \zeta\ge0 ζ ≥ 0 , define V Ω , ζ ∗ ( s ) : = sup μ ∈ Γ Ω , ζ inf ν V μ , ν ( s ) V_{\Omega,\zeta}^{*}(s) := \sup_{\mu\in\Gamma_{\Omega,\zeta}} \inf_{\nu} V^{\mu,\nu}(s) V Ω , ζ ∗ ( s ) := sup μ ∈ Γ Ω , ζ inf ν V μ , ν ( s ) and Γ Ω , ζ : = { μ ∈ Γ Ω : inf ν inf s ∈ Ω V μ , ν ϕ , 1 ( s ) ≥ ζ } \Gamma_{\Omega,\zeta} := \{\mu\in\Gamma_{\Omega} : \inf_{\nu} \inf_{s \in\Omega} V^{\phi,1}_{\mu,\nu}(s) \ge\zeta\} Γ Ω , ζ := { μ ∈ Γ Ω : inf ν inf s ∈ Ω V μ , ν ϕ , 1 ( s ) ≥ ζ } . Let Δ m a r g ( ζ ) : = ∥ V Ω ∗ − V Ω , ζ ∗ ∥ ∞ \Delta_{\mathrm{marg}}(\zeta) := \lVert V_{\Omega}^{*} - V_{\Omega,\zeta}^{*} \rVert_{\infty} Δ marg ( ζ ) := ∥ V Ω ∗ − V Ω , ζ ∗ ∥ ∞ , and let V K ∗ V_{K}^{*} V K ∗ denote the optimal joint value of Eq. (3) over kernel-preserving controllers, for some finite K ≥ K ‾ K \ge\overline{K} K ≥ K .
Theorem 5 (Finite-K K K characterization). Define ζ K : = R max + V ‾ K = ( 2 − γ ) R max ( 1 − γ ) K \zeta_{K} := \frac{R_{\max}+\overline{V}}{K} = \frac{(2-\gamma)R_{\max}}{(1-\gamma)K} ζ K := K R m a x + V = ( 1 − γ ) K ( 2 − γ ) R m a x . Assume there exists ζ ‾ \overline{\zeta} ζ such that Γ Ω , ζ K ≠ ∅ \Gamma_{\Omega,\zeta_{K}} \ne\varnothing Γ Ω , ζ K = ∅ for all 0 < ζ K < ζ ‾ 0 < \zeta_{K} < \overline{\zeta} 0 < ζ K < ζ (sufficiently large K K K ). Then, 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ Δ m a r g ( ζ K ) 0 \le V_{\Omega}^{*}(s) - V_{K}^{*}(s) \le\Delta_{\mathrm{marg}}(\zeta_{K}) 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ Δ marg ( ζ K ) for s ∈ Ω s \in\Omega s ∈ Ω . Hence, if Δ m a r g ( ζ ) → 0 \Delta_{\mathrm{marg}}(\zeta) \to0 Δ marg ( ζ ) → 0 as ζ ↓ 0 \zeta\downarrow0 ζ ↓ 0 , then V K ∗ → V Ω ∗ V_{K}^{*} \to V_{\Omega}^{*} V K ∗ → V Ω ∗ as K → ∞ K \to\infty K → ∞ . (Proof in Appendix § 11 .§ 7 ).
Thus, when δ Ω > 0 \delta_{\Omega} > 0 δ Ω > 0 , with sufficiently large, finite-K K K , the tabular two-timescale recursion converges to the optimal safety-constrained task value; when δ Ω = 0 \delta_{\Omega} = 0 δ Ω = 0 , the finite-K K K optimality gap vanishes as K → ∞ K \to\infty K → ∞ .
Experiments
In this section, we perform empirical evaluations on our proposed framework, where we choose to answer the following questions: (1) Does the two-timescale learning achieve stable convergence on continuous-control tasks via neural approximations? (2) How does our joint policy compare against CMDP baselines in maintaining near-zero violations during evaluation without sacrificing task performance? (3) How does the learned safe set dynamically expand during training?
Appendix C.1 discusses the exact tabular DP solution of the joint Bellman equation on a discrete double integrator, with comparisons to projection and safety-filtering baselines. Here, we instead discuss the results of scaling the optimal joint policy to high-dimensional continuous spaces where exact dynamic programming is intractable. To this end, we introduce JointSAC: a deep RL approximation that closely follows the ISAACS framework (Hsu et al., 2023) (built on SAC (Haarnoja et al., 2018)). Controller and disturbance policies are trained using gradient descent-ascent finite timescale separation (τ \tau τ -GDA) [20 ] .
Experimental Setup
We benchmark our framework on high-dimensional continuous control tasks in MuJoCo (Todorov et al., 2012), utilizing three Gymnasium locomotion environments (Towers et al., 2026) and eight SafeVelocity environments from SafetyGymnasium (Ji et al., 2023). We augment the environment with an adversarial disturbance that actively attacks the agent to either violate safety constraints or to prevent liveness.
Baselines: We compare our method against least-restrictive safety filters (LRSF), and three well-established CMDP baselines. We specifically select these CMDP baselines, as they represent the two dominant paradigms of model-free Safe RL: Lagrangian dual-descent (PPOLag, SACLag) and trust-region projections PCPO from omnisafe (Ji et al., 2024). Additional experiments and details can be found in Appendix § 12 (including the safe set expansion); an ablation of episode return/cost as K K K varies can be found in Appendix § 12 .§ 4 .
Main Results
Figure 2 illustrates training curves across four SafeVelocity (v1) environments (5 seeds). JointSAC demonstrates stable convergence to high task rewards with near-zero costs, whereas baselines exhibit higher variance, with only a subset that meets the permissible cost threshold (d = 0 d = 0 d = 0 ). Table 1 summarizes final rollout evaluations (300 evaluations per training seed, totaling 1,500 distinct eval seeds). Across all 11 environments, JointSAC maintains near-zero violations (with maximum cost of 0.03 ± 0.08 0.03 \pm0.08 0.03 ± 0.08 on Hopper-v4), while baselines exhibit inconsistent, sometimes, major cost violations (PCPO walks backwards on SafetyAntVel). Overall, JointSAC yields stable, high task performance while enforcing near-zero safety violations.
Figure 2. Training performance across 5 seeds (mean ± \pm ± standard deviation). The top row indicates episodic returns, while the bottom row indicates episodic costs as training progresses. JointSAC demonstrates stable convergence with near-zero episode costs.
Table 1. Evaluation Metrics on Adversarial Environments with values indicating mean ± \pm ± standard deviation across 5 training seeds and 300 rollouts each (totalling 1,500 evals). Results indicate that JointSAC (Ours) has near-zero costs (maximum of 0.03 ± 0.08 0.03 \pm0.08 0.03 ± 0.08 on only Hopper-v4).
Conclusion and Limitations
In this paper, we present a novel robust Bellman operator that jointly enables safety-constrained task optimization. We propose a two-timescale stochastic approximation algorithm to compute its fixed point and prove theoretical convergence to a set of optimal safety-constrained task value functions. The optimal joint policy theoretically guarantees safety while maximizing task returns. To scale the computation of the optimal fixed point to continuous-control tasks with a high-dimensional state space, we propose JointSAC. Empirical evaluations demonstrate that the neural approximation yields stable, low-variance training, while achieving near-zero safety violations.
Limitations. Firstly, while our theoretical analysis ensures strict safety, scaling to high-dimensional continuous spaces necessitates neural approximations, violating strict forward invariance. Secondly, theoretical convergence relies on a heavily scaled safety margin (K ≥ K ∗ K \ge K^{*} K ≥ K ∗ ). This can introduce numerical instabilities; in practice, K K K needs to be heuristically tuned as high as practically possible. Finally, our approach assumes well-defined, continuous safety margins under full state observability, which are often difficult to perfectly specify in unstructured real-world environments.
Acknowledgment
We thank members of the Safe Robotics Lab for their insightful discussion and comments on our work. This work was made possible through the use of computational resources and support provided by Princeton Research Computing. Generative AI tools were used for grammar and spelling checks, word choice, rephrasing, and assistance with editing code and launching experiments.
Preliminaries
In this section, we extend § 2 to provide definitions of some of the notations and concepts used in the paper, followed by brief preliminaries on Reinforcement Learning, Differential Inclusions, Asymptotic Pseudotrajectories, Internally Chain-Transitive Sets, Constrained Markov Decision Processes, and Hamilton-Jacobi Reachability analysis.
Definitions and Notations
Definition 6. (State, Action, and Disturbance Spaces ) We consider a discounted MDP with finite state, action and disturbance spaces: S ⊂ R n S \subset\mathbb{R}^{n} S ⊂ R n , A ⊂ R m A \subset\mathbb{R}^{m} A ⊂ R m , and D ⊂ R l D \subset\mathbb{R}^{l} D ⊂ R l respectively, with the transition kernel P ( ⋅ ∣ s , a , d ) ∈ Δ ( S ) P(\cdot\mid s,a,d) \in\Delta(S) P ( ⋅ ∣ s , a , d ) ∈ Δ ( S ) .
Definition 7. (Reward, Safety Margin, and the Viability Kernel ) The reward and the safety margin are given by r : S × A × D → [ 0 , R max ] r:S \times A \times D \to[0,R_{\max}] r : S × A × D → [ 0 , R m a x ] , R max > 0 R_{\max}>0 R m a x > 0 , and g : S → [ − G min , G max ] g:S \to[-G_{\min},G_{\max}] g : S → [ − G m i n , G m a x ] , with G min , G max > 0 G_{\min},G_{\max}>0 G m i n , G m a x > 0 respectively. We subsume the extended class-K e \mathcal{K}_{e} K e scaling function β ( ⋅ ) \beta(\cdot) β ( ⋅ ) into g ( s ) g(s) g ( s ) to align with task return scales (unless stated otherwise). The constraint set is F c : = { s ∈ S : g ( s ) ≥ 0 } \mathcal{F}^{c}:=\{s \in S:g(s)\geq0\} F c := { s ∈ S : g ( s ) ≥ 0 } , complementing the failure set F \mathcal{F} F . The viability kernel Ω ⊆ F c \Omega\subseteq\mathcal{F}^{c} Ω ⊆ F c is the subset of states from which a control policy exists that can keep the agent away from the failure set F \mathcal{F} F for all times, regardless of the adversarial disturbance.
Definition 8. (Action and Disturbance Policies ) A deterministic joint policy π = ( μ , ν ) \pi=(\mu,\nu) π = ( μ , ν ) pairs the mappings μ : S → A \mu:\mathcal{S}\to\mathcal{A} μ : S → A and ν : S × A → D \nu:\mathcal{S}\times\mathcal{A}\to\mathcal{D} ν : S × A → D , yielding π ( s ) = ( μ ( s ) , ν ( s , μ ( s ) ) ) \pi(s)=(\mu(s),\nu(s,\mu(s))) π ( s ) = ( μ ( s ) , ν ( s , μ ( s ))) .
Definition 9. (Value and Action-Value Functions ) the value and action-value function spaces are defined as V : = R ∣ S ∣ \mathcal{V}:=\mathbb{R}^{|\mathcal{S}|} V := R ∣ S ∣ and Q : = R ∣ S ∣ ∣ A ∣ ∣ D ∣ \mathcal{Q}:=\mathbb{R}^{|\mathcal{S}||\mathcal{A}||\mathcal{D}|} Q := R ∣ S ∣∣ A ∣∣ D ∣ , equipped with the supremum norm ∥ ⋅ ∥ ∞ \|\cdot\|_{\infty} ∥ ⋅ ∥ ∞ .
Reinforcement Learning
Reinforcement Learning (RL) [2 ] (Sutton & Barto 1998) consists of data-driven methods enabling agents to compute approximations of the optimal value function and/or optimal policy to an optimal control problem. In RL, the objective is to maximize the expected cumulative sum of rewards over a finite horizon T T T , or the expected discounted cumulative sum in the infinite horizon setting. Accordingly, the general form of the objective function without disturbances is written as
J ( π ) : = E ω ∼ π [ ∑ t = 0 ∞ γ t r ( s t , a t ) ∣ s 0 ∼ μ 0 ] (15) J(\pi):=\mathbb{E}_{\omega\sim\pi}\left[\left.\sum_{t=0}^{\infty}\gamma^t r(s_t,a_t)\right|s_0\sim\mu_0\right] \tag*{(15)} J ( π ) := E ω ∼ π [ t = 0 ∑ ∞ γ t r ( s t , a t ) s 0 ∼ μ 0 ] (15)
where ω \omega ω denotes a sampled trajectory ω = ( s 0 , a 0 , s 1 , a 1 , … ) \omega=(s_0,a_0,s_1,a_1,\ldots) ω = ( s 0 , a 0 , s 1 , a 1 , … ) generated by the policy π \pi π and μ 0 : S → [ 0 , 1 ] \mu_0:\mathcal{S}\to[0,1] μ 0 : S → [ 0 , 1 ] denotes the initial state distribution. Considering stochastic dynamics, the dynamic programming principle associated with the action-value function Q : S × A → R Q:\mathcal{S}\times\mathcal{A}\to\mathbb{R} Q : S × A → R representing the maximum expected cumulative discounted reward takes the form of a discrete-time Bellman equation [10 ]
Q ( s , a ) = r ( s , a ) + γ E s ′ ∼ p ( ⋅ ∣ s , a ) [ max a ′ ∈ A Q ( s ′ , a ′ ) ] (16) Q(s,a)=r(s,a)+\gamma\mathbb{E}_{s'\sim p(\cdot\mid s,a)}\left[\max_{a'\in\mathcal{A}}Q(s',a')\right] \tag*{(16)} Q ( s , a ) = r ( s , a ) + γ E s ′ ∼ p ( ⋅ ∣ s , a ) [ a ′ ∈ A max Q ( s ′ , a ′ ) ] (16)
For any Q ∈ Q Q\in\mathcal{Q} Q ∈ Q , the Bellman operator T M : Q → Q \mathcal{T}_{M}:\mathcal{Q}\to\mathcal{Q} T M : Q → Q associated with Eq. (16) is defined as:
T [ Q ] ( s , a ) : = r ( s , a ) + γ E s ′ ∼ p ( ⋅ ∣ s , a ) [ max a ′ ∈ A Q ( s ′ , a ′ ) ] (17) \mathcal{T}[Q](s,a):=r(s,a)+\gamma\mathbb{E}_{s'\sim p(\cdot\mid s,a)}\left[\max_{a'\in\mathcal{A}}Q(s',a')\right] \tag*{(17)} T [ Q ] ( s , a ) := r ( s , a ) + γ E s ′ ∼ p ( ⋅ ∣ s , a ) [ a ′ ∈ A max Q ( s ′ , a ′ ) ] (17)
The Bellman operator defined in Eq. (17) is a contraction mapping on Q \mathcal{Q} Q (under the L ∞ L_{\infty} L ∞ norm). By the Banach Fixed-Point Theorem [8 ] , this implies that iteratively applying T M \mathcal{T}_{M} T M to any initial action-value function Q Q Q converges to a unique fixed point Q ∗ Q^* Q ∗ , which is the solution to Eq. (16) . This theoretical guarantee underpins modern Deep RL, justifying the use of neural networks to approximate this fixed point in high-dimensional state spaces.
Differential Inclusions, Asymptotic Pseudotrajectories, and Internally Chain-Transitive Sets
Let E = R d E=\mathbb{R}^{d} E = R d be equipped with the supremum norm ∥ ⋅ ∥ ∞ \|\cdot\|_{\infty} ∥ ⋅ ∥ ∞ . Consider a set-valued map Ψ : E ⇒ E \Psi:E\Rightarrow E Ψ : E ⇒ E . Ψ \Psi Ψ is Marchaud if it is upper semicontinuous, has nonempty compact convex values, and has at most linear growth. Under these conditions, the differential inclusion
x ˙ ( t ) ∈ Ψ ( x ( t ) ) (18) \dot{x}(t)\in\Psi(x(t)) \tag*{(18)} x ˙ ( t ) ∈ Ψ ( x ( t )) (18)
admits absolutely continuous solutions from every initial condition [6 , 12 ] . Since solutions need not be unique, Eq. (18) induces a set-valued dynamical system Φ t ( x ) : = { z ( t ) : z ( 0 ) = x , z ( τ ) ∈ Ψ ( z ( τ ) ) a.e. } \Phi_t(x):=\{z(t):z(0)=x,z(\tau)\in\Psi(z(\tau))\ \text{a.e.}\} Φ t ( x ) := { z ( t ) : z ( 0 ) = x , z ( τ ) ∈ Ψ ( z ( τ )) a.e. } .
Definition 10. (Asymptotic Pseudotrajectory [11 ] ) Let Φ t \Phi_t Φ t denote the set-valued flow of Eq. (18) . A continuous function y : [ 0 , ∞ ) → E y:[0,\infty)\to E y : [ 0 , ∞ ) → E is an asymptotic pseudotrajectory (APT) of Φ \Phi Φ , if for every T > 0 T>0 T > 0 ,
lim t → ∞ sup 0 ≤ h ≤ T dist ( y ( t + h ) , Φ h ( x ( t ) ) ) = 0 (19) \lim_{t\to\infty}\sup_{0\leq h\leq T}\operatorname{dist}(y(t+h),\Phi_h(x(t)))=0 \tag*{(19)} t → ∞ lim 0 ≤ h ≤ T sup dist ( y ( t + h ) , Φ h ( x ( t ))) = 0 (19)
Definition 11. (Internally Chain-Transitive Set [12 ] ) A compact invariant set A ⊆ E A\subseteq E A ⊆ E is internally chain-transitive (ICT), if for any a , b ∈ A a,b\in A a , b ∈ A and any ϵ > 0 , T > 0 \epsilon>0,T>0 ϵ > 0 , T > 0 , there exist points a = x 0 , x 1 , … , x k = b a=x_0,x_1,\ldots,x_k=b a = x 0 , x 1 , … , x k = b in A A A and times t 1 , … , t k ≥ T t_1,\ldots,t_k\geq T t 1 , … , t k ≥ T such that
dist ( Φ t i ( x i − 1 ) , x i ) < ϵ i = 1 , … , k (20) \operatorname{dist}(\Phi_{t_i}(x_{i-1}),x_i)<\epsilon\qquad i=1,\ldots,k \tag*{(20)} dist ( Φ t i ( x i − 1 ) , x i ) < ϵ i = 1 , … , k (20)
Theorem 6. (Limit set of a bounded APT Benaïm et al., [12 ] ) Let Ψ \Psi Ψ satisfy the preceding conditions, and let y : [ 0 , ∞ ) → E y : [0,\infty) \to E y : [ 0 , ∞ ) → E be a bounded APT of x ˙ ( t ) ∈ Ψ ( x ( t ) ) \dot{x}(t) \in\Psi(x(t)) x ˙ ( t ) ∈ Ψ ( x ( t )) . Then, its ω \omega ω -limit set:
ω ( y ) = ⋂ t ≥ 0 { y ( s ) : s ≥ t } ‾ (21) \omega(y) = \bigcap_{t \ge0} \overline{\{y(s) : s \ge t\}} \tag*{(21)} ω ( y ) = t ≥ 0 ⋂ { y ( s ) : s ≥ t } (21)
is a non-empty, compact, invariant and internally chain-transitive set-valued dynamics Φ \Phi Φ .
In the two-timescale setting considered in this work, the required APT property is obtained from the stochastic recursive inclusion framework of (Yaji & Bhatnagar, 2020): after the “equilibration” of the fast timescale, the slow-timescale Bellman residual is averaged w.r.t admissible limiting occupation measures of the quasi-static fast timescale dynamics, yielding the averaged differential inclusion in Theorem 2.
Constrained Markov Decision Processes
A Constrained Markov Decision Process (CMDP) [5 ] extends the standard Markov Decision Process (MDP) framework by introducing auxiliary cost functions that encode safety constraints and perhaps, resource limitations. Formally, a CMDP is defined by the tuple M = ( S , A , P , r , c , γ , μ 0 ) \mathcal{M} = (\mathcal{S}, \mathcal{A}, \mathcal{P}, r, c, \gamma, \mu_0) M = ( S , A , P , r , c , γ , μ 0 ) , where S \mathcal{S} S denotes the state space, A \mathcal{A} A denotes the action space, P : S × A → Δ ( S ) \mathcal{P} : \mathcal{S} \times\mathcal{A} \to\Delta(\mathcal{S}) P : S × A → Δ ( S ) defines the transition dynamics, r : S × A → R r : \mathcal{S} \times\mathcal{A} \to\mathbb{R} r : S × A → R denotes the task reward function, c : S × A → R c : \mathcal{S} \times\mathcal{A} \to\mathbb{R} c : S × A → R denotes the constraint cost function, γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) denotes the discount factor and μ 0 : S → [ 0 , 1 ] \mu_0 : \mathcal{S} \to[0,1] μ 0 : S → [ 0 , 1 ] denotes the initial state distribution.
Let π : S → Δ ( A ) \pi: \mathcal{S} \to\Delta(\mathcal{A}) π : S → Δ ( A ) denote a stochastic policy, with the corresponding expected discounted cumulative return J r ( π ) J_r(\pi) J r ( π ) and expected discounted cumulative cost J c ( π ) J_c(\pi) J c ( π ) being defined as:
J r ( π ) : = E ω ∼ π [ ∑ t = 0 ∞ γ t r ( s t , a t ) ∣ s 0 ∼ μ 0 ] , J c ( π ) : = E ω ∼ π [ ∑ t = 0 ∞ γ t c ( s t , a t ) ∣ s 0 ∼ μ 0 ] (22) J_r(\pi) := \mathbb{E}_{\omega\sim\pi}\left[\sum_{t=0}^{\infty}\gamma^t r(s_t,a_t)\mathrel{\big|}s_0\sim\mu_0\right], \qquad J_c(\pi) := \mathbb{E}_{\omega\sim\pi}\left[\sum_{t=0}^{\infty}\gamma^t c(s_t,a_t)\mathrel{\big|}s_0\sim\mu_0\right] \tag*{(22)} J r ( π ) := E ω ∼ π [ t = 0 ∑ ∞ γ t r ( s t , a t ) s 0 ∼ μ 0 ] , J c ( π ) := E ω ∼ π [ t = 0 ∑ ∞ γ t c ( s t , a t ) s 0 ∼ μ 0 ] (22)
where ω = ( s 0 , a 0 , s 1 , a 1 , … ) \omega= (s_0, a_0, s_1, a_1, \ldots) ω = ( s 0 , a 0 , s 1 , a 1 , … ) denotes a trajectory generated by the policy π \pi π , with s 0 ∈ μ 0 s_0 \in\mu_0 s 0 ∈ μ 0 , a t ∼ π ( ⋅ ∣ s t ) a_t \sim\pi(\cdot|s_t) a t ∼ π ( ⋅ ∣ s t ) , and s t + 1 ∼ P ( ⋅ ∣ s t , a t ) s_{t+1} \sim\mathcal{P}(\cdot|s_t,a_t) s t + 1 ∼ P ( ⋅ ∣ s t , a t ) . Then, the objective in a CMDP is to find an optimal policy π ∗ \pi^* π ∗ that maximizes the expected return, while ensuring that the cost remains below a predefined safety threshold d ∈ R d \in\mathbb{R} d ∈ R :
max π ∈ Π J r ( π ) s.t. J c ( π ) ≤ d (23) \max_{\pi\in\Pi} J_r(\pi) \quad\text{s.t.} \quad J_c(\pi) \le d \tag*{(23)} π ∈ Π max J r ( π ) s.t. J c ( π ) ≤ d (23)
where Π \Pi Π is the set of all stationary stochastic policies. To solve this constrained optimization problem, a standard approach is to employ the Lagrangian relaxation by introducing a dual variable λ ≥ 0 \lambda\ge0 λ ≥ 0 (Lagrange multiplier). One can then obtain the unconstrained Lagrangian function, and the resulting min-max saddle-point problem :
min λ ≥ 0 max π ∈ Π L ( π , λ ) , where L ( π , λ ) : = J r ( π ) − λ ( J c ( π ) − d ) (24) \min_{\lambda\ge0}\max_{\pi\in\Pi}\mathcal{L}(\pi,\lambda), \qquad\text{where} \quad\mathcal{L}(\pi,\lambda) := J_r(\pi) - \lambda(J_c(\pi)-d) \tag*{(24)} λ ≥ 0 min π ∈ Π max L ( π , λ ) , where L ( π , λ ) := J r ( π ) − λ ( J c ( π ) − d ) (24)
Under Slater’s condition (assuming that at least one strictly safe policy exists, where J c ( π ) ≤ d J_c(\pi) \le d J c ( π ) ≤ d ), strong duality holds, and optimizing this unconstrained minimax objective is equivalent to solving the primal CMDP. More details can be found in seminal works on CMDPs [5 , 1 ] (Tessler et al. 2019; Stooke et al. 2020).
Hamilton-Jacobi Safety Analysis
Consider a continuous-time dynamical system s ˙ ( t ) = f ( s ( t ) , a ( t ) , d ( t ) ) \dot{s}(t) = f(s(t),a(t),d(t)) s ˙ ( t ) = f ( s ( t ) , a ( t ) , d ( t )) , where s ∈ S s \in\mathcal{S} s ∈ S , a ∈ A a \in\mathcal{A} a ∈ A and d ∈ D d \in\mathcal{D} d ∈ D as in Definition 2.1. We assume that the specification of a failure set is given by a margin function l : S → R l : \mathcal{S} \to\mathbb{R} l : S → R such that F c : = { s : g ( s ) ≥ 0 } \mathcal{F}^c := \{s : g(s) \ge0\} F c := { s : g ( s ) ≥ 0 } . The goal of safety analysis is then to determine the safe set Ω ⊆ F c ⊆ S \Omega\subseteq\mathcal{F}^c \subseteq\mathcal{S} Ω ⊆ F c ⊆ S which is the set of all initial states from which there exists a control policy that can keep the system away from the failure set F \mathcal{F} F , at all times, regardless of the adversarial disturbance (Mitchell et al., 2005). This is formalized as a zero-sum differential game , yielding the robust safety value function V ( s ) V(s) V ( s ) :
V ( s ) = inf N [ d ] ( ⋅ ) sup a ( ⋅ ) inf t ≥ 0 g ( ξ s 0 a , N [ d ] ( t ) ) (25) V(s) = \inf_{\mathcal{N}^{[d]}(\cdot)} \sup_{a(\cdot)} \inf_{t \ge0} g\left(\xi_{s_0}^{a,\mathcal{N}^{[d]}(t)}\right) \tag*{(25)} V ( s ) = N [ d ] ( ⋅ ) inf a ( ⋅ ) sup t ≥ 0 inf g ( ξ s 0 a , N [ d ] ( t ) ) (25)
where ξ s 0 a , N [ d ] ( ⋅ ) \xi^{a,\mathcal{N}[d]}_{s_0}(\cdot) ξ s 0 a , N [ d ] ( ⋅ ) denotes the trajectory starting at the state s 0 s_0 s 0 , and evolving according to the control and disturbance trajectories ( a , N [ d ] ) (a,\mathcal{N}[d]) ( a , N [ d ]) , with N [ d ] ( ⋅ ) \mathcal{N}[d](\cdot) N [ d ] ( ⋅ ) is defined to be the set of non-anticipative strategies for the disturbance, as defined in Evans & Souganidis [19 ] and Fisac et al. [21 ] . By the principle of Dynamic Programming, V ( s ) V(s) V ( s ) is the unique viscosity solution to the Hamilton-Jacobi-Isaacs (HJI) variational inequality:
0 = min { g ( s ) − V ( s , t ) , ∂ V ∂ t ( s , t ) + max a ∈ A min d ∈ D ∇ s V ⊤ ( s , t ) f ( s , a , d ) } (26) 0 = \min\left\{g(s)-V(s,t),\frac{\partial V}{\partial t}(s,t)+\max_{a\in\mathcal{A}}\min_{d\in\mathcal{D}}\nabla_s V^\top(s,t)f(s,a,d)\right\} \tag*{(26)} 0 = min { g ( s ) − V ( s , t ) , ∂ t ∂ V ( s , t ) + a ∈ A max d ∈ D min ∇ s V ⊤ ( s , t ) f ( s , a , d ) } (26)
where V ( s , T ) = g ( s ) , ∀ s ∈ S , t ∈ [ 0 , T ] V(s,T)=g(s),\ \forall s\in\mathcal{S},\ t\in[0,T] V ( s , T ) = g ( s ) , ∀ s ∈ S , t ∈ [ 0 , T ] . In the infinite-horizon T → ∞ T\to\infty T → ∞ case, V ( s , t ) V(s,t) V ( s , t ) becomes independent of t t t as long as there exists a nonempty safe set. Under stochastic dynamics, one can obtain the infinite-horizon Bellman equation as:
V ( s ) = min { g ( s ) , max a ∈ A min d ∈ D E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ ) ] } (27) V(s)=\min\left\{g(s),\max_{a\in\mathcal{A}}\min_{d\in\mathcal{D}}\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[V(s')]\right\} \tag*{(27)} V ( s ) = min { g ( s ) , a ∈ A max d ∈ D min E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ )] } (27)
where s ′ ∼ p ( ⋅ ∣ s , a , d ) ⟺ s ′ = s + f ( s , a , d ) Δ t + ϵ t s'\sim p(\cdot\mid s,a,d)\Longleftrightarrow s'=s+f(s,a,d)\Delta t+\epsilon_t s ′ ∼ p ( ⋅ ∣ s , a , d ) ⟺ s ′ = s + f ( s , a , d ) Δ t + ϵ t . However, the Bellman operator that governs Eq. 26 doesn’t induce a contraction mapping in the space of safe value functions. To leverage techniques from TD-learning and deep RL, Fisac et al. [22 ] introduces a discount factor γ ∈ ( 0 , 1 ) \gamma\in(0,1) γ ∈ ( 0 , 1 ) that ensures contraction on the space of value functions. This results in the following time-discounted Bellman equation :
V ( s ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , max a ∈ A min d ∈ D E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ ) ] } (28) V(s)=(1-\gamma)g(s)+\gamma\min\left\{g(s),\max_{a\in\mathcal{A}}\min_{d\in\mathcal{D}}\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[V(s')]\right\} \tag*{(28)} V ( s ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , a ∈ A max d ∈ D min E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ V ( s ′ )] } (28)
For more details, please refer to prior work([19 , 21 , 22 ] (Mitchell et al. 2005)).
Proofs of Theoretical Results
In this section, we provide detailed proofs and remarks on the theoretical results in § 3 , § 3.4 , § 4 , § 5 , and § 6 .
Safety Action-Value of the Joint Policy (Sec. 3.2)
Given a joint policy π \pi π , the safety Bellman equation is defined as:
Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } (29) Q^\phi_\pi(s,a,d)=(1-\gamma)g(s)+\gamma\min\left\{g(s),\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')}\min_{d'\in\nu(s',a')}Q^\phi_\pi(s',a',d')\right]\right\} \tag*{(29)} Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } (29)
Note that ν ( ⋅ , a ′ ) \nu(\cdot,a') ν ( ⋅ , a ′ ) refers to the specific sample a ′ a' a ′ drawn from μ ( ⋅ ) \mu(\cdot) μ ( ⋅ ) by the max a ′ ∈ μ \max_{a'\in\mu} max a ′ ∈ μ operation. The corresponding safety Bellman operator T π ϕ : Q → Q T^\phi_\pi:\mathcal{Q}\to\mathcal{Q} T π ϕ : Q → Q is defined as:
T π ϕ [ Q π ϕ ] ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } (30) T^\phi_\pi[Q^\phi_\pi](s,a,d)=(1-\gamma)g(s)+\gamma\min\left\{g(s),\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')}\min_{d'\in\nu(s',a')}Q^\phi_\pi(s',a',d')\right]\right\} \tag*{(30)} T π ϕ [ Q π ϕ ] ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } (30)
Proposition 1 (Contraction Mapping of T π ϕ T^\phi_\pi T π ϕ ). For any arbitrary fixed joint policy π \pi π , the time-discounted Bellman operator defined in Eq. 5 induces a γ \gamma γ -contraction mapping under the supremum norm. That is, for a given discount factor γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) , and any Q π ϕ , Q ~ π ϕ ∈ Q Q^\phi_\pi,\widetilde{Q}^\phi_\pi\in\mathcal{Q} Q π ϕ , Q π ϕ ∈ Q , we have
∥ T π ϕ [ Q π ϕ ] − T π ϕ [ Q ~ π ϕ ] ∥ ∞ ≤ γ ∥ Q π ϕ − Q ~ π ϕ ∥ ∞ . \left\|T^\phi_\pi[Q^\phi_\pi]-T^\phi_\pi[\widetilde{Q}^\phi_\pi]\right\|_\infty\leq\gamma\left\|Q^\phi_\pi-\widetilde{Q}^\phi_\pi\right\|_\infty. T π ϕ [ Q π ϕ ] − T π ϕ [ Q π ϕ ] ∞ ≤ γ Q π ϕ − Q π ϕ ∞ . (Proof in Appendix B.1)
Proof. It will suffice to show for all tuples ( s , a , d ) ∈ S × A × D (s,a,d)\in\mathcal{S}\times\mathcal{A}\times\mathcal{D} ( s , a , d ) ∈ S × A × D ,
∣ T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q ~ π ϕ ] ( s , a , d ) ∣ ≤ γ ∥ Q π ϕ − Q ~ π ϕ ∥ ∞ . \left|\mathcal{T}_{\pi}^{\phi}[Q_{\pi}^{\phi}](s,a,d)-\mathcal{T}_{\pi}^{\phi}[\widetilde{Q}_{\pi}^{\phi}](s,a,d)\right|\leq\gamma\left\|Q_{\pi}^{\phi}-\widetilde{Q}_{\pi}^{\phi}\right\|_{\infty}. T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q π ϕ ] ( s , a , d ) ≤ γ Q π ϕ − Q π ϕ ∞ .
We have:
∣ T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q ~ π ϕ ] ( s , a , d ) ∣ = ∣ ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } − ( 1 − γ ) g ( s ) − γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q ~ π ϕ ( s ′ , a ′ , d ′ ) ] } ∣ = ∣ γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } − γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q ~ π ϕ ( s ′ , a ′ , d ′ ) ] } ∣ . \begin{aligned}
\left|\mathcal{T}_{\pi}^{\phi}[Q_{\pi}^{\phi}](s,a,d)-\mathcal{T}_{\pi}^{\phi}[\widetilde{Q}_{\pi}^{\phi}](s,a,d)\right|
&=\left|(1-\gamma)g(s)\right.\\
&\quad+\gamma\min\left\{g(s),\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}Q_{\pi}^{\phi}(s',a',d')\right]\right\}\\
&\quad-(1-\gamma)g(s)\\
&\quad-\gamma\min\left\{g(s),\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}\widetilde{Q}_{\pi}^{\phi}(s',a',d')\right]\right\}\left.\right|\\
&=\left|\gamma\min\left\{g(s),\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}Q_{\pi}^{\phi}(s',a',d')\right]\right\}\right.\\
&\quad\left.-\gamma\min\left\{g(s),\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}\widetilde{Q}_{\pi}^{\phi}(s',a',d')\right]\right\}\right|.
\end{aligned} T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q π ϕ ] ( s , a , d ) = ∣ ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } − ( 1 − γ ) g ( s ) − γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } ∣ = γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } − γ min { g ( s ) , E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] } .
Observing that ∣ min { b , a } − min { c , a } ∣ ≤ ∣ b − c ∣ ∀ a , b , c ∈ R \left|\min\{b,a\}-\min\{c,a\}\right|\leq|b-c|\ \forall a,b,c\in\mathbb{R} ∣ min { b , a } − min { c , a } ∣ ≤ ∣ b − c ∣ ∀ a , b , c ∈ R ,
∣ T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q ~ π ϕ ] ( s , a , d ) ∣ ≤ γ ∣ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) − max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q ~ π ϕ ( s ′ , a ′ , d ′ ) ] ∣ . \begin{aligned}
\left|\mathcal{T}_{\pi}^{\phi}[Q_{\pi}^{\phi}](s,a,d)-\mathcal{T}_{\pi}^{\phi}[\widetilde{Q}_{\pi}^{\phi}](s,a,d)\right|
&\leq\gamma\left|\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}Q_{\pi}^{\phi}(s',a',d')-\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}\widetilde{Q}_{\pi}^{\phi}(s',a',d')\right]\right|.
\end{aligned} T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q π ϕ ] ( s , a , d ) ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) − a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] .
(Applying Jensen’s inequality)
≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ ∣ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) − max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q ~ π ϕ ( s ′ , a ′ , d ′ ) ∣ ] . \begin{aligned}
&\leq\gamma\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\left|\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}Q_{\pi}^{\phi}(s',a',d')-\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}\widetilde{Q}_{\pi}^{\phi}(s',a',d')\right|\right].
\end{aligned} ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) − a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] .
Without loss of generality, let the first min-max term on the right-hand side be the larger one, and denote by a ∗ a^{*} a ∗ a maximizer of this term. Then, we have:
∣ T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q ~ π ϕ ] ( s , a , d ) ∣ ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ ∣ min d ′ ∈ ν ( s ′ , a ∗ ) Q π ϕ ( s ′ , a ∗ , d ′ ) − min d ′ ∈ ν ( s ′ , a ∗ ) Q ~ π ϕ ( s ′ , a ∗ , d ′ ) ∣ ] \left|\mathcal{T}_{\pi}^{\phi}[Q_{\pi}^{\phi}](s,a,d)-\mathcal{T}_{\pi}^{\phi}[\widetilde{Q}_{\pi}^{\phi}](s,a,d)\right|\leq\gamma\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\left|\min_{d'\in\nu(s',a^{*})}Q_{\pi}^{\phi}(s',a^{*},d')-\min_{d'\in\nu(s',a^{*})}\widetilde{Q}_{\pi}^{\phi}(s',a^{*},d')\right|\right] T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q π ϕ ] ( s , a , d ) ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ d ′ ∈ ν ( s ′ , a ∗ ) min Q π ϕ ( s ′ , a ∗ , d ′ ) − d ′ ∈ ν ( s ′ , a ∗ ) min Q π ϕ ( s ′ , a ∗ , d ′ ) ]
Similarly, let d ∗ d^{*} d ∗ be a minimizer of the second, smaller term.
∣ T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q ~ π ϕ ] ( s , a , d ) ∣ ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ ∣ Q π ϕ ( s ′ , a ∗ , d ∗ ) − Q ~ π ϕ ( s ′ , a ∗ , d ∗ ) ∣ ] ≤ γ sup s ′ max a ′ ∈ A max d ′ ∈ D ∣ Q π ϕ ( s ′ , a ′ , d ′ ) − Q ~ π ϕ ( s ′ , a ′ , d ′ ) ∣ = γ ∥ Q π ϕ − Q ~ π ϕ ∥ ∞ . \begin{aligned}
\left|\mathcal{T}_{\pi}^{\phi}[Q_{\pi}^{\phi}](s,a,d)-\mathcal{T}_{\pi}^{\phi}[\widetilde{Q}_{\pi}^{\phi}](s,a,d)\right|
&\leq\gamma\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}\left[\left|Q_{\pi}^{\phi}(s',a^{*},d^{*})-\widetilde{Q}_{\pi}^{\phi}(s',a^{*},d^{*})\right|\right]\\
&\leq\gamma\sup_{s'}\max_{a'\in\mathcal{A}}\max_{d'\in\mathcal{D}}\left|Q_{\pi}^{\phi}(s',a',d')-\widetilde{Q}_{\pi}^{\phi}(s',a',d')\right|\\
&=\gamma\left\|Q_{\pi}^{\phi}-\widetilde{Q}_{\pi}^{\phi}\right\|_{\infty}.
\end{aligned} T π ϕ [ Q π ϕ ] ( s , a , d ) − T π ϕ [ Q π ϕ ] ( s , a , d ) ≤ γ E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ Q π ϕ ( s ′ , a ∗ , d ∗ ) − Q π ϕ ( s ′ , a ∗ , d ∗ ) ] ≤ γ s ′ sup a ′ ∈ A max d ′ ∈ D max Q π ϕ ( s ′ , a ′ , d ′ ) − Q π ϕ ( s ′ , a ′ , d ′ ) = γ Q π ϕ − Q π ϕ ∞ .
Joint Action-Value Function
For any fixed safety action-value function, Y ∈ Q Y\in\mathcal{Q} Y ∈ Q , the joint Bellman operator T Y : Q → Q \mathcal{T}_{Y}:\mathcal{Q}\to\mathcal{Q} T Y : Q → Q is given by:
T Y [ Q ] ( s , a , d ) = ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ V Q ( s ′ ) ] , Y ( s , a , d ) } (31) \mathcal{T}_{Y}[Q](s,a,d)=(1-\gamma)m(s,a,d)+\gamma\min\left\{r(s,a,d)+\mathbb{E}_{s'\sim\rho(\cdot\mid s,a,d)}[V_{Q}(s')],Y(s,a,d)\right\} \tag*{(31)} T Y [ Q ] ( s , a , d ) = ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ ρ ( ⋅ ∣ s , a , d ) [ V Q ( s ′ )] , Y ( s , a , d ) } (31)
where m ( s , a , d ) = min { r ( s , a , d ) , g ( s ) } m(s,a,d)=\min\{r(s,a,d),g(s)\} m ( s , a , d ) = min { r ( s , a , d ) , g ( s )} and V Q ( s ) = max a ∈ A min d ∈ D Q ( s , a , d ) V_{Q}(s)=\max_{a\in\mathcal{A}}\min_{d\in\mathcal{D}}Q(s,a,d) V Q ( s ) = max a ∈ A min d ∈ D Q ( s , a , d ) .
Proposition 2 (Contraction Mapping of T Y \mathcal{T}_{Y} T Y ). For any arbitrary, fixed Y ∈ Q Y\in\mathcal{Q} Y ∈ Q , the Bellman operator defined in Eq. 6 induces a γ \gamma γ -contraction mapping under the supremum norm. That is, for a given discount factor γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) , and any Q , Q ~ ∈ Q Q,\widetilde{Q}\in\mathcal{Q} Q , Q ∈ Q , we have ∥ T Y [ Q ] − T Y [ Q ~ ] ∥ ∞ ≤ γ ∥ Q − Q ~ ∥ ∞ \left\|\mathcal{T}_{Y}[Q]-\mathcal{T}_{Y}[\widetilde{Q}]\right\|_{\infty}\leq\gamma\left\|Q-\widetilde{Q}\right\|_{\infty} T Y [ Q ] − T Y [ Q ] ∞ ≤ γ Q − Q ∞ .
(Proof in Appendix B.2)
Proof. It will suffice to show for all tuples ( s , a , d ) ∈ S × A × D (s,a,d) \in\mathcal{S} \times\mathcal{A} \times\mathcal{D} ( s , a , d ) ∈ S × A × D , ∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ~ ] ( s , a , d ) ∣ ≤ γ ∥ Q − Q ~ ∥ ∞ \left|T_{\gamma}[\mathsf{Q}](s,a,d)-T_{\gamma}[\widetilde{\mathsf{Q}}](s,a,d)\right| \leq\gamma\left\|\mathsf{Q}-\widetilde{\mathsf{Q}}\right\|_{\infty} T γ [ Q ] ( s , a , d ) − T γ [ Q ] ( s , a , d ) ≤ γ Q − Q ∞ . We have:
∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ~ ] ( s , a , d ) ∣ = ∣ ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) ] , Y ( s , a , d ) } − ( 1 − γ ) m ( s , a , d ) − γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ] , Y ( s , a , d ) } ∣ = ∣ γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) ] , Y ( s , a , d ) } − γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ] , Y ( s , a , d ) } ∣ \begin{aligned}
|T_{\gamma}[\mathsf{Q}](s,a,d)-T_{\gamma}[\widetilde{\mathsf{Q}}](s,a,d)|
={}&|(1-\gamma)m(s,a,d) \\
&+\gamma\min\{r(s,a,d)+\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')],Y(s,a,d)\}\\
&-(1-\gamma)m(s,a,d)\\
&-\gamma\min\{r(s,a,d)+\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')],Y(s,a,d)\}|\\
={}&|\gamma\min\{r(s,a,d)+\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')],Y(s,a,d)\}\\
&-\gamma\min\{r(s,a,d)+\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')],Y(s,a,d)\}|
\end{aligned} ∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ] ( s , a , d ) ∣ = = ∣ ( 1 − γ ) m ( s , a , d ) + γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ )] , Y ( s , a , d )} − ( 1 − γ ) m ( s , a , d ) − γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ )] , Y ( s , a , d )} ∣ ∣ γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ )] , Y ( s , a , d )} − γ min { r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ )] , Y ( s , a , d )} ∣
Observing that ∣ min { b , a } − min { c , a } ∣ ≤ ∣ b − c ∣ \left|\min\{b,a\}-\min\{c,a\}\right|\leq|b-c| ∣ min { b , a } − min { c , a } ∣ ≤ ∣ b − c ∣ ∀ a , b , c ∈ R \forall a,b,c\in\mathbb{R} ∀ a , b , c ∈ R ,
∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ~ ] ( s , a , d ) ∣ ≤ γ ∣ r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) ] − r ( s , a , d ) − E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ] ∣ = γ ∣ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) ] − E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ] ∣ = γ ∣ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) − max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ] ∣ \begin{aligned}
\left|T_{\gamma}[\mathsf{Q}](s,a,d)-T_{\gamma}[\widetilde{\mathsf{Q}}](s,a,d)\right|
\leq{}&\gamma\left|r(s,a,d)+\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')\right]\right.\\
&\left.-r(s,a,d)-\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')\right]\right|\\
={}&\gamma\left|\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')\right]\right.\\
&\left.-\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')\right]\right|\\
={}&\gamma\left|\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')-\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')\right]\right|
\end{aligned} T γ [ Q ] ( s , a , d ) − T γ [ Q ] ( s , a , d ) ≤ = = γ r ( s , a , d ) + E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ] − r ( s , a , d ) − E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ] γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ] − E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ] γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) − a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ]
(Applying Jensen’s inequality)
≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ ∣ max a ′ ∈ A min d ′ ∈ D Q ( s ′ , a ′ , d ′ ) − max a ′ ∈ A min d ′ ∈ D Q ~ ( s ′ , a ′ , d ′ ) ∣ ] \leq\gamma\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\left|\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a',d')-\max_{a'\in\mathcal{A}}\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a',d')\right|\right] ≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) − a ′ ∈ A max d ′ ∈ D min Q ( s ′ , a ′ , d ′ ) ]
Without loss of generality, let the first min-max term on the right-hand side be the larger one, and denote by a ∗ a^* a ∗ a maximizer of this term. Then, we have:
∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ~ ] ( s , a , d ) ∣ ≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ ∣ min d ′ ∈ D Q ( s ′ , a ∗ , d ′ ) − min d ′ ∈ D Q ~ ( s ′ , a ∗ , d ′ ) ∣ ] \left|T_{\gamma}[\mathsf{Q}](s,a,d)-T_{\gamma}[\widetilde{\mathsf{Q}}](s,a,d)\right|
\leq\gamma\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\left|\min_{d'\in\mathcal{D}}\mathsf{Q}(s',a^*,d')-\min_{d'\in\mathcal{D}}\widetilde{\mathsf{Q}}(s',a^*,d')\right|\right] T γ [ Q ] ( s , a , d ) − T γ [ Q ] ( s , a , d ) ≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ d ′ ∈ D min Q ( s ′ , a ∗ , d ′ ) − d ′ ∈ D min Q ( s ′ , a ∗ , d ′ ) ]
Similarly, let d ∗ d^* d ∗ be a minimizer of the second, smaller term.
∣ T γ [ Q ] ( s , a , d ) − T γ [ Q ~ ] ( s , a , d ) ∣ ≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ ∣ Q ( s ′ , a ∗ , d ∗ ) − Q ~ ( s ′ , a ∗ , d ∗ ) ∣ ] ≤ γ sup s ′ ∈ S max a ′ ∈ A max d ′ ∈ D ∣ Q ( s ′ , a ′ , d ′ ) − Q ~ ( s ′ , a ′ , d ′ ) ∣ = γ ∥ Q − Q ~ ∥ ∞ \begin{aligned}
\left|T_{\gamma}[\mathsf{Q}](s,a,d)-T_{\gamma}[\widetilde{\mathsf{Q}}](s,a,d)\right|
&\leq\gamma\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\left|\mathsf{Q}(s',a^*,d^*)-\widetilde{\mathsf{Q}}(s',a^*,d^*)\right|\right]\\
&\leq\gamma\sup_{s'\in\mathcal{S}}\max_{a'\in\mathcal{A}}\max_{d'\in\mathcal{D}}\left|\mathsf{Q}(s',a',d')-\widetilde{\mathsf{Q}}(s',a',d')\right|\\
&=\gamma\left\|\mathsf{Q}-\widetilde{\mathsf{Q}}\right\|_{\infty}
\end{aligned} T γ [ Q ] ( s , a , d ) − T γ [ Q ] ( s , a , d ) ≤ γ E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ Q ( s ′ , a ∗ , d ∗ ) − Q ( s ′ , a ∗ , d ∗ ) ] ≤ γ s ′ ∈ S sup a ′ ∈ A max d ′ ∈ D max Q ( s ′ , a ′ , d ′ ) − Q ( s ′ , a ′ , d ′ ) = γ Q − Q ∞
Objective Function of Joint Action-Value Function
In this section, we derive the objective function from robust optimal stopping theory to provide a principled theoretical interpretation of the joint value function. To this end, we first prove supporting Lemmas.
Lemma 2. (Global upper bound and non-negativity of Q π ϕ Q_{\pi}^{\phi} Q π ϕ under Joint Trajectory Evaluation ) For all ( s , a , d ) ∈ S × A × D (s,a,d)\in\mathcal{S}\times\mathcal{A}\times\mathcal{D} ( s , a , d ) ∈ S × A × D and all greedy joint policies π \pi π , Q π ϕ ( s , a , d ) ≤ g ( s ) Q_{\pi}^{\phi}(s,a,d)\leq g(s) Q π ϕ ( s , a , d ) ≤ g ( s ) independent of the policy evaluated. Consequently, for all states within the failure set, s ∈ F s\in\mathcal{F} s ∈ F , Q π s a f e , π d ϕ ( s , a , d ) < 0 Q_{\pi^{\mathrm{safe}},\pi^{d}}^{\phi}(s,a,d)<0 Q π safe , π d ϕ ( s , a , d ) < 0 , where the failure set is defined as the set F = { s ∈ S : g ( s ) < 0 } \mathcal{F}=\{s\in\mathcal{S}:g(s)<0\} F = { s ∈ S : g ( s ) < 0 } .
Proof. By definition,
Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ max a ′ ∈ μ ( s ′ ) min d ′ ∈ ν ( s ′ , a ′ ) Q π ϕ ( s ′ , a ′ , d ′ ) ] } Q_{\pi}^{\phi}(s,a,d)=(1-\gamma)g(s)+\gamma\min\left\{g(s),\mathbb{E}_{s'\sim p(\cdot\mid s,a,d)}\left[\max_{a'\in\mu(s')} \min_{d'\in\nu(s',a')}Q_{\pi}^{\phi}(s',a',d')\right]\right\} Q π ϕ ( s , a , d ) = ( 1 − γ ) g ( s ) + γ min { g ( s ) , E s ′ ∼ p ( ⋅ ∣ s , a , d ) [ a ′ ∈ μ ( s ′ ) max d ′ ∈ ν ( s ′ , a ′ ) min Q π ϕ ( s ′ , a ′ , d ′ ) ] }
Noting that min { x , y } ≤ x \min\{x,y\}\leq x min { x , y } ≤ x , Q π ϕ ( s , a , d ) ≤ ( 1 − γ ) g ( s ) + γ g ( s ) = g ( s ) Q_{\pi}^{\phi}(s,a,d)\leq(1-\gamma)g(s)+\gamma g(s)=g(s) Q π ϕ ( s , a , d ) ≤ ( 1 − γ ) g ( s ) + γ g ( s ) = g ( s ) . For all states s ∈ F s\in\mathcal{F} s ∈ F , by definition, g ( s ) < 0 g(s)<0 g ( s ) < 0 . Furthermore, applying our previous result gives us Q π ϕ ( s , a , d ) < 0 Q_{\pi}^{\phi}(s,a,d)<0 Q π ϕ ( s , a , d ) < 0 . Finally, noting that g ( s ) g(s) g ( s ) is independent of π \pi π , completes the proof. □
Remark 1. As seen in Lemma 2, the upper bound of Q π ϕ Q_{\pi}^{\phi} Q π ϕ relies solely on the minimum operator in the safety Bellman equation. Therefore, it holds universally for any arbitrary policy and does not require that the policy be greedy with respect to safety Q-function.
Remark 2. A positive immediate margin (g ( s ) > 0 g(s)>0 g ( s ) > 0 ) does not guarantee viability. In inevitable failure states (unsafe states) where no safe policy exists, the long-term safety value correctly captures this future inevitable failure by evaluating to Q π ϕ ( s , a , d ) < 0 Q_{\pi}^{\phi}(s,a,d)<0 Q π ϕ ( s , a , d ) < 0 . Note that Lemma 2 only provides a global upper bound and does not impose a lower bound, allowing Q π ϕ ( s , a , d ) Q_{\pi}^{\phi}(s,a,d) Q π ϕ ( s , a , d ) to reflect the unsafe states.
Definition 1 (Task and safety optimizing regions). The region where the task value function is strictly lower than the safe value function is defined as the task-optimizing region: Ω ψ = { s ∈ S ∣ V q ψ ( s ) < V π ϕ ( s ) } \Omega^{\psi}=\{s\in\mathcal{S}\mid V_{q}^{\psi}(s)<V_{\pi}^{\phi}(s)\} Ω ψ = { s ∈ S ∣ V q ψ ( s ) < V π ϕ ( s )} . The region where the task value function is greater than the safe value function is defined as the safety-optimizing region: Ω ϕ = { s ∈ S ∣ V q ψ ( s ) ≥ V π ϕ ( s ) } \Omega^{\phi}=\{s\in\mathcal{S}\mid V_{q}^{\psi}(s)\geq V_{\pi}^{\phi}(s)\} Ω ϕ = { s ∈ S ∣ V q ψ ( s ) ≥ V π ϕ ( s )} .
Lemma 3. (First Switching time as valid stopping time) Let ( W , G , P ) (\mathcal{W},\mathcal{G},\mathbb{P}) ( W , G , P ) be a probability space and let ( s k ) k = 0 T (s_k)_{k=0}^{T} ( s k ) k = 0 T be a stochastic process taking values in a measurable state space ( S , B ( S ) ) (\mathcal{S},\mathcal{B}(\mathcal{S})) ( S , B ( S )) . Let F = ( G k ) k = 0 T \mathbb{F}=(\mathcal{G}_k)_{k=0}^{T} F = ( G k ) k = 0 T be the natural filtration where G k = σ ( s 0 , … , s k ) \mathcal{G}_k=\sigma(s_0,\ldots,s_k) G k = σ ( s 0 , … , s k ) . Given a Borel-measurable safety maximizing region, Ω ϕ ∈ B ( S ) \Omega^{\phi}\in\mathcal{B}(\mathcal{S}) Ω ϕ ∈ B ( S ) , define the first switching time τ : W → { 0 , ⋯ , T } \tau:\mathcal{W}\to\{0,\cdots,T\} τ : W → { 0 , ⋯ , T } as:
τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } \tau=\inf\{k\in\{0,\cdots,T\}:s_k\in\Omega^{\phi}\} τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } where T T T is the time horizon (T → ∞ T\to\infty T → ∞ for infinite horizon setting) and inf ∅ = T \inf\varnothing=T inf ∅ = T . Then the first switching time, τ \tau τ , is a stopping time with respect to F \mathbb{F} F .
Proof. τ \tau τ is a stopping time if and only if for every k ∈ { 0 , ⋯ , T } k\in\{0,\cdots,T\} k ∈ { 0 , ⋯ , T } , the set of { τ ≤ k } ∈ G k \{\tau\leq k\}\in\mathcal{G}_k { τ ≤ k } ∈ G k . We start by observing that the event { τ ≤ k } \{\tau\leq k\} { τ ≤ k } is equivalent to union of all events where the trajectory switched the first time from task optimizing region to safety maximizing region, { τ ≤ k } = ⋃ j = 0 k { s j ∈ Ω ϕ } \{\tau\leq k\}=\bigcup_{j=0}^{k}\{s_j\in\Omega^{\phi}\} { τ ≤ k } = ⋃ j = 0 k { s j ∈ Ω ϕ } . Noting that the state s j s_j s j is G j \mathcal{G}_j G j -measurable by definition of natural filtration, { s j ∈ Ω ϕ } ∈ G j \{s_j\in\Omega^{\phi}\}\in\mathcal{G}_j { s j ∈ Ω ϕ } ∈ G j because Ω ϕ \Omega^{\phi} Ω ϕ is a Borel set in S \mathcal{S} S . Moreover, we have { s j ∈ Ω ϕ } ∈ G k \{s_j\in\Omega^{\phi}\}\in\mathcal{G}_k { s j ∈ Ω ϕ } ∈ G k due to monotonicity of filtration (i.e., G j ⊆ G k ∀ j ≤ k \mathcal{G}_j\subseteq\mathcal{G}_k\ \forall j\leq k G j ⊆ G k ∀ j ≤ k ). Finally, because σ \sigma σ -algebras are closed under finite union, we get { τ ≤ k } ∈ G k \{\tau\leq k\}\in\mathcal{G}_k { τ ≤ k } ∈ G k . This concludes the proof that τ \tau τ is a valid stopping time. □
Remark 3. (Reduction of the Joint Action-Value Function to Only Task Action-Value Function Prior to Switching)
Prior to the first switching time τ \tau τ , the trajectory remains entirely within the task optimizing region Ω ψ \Omega^{\psi} Ω ψ . In this region, by definition, V q ψ ( s ) = r π ( s ) + E [ V q ( s ′ ) ] < V π ϕ ( s ) V_{q}^{\psi}(s)=r_{\pi}(s)+\mathbb{E}[V_{q}(s')]<V_{\pi}^{\phi}(s) V q ψ ( s ) = r π ( s ) + E [ V q ( s ′ )] < V π ϕ ( s ) . Furthermore, recalling from Lemma 2 that the safety value is globally bounded by the immediate margin, and the fact that, since the successor state remains in the domain V q ( s ′ ) ≥ 0 V_{q}(s')\geq0 V q ( s ′ ) ≥ 0 , we have the strict ordering r π ( s ) ≤ V q ψ ( s ) < V π ϕ ( s ) ≤ g ( s ) r_{\pi}(s)\leq V_{q}^{\psi}(s)<V_{\pi}^{\phi}(s)\leq g(s) r π ( s ) ≤ V q ψ ( s ) < V π ϕ ( s ) ≤ g ( s ) . This implies, r ( s , a ) < g ( s ) r(s,a)<g(s) r ( s , a ) < g ( s ) . Consequently, V q ( s ) = ( 1 − γ ) r π ( s ) + γ V q ψ ( s ) = r π ( s ) + γ E [ V q ( s ′ ) ] V_{q}(s)=(1-\gamma)r_{\pi}(s)+\gamma V_{q}^{\psi}(s)=r_{\pi}(s)+\gamma\mathbb{E}[V_{q}(s')] V q ( s ) = ( 1 − γ ) r π ( s ) + γ V q ψ ( s ) = r π ( s ) + γ E [ V q ( s ′ )] .This ensures that before entering the safety-maximizing region, the joint formulation evaluates only the task objective while remaining implicitly upper-bounded by g ( s ) g(s) g ( s ) .
Let the cumulative return from time t = 0 t=0 t = 0 , evaluated at a stopping time τ \tau τ be given by R τ : = ∑ t = 0 τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ ) } + γ V Y ϕ ( s τ ) ) \mathcal{R}_{\tau}:=\sum_{t=0}^{\tau-1}\gamma^{t}r(s_t)+\gamma^{\tau}\left((1-\gamma)\min\{r(s_{\tau}),g(s_{\tau})\}+\gamma V_{Y}^{\phi}(s_{\tau})\right) R τ := ∑ t = 0 τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ )} + γ V Y ϕ ( s τ ) ) , where V Y ϕ ( s τ ) = Y ( s τ , μ ( s ) , ν ( s , μ ( s ) ) ) V_{Y}^{\phi}(s_{\tau})=Y(s_{\tau},\mu(s),\nu(s,\mu(s))) V Y ϕ ( s τ ) = Y ( s τ , μ ( s ) , ν ( s , μ ( s ))) . For a process observed from the next state s 1 s_1 s 1 (which we will alias as s 0 ′ s'_0 s 0 ′ ), let τ ′ \tau' τ ′ denote a stopping time. Then the cumulative return from t = 1 t=1 t = 1 is defined as:
R τ ′ ′ : = ∑ t = 0 τ ′ − 1 γ t r ( s t ′ ) + γ τ ′ ( ( 1 − γ ) min { r ( s τ ′ ′ ) , g ( s τ ′ ′ ) } + γ V Y ϕ ( s τ ′ ′ ) ) \mathcal{R}'_{\tau'}:=\sum_{t=0}^{\tau'-1}\gamma^{t}r(s'_t)+\gamma^{\tau'}\left((1-\gamma)\min\{r(s'_{\tau'}),g(s'_{\tau'})\}+\gamma V_{Y}^{\phi}(s'_{\tau'})\right) R τ ′ ′ := ∑ t = 0 τ ′ − 1 γ t r ( s t ′ ) + γ τ ′ ( ( 1 − γ ) min { r ( s τ ′ ′ ) , g ( s τ ′ ′ )} + γ V Y ϕ ( s τ ′ ′ ) ) . Then, consider the following lemma:
Lemma 4. Let Λ k \Lambda_k Λ k be the set of stopping times τ \tau τ bounded by time horizon k k k , i.e., 0 ≤ τ ≤ k 0 \le\tau\le k 0 ≤ τ ≤ k . Let R τ = ( R t ) t ≤ τ \mathcal{R}_{\tau} = (R_t)_{t \le\tau} R τ = ( R t ) t ≤ τ be the stochastic process representing the cumulative discounted reward. Let V Q k ( s 1 ) V_{Q_k}(s_1) V Q k ( s 1 ) be the value function evaluated at the next state s 1 s_1 s 1 , defined as the optimal stopping problem
V Q k ( s 1 ) : = inf τ ′ ∈ Λ k E ω [ R τ ′ ′ ∣ s 0 ′ = s 1 ] . V_{Q_k}(s_1) := \inf_{\tau' \in\Lambda_k} \mathbb{E}_{\omega}\left[R'_{\tau'} \mid s'_0 = s_1\right]. V Q k ( s 1 ) := τ ′ ∈ Λ k inf E ω [ R τ ′ ′ ∣ s 0 ′ = s 1 ] . Then the following equality holds, evaluated from s 0 = s s_0 = s s 0 = s :
r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] = inf τ ∈ Λ k + 1 τ ≥ 1 E ω [ R τ ∣ s 0 = s ] . r(s) + \gamma\mathbb{E}_{\omega(s_1)}\left[V_{Q_k}(s_1) \mid s_0 = s\right] = \inf_{\substack{\tau\in\Lambda_{k+1}\\ \tau\ge1}} \mathbb{E}_{\omega}\left[R_{\tau} \mid s_0 = s\right]. r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] = τ ∈ Λ k + 1 τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] . where ω ( s 1 ) \omega(s_1) ω ( s 1 ) denotes the s 1 s_1 s 1 element of the trajectory ω \omega ω .
Proof. We will prove this by showing inequality in both directions. We first prove:
r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] ≥ inf τ ∈ Λ k + 1 τ ≥ 1 E ω [ R τ ∣ s 0 = s ] . r(s) + \gamma\mathbb{E}_{\omega(s_1)}\left[V_{Q_k}(s_1) \mid s_0 = s\right] \ge\inf_{\substack{\tau\in\Lambda_{k+1}\\ \tau\ge1}} \mathbb{E}_{\omega}\left[R_{\tau} \mid s_0 = s\right]. r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] ≥ τ ∈ Λ k + 1 τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] .
To prove the above inequality, we will construct a global stopping time by pasting together ϵ \epsilon ϵ -optimal local stopping times.
Fix an arbitrarily small ϵ > 0 \epsilon> 0 ϵ > 0 . For every realization z z z of the state s 1 s_1 s 1 , there exists a valid stopping time τ z ′ ∈ Λ k \tau'_z \in\Lambda_k τ z ′ ∈ Λ k such that its expected value is ϵ \epsilon ϵ -close to the optimal value V Q k ( z ) V_{Q_k}(z) V Q k ( z ) , i.e., E ω [ R τ z ′ ′ ∣ s 0 ′ = z ] ≤ V Q k ( z ) + ϵ \mathbb{E}_{\omega}[R'_{\tau'_z} \mid s'_0 = z] \le V_{Q_k}(z) + \epsilon E ω [ R τ z ′ ′ ∣ s 0 ′ = z ] ≤ V Q k ( z ) + ϵ .
Define a global candidate stopping time τ ∗ ∈ Λ k + 1 \tau^* \in\Lambda_{k+1} τ ∗ ∈ Λ k + 1 by waiting one step and then executing τ z ′ \tau'_z τ z ′ , i.e., τ ∗ : = 1 + τ z ′ \tau^* := 1 + \tau'_z τ ∗ := 1 + τ z ′ . By the recursive definition of cumulative return, R τ ∗ = r ( s ) + γ R τ z ′ ′ R_{\tau^*} = r(s) + \gamma R'_{\tau'_z} R τ ∗ = r ( s ) + γ R τ z ′ ′ .
We now invoke Lemma 2.8 in Aguilar [3 ] (Stability under Pasting, from optimal robust stopping time theory), which states that the set of stopping times is closed under such concatenation. Since τ z ′ \tau'_z τ z ′ depends on the history after t = 1 t = 1 t = 1 , the constructed variable τ ∗ \tau^* τ ∗ is non-anticipative and is a valid stopping time in Λ k + 1 \Lambda_{k+1} Λ k + 1 with τ ∗ ≥ 1 \tau^* \ge1 τ ∗ ≥ 1 .
The global infimum over Λ k + 1 \Lambda_{k+1} Λ k + 1 must be less than or equal to the expectation of the specific candidate:
inf τ ∈ Λ k + 1 τ ≥ 1 E ω [ R τ ∣ s 0 = s ] ≤ E ω [ R τ ∗ ∣ s 0 = s ] . \inf_{\substack{\tau\in\Lambda_{k+1}\\ \tau\ge1}} \mathbb{E}_{\omega}\left[R_{\tau} \mid s_0 = s\right] \le\mathbb{E}_{\omega}\left[R_{\tau^*} \mid s_0 = s\right]. τ ∈ Λ k + 1 τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] ≤ E ω [ R τ ∗ ∣ s 0 = s ] .
Finally, applying the Law of Iterated Expectations and our ϵ \epsilon ϵ -bound yields:
inf τ ∈ Λ k + 1 τ ≥ 1 E ω [ R τ ∣ s 0 = s ] ≤ E ω ( s 1 ) [ r ( s ) + γ E ω [ R τ z ′ ′ ∣ s 0 ′ = s 1 ] ] ≤ E ω ( s 1 ) [ r ( s ) + γ ( V Q k ( s 1 ) + ϵ ) ] = r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ] + γ ϵ \begin{aligned}
\inf_{\substack{\tau\in\Lambda_{k+1}\\ \tau\ge1}} \mathbb{E}_{\omega}\left[R_{\tau} \mid s_0 = s\right]
&\le\mathbb{E}_{\omega(s_1)}\left[r(s) + \gamma\mathbb{E}_{\omega}\left[R'_{\tau'_z} \mid s'_0 = s_1\right]\right] \\
&\le\mathbb{E}_{\omega(s_1)}\left[r(s) + \gamma\left(V_{Q_k}(s_1) + \epsilon\right)\right] \\
&= r(s) + \gamma\mathbb{E}_{\omega(s_1)}\left[V_{Q_k}(s_1)\right] + \gamma\epsilon
\end{aligned} τ ∈ Λ k + 1 τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] ≤ E ω ( s 1 ) [ r ( s ) + γ E ω [ R τ z ′ ′ ∣ s 0 ′ = s 1 ] ] ≤ E ω ( s 1 ) [ r ( s ) + γ ( V Q k ( s 1 ) + ϵ ) ] = r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ] + γ ϵ
Since this inequality holds for any arbitrary small ϵ > 0 \epsilon> 0 ϵ > 0 , letting ϵ → 0 \epsilon\to0 ϵ → 0 yields the first direction.
Next, we prove the opposite direction:
r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] ≤ inf τ ∈ Λ k + 1 τ ≥ 1 E ω [ R τ ∣ s 0 = s ] . r(s) + \gamma\mathbb{E}_{\omega(s_1)}\left[V_{Q_k}(s_1) \mid s_0 = s\right] \le\inf_{\substack{\tau\in\Lambda_{k+1}\\ \tau\ge1}} \mathbb{E}_{\omega}\left[R_{\tau} \mid s_0 = s\right]. r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] ≤ τ ∈ Λ k + 1 τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] .
Let τ ∈ Λ k + 1 \tau\in\Lambda_{k+1} τ ∈ Λ k + 1 be any arbitrary global stopping time with τ ≥ 1 \tau\ge1 τ ≥ 1 .
Conditioning on the first transition s 1 = z s_1 = z s 1 = z , the remainder of the trajectory induces a local stopping time τ z ′ = τ − 1 \tau'_z = \tau- 1 τ z ′ = τ − 1 . The induced stopping time satisfies 0 ≤ τ z ′ ≤ k 0 \le\tau'_z \le k 0 ≤ τ z ′ ≤ k , and thus, τ z ′ ∈ Λ k \tau'_z \in\Lambda_k τ z ′ ∈ Λ k .
By the definition of value function as an infimum over Λ k \Lambda_k Λ k , we have E ω [ R τ z ′ ′ ∣ s 0 ′ = z ] ≥ V Q k ( z ) \mathbb{E}_{\omega}[\mathcal{R}'_{\tau'_z}\mid s'_0=z]\ge V_{Q_k}(z) E ω [ R τ z ′ ′ ∣ s 0 ′ = z ] ≥ V Q k ( z ) .
Using Law of Iterated Expectations,
E ω [ R τ ∣ s 0 = s ] = r ( s ) + γ E ω ( s 1 ) [ E ω [ R τ s 1 ′ ′ ∣ s 0 ′ = s 1 ] ] ≥ r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ] \mathbb{E}_{\omega}[\mathcal{R}_{\tau}\mid s_0=s]=r(s)+\gamma\mathbb{E}_{\omega(s_1)}\left[\mathbb{E}_{\omega}\left[\mathcal{R}'_{\tau'_{s_1}}\mid s'_0=s_1\right]\right]
\ge r(s)+\gamma\mathbb{E}_{\omega(s_1)}[V_{Q_k}(s_1)] E ω [ R τ ∣ s 0 = s ] = r ( s ) + γ E ω ( s 1 ) [ E ω [ R τ s 1 ′ ′ ∣ s 0 ′ = s 1 ] ] ≥ r ( s ) + γ E ω ( s 1 ) [ V Q k ( s 1 )]
Finally, since this inequality holds for any arbitrary τ ∈ Λ k + 1 \tau\in\Lambda_{k+1} τ ∈ Λ k + 1 , ( τ ≥ 1 ) (\tau\ge1) ( τ ≥ 1 ) , it must hold for the infimum over all such τ \tau τ , completing the proof.
Theorem 7. (Objective Function for a fixed trajectory ) Let ω = ( s 0 , s 1 , ⋯ , s T ) \omega=(s_0,s_1,\cdots,s_T) ω = ( s 0 , s 1 , ⋯ , s T ) be a trajectory generated by action policy, μ ( s ) \mu(s) μ ( s ) , and disturbance policy ν ( s , μ ( s ) ) \nu(s,\mu(s)) ν ( s , μ ( s )) , with associated rewards r ( s t ) r(s_t) r ( s t ) . Here, T T T denotes the time horizon. Then the objective function that the joint action-value function optimizes is given by:
J ( s ) : = inf τ ∈ Λ T E ω [ ∑ t = 0 τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ ) } + γ V Y ϕ ( s τ ) ) | s 0 = s ] J(s):=\inf_{\tau\in\Lambda_T}\mathbb{E}_{\omega}\left[\sum_{t=0}^{\tau-1}\gamma^t r(s_t)+\gamma^\tau\left((1-\gamma)\min\{r(s_\tau),g(s_\tau)\}+\gamma V^\phi_Y(s_\tau)\right)\middle|s_0=s\right] J ( s ) := τ ∈ Λ T inf E ω [ t = 0 ∑ τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ )} + γ V Y ϕ ( s τ ) ) s 0 = s ]
Proof. We begin by observing that the first switching time τ \tau τ from target optimizing region to safety maximizing region is a valid stopping time (Refer to Lemma 3). We prove the theorem by induction on the time horizon T T T .
Base Case (T = 1 T=1 T = 1 ): Consider a time horizon T = 1 T=1 T = 1 . The set of valid stopping times is given by Λ 1 = { 0 , 1 } \Lambda_1=\{0,1\} Λ 1 = { 0 , 1 } . When τ = 0 \tau=0 τ = 0 , the initial state s 0 ∈ Ω ϕ s_0\in\Omega^\phi s 0 ∈ Ω ϕ and the trajectory is terminated immediately, yielding the return R 0 = ( 1 − γ ) min { r ( s 0 ) , g ( s 0 ) } + γ V Y ϕ ( s 0 ) \mathcal{R}_0=(1-\gamma)\min\{r(s_0),g(s_0)\}+\gamma V^\phi_Y(s_0) R 0 = ( 1 − γ ) min { r ( s 0 ) , g ( s 0 )} + γ V Y ϕ ( s 0 ) . When τ = 1 \tau=1 τ = 1 , the agent takes one step and is stopped and thus, the next state s 1 ∈ Ω ϕ s_1\in\Omega^\phi s 1 ∈ Ω ϕ , with s 0 ∈ Ω ψ s_0\in\Omega^\psi s 0 ∈ Ω ψ . This yields the expected return E [ R 1 ] = r ( s 0 ) + γ E ω ( s 1 ) [ ( 1 − γ ) min { r ( s 1 ) , g ( s 1 ) } + γ V Y ϕ ( s 1 ) ∣ s 0 = s ] \mathbb{E}[\mathcal{R}_1]=r(s_0)+\gamma\mathbb{E}_{\omega(s_1)}[(1-\gamma)\min\{r(s_1),g(s_1)\}+\gamma V^\phi_Y(s_1)\mid s_0=s] E [ R 1 ] = r ( s 0 ) + γ E ω ( s 1 ) [( 1 − γ ) min { r ( s 1 ) , g ( s 1 )} + γ V Y ϕ ( s 1 ) ∣ s 0 = s ] . As the value function is the infimum over Λ 1 \Lambda_1 Λ 1 , it evaluates to the minimum of these two choices:
V Q 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 ) } + γ V Y ϕ ( s 0 ) , r ( s 0 ) + γ E ω ( s 1 ) [ ( 1 − γ ) min { r ( s 1 ) , g ( s 1 ) } + γ V Y ϕ ( s 1 ) ∣ s 0 = s ] } V_{Q_1}(s)=\min\left\{(1-\gamma)\min\{r(s_0),g(s_0)\}+\gamma V^\phi_Y(s_0),
r(s_0)+\gamma\mathbb{E}_{\omega(s_1)}[(1-\gamma)\min\{r(s_1),g(s_1)\}+\gamma V^\phi_Y(s_1)\mid s_0=s]\right\} V Q 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 )} + γ V Y ϕ ( s 0 ) , r ( s 0 ) + γ E ω ( s 1 ) [( 1 − γ ) min { r ( s 1 ) , g ( s 1 )} + γ V Y ϕ ( s 1 ) ∣ s 0 = s ] }
Since the minimum is equivalent to the infimum over the set of valid stopping times τ ∈ Λ 1 \tau\in\Lambda_1 τ ∈ Λ 1 , we have V Q 1 ( s ) = inf τ ∈ Λ 1 E ω [ R τ ∣ s 0 = s ] V_{Q_1}(s)=\inf_{\tau\in\Lambda_1}\mathbb{E}_{\omega}[\mathcal{R}_\tau\mid s_0=s] V Q 1 ( s ) = inf τ ∈ Λ 1 E ω [ R τ ∣ s 0 = s ] .
Induction Hypothesis (T = k T=k T = k ): Assume for a time horizon T = k T=k T = k , the value function is given by:
V Q k ( s ) = inf τ ∈ Λ k E ω [ R τ ∣ s 0 = s ] V_{Q_k}(s)=\inf_{\tau\in\Lambda_k}\mathbb{E}_{\omega}[\mathcal{R}_\tau\mid s_0=s] V Q k ( s ) = τ ∈ Λ k inf E ω [ R τ ∣ s 0 = s ]
Inductive Step (T = k + 1 T=k+1 T = k + 1 ): Consider the time horizon T = k + 1 T=k+1 T = k + 1 . According to the Bellman equation, the value at the current state is the minimum of stopping immediately
( τ = 0 ) (\tau= 0) ( τ = 0 ) or continuing for one step and behaving optimally thereafter (which is horizon k k k starting at t = 1 t = 1 t = 1 ):
V Q k + 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 ) } + γ V Y ϕ ( s 0 ) , r ( s 0 ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] } V_{Q_{k+1}}(s) = \min\left\{ (1-\gamma)\min\{r(s_0),g(s_0)\}+\gamma V_Y^\phi(s_0),\; r(s_0)+\gamma\mathbb{E}_{\omega(s_1)}[V_{Q_k}(s_1)\mid s_0=s]\right\} V Q k + 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 )} + γ V Y ϕ ( s 0 ) , r ( s 0 ) + γ E ω ( s 1 ) [ V Q k ( s 1 ) ∣ s 0 = s ] }
Applying Lemma 4 to the above yields:
V Q k + 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 ) } + γ V Y ϕ ( s 0 ) , inf τ ∈ Λ k + 1 , τ ≥ 1 E ω [ R τ ∣ s 0 = s ] } V_{Q_{k+1}}(s) = \min\left\{(1-\gamma)\min\{r(s_0),g(s_0)\}+\gamma V_Y^\phi(s_0),\; \inf_{\tau\in\Lambda_{k+1},\,\tau\geq1}\mathbb{E}_{\omega}[R_\tau\mid s_0=s]\right\} V Q k + 1 ( s ) = min { ( 1 − γ ) min { r ( s 0 ) , g ( s 0 )} + γ V Y ϕ ( s 0 ) , τ ∈ Λ k + 1 , τ ≥ 1 inf E ω [ R τ ∣ s 0 = s ] }
Finally, observing that the first term is exactly the return R 0 R_0 R 0 corresponding to the case where τ = 0 \tau=0 τ = 0 , the outer minimum operator simplifies into the infimum over the strict subset τ ≥ 1 \tau\geq1 τ ≥ 1 , yielding an infimum over the entire domain 0 ≤ τ ≤ k + 1 0\leq\tau\leq k+1 0 ≤ τ ≤ k + 1 :
V Q k + 1 ( s ) = inf τ ∈ Λ k + 1 E ω [ R τ ∣ s 0 = s ] = inf τ ∈ Λ T E ω [ ∑ t = 0 τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ ) } + γ V Y ϕ ( s τ ) ) | s 0 = s ] . \begin{aligned}
V_{Q_{k+1}}(s) &= \inf_{\tau\in\Lambda_{k+1}}\mathbb{E}_{\omega}[R_\tau\mid s_0=s] \\
&= \inf_{\tau\in\Lambda_T}\mathbb{E}_{\omega}\left[\sum_{t=0}^{\tau-1}\gamma^t r(s_t)+\gamma^\tau\left((1-\gamma)\min\{r(s_\tau),g(s_\tau)\}+\gamma V_Y^\phi(s_\tau)\right)\,\middle|\,s_0=s\right].
\end{aligned} V Q k + 1 ( s ) = τ ∈ Λ k + 1 inf E ω [ R τ ∣ s 0 = s ] = τ ∈ Λ T inf E ω [ t = 0 ∑ τ − 1 γ t r ( s t ) + γ τ ( ( 1 − γ ) min { r ( s τ ) , g ( s τ )} + γ V Y ϕ ( s τ ) ) s 0 = s ] .
Theorem 1 (Objective Function). Given a Borel-measurable safety maximizing region, Ω ϕ ∈ B ( S ) \Omega^\phi\in\mathcal{B}(\mathcal{S}) Ω ϕ ∈ B ( S ) , define the first switching time τ : W → { 0 , ⋯ , T } \tau:\mathcal{W}\to\{0,\cdots,T\} τ : W → { 0 , ⋯ , T } as τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } \tau=\inf\{k\in\{0,\cdots,T\}:s_k\in\Omega^\phi\} τ = inf { k ∈ { 0 , ⋯ , T } : s k ∈ Ω ϕ } , where T T T is the time horizon and inf ∅ = T \inf\varnothing=T inf ∅ = T (T → ∞ T\to\infty T → ∞ for infinite horizon setting). Let Λ k \Lambda_k Λ k be the set of stopping times τ \tau τ bounded by time horizon k k k , i.e., 0 ≤ τ ≤ k 0\leq\tau\leq k 0 ≤ τ ≤ k . Let ω \omega ω be trajectories sampled using the joint policy as a t , d t ∼ π ( s t ) a_t,d_t\sim\pi(s_t) a t , d t ∼ π ( s t ) , with the dynamics s t + 1 ∼ p ( ⋅ ∣ s t , a t , d t ) s_{t+1}\sim p(\cdot\mid s_t,a_t,d_t) s t + 1 ∼ p ( ⋅ ∣ s t , a t , d t ) . Then, the corresponding joint objective function that the joint policy maximizes is given by: (Proof in Appendix B.3)
J ( π ) : = inf τ ∈ Λ T E ω ∼ π [ ∑ t = 0 τ − 1 γ t r ( s t , a t , d t ) + γ τ ( ( 1 − γ ) min { r ( s τ , a τ , d τ ) , g ( s τ ) } + γ V Y ϕ ( s τ ) ⏟ : = J τ ) | s 0 = s ] (32) J(\pi):=\inf_{\tau\in\Lambda_T}\mathbb{E}_{\omega\sim\pi}\left[\sum_{t=0}^{\tau-1}\gamma^t r(s_t,a_t,d_t)+\gamma^\tau\left(\underbrace{(1-\gamma)\min\{r(s_\tau,a_\tau,d_\tau),g(s_\tau)\}+\gamma V_Y^\phi(s_\tau)}_{:=J_\tau}\right)\,\middle|\,s_0=s\right] \tag*{(32)} J ( π ) := τ ∈ Λ T inf E ω ∼ π t = 0 ∑ τ − 1 γ t r ( s t , a t , d t ) + γ τ := J τ ( 1 − γ ) min { r ( s τ , a τ , d τ ) , g ( s τ )} + γ V Y ϕ ( s τ ) s 0 = s (32)
Proof. This follows directly from Theorem 7. Without loss of generality, the Theorem used state-based rewards r ( s t ) r(s_t) r ( s t ) in the main proof for notational simplicity. The extension to state-action-based rewards r ( s t , a t , d t ) r(s_t,a_t,d_t) r ( s t , a t , d t ) holds because the expectation is taken over the distribution of trajectories.
Fast Timescale: Safety Critic Tracking (Sec. 4.1)
Assumption 1 (Conditional unbiasedness and Martingale-difference noise (Tsitsiklis & Van Roy, 1997)). Let { H n } n ≥ 0 \{\mathcal{H}_n\}_{n\geq0} { H n } n ≥ 0 denote the filtration generated by the learning history up to iteration n n n . Then,
E [ T ^ n + 1 , π Q n ϕ [ Y n ] ∣ H n ] = T Q n ϕ [ Y n ] , E [ T ^ n + 1 , Y n [ Q n ] ∣ H n ] = T Y n [ Q n ] (33) \mathbb{E}\left[\widehat{T}^{\phi}_{n+1,\pi_{Q_n}}[Y_n]\mid\mathcal{H}_n\right]=T^\phi_{Q_n}[Y_n],\qquad\mathbb{E}\left[\widehat{T}_{n+1,Y_n}[Q_n]\mid\mathcal{H}_n\right]=T_{Y_n}[Q_n] \tag*{(33)} E [ T n + 1 , π Q n ϕ [ Y n ] ∣ H n ] = T Q n ϕ [ Y n ] , E [ T n + 1 , Y n [ Q n ] ∣ H n ] = T Y n [ Q n ] (33)
Assumption 2 (Step-size conditions (Robbins & Monro, 1951)). The step-sizes, α n , β n ∈ ( 0 , 1 ] \alpha_n,\beta_n\in(0,1] α n , β n ∈ ( 0 , 1 ] , satisfy Robbins–Monro conditions: ∑ n = 0 ∞ α n = ∑ n = 0 ∞ β n = ∞ \sum_{n=0}^{\infty}\alpha_n=\sum_{n=0}^{\infty}\beta_n=\infty ∑ n = 0 ∞ α n = ∑ n = 0 ∞ β n = ∞ , ∑ n = 0 ∞ ( α n 2 + β n 2 ) < ∞ \sum_{n=0}^{\infty}(\alpha_n^2+\beta_n^2)<\infty ∑ n = 0 ∞ ( α n 2 + β n 2 ) < ∞ , lim n → ∞ α n → 0 \lim_{n\to\infty}\alpha_n\to0 lim n → ∞ α n → 0 , lim n → ∞ β n → 0 \lim_{n\to\infty}\beta_n\to0 lim n → ∞ β n → 0 , and additionally, lim n → ∞ α n / β n = 0 \lim_{n\to\infty}\alpha_n/\beta_n=0 lim n → ∞ α n / β n = 0 .
The updates with step-size sequences { α n } \{\alpha_n\} { α n } , { β n } \{\beta_n\} { β n } are given by:
Y n + 1 = Y n + β n [ T ^ n + 1 , π Q n ϕ [ Y n ] − Y n + ξ n + 1 ϕ ] (34) Y_{n+1}=Y_n+\beta_n\left[\widehat{T}^{\phi}_{n+1,\pi_{Q_n}}[Y_n]-Y_n+\xi^{\phi}_{n+1}\right] \tag*{(34)} Y n + 1 = Y n + β n [ T n + 1 , π Q n ϕ [ Y n ] − Y n + ξ n + 1 ϕ ] (34)
Q n + 1 = Q n + α n [ T ^ n + 1 , Y n [ Q n ] − Q n + ξ n + 1 ] (35) Q_{n+1}=Q_n+\alpha_n\left[\widehat{T}_{n+1,Y_n}[Q_n]-Q_n+\xi_{n+1}\right] \tag*{(35)} Q n + 1 = Q n + α n [ T n + 1 , Y n [ Q n ] − Q n + ξ n + 1 ] (35)
where ξ n + 1 ϕ \xi^{\phi}_{n+1} ξ n + 1 ϕ and ξ n + 1 \xi_{n+1} ξ n + 1 are martingale difference perturbations (Borkar, [13 ] ), with E [ ξ n + 1 ϕ ∣ H n ] = E [ ξ n + 1 ∣ H n ] = 0 \mathbb{E}[\xi^{\phi}_{n+1}\mid\mathcal{H}_n]=\mathbb{E}[\xi_{n+1}\mid\mathcal{H}_n]=0 E [ ξ n + 1 ϕ ∣ H n ] = E [ ξ n + 1 ∣ H n ] = 0 . As the map Q ↦ Y π Q Q\mapsto Y_{\pi_Q} Q ↦ Y π Q need not be continuous or Lipschitz, the standard two-timescale stochastic approximation need not apply. Thus, we analyze the fast timescale recursion as a stochastic recursive inclusion in Section 4.1 using the set-valued two-timescale framework (Yaji & Bhatnagar, 2020; Borkar, [14 ] ).
Lemma 1 (Set-valued fast timescale tracking). Under Assumptions 1-2, suppose the iterates are almost surely bounded. Then,
for every quasi-static q q q , Eq. (11) admits a nonempty compact global attracting set Λ ( q ) \Lambda(q) Λ ( q ) ;
q ↦ Λ ( q ) q\mapsto\Lambda(q) q ↦ Λ ( q ) is upper semicontinuous; and
the coupled iterates satisfy dist ( ( Y n , Q n ) , Gr Λ ) → 0 \operatorname{dist}((Y_n,Q_n),\operatorname{Gr}\Lambda)\to0 dist (( Y n , Q n ) , Gr Λ ) → 0 almost surely, where Gr Λ : = { ( y , q ) : y ∈ Λ ( q ) } \operatorname{Gr}\Lambda:=\{(y,q):y\in\Lambda(q)\} Gr Λ := {( y , q ) : y ∈ Λ ( q )} is the graph of Λ \Lambda Λ . (Proof in Appendix B.4 )
Proof. We first establish some properties of the fast timescale differential inclusion.
Let y ∈ Y ⊆ R ∣ S ∣ ∣ A ∣ ∣ D ∣ y\in\mathcal{Y}\subseteq\mathbb{R}^{|S||A||D|} y ∈ Y ⊆ R ∣ S ∣∣ A ∣∣ D ∣ denote the fast timescale safety critic with the limiting dynamics h π ( y ) : = T π ϕ [ y ] − y h_\pi(y):=T^\phi_\pi[y]-y h π ( y ) := T π ϕ [ y ] − y . Here, π \pi π is quasi-static, as induced by the quasi-static joint critic q ∈ Q q\in\mathcal{Q} q ∈ Q . Thus, note that for any y ∈ Y y\in\mathcal{Y} y ∈ Y , the operator T π ϕ [ y ] T^\phi_\pi[y] T π ϕ [ y ] induces a γ \gamma γ -contraction, as discussed in Section 3.2, and thus possesses a unique fixed point.
Next, note that, since S , A , D \mathcal{S},\mathcal{A},\mathcal{D} S , A , D are finite, Π ( q ) \Pi(q) Π ( q ) is finite and nonempty for every q q q . For a given q q q , any action that is not maximin-greedy at q q q has a strictly positive gap from the maximum, and any disturbance that is not minimizing on some greedy action has a strictly positive gap from the minimum. Consequently, there exists ϑ ( q ) > 0 \vartheta(q)>0 ϑ ( q ) > 0 such that ∥ q ′ − q ∥ ∞ < ϑ ( q ) \lVert q'-q\rVert_\infty<\vartheta(q) ∥ q ′ − q ∥ ∞ < ϑ ( q ) , which implies that Π ( q ′ ) ⊆ Π ( q ) \Pi(q')\subseteq\Pi(q) Π ( q ′ ) ⊆ Π ( q ) . Hence, Π ( ⋅ ) \Pi(\cdot) Π ( ⋅ ) is upper semicontinuous. Moreover, by continuity of h π ( ⋅ ) h_\pi(\cdot) h π ( ⋅ ) , the map Ψ ( ⋅ , ⋅ ) \Psi(\cdot,\cdot) Ψ ( ⋅ , ⋅ ) (as defined in Eq. (11) ) is Marchaud, since it has nonempty compact convex values, and is upper semicontinuous with at most linear growth.
Let g ‾ K : = K max s ∈ S ∣ g ( s ) ∣ \overline{g}_K:=K\max_{s\in\mathcal{S}}|g(s)| g K := K max s ∈ S ∣ g ( s ) ∣ with B : = [ − g ‾ K , g ‾ K ] ∣ S ∣ ∣ A ∣ ∣ D ∣ B:=[-\overline{g}_K,\overline{g}_K]^{|S||A||D|} B := [ − g K , g K ] ∣ S ∣∣ A ∣∣ D ∣ . Note that if y ∈ B y\in B y ∈ B , then − g ‾ K ≤ E [ y ( s , π ( s ) ) ] ≤ g ‾ K -\overline{g}_K\leq\mathbb{E}[y(s,\pi(s))]\leq\overline{g}_K − g K ≤ E [ y ( s , π ( s ))] ≤ g K . Hence, T π ϕ [ B ] ⊆ B T^\phi_\pi[B]\subseteq B T π ϕ [ B ] ⊆ B , ∀ π \forall\pi ∀ π . By convexity, B B B is forward invariant for the differential inclusion y ˙ ∈ Ψ ( q , y ) \dot{y}\in\Psi(q,y) y ˙ ∈ Ψ ( q , y ) . Moreover, any solution to the differential inclusion can be represented almost everywhere as:
y ˙ ( t ) = ∑ π ∈ Π ( q ) λ π ( t ) ( T π ϕ [ y ( t ) ] − y ( t ) ) , λ π ( t ) ≥ 0 , ∑ π λ π ( t ) = 1 (36) \dot{y}(t)=\sum_{\pi\in\Pi(q)}\lambda_\pi(t)\left(T^\phi_\pi[y(t)]-y(t)\right),\qquad\lambda_\pi(t)\geq0,\quad\sum_{\pi}\lambda_\pi(t)=1 \tag*{(36)} y ˙ ( t ) = π ∈ Π ( q ) ∑ λ π ( t ) ( T π ϕ [ y ( t )] − y ( t ) ) , λ π ( t ) ≥ 0 , π ∑ λ π ( t ) = 1 (36)
Next, let y ( ⋅ ) , z ( ⋅ ) y(\cdot),z(\cdot) y ( ⋅ ) , z ( ⋅ ) be two trajectories with the same weight λ π ( ⋅ ) \lambda_\pi(\cdot) λ π ( ⋅ ) , and let e ( t ) : = y ( t ) − z ( t ) e(t):=y(t)-z(t) e ( t ) := y ( t ) − z ( t ) . Let I ( t ) : = { i : ∣ e i ( t ) ∣ = ∥ e ( t ) ∥ ∞ } I(t):=\{i:\lvert e_i(t)\rvert=\lVert e(t)\rVert_\infty\} I ( t ) := { i : ∣ e i ( t )∣ = ∥ e ( t ) ∥ ∞ } be the coordinate set on which e ( t ) e(t) e ( t ) achieves the supremum norm. For the supremum norm, the upper Dini derivative satisfies:
D + ∥ e ( t ) ∥ ∞ ≤ max i ∈ I ( t ) sgn ( e i ( t ) ) e ˙ i ( t ) (37) D^+\lVert e(t)\rVert_\infty\leq\max_{i\in I(t)}\operatorname{sgn}(e_i(t))\dot{e}_i(t) \tag*{(37)} D + ∥ e ( t ) ∥ ∞ ≤ i ∈ I ( t ) max sgn ( e i ( t )) e ˙ i ( t ) (37)
⟹ D + ∥ y ( t ) − z ( t ) ∥ ∞ ≤ − ( 1 − γ ) ∥ y ( t ) − z ( t ) ∥ ∞ (by γ -contraction of T π ϕ ) (38) \Longrightarrow\quad D^+\lVert y(t)-z(t)\rVert_\infty\leq-(1-\gamma)\lVert y(t)-z(t)\rVert_\infty\quad\text{(by }\gamma\text{-contraction of }T^{\phi}_{\pi}\text{)} \tag*{(38)} ⟹ D + ∥ y ( t ) − z ( t ) ∥ ∞ ≤ − ( 1 − γ ) ∥ y ( t ) − z ( t ) ∥ ∞ (by γ -contraction of T π ϕ ) (38)
∴ ∥ y ( t ) − z ( t ) ∥ ∞ ≤ e − ( 1 − γ ) ( t − s ) ∥ y ( s ) − z ( s ) ∥ ∞ (by Gr o ¨ nwall) (39) \therefore\ \lVert y(t)-z(t)\rVert_\infty\leq e^{-(1-\gamma)(t-s)}\lVert y(s)-z(s)\rVert_\infty\quad\text{(by Grönwall)} \tag*{(39)} ∴ ∥ y ( t ) − z ( t ) ∥ ∞ ≤ e − ( 1 − γ ) ( t − s ) ∥ y ( s ) − z ( s ) ∥ ∞ (by Gr o ¨ nwall) (39)
Thus, choosing z ( ⋅ ) ∈ B z(\cdot)\in B z ( ⋅ ) ∈ B and the fact that T π ϕ [ B ] ⊆ B T^\phi_\pi[B]\subseteq B T π ϕ [ B ] ⊆ B shows that every fast timescale trajectory y ( ⋅ ) y(\cdot) y ( ⋅ ) (driven by the same weights λ π \lambda_\pi λ π ) for a quasi-static q q q is attracted to the bounded set B B B .
Since Ψ ( q , ⋅ ) \Psi(q,\cdot) Ψ ( q , ⋅ ) is a Marchaud map, the differential inclusion for a quasi-static q q q admits solutions from every initial condition. As the compact set B B B is forward invariant, and globally attracting, the limiting dynamics y ( ⋅ ) y(\cdot) y ( ⋅ ) admit a nonempty compact global attracting set Λ ( q ) ⊆ B \Lambda(q)\subseteq B Λ ( q ) ⊆ B (Benaïm et al., [12 ] ).
Let q m → q q_m \to q q m → q and let y m ∈ Λ ( q m ) y_m \in\Lambda(q_m) y m ∈ Λ ( q m ) with y m → y y_m \to y y m → y . Note that for sufficiently large m m m , Π ( q m ) ⊂ Π ( q ) \Pi(q_m) \subset\Pi(q) Π ( q m ) ⊂ Π ( q ) , and thus, Ψ ( q m , ⋅ ) ⊆ Ψ ( q , ⋅ ) \Psi(q_m,\cdot) \subseteq\Psi(q,\cdot) Ψ ( q m , ⋅ ) ⊆ Ψ ( q , ⋅ ) . Next, for any given y y y , { h π ( y ) : π ∈ Π ( q m ) } ⊆ { h π ( y ) : π ∈ Π ( q ) } \{h_\pi(y): \pi\in\Pi(q_m)\} \subseteq\{h_\pi(y): \pi\in\Pi(q)\} { h π ( y ) : π ∈ Π ( q m )} ⊆ { h π ( y ) : π ∈ Π ( q )} . Since the convex hull preserves set inclusions, Ψ ( q m , y ) ⊆ Ψ ( q , y ) \Psi(q_m,y) \subseteq\Psi(q,y) Ψ ( q m , y ) ⊆ Ψ ( q , y ) for every y y y , and thus, every complete solution of q m q_m q m -differential inclusion is also a complete solution of the q q q -differential inclusion. Consequently, Λ ( q m ) ⊆ Λ ( q ) \Lambda(q_m) \subseteq\Lambda(q) Λ ( q m ) ⊆ Λ ( q ) for sufficiently large m m m . Moreover, since Λ ( q ) \Lambda(q) Λ ( q ) is closed, y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) , and thus Gr Λ \operatorname{Gr}\Lambda Gr Λ is closed. This implies that the map q ↦ Λ ( q ) q \mapsto\Lambda(q) q ↦ Λ ( q ) is upper semicontinuous.
Finally, under Assumptions 1-2 and by the two-timescale stochastic recursive inclusion framework (Yaji & Bhatnagar, 2020; Ramaswamy & Bhatnagar, 2016), the limit set of the coupled iterates satisfies ω ( Y , Q ) ⊆ Gr Λ \omega(Y,Q) \subseteq\operatorname{Gr}\Lambda ω ( Y , Q ) ⊆ Gr Λ a.s. Since the iterates are bounded and Gr Λ \operatorname{Gr}\Lambda Gr Λ is closed,
dist ( ( Y n , Q n ) , Gr Λ ) → 0 a.s. , (40) \operatorname{dist}((Y_n,Q_n),\operatorname{Gr}\Lambda) \to0 \quad\text{a.s.}, \tag*{(40)} dist (( Y n , Q n ) , Gr Λ ) → 0 a.s. , (40)
Remark 6. (The Quasi-Static Joint Critic ) Intuitively, Lemma 1 guarantees that the safety critic learns much faster than the joint critic. This implies that the joint critic is provided with an accurate estimate of its corresponding policy’s safety evaluation before it updates its estimate and changes the policy.
Slow Timescale: Averaged Differential Inclusion (Sec. 4.2)
Section 4.1 shows that the coupled iterates asymptotically approach the graph of the compact, globally attracting set Λ ( q ) \Lambda(q) Λ ( q ) for some quasi-static q q q . By Assumption 2, the slow-timescale iterate Q n Q_n Q n remains quasi-static while the fast timescale dynamics evolve. Thus, the increments of Q n Q_n Q n depend on the long-run average of G ( Y n , Q n ) G(Y_n,Q_n) G ( Y n , Q n ) . These averages are encoded by the occupation measures in D ( q ) \mathcal{D}(q) D ( q ) , leading to the set-valued G ‾ ( q ) \overline{G}(q) G ( q ) in Eq. (12) .
Theorem 2 (Slow-timescale differential-inclusion limit). Let Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) denote the continuous affine interpolation of { Q n } \{Q_n\} { Q n } on the slow-timescale. Under Assumptions 1-2, Lemma 1, and almost surely bounded iterates { ( Y n , Q n ) } \{(Y_n,Q_n)\} {( Y n , Q n )} , Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) is almost surely an asymptotic pseudotrajectory of the averaged differential inclusion q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t) \in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) . Consequently, its ω \omega ω -limit set U : = ω ( Q ‾ ) U := \omega(\overline{Q}) U := ω ( Q ) is a nonempty compact invariant internally chain-transitive set of the limiting differential-inclusion dynamics. (Proof in Appendix B.5)
Proof. Let M n + 1 : = T ^ n + 1 , Y n [ Q n ] − T Y n [ Q n ] + ξ n + 1 M_{n+1} := \widehat{\mathcal{T}}_{n+1,Y_n}[Q_n] - \mathcal{T}_{Y_n}[Q_n] + \xi_{n+1} M n + 1 := T n + 1 , Y n [ Q n ] − T Y n [ Q n ] + ξ n + 1 be the total martingale-difference error (error due to the stochastic Bellman target and additional perturbation noise). Then, Eq. (35) can be written as:
Q n + 1 : = Q n + α n [ G ( Y n , Q n ) + M n + 1 ] , where G ( y , q ) : = T y [ q ] − q (41) Q_{n+1} := Q_n + \alpha_n [G(Y_n,Q_n) + M_{n+1}], \qquad\text{where } G(y,q) := \mathcal{T}_y[q] - q \tag*{(41)} Q n + 1 := Q n + α n [ G ( Y n , Q n ) + M n + 1 ] , where G ( y , q ) := T y [ q ] − q (41)
In the finite tabular setting, G G G is continuous in both arguments; V q ( s ) = max a min d q ( s , a , d ) V_q(s) = \max_a \min_d q(s,a,d) V q ( s ) = max a min d q ( s , a , d ) is a 1-Lipschitz map in q q q , and x ↦ min x x x \mapsto\min_x x x ↦ min x x is 1-Lipschitz map. Consequently,
∥ G ( y , q ) − G ( y ′ , q ′ ) ∥ ∞ ≤ γ ∥ y − y ′ ∥ ∞ + ( 1 + γ ) ∥ q − q ′ ∥ ∞ (42) \lVert G(y,q) - G(y',q') \rVert_\infty\le\gamma\lVert y-y' \rVert_\infty+ (1+\gamma)\lVert q-q' \rVert_\infty \tag*{(42)} ∥ G ( y , q ) − G ( y ′ , q ′ ) ∥ ∞ ≤ γ ∥ y − y ′ ∥ ∞ + ( 1 + γ ) ∥ q − q ′ ∥ ∞ (42)
Thus, G ( ⋅ , ⋅ ) G(\cdot,\cdot) G ( ⋅ , ⋅ ) is continuous and has at most linear growth.
Next, let D ( q ) \mathcal{D}(q) D ( q ) denote the admissible limiting occupation measure set, appearing in the two-timescale stochastic recursive inclusion theorem of (Yaji & Bhatnagar, 2020); these measures account for the long-run fast timescale behavior at a given q q q ; the slow-timescale differential inclusion is then formed through probability-measure averaging (Yaji & Bhatnagar, 2020):
G ‾ ( q ) = { ∫ Λ ( q ) G ( y , q ) P ( d y ) : P ∈ D ( q ) } (43) \overline{G}(q) = \left\{ \int_{\Lambda(q)} G(y,q)\mathbb{P}(\mathrm{d}y) : \mathbb{P} \in\mathcal{D}(q) \right\} \tag*{(43)} G ( q ) = { ∫ Λ ( q ) G ( y , q ) P ( d y ) : P ∈ D ( q ) } (43)
Next, by Assumptions 1-2, the accumulated noise on the slow-timescale vanishes on every finite time-window:
lim n → ∞ sup m ≥ n : ∑ k = n m α k ≤ T ∥ ∑ k = n m α k M k + 1 ∥ ∞ = 0 a.s. (44) \lim_{n\to\infty}\sup_{m\ge n:\,\sum_{k=n}^{m}\alpha_k\le T}\left\|\sum_{k=n}^{m}\alpha_k M_{k+1}\right\|_{\infty}=0\quad\text{a.s.} \tag*{(44)} n → ∞ lim m ≥ n : ∑ k = n m α k ≤ T sup k = n ∑ m α k M k + 1 ∞ = 0 a.s. (44)
for every T > 0 T>0 T > 0 . Hence, by the slow-timescale APT result of (Yaji & Bhatnagar, 2020), the continuous affine interpolation Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) is almost surely an asymptotic pseudotrajectory of q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t)\in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) . Finally, by assumption, the iterates are almost surely bounded, and thus, by the limit-set theorem for bounded asymptotic pseudotrajectories [12 ] , U : = ω ( Q ‾ ) \mathcal{U}:=\omega(\overline{Q}) U := ω ( Q ) is nonempty, compact, invariant and internally chain transitive for the differential inclusion q ˙ ∈ G ‾ ( q ) \dot{q}\in\overline{G}(q) q ˙ ∈ G ( q ) .
Safe Configuration Set and Forward Invariance (Sec. 5)
The state, action and disturbance spaces are finite, so the action-value space Q = B ( S × A × D ) \mathcal{Q}=\mathcal{B}(\mathcal{S}\times\mathcal{A}\times\mathcal{D}) Q = B ( S × A × D ) is identified with R N \mathbb{R}^{N} R N , N = ∣ S × A × D ∣ N=|\mathcal{S}\times\mathcal{A}\times\mathcal{D}| N = ∣ S × A × D ∣ , and the limiting dynamics are an inclusion in finite dimension. The extended class-K e \mathcal{K}_{e} K e function is written explicitly as K g ( s ) K g(s) K g ( s ) , since the margin scale affects the bounds. We write ∥ ⋅ ∥ ∞ \|\cdot\|_{\infty} ∥ ⋅ ∥ ∞ for the supremum-norm. Recalling also that the reward function is r : S × A × D → [ 0 , R max ] r:\mathcal{S}\times\mathcal{A}\times\mathcal{D}\to[0,R_{\max}] r : S × A × D → [ 0 , R m a x ] and Ω ⊆ F c = { s : g ( s ) > 0 } \Omega\subseteq\mathcal{F}^{c}=\{s:g(s)>0\} Ω ⊆ F c = { s : g ( s ) > 0 } .
For a fixed critic y ∈ Q y\in\mathcal{Q} y ∈ Q , let T y [ q ] T_y[q] T y [ q ] denote the joint Bellman operator of Eq. 6, and for policy π \pi π let T π ϕ [ y ] T_{\pi}^{\phi}[y] T π ϕ [ y ] denote the safety Bellman operator of Eq. 5.
Definition 2 (Kernel-preserving actions). An action is kernel-preserving at state s s s , if it keeps the next state inside the viability kernel against every disturbance A Ω ( s ) : = { a ∈ A : P ( s ′ ∈ Ω ∣ s , a , d ) = 1 ∀ d ∈ D } A^{\Omega}(s):=\{a\in\mathcal{A}:P(s'\in\Omega\mid s,a,d)=1\ \forall d\in\mathcal{D}\} A Ω ( s ) := { a ∈ A : P ( s ′ ∈ Ω ∣ s , a , d ) = 1 ∀ d ∈ D } , where κ , ϵ 0 > 0 \kappa,\epsilon_{0}>0 κ , ϵ 0 > 0 without loss of generality.
Since Ω \Omega Ω is the set of states from which a control policy exists keeping the agent safe at all times regardless of the adversarial disturbances, taking a = μ ( s ) a=\mu(s) a = μ ( s ) for such a policy shows A Ω ( s ) ≠ ∅ ∀ s ∈ Ω A^{\Omega}(s)\ne\varnothing\ \forall s\in\Omega A Ω ( s ) = ∅ ∀ s ∈ Ω . This is a property of the viability kernel. Since the transition kernel is stochastic, the kernel preservation is almost sure , and the safety conclusions are almost surely with respect to the transition randomness.
Definition 3 (Index Sets and Relaxed Constraint Sets). For each state s ∈ Ω s\in\Omega s ∈ Ω and each action a ∉ A Ω ( s ) a\notin A^{\Omega}(s) a ∈ / A Ω ( s ) , fix a disturbance d ^ ( s , a ) ∈ D \hat{d}(s,a)\in\mathcal{D} d ^ ( s , a ) ∈ D with P ( s ′ ∉ Ω ∣ s , a , d ^ ( s , a ) ) > 0 P(s'\notin\Omega\mid s,a,\hat{d}(s,a))>0 P ( s ′ ∈ / Ω ∣ s , a , d ^ ( s , a )) > 0 . Then the index sets are defined as follows: I : = { ( s , a , d ) : s ∈ Ω , a ∈ A Ω ( s ) , d ∈ D } \mathcal{I}:=\{(s,a,d):s\in\Omega,a\in A^{\Omega}(s),d\in\mathcal{D}\} I := {( s , a , d ) : s ∈ Ω , a ∈ A Ω ( s ) , d ∈ D } and J : = { ( s , a , d ^ ( s , a ) ) : s ∈ Ω , a ∉ A Ω ( s ) } \mathcal{J}:=\{(s,a,\hat{d}(s,a)):s\in\Omega,a\notin A^{\Omega}(s)\} J := {( s , a , d ^ ( s , a )) : s ∈ Ω , a ∈ / A Ω ( s )} . Let C ϵ : = { q ∈ Q : q ( x ) ≥ − ϵ ∀ x ∈ I , q ( x ) ≤ − κ + ϵ ∀ x ∈ J } \mathcal{C}_{\epsilon}:=\{q\in\mathcal{Q}:q(x)\ge-\epsilon\ \forall x\in\mathcal{I},q(x)\le-\kappa+\epsilon\ \forall x\in\mathcal{J}\} C ϵ := { q ∈ Q : q ( x ) ≥ − ϵ ∀ x ∈ I , q ( x ) ≤ − κ + ϵ ∀ x ∈ J } denote the relaxed constraint set, for ϵ ≥ 0 \epsilon\ge0 ϵ ≥ 0 i.e., C ϵ \mathcal{C}_{\epsilon} C ϵ relaxes each defining inequality of C 0 \mathcal{C}_{0} C 0 by ϵ \epsilon ϵ .
The index sets are determined by the transition kernel and by Ω \Omega Ω ; they depend on neither q q q nor any policy. Throughout we take κ > 0 \kappa>0 κ > 0 and ϵ 0 ∈ ( 0 , κ / 2 ) \epsilon_{0}\in(0,\kappa/2) ϵ 0 ∈ ( 0 , κ /2 ) . The upper bound on ϵ 0 \epsilon_{0} ϵ 0 ensures the two families of constraints remain strictly separated on all of C ϵ 0 \mathcal{C}_{\epsilon_{0}} C ϵ 0 .
We fix a deterministic Borel-measurable selection in Eq. (4) : we choose a single action μ q ( s ) \mu_q(s) μ q ( s ) from the maximizers of min d q ( s , ⋅ , d ) \min_d q(s,\cdot,d) min d q ( s , ⋅ , d ) , and a single disturbance ν q ( s , μ q ( s ) ) \nu_q(s,\mu_q(s)) ν q ( s , μ q ( s )) from the minimizers of q ( s , μ q ( s ) , ⋅ ) q(s,\mu_q(s),\cdot) q ( s , μ q ( s ) , ⋅ ) . Existence of such selections is guaranteed by the Kuratowski-Ryll-Nardzewski theorem. Fixing the selection makes q ↦ π q q\mapsto\pi_q q ↦ π q single-valued but not continuous; this is why fast timescale is analyzed through Π ( q ) \Pi(q) Π ( q ) and Λ ( q ) \Lambda(q) Λ ( q ) rather than through a single equilibrium map, and why the slow limit is the inclusion Eq. (45) .
q ˙ ( t ) ∈ G ‾ ( q ( t ) ) (45) \dot{q}(t)\in\overline{G}(q(t)) \tag*{(45)} q ˙ ( t ) ∈ G ( q ( t )) (45)
One might expect a condition of the form min d q ( s , a , d ) ≤ − κ \min_d q(s,a,d)\le-\kappa min d q ( s , a , d ) ≤ − κ for kernel-exiting a a a ; but the disturbance attaining the inner minimum of q q q need not be the one under which the action leaves the kernel (the truncation bound in Lemma 10 is available only for the latter). Fixing d ^ \hat{d} d ^ removes the mismatch while still yielding min d q ( s , a , d ) ≤ q ( s , a , d ^ ( s , a ) ) ≤ − κ \min_d q(s,a,d)\le q(s,a,\hat{d}(s,a))\le-\kappa min d q ( s , a , d ) ≤ q ( s , a , d ^ ( s , a )) ≤ − κ .
Definition 4 (Safe Configuration Set). The safe configuration set is defined as the set of joint Q Q Q -functions whose induced policy is kernel-preserving:
Q c f g : = C 0 = { q ∈ Q : q ( x ) ≥ 0 ∀ x ∈ I , q ( x ) ≤ − κ ∀ x ∈ J } (46) \mathcal{Q}_{\mathrm{cfg}}:=\mathcal{C}_{0}=\{q\in\mathcal{Q}:q(x)\ge0\ \forall x\in\mathcal{I},q(x)\le-\kappa\ \forall x\in\mathcal{J}\} \tag*{(46)} Q cfg := C 0 = { q ∈ Q : q ( x ) ≥ 0 ∀ x ∈ I , q ( x ) ≤ − κ ∀ x ∈ J } (46)
The intuition is as follows: the lower bound states that the joint action value has not underestimated kernel-preserving actions, and the upper bound states that it has not overestimated actions that leave the kernel. We now define the distance to the safe configuration set as ρ ( q ) : = dist ( q , Q c f g ) \rho(q) := \operatorname{dist}(q, \mathcal{Q}_{\mathrm{cfg}}) ρ ( q ) := dist ( q , Q cfg ) , the supremum-norm distance.
Geometry of the Safe Configuration Set
Lemma 5 (Structure of C ϵ \mathcal{C}_{\epsilon} C ϵ ). (i) I ∩ J = ∅ \mathcal{I} \cap\mathcal{J} = \varnothing I ∩ J = ∅ and Q c f g ≠ ∅ \mathcal{Q}_{\mathrm{cfg}} \ne\varnothing Q cfg = ∅ (ii) Every C ϵ \mathcal{C}_{\epsilon} C ϵ is a closed convex polyhedron. (iii) For every q q q ,
ρ ( q ) = max { max x ∈ I ( − q ( x ) ) + , max x ∈ J ( q ( x ) + κ ) + } \rho(q) = \max\left\{ \max_{x \in\mathcal{I}}(-q(x))_{+},\ \max_{x \in\mathcal{J}}(q(x) + \kappa)_{+} \right\} ρ ( q ) = max { x ∈ I max ( − q ( x ) ) + , x ∈ J max ( q ( x ) + κ ) + } and consequently C ϵ = { q : ρ ( q ) ≤ ϵ } \mathcal{C}_{\epsilon} = \{q : \rho(q) \le\epsilon\} C ϵ = { q : ρ ( q ) ≤ ϵ } .
Proof. (i) A triple of I \mathcal{I} I has a ∈ A Ω ( s ) a \in A^{\Omega}(s) a ∈ A Ω ( s ) and a triple of J \mathcal{J} J has a ∉ A Ω ( s ) a \notin A^{\Omega}(s) a ∈ / A Ω ( s ) , so the index sets are disjoint. Next, set q ( x ) = 0 q(x) = 0 q ( x ) = 0 on x ∈ I x \in\mathcal{I} x ∈ I , q ( x ) = − κ q(x) = -\kappa q ( x ) = − κ on x ∈ J x \in\mathcal{J} x ∈ J and arbitrary values elsewhere, therefore this point lies in Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg .
(ii) Each condition is a closed half-space of the form { q : ± q ( x ) ≤ β } \{q : \pm q(x) \le\beta\} { q : ± q ( x ) ≤ β } , and a finite intersection of half-spaces is a closed convex polyhedron.
(iii) Let p ∈ Q c f g p \in\mathcal{Q}_{\mathrm{cfg}} p ∈ Q cfg . We first check if the distance ∥ q − p ∥ ∞ \lVert q - p \rVert_{\infty} ∥ q − p ∥ ∞ is at least the asserted quantity. For x ∈ I x \in\mathcal{I} x ∈ I with q ( x ) < 0 q(x) < 0 q ( x ) < 0 we have p ( x ) ≥ 0 p(x) \ge0 p ( x ) ≥ 0 , hence ∥ q ( x ) − p ( x ) ∥ ∞ ≥ − q ( x ) \lVert q(x) - p(x) \rVert_{\infty} \ge-q(x) ∥ q ( x ) − p ( x ) ∥ ∞ ≥ − q ( x ) ; for x ∈ J x \in\mathcal{J} x ∈ J with q ( x ) > − κ q(x) > -\kappa q ( x ) > − κ we have p ( x ) ≤ − κ p(x) \le-\kappa p ( x ) ≤ − κ , hence ∥ q ( x ) − p ( x ) ∥ ∞ ≥ q ( x ) + κ \lVert q(x) - p(x) \rVert_{\infty} \ge q(x) + \kappa ∥ q ( x ) − p ( x ) ∥ ∞ ≥ q ( x ) + κ . Thus ∥ q − p ∥ ∞ \lVert q - p \rVert_{\infty} ∥ q − p ∥ ∞ is at least the asserted quantity. Conversely, the coordinatewise clip defined by p ( x ) = max ( q ( x ) , 0 ) p(x) = \max(q(x), 0) p ( x ) = max ( q ( x ) , 0 ) on x ∈ I x \in\mathcal{I} x ∈ I , p ( x ) = min ( q ( x ) , − κ ) p(x) = \min(q(x), -\kappa) p ( x ) = min ( q ( x ) , − κ ) on x ∈ J x \in\mathcal{J} x ∈ J and p ( x ) = q ( x ) p(x) = q(x) p ( x ) = q ( x ) on the remaining coordinates belongs to Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg and attains it. Comparison with the defining inequalities of C ϵ \mathcal{C}_{\epsilon} C ϵ gives the last claim.
The intuition is that Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg is a box : its constraints are coordinate-separated, so its metric projection is a clip and its distance function has a closed form. By Lemma 5(iii), the family C ϵ \mathcal{C}_{\epsilon} C ϵ is precisely the family of enlargements of Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg .
Lemma 6 (Regularity of the distance). Under the supremum norm, for any convex C ⊆ R N C \subseteq\mathbb{R}^{N} C ⊆ R N , the function dist ( ⋅ , C ) \operatorname{dist}(\cdot, C) dist ( ⋅ , C ) is convex and 1-Lipschitz.
Proof. For convexity: Given q , q ′ ∈ Q q, q' \in\mathcal{Q} q , q ′ ∈ Q , λ ∈ [ 0 , 1 ] \lambda\in[0, 1] λ ∈ [ 0 , 1 ] and η > 0 \eta> 0 η > 0 , choose p , p ′ ∈ C p, p' \in C p , p ′ ∈ C with ∥ q − p ∥ ∞ ≤ dist ( q , C ) + η \lVert q - p \rVert_{\infty} \le\operatorname{dist}(q, C) + \eta ∥ q − p ∥ ∞ ≤ dist ( q , C ) + η and similarly for p ′ p' p ′ . By convexity of C C C , λ p + ( 1 − λ ) p ′ ∈ C \lambda p + (1 - \lambda)p' \in C λ p + ( 1 − λ ) p ′ ∈ C . Then, applying to distance function, dist ( λ q + ( 1 − λ ) q ′ , C ) ≤ ∥ ( λ q + ( 1 − λ ) q ′ ) − ( λ p + ( 1 − λ ) p ′ ) ∥ ∞ = ∥ λ ( q − p ) + ( 1 − λ ) ( q ′ − p ′ ) ∥ ∞ ≤ λ dist ( q , C ) + ( 1 − λ ) dist ( q ′ , C ) + η \operatorname{dist}(\lambda q + (1 - \lambda)q', C) \le\lVert(\lambda q + (1 - \lambda)q') - (\lambda p + (1 - \lambda)p')\rVert_{\infty} = \lVert\lambda(q - p) + (1 - \lambda)(q' - p')\rVert_{\infty} \le\lambda\operatorname{dist}(q, C) + (1 - \lambda)\operatorname{dist}(q', C) + \eta dist ( λ q + ( 1 − λ ) q ′ , C ) ≤ ∥( λ q + ( 1 − λ ) q ′ ) − ( λ p + ( 1 − λ ) p ′ ) ∥ ∞ = ∥ λ ( q − p ) + ( 1 − λ ) ( q ′ − p ′ ) ∥ ∞ ≤ λ dist ( q , C ) + ( 1 − λ ) dist ( q ′ , C ) + η . Then taking η → 0 \eta\to0 η → 0 , gives us the claim of convexity.
For 1-Lipschitz: As dist ( q , C ) ≤ ∥ q − p ∥ ∞ ≤ ∥ q − q ′ ∥ ∞ + ∥ q ′ − p ∥ ∞ \operatorname{dist}(q, C) \le\lVert q - p \rVert_{\infty} \le\lVert q - q' \rVert_{\infty} + \lVert q' - p \rVert_{\infty} dist ( q , C ) ≤ ∥ q − p ∥ ∞ ≤ ∥ q − q ′ ∥ ∞ + ∥ q ′ − p ∥ ∞ ∀ p ∈ C \forall p \in C ∀ p ∈ C , taking the infimum over p p p and exchanging q q q and q ′ q' q ′ yields ∣ dist ( q , C ) − dist ( q ′ , C ) ∣ ≤ ∥ q − q ′ ∥ ∞ |\operatorname{dist}(q, C) - \operatorname{dist}(q', C)| \le\lVert q - q' \rVert_{\infty} ∣ dist ( q , C ) − dist ( q ′ , C ) ∣ ≤ ∥ q − q ′ ∥ ∞ .
Lemma 7 (Convex distance decay). Let C ⊆ R N C \subseteq\mathbb{R}^{N} C ⊆ R N be closed, convex and nonempty, ρ C : = dist ( ⋅ , C ) \rho_C := \operatorname{dist}(\cdot, C) ρ C := dist ( ⋅ , C ) be the supremum-norm, θ ∈ [ 0 , 1 ) \theta\in[0, 1) θ ∈ [ 0 , 1 ) , R ∈ ( 0 , ∞ ] R \in(0, \infty] R ∈ ( 0 , ∞ ] , and Φ : R N → R N \Phi: \mathbb{R}^{N} \to\mathbb{R}^{N} Φ : R N → R N be a set-valued map. Suppose that for every x x x with ρ C ( x ) < R \rho_C(x) < R ρ C ( x ) < R , every v ∈ Φ ( x ) v \in\Phi(x) v ∈ Φ ( x ) has the form v = z − x v = z - x v = z − x with ρ C ( z ) ≤ θ ρ C ( x ) \rho_C(z) \le\theta\rho_C(x) ρ C ( z ) ≤ θ ρ C ( x ) . Then every absolutely continuous x ( ⋅ ) x(\cdot) x ( ⋅ ) with x ( t ) ∈ Φ ( x ( t ) ) x(t) \in\Phi(x(t)) x ( t ) ∈ Φ ( x ( t )) for almost every t t t and ρ C ( x ( 0 ) ) < R \rho_C(x(0)) < R ρ C ( x ( 0 )) < R satisfies
ρ C ( x ( t ) ) ≤ ρ C ( x ( 0 ) ) e − ( 1 − θ ) t ∀ t ≥ 0 \rho_C(x(t)) \le\rho_C(x(0))e^{-(1-\theta)t} \qquad\forall t \ge0 ρ C ( x ( t )) ≤ ρ C ( x ( 0 )) e − ( 1 − θ ) t ∀ t ≥ 0 Proof. Let u ( t ) : = ρ C ( x ( t ) ) u(t) := \rho_C(x(t)) u ( t ) := ρ C ( x ( t )) . Since ρ C \rho_C ρ C is 1-Lipschitz (Lemma 6), u u u is absolutely continuous and hence differentiable almost everywhere. Let t ∗ : = sup { τ ≥ 0 : u ( t ) < R ∀ t ≤ τ } t^* := \sup\{\tau\ge0 : u(t) < R \ \forall t \le\tau\} t ∗ := sup { τ ≥ 0 : u ( t ) < R ∀ t ≤ τ } . Notice that as u ( 0 ) < R u(0) < R u ( 0 ) < R and u u u is continuous, t ∗ > 0 t^* > 0 t ∗ > 0 . Consider t < t ∗ t < t^* t < t ∗ at which u u u is differentiable and fix v : = x ˙ ( t ) v := \dot{x}(t) v := x ˙ ( t ) such that v = z − x ( t ) v = z - x(t) v = z − x ( t ) with ρ C ( z ) ≤ θ u ( t ) \rho_C(z) \le\theta u(t) ρ C ( z ) ≤ θ u ( t ) . For h ∈ ( 0 , 1 ) h \in(0,1) h ∈ ( 0 , 1 ) , absolute continuity gives x ˙ ( t + h ) = x ( t ) + h v + o ( h ) \dot{x}(t + h) = x(t) + hv + o(h) x ˙ ( t + h ) = x ( t ) + h v + o ( h ) . By the Lipschitz property, we get,
u ( t + h ) ≤ ρ C ( x ( t ) + h v ) + o ( h ) = ρ C ( ( 1 − h ) x ( t ) + h z ) + o ( h ) u(t + h) \le\rho_C(x(t) + hv) + o(h) = \rho_C((1 - h)x(t) + hz) + o(h) u ( t + h ) ≤ ρ C ( x ( t ) + h v ) + o ( h ) = ρ C (( 1 − h ) x ( t ) + h z ) + o ( h ) Convexity of ρ C \rho_C ρ C gives us,
u ( t + h ) ≤ ( 1 − h ) u ( t ) + h ρ C ( z ) + o ( h ) ≤ ( 1 − h ) u ( t ) + h θ u ( t ) + o ( h ) u(t + h) \le(1 - h)u(t) + h\rho_C(z) + o(h) \le(1 - h)u(t) + h\theta u(t) + o(h) u ( t + h ) ≤ ( 1 − h ) u ( t ) + h ρ C ( z ) + o ( h ) ≤ ( 1 − h ) u ( t ) + h θ u ( t ) + o ( h ) Dividing by h h h and letting h → 0 h \to0 h → 0 yields u ˙ ( t ) ≤ − ( 1 − θ ) u ( t ) \dot{u}(t) \le-(1 - \theta)u(t) u ˙ ( t ) ≤ − ( 1 − θ ) u ( t ) almost everywhere on [ 0 , t ∗ ) [0,t^*) [ 0 , t ∗ ) , so Grönwall’s inequality gives us u ( t ) ≤ u ( 0 ) e − ( 1 − θ ) t u(t) \le u(0)e^{-(1-\theta)t} u ( t ) ≤ u ( 0 ) e − ( 1 − θ ) t . In particular u u u is non-increasing, so
u ( t ) ≤ u ( 0 ) < R u(t) \leq u(0) < R u ( t ) ≤ u ( 0 ) < R . If t ∗ < ∞ t^* < \infty t ∗ < ∞ , continuity gives us u ( t ∗ ) ≤ u ( 0 ) < R u(t^*) \leq u(0) < R u ( t ∗ ) ≤ u ( 0 ) < R and hence u < R u < R u < R on neighbourhood of t ∗ t^* t ∗ , contradicting the definition of t ∗ t^* t ∗ as a supremum. Therefore t ∗ = ∞ t^* = \infty t ∗ = ∞ .
Lemma 8 (Selection gap). Let 0 ≤ ϵ ≤ ϵ 0 0 \leq\epsilon\leq\epsilon_0 0 ≤ ϵ ≤ ϵ 0 and q ∈ C ϵ q \in\mathcal{C}_{\epsilon} q ∈ C ϵ . Then,
max a ∈ A Ω ( s ) min d q ( s , a , d ) − max a ∉ A Ω ( s ) min d q ( s , a , d ) ≥ κ − 2 ϵ > 0 ∀ s ∈ Ω \max_{a \in\mathcal{A}^{\Omega}(s)} \min_d q(s,a,d) - \max_{a \notin\mathcal{A}^{\Omega}(s)} \min_d q(s,a,d) \geq\kappa- 2\epsilon> 0 \quad\forall s \in\Omega a ∈ A Ω ( s ) max d min q ( s , a , d ) − a ∈ / A Ω ( s ) max d min q ( s , a , d ) ≥ κ − 2 ϵ > 0 ∀ s ∈ Ω and consequently every maximin greedy policy π = ( μ , ν ) ∈ Π q \pi= (\mu,\nu) \in\Pi_q π = ( μ , ν ) ∈ Π q satisfies μ ( s ) ∈ A Ω ( s ) \mu(s) \in\mathcal{A}^{\Omega}(s) μ ( s ) ∈ A Ω ( s ) . For q ∈ Q c f g q \in\mathcal{Q}_{cfg} q ∈ Q c f g , the gap is atleast κ \kappa κ .
Proof. Noting that A Ω ( s ) ≠ ∅ \mathcal{A}^{\Omega}(s) \ne\varnothing A Ω ( s ) = ∅ ∀ s ∈ Ω \forall s \in\Omega ∀ s ∈ Ω , so the first maximin is not over an empty set. For a ∈ A Ω ( s ) a \in\mathcal{A}^{\Omega}(s) a ∈ A Ω ( s ) , we have ( s , a , d ) ∈ I (s,a,d) \in\mathcal{I} ( s , a , d ) ∈ I ∀ d ∈ D \forall d \in\mathcal{D} ∀ d ∈ D , by definitions of kernel-preserving action set and index set. Therefore, min d q ( s , a , d ) ≥ − ϵ \min_d q(s,a,d) \geq-\epsilon min d q ( s , a , d ) ≥ − ϵ . We now consider two cases for the second maximin
If A Ω ( s ) = A \mathcal{A}^{\Omega}(s) = \mathcal{A} A Ω ( s ) = A , then the second maximin is over an empty set and so max a ∉ A Ω ( s ) min d q ( s , a , d ) = − ∞ \max_{a \notin\mathcal{A}^{\Omega}(s)} \min_d q(s,a,d) = -\infty max a ∈ / A Ω ( s ) min d q ( s , a , d ) = − ∞ by convention. Hence, the claims of the lemma immediately follow.
If A Ω ( s ) ≠ A \mathcal{A}^{\Omega}(s) \ne\mathcal{A} A Ω ( s ) = A , for a ∉ A Ω ( s ) a \notin\mathcal{A}^{\Omega}(s) a ∈ / A Ω ( s ) , the triple ( s , a , d ^ ( s , a ) ) ∈ J (s,a,\hat{d}(s,a)) \in\mathcal{J} ( s , a , d ^ ( s , a )) ∈ J by definition of J \mathcal{J} J . Hence, min d q ( s , a , d ) ≤ q ( s , a , d ^ ( s , a ) ) ≤ − κ + ϵ \min_d q(s,a,d) \leq q(s,a,\hat{d}(s,a)) \leq-\kappa+ \epsilon min d q ( s , a , d ) ≤ q ( s , a , d ^ ( s , a )) ≤ − κ + ϵ and the gap is therefore at least κ − 2 ϵ \kappa- 2\epsilon κ − 2 ϵ . Noting that this selection gap of κ − 2 ϵ \kappa- 2\epsilon κ − 2 ϵ is strictly positive since ϵ < ϵ 0 < κ / 2 \epsilon< \epsilon_0 < \kappa/2 ϵ < ϵ 0 < κ /2 completes the proof.
Lemma 8 depends only on the coordinate inequalities definition C ϵ \mathcal{C}_{\epsilon} C ϵ , and does not depend on any property of the critic. This is what allows us to use this in the proof of forward invariance without creating circular dependency. Note that this is stated for the whole family C ϵ \mathcal{C}_{\epsilon} C ϵ and ∀ π ∈ Π q \forall\pi\in\Pi_q ∀ π ∈ Π q because the lemma applies to arbitrary greedy branch and at configurations in C ϵ 0 \mathcal{C}_{\epsilon_0} C ϵ 0 rather than only in C 0 \mathcal{C}_0 C 0 . A further consequence is that on Q c f g \mathcal{Q}_{cfg} Q c f g no tie between kernel-preserving and kernel-exiting action can arise, so choice of tie-breaking rule in the selection convention does not affect the following safety conclusions.
Safety Certification of the fast attractor
As the coupled iterated approach the graph of Λ ( ⋅ ) \Lambda(\cdot) Λ ( ⋅ ) , Gr Λ \operatorname{Gr}\Lambda Gr Λ , rather than a single critic, safety certification (both positive and negative) must hold throughout Λ ( q ) \Lambda(q) Λ ( q ) , uniformly over q ∈ C ϵ 0 q \in\mathcal{C}_{\epsilon_0} q ∈ C ϵ 0 . For σ > 0 \sigma> 0 σ > 0 , we define the certificate as,
Y σ = { y ∈ Q : y ( x ) ≥ 0 ∀ x ∈ I , y ( x ) ≤ − σ ∀ x ∈ J } , \mathcal{Y}_{\sigma} = \{y \in\mathcal{Q} : y(x) \geq0 \ \forall x \in\mathcal{I},\ y(x) \leq-\sigma\ \forall x \in\mathcal{J}\}, Y σ = { y ∈ Q : y ( x ) ≥ 0 ∀ x ∈ I , y ( x ) ≤ − σ ∀ x ∈ J } ,
a closed convex polyhedron by Lemma 5(ii).
Only the negative half of the certificate that constrains the safety critic on kernel-exiting triples is assumed as follows.
Assumption 3 (Negative Certification of the fast attractor). ∃ σ Λ > 0 \exists\sigma_{\Lambda} > 0 ∃ σ Λ > 0 , such that, at unit margin scale, y ( x ) ≤ − σ Λ ∀ x ∈ J , y ∈ Λ 1 ( q ) , q ∈ C ϵ 0 y(x) \leq-\sigma_{\Lambda} \ \forall x \in\mathcal{J}, y \in\Lambda_1(q), q \in\mathcal{C}_{\epsilon_0} y ( x ) ≤ − σ Λ ∀ x ∈ J , y ∈ Λ 1 ( q ) , q ∈ C ϵ 0 .
The corresponding condition on I \mathcal{I} I is not assumed because it is preserved by every branch of the fast inclusion (proved in the following lemma and corollary) and therefore the certificate holds throughout Λ ( q ) \Lambda(q) Λ ( q ) .
Lemma 9 (Branchwise absorption of the positive constraints). Let q ∈ C ϵ 0 q \in\mathcal{C}_{\epsilon_0} q ∈ C ϵ 0 and π = ( μ , ν ) ∈ Π ( q ) \pi= (\mu,\nu) \in\Pi(q) π = ( μ , ν ) ∈ Π ( q ) . If y ( x ) ≥ 0 ∀ x ∈ I y(x) \geq0 \ \forall x \in\mathcal{I} y ( x ) ≥ 0 ∀ x ∈ I , then T π ϕ [ y ] ( x ) ≥ 0 ∀ x ∈ I \mathcal{T}^{\phi}_{\pi}[y](x) \geq0 \ \forall x \in\mathcal{I} T π ϕ [ y ] ( x ) ≥ 0 ∀ x ∈ I .
Proof. Let x = ( s , a , d ) ∈ I x = (s,a,d) \in\mathcal{I} x = ( s , a , d ) ∈ I . Since s ∈ Ω ⊆ F c s \in\Omega\subseteq\mathcal{F}^{c} s ∈ Ω ⊆ F c , we have K g ( s ) > 0 K_g(s) > 0 K g ( s ) > 0 by definition of the scaled safety margin function. As a ∈ A Ω ( s ) a \in\mathcal{A}^{\Omega}(s) a ∈ A Ω ( s ) , every successor state s ′ ∈ Ω ∀ d ∈ D s' \in\Omega\ \forall d \in\mathcal{D} s ′ ∈ Ω ∀ d ∈ D . By Lemma 8, μ ( s ′ ) ∈ A Ω ( s ′ ) ⟹ ( s ′ , μ ( s ′ ) , ν ( s ′ , μ ( s ′ ) ) ) ∈ I ⟹ y ( s ′ , μ ( s ′ ) , ν ( s ′ ) ) ≥ 0 \mu(s') \in\mathcal{A}^{\Omega}(s') \Longrightarrow(s',\mu(s'),\nu(s',\mu(s'))) \in\mathcal{I} \Longrightarrow y(s',\mu(s'),\nu(s')) \geq0 μ ( s ′ ) ∈ A Ω ( s ′ ) ⟹ ( s ′ , μ ( s ′ ) , ν ( s ′ , μ ( s ′ ))) ∈ I ⟹ y ( s ′ , μ ( s ′ ) , ν ( s ′ )) ≥ 0 . Hence, E s ′ [ y ( ⋅ ) ] ≥ 0 \mathbb{E}_{s'}[y(\cdot)] \geq0 E s ′ [ y ( ⋅ )] ≥ 0 . Now, substituting these inequalities in the safety Bellman equation, Eq. 5, we get
T π ϕ [ y ] ( x ) = ( 1 − γ ) K g ( s ) + γ min { K g ( s ) , E s ′ [ y ( ⋅ ) ] } ≥ 0 \mathcal{T}^{\phi}_{\pi}[y](x) = (1-\gamma)K_g(s) + \gamma\min\{K_g(s), \mathbb{E}_{s'}[y(\cdot)]\} \geq0 T π ϕ [ y ] ( x ) = ( 1 − γ ) K g ( s ) + γ min { K g ( s ) , E s ′ [ y ( ⋅ )]} ≥ 0
Corollary 2 (Positive certification). For every q ∈ C ϵ 0 q \in\mathcal{C}_{\epsilon_0} q ∈ C ϵ 0 and every y ∈ Λ 1 ( q ) y \in\Lambda_1(q) y ∈ Λ 1 ( q ) , y ( x ) ≥ 0 ∀ x ∈ I y(x) \ge0\ \forall\ x \in\mathcal{I} y ( x ) ≥ 0 ∀ x ∈ I . Together with Assumption 3 this gives Λ 1 ( q ) ⊆ Y σ Λ \Lambda_1(q) \subseteq\mathcal{Y}_{\sigma_\Lambda} Λ 1 ( q ) ⊆ Y σ Λ .
Proof. Let P : = { y : y ( x ) ≥ 0 ∀ x ∈ I } \mathcal{P} := \{y : y(x) \ge0\ \forall\ x \in\mathcal{I}\} P := { y : y ( x ) ≥ 0 ∀ x ∈ I } , a closed convex polyhedron, and let ρ P \rho_{\mathcal{P}} ρ P denote the supremum-norm distance to P \mathcal{P} P .
As in Lemma 5, ρ P ( y ) = max x ∈ I ( − y ( x ) ) + \rho_{\mathcal{P}}(y) = \max_{x \in\mathcal{I}}(-y(x))_+ ρ P ( y ) = max x ∈ I ( − y ( x ) ) + . If y y y violates the constraints of P \mathcal{P} P by at most ϵ ≥ 0 \epsilon\ge0 ϵ ≥ 0 , then T Γ π [ y ] ( x ) ≥ γ min { K g ( s ) , − ϵ } ≥ − γ ϵ ∀ x ∈ I , π ∈ Π ( q ) \mathcal{T}^{\pi}_{\Gamma}[y](x) \ge\gamma\min\{K g(s),-\epsilon\} \ge-\gamma\epsilon\ \forall\ x \in\mathcal{I},\ \pi\in\Pi(q) T Γ π [ y ] ( x ) ≥ γ min { K g ( s ) , − ϵ } ≥ − γ ϵ ∀ x ∈ I , π ∈ Π ( q ) as in Lemma 9. This implies ρ P ( T Γ π [ y ] ) ≤ γ ρ P ( y ) \rho_{\mathcal{P}}(\mathcal{T}^{\pi}_{\Gamma}[y]) \le\gamma\rho_{\mathcal{P}}(y) ρ P ( T Γ π [ y ]) ≤ γ ρ P ( y ) .
Next, every element of Ψ ( q , y ) \Psi(q,y) Ψ ( q , y ) has the form w − y w-y w − y with ρ P ( w ) ≤ γ ρ P ( y ) \rho_{\mathcal{P}}(w) \le\gamma\rho_{\mathcal{P}}(y) ρ P ( w ) ≤ γ ρ P ( y ) , because of convexity of the relaxation of P \mathcal{P} P . Lemma 7 therefore applies, with C = P C = \mathcal{P} C = P , θ = γ \theta= \gamma θ = γ , and R = ∞ R = \infty R = ∞ , at every y y y .
For y ∈ Λ 1 ( q ) y \in\Lambda_1(q) y ∈ Λ 1 ( q ) , by Eq. (11) there is a bounded complete solution y ( ⋅ ) y(\cdot) y ( ⋅ ) of y ˙ ∈ Ψ ( q , y ) \dot{y} \in\Psi(q,y) y ˙ ∈ Ψ ( q , y ) with y ( 0 ) = y y(0) = y y ( 0 ) = y , and by shift invariance y ( s ) ∈ Λ 1 ( q ) ∀ s ∈ R y(s) \in\Lambda_1(q)\ \forall\ s \in\mathbb{R} y ( s ) ∈ Λ 1 ( q ) ∀ s ∈ R .
Noting that Λ 1 ( q ) \Lambda_1(q) Λ 1 ( q ) is compact and ρ P \rho_{\mathcal{P}} ρ P is continuous, we get M : = max w ∈ Λ 1 ( q ) ρ P ( w ) M := \max_{w \in\Lambda_1(q)} \rho_{\mathcal{P}}(w) M := max w ∈ Λ 1 ( q ) ρ P ( w ) is finite and ρ P ( y ( − t ) ) ≤ M ∀ t > 0 \rho_{\mathcal{P}}(y(-t)) \le M\ \forall\ t > 0 ρ P ( y ( − t )) ≤ M ∀ t > 0 .
Applying Lemma 7 on interval [ − t , 0 ] [-t,0] [ − t , 0 ] with initial point of y ( − t ) y(-t) y ( − t ) , we get,
ρ P ( y ( 0 ) ) ≤ ρ P ( y ( − t ) ) e − ( 1 − γ ) t ∀ t > 0 \rho_{\mathcal{P}}(y(0)) \le\rho_{\mathcal{P}}(y(-t))e^{-(1-\gamma)t}\ \forall\ t > 0 ρ P ( y ( 0 )) ≤ ρ P ( y ( − t )) e − ( 1 − γ ) t ∀ t > 0 Taking the limit of t → ∞ t \to\infty t → ∞ , we get, ρ P ( y ( 0 ) ) = 0 \rho_{\mathcal{P}}(y(0)) = 0 ρ P ( y ( 0 )) = 0 and P \mathcal{P} P is closed. Hence, y ∈ P y \in\mathcal{P} y ∈ P .
Remark 7 (On the selection of d ^ \hat{d} d ^ and index sets). The selection d ^ \hat{d} d ^ is unconstrained, and can be made to satisfy Assumption 3; this assumption is a condition on the existence of a suitable selection; however, it is not a condition on every kernel-exiting disturbance. Enlarging J \mathcal{J} J to contain every kernel-exiting triple would shrink Q c f g \mathcal{Q}_{\mathrm{cfg}} Q cfg and strengthen Assumption 3 without improving any conclusion, since Lemma 8 requires only min d q ( s , a , d ) ≤ − κ \min_d q(s,a,d) \le-\kappa min d q ( s , a , d ) ≤ − κ , which a single coordinate already delivers.
Remark 8 (Only the condition on J \mathcal{J} J is assumed). We now want to reason whether the Corollary 2 extends to J \mathcal{J} J . Towards this end, let us first consider x = ( s , a , d ^ ( s , a ) ) ∈ J x = (s,a,\hat{d}(s,a)) \in\mathcal{J} x = ( s , a , d ^ ( s , a )) ∈ J , where s ∈ Ω s \in\Omega s ∈ Ω by definition of index set. This means K g ( s ) > 0 K g(s) > 0 K g ( s ) > 0 and hence substituting in Eq. 5, we get ( 1 − γ ) K g ( s ) > 0 (1-\gamma)K g(s) > 0 ( 1 − γ ) K g ( s ) > 0 . If T Π φ [ y ] ( x ) ≤ − σ \mathcal{T}^{\varphi}_{\Pi}[y](x) \le-\sigma T Π φ [ y ] ( x ) ≤ − σ , then E s ′ [ y ( ⋅ ) ] ≤ K g ( s ) \mathbb{E}_{s'}[y(\cdot)] \le K g(s) E s ′ [ y ( ⋅ )] ≤ K g ( s ) and E s ′ [ y ( ⋅ ) ] ≤ − σ + ( 1 − γ ) K g ( s ) γ \mathbb{E}_{s'}[y(\cdot)] \le\frac{-\sigma+(1-\gamma)K g(s)}{\gamma} E s ′ [ y ( ⋅ )] ≤ γ − σ + ( 1 − γ ) K g ( s ) . This second term of minimum in Eq. 5 is controlled by the values of y ( x ′ ) y(x') y ( x ′ ) , where x ′ = ( s ′ , ⋅ , ⋅ ) x' = (s',\cdot,\cdot) x ′ = ( s ′ , ⋅ , ⋅ ) and s ′ ∉ Ω s' \notin\Omega s ′ ∈ / Ω , at successor states outside of Ω \Omega Ω . Note that the index sets, I \mathcal{I} I and J \mathcal{J} J do not provide any information on the value of y y y at such successor states outside of Ω \Omega Ω . Hence, we get a structural asymmetry: positive certification propagates since kernel-preserving action keeps every successor in Ω \Omega Ω where we have the constraints, whereas negative certification must propagate into a region where nothing has been assumed. Certifying the condition on J \mathcal{J} J therefore requires the Assumption 3 and Corollary 2 cannot extend to J \mathcal{J} J .
Proposition 3 (Margin Separation). Let Assumption 3 hold and set Θ : = ( ( 1 − γ ) R max + κ ) / γ \Theta:= ((1-\gamma)R_{\max}+\kappa)/\gamma Θ := (( 1 − γ ) R m a x + κ ) / γ . Then, for every
K ≥ K ‾ : = ( 1 − γ ) R max + κ γ σ Λ (47) K \ge\underline{K} := \frac{(1-\gamma)R_{\max}+\kappa}{\gamma\sigma_\Lambda} \tag*{(47)} K ≥ K := γ σ Λ ( 1 − γ ) R m a x + κ (47) one has y ( x ) ≤ − Θ y(x) \le-\Theta y ( x ) ≤ − Θ for all x ∈ J x \in\mathcal{J} x ∈ J , all y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) , and all q ∈ C ϵ 0 q \in\mathcal{C}_{\epsilon_0} q ∈ C ϵ 0 . If J = ∅ \mathcal{J} = \varnothing J = ∅ the bound on K K K and the conclusion holds trivially.
Proof. 1. The safety Bellman operator is positively homogeneous of degree one in the margin-replacing g g g by K g ( s ) K g(s) K g ( s ) and Q φ Q^\varphi Q φ by K Q φ KQ^\varphi K Q φ leaves the Eq. 5 invariant for all K > 0 K > 0 K > 0 .
Π ( q ) \Pi(q) Π ( q ) is greedy with respect to q q q and is therefore independent of the positive margin scale.
Noting that positive scaling commutes with the closed convex hull and graph completion, Ψ K ( q , K y ) = K Ψ 1 ( q , y ) \Psi_K(q,K y) = K\Psi_1(q,y) Ψ K ( q , K y ) = K Ψ 1 ( q , y ) .
y ( ⋅ ) y(\cdot) y ( ⋅ ) is a bounded complete solution at unit scale if and only if K y ( ⋅ ) Ky(\cdot) K y ( ⋅ ) is a complete solution at positive scale K K K .
Taking time zero values in Eq. (11) , gives us Λ K ( q ) = K Λ 1 ( q ) \Lambda_K(q) = K\Lambda_1(q) Λ K ( q ) = K Λ 1 ( q ) .
By Assumption 3, every y 1 ∈ Λ 1 ( q ) y_1 \in\Lambda_1(q) y 1 ∈ Λ 1 ( q ) satisfies y 1 ( x ) ≤ − σ Λ ∀ x ∈ J y_1(x) \leq-\sigma_\Lambda\ \forall x \in\mathcal{J} y 1 ( x ) ≤ − σ Λ ∀ x ∈ J .
Similarly, for every y = K y 1 ∈ Λ K ( q ) y = Ky_1 \in\Lambda_K(q) y = K y 1 ∈ Λ K ( q ) satisfies y ( x ) ≤ − K σ ≤ − Θ y(x) \leq-K\sigma\leq-\Theta y ( x ) ≤ − K σ ≤ − Θ whenever K σ ≥ Θ K\sigma\geq\Theta K σ ≥ Θ , which is the stated bound.
Note only the Assumption 3 interacts with K K K . The condition on I \mathcal{I} I obtained in Corollary 2 is positive scale-invariant, that is, multiplying by K > 0 K > 0 K > 0 does not change the sign.
Lemma 10 (Target Bounds). Let 0 ≤ ϵ ≤ ϵ 0 0 \leq\epsilon\leq\epsilon_0 0 ≤ ϵ ≤ ϵ 0 , q ∈ C ϵ q \in C_\epsilon q ∈ C ϵ , and y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) . Then (i) T y [ q ] ( x ) ≤ − κ T_y[q](x) \leq-\kappa T y [ q ] ( x ) ≤ − κ for every x ∈ J x \in\mathcal{J} x ∈ J , and (ii) T y [ q ] ( x ) ≥ − γ ϵ T_y[q](x) \geq-\gamma\epsilon T y [ q ] ( x ) ≥ − γ ϵ for every x ∈ I x \in\mathcal{I} x ∈ I .
Proof. (i) Let x = ( s , a , d ) ∈ J x = (s,a,d) \in\mathcal{J} x = ( s , a , d ) ∈ J . Bounding each min in Eq. 6 by one of its arguments and using m ( s , a , d ) = min { r , K g ( s ) } ≤ r ≤ R max m(s,a,d) = \min\{r,Kg(s)\} \leq r \leq R_{\max} m ( s , a , d ) = min { r , K g ( s )} ≤ r ≤ R m a x ,
T y [ q ] ( x ) = ( 1 − γ ) m ( s , a , d ) + γ min { r + E [ V q ( s ′ ) ] , y ( x ) } ≤ ( 1 − γ ) R max + γ y ( x ) . T_y[q](x) = (1-\gamma)m(s,a,d) + \gamma\min\{r + \mathbb{E}[V_q(s')],y(x)\} \leq(1-\gamma)R_{\max} + \gamma y(x). T y [ q ] ( x ) = ( 1 − γ ) m ( s , a , d ) + γ min { r + E [ V q ( s ′ )] , y ( x )} ≤ ( 1 − γ ) R m a x + γ y ( x ) .
Since q ∈ C ϵ 0 q \in C_{\epsilon_0} q ∈ C ϵ 0 and y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) , Proposition 3 gives y ( x ) ≤ − Θ y(x) \leq-\Theta y ( x ) ≤ − Θ , so T y [ q ] ( x ) ≤ ( 1 − γ ) R max − γ Θ = − κ T_y[q](x) \leq(1-\gamma)R_{\max} - \gamma\Theta= -\kappa T y [ q ] ( x ) ≤ ( 1 − γ ) R m a x − γ Θ = − κ (again using definition of Θ \Theta Θ as defined in Proposition 3). The bound depends only on R max R_{\max} R m a x , γ \gamma γ and Θ \Theta Θ , and is therefore uniform in q q q and in y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) .
(ii) Let x = ( s , a , d ) ∈ I x = (s,a,d) \in\mathcal{I} x = ( s , a , d ) ∈ I . Since s ∈ Ω ⊆ F c s \in\Omega\subseteq F^c s ∈ Ω ⊆ F c we have g ( s ) > 0 g(s) > 0 g ( s ) > 0 , and r ≥ 0 r \geq0 r ≥ 0 , so m ( s , a , d ) ≥ 0 m(s,a,d) \geq0 m ( s , a , d ) ≥ 0 and the first term of Eq. 6 is non-negative. For the continuation term, a ∈ A Ω ( s ) a \in A^\Omega(s) a ∈ A Ω ( s ) , so every successor s ′ s' s ′ lies in Ω \Omega Ω - against every disturbance, not only the one appearing in x x x . As s ′ ∈ Ω s' \in\Omega s ′ ∈ Ω , the set A Ω ( s ′ ) ≠ ∅ A^\Omega(s') \neq\emptyset A Ω ( s ′ ) = ∅ ; fix a + ∈ A Ω ( s ′ ) a^+ \in A^\Omega(s') a + ∈ A Ω ( s ′ ) . Since I \mathcal{I} I contains every disturbance coordinate, ( s ′ , a + , d ′ ) ∈ I (s',a^+,d') \in\mathcal{I} ( s ′ , a + , d ′ ) ∈ I for all d ′ ∈ D d' \in D d ′ ∈ D , and q ∈ C ϵ q \in C_\epsilon q ∈ C ϵ gives q ( s ′ , a + , d ′ ) ≥ − ϵ q(s',a^+,d') \geq-\epsilon q ( s ′ , a + , d ′ ) ≥ − ϵ for each such d ′ d' d ′ . Hence
V q ( s ′ ) = max a ′ min d ′ q ( s ′ , a ′ , d ′ ) ≥ min d ′ q ( s ′ , a + , d ′ ) ≥ − ϵ V_q(s') = \max_{a'} \min_{d'} q(s',a',d') \geq\min_{d'} q(s',a^+,d') \geq-\epsilon V q ( s ′ ) = a ′ max d ′ min q ( s ′ , a ′ , d ′ ) ≥ d ′ min q ( s ′ , a + , d ′ ) ≥ − ϵ
the first inequality because a maximum over a ′ a' a ′ is at least the value at the particular action a + a^+ a + . Therefore r + E [ V q ( s ′ ) ] ≥ − ϵ r + \mathbb{E}[V_q(s')] \geq-\epsilon r + E [ V q ( s ′ )] ≥ − ϵ , while y ( x ) ≥ 0 y(x) \geq0 y ( x ) ≥ 0 by Corollary 2 on I \mathcal{I} I . Since min { X , Y } ≥ min { x , y } \min\{X,Y\} \geq\min\{x,y\} min { X , Y } ≥ min { x , y } whenever X ≥ x X \geq x X ≥ x and Y ≥ y Y \geq y Y ≥ y ,
T y [ q ] ( x ) ≥ ( 1 − γ ) ⋅ 0 + γ ⋅ min { − ϵ , 0 } = − γ ϵ T_y[q](x) \geq(1-\gamma)\cdot0 + \gamma\cdot\min\{-\epsilon,0\} = -\gamma\epsilon T y [ q ] ( x ) ≥ ( 1 − γ ) ⋅ 0 + γ ⋅ min { − ϵ , 0 } = − γ ϵ
Part (ii) of the above proof never identifies which action the greedy policy of Eq. (4) selects at s ′ s' s ′ , nor which disturbance is applied there: it requires only that some kernel-preserving action exist at s ′ s' s ′ and carry value at least − ϵ -\epsilon − ϵ . This is why the lower constraints propagate without any hypothesis on the disturbance policy, whereas the upper constraints require Assumption 3 on J \mathcal{J} J .
Corollary 3 (The joint operator contracts the violation). For 0 ≤ ϵ ≤ ϵ 0 0 \leq\epsilon\leq\epsilon_0 0 ≤ ϵ ≤ ϵ 0 and every y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) , T y [ C ϵ ] ⊆ C γ ϵ T_y[C_\epsilon] \subseteq C_{\gamma\epsilon} T y [ C ϵ ] ⊆ C γ ϵ .
Proof. Let q ∈ C ϵ q \in C_\epsilon q ∈ C ϵ and y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) . Lemma 10(ii) gives T y [ q ] ( x ) ≥ − γ ϵ T_y[q](x) \geq-\gamma\epsilon T y [ q ] ( x ) ≥ − γ ϵ for x ∈ I x \in\mathcal{I} x ∈ I , and Lemma 10(i) gives T y [ q ] ( x ) ≤ − κ ≤ − κ + γ ϵ T_y[q](x) \leq-\kappa\leq-\kappa+ \gamma\epsilon T y [ q ] ( x ) ≤ − κ ≤ − κ + γ ϵ for x ∈ J x \in\mathcal{J} x ∈ J . These are precisely the defining inequalities of C γ ϵ C_{\gamma\epsilon} C γ ϵ .
This is the property on which the invariance argument depends on: the joint Bellman operator maps each relaxed constraint set into a smaller one, uniformly over the critics in the fast attractor. It is not a consequence of Proposition 2, which holds the safety action-value fixed. Here, the critic ranges over Λ ( q ) \Lambda(q) Λ ( q ) while q q q itself moves and the composed map q ↦ T Y q [ q ] q \mapsto T_{Y_q}[q] q ↦ T Y q [ q ] need not induce a contraction. Corollary 3 asserts the weaker but sufficient property that the operator contracts the distance to C c f g \mathcal{C}_{\mathrm{cfg}} C cfg .
We now proceed to transfer the property from the individual operators to their occupation-measure average in the next section of the proof.
Averaging over the fast attractor preserves the violation contraction
Lemma 11 (Averaging preserves the violation contraction). Let ρ ( q ) = ϵ < ϵ 0 \rho(q) = \epsilon< \epsilon_0 ρ ( q ) = ϵ < ϵ 0 . Then every v ∈ G ‾ ( q ) v \in\overline{G}(q) v ∈ G ( q ) has the form v = z − q v = z - q v = z − q with z ∈ C γ ϵ z \in C_{\gamma\epsilon} z ∈ C γ ϵ .
Proof.
By Eq. (12) , there is a probability measure, P ∈ D ( q ) \mathbb{P} \in\mathcal{D}(q) P ∈ D ( q ) supported on Λ ( q ) \Lambda(q) Λ ( q ) with
v = ∫ Λ ( q ) ( T y [ q ] − q ) P ( d y ) = ∫ Λ ( q ) T y [ q ] P ( d y ) − ∫ Λ ( q ) q P ( d y ) = ( ∫ Λ ( q ) T y [ q ] P ( d y ) ) − q v = \int_{\Lambda(q)} (T_y[q]-q)\mathbb{P}(\mathrm{d}y) = \int_{\Lambda(q)} T_y[q]\mathbb{P}(\mathrm{d}y) - \int_{\Lambda(q)} q\mathbb{P}(\mathrm{d}y) = \left(\int_{\Lambda(q)} T_y[q]\mathbb{P}(\mathrm{d}y)\right) - q v = ∫ Λ ( q ) ( T y [ q ] − q ) P ( d y ) = ∫ Λ ( q ) T y [ q ] P ( d y ) − ∫ Λ ( q ) q P ( d y ) = ( ∫ Λ ( q ) T y [ q ] P ( d y ) ) − q
Comparing this to v = z − q v = z-q v = z − q , gives us that z = ∫ Λ ( q ) T y [ q ] P ( d y ) z = \int_{\Lambda(q)} T_y[q]\mathbb{P}(\mathrm{d}y) z = ∫ Λ ( q ) T y [ q ] P ( d y ) . In words, z z z is the averaged target.
From Corollary 3, we know T y [ q ] ∈ C γ ϵ T_y[q] \in C_{\gamma\epsilon} T y [ q ] ∈ C γ ϵ for every y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) .
From Lemma 5(ii), we know that C γ ϵ C_{\gamma\epsilon} C γ ϵ is closed and convex. By extension, the averaged target z ∈ C γ ϵ z \in C_{\gamma\epsilon} z ∈ C γ ϵ .
Averaging over occupation measures still preserves the violation contraction because of the convexity of C ϵ C_\epsilon C ϵ , since conv ( C ϵ ) = C ϵ \operatorname{conv}(C_\epsilon) = C_\epsilon conv ( C ϵ ) = C ϵ .
Forward Invariance
Theorem 3 (Forward invariance and exponential attraction). Let Assumption 3 hold and let K ≥ K ‾ K \ge\overline{K} K ≥ K . If ρ ( q ( 0 ) ) < ϵ 0 \rho(q(0)) < \epsilon_0 ρ ( q ( 0 )) < ϵ 0 , then every solution of q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t) \in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) satisfies ρ ( q ( t ) ) ≤ ρ ( q ( 0 ) ) e − ( 1 − γ ) t ∀ t ≥ 0 \rho(q(t)) \le\rho(q(0))e^{-(1-\gamma)t}\ \forall\ t \ge0 ρ ( q ( t )) ≤ ρ ( q ( 0 )) e − ( 1 − γ ) t ∀ t ≥ 0 . In particular, if q ( 0 ) ∈ Q c f g q(0) \in Q_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg then q ( t ) ∈ Q c f g ∀ t ≥ 0 q(t) \in Q_{\mathrm{cfg}}\ \forall\ t \ge0 q ( t ) ∈ Q cfg ∀ t ≥ 0 , and Q c f g Q_{\mathrm{cfg}} Q cfg is exponentially attracting with basin containing the open neighbourhood { q : ρ ( q ) < ϵ 0 } \{q : \rho(q) < \epsilon_0\} { q : ρ ( q ) < ϵ 0 } . (Proof in Appendix § 11 .§ 6 )
Proof.
Solutions of Eq. (45) are by definition absolutely continuous functions of time satisfying q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t) \in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) for almost every t t t .
Such solutions exist because G ‾ \overline{G} G is upper semicontinuous with nonempty compact convex values, Λ \Lambda Λ is nonempty, compact and upper semicontinuous by Lemma 1 and the barycentre map preserves these properties.
By Lemma 11, for every q q q with ρ ( q ) < ϵ 0 \rho(q) < \epsilon_0 ρ ( q ) < ϵ 0 each v ∈ G ‾ ( q ) v \in\overline{G}(q) v ∈ G ( q ) has the form v = z − q v = z - q v = z − q with z ∈ C γ ρ ( q ) z \in C_{\gamma\rho(q)} z ∈ C γ ρ ( q ) .
By Lemma 5(iii), ρ ( z ) ≤ γ ρ ( q ) \rho(z) \le\gamma\rho(q) ρ ( z ) ≤ γ ρ ( q ) .
The hypothesis of Lemma 7 therefore holds with C = Q c f g C = Q_{\mathrm{cfg}} C = Q cfg , θ = γ \theta= \gamma θ = γ and R = ϵ 0 R = \epsilon_0 R = ϵ 0 . Since ρ ( q ( 0 ) ) < ϵ 0 \rho(q(0)) < \epsilon_0 ρ ( q ( 0 )) < ϵ 0 , applying Lemma 7, yielding:
ρ ( q ( t ) ) ≤ ρ ( q ( 0 ) ) e − ( 1 − γ ) t ∀ t ≥ 0. (48) \rho(q(t)) \le\rho(q(0))e^{-(1-\gamma)t}\quad\forall\ t \ge0. \tag*{(48)} ρ ( q ( t )) ≤ ρ ( q ( 0 )) e − ( 1 − γ ) t ∀ t ≥ 0. (48)
If q ( 0 ) ∈ Q c f g q(0) \in Q_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg then ρ ( q ( 0 ) ) = 0 \rho(q(0)) = 0 ρ ( q ( 0 )) = 0 , so ρ ≡ 0 \rho\equiv0 ρ ≡ 0 and q ( t ) ∈ Q c f g ∀ t q(t) \in Q_{\mathrm{cfg}}\ \forall\ t q ( t ) ∈ Q cfg ∀ t by Lemma 5(iii). The exponential attractivity statement is the bound in Eq. (48) .
The safe configuration set certifies safety
Lemma 12 (Robust invariance of Ω \Omega Ω ). Let q ∈ Q c f g q \in Q_{\mathrm{cfg}} q ∈ Q cfg . Then (i) inf s ∈ Ω V π q ϕ ( s ) ≥ 0 \inf_{s \in\Omega} V^\phi_{\pi_q}(s) \ge0 inf s ∈ Ω V π q ϕ ( s ) ≥ 0 ; and (ii) for every s 0 ∈ Ω s_0 \in\Omega s 0 ∈ Ω and every disturbance sequence in D \mathcal{D} D , the state trajectory generated by μ q \mu_q μ q satisfies P ( s t ∈ Ω ∀ t ≥ 0 ) = 1 \mathbb{P}(s_t \in\Omega\ \forall\ t \ge0) = 1 P ( s t ∈ Ω ∀ t ≥ 0 ) = 1 .
Proof. We will first prove Part(i) below.
The fixed point Q π q ϕ Q_{\pi_q}^{\phi} Q π q ϕ of the safety Bellman operator T π q ϕ \mathcal{T}_{\pi_q}^{\phi} T π q ϕ satisfies T π q ϕ [ Q π q ϕ ] − Q π q ϕ = 0 ∈ Ψ ( q , Q π q ϕ ) \mathcal{T}_{\pi_q}^{\phi}[Q_{\pi_q}^{\phi}]-Q_{\pi_q}^{\phi}=0\in\Psi(q,Q_{\pi_q}^{\phi}) T π q ϕ [ Q π q ϕ ] − Q π q ϕ = 0 ∈ Ψ ( q , Q π q ϕ ) by Eq. (11) .
So Q π q ϕ Q_{\pi_q}^{\phi} Q π q ϕ is an equilibrium of the frozen inclusion. Therefore, by the second consequence of Eq. (11) , Q π q ϕ ∈ Λ ( q ) Q_{\pi_q}^{\phi}\in\Lambda(q) Q π q ϕ ∈ Λ ( q ) .
Now, applying Corollary 2, gives us Q π q ϕ ( x ) ≥ 0 ∀ x ∈ I Q_{\pi_q}^{\phi}(x)\ge0\ \forall x\in\mathcal{I} Q π q ϕ ( x ) ≥ 0 ∀ x ∈ I .
By Lemma 8, μ q ( s ) ∈ A Ω ( s ) \mu_q(s)\in A^{\Omega}(s) μ q ( s ) ∈ A Ω ( s ) and therefore ( s , μ q ( s ) , ν q ( s , μ q ( s ) ) ) ∈ I ∀ ν q ( s , μ q ( s ) ) ∈ D (s,\mu_q(s),\nu_q(s,\mu_q(s)))\in\mathcal{I}\ \forall\nu_q(s,\mu_q(s))\in\mathcal{D} ( s , μ q ( s ) , ν q ( s , μ q ( s ))) ∈ I ∀ ν q ( s , μ q ( s )) ∈ D .
Noting that μ q \mu_q μ q and ν q \nu_q ν q are deterministic, the maximum and minimum in the definition of the safety value function is over singletons, giving us
V π q ϕ = max a ∈ A μ q ( s ) Ω min d ∈ ν q ( s , μ q ( s ) ) Q π q ϕ ( s , a , d ) = Q π q ϕ ( s , μ q ( s ) , ν q ( s , μ q ( s ) ) ) ≥ 0 V_{\pi_q}^{\phi}=\max_{a\in A^{\Omega}_{\mu_q(s)}}\min_{d\in\nu_q(s,\mu_q(s))}Q_{\pi_q}^{\phi}(s,a,d)=Q_{\pi_q}^{\phi}(s,\mu_q(s),\nu_q(s,\mu_q(s)))\ge0 V π q ϕ = a ∈ A μ q ( s ) Ω max d ∈ ν q ( s , μ q ( s )) min Q π q ϕ ( s , a , d ) = Q π q ϕ ( s , μ q ( s ) , ν q ( s , μ q ( s ))) ≥ 0
As the above reasoning holds ∀ s ∈ Ω \forall s\in\Omega ∀ s ∈ Ω , taking infimum over Ω \Omega Ω , yields, inf s ∈ Ω V π q ϕ ≥ 0 \inf_{s\in\Omega}V_{\pi_q}^{\phi}\ge0 inf s ∈ Ω V π q ϕ ≥ 0 .
We will next prove Part(ii). Let E t : = { s t ∈ Ω } E_t:=\{s_t\in\Omega\} E t := { s t ∈ Ω } . We show P ( E t ) = 1 \mathbb{P}(E_t)=1 P ( E t ) = 1 for every t t t by induction.
P ( E 0 ) = 1 \mathbb{P}(E_0)=1 P ( E 0 ) = 1 by hypothesis.
Suppose P ( E t ) = 1 \mathbb{P}(E_t)=1 P ( E t ) = 1 . On E t E_t E t , Lemma 8 gives μ q ( s t ) ∈ A Ω ( s t ) \mu_q(s_t)\in A^{\Omega}(s_t) μ q ( s t ) ∈ A Ω ( s t ) , so by the definition of A Ω A^{\Omega} A Ω , P ( s t + 1 ∈ Ω ∣ s t , μ q ( s t ) , d ) = 1 ∀ d ∈ D \mathbb{P}(s_{t+1}\in\Omega\mid s_t,\mu_q(s_t),d)=1\ \forall d\in\mathcal{D} P ( s t + 1 ∈ Ω ∣ s t , μ q ( s t ) , d ) = 1 ∀ d ∈ D ; taking expectations over E t E_t E t yields P ( E t + 1 ) = 1 \mathbb{P}(E_{t+1})=1 P ( E t + 1 ) = 1 , whichever disturbance is applied.
Since the time index is discrete, { s t ∈ Ω ∀ t ≥ 0 } = ⋂ t ≥ 0 E t \{s_t\in\Omega\ \forall t\ge0\}=\bigcap_{t\ge0}E_t { s t ∈ Ω ∀ t ≥ 0 } = ⋂ t ≥ 0 E t is a countable intersection of probability-one events and therefore has probability one.
Corollary 1 (Safety of the induced policy). Let q ( 0 ) ∈ Q c f g q(0)\in Q_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg . Then at every t ≥ 0 t\ge0 t ≥ 0 the induced policy π q ( t ) \pi_{q(t)} π q ( t ) satisfies inf s ∈ Ω V π q ( t ) ϕ ( s ) ≥ 0 \inf_{s\in\Omega}V_{\pi_{q(t)}}^{\phi}(s)\ge0 inf s ∈ Ω V π q ( t ) ϕ ( s ) ≥ 0 from any s 0 ∈ Ω s_0\in\Omega s 0 ∈ Ω , the state trajectory generated by μ q ( t ) \mu_{q(t)} μ q ( t ) remains in Ω \Omega Ω almost surely, for all time and against every disturbance sequence. (Proof in Appendix § 11 .§ 6 )
Proof. From Theorem 3, we get q ( t ) ∈ Q c f g ∀ t ≥ 0 q(t)\in Q_{\mathrm{cfg}}\ \forall t\ge0 q ( t ) ∈ Q cfg ∀ t ≥ 0 because q ( 0 ) ∈ Q c f g q(0)\in Q_{\mathrm{cfg}} q ( 0 ) ∈ Q cfg . Finally, applying Lemma 12 at q = q ( t ) q=q(t) q = q ( t ) , both assertions follow.
Remark 9 (Scope). Corollary 1 concerns the trajectory generated by the policy induced at a given configuration. Safety throughout training would additionally require safe initialization together with a safe exploration mechanism, neither of which is assumed here.
Remark 10 (Intuition for the Geometric Argument). The drift points from the current configuration toward an average of its Bellman images under the critics in Λ ( q ) \Lambda(q) Λ ( q ) , each of which lies closer to Q c f g Q_{\mathrm{cfg}} Q cfg by the factor γ \gamma γ . A step along the drift is therefore a chord from q q q into C γ ρ ( q ) C_{\gamma\rho(q)} C γ ρ ( q ) , and convexity of the distance function converts this into decay of ρ \rho ρ . Forward invariance is thus a statement about convex geometry.
Definition 5 (Optimal safety-constrained task value function). Let Q Ω : = R I = { q : I → R } Q_{\Omega}:=\mathbb{R}^{\mathcal{I}}=\{q:\mathcal{I}\to\mathbb{R}\} Q Ω := R I = { q : I → R } denote the restricted action-value space on the index set I \mathcal{I} I . Define the robust safety-constrained task Bellman operator T Ω : Q Ω → Q Ω \mathcal{T}_{\Omega}:Q_{\Omega}\to Q_{\Omega} T Ω : Q Ω → Q Ω :
T Ω [ q ] ( s , a , d ) = r ( s , a , d ) + γ E [ max a ′ ∈ A Ω ( s ′ ) min d ′ ∈ D q ( s ′ , a ′ , d ′ ) ] , ( s , a , d ) ∈ I (49) \mathcal{T}_{\Omega}[q](s,a,d)=r(s,a,d)+\gamma\mathbb{E}\left[\max_{a'\in A^{\Omega}(s')}\min_{d'\in\mathcal{D}}q(s',a',d')\right],\qquad(s,a,d)\in\mathcal{I} \tag*{(49)} T Ω [ q ] ( s , a , d ) = r ( s , a , d ) + γ E [ a ′ ∈ A Ω ( s ′ ) max d ′ ∈ D min q ( s ′ , a ′ , d ′ ) ] , ( s , a , d ) ∈ I (49)
Note that since A Ω ( s ) ≠ ∅ A^{\Omega}(s)\ne\varnothing A Ω ( s ) = ∅ for s ∈ Ω s\in\Omega s ∈ Ω , by contraction, T Ω [ ⋅ ] \mathcal{T}_{\Omega}[\cdot] T Ω [ ⋅ ] has a unique fixed point Q Ω ∗ = T Ω Q Ω ∗ Q_{\Omega}^{*}=\mathcal{T}_{\Omega}Q_{\Omega}^{*} Q Ω ∗ = T Ω Q Ω ∗ and thus, the optimal safety-constrained task value function is given by V Ω ∗ ( s ) = V_{\Omega}^{*}(s)= V Ω ∗ ( s ) = max a ∈ A Ω ( s ) min d ∈ D Q Ω ∗ ( s , a , d ) \max_{a \in A^\Omega(s)} \min_{d \in D} Q_\Omega^*(s,a,d) max a ∈ A Ω ( s ) min d ∈ D Q Ω ∗ ( s , a , d ) , which is the maximum expected return that a safe policy can accrue by keeping the agent in Ω \Omega Ω . Moreover, let Q ∗ : = { q ∈ Q c f g : q ∣ I = Q Ω ∗ } Q^* := \{q \in Q_{\mathrm{cfg}} : q|_{\mathcal{I}} = Q_\Omega^*\} Q ∗ := { q ∈ Q cfg : q ∣ I = Q Ω ∗ } . Thus, every q ∈ Q ∗ ⊆ Q q \in Q^* \subseteq Q q ∈ Q ∗ ⊆ Q corresponds to a policy that is safe and attains the maximal possible return among all safe policies.
Let Q π ϕ , 1 Q_\pi^{\phi,1} Q π ϕ , 1 denote the safety critic obtained by scaling the margin g ( ⋅ ) g(\cdot) g ( ⋅ ) by K = 1 K=1 K = 1 . By homogeneity, Q π ϕ : = Q π ϕ , K = K Q π ϕ , 1 Q_\pi^\phi:= Q_\pi^{\phi,K} = KQ_\pi^{\phi,1} Q π ϕ := Q π ϕ , K = K Q π ϕ , 1 . Next, let δ Ω : = inf q ∈ Q c f g min π ∈ Π ( q ) min s ∈ Ω V π ϕ , 1 ( s ) > 0 \delta_\Omega:= \inf_{q \in Q_{\mathrm{cfg}}} \min_{\pi\in\Pi(q)} \min_{s \in\Omega} V_\pi^{\phi,1}(s) > 0 δ Ω := inf q ∈ Q cfg min π ∈ Π ( q ) min s ∈ Ω V π ϕ , 1 ( s ) > 0 represent the lowest safety value (represents the closest a safe policy ever comes to ∂ Ω \partial\Omega ∂ Ω ).
Theorem 4 (Convergence to optimal safety-constrained task performance). Let the sufficient margin scale K ∗ K^* K ∗ be defined as K ∗ : = R max + V ‾ δ Ω = ( 2 − γ ) R max ( 1 − γ ) δ Ω K^* := \frac{R_{\max}+\overline{V}}{\delta_\Omega} = \frac{(2-\gamma)R_{\max}}{(1-\gamma)\delta_\Omega} K ∗ := δ Ω R m a x + V = ( 1 − γ ) δ Ω ( 2 − γ ) R m a x , with V ‾ : = R max 1 − γ \overline{V} := \frac{R_{\max}}{1-\gamma} V := 1 − γ R m a x . Let U ⊂ { q : ρ ( q ) < ϵ 0 } U \subset\{q : \rho(q) < \epsilon_0\} U ⊂ { q : ρ ( q ) < ϵ 0 } . Then, under Theorems 2–3, almost surely bounded iterates ( Y n , Q n ) (Y_n,Q_n) ( Y n , Q n ) and K ≥ K ∗ ≥ K ‾ K \ge K^* \ge\overline{K} K ≥ K ∗ ≥ K , δ Ω > 0 \delta_\Omega> 0 δ Ω > 0 , every internally chain-transitive set of the averaged slow-timescale differential inclusion contained in Q c f g Q_{\mathrm{cfg}} Q cfg is a subset of Q ∗ Q^* Q ∗ : U ⊆ Q ∗ : = { q ∈ Q c f g : q ∣ I = Q Ω ∗ } U \subseteq Q^* := \{q \in Q_{\mathrm{cfg}} : q|_{\mathcal{I}} = Q_\Omega^*\} U ⊆ Q ∗ := { q ∈ Q cfg : q ∣ I = Q Ω ∗ } , and thus, dist ( Q n , Q ∗ ) → 0 \operatorname{dist}(Q_n,Q^*) \to0 dist ( Q n , Q ∗ ) → 0 almost surely. Moreover, on U U U the averaged slow-timescale residual on kernel-preserving coordinates I \mathcal{I} I is given by G ‾ ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } \overline{G}(q)|_{\mathcal{I}} = \{T_\Omega[q|_{\mathcal{I}}] - q|_{\mathcal{I}}\} G ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } . Thus, every corresponding limiting controller attains the optimal task value V Ω ∗ V_\Omega^* V Ω ∗ on Ω \Omega Ω while selecting only kernel-preserving actions. (Proof in Appendix B.7).
Proof. For any q 0 ∈ U q_0 \in U q 0 ∈ U , since U U U is compact and U ⊆ { q : ρ ( q ) < ϵ 0 } U \subseteq\{q : \rho(q) < \epsilon_0\} U ⊆ { q : ρ ( q ) < ϵ 0 } , applying Theorem 3 yields U ⊆ Q c f g U \subseteq Q_{\mathrm{cfg}} U ⊆ Q cfg . Then, U ⊆ Q c f g U \subseteq Q_{\mathrm{cfg}} U ⊆ Q cfg is a compact invariant set of the averaged slow-timescale differential inclusion q ˙ ( t ) ∈ G ‾ ( q ( t ) ) \dot{q}(t) \in\overline{G}(q(t)) q ˙ ( t ) ∈ G ( q ( t )) . We will first prove that U ⊆ Q ∗ U \subseteq Q^* U ⊆ Q ∗ .
By definition of δ Ω \delta_\Omega δ Ω , for every q ∈ Q c f g q \in Q_{\mathrm{cfg}} q ∈ Q cfg , every π ∈ Π ( q ) \pi\in\Pi(q) π ∈ Π ( q ) , and every s ∈ Ω s \in\Omega s ∈ Ω , we have V π ϕ , 1 ( s ) ≥ δ Ω V_\pi^{\phi,1}(s) \ge\delta_\Omega V π ϕ , 1 ( s ) ≥ δ Ω , and thus, g ( s ) ≥ δ Ω g(s) \ge\delta_\Omega g ( s ) ≥ δ Ω for s ∈ Ω s \in\Omega s ∈ Ω . We will now show that every y ∈ Λ ( q ) y \in\Lambda(q) y ∈ Λ ( q ) satisfies y ( x i ) ≥ K δ Ω y(x_i) \ge K\delta_\Omega y ( x i ) ≥ K δ Ω for x i ∈ I x_i \in\mathcal{I} x i ∈ I .
Define ζ ( y ) : = max x i ∈ I ( K δ Ω − y ( x i ) ) + \zeta(y) := \max_{x_i \in\mathcal{I}}(K\delta_\Omega-y(x_i))^+ ζ ( y ) := max x i ∈ I ( K δ Ω − y ( x i ) ) + which, by definition gives y ( x i ) ≥ K δ Ω − ζ ( y ) y(x_i) \ge K\delta_\Omega-\zeta(y) y ( x i ) ≥ K δ Ω − ζ ( y ) . Next, note that, since x i = ( s , a , d ) ∈ I x_i=(s,a,d) \in\mathcal{I} x i = ( s , a , d ) ∈ I , by definition, s ∈ Ω s \in\Omega s ∈ Ω , and a ∈ A Ω ( s ) a \in A^\Omega(s) a ∈ A Ω ( s ) , which implies that P ( s ′ ∈ Ω ∣ s , a , d ) = 1 P(s' \in\Omega\mid s,a,d)=1 P ( s ′ ∈ Ω ∣ s , a , d ) = 1 . Thus, almost surely, E [ y ( s ′ , π ( s ′ ) ) ] ≥ K δ Ω − ζ ( y ) \mathbb{E}[y(s',\pi(s'))] \ge K\delta_\Omega-\zeta(y) E [ y ( s ′ , π ( s ′ ))] ≥ K δ Ω − ζ ( y ) . Applying the above facts to the safety Bellman operator yields:
T π ϕ [ y ] ( x i ) = ( 1 − γ ) K g ( s ) + γ min { K g ( s ) , E [ y ( s ′ , π ( s ′ ) ) ] } (50) T_\pi^\phi[y](x_i) = (1-\gamma)Kg(s) + \gamma\min\{Kg(s),\mathbb{E}[y(s',\pi(s'))]\} \tag*{(50)} T π ϕ [ y ] ( x i ) = ( 1 − γ ) K g ( s ) + γ min { K g ( s ) , E [ y ( s ′ , π ( s ′ ))]} (50)
≥ ( 1 − γ ) K g ( s ) + γ ( K δ Ω − ζ ( y ) ) (51) \ge(1-\gamma)Kg(s) + \gamma(K\delta_\Omega-\zeta(y)) \tag*{(51)} ≥ ( 1 − γ ) K g ( s ) + γ ( K δ Ω − ζ ( y )) (51)
= K δ Ω − γ ζ ( y ) (52) = K\delta_\Omega-\gamma\zeta(y) \tag*{(52)} = K δ Ω − γ ζ ( y ) (52)
Since this holds for all policies π ∈ Π ( q ) \pi\in\Pi(q) π ∈ Π ( q ) , every convex combination has the same lower bound. Next, under Assumption 2, the induced limiting fast timescale dynamics is given by y ˙ ( x i ) = T π ϕ [ y ] ( x i ) − y ( x i ) \dot{y}(x_i)=T_\pi^\phi[y](x_i)-y(x_i) y ˙ ( x i ) = T π ϕ [ y ] ( x i ) − y ( x i ) . Plugging the above result yields y ˙ ( x i ) ≥ ( 1 − γ ) ζ ( y ) \dot{y}(x_i)\ge(1-\gamma)\zeta(y) y ˙ ( x i ) ≥ ( 1 − γ ) ζ ( y ) . Next, let E ( t ) : = { x i ∈ I : x i = arg max x i ∈ I { K δ Ω − y ( x i ) ( t ) } + } E(t):=\{x_i\in\mathcal{I}:x_i=\operatorname*{arg\,max}_{x_i\in\mathcal{I}}\{K\delta_\Omega-y(x_i)(t)\}^+\} E ( t ) := { x i ∈ I : x i = arg max x i ∈ I { K δ Ω − y ( x i ) ( t ) } + } . On these coordinates, the upper Dini derivative satisfies:
D + ζ ( y ( t ) ) ≤ max i ∈ E ( t ) D + ( K δ Ω − y ( x i ) ( t ) ) + (53) \mathbb{D}^+\zeta(y(t)) \le\max_{i \in E(t)} \mathbb{D}^+(K\delta_\Omega-y(x_i)(t))^+ \tag*{(53)} D + ζ ( y ( t )) ≤ i ∈ E ( t ) max D + ( K δ Ω − y ( x i ) ( t ) ) + (53)
≤ − ( 1 − γ ) ζ ( y ( t ) ) (54) \le-(1-\gamma)\zeta(y(t)) \tag*{(54)} ≤ − ( 1 − γ ) ζ ( y ( t )) (54)
∴ ζ ( y ( t ) ) ≤ e − ( 1 − γ ) ( t − s ) ζ ( y ( s ) ) , t ≥ s (By Gr o ¨ nwall) (55) \therefore\ \zeta(y(t)) \le e^{-(1-\gamma)(t-s)}\zeta(y(s)),\quad t \ge s \qquad\text{(By Grönwall)} \tag*{(55)} ∴ ζ ( y ( t )) ≤ e − ( 1 − γ ) ( t − s ) ζ ( y ( s )) , t ≥ s (By Gr o ¨ nwall) (55)
For contradiction, assume ζ ( y ( 0 ) ) > 0 \zeta(y(0))>0 ζ ( y ( 0 )) > 0 , which yields ζ ( y ( s ) ) ≥ e ( 1 − γ ) ( 0 − s ) ζ ( y ( 0 ) ) \zeta(y(s)) \ge e^{(1-\gamma)(0-s)}\zeta(y(0)) ζ ( y ( s )) ≥ e ( 1 − γ ) ( 0 − s ) ζ ( y ( 0 )) . As s → − ∞ s\to-\infty s → − ∞ (since s < t s<t s < t ), ζ ( y ( s ) ) → ∞ \zeta(y(s))\to\infty ζ ( y ( s )) → ∞ which is a contradiction, since y ( ⋅ ) y(\cdot) y ( ⋅ ) is bounded, and thus, ζ ( y ( ⋅ ) ) \zeta(y(\cdot)) ζ ( y ( ⋅ )) must also be bounded. Thus, ζ ( y ( 0 ) ) = 0 \zeta(y(0))=0 ζ ( y ( 0 )) = 0 , and since y ( 0 ) y(0) y ( 0 ) is an arbitrary point of Λ ( q ) \Lambda(q) Λ ( q ) , we must have y ( x i ) ≥ K δ Ω y(x_i)\ge K\delta_\Omega y ( x i ) ≥ K δ Ω , for all x i ∈ I x_i\in\mathcal{I} x i ∈ I and for all y ∈ Λ ( q ) y\in\Lambda(q) y ∈ Λ ( q ) .
Next, let V ‾ : = R max 1 − γ \overline{V}:=\frac{R_{\max}}{1-\gamma} V := 1 − γ R m a x be the maximum task return possible. For a quasi-static q ∈ U q\in U q ∈ U , y ∈ Λ ( q ) y\in\Lambda(q) y ∈ Λ ( q ) and x i = ( s , a , d ) ∈ I x_i=(s,a,d)\in\mathcal{I} x i = ( s , a , d ) ∈ I , since K ∗ ≥ K K^*\ge K K ∗ ≥ K , we have:
K g ( s ) ≥ K δ Ω ≥ R max + V ‾ ≥ R max ≥ r ( x i ) (56) Kg(s) \ge K\delta_\Omega\ge R_{\max}+\overline{V} \ge R_{\max} \ge r(x_i) \tag*{(56)} K g ( s ) ≥ K δ Ω ≥ R m a x + V ≥ R m a x ≥ r ( x i ) (56)
which implies that the safety truncation is inactive. Moreover, we showed above that y ( x i ) ≥ K δ Ω y(x_i)\ge K\delta_\Omega y ( x i ) ≥ K δ Ω , and thus, the joint Bellman operator of (31) reduces to:
T y [ q ] ( x i ) = r ( x i ) + γ E [ V q ( s ′ ) ] (57) T_y[q](x_i)=r(x_i)+\gamma\mathbb{E}[V_q(s')] \tag*{(57)} T y [ q ] ( x i ) = r ( x i ) + γ E [ V q ( s ′ )] (57)
Since a ∈ A Ω ( s ) a \in A^{\Omega}(s) a ∈ A Ω ( s ) , s ′ ∈ Ω s' \in\Omega s ′ ∈ Ω almost surely; moreover, since q ∈ Q c f g q \in Q_{\mathrm{cfg}} q ∈ Q cfg implies that every maximin greedy controller action at s ′ ∈ Ω s' \in\Omega s ′ ∈ Ω is kernel preserving, we have:
V q ( s ′ ) = max a ∈ A Ω ( s ) min d ′ ∈ D q ( s ′ , a ′ , d ′ ) (58) V_q(s') = \max_{a \in A^{\Omega}(s)} \min_{d' \in D} q(s',a',d') \tag*{(58)} V q ( s ′ ) = a ∈ A Ω ( s ) max d ′ ∈ D min q ( s ′ , a ′ , d ′ ) (58)
thus, yielding Eq. 14. Consequently, with q = q ∣ I q = q|_{\mathcal{I}} q = q ∣ I , we have:
G ( y , q ) ∣ I = T Ω [ q ] − q ∀ y ∈ Λ ( q ) (59) G(y,q)|_{\mathcal{I}} = T_{\Omega}[q] - q \qquad\forall y \in\Lambda(q) \tag*{(59)} G ( y , q ) ∣ I = T Ω [ q ] − q ∀ y ∈ Λ ( q ) (59)
Averaging over any P ∈ D ( q ) \mathbb{P} \in\mathcal{D}(q) P ∈ D ( q ) yields:
G ‾ ( q ) ∣ I = { T ‾ Ω [ q ∣ I ] − q ∣ I } , q ∈ U (60) \overline{G}(q)|_{\mathcal{I}} = \left\{\overline{T}_{\Omega}[q|_{\mathcal{I}}] - q|_{\mathcal{I}}\right\}, \qquad q \in\mathcal{U} \tag*{(60)} G ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } , q ∈ U (60)
Next, note that the operator T Ω T_{\Omega} T Ω is a γ \gamma γ -contraction in the supremum norm:
∥ T Ω [ q ] − T Ω [ q ′ ] ∥ ∞ ≤ γ ∥ q − q ′ ∥ ∞ (61) \|T_{\Omega}[q] - T_{\Omega}[q']\|_{\infty} \leq\gamma\|q-q'\|_{\infty} \tag*{(61)} ∥ T Ω [ q ] − T Ω [ q ′ ] ∥ ∞ ≤ γ ∥ q − q ′ ∥ ∞ (61)
and thus, possesses a unique fixed point Q Ω ∗ Q_{\Omega}^{*} Q Ω ∗ . Moreover, let q ( ⋅ ) q(\cdot) q ( ⋅ ) be any complete solution contained in U \mathcal{U} U . Let q ( t ) : = q ( t ) ∣ I q(t) := q(t)|_{\mathcal{I}} q ( t ) := q ( t ) ∣ I . Then, by Eq. (60) , q ˙ ( t ) = T Ω [ q ( t ) ] − q ( t ) \dot{q}(t) = T_{\Omega}[q(t)] - q(t) q ˙ ( t ) = T Ω [ q ( t )] − q ( t ) . Now, since T Ω [ Q Ω ∗ ] = Q Ω ∗ T_{\Omega}[Q_{\Omega}^{*}] = Q_{\Omega}^{*} T Ω [ Q Ω ∗ ] = Q Ω ∗ , its contraction yields:
D + ∥ q ( t ) − Q Ω ∗ ∥ ∞ ≤ − ( 1 − γ ) ∥ q ( t ) − Q Ω ∗ ∥ ∞ (62) \mathbb{D}^{+}\|q(t)-Q_{\Omega}^{*}\|_{\infty} \leq-(1-\gamma)\|q(t)-Q_{\Omega}^{*}\|_{\infty} \tag*{(62)} D + ∥ q ( t ) − Q Ω ∗ ∥ ∞ ≤ − ( 1 − γ ) ∥ q ( t ) − Q Ω ∗ ∥ ∞ (62)
If q ( 0 ) ≠ Q Ω ∗ q(0) \ne Q_{\Omega}^{*} q ( 0 ) = Q Ω ∗ , then by Grönwall:
∥ q ( 0 ) − Q Ω ∗ ∥ ∞ ≤ e − ( 1 − γ ) ( 0 − s ) ∥ q ( s ) − Q Ω ∗ ∥ ∞ , s < t = 0 (63) \|q(0)-Q_{\Omega}^{*}\|_{\infty} \leq e^{-(1-\gamma)(0-s)}\|q(s)-Q_{\Omega}^{*}\|_{\infty}, \qquad s<t=0 \tag*{(63)} ∥ q ( 0 ) − Q Ω ∗ ∥ ∞ ≤ e − ( 1 − γ ) ( 0 − s ) ∥ q ( s ) − Q Ω ∗ ∥ ∞ , s < t = 0 (63)
which contradicts the compactness of U \mathcal{U} U . Thus, q ∣ I = Q Ω ∗ q|_{\mathcal{I}} = Q_{\Omega}^{*} q ∣ I = Q Ω ∗ for all q ∈ U q \in\mathcal{U} q ∈ U . Moreover, since U ⊆ Q c f g \mathcal{U} \subseteq Q_{\mathrm{cfg}} U ⊆ Q cfg , we have
U ⊆ { q ∈ Q c f g : q ∣ I = Q Ω ∗ } = Q ∗ (64) \mathcal{U} \subseteq\{q \in Q_{\mathrm{cfg}} : q|_{\mathcal{I}} = Q_{\Omega}^{*}\} = Q^{*} \tag*{(64)} U ⊆ { q ∈ Q cfg : q ∣ I = Q Ω ∗ } = Q ∗ (64)
Finally, by Theorem 2, the slow-timescale continuous affine interpolation Q ‾ ( ⋅ ) \overline{Q}(\cdot) Q ( ⋅ ) has a nonempty compact invariant internally chain-transitive ω \omega ω -limit set. Moreover, by Theorem 3, this limit set lies in Q c f g Q_{\mathrm{cfg}} Q cfg . Hence, by the previous argument, we have almost surely ω ( Q ‾ ) ⊆ Q ∗ \omega(\overline{Q}) \subseteq Q^{*} ω ( Q ) ⊆ Q ∗ . Since the iterates { Q n } \{Q_n\} { Q n } are almost surely bounded, and Q ∗ Q^{*} Q ∗ is closed, every subsequential limit of { Q n } \{Q_n\} { Q n } belongs to Q ∗ Q^{*} Q ∗ . Hence,
dist ( Q n , Q ∗ ) → 0 a.s. (65) \operatorname{dist}(Q_n,Q^{*}) \to0 \qquad\text{a.s.} \tag*{(65)} dist ( Q n , Q ∗ ) → 0 a.s. (65)
Thus, every corresponding limiting controller attains the optimal task value V Ω ∗ V_{\Omega}^{*} V Ω ∗ on Ω \Omega Ω while selecting only kernel-preserving actions.
Intuitively, the sufficient margin scale K ∗ K^{*} K ∗ scales the safety critic just enough (i.e., based on δ Ω \delta_{\Omega} δ Ω ) to ensure that the safety truncation is never active (as illustrated in Figure 1 ). Consequently, if δ Ω → 0 \delta_{\Omega} \to0 δ Ω → 0 , i.e., if the safe policy approaches ∂ Ω \partial\Omega ∂ Ω arbitrarily closely, then K ∗ → ∞ K^{*} \to\infty K ∗ → ∞ . If δ Ω = 0 \delta_{\Omega} = 0 δ Ω = 0 , Theorem 4 no longer guarantees convergence to the optimal safety-constrained task value for any finite K K K ; we can characterize the resulting finite-K K K conservatism as follows. Let Γ Ω \Gamma_{\Omega} Γ Ω be the set of kernel-preserving controller policies, and for ζ ≥ 0 \zeta\geq0 ζ ≥ 0 , define:
Γ Ω , ζ : = { μ ∈ Γ Ω : inf ν inf s ∈ Ω V μ , ν ϕ , 1 ( s ) ≥ ζ } \Gamma_{\Omega,\zeta} := \left\{\mu\in\Gamma_{\Omega} : \inf_{\nu}\inf_{s \in\Omega} V_{\mu,\nu}^{\phi,1}(s) \geq\zeta\right\} Γ Ω , ζ := { μ ∈ Γ Ω : ν inf s ∈ Ω inf V μ , ν ϕ , 1 ( s ) ≥ ζ }
V Ω , ζ ∗ ( s ) : = sup μ ∈ Γ Ω , ζ inf ν V μ , ν ψ ( s ) (66) V_{\Omega,\zeta}^{*}(s) := \sup_{\mu\in\Gamma_{\Omega,\zeta}}\inf_{\nu} V_{\mu,\nu}^{\psi}(s) \tag*{(66)} V Ω , ζ ∗ ( s ) := μ ∈ Γ Ω , ζ sup ν inf V μ , ν ψ ( s ) (66)
Let Δ m a r g ( ζ ) : = ∥ V Ω ∗ − V Ω , ζ ∗ ∥ ∞ \Delta_{\mathrm{marg}}(\zeta) := \|V_{\Omega}^{*} - V_{\Omega,\zeta}^{*}\|_{\infty} Δ marg ( ζ ) := ∥ V Ω ∗ − V Ω , ζ ∗ ∥ ∞ , and let V K ∗ V_{K}^{*} V K ∗ denote the optimal joint value of Eq. (3) over kernel-preserving controllers, for some finite K ≥ K ‾ K \geq\overline{K} K ≥ K .
Theorem 5 (Finite-K K K characterization). Define ζ K : = R max + V ‾ K = ( 2 − γ ) R max ( 1 − γ ) K \zeta_K := \frac{R_{\max}+\overline{V}}{K} = \frac{(2-\gamma)R_{\max}}{(1-\gamma)K} ζ K := K R m a x + V = ( 1 − γ ) K ( 2 − γ ) R m a x . Assume there exists ζ ‾ \overline{\zeta} ζ such that Γ Ω , ζ K ≠ ∅ \Gamma_{\Omega,\zeta_K} \ne\varnothing Γ Ω , ζ K = ∅ for all 0 < ζ K < ζ ‾ 0 < \zeta_K < \overline{\zeta} 0 < ζ K < ζ (sufficiently large K K K ). Then, 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ Δ m a r g ( ζ K ) 0 \leq V_{\Omega}^{*}(s) - V_{K}^{*}(s) \leq\Delta_{\mathrm{marg}}(\zeta_K) 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ Δ marg ( ζ K ) for s ∈ Ω s \in\Omega s ∈ Ω . Hence, if Δ m a r g ( ζ ) → 0 \Delta_{\mathrm{marg}}(\zeta) \to0 Δ marg ( ζ ) → 0 as ζ ↓ 0 \zeta\downarrow0 ζ ↓ 0 , then V K ∗ → V Ω ∗ V_{K}^{*} \to V_{\Omega}^{*} V K ∗ → V Ω ∗ as K ∗ → ∞ K^{*} \to\infty K ∗ → ∞ . (Proof in Appendix B.7).
Proof. For a given policy π = ( μ , ν ) \pi= (\mu,\nu) π = ( μ , ν ) , let V μ , ν K , ϕ , 1 V_{\mu,\nu}^{K,\phi,1} V μ , ν K , ϕ , 1 denote the unique fixed point of the finite-K K K joint Bellman equation of Eq. 6, written as:
T V μ , ν ϕ , 1 K [ v ] ( s ) = ( 1 − γ ) min { r μ , ν ( s ) , K g ( s ) } + γ min { r μ , ν ( s ) + E [ v ( s ′ ) ] , K V μ , ν ϕ , 1 ( s ) } (67) T_{V_{\mu,\nu}^{\phi,1}}^{K}[v](s) = (1-\gamma)\min\{r_{\mu,\nu}(s),Kg(s)\} + \gamma\min\{r_{\mu,\nu}(s)+\mathbb{E}[v(s')],KV_{\mu,\nu}^{\phi,1}(s)\} \tag*{(67)} T V μ , ν ϕ , 1 K [ v ] ( s ) = ( 1 − γ ) min { r μ , ν ( s ) , K g ( s )} + γ min { r μ , ν ( s ) + E [ v ( s ′ )] , K V μ , ν ϕ , 1 ( s )} (67)
Define V K ∗ ( s ) : = sup μ ∈ Γ Ω inf ν V μ , ν K ( s ) V_{K}^{*}(s) := \sup_{\mu\in\Gamma_{\Omega}}\inf_{\nu}V_{\mu,\nu}^{K}(s) V K ∗ ( s ) := sup μ ∈ Γ Ω inf ν V μ , ν K ( s ) . Then, we have the following:
Let T μ , ν ψ [ v ] ( s ) : = r μ , ν ( s ) + γ E [ v ( s ′ ) ] T_{\mu,\nu}^{\psi}[v](s) := r_{\mu,\nu}(s) + \gamma\mathbb{E}[v(s')] T μ , ν ψ [ v ] ( s ) := r μ , ν ( s ) + γ E [ v ( s ′ )] be the task Bellman operator of Eq. (1) . Note that by definition of min { ⋅ } \min\{\cdot\} min { ⋅ } , we have T μ , ν ψ [ v ] ≤ T μ , ν ψ [ v ] T_{\mu,\nu}^{\psi}[v] \leq T_{\mu,\nu}^{\psi}[v] T μ , ν ψ [ v ] ≤ T μ , ν ψ [ v ] ; taking inf ν \inf_{\nu} inf ν and sup μ ∈ Γ Ω \sup_{\mu\in\Gamma_{\Omega}} sup μ ∈ Γ Ω on both sides yield:
V K ∗ ( s ) ≤ sup μ ∈ Γ Ω inf ν V μ , ν ψ ( s ) = V Ω ∗ ( s ) . (68) V_K^*(s) \leq\sup_{\mu\in\Gamma_{\Omega}}\inf_{\nu}V_{\mu,\nu}^{\psi}(s)=V_{\Omega}^*(s). \tag*{(68)} V K ∗ ( s ) ≤ μ ∈ Γ Ω sup ν inf V μ , ν ψ ( s ) = V Ω ∗ ( s ) . (68)
Thus, finite-K K K truncation can only decrease the task return obtained by the agent.
Next, define:
K ∗ : = R max + V ‾ δ Ω = ( 2 − γ ) R max ( 1 − γ ) δ Ω , V ‾ : = R max 1 − γ (69) K^* := \frac{R_{\max}+\overline{V}}{\delta_{\Omega}}=\frac{(2-\gamma)R_{\max}}{(1-\gamma)\delta_{\Omega}},\qquad\overline{V}:=\frac{R_{\max}}{1-\gamma} \tag*{(69)} K ∗ := δ Ω R m a x + V = ( 1 − γ ) δ Ω ( 2 − γ ) R m a x , V := 1 − γ R m a x (69)
Next, note that, for μ ζ K ∈ Γ Ω , ζ K \mu_{\zeta_K}\in\Gamma_{\Omega,\zeta_K} μ ζ K ∈ Γ Ω , ζ K , V μ ζ K , ν K = V μ ζ K , ν ψ V_{\mu_{\zeta_K},\nu}^K=V_{\mu_{\zeta_K},\nu}^{\psi} V μ ζ K , ν K = V μ ζ K , ν ψ i.e., if the controller μ \mu μ is uniformly "ζ K \zeta_K ζ K units" away from ∂ Ω \partial\Omega ∂ Ω , scaling by K K K prevents safety truncation to be active. This argument follows analogously from Eq. (69) and Eq. (56) . Then, the following holds:
V K ∗ ( s ) = sup μ ∈ Γ Ω inf ν V μ , ν K ( s ) (70) V_K^*(s)=\sup_{\mu\in\Gamma_{\Omega}}\inf_{\nu}V_{\mu,\nu}^K(s) \tag*{(70)} V K ∗ ( s ) = μ ∈ Γ Ω sup ν inf V μ , ν K ( s ) (70)
≥ sup μ ∈ Γ Ω , ζ K inf ν V μ , ν K ( s ) (finite- K suboptimality) (71) \geq\sup_{\mu\in\Gamma_{\Omega,\zeta_K}}\inf_{\nu}V_{\mu,\nu}^K(s)\quad\text{(finite-}K\text{ suboptimality)} \tag*{(71)} ≥ μ ∈ Γ Ω , ζ K sup ν inf V μ , ν K ( s ) (finite- K suboptimality) (71)
= sup μ ∈ Γ Ω , ζ K inf ν V μ ζ K , ν ψ ( s ) (72) =\sup_{\mu\in\Gamma_{\Omega,\zeta_K}}\inf_{\nu}V_{\mu_{\zeta_K},\nu}^{\psi}(s) \tag*{(72)} = μ ∈ Γ Ω , ζ K sup ν inf V μ ζ K , ν ψ ( s ) (72)
= V Ω , ζ K ∗ ( s ) (73) =V_{\Omega,\zeta_K}^*(s) \tag*{(73)} = V Ω , ζ K ∗ ( s ) (73)
Combining the above inequalities, we have:
V Ω , ζ K ∗ ( s ) ≤ V K ∗ ( s ) ≤ V Ω ∗ ( s ) (74) V_{\Omega,\zeta_K}^*(s)\leq V_K^*(s)\leq V_{\Omega}^*(s) \tag*{(74)} V Ω , ζ K ∗ ( s ) ≤ V K ∗ ( s ) ≤ V Ω ∗ ( s ) (74)
⟹ 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ V Ω ∗ − V Ω , ζ K ∗ ( s ) (75) \Longrightarrow\quad0\leq V_{\Omega}^*(s)-V_K^*(s)\leq V_{\Omega}^*-V_{\Omega,\zeta_K}^*(s) \tag*{(75)} ⟹ 0 ≤ V Ω ∗ ( s ) − V K ∗ ( s ) ≤ V Ω ∗ − V Ω , ζ K ∗ ( s ) (75)
≤ Δ m a r g ( ζ K ) (76) \leq\Delta_{\mathrm{marg}}(\zeta_K) \tag*{(76)} ≤ Δ marg ( ζ K ) (76)
Finally, as K → ∞ K\to\infty K → ∞ , ζ K = R max + V ‾ K → 0 \zeta_K=\frac{R_{\max}+\overline{V}}{K}\to0 ζ K = K R m a x + V → 0 , and thus, if Δ m a r g ( ζ ) → 0 \Delta_{\mathrm{marg}}(\zeta)\to0 Δ marg ( ζ ) → 0 as ζ ↓ 0 \zeta\downarrow0 ζ ↓ 0 , then:
∥ V Ω ∗ − V K ∗ ∥ ∞ ≤ Δ m a r g ( ζ K ) → 0 ⟹ V K ∗ → V Ω ∗ uniformly on Ω (77) \lVert V_{\Omega}^*-V_K^*\rVert_{\infty}\leq\Delta_{\mathrm{marg}}(\zeta_K)\to0\quad\Longrightarrow\quad V_K^*\to V_{\Omega}^*\quad\text{uniformly on }\Omega \tag*{(77)} ∥ V Ω ∗ − V K ∗ ∥ ∞ ≤ Δ marg ( ζ K ) → 0 ⟹ V K ∗ → V Ω ∗ uniformly on Ω (77)
To characterize G ‾ ( ⋅ ) \overline{G}(\cdot) G ( ⋅ ) in this regime, consider the following analysis. For some q ∈ Q c f g q\in\mathcal{Q}_{\mathrm{cfg}} q ∈ Q cfg , let q = q ∣ I q=q|_{\mathcal{I}} q = q ∣ I with x i = ( s , a , d ) ∈ I x_i=(s,a,d)\in\mathcal{I} x i = ( s , a , d ) ∈ I . Since q ∈ Q c f g q\in\mathcal{Q}_{\mathrm{cfg}} q ∈ Q cfg , we have T Ω [ q ] ( x i ) = r ( x i ) + γ E [ V q ( s ′ ) ] T_{\Omega}[q](x_i)=r(x_i)+\gamma\mathbb{E}[V_q(s')] T Ω [ q ] ( x i ) = r ( x i ) + γ E [ V q ( s ′ )] . Then, using the property min { a , b } = a − [ a − b ] + \min\{a,b\}=a-[a-b]^+ min { a , b } = a − [ a − b ] + , we have:
T y [ q ] ( x i ) = ( 1 − γ ) min { r ( x i ) , K g ( s ) } + γ min { r ( x i ) + E [ V q ( s ′ ) ] , y ( x i ) } (78) T_y[q](x_i)=(1-\gamma)\min\{r(x_i),Kg(s)\}+\gamma\min\{r(x_i)+\mathbb{E}[V_q(s')],y(x_i)\} \tag*{(78)} T y [ q ] ( x i ) = ( 1 − γ ) min { r ( x i ) , K g ( s )} + γ min { r ( x i ) + E [ V q ( s ′ )] , y ( x i )} (78)
= T Ω [ q ] ( x i ) − ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + − γ [ r ( x i ) + E [ V q ( s ′ ) ] − y ( x i ) ] + (79) =T_{\Omega}[q](x_i)-(1-\gamma)[r(x_i)-Kg(s)]^+-\gamma[r(x_i)+\mathbb{E}[V_q(s')]-y(x_i)]^+ \tag*{(79)} = T Ω [ q ] ( x i ) − ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + − γ [ r ( x i ) + E [ V q ( s ′ )] − y ( x i ) ] + (79)
Hence, the slow-timescale Bellman residual is given by:
G K ( y , q ) ∣ I = T Ω [ q ] − q − e K ( y , q ) (80) G_K(y,q)|_{\mathcal{I}}=T_{\Omega}[q]-q-e_K(y,q) \tag*{(80)} G K ( y , q ) ∣ I = T Ω [ q ] − q − e K ( y , q ) (80)
where,
e K ( y , q ) : = ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + + γ [ r ( x i ) + E [ V q ( s ′ ) ] − y ( x i ) ] + (81) e_K(y,q):=(1-\gamma)[r(x_i)-Kg(s)]^++\gamma[r(x_i)+\mathbb{E}[V_q(s')]-y(x_i)]^+ \tag*{(81)} e K ( y , q ) := ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + + γ [ r ( x i ) + E [ V q ( s ′ )] − y ( x i ) ] + (81)
Averaging over an admissible occupation measure yields:
G ‾ K ( q ) ∣ I = { T Ω [ q ] − q − e K P ( q ) : P ∈ D K ( q ) } (82) \overline{G}_K(q)|_{\mathcal{I}}=\left\{T_{\Omega}[q]-q-e_K^{\mathbb{P}}(q):\mathbb{P}\in\mathcal{D}_K(q)\right\} \tag*{(82)} G K ( q ) ∣ I = { T Ω [ q ] − q − e K P ( q ) : P ∈ D K ( q ) } (82)
with
e K P ( q ) : = ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + + γ ∫ Λ K ( q ) [ r ( x i ) + E [ V q ( s ′ ) ] − y ( x i ) ] + P ( d y ) (83) e_K^{\mathbb{P}}(q):=(1-\gamma)[r(x_i)-Kg(s)]^++\gamma\int_{\Lambda_K(q)}[r(x_i)+\mathbb{E}[V_q(s')]-y(x_i)]^+\,\mathbb{P}(dy) \tag*{(83)} e K P ( q ) := ( 1 − γ ) [ r ( x i ) − K g ( s ) ] + + γ ∫ Λ K ( q ) [ r ( x i ) + E [ V q ( s ′ )] − y ( x i ) ] + P ( d y ) (83)
Note that when δ Ω > 0 \delta_{\Omega}>0 δ Ω > 0 i.e., when K ≥ K ∗ K\geq K^* K ≥ K ∗ , we have y ( x i ) ≥ r ( x i ) + E [ V q ( s ′ ) ] y(x_i)\geq r(x_i)+\mathbb{E}[V_q(s')] y ( x i ) ≥ r ( x i ) + E [ V q ( s ′ )] with K g ( s ) ≥ r ( x i ) Kg(s)\geq r(x_i) K g ( s ) ≥ r ( x i ) , yielding e K ( y , q ) = e K P ( q ) = 0 e_K(y,q)=e_K^{\mathbb{P}}(q)=0 e K ( y , q ) = e K P ( q ) = 0 , resulting in G ‾ ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } \overline{G}(q)|_{\mathcal{I}}=\{T_{\Omega}[q|_{\mathcal{I}}]-q|_{\mathcal{I}}\} G ( q ) ∣ I = { T Ω [ q ∣ I ] − q ∣ I } .
Extension to Asynchronous settings
In this section, we discuss how our proposed framework extends to asynchronous coordinate updates using the asynchronous stochastic-approximation construction of (Perkins & Leslie, 2013). Let E Q \mathcal{E}_Q E Q and E Y \mathcal{E}_Y E Y denote the finite coordinate sets of joint and safety critics; at iteration n n n , only subsets E n Q ⊆ E Q E_n^Q \subseteq\mathcal{E}_Q E n Q ⊆ E Q and E n Y ⊆ E Y E_n^Y \subseteq\mathcal{E}_Y E n Y ⊆ E Y need to be updated. For each coordinate x ∈ S × A × D x \in\mathcal{S} \times\mathcal{A} \times\mathcal{D} x ∈ S × A × D , let:
N n Q ( x ) : = ∑ k = 1 n 1 { x ∈ E k Q } , N n Y ( x ) : = ∑ k = 1 n 1 { x ∈ E k Y } (84) N_n^Q(x) := \sum_{k=1}^{n} \mathbf{1}_{\{x \in E_k^Q\}}, \qquad N_n^Y(x) := \sum_{k=1}^{n} \mathbf{1}_{\{x \in E_k^Y\}} \tag*{(84)} N n Q ( x ) := k = 1 ∑ n 1 { x ∈ E k Q } , N n Y ( x ) := k = 1 ∑ n 1 { x ∈ E k Y } (84)
be its local update counters, with corresponding local step sizes α N n Q ( x ) \alpha_{N_n^Q(x)} α N n Q ( x ) and β N n Y ( x ) \beta_{N_n^Y(x)} β N n Y ( x ) respectively. We assume the standard asynchronous regularity conditions of (Perkins & Leslie, 2013):
update process is recurrent so that every coordinate gets a uniformly asymptotic fraction of updates,
the local step-size sequences satisfy the required regularity and noise conditions,
the effective two-timescale separation is preserved.
Then, there exists ϵ Q , ϵ Y > 0 \epsilon_Q, \epsilon_Y > 0 ϵ Q , ϵ Y > 0 such that the effective relative update rates belong to:
M ϵ m : = { M = diag ( λ 1 , … , λ m ) : λ i ∈ [ ϵ Q , 1 ] } \mathcal{M}_{\epsilon}^{m} := \{M = \operatorname{diag}(\lambda_1,\ldots,\lambda_m) : \lambda_i \in[\epsilon_Q,1]\} M ϵ m := { M = diag ( λ 1 , … , λ m ) : λ i ∈ [ ϵ Q , 1 ]}
with ϵ = ϵ Q \epsilon= \epsilon_Q ϵ = ϵ Q or ϵ Y \epsilon_Y ϵ Y (64)
Consequently, the limiting mean fields get premultiplied by positive diagonal rescaling matrices. In particular, for a quasi-static q q q , the fast-timescale differential inclusion becomes:
y ˙ ( t ) ∈ M ϵ Y ∣ E Y ∣ Ψ ( q , y ( t ) ) : = { M h π : M ∈ M ϵ Y ∣ E Y ∣ , h π ( y ( t ) ) ∈ Ψ ( q , y ( t ) ) } (85) \dot{y}(t) \in\mathcal{M}_{\epsilon_Y}^{|\mathcal{E}_Y|}\Psi(q,y(t)) := \left\{Mh_\pi: M \in\mathcal{M}_{\epsilon_Y}^{|\mathcal{E}_Y|},\ h_\pi(y(t)) \in\Psi(q,y(t))\right\} \tag*{(85)} y ˙ ( t ) ∈ M ϵ Y ∣ E Y ∣ Ψ ( q , y ( t )) := { M h π : M ∈ M ϵ Y ∣ E Y ∣ , h π ( y ( t )) ∈ Ψ ( q , y ( t )) } (85)
and its globally attracting set replaces Λ ( q ) \Lambda(q) Λ ( q ) in the two-timescale analysis. The corresponding slow-timescale limiting field is obtained analogously by averaging the diagonally rescaled Bellman residual over the admissible occupation measures.
Note that this rescaling (due to asynchronity) does not alter any qualitative conclusions made in the synchronous setting. As every diagonal entry is positive, the coordinatewise inequalities retain their sign, with only their contraction rates being reduced at most by the corresponding ϵ Q , ϵ Y \epsilon_Q,\epsilon_Y ϵ Q , ϵ Y factors. For instance, Eq. 41b and Eq. (62) become:
D + ζ ( y ( t ) ) ≤ − ϵ Y ( 1 − γ ) ζ ( y ( t ) ) , D + ∥ q ( t ) − Q Ω ∗ ∥ ∞ ≤ − ϵ Q ( 1 − γ ) ∥ q ( t ) − Q Ω ∗ ∥ ∞ (86) \mathsf{D}^{+}\zeta(y(t)) \leq-\epsilon_Y(1-\gamma)\zeta(y(t)), \qquad\mathsf{D}^{+}\lVert q(t)-Q_\Omega^*\rVert_\infty\leq-\epsilon_Q(1-\gamma)\lVert q(t)-Q_\Omega^*\rVert_\infty \tag*{(86)} D + ζ ( y ( t )) ≤ − ϵ Y ( 1 − γ ) ζ ( y ( t )) , D + ∥ q ( t ) − Q Ω ∗ ∥ ∞ ≤ − ϵ Q ( 1 − γ ) ∥ q ( t ) − Q Ω ∗ ∥ ∞ (86)
Hence, the asynchronous extension preserves the limiting safety and optimality results; only the effective convergence rates alter.
Additional Experimental Details and Results
In this section, we provide more details of § 7 , where we choose to answer the following questions: (1) Does the proposed two-timescale learning framework achieve stable convergence on continuous-control tasks with TD bootstrapping via deep neural approximations? (2) How does our joint policy perform against well-established CMDP-based Safe RL benchmarks, particularly concerning its ability to achieve near-zero violations during evaluation without sacrificing task performance? (3) How does the set of safe states under the joint policy dynamically expand during the learning process?
While our theoretical analysis establishes that the joint policy corresponding to the exact fixed point of Y ∗ = Q π Ω ∗ ∗ Y^* = Q_{\pi_{\Omega}^{*}}^* Y ∗ = Q π Ω ∗ ∗ , Q ∗ = T Y ∗ Q ∗ Q^* = \mathcal{T}_{Y^*}Q^* Q ∗ = T Y ∗ Q ∗ hard-guarantees safety and optimal safety-constrained task performance within the safe set, computing it using exact Dynamic Programming solutions is seldom feasible for high-dimensional continuous state spaces; hence, to scale our framework, we adopt techniques from deep RL to obtain neural approximations to our joint value function and policy. In particular, we closely follow the ISAACS framework (Hsu et al., 2023) with gradient descent-ascent finite timescale separation ( τ \tau τ -GDA) [20 ] (between the adversarial disturbance and controller), built on the Soft Actor-Critic algorithm (Haarnoja et al., 2018), and call it JointSAC.
Low-dimensional Tabular Experiment
In this subsection, we consider a low-dimensional dynamical system, namely the double integrator , and provide exact computation of the Joint Value function using tabular Dynamic Programming.
Double-integrator System: We consider a deterministic double integrator with state z = ( x , v ) z=(x,v) z = ( x , v ) and control a a a :
v + = v + Δ t a x + = x + Δ t v + ∣ a ∣ ≤ 1. (87) v^{+}=v+\Delta t\,a \qquad x^{+}=x+\Delta t\,v^{+} \qquad|a|\leq1. \tag*{(87)} v + = v + Δ t a x + = x + Δ t v + ∣ a ∣ ≤ 1. (87)
The safety margin is defined as g ( x , v ) = 1 − ∣ x ∣ g(x,v)=1-|x| g ( x , v ) = 1 − ∣ x ∣ , so the system must remain in ∣ x ∣ < 1 |x|<1 ∣ x ∣ < 1 . The state domain is given by the box x ∈ [ − 2.5 , 2.5 ] x\in[-2.5,2.5] x ∈ [ − 2.5 , 2.5 ] , v ∈ [ − 3 , 3 ] v\in[-3,3] v ∈ [ − 3 , 3 ] . The system is rewarded for moving to x g = 1.2 x_g=1.2 x g = 1.2 , with the reward signal:
r ( x , v , a ) = exp ( − ∣ x − x g ∣ 2 σ x 2 − v 2 σ v 2 − λ a ∣ a ∣ 2 ) ∈ ( 0 , 1 ] , (88) r(x,v,a)=\exp\left(-\frac{|x-x_g|^2}{\sigma_x^2}-\frac{v^2}{\sigma_v^2}-\lambda_a|a|^2\right)\in(0,1], \tag*{(88)} r ( x , v , a ) = exp ( − σ x 2 ∣ x − x g ∣ 2 − σ v 2 v 2 − λ a ∣ a ∣ 2 ) ∈ ( 0 , 1 ] , (88)
where σ x = 0.8 \sigma_x=0.8 σ x = 0.8 , σ v = 1.0 \sigma_v=1.0 σ v = 1.0 indicate the bump width of the reward signal over x g = 1.2 x_g=1.2 x g = 1.2 , v g = 0 v_g=0 v g = 0 respectively, and λ a = 1.0 \lambda_a=1.0 λ a = 1.0 denotes the cost on control effort. Thus, the task encourages exiting the right boundary, while safety requires braking early enough to remain inside ∣ x ∣ < 1 |x|<1 ∣ x ∣ < 1 .
Discretization: We use Δ x = 0.01 \Delta x=0.01 Δ x = 0.01 , Δ v = 0.05 \Delta v=0.05 Δ v = 0.05 , Δ a = 0.25 \Delta a=0.25 Δ a = 0.25 , and Δ t = 0.2 \Delta t=0.2 Δ t = 0.2 , yielding 60,379 states and 9 actions. All value functions and policies are computed by full tabular dynamic programming to numerical convergence, with no neural network approximations.
Safe set Ω \Omega Ω and admissible actions: A Ω ( z ) A_{\Omega}(z) A Ω ( z ) : For reference, the continuous-time safe set of the disturbance-free double integrator is
Ω c t = { ( x , v ) : ∣ x ∣ ≤ 1 , ∣ x + v ∣ v ∣ 2 ∣ ≤ 1 } . (89) \Omega_{\mathrm{ct}}=\left\{(x,v): |x|\leq1,\ \left|x+\frac{v|v|}{2}\right|\leq1\right\}. \tag*{(89)} Ω ct = { ( x , v ) : ∣ x ∣ ≤ 1 , x + 2 v ∣ v ∣ ≤ 1 } . (89)
The experiment itself uses the exact kernel Ω h \Omega_h Ω h of the discretized dynamics. It is computed by finite backward reachability:
S 0 = { z : g ( z ) > 0 } , S k + 1 = S k ∩ { z : ∃ a ∈ A , f h ( z , a ) ∈ S k } . (90) S_0=\{z:g(z)>0\},\qquad S_{k+1}=S_k\cap\{z:\exists a\in A,\ f_h(z,a)\in S_k\}. \tag*{(90)} S 0 = { z : g ( z ) > 0 } , S k + 1 = S k ∩ { z : ∃ a ∈ A , f h ( z , a ) ∈ S k } . (90)
Because the state space is finite, this sequence terminates at its greatest fixed point Ω h \Omega_h Ω h . The admissible action set is then
A Ω h ( z ) = { a ∈ A : f h ( z , a ) ∈ Ω h } , (91) A_{\Omega_h}(z)=\{a\in A:f_h(z,a)\in\Omega_h\}, \tag*{(91)} A Ω h ( z ) = { a ∈ A : f h ( z , a ) ∈ Ω h } , (91)
which is nonempty for every z ∈ Ω h z\in\Omega_h z ∈ Ω h by construction.
Decoupled baselines: We independently compute an unconstrained task critic Q t a s k Q_{\mathrm{task}} Q task and a task-oblivious optimal safety critic Q s a f e ∗ Q_{\mathrm{safe}}^{*} Q safe ∗ . We compare against three runtime compositions:
A “hard mask ”:
μ m a s k ( z ) ∈ arg max a : Q s a f e ∗ ( z , a ) ≥ 0 Q t a s k ( z , a ) . (92) \mu_{\mathrm{mask}}(z)\in\underset{a:Q_{\mathrm{safe}}^{*}(z,a)\geq0}{\arg\max}\ Q_{\mathrm{task}}(z,a). \tag*{(92)} μ mask ( z ) ∈ a : Q safe ∗ ( z , a ) ≥ 0 arg max Q task ( z , a ) . (92)
We verify exhaustively that
{ a : Q s a f e ∗ ( z , a ) ≥ 0 } = A Ω h ( z ) (93) \{a:Q_{\mathrm{safe}}^{*}(z,a)\geq0\}=A_{\Omega_h}(z) \tag*{(93)} { a : Q safe ∗ ( z , a ) ≥ 0 } = A Ω h ( z ) (93)
for every viable state-action pair. Hence, any performance difference is caused by the ranking of admissible actions, not by an inaccurate safety critic or a mismatched feasible set.
A least-restrictive filter, which executes the unconstrained greedy action when it is admissible and otherwise switches to arg max a Q s a f e ∗ ( z , a ) \arg\max_a Q_{\mathrm{safe}}^{*}(z,a) arg max a Q safe ∗ ( z , a ) .
A nearest-safe-action, Q-CBF-style projection, which selects the admissible action closest to the unconstrained greedy action.
The oracle value Q ∗ Q^{*} Q ∗ is obtained by directly running value iteration, restricted to A Ω h ( z ) A_{\Omega_h}(z) A Ω h ( z ) (unlike the hard mask, where Q t a s k Q_{\mathrm{task}} Q task is first obtained).
Computation of the joint value: On the fast timescale (inner loop), we compute Eq. (5) in the paper for a given joint value function (and its joint policy π Q k \pi_{Q_k} π Q k ) until convergence, and on the slow timescale (outer loop), we compute Eq. (6) in the paper, given the previously converged safety critic Y k Y_k Y k . This implements the two-timescale separation corresponding to α n / β n → 0 \alpha_n/\beta_n \to0 α n / β n → 0 .
The following table provides optimality gap characterization (mean, median, max, and violations) for each method, where the optimality gap is defined as
Δ = V Ω h ∗ − V m e t h o d ( z ) (94) \Delta= V_{\Omega_h}^{*} - V^{\mathrm{method}}(z) \tag*{(94)} Δ = V Ω h ∗ − V method ( z ) (94)
Table 1 (PDF p. 38).
We see that an exact runtime composition of independently computed reward and safety critics is already near-optimal. Our joint framework recovers the viability-restricted optimum at a large margin scale (K K K ). The improvement over the hard mask and the least-restrictive filter is likely due to propagating the policy-conditioned safety truncation backward through the Bellman updates; earlier actions are ranked according to their safety-constrained evaluation (conditional on overcoming finite-K K K conservatism).
Safe Set Expansion
Since the safety value function V π ϕ V^\phi_\pi V π ϕ evaluates the reward-maximizing joint policy π \pi π , in theory, the safe set { s : V ϕ ( s ) > 0 } \{s : V^\phi(s) > 0\} { s : V ϕ ( s ) > 0 } expands in the direction of maximum task return, before asymptotically reaching the maximal safe set. We demonstrate this on InvertedPendulum-v4, rewarding positive cart velocity within ± 0.8 m \pm0.8\mathrm{m} ± 0.8 m limits. Thus, the agent slides towards the positive x x x -limit, after which it stays there, balancing the pole. The safe set expansion towards 0.8 m 0.8\mathrm{m} 0.8 m during training is illustrated in Figure 3 .
Figure 3. Safe set expands initially in the direction of high rewards during training (InvertedPendulum-v4 rewarded for positive cart velocity), before converging to the maximal safe set. Constraint boundary (red dotted line) and 0-level set of safety critic (black line) are visualized.
Continuous Control Experimental Setup
We evaluate our proposed framework across a suite of high-dimensional continuous control tasks implemented in the MuJoCo simulator Todorov et al. (2012), utilizing environments from both Gymnasium Towers et al. (2026) and Safety-Gymnasium Ji et al. (2023). The primary objective in all tasks is to maximize returns while strictly satisfying safety constraints at all times.
Simulation Tasks We consider three locomotion environments from Gymnasium MuJoCo suite Towers et al. (2026) and eight single agent environments from the SafeVelocity suite from Safety-Gymnasium Ji et al. (2023).
Gymnasium (Liveness constraints): Here, safety is implicitly defined by the environment’s liveness bounds , which mandate postural stability to avoid premature episode termination
while moving forward. To rigorously test the safety guarantees of our formulation, we augment the environment with a physical adversary . The adversary applies continuous bounded disturbances directly to the agent’s torso. Thus, while the controller attempts to safely maximize forward locomotion, the adversary actively seeks to destabilize the agent and prematurely terminate the episode.
SafeVelocity (Conflicting Objectives): To evaluate our framework under explicitly conflicting reward-cost signals, we utilize the SafeVelocity suite of SafetyGymnasium. Here, agents receive monotonically increasing rewards for forward velocity, but incur safety violations if they exceed a predefined safety limit . As with standard Gymnasium tasks, we subject these agents to adversarial torso disturbances, causing the agent to either prematurely terminate (violating liveness bounds) or push the agent over the speed limits.
Baselines We compare our method against a safety filter baseline (least-restrictive safety filter) and three well-established CMDP baselines. We specifically select these CMDP baselines, as they represent the two dominant paradigms of model-free Safe RL: Lagrangian dual-descent and trust-region projections :
Safety Filters (LRSF): Safety filters ([22 ] (Hsu et al. 2024)) serve as the standard Hamilton-Jacobi-reachability-based baseline, where a task-oblivious safety value function (often termed a “safety critic”) is learned for an entire operational design domain (ODD), where the constraint set (and hence its complement, the failure set) is often encoded by a margin function. Given any safety-oblivious task policy, one can query for the safety of its actions (by querying the safety-action value function). If the action is deemed unsafe, only then does the filter intervene by choosing a greedy action w.r.t. the safety-action value function. Hence, this style of intervention is called least-restrictive (LR-safety filters).
Projection-based Constrained Policy Optimization (PCPO): PCPO ((Yang et al., 2020)) serves as the standard projection-based baseline, employing a two-step trust region framework. It first optimizes the reward advantage function subject to a Kullback-Leibler (KL) divergence constraint, ignoring safety entirely. In the second step, it explicitly projects this intermediate policy onto a feasible safe set. To preserve task performance, this projection minimizes either an L 2 L^2 L 2 norm or a KL-divergence distance penalty with a second-order Taylor expansion.
PPO-Lagrangian (PPOLag): Ray et al. (2019); Ji et al. (2024) combine the Lagrangian multiplier approach with Proximal Policy Optimization (PPO) to obtain PPOLag. It enforces safety bounds using dynamic penalty coefficients, solving the equivalent min-max optimization problem via alternating gradient ascent on the reward objective and dual gradient descent on the constraint violation costs.
SAC-Lagrangian (SACLag): This baseline (SACLag) (Ray et al., 2019; Ji et al., 2024) is conceptually identical to PPOLag, but replaces the underlying architecture with Soft-Actor Critic (Haarnoja et al., 2018).
Robust Adversarial Integration: To incorporate adversarial disturbances, we modify all baselines into adversarial zero-sum formulations using the principles of Robust Adversarial RL (Pinto et al., 2017). We introduce a secondary adversarial disturbance ν ( s ′ , a ′ ) \nu(s', a') ν ( s ′ , a ′ ) that can observe the controller’s actions a ′ ∈ μ ( s ′ ) a' \in\mu(s') a ′ ∈ μ ( s ′ ) and injects adversarial bounded perturbations into the environment dynamics. This yields robust versions of all three baselines, where the controller seeks to maximize the dynamic Lagrangian objective (maximize rewards, minimize violation costs), while the adversarial disturbance actively attacks and minimizes it.
Metrics We use cumulative Episodic Return and Episodic Cost tracked across training to evaluate stable convergence. We also use cumulative reward and episode cost as the evaluation metrics. For Lagrangian-based methods, a permissive cost violation threshold of d = 0 d = 0 d = 0 is allowed. We take safety as the primary criterion for evaluations, and pursue higher rewards on the basis of meeting safety requirements.
Compute We train our algorithms on a slurm cluster with a single Nvidia L40, 48GB of VRAM. Each run takes 4 CPU cores. We implement the code in PyTorch, and all experiments take up to 4 days to fully train for 5M timesteps.
Hyperparameters
We choose 5 training seeds: [ 0 , 5 , 10 , 15 , 20 ] [0, 5, 10, 15, 20] [ 0 , 5 , 10 , 15 , 20 ] as the algorithms in SafetyGymnasium have been reported to be stable on these seeds.
We tune the scaling of the margin function β ( g ( s ) ) = K ⋅ g ( s ) \beta(g(s)) = K \cdot g(s) β ( g ( s )) = K ⋅ g ( s ) based on the maximum task return possible for each environment. Additionally, we pick the maximum value of K K K such that there are no safety violations / algorithmic instabilities. Specifically, we choose the following:
Hopper-v4: 800.0
Walker2d-v4: 1200.0
InvertedPendulum-v4: 200.0
SafetyWalker2dVelocity: 1200.0
SafetyHopperVelocity: 800.0
SafetyHalfCheetahVelocity: 1200.0
SafetyAntVelocity: 1200.0
We pick the disturbance magnitude (applied to the torso) that is meaningfully challenging to the agent. Any higher value resulted in high safety violations for all algorithms:
InvertedPendulum-v4: 5.0
Walker2d-v4: 30.0
Hopper2d-v4: 7.5
SafetyWalker2dVelocity: 25.0
SafetyHopperVelocity: 5.0
SafetyHalfCheetahVelocity: 20.0
SafetyAntVelocity: 2.5
For For JointSAC, we use a safety-critic learning rate of 1.0 × 10 − 3 1.0 \times10^{-3} 1.0 × 1 0 − 3 , a joint-critic learning rate of 5 × 10 − 4 5 \times10^{-4} 5 × 1 0 − 4 , a controller actor learning rate of 1 × 10 − 4 1 \times10^{-4} 1 × 1 0 − 4 , a disturbance learning rate of 5 × 10 − 4 5 \times10^{-4} 5 × 1 0 − 4 , and autotune alpha (entropy term) with a learning rate of 5 × 10 − 4 5 \times10^{-4} 5 × 1 0 − 4 . We implement timescale separation through the critic learning rates: the joint critic is updated at half the learning rate of the safety critic, with both critics updated at every step (this led to stable training while completing in reasonable amount of time, requiring around 5M training steps; polyak averaging (τ = 5 × 10 − 3 \tau= 5 \times10^{-3} τ = 5 × 1 0 − 3 ) is used only for the target networks of both critics. Finally, we use different discount factors γ \gamma γ for the joint Bellman equation and γ ~ \tilde{\gamma} γ ~ for the safety Bellman equation; we anneal γ ~ \tilde{\gamma} γ ~ from 0.85 to γ = 0.99 \gamma= 0.99 γ = 0.99 while training progresses, as discussed in Fisac et al. [22 ] .
Margin Scale K K K Variation
We perform an ablation experiment on the variation of episode rewards and cost as K K K increases progressively (in steps of 200, from K = 200 K = 200 K = 200 to K = 2000 K = 2000 K = 2000 ). Results are illustrated in Figure 4 for 4 environments - Hopper, Walker2d (from Gymnasium suite), and SafetyHalfCheetah, SafetyWalker2d (from SafetyGymnasium suite). Training was conducted on 5 seeds, and each training seed was evaluated for 300 unique episodes, totaling 1,500 unique evaluation episodes.
Figure 4. Figure shows variation of episode reward and episode cost as K K K increases from 200 to 2000. While episode reward generally tends to increase with an increase in K K K , scaling beyond a point can introduce training instabilities with neural approximations, as seen with Walker2d environment.
The general trend agrees with our previous discussion in § 4 -§ 6 : scaling K K K generally improves episode reward (as the region Ω ψ \Omega^\psi Ω ψ increases), while safety is generally preserved , with small variations. However, one can also observe that increasing K K K too much may lead to training instabilities (as seen in Walker2d environment).
Additional Results
The training curves for 5 seeds on:
three locomotion tasks from Gymnasium suite incorporating adversarial disturbance is presented in Figure 5
eight single agent environments from SafeVelocity (v0) suite from Safety-Gymnasium incorporating adversarial disturbance is presented in Figure 6
Figure 5. Training performance across 5 seeds (mean ± standard deviation) on three locomotion tasks from Gymnasium suite with adversarial disturbances. The top row indicates episodic returns, while the bottom row indicates episodic costs as training progresses. JointSAC demonstrates stable convergence with near-zero episode costs on two out of three tasks. A single cost violation incurs +1 penalty each timestep.
Figure 6. Training performance across 5 seeds (mean ± standard deviation) on eight single agent environments from SafeVelocity (v0) suite from SafetyGymnasium with adversarial disturbances. The top two rows indicate episodic returns, while the bottom two rows indicate episodic costs as training progresses. JointSAC demonstrates stable convergence with near-zero episode costs.
These results align with the results presented in § 7.2 . Throughout training, JointSAC demonstrates stable convergence to high task rewards, while consistently incurring near-zero episode costs. A single cost violation incurs +1 penalty each timestep. The baseline methods exhibit higher variance, with only a subset of them reliably converging below the permissible cost threshold (d = 0 d = 0 d = 0 ).
For evaluations, we perform 300 rollout evaluations for each of the 5 training seeds (totaling 1, 500 distinct episodes per environment), with results summarized in Table 1. Results indicate that JointSAC maintains near-zero costs across all 11 environments (maximum of 0.03 ± 0.08 on the Hopper-v4 adversarial environment), while the baseline exhibits varied cost violations, occasionally achieving high episode costs for some environments and staying below the permissible cost violation for others. Overall, it is seen that JointSAC yields stable performance while maintaining near-zero violations.