Manuscript Offprint
arXiv:2611.07616Monotone Viability Learning for Offline Safe Reinforcement Learning
ABSTRACT
Offline safe reinforcement learning requires reliable long-horizon safety estimates from fixed data. Learning Hamilton–Jacobi (HJ) viability in this setting calls for semantic preservation, convergence, and numerical stability. To address these challenges, we propose Monotone Viability Learning (MoViL), which learns viable sets from offline transitions through monotone finite-horizon set recursion. The recursion preserves finite-horizon safety semantics and converges to the infinite-horizon viability kernel. Binary supervision maintains a fixed target scale across horizons, avoiding discount-induced numerical attenuation. We further establish sufficient conditions for recovering behavior-supported viable subsets. The learned viability estimates are used to certify actions at deployment. Dubins car experiments validate the numerical accuracy of the learned viable sets. Evaluations on safe RL benchmarks demonstrate state-of-the-art reward–cost performance. MoViL satisfies the average cost constraint on every task and achieves the lowest average cost among the compared methods. These results highlight MoViL's potential to extend long-horizon HJ viability analysis to safety-critical systems where reliable dynamics models are unavailable and online exploration is unsafe.
1 Introduction
Safety is a central requirement for reinforcement learning (RL) in robotics and autonomous systems, where exploratory actions can cause physical damage or irreversible failures [1]. Offline RL learns policies from previously collected data, avoiding additional environment interaction during training [2]. Safe deployment also requires understanding how actions affect future constraint satisfaction. Many safe RL methods impose constraints on expected cumulative costs [3]. These constraints limit cumulative violations but do not directly guarantee safety throughout a trajectory [4]. State-wise safety methods, including those based on control barrier functions, impose explicit conditions for safe operation [5–7]. Safety certification methods assess proposed actions and intervene when necessary during deployment [8, 9]. Learning which states admit persistent safety and which actions preserve safe continuations is therefore an important objective in offline safe RL.
Hamilton–Jacobi (HJ) reachability provides a set-based characterization of persistent safety [10]. Grid-based HJ computation becomes expensive as the state dimension increases [11]. Neural solvers improve the scalability of HJ computation using known system dynamics [12], while RL-based methods enable reachability-related quantities to be learned from sampled transitions [13, 14]. Some discounted formulations achieve contraction by modifying the original reachability semantics [15]. Other HJ formulations preserve exact semantics without establishing a corresponding contractive Bellman formulation [16]. Recent work combines semantic preservation and contraction, with a numerical implementation based on known system dynamics [17]. Neural approximation errors can compromise the reliability of learned safety boundaries [18, 19]. This issue becomes more pronounced when discounting reduces long-horizon value magnitudes, leaving smaller margins for safety classification. Offline viability learning therefore requires a formulation that jointly addresses semantic preservation, convergence, and numerical stability.
*Corresponding author: Z. Zhang (e-mail: zzhang@tsinghua.edu.cn). The authors are both with the Department of Mechanical Engineering, Tsinghua University, Beijing 100084, China.
In this article, we propose Monotone Viability Learning (MoViL) for offline safe reinforcement learning. Building on classical viability-kernel approximation [20], MoViL learns long-horizon viability from offline transitions through monotone finite-horizon set recursion. At each layer, an observed transition provides a positive training example if it is violation-free and its successor belongs to the viable set estimated at the preceding layer. The learned viability information supports action-level certification during deployment, enabling a simple Gaussian behavior-cloning policy to achieve high returns with low costs. Dubins car experiments directly validate the numerical accuracy of MoViL against an independent HJ reference. Experiments on 17 Bullet-Safety-Gym and MetaDrive tasks from DSRL [21] evaluate the resulting policies across robotic control and autonomous driving settings.
The main contributions of this article are summarized as follows:
-
We propose MoViL, which learns HJ viable sets from offline transitions through monotone finite-horizon recursion and uses the resulting estimates to certify policy actions.
-
We prove that the finite-horizon viable sets converge to the infinite-horizon viability kernel. We also establish sufficient conditions for recovering behavior-supported viable subsets from offline data.
-
We evaluate MoViL through numerical experiments and offline safe RL benchmarks. Dubins car experiments validate the accuracy of the learned viable sets. Across 17 offline safe RL tasks, MoViL achieves state-of-the-art reward-cost performance and the lowest average cost.
2.1 Hamilton-Jacobi Reachability and Viability Learning
Hamilton–Jacobi (HJ) reachability characterizes long-term safety through reachable sets and viability kernels [10]. To connect this set-based analysis with RL, prior work has expressed safety objectives through Bellman recursions. Discounted Bellman formulations enable safety and reach-avoid values to be learned from sampled transitions [13, 22]. Akametalu et al. [15] formulated reachability using minimum discounted rewards, yielding a contractive Bellman operator with guaranteed fixed-point convergence. Other formulations focus on retaining a closer connection to classical safety analysis. Control barrier-value functions connect HJ reachability with control barrier functions [16]. Travel-cost formulations derive an RL-compatible fixed point [23], while non-additive Bellman operators combine contraction with preservation of reachability semantics [17].
These developments have enabled reachability quantities to guide safe policy learning. Reachability-constrained RL uses feasible value functions to identify viable regions [24]. RESPO models the probability of future violations in stochastic systems [25], while FISOR learns state and action feasibility from offline data through discounted Bellman updates and reversed expectile regression [14]. These methods make long-horizon feasibility available to policy optimization, but represent it through recursively fitted scalar values. Discounted recursions can cause value magnitudes to decrease as the horizon grows. In some formulations, the threshold used to classify feasible states does not have an exact viability interpretation. Our method addresses these issues by replacing infinite-horizon value fitting with a monotone recursion over finite-horizon viable sets. Binary membership targets retain explicit set semantics and avoid horizon-dependent target decay, while the nested recursion provides a convergent approximation to the infinite-horizon viability kernel.
2.2 Offline Safe Reinforcement Learning
Offline safe reinforcement learning optimizes policies from fixed datasets under safety constraints. Existing methods differ in how they incorporate safety into policy learning and execution. CPQ [26] uses a cost critic to screen actions during policy improvement, whereas COptiDICE [27] optimizes state-action occupancy subject to cost constraints. Sequence models condition action generation on return and cost signals [28, 29]. Generative policies can encode safety information in their latent action spaces [30, 31]. V-OCBF [32] learns a control barrier function and a dynamics model from offline data to formulate a quadratic program for action filtering. During policy learning, explicit safety representations can guide policy extraction [14] or prevent the reward critic from bootstrapping through unsafe transitions [33]. Our method instead uses viability estimates at deployment to certify actions proposed by a separately trained policy.
3 Preliminaries
3.1 Offline Safe Reinforcement Learning
We consider a constrained Markov decision process (CMDP) , where and are the state and action spaces, denotes the transition dynamics, and denote the reward and safety cost, is the initial-state distribution, and is the discount factor. We consider a state space and a nonempty, closed, and bounded action space . For a policy , we define
The safe RL objective considered in this work is
which requires zero safety violation along trajectories since .
In the offline setting, learning is based on a pre-collected dataset
where marks a true terminal transition; time-limit truncations are recorded separately.
Assumption 1 (Successor-state safety cost). We assume that the safety cost of a transition is determined by its successor state. Specifically, there exists such that
3.2 HJ Safety Viability
HJ reachability characterizes persistent safety through the set of states from which safety violations can be avoided indefinitely. We study viability for the discrete-time transition system, with safety evaluated at each sampled state. For a policy , define
and let
The infinite-horizon viability kernel is
4 Proposed Method
The proposed method combines monotone viability learning with action-level certification and policy extraction. State classifiers recursively identify finite-horizon viable regions from offline transitions. The resulting continuation labels supervise an action-conditioned safety estimator. A Gaussian behavior-cloning policy supplies nominal actions, and a cost-based fallback selects among candidate actions when the nominal action fails certification.
4.1 Monotone Viability Formulation
We seek convergence, semantic preservation, and numerical stability in infinite-horizon safety learning. Our approach shifts from fitting an infinite-horizon value function to recursively learning nested finite-horizon viable sets. The recursion preserves finite-horizon safety semantics and admits a monotone convergence analysis, with binary supervision maintaining a horizon-independent target scale.
Under Assumption 1, define the instantaneous safe set as
Classical viability-kernel algorithms use backward set iterations [20, 34]. For a measurable set , its controlled predecessor is

Figure 1: Monotone refinement of finite-horizon viable sets. As the horizon increases, the green sets shrink toward , progressively excluding states without sufficiently long safe continuations. Arrows indicate state transitions.
For deterministic transitions , this condition reduces to . Starting from , we construct
The set contains initially safe states from which an admissible policy can maintain safety almost surely for the next transitions. Along this recursion, (10) is equivalent to . Fig. 1 illustrates this nested refinement toward the infinite-horizon viability kernel.
Theorem 1 (Convergence of monotone viability recursion). Suppose is closed, is nonempty and compact, and is weakly continuous in . Then the recursion in (10) satisfies
Moreover, is the largest controlled invariant subset of and satisfies
Proof. Nesting follows from (10). For closed , weak continuity makes upper semicontinuous. Compactness of then ensures that is closed. Let . For any , the sets
are nonempty, compact, and nested. Hence, an action exists, and continuity of probability from above gives
The correspondence has a closed graph and nonempty compact values on . A measurable selector therefore defines a stationary policy that remains in almost surely [35]. Conversely, every indefinitely safe state belongs to each finite-horizon viable set. The stated assumptions ensure attainment of finite-horizon safety optima, so also implies membership in every . Thus, . Every controlled invariant subset of is contained in all by induction, establishing maximality. Monotonicity of Pre then gives (12).
We next approximate this set recursion from offline transitions.
4.2 Offline Monotone Viability Learning
Let denote the behavior distribution underlying the offline training dataset . State learning uses trajectory-level fitting and calibration splits, denoted by and . Let denote a transition from , and let indicate a positive safety cost or a task-defined physical-failure terminal. Time-limit truncation alone is not a violation. For , define
Under deterministic transitions, is the behavior probability mass of actions reaching without a violation. We initialize and write .
At layer , we freeze the preceding membership function and construct the binary target
Safety targets also use the recorded successor membership at nonviolating terminal or truncated records. The conditional success probability is
Under deterministic transitions, maximizing binary successor feasibility over actions tests whether a feasible action exists. A positive means that feasible actions have positive probability mass under the behavior distribution, giving a behavior-supported counterpart to this existence condition.
In monotone set refinement, erroneous exclusions are irreversible and reduce predecessor continuation support, potentially propagating further exclusions. Falsely retained states remain eligible for removal in later layers. This asymmetry motivates witness protection and a minimum-support threshold.
Recorded trajectories provide additional evidence of safe continuations. Let L denote the number of consecutive violation-free transitions starting from the sampled record within its recorded trajectory. We define
Let consist of recorded states with . The witness sets are nested, . Under deterministic transitions, each observed safe segment establishes finite-horizon viability, giving .
uses the preceding memberships after witness protection. In the recursion above, linked safe records with already have , so the explicit maximum is a redundant label safeguard retained from the implementation. The union in (22) protects memberships against rejection by the newly fitted network.
A state network minimizes the expectile-weighted binary cross-entropy
where .
For a Bernoulli target with success probability p, the population minimizer is
For binary targets, this is also the population minimizer of asymmetric squared expectile loss [36], and . This limit connects high-expectile learning to the identification of positively supported continuations. Let denote the success probability of the witness-corrected target. It equals whenever the safeguard leaves the conditional labels unchanged. For , the optimal network output satisfies
Following the general principle of post-hoc probability calibration [37], we fit a scalar offset by ordinary binary cross-entropy against on . The calibrated probability estimate is
For a minimum positive-label probability , the equivalent network threshold is
controls the fitting emphasis on positive labels; controls threshold-based retention by calibrated positive-label probability. By construction, is equivalent to ; with exact probability recovery, this becomes , independently of .
The membership update combines thresholding with witness protection,
The first layer preserves nesting because . For , gives the same property. Binary membership labels are updated for recorded states and their successors to construct the next layer's training targets. The set inclusions in Theorem 2 apply to the recursively defined sets , while provides a neural approximation of state viability.
Theorem 2 (Behavior-supported viability recovery). Suppose the conditions of Theorem 1 hold and transitions are deterministic. Let be measurable and satisfy
Here, is a uniform lower bound on the behavior probability of a violation-free transition that remains in . Assume that each layer satisfies
for all , where . If , then
Consequently,
If (23) holds with , the limiting learned set equals .
Proof. The claim holds at initialization. Suppose . For ,
so is retained. For , no action enters and no valid -step witness exists. Therefore, and , excluding . Every protected witness belongs to . Induction proves (25). Taking intersections and applying Theorem 1 gives the limiting inclusions.
The lower bound on prevents states with from passing the threshold under bounded overestimation; the upper bound retains the behavior-supported viable subset. The interval is nonempty when .
On fixed validation states held out from fitting and calibration, let be the fraction passing all layer thresholds for . Since is nonincreasing, its range over a window of layers is
The recursion terminates at layer once the minimum layer count is met and this range stays within tolerance for the prescribed number of consecutive windows; otherwise, it stops at the maximum layer count. Fitting losses and witness-protected label retention are monitored as diagnostics.
4.3 Action-Level Safety Certification
After the state recursion terminates at layer , we train two independently initialized action-conditioned networks, and , using the target
The predecessor membership matches the one-step continuation condition used to train the final state layer . Each network minimizes ordinary binary cross-entropy over the offline training transitions,
The action-level safety score is
An action passes certification when , where is the action certification threshold.
The conditional success probability of is
The uncorrected state target averages over behavior actions,
estimates action-specific success probabilities under stochastic transitions; Theorem 2 assumes deterministic transitions.
4.4 Certification-Guided Policy Extraction
We extract a Gaussian behavior-cloning policy from high-return, low-cost trajectories. At execution, the nominal mean action is used if it passes action certification. Otherwise, a cost-based fallback selects the action with the lowest predicted cost from a candidate set containing the nominal action and perturbed actions.
For each training trajectory , define its undiscounted return and cost,
Among trajectories satisfying , we retain the highest-return fraction . Their state-action pairs form the behavior-cloning dataset .
Let denote the componentwise affine map from normalized action coordinates to the environment action bounds. In normalized coordinates, the Gaussian policy is
where is the state-dependent mean and is a learned vector of standard deviations shared across states. Both are trained by minimizing
To construct candidate actions around the policy mean, let and fix Gaussian perturbations across decisions. For , define the candidate actions
The nominal action is the clipped mean mapped to environment coordinates.
The fallback ranks actions using a cost critic , trained with a state-value network on using the common target
Both networks minimize squared error to , using for and s for . Here, is the cost discount factor, and denotes the output of a slowly updated target copy of . The state-value regression averages logged action outcomes at each state, so estimates the cost of taking an action and then following the behavior policy .
Let denote the index selected by the cost critic. The deployed policy is
Algorithm 1 summarizes the offline training procedure and policy execution.
Algorithm 1 Monotone Viability Learning (MoViL)
Require: Offline data , validation states , maximum depth
Offline training
1: Prepare , , and trajectory witnesses; initialize .
2: for do
3: Construct and witness-corrected targets .
4: Train by weighted BCE and calibrate .
5: Update using (22).
6: if the stopping criterion on is met then
7: break
8: end if
9: end for
10: Set to the final recursion depth.
11: Train twin with targets .
12: Construct by trajectory filtering and train Gaussian BC.
13: Train on .
Policy execution at state
14: Compute the nominal action .
15: if then
16: Execute .
17: else
18: Generate candidates using fixed Gaussian perturbations.
19: Execute , where .
20: end if
Table 1: Experimental settings for the Dubins car problem.
| Parameter | Value |
|---|---|
| Offline transitions | 200,000 |
| Maximum trajectory length | 64 |
| HJ reference grid | |
| network | 2 hidden layers, width 192 |
| Activation function | ReLU |
| Optimizer | Adam |
| Learning rate / batch size | |
| 0.995 / 0.1 | |
| Validation / evaluation states | 5,000 / 60,000 |
| Convergence: / tolerance / checks | 8 / 0.005 / 5 |
5 Numerical Validation of Viability Learning
5.1 Experimental Setup
We consider a Dubins car navigating around a circular obstacle, with dynamics
where denotes the position, is the heading, and is the steering control. We set and use a control interval of 0.1. The obstacle is centered at the origin with radius 0.8. A transition is unsafe if its successor state lies inside the obstacle.
We compare our method with FVI [17] and FISOR [14]. FVI applies a non-additive Bellman operator using known system dynamics, whereas FISOR learns feasibility through discounted Bellman updates. FISOR and our method use the same fixed offline dataset, which combines uniformly sampled and near-obstacle initial states with steering actions sampled uniformly or at their bounds. We compute an independent numerical HJ reference using semi-Lagrangian recursion solely for evaluation.
The main experimental settings are summarized in Table 1. We evaluate viable-set approximation against the numerical HJ reference using intersection over union (IoU), false positive rate (FPR), and false negative rate (FNR), treating safe states as the positive class. For evaluation, positions are drawn from an equal mixture of uniform sampling over and annular sampling around the obstacle, with headings sampled uniformly from . States are

Figure 2: Viability approximation on the slice of the Dubins car state space. (a) MoViL (Ours), (b) FVI, and (c) FISOR. Colors represent the learned function values. Solid and dashed lines indicate the numerical HJ reference and predicted viability boundaries, respectively.

Figure 3: Evolution of viability learning at layers k = 1, 2, 4, 8, 20 on the slice. Each panel shows the current-layer prediction and its calibrated threshold. Solid and dashed lines indicate the numerical HJ reference and predicted boundaries, respectively.
classified as safe when for our method, for FVI, or for FISOR. The remaining hyperparameters of FVI and FISOR follow the settings reported in their respective original papers. Quantitative results are reported as the mean and standard deviation over three random seeds. All experiments run on a workstation with an Intel i9-14900KF CPU and an NVIDIA RTX 2080 Ti GPU.
5.2 Viability Learning Results
Table 2 summarizes the viability approximation accuracy and training time of the three methods. Our method achieves the highest IoU and lowest FNR, with a slightly higher FPR than FVI. FVI attains comparable approximation accuracy but requires approximately 65 times as much training time under its original training schedule.
Fig. 2 compares the learned viability functions and predicted boundaries of the three methods with the numerical HJ reference on the slice. Fig. 2(a) shows scores near one in viable regions and near zero in non-viable regions, with a sharp transition across the boundary. This separation reflects the binary viability classification learned by our method. The predicted boundary closely follows the numerical HJ reference. FVI also closely matches the reference boundary (Fig. 2(b)). Its value function preserves reachability semantics through its sign [17]. Exponential discounting in its non-additive Bellman operator causes long-horizon value magnitudes to decay toward zero. The resulting small numerical margins make sign-based decisions sensitive to network fitting errors, posing a challenge as the relevant safety horizon grows. FISOR employs continuous value supervision in its discounted Bellman update, rather than binary safety labels [14]. This method uses the zero-level set of the value function as the feasibility determination boundary, but the zero threshold does not strictly correspond to the boundary of the infinite time-domain feasible region. As shown in Fig. 2(c), FISOR classifies a large portion of feasible regions as infeasible, exhibiting significant conservatism.
Fig. 3 illustrates the refinement of the learned viable set across layers. As the horizon increases, the predicted viable region progressively contracts toward the numerical HJ reference while maintaining a sharp separation between viable and non-viable regions.
Table 2: Viability approximation results on the Dubins car (mean ± standard deviation over three seeds).
| Method | IoU (%) ↑ | FPR (%) ↓ | FNR (%) ↓ | Time (s) ↓ |
|---|---|---|---|---|
| Ours | ||||
| FISOR | ||||
| FVI |

Figure 4: IoU (left) and classification errors (right) across recursion layers on the Dubins car problem. Lines and shading indicate the mean and ±1 standard deviation over three seeds. One run converged at and the other two at . The first run's final values are reused when computing statistics at .
Fig. 4 shows the corresponding IoU and classification errors across recursion layers. The mean IoU exceeds 0.99 at and reaches a high-accuracy plateau around . FPR decreases sharply as the recursion deepens, while FNR remains low throughout. This pattern is consistent with the design of MoViL: most reference-viable states are retained, while states without sufficiently long safe continuations are progressively excluded.
6 Offline Safe Reinforcement Learning Experiments
6.1 Experimental Setup
We evaluate MoViL on eight Bullet-Safety-Gym tasks [38] and nine MetaDrive tasks [39] from the DSRL benchmark [21]. Bullet-Safety-Gym includes four agents (Ball, Car, Drone, and Ant) performing Run and Circle tasks. Run rewards forward motion within a corridor, with safety costs for boundary violations and excessive speed. Circle rewards clockwise motion along a circular track, with costs for leaving the designated safe region. MetaDrive evaluates autonomous driving across three road complexity levels (easy, medium, hard) and three traffic densities (sparse, mean, dense), with costs for collisions and off-road driving. In both task suites, transition safety costs depend only on successor states, satisfying Assumption 1. We report normalized return and normalized cost, with a cost limit of 10 for all tasks. A normalized cost no greater than 1 indicates constraint satisfaction. Results are averaged over three random seeds, with 20 evaluation episodes per seed.
Table 3 lists the key hyperparameters for MoViL. All networks use the listed architecture, and the training budget applies to each head. BC uses cosine learning-rate decay. The remaining shared hyperparameters and hardware configuration follow the Dubins car setup in Section 5.1.
6.2 Baselines
We compare MoViL with six baselines: (1) BCQL: A Lagrangian extension of BCQ [40] for cost-constrained policy optimization. (2) CPQ [26]: A Q-learning method that penalizes unsafe and out-of-distribution actions through conservative cost estimation. (3) CDT [28]: A Decision Transformer conditioned on target returns and costs. (4) FISOR [14]: A feasibility-guided diffusion method based on HJ reachability. (5) LSPC [30]: A policy optimization method with latent safety constraints learned through a conditional variational autoencoder. (6) GSCO [31]: A normalizing-flow method that controls policy distribution shift through geometric constraints in latent space.
Table 3: Key hyperparameters for the offline safe RL experiments.
| Parameter | Value |
|---|---|
| Network architecture | 2 hidden layers, width 256 |
| Batch size | 512 |
| steps: first / later layers | 10,000 / 2,000 |
| Recursion layers: min. / max. | 20 / 100 |
| Convergence-validation states | 4,096 |
| / BC / cost training steps | 10,000 / 20,000 / 100,000 |
| BC cost limit / fraction | 10 / 0.2 |
| Cost discount | 0.95 |
| Certification threshold | 0.99 |
| Action candidates | 10 |
Table 4: Performance comparison on Bullet-Safety-Gym and MetaDrive tasks. ↑ indicates higher is better, and ↓ indicates lower is better. Bold: safe policy; Gray: unsafe policy; Bold blue: best safe policy; Bold: second-best safe policy. Safety is defined by normalized cost , and rankings are based on reward.
| Task | BCQL | CPQ | CDT | FISOR | LSPC | GSCO | MoViL | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| reward ↑ | cost ↓ | reward ↑ | cost ↓ | reward ↑ | cost ↓ | reward ↑ | cost ↓ | reward ↑ | cost ↓ | reward ↑ | cost ↓ | reward ↑ | cost ↓ | |
| Bullet-Safety-Gym | ||||||||||||||
| AntRun | 0.05 | 4.63 | 0.13 | 0.01 | 0.69 | 1.24 | 0.45 | 0.76 | 0.94 | 1.46 | 0.60 | 0.13 | 0.61 | 0.06 |
| BallRun | 0.35 | 0.20 | 0.85 | 13.67 | 0.88 | 0.86 | 0.14 | 0.00 | 0.08 | 0.00 | 0.21 | 0.00 | 0.30 | 0.00 |
| CarRun | 0.75 | 2.51 | 0.75 | 0.52 | 0.99 | 1.47 | 0.80 | 0.00 | 0.75 | 0.22 | 0.84 | 0.00 | 0.95 | 0.00 |
| DroneRun | 0.65 | 0.71 | 0.26 | 0.44 | 0.71 | 0.60 | 0.41 | 0.57 | 0.62 | 1.34 | 0.55 | 0.00 | 0.57 | 0.00 |
| AntCircle | 0.61 | 1.42 | 0.00 | 0.00 | 0.46 | 2.74 | 0.23 | 0.00 | 0.40 | 0.78 | 0.41 | 0.27 | 0.34 | 0.06 |
| BallCircle | 0.79 | 1.20 | 0.40 | 4.37 | 0.79 | 1.64 | 0.45 | 0.00 | 0.29 | 1.83 | 0.42 | 0.00 | 0.59 | 0.01 |
| CarCircle | 0.64 | 1.80 | 0.49 | 4.48 | 0.70 | 1.20 | 0.34 | 0.00 | 0.28 | 0.04 | 0.53 | 0.00 | 0.67 | 0.11 |
| DroneCircle | 0.68 | 1.19 | -0.27 | 1.29 | 0.59 | 1.56 | 0.60 | 0.00 | 0.66 | 1.37 | 0.59 | 0.10 | 0.47 | 0.05 |
| Bullet Avg | 0.57 | 1.71 | 0.33 | 3.10 | 0.73 | 1.41 | 0.43 | 0.17 | 0.50 | 0.88 | 0.52 | 0.07 | 0.56 | 0.04 |
| MetaDrive | ||||||||||||||
| Easysparse | 0.94 | 9.25 | -0.05 | 0.15 | 0.25 | 0.15 | 0.41 | 0.50 | 0.74 | 1.55 | 0.40 | 0.04 | 0.56 | 0.00 |
| Easymean | 0.99 | 7.22 | -0.06 | 0.00 | 0.42 | 0.25 | 0.43 | 0.67 | 0.70 | 0.68 | 0.35 | 0.07 | 0.55 | 0.00 |
| Easydense | 0.20 | 1.76 | -0.06 | 0.16 | 0.35 | 1.17 | 0.52 | 1.26 | 0.74 | 1.48 | 0.35 | 0.02 | 0.55 | 0.02 |
| Mediumsparse | 0.94 | 2.83 | -0.08 | 0.12 | 0.78 | 1.24 | 0.43 | 0.08 | 0.97 | 0.79 | 0.63 | 0.34 | 0.79 | 0.04 |
| Mediummean | 0.70 | 4.45 | -0.07 | 0.16 | 0.72 | 2.74 | 0.36 | 0.02 | 0.92 | 0.89 | 0.71 | 0.54 | 0.81 | 0.07 |
| Mediumdense | 0.76 | 3.90 | -0.08 | 0.10 | 0.70 | 2.62 | 0.51 | 0.39 | 0.87 | 0.88 | 0.36 | 0.04 | 0.76 | 0.05 |
| Hardsparse | 0.49 | 3.16 | -0.05 | 0.10 | 0.26 | 0.46 | 0.33 | 0.24 | 0.52 | 1.32 | 0.30 | 0.01 | 0.41 | 0.04 |
| Hardmean | 0.29 | 3.80 | -0.05 | 0.15 | 0.20 | 0.61 | 0.27 | 0.01 | 0.41 | 0.57 | 0.33 | 0.08 | 0.41 | 0.03 |
| Harddense | 0.42 | 2.95 | -0.04 | 0.12 | 0.22 | 1.38 | 0.30 | 0.26 | 0.53 | 1.63 | 0.36 | 0.19 | 0.36 | 0.05 |
| MetaDrive Avg | 0.64 | 4.37 | -0.06 | 0.12 | 0.44 | 1.18 | 0.40 | 0.38 | 0.71 | 1.09 | 0.42 | 0.15 | 0.58 | 0.03 |
6.3 Main Results
Table 4 presents a performance comparison of the algorithms on the Bullet-Safety-Gym and MetaDrive tasks. Overall, MoViL satisfies the cost limit on every task and achieves competitive returns with the lowest average cost on both benchmarks. BCQL and CDT achieve high returns in some tasks but frequently violate safety constraints. CPQ satisfies the limit on all MetaDrive tasks, yet its uniformly negative returns indicate highly conservative behavior. FISOR satisfies the cost limit on most tasks but achieves lower average returns than MoViL. In recent strong baselines, LSPC achieves high returns in multiple tasks, but usually with higher costs. GSCO demonstrates good safety control capabilities, but its overall returns are lower than MoViL, especially on MetaDrive. In contrast, MoViL achieves higher overall returns while maintaining lower costs, demonstrating an effective balance between safety and task performance.
6.4 Viability Certification Ablation
To evaluate the contribution of viability certification, we compare the full policy with two variants, BC Only and Cost-greedy. Fig. 5 presents their average normalized reward and cost across eight Bullet-Safety-Gym tasks. BC Only directly executes the mean action of the behavior-cloning policy. It achieves the highest return, but its cost approaches the constraint limit. Cost-greedy always selects the candidate action with the lowest predicted cost. It reduces cost relative to BC Only, but results in a substantially lower return and a higher cost than the full policy. The complete policy results in the lowest average cost among the three variants, utilizing cost-based action selection only when the BC mean action does not pass certification.

Figure 5: Viability certification ablation on eight Bullet-Safety-Gym tasks. Average normalized reward and cost are reported.
(a) Normalized reward ↑

(b) Normalized cost ↓
Figure 6: Ablation of probability calibration and trajectory witness protection on eight Bullet-Safety-Gym tasks. Average normalized reward and cost are reported.
6.5 Viability Estimation Ablation
To evaluate the contributions of probability calibration and trajectory witness protection to viability learning, we compare the full method with two variants that remove each component separately. Fig. 6 presents the average normalized reward and cost across eight Bullet-Safety-Gym tasks. Removing probability calibration yields comparable reward but increases the average cost. Since calibration adjusts the threshold for retaining states during recursive learning, this result suggests that it improves the viability estimates used for subsequent action certification. Removing witness protection leads to a further increase in cost, accompanied by a reduction in reward. Witness protection preserves observed safe continuations, reducing erroneous exclusions of viable states and their propagation through subsequent training targets.
6.6 Sensitivity to
Fig. 7 shows the sensitivity to on two PyBullet tasks and one MetaDrive task. A larger imposes a stricter behavior-support requirement for retaining states during viability learning. On DroneCircle, increasing from 0.005 to 0.2 substantially reduces cost, but also lowers reward. At 0.3, cost rises again while reward decreases further. On CarCircle, reward remains stable up to , but declines at higher thresholds with little reduction in cost. In contrast, MediumDense shows only minor variations across the tested values. These results suggest that overly restrictive thresholds may exclude useful viable states without improving safety. We therefore adopt as a reasonable balance between reward and cost.
6.7 Sensitivity to
Fig. 8 shows the sensitivity to the expectile parameter on two PyBullet tasks and one MetaDrive task. Reward remains relatively stable across the tested values on all three tasks. The costs of AntRun and MediumDense also


Figure 7: Sensitivity to on selected tasks.

Figure 8: Sensitivity to on selected tasks.

(a) Normalized Reward
(b) Normalized Cost

Figure 9: Effect of viability training data size on policy performance across selected tasks.
exhibit only minor variations. BallCircle shows larger cost fluctuations, reaching its lowest average cost at . Increasing places greater emphasis on positive viability targets during training. Probability calibration compensates for the -dependent score scaling, allowing the same behavior-support threshold to be used across different values of . Overall, reward is relatively insensitive to , while cost exhibits some task-dependent variations.
6.8 Effect of Data Size
To examine the effect of training data size on viability learning, we vary the proportion of offline data used to train and from 25% to 100%, while keeping the Gaussian BC policy and cost critic fixed. Fig. 9 compares the resulting policy performance on three representative tasks. Both reward and cost remain relatively stable across different data proportions. Even with only 25% of the training data, MoViL achieves performance comparable to that obtained with the full dataset. These results indicate that MoViL can maintain effective viability-based certification with substantially reduced training data on the evaluated tasks.
7 Conclusion
We proposed MoViL for learning long-horizon HJ viability from fixed offline transitions. By approximating the infinite-horizon viability kernel through monotone finite-horizon set recursion, MoViL simultaneously achieves semantic preservation, convergence, and numerical stability. At deployment, MoViL uses the learned viability estimates to certify actions proposed by a separately trained policy. Dubins car experiments showed that the learned viable sets closely matched the numerical HJ reference. On standard safe offline RL benchmarks, MoViL achieved the lowest average normalized cost while maintaining competitive returns. Future work will investigate how viability estimates can guide the selection and composition of skills in hierarchical policies.
References
[1] Lukas Brunke, Melissa Greeff, Adam W. Hall, Zhaocong Yuan, Siqi Zhou, Jacopo Panerati, and Angela P. Schoellig. Safe learning in robotics: From learning-based control to safe reinforcement learning. Annual Review of Control, Robotics, and Autonomous Systems, 5(1):411–444, 2022. doi: 10.1146/annurev-control-042920-020211.
[2] Rafael Figueiredo Prudencio, Marcos R. O. A. Maximo, and Esther Luna Colombini. A survey on offline reinforcement learning: Taxonomy, review, and open problems. IEEE Transactions on Neural Networks and Learning Systems, 35(8):10237–10257, 2024. doi: 10.1109/TNNLS.2023.3250269.
[3] Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In Proceedings of the International Conference on Machine Learning, pages 22–31, 2017.
[4] Weiye Zhao, Tairan He, Rui Chen, Tianhao Wei, and Changliu Liu. State-wise safe reinforcement learning: A survey. In Proceedings of the International Joint Conference on Artificial Intelligence, pages 6814–6822, 2023. doi: 10.24963/ijcai.2023/763.
[5] Aaron D. Ames, Samuel Coogan, Magnus Egerstedt, Gennaro Notomista, Koushil Sreenath, and Paulo Tabuada. Control barrier functions: Theory and applications. In Proceedings of the European Control Conference, pages 3420–3431, 2019. doi: 10.23919/ECC.2019.8796030.
[6] Haitong Ma, Changliu Liu, Shengbo Eben Li, Sifa Zheng, Wenchao Sun, and Jianyu Chen. Learn zero-constraint-violation safe policy in model-free constrained reinforcement learning. IEEE Transactions on Neural Networks and Learning Systems, 36(2):2327–2341, 2025. doi: 10.1109/TNNLS.2023.3348422.
[7] Mayank Shekhar Jha, Satya Marthi, Kyriakos G. Vamvoudakis, Soha Kanso, and Didier Theilliol. Input-to-state safety for reinforcement learning. IEEE Transactions on Neural Networks and Learning Systems, 37(10): 5584–5598, 2026. doi: 10.1109/TNNLS.2026.3688045.
[8] Kai-Chieh Hsu, Haimin Hu, and Jaime F. Fisac. The safety filter: A unified view of safety-critical control in autonomous systems. Annual Review of Control, Robotics, and Autonomous Systems, 7:47–72, 2024. doi: 10.1146/annurev-control-071723-102940.
[9] Amir Modares, Nasser Sadati, Babak Esmaeili, Farnaz Adib Yaghmaie, and Hamidreza Modares. Safe reinforcement learning via a model-free safety certifier. IEEE Transactions on Neural Networks and Learning Systems, 35(3):3302–3311, 2024. doi: 10.1109/TNNLS.2023.3264815.
[10] Somil Bansal, Mo Chen, Sylvia Herbert, and Claire J. Tomlin. Hamilton-Jacobi reachability: A brief overview and recent advances. In Proceedings of the IEEE Conference on Decision and Control, pages 2242–2253, 2017. doi: 10.1109/CDC.2017.8263977.
[11] Ian M. Mitchell, Alexandre M. Bayen, and Claire J. Tomlin. A time-dependent Hamilton–Jacobi formulation of reachable sets for continuous dynamic games. IEEE Transactions on Automatic Control, 50(7):947–957, 2005. doi: 10.1109/TAC.2005.851439.
[12] Somil Bansal and Claire J. Tomlin. DeepReach: A deep learning approach to high-dimensional reachability. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 1817–1824, 2021. doi: 10.1109/ICRA48506.2021.9561949.
[13] Jaime F. Fisac, Neil F. Lugovoy, Vicenç Rubies-Royo, Shromona Ghosh, and Claire J. Tomlin. Bridging Hamilton-Jacobi safety analysis and reinforcement learning. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 8550–8556, 2019. doi: 10.1109/ICRA.2019.8794107.
[14] Yinan Zheng, Jianxiong Li, Dongjie Yu, Yujie Yang, Shengbo Eben Li, Xianyuan Zhan, and Jingjing Liu. Safe offline reinforcement learning with feasibility-guided diffusion model. In Proceedings of the International Conference on Learning Representations, pages 47725–47754, 2024.
[15] Anayo K. Akametalu, Shromona Ghosh, Jaime F. Fisac, Vicenç Rubies-Royo, and Claire J. Tomlin. A minimum discounted reward Hamilton-Jacobi formulation for computing reachable sets. IEEE Transactions on Automatic Control, 69(2):1097–1103, 2024. doi: 10.1109/TAC.2023.3327159.
[16] Jason J. Choi, Donggun Lee, Koushil Sreenath, Claire J. Tomlin, and Sylvia L. Herbert. Robust control barrier-value functions for safety-critical control. In Proceedings of the IEEE Conference on Decision and Control, pages 6814–6821, 2021. doi: 10.1109/CDC45484.2021.9683085.
[17] Isabelle El-Hajj, Prashant Solanki, Jasper van Beers, Coen de Visser, and Erik-Jan van Kampen. Reachability-preserving Bellman operator for the discounted reach-cost value function: Uniting Hamilton-Jacobi reachability and reinforcement learning, 2026. arXiv:2607.07893.
[18] Albert Lin and Somil Bansal. Verification of neural reachable tubes via scenario optimization and conformal prediction. In Proceedings of the Learning for Dynamics & Control Conference, pages 719–731, 2024.
[19] Yujie Yang, Hanjiang Hu, Tianhao Wei, Shengbo Eben Li, and Changliu Liu. Scalable synthesis of formally verified neural value function for Hamilton-Jacobi reachability analysis. Journal of Artificial Intelligence Research, 83:19:1–19:36, 2025. doi: 10.1613/jair.1.16946.
[20] Patrick Saint-Pierre. Approximation of the viability kernel. Applied Mathematics & Optimization, 29(2):187–209, 1994. doi: 10.1007/BF01204182.
[21] Zuxin Liu, Zijian Guo, Haohong Lin, Yihang Yao, Jiacheng Zhu, Zhepeng Cen, Hanjiang Hu, Wenhao Yu, Tingnan Zhang, Jie Tan, and Ding Zhao. Datasets and benchmarks for offline safe reinforcement learning. Journal of Data-centric Machine Learning Research, 1(12):1–29, 2024.
[22] Kai-Chieh Hsu, Vicenç Rubies-Royo, Claire J. Tomlin, and Jaime F. Fisac. Safety and liveness guarantees through reach-avoid reinforcement learning. In Proceedings of Robotics: Science and Systems, 2021. doi: 10.15607/RSS.2021.XVII.077.
[23] Prashant Solanki, Isabelle El-Hajj, Jasper van Beers, Erik-Jan van Kampen, and Coen de Visser. Unifying Hamilton-Jacobi reachability and reinforcement learning, 2026. arXiv:2601.08050.
[24] Dongjie Yu, Haitong Ma, Shengbo Li, and Jianyu Chen. Reachability constrained reinforcement learning. In Proceedings of the International Conference on Machine Learning, pages 25636–25655, 2022.
[25] Milan Ganai, Zheng Gong, Chenning Yu, Sylvia Herbert, and Sicun Gao. Iterative reachability estimation for safe reinforcement learning. In Advances in Neural Information Processing Systems, volume 36, pages 69764–69797, 2023. doi: 10.52202/075280-3058.
[26] Haoran Xu, Xianyuan Zhan, and Xiangyu Zhu. Constraints penalized Q-learning for safe offline reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 8753–8760, 2022. doi: 10.1609/aaai.v36i8.20855.
[27] Jongmin Lee, Cosmin Paduraru, Daniel J. Mankowitz, Nicolas Heess, Doina Precup, Kee-Eung Kim, and Arthur Guez. COptiDICE: Offline constrained reinforcement learning via stationary distribution correction estimation. In Proceedings of the International Conference on Learning Representations, pages 15727–15750, 2022.
[28] Zuxin Liu, Zijian Guo, Yihang Yao, Zhepeng Cen, Wenhao Yu, Tingnan Zhang, and Ding Zhao. Constrained Decision Transformer for offline safe reinforcement learning. In Proceedings of the International Conference on Machine Learning, pages 21611–21630, 2023.
[29] Huikang Su, Dengyun Peng, Zifeng Zhuang, Yuhan Liu, Qiguang Chen, Donglin Wang, and Qinghe Liu. Boundary-to-region supervision for offline safe reinforcement learning. In Advances in Neural Information Processing Systems, volume 38, pages 64567–64596, 2025. doi: 10.52202/085713-1941.
[30] Prajwal Koirala, Zhanhong Jiang, Soumik Sarkar, and Cody Fleming. Latent safety-constrained policy approach for safe offline reinforcement learning. In Proceedings of the International Conference on Learning Representations, pages 21985–22011, 2025.
[31] Zhiqi Zhuang, Di Wu, and Benoit Boulet. Geometric control of out-of-distribution shift in safe offline RL. In Proceedings of the International Conference on Machine Learning, pages 168167–168191, 2026.
[32] Mumuksh Tayal, Manan Tayal, Aditya Singh, Shishir Kolathaya, and Ravi Prakash. V-OCBF: Learning safety filters from offline data via value-guided offline control barrier functions. Transactions on Machine Learning Research, 2026. URL https://openreview.net/forum?id=PG09mpIyyb.
[33] Ayan Choudhury, Janaka Brahmanage, Akshat Kumar, and Praveen Paruchuri. Persistent safety set guided offline safe reinforcement learning. In Proceedings of the International Joint Conference on Artificial Intelligence, pages 4224–4232, 2026. doi: 10.24963/ijcai.2026/470.
[34] Luc Doyen and Michel De Lara. Stochastic viability and dynamic programming. Systems & Control Letters, 59 (10):629–634, 2010. doi: 10.1016/j.sysconle.2010.07.008.
[35] Dimitri P. Bertsekas and Steven E. Shreve. Stochastic Optimal Control: The Discrete-Time Case. Academic Press, New York, 1978.
[36] Whitney K. Newey and James L. Powell. Asymmetric least squares estimation and testing. Econometrica, 55 (4):819–847, 1987. doi: 10.2307/1911031.
[37] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Proceedings of the International Conference on Machine Learning, pages 1321–1330, 2017.
[38] Sven Gronauer. Bullet-Safety-Gym: A framework for constrained reinforcement learning. Technical report, Technical University of Munich, Department of Electrical and Computer Engineering, 2022.
[39] Quanyi Li, Zhenghao Peng, Lan Feng, Qihang Zhang, Zhenghai Xue, and Bolei Zhou. MetaDrive: Composing diverse driving scenarios for generalizable reinforcement learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(3):3461–3475, 2023. doi: 10.1109/TPAMI.2022.3190471.
[40] Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In Proceedings of the International Conference on Machine Learning, pages 2052–2062, 2019.