Manuscript Offprint
arXiv:2611.09344Probably Safe Sim-to-Real Transfer with Lifetime Validity
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We present Dejavu, a method that makes sim-to-real transfer of reinforcement learning policies in constrained Markov decision processes probably safe over an unbounded sequence of policy updates. An anytime valid test using per-decision importance sampling and a betting confidence sequence certifies each candidate trained in simulation before deployment using only trajectories collected by a safe baseline policy operating in production. Simulation quality does not affect the safety guarantee, only the production sample efficiency of the method. Finally, a summable per-test failure probability yields the lifetime valid property. Empirical results across three sim-to-real benchmarks support the theoretical work.
1. Introduction
Reinforcement learning (RL) policies in high-stakes systems are rarely trained where they will be used (Tobin et al., 2017; Peng et al., 2018). Training in a simulation environment is preferred for at least two reasons. First, safe trial and error: a learner in simulation can test unsafe policies with no real risk, whereas exploration in the production environment must visit harmful states to learn to avoid them (García & Fernández, 2015). Second, practical timelines: simulated experience is often orders of magnitude cheaper and faster than production experience (Rudin et al., 2022).
The price is the sim-to-real gap. A policy that satisfies its safety constraint in the simulation environment can violate it in production, which is dangerous exactly when safety must hold on first contact. Domain randomization exposes the policy to a distribution over simulation parameters aiming to encompass the production environment setting (Tobin et al., 2017; Peng et al., 2018), and its pessimistic refinement SPiDR penalizes visits to states where randomized models disagree (As et al., 2025). These methods shrink
the gap, but they do not certify whether deployment is safe for the specific policy in hand and the specific production environment in front of it. In current practice, that decision rests on unquantified judgment or on holdout trials of the very policy whose safety is in doubt.
This paper provides the missing decision procedure. Our setting includes a baseline policy operating safely in the production environment (an incumbent controller, a previously validated policy) and a candidate policy which has been trained as its replacement in the simulation environment. The question is: can policies trained in simulation be deployed to production over an unbounded sequence of updates, such that with high probability every deployed policy is safe, however inaccurate the simulator?
Our answer is Dejavu,¹ which offers the following contributions:
-
An anytime-valid test (Section 4): An upper confidence bound on a candidate's production-environment cost return. The bound is valid at every buffer size at once, so the test condition can be checked as production data arrives and stop the moment it passes.
-
Lifetime validity (Section 5): Composing tests into a sequence, the probability that any policy ever deployed violates the cost limit is bounded by a summable budget in a sample efficient manner.
-
Data cost and simulation quality (Section 6): Lower and upper bounds on the expected production data needed to pass a test, and an analysis of how simulation quality affects that data cost.
-
Empirical validation (Section 7): Experiments across three sim-to-real benchmarks with deliberately miscalibrated simulation environments.
¹Machine Learning Research Group, University of Oxford, Oxford, United Kingdom. Correspondence to: Rohan Tangri rohan.tangri@reub.ox.ac.uk, Jan-Peter Calliess jan@robots.ox.ac.uk.
Preprint. November 9, 2026.
¹The name describes the mechanism: every test is computed entirely from trajectories of the currently deployed baseline policy. The candidate is evaluated on déjà vu, before it ever acts.
with a pessimism term proportional to the disagreement among randomized dynamics models, inheriting guarantees with respect to the assumed uncertainty set. The guarantee attaches to the training procedure, not to the individual trained policy in the actual production environment. Robust MDPs (Iyengar, 2005) and their constrained extensions (Queeney & Benosman, 2023; Kitamura et al., 2025) similarly optimize against an uncertainty set over dynamics. Sim-to-Lab-to-Real (Hsu et al., 2023) interposes a high-fidelity intermediate environment and a learned shield, while Kaushik et al. (2022) select among policies trained in simulation with safe Bayesian optimization on production data. Dejavu is complementary to this entire family: any of these methods can serve as the proposer of candidates, while Dejavu supplies a per-policy, per-environment deployment test computed before the candidate acts, from data whose collection incurs no new risk.
High-confidence policy improvement. High-confidence off-policy evaluation bounds a candidate's return from a baseline policy's trajectories (Thomas et al., 2015a), and high-confidence policy improvement (HCPI) deploys a candidate only if this bound clears a threshold, which Thomas et al. (2015b) call a safety test. Seldonian algorithms extend the test to general constraints (Thomas et al., 2019), and batch safe policy improvement bounds the loss relative to a baseline (Laroche et al., 2019). These tests fix their amount of data in advance; their exact variants are conservative and their practical variants approximate. Their guarantees also cover one test at a time: HCPI's iterative version reuses data across refused candidates, as Dejavu does, but its probability of some unsafe deployment grows with the number of tests, and the version that also reuses data across deployments keeps its guarantee only until the first deployment (Thomas et al., 2015b). Dejavu keeps one guarantee over an unlimited sequence of deployments while reusing data, by splitting the allowed probability of an unsafe deployment across its tests and handing a passing test's share on to later tests (Tian & Ramdas, 2021), as Feng et al. (2022) do for model updates outside RL. Unlike these methods, Dejavu tests candidates trained in simulation. Katdare et al. (2023) also combine simulation and production data for evaluation, but must learn density ratios, while Dejavu's weights are computed.
Anytime-valid tests. Anytime-valid confidence sequences hold at every sample size, so a test built on them can stop as soon as the data suffice (Howard et al., 2021; Waudby-Smith & Ramdas, 2024; Shekhar & Ramdas, 2023). Karampatziakis et al. (2021) use them to decide deployment in contextual bandits, and Waudby-Smith et al. (2024) for off-policy evaluation, both for one-step decisions. Dejavu applies them to multi-step tasks; the sequence of tests in Section 5 holds for any anytime-valid test.
3. Preliminaries
Constrained Markov Decision Process (CMDP), real and simulated. Let represent a set of probability distributions over a set . The production environment is a constrained Markov decision process (CMDP; Altman, 1999) . Here, is the state space, is the action space, is the transition kernel, is the reward kernel, is the cost kernel and is the initial state distribution. A policy maps states to a probability distribution over actions. We assume the agent interacts with the environment to generate infinite length trajectories , which are sampled at time with actions , states , rewards and costs . The simulation environment is a CMDP differing only in state-transition dynamics and initial-state distribution. Throughout, a tilde marks simulation objects.
For a policy define the reward return, , and cost return, , with their expectations in the production environment, and . Here, are the reward and cost discount factors, and denotes a trajectory sampled by policy in the production environment. and are their simulation-environment counterparts, with trajectories sampled . The design goal is the standard CMDP program (Achiam et al., 2017; Ray et al., 2019)
for a fixed cost limit . A policy is safe if it satisfies the cost constraint, , and unsafe otherwise.
Per-decision importance sampling (PDIS). We are forbidden from sampling trajectories in the production environment using the candidate before it is certified: . Per-decision importance sampling (PDIS) allows us to evaluate expectations over such trajectories from production environment trajectories sampled with the baseline policy: . For a candidate and the baseline policy , define the per-step importance weight
and the cumulative importance weight
Let the importance-weighted cost return be
(4) then per-decision importance sampling (PDIS; Precup et al., 2000) makes the following equivalence:
Betting confidence sequences. Let be i.i.d. samples with unknown mean . We aim to achieve an anytime valid upper bound on : , which holds at any data-dependent stopping time unlike fixed- concentration bounds (e.g. empirical-Bernstein (Maurer & Pontil, 2009)). Ville's inequality gives such guarantees (Ville, 1939): if is a non-negative supermartingale, meaning and for the history of the first samples, then .
Following Waudby-Smith & Ramdas (2024), for a hypothesized mean and , define the capital process
where , such that , and is predictable, a function of and only. Construct an upper bound as
Since is positive, continuous and nondecreasing in under the variance-adaptive plug-in schedule of Waudby-Smith & Ramdas (2024) used by Dejavu (Appendix D), when , and then:
When , is a nonnegative supermartingale started at 1, so Ville's inequality gives . For , the event has , so by Equation (8), , and . Since , we obtain (Howard et al., 2021; Waudby-Smith & Ramdas, 2024). If , then and the bound never fails.
4. Dejavu's Test
We first specify one test, indexed by , to promote or refuse a candidate using a buffer of trajectories with finite horizon sampled from a safe baseline policy in the production environment, . The sequence of tests is Section 5. A proposer trains the candidate in the simulation environment without any data from the buffer and warm starting from the baseline policy. The test is agnostic to the proposer, but an example is given in the optimization
problem (OP),
Here, is the KL divergence anchor, is a simulation cost limit that need not equal , since the simulation environment may be miscalibrated, and is the anchor coefficient. The anchor is not required by the guarantee, but it makes Assumption 4.2 hold in practice (Appendix B) and it reduces the production data a test needs (Section 6).
Assumption 4.1 (Bounded costs). almost surely.
Assumption 4.2 (Cumulative importance weight clip). There is a known such that, almost surely over , for all .
Assumption 4.3 (Candidate-buffer independence). The candidate is never trained or chosen using production data or test outcomes from the current baseline policy .
Assumption 4.4 (Safe start). The initial policy is safe, , either by construction or verified at confidence by applying the betting confidence sequence of Section 3 to the discounted cost returns of 's own production trajectories.
The true value of (5) is unknown, so we instead aim to calculate an anytime-valid upper confidence bound using the sampled buffer of production trajectories with a betting confidence sequence. This requires bounded samples of the importance-weighted cost return (4). However, in practice, we only collect finite horizon trajectories of length H, and Assumption 4.2 can be violated, with unbounded cumulative importance weights. Therefore, we define the per-trajectory statistic
where is the clipped cumulative importance weight and the range has width . The worst-case horizon truncation error is the truncation offset .
Lemma 4.5 (Cost return bound). Under Assumptions 4.1 and 4.2, for a fixed candidate , the statistic of Equation (10) satisfies (proof Appendix A.1):
The clip is what makes the statistic bounded, and Assumption 4.2 asserts that it never binds. However, if the assumption fails, the clip lowers below its unclipped counterpart at some trajectories, so the right-hand side of Lemma 4.5 is biased downward, the only anti-conservative direction in the statistic. Therefore, a clipping method that minimizes the bias introduced is preferred. For a candidate let its truncated cost return be .
Proposition 4.6 (Cumulative clip bias). Under Assumption 4.1, with wherever , and with expectations over (proof Appendix A.2),
where is the retained mass at step , and under Assumption 4.2.
Proposition 4.6 gives an upper bound on the cumulative clip bias that is zero under Assumption 4.2. The retained mass is the observable audit of Assumption 4.2, one when it holds and less than one otherwise. The natural alternative is to clip each per-step importance weight before forming the product, as in Retrace (Munos et al., 2016) and V-trace (Espeholt et al., 2018). Since at every state, per-step weights above and below one offset inside the product, and the cumulative clip acts only on what remains, while the per-step clip acts on each factor before any offsetting can occur. Appendix B shows that its bias consequently has a lower bound that grows with the candidate's excess cost over the baseline policy, which is why Dejavu clips the cumulative importance weight.
Given trajectories indexed by : . Let and run the betting confidence sequence with the capital process of Equation (6) at test level . Rescaling the normalized upper bound in Equation (7) by yields the upper bound for :
The test promotes if
We call Equation (14) the test condition. It is checked repeatedly as the buffer grows by trajectories at a time. The test stops at promotion time , or at a data budget if it never does (Algorithm 1). The random number of production trajectories the test consumes is the stopping time
Theorem 4.7 (Validity of each test). Fix test and condition on its past (all data, candidates, and decisions before test ). Under Assumptions 4.1 to 4.3, for the stopping time of Equation (15),
See Appendix A.3 for a proof.
Remark 4.8 (Bound failure is not safety failure). The test level bounds the probability of a bound failure, . A false promotion requires and is therefore a bound failure, so it occurs with probability at most . The converse does not hold: a bound failure on a refused candidate is harmless, and one on a promoted candidate is harmless whenever . False promotions are therefore at least as rare as bound failures.
5. A Sequence of Tests
A deployed system does not certify once. It may run the test of Section 4 indefinitely: train, freeze, certify, promote or refuse, re-anchor, repeat (Algorithm 1). Each test's guarantee has a false-promotion probability of at most its test level , and a union bound over tests adds these. A constant level makes the sum exceed one after finitely many tests, so for a sequence of tests that must run indefinitely the lifetime guarantee is vacuous. We therefore fix a lifetime budget and release it through the alpha-spending schedule of online multiple testing (Tian & Ramdas, 2021),
where is the injection released at the -th release point. The simplest sequence uses test level on a fresh buffer and discards both the level and buffer when the test ends. This is wasteful on production data. Instead, Dejavu first reuses the buffer when a test refuses, so , and more production data is only collected if doesn't pass on the inherited buffer. Second, Dejavu passes the level to the next test when it promotes using the online fallback procedure of Tian & Ramdas (2021) (Algorithm 1). The tests are therefore grouped into streams, each of which runs one or more tests with the same baseline policy.
Let be the stream that test belongs to, and its position in the stream. Injections are assigned to each stream . The number of tests in a stream depends on the buffer that will be collected. However, Theorem 4.7 requires the test level to be fixed independently of the buffer it is tested on. Dejavu fixes the levels of a stream when it starts, over every test the stream could run. This leaves a trade-off. Giving most of the stream's level to its first test leaves the later tests too little level to promote from. Holding most of the stream's level for the later tests costs those later levels when the first test promotes. A reserve defines the fraction of the stream injection for the test levels after the first. The test levels in a stream are set by extending the online fallback of Tian & Ramdas
Algorithm 1 Dejavu
Input: initial policy (safety given or verified at level ; Assumption 4.4); cost limit ; lifetime budget ; clip ; horizon ; chunk size ; per-test data budget ; early-refusal level (Equation (25)).
; ;
for do
If , set by Equation (19) {start of stream }
Set by Equation (18)
Train in the simulation environment from (e.g. Equation (9)); freeze it
Score under by Equation (10); compute at level on its trajectories
while , Equation (25) does not hold, and fewer than trajectories were added at this test do
Collect trajectories of , append them to , and update
end while
if then
promote: ; ; ;
else
refuse: ; ;
end if
end for
(2021):
where . Theorem 5.1 allows to be any function of what was observed before stream started. Given test at the start of stream , Dejavu uses
On a promotion streak , each test passes on almost all it had, and the test level tends to under Equation (17) instead of decaying to zero. Where refusals are common, approaches the refusal rate. A later test that promotes passes its own level, its share of the reserve, to the first test of the next stream.
Theorem 5.1 (Lifetime validity of Dejavu). Under Assumptions 4.3 and 4.4, suppose that a test satisfies for any candidate and level fixed before a buffer of i.i.d. trajectories of the baseline policy is collected. Dejavu's test satisfies this under Assumptions 4.1 and 4.2. Run Algorithm 1 for any number
of such tests, and let be the bound on the probability that is unsafe (Assumption 4.4). Then
See Appendix A.4 for a proof.
The two terms cover the two failure modes: some test false-promotes (at most ) or the initial policy was never safe (at most ). Any schedule that has test levels fixed at the start of each stream and where the sum of the test levels in any stream is at most the stream injection plus the level passed to it satisfies Theorem 5.1.
6. Data Cost and Simulation Quality
The data cost of test is , the expected number of production trajectories it consumes before the stopping time of Equation (15). It is governed by the slack
The test promotes a candidate when the test condition Equation (14) holds, which, with the normalized threshold and Equation (8), is equivalent to
Proposition 6.1 (The data cost of a test). Let be the variance of the statistic at test . Let be the headroom, the bet cap of Appendix D, and . Suppose , condition on everything observed before the stream of test starts and on the simulation randomness of that stream, and let the candidate have slack . Promotion time is then lower bounded:
and the fixed bet , placed at every trajectory, gives a promotion time upper bound:
The data cost satisfies . See Appendix A.5 for a proof.
The bounds of Proposition 6.1 have tighter forms in terms of the growth rate of the capital (Lemma A.1); we weaken them into functions of the slack , variance and headroom to show which of these set the data cost. The range regime is set by the headroom. The variance regime has two sources: the spread of the clipped cumulative importance weights and the noise of the costs they multiply. The anchor of Equation (9) reduces the first: at each state the per-step log-weight has variance (Appendix B), so a small anchor value keeps the cumulative importance weight concentrated near one. A doubly-robust statistic (Jiang & Li, 2016; Thomas & Brunskill, 2016) could trade the second for model noise; Appendix C records why Dejavu does not use one.
A test with promotion time in Equation (15) that satisfies wastes production trajectories. Some such candidates are unsafe, but many are safe with too little slack to certify within the budget. Given the test passes on Equation (22), we determine whether can reach in the trajectories that are left. Let the growth rate be the expected increase of per trajectory at bet . By Appendix A.5, a promotion needs trajectories, with . The test cannot observe , but it can bound it. Let be an anytime-valid upper confidence betting bound on at level , so . The test refuses a candidate at the first buffer size with the early refusal rule
The guarantee this buys is Proposition 6.2.
Proposition 6.2 (Early refusal). Given the early refusal rule of Equation (25), for every and every with ,
so a test has expected log-capital below at every buffer size it can reach. See Appendix A.6 for a proof.
Equation (26) is an expectation statement, so a candidate that would have passed by a favorable run of trajectories can be refused. The cost of that error is a lost candidate rather than safety, so is accepted as a per-test rate, not a lifetime budget.
The production and simulation environments differ only in the transition kernel and the initial state distribution (Section 3), so we define simulation quality by the distance between them. For a candidate in the simulation environment, let be its discounted state-action visitation, and let the total variation distance be denoted . The initial-state gap and the dynamics gap of are and respectively, and their combination is the sim-to-real gap (Kearns & Singh, 2002; Agarwal et al.,
A candidate returned by the proposer of OP (9) satisfies the simulation constraint, , and the simulation margin is given by .
Proposition 6.3 (Slack under the sim-to-real gap). Under Assumptions 4.1 and 4.2, a candidate that satisfies the simulation constraint, , has slack
See Appendix A.7 for a proof.
The upper bound says an unsafe candidate has negative slack and cannot be certified safe with any amount of data. The lower bound shows a larger sim-to-real gap or a smaller simulation margin lowers the slack a candidate is guaranteed, which raises the bound on its test's data cost in Proposition 6.1.
7. Experiments
We evaluate on three sim-to-real CMDPs, each a JAX implementation of a recognized benchmark so that training runs on the GPU, which lets us report results over 20 training runs initialized with different random number generator seeds. Two come from CRAX (Tomilin et al., 2026), a JAX library of constrained locomotion and navigation tasks built on the MuJoCo XLA (MJX) physics engine.
-
HalfCheetahVelocity: Safety Gymnasium's (Ji et al., 2023) SafetyHalfCheetahVelocity, as implemented in CRAX. The agent maximizes forward velocity, and incurs cost 1 when its forward speed exceeds 3.21 m/s.
-
PointGoal: SafetyPointGoal1 from Safety Gymnasium (Ray et al., 2019; Ji et al., 2023), as implemented in CRAX. The agent navigates to a randomized goal location, and incurs cost 1 when it enters one of 16 hazard regions.
-
IcyLake: A JAX reimplementation of the Gymnasium FrozenLake environment (Towers et al., 2024). The agent must cross a frozen lake grid to the goal state while avoiding icy tiles, each of which costs 1 per visit.
Each pairs a production environment with a deliberately optimistic simulation environment. Each environment runs at one cost limit chosen so that the constraint binds. All runs use the budget of Equation (17) with and , and the initial policy is certified on-policy (Assumption 4.4). Environment parameters, cost limits, and hyperparameters are given in Appendix E.
We compare four ways of turning the same safe initial policy into a sequence of baseline policies.

Figure 1. Deployment benchmark, one column per environment: the baseline policy's true production-environment reward (top) and cost return with the limit (middle), and the share of seeds whose current baseline policy exceeds the cost constraint (bottom). Lines are means over 20 seeds, shaded regions are standard deviation. The normalized deployment lifecycle describes the fraction of the total production data budget consumed for training by each method. SPiDR uses 0 production data; the others have a budget of 10M steps on the CRAX environments and 1M steps on IcyLake.
-
CPO (Achiam et al., 2017) updates the policy directly in the production environment with a worst-case safety constraint violation magnitude at each update.
-
SPiDR (As et al., 2025) each round retrains from the current baseline policy with CRPO (Xu et al., 2021) in simulation under domain randomization with a pessimism penalty, and deploys every retrained policy without a test.
-
Dejavu proposes each candidate with CRPO (Xu et al., 2021) in the simulation environment and promotes it only if it passes the test of Section 4.
-
HCPI (Thomas et al., 2015b) each iteration collects production trajectories of the baseline policy, on which a fifth are used to propose a candidate via CPO. The remainder are used for the test, with the high-confidence upper bound of Thomas et al. (2015a).
Ground truth for every deployed policy is a held-out Monte-Carlo estimate of its expected production cost return, de-
noted (Appendix E).
Dejavu satisfies its lifetime validity constraint for every environment in Figure 1, while accumulating more reward than the other safe methods. Its closest counterpart, HCPI, is also safe, but barely moves at all. This is expected given the current literature highlights sample efficiency and computational complexity as its main drawbacks (Thomas et al., 2015b). CPO trained in production reaches the highest reward levels, but frequently deploys policies that violate the cost limit. This is expected since CPO only bounds the worst-case constraint violation magnitude at each update, so in theory every policy could violate the constraint. The only other method that trains candidates in simulation is SPiDR, which makes it a useful comparison to Dejavu on reward accumulation. SPiDR also stays safe across environments, but has a lower reward than Dejavu. It should also be noted that to satisfy safety, SPiDR uses a pessimism penalty that is tuned for each production environment, while Dejavu is agnostic to simulation quality and did not require the same tuning (Appendix E).
8. Conclusion
Dejavu turns the sim-to-real deployment decision into a test: a candidate policy trained in simulation is promoted only when an anytime-valid upper confidence bound on its expected cost return in the production environment is below the cost limit. The test allows for an adaptive number of trajectories to be sampled by a baseline policy in the production environment to reach promotion, and a summable budget extends the guarantee over an infinite promotion sequence. The method is agnostic to how candidates are produced, and simulation quality only affects sample efficiency, not the validity of the deployment decision. Finally, experimental results support the theoretical guarantees, where Dejavu promotes safe candidates with superior reward accumulation compared to other safe methods.
9. Limitations and Future Work
Dejavu is a first step towards systems that improve a deployed policy continuously while keeping a statistically valid safety guarantee over the whole deployment lifecycle. Its main limitation is sample efficiency, and determining how far it can be improved is the subject of ongoing work. Dejavu also assumes independent trajectories from a fixed initial state distribution under fixed production dynamics. Many production systems under continuous operation instead operate without resets, and their dynamics change over time; extending lifetime validity to these systems is a further direction.
Acknowledgements
Rohan Tangri gratefully acknowledges support from G-Research.
References
Achiam, J., Held, D., Tamar, A., and Abbeel, P. Constrained policy optimization. In Proceedings of the 34th International Conference on Machine Learning, 2017.
Agarwal, A., Jiang, N., Kakade, S. M., and Sun, W. Reinforcement Learning: Theory and Algorithms. Monograph, draft of January 31, 2022. https://rltheorybook.github.io.
Altman, E. Constrained Markov Decision Processes. Chapman and Hall/CRC, 1999.
As, Y., Qu, C., Unger, B., Kang, D., van der Hart, M., Shi, L., Coros, S., Wierman, A., and Krause, A. SPiDR: A simple approach for zero-shot safety in sim-to-real transfer. In
Advances in Neural Information Processing Systems 38, 2025.
Cesa-Bianchi, N., Mansour, Y., and Stoltz, G. Improved second-order bounds for prediction with expert advice. Machine Learning, 66(2–3):321–352, 2007.
Espeholt, L., Soyer, H., Munos, R., Simonyan, K., Mnih, V., Ward, T., Doron, Y., Firoiu, V., Harley, T., Dunning, I., Legg, S., and Kavukcuoglu, K. IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures. In Proceedings of the 35th International Conference on Machine Learning, 2018.
Feng, J., Pennello, G., Petrick, N., Sahiner, B., Pirracchio, R., and Gossmann, A. Sequential algorithmic modification with test data reuse. In Conference on Uncertainty in Artificial Intelligence, pp. 674–684, 2022.
García, J. and Fernández, F. A comprehensive survey on safe reinforcement learning. Journal of Machine Learning Research, 16:1437–1480, 2015.
Howard, S. R., Ramdas, A., McAuliffe, J., and Sekhon, J. Time-uniform, nonparametric, nonasymptotic confidence sequences. The Annals of Statistics, 49(2):1055–1080, 2021.
Hsu, K.-C., Ren, A. Z., Nguyen, D. P., Majumdar, A., and Fisac, J. F. Sim-to-lab-to-real: Safe reinforcement learning with shielding and generalization guarantees. Artificial Intelligence, 314, 2023.
Iyengar, G. N. Robust dynamic programming. Mathematics of Operations Research, 30(2):257–280, 2005.
Ji, J., Zhang, B., Zhou, J., Pan, X., Huang, W., Sun, R., Geng, Y., Zhong, Y., Dai, J., and Yang, Y. Safety gymnasium: A unified safe reinforcement learning benchmark. In Advances in Neural Information Processing Systems, Datasets and Benchmarks Track, 2023.
Jiang, N. and Li, L. Doubly robust off-policy value evaluation for reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
Karampatziakis, N., Mineiro, P., and Ramdas, A. Off-policy confidence sequences. In Proceedings of the 38th International Conference on Machine Learning, 2021.
Katzare, P., Jiang, N., and Driggs-Campbell, K. Marginalized importance sampling for off-environment policy evaluation. In Proceedings of the 7th Conference on Robot Learning, 2023.
Kaushik, R., Arndt, K., and Kyrki, V. SafeAPT: Safe simulation-to-real robot learning using diverse policies learned in simulation. IEEE Robotics and Automation Letters, 7(3):6838–6845, 2022.
Kearns, M. and Singh, S. Near-optimal reinforcement learning in polynomial time. Machine Learning, 49(2–3): 209–232, 2002.
Kitamura, T., Kozuno, T., Kumagai, W., Hoshino, K., Hosoe, Y., Kasaura, K., Hamaya, M., Parmas, P., and Matsuo, Y. Near-optimal policy identification in robust constrained markov decision processes via epigraph form. In International Conference on Learning Representations, 2025.
Laroche, R., Trichelair, P., and Tachet des Combes, R. Safe policy improvement with baseline bootstrapping. In Proceedings of the 36th International Conference on Machine Learning, 2019.
Levin, D. A. and Peres, Y. Markov Chains and Mixing Times. American Mathematical Society, second edition, 2017.
Luo, Y., Xu, H., Li, Y., Tian, Y., Darrell, T., and Ma, T. Algorithmic framework for model-based deep reinforcement learning with theoretical guarantees. In International Conference on Learning Representations, 2019.
Maurer, A. and Pontil, M. Empirical bernstein bounds and sample-variance penalization. In Proceedings of the 22nd Conference on Learning Theory, 2009.
Munos, R., Stepleton, T., Harutyunyan, A., and Bellemare, M. G. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems 29, 2016.
Peng, X. B., Andrychowicz, M., Zaremba, W., and Abbeel, P. Sim-to-real transfer of robotic control with dynamics randomization. In IEEE International Conference on Robotics and Automation (ICRA), 2018.
Precup, D., Sutton, R. S., and Singh, S. Eligibility traces for off-policy policy evaluation. In Proceedings of the 17th International Conference on Machine Learning, 2000.
Queeney, J. and Benosman, M. Risk-averse model uncertainty for distributionally robust safe reinforcement learning. In Advances in Neural Information Processing Systems 36, 2023.
Ray, A., Achiam, J., and Amodei, D. Benchmarking safe exploration in deep reinforcement learning. OpenAI technical report, https://cdn.openai.com/safexp-short.pdf, 2019.
Rudin, N., Hoeller, D., Reist, P., and Hutter, M. Learning to walk in minutes using massively parallel deep reinforcement learning. In Proceedings of the 5th Conference on Robot Learning, 2022.
Shekhar, S. and Ramdas, A. On the near-optimality of betting confidence sets for bounded means. arXiv preprint arXiv:2310.01547, 2023.
Thomas, P. S. and Brunskill, E. Data-efficient off-policy policy evaluation for reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
Thomas, P. S., Theocharous, G., and Ghavamzadeh, M. High confidence off-policy evaluation. In Proceedings of the 29th AAAI Conference on Artificial Intelligence, 2015a.
Thomas, P. S., Theocharous, G., and Ghavamzadeh, M. High confidence policy improvement. In Proceedings of the 32nd International Conference on Machine Learning, 2015b.
Thomas, P. S., Castro da Silva, B., Barto, A. G., Giguere, S., Brun, Y., and Brunskill, E. Preventing undesirable behavior of intelligent machines. Science, 366(6468):999–1004, 2019.
Tian, J. and Ramdas, A. Online control of the familywise error rate. Statistical Methods in Medical Research, 30(4):976–993, 2021.
Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., and Abbeel, P. Domain randomization for transferring deep neural networks from simulation to the real world. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017.
Tomilin, T., Boustani, M., Beurskens, M., Nguyen, K. H. B., and Simão, T. D. CRAX: Fast safe reinforcement learning benchmarking. arXiv preprint arXiv:2606.20376, 2026.
Towers, M., Kwiatkowski, A., Terry, J., Balis, J. U., De Cola, G., Deleu, T., Goulão, M., Kallinteris, A., KG, A., Krimmel, M., Perez-Vicente, R., Pierré, A., Schulhoff, S., Tai, J. J., Tan, H., and Younis, O. G. Gymnasium: A standard interface for reinforcement learning environments. arXiv preprint arXiv:2407.17032, 2024.
Ville, J. Etude critique de la notion de collectif. Gauthier-Villars, 1939.
Waudby-Smith, I. and Ramdas, A. Estimating means of bounded random variables by betting. Journal of the Royal Statistical Society Series B: Statistical Methodology, 86(1):1–27, 2024.
Waudby-Smith, I., Wu, L., Ramdas, A., Karampatziakis, N., and Mineiro, P. Anytime-valid off-policy inference for contextual bandits. ACM/IMS Journal of Data Science, 1(3), 2024.
Waudby-Smith, I., Sandoval, R., and Jordan, M. I. Instance-log-optimality of portfolio-based e-processes and their sequential hypothesis tests. arXiv preprint arXiv:2504.02818, 2025.
Xu, T., Liang, Y., and Lan, G. CRPO: A new approach for safe reinforcement learning with convergence guarantee. In Proceedings of the 38th International Conference on Machine Learning, 2021.
A. Proofs
A.1. Proof of Lemma 4.5
Throughout, we abbreviate , . Assumption 4.2 implies in particular that wherever along trajectories of , so all per-step importance weights below are well defined.
Write the candidate's cost return and split at the horizon:
For the head, the PDIS identity (Precup et al., 2000) gives
Under Assumption 4.2 the clip almost surely never binds, so almost surely, and the right-hand side equals . For the tail, no importance sampling is involved. It is an expectation under directly, and Assumption 4.1 gives
The last expression is the truncation offset defined after Equation (10), so combining the two displays yields .
Each term of Equation (10) is a product of three nonnegative factors bounded by , , and respectively, so
A.2. Proof of Proposition 4.6
Throughout, is the baseline policy, the candidate, by Assumption 4.1, and expectations are over unless marked otherwise. We assume wherever , so every per-step importance weight of Equation (2) is finite.
The statistic of Equation (10) uses the clipped cumulative importance weight instead of . The clip bias is the gap between the truncated cost return of the candidate and the mean of the statistic:
[PDIS, Equation (5)]
(33)
Every term of the last line of Equation (33) is nonnegative, because and , so .
The per-step importance weight has conditional mean one: at any state s,
(34) with the sum replaced by an integral for continuous actions. Applying Equation (34) to the last factor of , conditional on the trajectory up to , and repeating for each earlier factor gives
Then
Under Assumption 4.2, almost surely, so , by Equation (35), and the clip bias is zero.
A.3. Proof of Theorem 4.7
Fix test k and condition on throughout; every probability below is conditional on it.
By Assumption 4.3, is fixed given and is never trained on , so the buffer trajectories are drawn i.i.d. from with the candidate held fixed. The values of the statistic, are therefore i.i.d. with mean
and by Equation (10), which needs only Assumption 4.1 since the clip caps the weight at , they lie in . Hence are i.i.d. in with mean , which is the setting of the betting confidence sequence in Section 3.
Run the betting confidence sequence of Equations (6) and (7) on at level . Its guarantee, , holds for any predictable bet schedule with (Ville, 1939; Waudby-Smith & Ramdas, 2024). Multiplying through by and using from Equation (13),
Writing for the event that the enclosed inequality holds, the event in Equation (38) is a union over all , so it contains the same event at any data-dependent index, in particular at the stopping time of Equation (15):
This is the only place the anytime-valid property is used, and it is why the test may stop by any rule without affecting the guarantee. Finally, Lemma 4.5 gives for the fixed candidate, so the bound failure event has property:
Chaining the two inclusions and applying Equation (38),
A.4. Proof of Theorem 5.1
Group the tests into streams: stream consists of the tests with , all of which share one baseline policy and one buffer , with the stream ending at its first promotion. Write and for the candidate and the level of the test at position of stream , for the bound of that test on the first trajectories of , and for the position at which stream promotes. A run is one execution of Algorithm 1 with any such test; the events below are sets of runs. Let contain all data, candidates, and decisions before the first test of stream , and the randomness of the simulation environment during stream . The candidates depend only on by Assumption 4.3, as do the levels by assumption (checked for Dejavu at the end of the proof). Furthermore, trajectories of are i.i.d. samples of given . So by assumption the test satisfies
Every baseline policy is either or a candidate that ended some stream i by promotion. Hence
where is a false promotion in stream , and the inequality is a union bound with Assumption 4.4. It remains to show that the probability of a run containing any false promotions is bounded: .
Let be the event that no false promotion occurred in streams . The event is decided by the streams before , so it is -measurable. Then
Fix i. Let the false promotion event at position j of stream i be
so that . A false promotion at position has three necessary conditions that are jointly sufficient: stream reaches position , so no earlier candidate in the stream was promoted; the test at position passes, so at a buffer size that the test checks before it refuses or reaches its data budget; and the candidate is unsafe, so . Dropping the first condition, and keeping from the second only that at some , leaves two conditions that are necessary but not sufficient. Together they give , so the bound fails at that , and
The event on the right is larger than : it also contains , runs in which the bound of an unsafe candidate fails but the candidate is refused or never tested. Then
[Equation (45)]
[Equation (46)]
[union bound]
(47)
fixed given
[Equation (42)].
The union runs over every position the stream could reach, reached or not, because whether position is reached depends on . This is why the levels within a stream must be fixed when it opens and why the levels of tests that never happen are charged. Substituting Equation (47) into Equation (44), and exchanging the sum and the expectation by monotone convergence,
Fix one run and let be its first stream with a false promotion, if there is none, so that for and for . Let be the stream budget, the sum of the levels at every position of stream , reached or not. For , the promotion that ended stream was safe, so , and every other indicator is at most 1. Then
[definition of ]
[split off ]
(49)
[safe promotions before ]
[definition of ].
Let be the injections assigned to stream , as defined in Section 5. Assume and that the stream budget follows the fallback rule
that is, a stream's levels sum to its own injection plus the level of the test that promoted into it. Then , and for the sum telescopes:
If , the partial sum up to any is , since , so the same bound holds. This bound holds on every run, so Equation (48) gives , and Equation (43) gives .
It remains to check that Dejavu meets these conditions. Its test satisfies Equation (42) under Assumptions 4.1 and 4.2, by Equation (38) with Lemma 4.5. Algorithm 1 has the three properties of the level schedule assumed above. Its injections sum to by Equation (17). Its levels, set by Equation (18), in stream sum to
which is the fallback rule Equation (50), and those of stream 0 sum to since . The levels Equation (18) of stream depend only on the constant , on the passed level , which is set when stream promotes, and on the reserve fraction of Equation (19), which depends only on and on the index of the stream's first test. All three are determined before the first trajectory of is collected, so the levels are -measurable.
A.5. Proof of Proposition 6.1
Let test sit at position of stream , and condition on , everything observed before the stream starts together with the randomness of the simulation environment during the stream (Appendix A.4). The candidate is then fixed by Assumption 4.3, the level is fixed when the stream starts (Equation (18)), and the values are i.i.d, since the trajectories of the stream are i.i.d. samples of . The promotion time of Equation (15) is the number of production trajectories required to promote the candidate, and we wish to obtain upper and lower bounds on it.
The test works in units of (Equation (6)), so each quantity of Proposition 6.1 has a normalized counterpart, obtained by dividing by the range of the statistic:
the normalized threshold of Equation (22), and the normalized slack, normalized headroom and normalized second moment of about . The mean, slack and headroom split the range, , and because . In the capital of Equation (6) at , each trajectory gains at bet , to first order: the gain per unit bet has mean and second moment , and its largest loss, at , is the headroom , which sets the bet cap . The ratios of these quantities that enter Proposition 6.1 do not depend on :
The growth rate is the expected increase of the log-capital per trajectory at bet . The test's bets are , since is the cap of Appendix D at . The test promotes at the first with . For the argument of the growth rate lies in , since and .
Lemma A.1 (Expected data at a given growth rate). Condition on the start of the candidate's stream, so that the candidate is fixed and the values of the statistic are i.i.d. (as above). The promotion time of Equation (15) is the first buffer size at which the test condition holds, so by Equation (22) it equals .
(a) For any predictable bet schedule with values in , with when ,
(b) If every bet equals a fixed with , then almost surely and
Part (a) extends the fixed-bet bound of Waudby-Smith et al. (2025) to predictable bets in .
Proof. Write for the -th increment, so , and note since . (a) The bets are predictable, so given the first values the bet is fixed and has conditional mean . Hence is a martingale, with bounded increments since . If there is nothing to prove. Otherwise optional stopping applies to at , so . The left side is at least by the definition of , and . If the right side is at most zero, a contradiction, so . If ,
(b) The are now i.i.d. with mean and values in an interval of width , since every factor of Equation (6) is at least . For , Hoeffding's inequality gives , which is summable in , so . Wald's identity then applies to the i.i.d. increments and the stopping time . For the lower bound,
For the upper bound, the log-capital is below one step before promotion, and , so
The proofs use two bounds on the logarithm. For every x > -1,
which for is Taylor's theorem with a nonpositive third-order remainder, and for is the trapezoid rule applied to the convex function on . For every (Cesa-Bianchi et al., 2007),
Proof of the lower bound. For every ,
Dropping the quadratic term gives , and maximizing over all , at , gives . Hence
(63) which is Equation (23).
Proof of the upper bound. In normalized units the bet is , by Equation (54). For every ,
(64)
If , then and . Otherwise , so and . In both cases . Hence
which is Equation (24). Finally, by Equation (15).
How close the two bounds are. For , , so the upper bound Equation (24) exceeds the lower bound Equation (23) by at most the factor . The Dejavu test does not know and , so it cannot place ; its plug-in bets (Appendix D) are covered by the lower bound, and their cost above it is not analysed here.
A.6. Proof of Proposition 6.2
Throughout, is the normalized threshold of Equation (22), the history of the first trajectories, and the growth rate of Section 6, with and the bet cap of Proposition 6.1.
The rule uses an upper confidence bound on the maximum growth rate that holds at every buffer size,
We build from betting confidence sequences with the same plug-in bet schedule as the test (Waudby-Smith & Ramdas, 2024), run on the log-capital increments at a grid of fixed bets. By Lemma A.1 in Appendix A.5, the data a promotion needs is about .
Fix and work on the event of Equation (66), on which . Each bet is predictable, so it is fixed given , while is independent of ; hence the -th increment of the log-capital, , has conditional mean . Then
which is Equation (26). On the event of Equation (66), . If the early refusal rule
holds at (Equation (25)), then for every with ,
So at every buffer size the test can still reach, its expected log-capital is below the promotion threshold .
A.7. Proof of Proposition 6.3
Throughout, is a fixed candidate. Define its cost value function in the production and simulation environments,
so that and . Under Assumption 4.1, both lie in . The two environments share the cost kernel (Section 3).
Lemma A.2 (Simulation lemma for a fixed policy; Kearns & Singh, 2002; Luo et al., 2019). Define the one-step dynamics error . Then
and consequently with as in Equation (27).
Proof. Split the difference at the simulation initial distribution:
The first sum of Equation (71) is the initial-state term of Equation (70). For the second sum of Equation (71), the two environments share the cost, and both sums start from , so the telescoping lemma of Luo et al. (2019), with the production environment as their and the simulation environment as their M, gives
which proves Equation (70). For the bound, let , so that takes values in , and use that a function with values in satisfies for any distributions (Levin & Peres, 2017). Then
[Equation (70)]
[TV bound, ]
(73)
[definition of ]
[Equation (27)].
□
Under Assumption 4.2, the proof of Lemma 4.5 shows , the candidate's cost return truncated at the horizon. Then
(74) which is Equation (28).
The sim-to-real gap reduces the slack, and so increases the data cost (Proposition 6.1), only when the simulation environment is optimistic. An optimistic simulator has , and the production slack satisfies by Equation (74). When the simulation constraint binds, , so . The environments of Section 7 are constructed this way.
B. The Per-Step Clip Alternative
This appendix explains why Dejavu clips the cumulative importance weight rather than each per-step importance weight, as Retrace (Munos et al., 2016) and V-trace (Espeholt et al., 2018) do. The short version: clipping the cumulative weight discards importance mass only when the whole product drifts above , and the resulting bias is bounded above by the discarded mass (Proposition 4.6). Clipping each per-step weight discards mass at every step where the policies differ, before increments above and below one can offset, and the resulting bias has a lower bound that no amount of production data reduces (Proposition B.1). The setting and the two identities of Appendix A.2 are used throughout.
B.1. The per-step alternative
The per-step clip replaces each factor of the product by for a level , giving the statistic
Each clipped factor is at most , so the clipped product at step is at most and, with ,
This is the analogue of the range in Equation (10). It stays bounded as grows only if , that is, . Above that level it grows like , and since the headroom , which grows with the range, enters the range term of both bounds of Proposition 6.1 linearly, such a level is unusable at the horizons of Section 7. The admissible per-step clip levels are therefore .
Proposition B.1 (Per-step clip bias lower bound). Under the conditions of Proposition 4.6, for any ,
Proof. By the same factor bound as in Equation (76), but keeping the cost, on every trajectory, since . Taking expectations,
Subtracting from gives Equation (77).
The right-hand side of Equation (77) does not involve the buffer, so no amount of production data reduces it. It is informative when the candidate is costlier than the baseline policy, which is exactly the case a test exists to detect. At , the level used by Retrace and V-trace, the right-hand side is for every : the per-step-clipped statistic cannot see any of the cost the candidate adds over the baseline policy. Levels of above one recover some of it, but admissibility forces as . In contrast, the bound of Proposition 4.6 on the cumulative clip is zero whenever the retained mass is one, whatever the candidate's cost.
B.2. Why the two clips behave so differently
Write the cumulative importance weight in log space as the random walk
At any state where the policies differ, is a nonconstant nonnegative random variable over with mean one by Equation (34). So it takes values on both sides of one, , and by Jensen's inequality its logarithm has negative mean, . The walk therefore drifts downward on average, with increments that are positive on a positive fraction of steps.
The cumulative clip acts on the sum, . Positive and negative increments offset inside before the clip is applied, and the clip binds only if the walk climbs all the way from its downward drift to . With a small anchor this requires a long run of positive increments, which is why the anchor of Equation (9) makes Assumption 4.2 hold in practice, and why the mass it discards can be audited through .
The per-step clip acts on each increment, , before any offsetting. Since
every step adds a nonnegative leak to the downward drift, strictly positive at every state where . The leaks accumulate over steps and are never recovered, and the mass they remove is what Proposition B.1 measures. The leak is large whenever the spread of is large relative to , which the next paragraph quantifies.
Fix a state , take the action space discrete so that sums are finite, and write with small and , since both are probability distributions. Then for . Using and dropping terms of order ,
Since is of order , . The same expansion of the KL divergence gives
so that, to second order in ,
Both KL directions equal at this order, so the exact mean is also . At a state with divergence , the per-step log-weight therefore has mean and standard deviation . For small divergences the standard deviation is far larger than the absolute value of the mean, so a positive draw of , on which the per-step clip binds once it exceeds , is ordinary fluctuation rather than a rare event.
The example . Admissible levels then satisfy , and any draw of above is clipped by the per-step clip. By Equation (83) the standard deviation of exceeds 0.01 as soon as at that state, a divergence far too small to allow any useful policy change. Take . Then has mean and standard deviation 0.045, so a draw less than a quarter of a standard deviation above its mean is already clipped. Each clip removes from the log-weight, and the removal is permanent: later negative increments are added to the clipped value, not to the original. This is the leak of the previous paragraph, it recurs at every state where the policies differ, and its accumulation is what the lower bound of Proposition B.1 measures. The cumulative clip sees the same increments but clips only the running sum , and only once exceeds , fifty times the admissible per-step level . No single step can reach that: the sum has to climb through many positive increments that negative ones did not cancel, and whether it ever does depends on the drift and the horizon of the whole walk. That is what the retained mass can measure.
C. The Doubly-Robust Statistic
Dejavu computes its statistic by importance weighting alone in Equation (10). The doubly-robust estimator (Jiang & Li, 2016; Thomas & Brunskill, 2016) is the natural alternative: it subtracts a cost model trained in simulation as a control variate and can have a lower variance than the plain importance-weighted estimator. Let be a per-step cost estimator trained in the simulation environment, with residual and candidate expectation . Clipping and truncating the estimator as in Equation (10) gives the doubly-robust statistic
(84) with , whose values lie in rather than (shown below). This raises the headroom of Proposition 6.1 from to , at least double since , which a cost model cannot reduce, whereas the variance term it can. A poor cost model does not bias the doubly-robust statistic but can raise its variance above that of , which is the member of the same family with . The statistic a test runs on must be fixed before its buffer is collected (Assumption 4.3), so the doubly-robust form cannot be adopted only on tests where its model helps; its enlarged range would be paid on every test.
Let the cost model take values in , as the costs do (Assumption 4.1). Then for every step ,
where the last pair holds because each clipped cumulative weight is a product of nonnegative factors capped at . Multiplying,
so each summand of Equation (84) lies in . Summing the discount series,
which is , an interval of width against the width of in Equation (10). The betting confidence sequence of Section 3 requires values in , so a test run on the doubly-robust statistic would normalize by , and Proposition 6.1 holds with the range width in place of and the headroom in place of .
D. Bet Schedule and Computation
For reproducibility we record the bet schedule and the search procedure. We use the predictable plug-in schedule of Waudby-Smith & Ramdas (2024), with running mean and variance estimates
the bet at sample j is
is monotone in , so is computed by binary search on , evaluating in log space; 40 iterations resolve beyond single-precision limits. Because validity holds for any predictable schedule, none of these implementation choices affect the guarantees, only tightness.
E. Experimental Details
Every result uses 20 seeds. For each seed, every method starts from the same initial policy and faces the same draw of the production environment. Tables 1 to 3 give the settings and Table 4 the production data consumed.
Ground truth evaluation. We estimate a policy's production cost return by , the mean discounted cost return of held-out production episodes of . On HalfCheetahVelocity and PointGoal we run 256 episodes of 1000 steps, and add batches of 256 episodes, up to 2048, while is within two standard errors of , so that policies near the limit are classified as safe or unsafe with more episodes. On IcyLake 1024 environments each run 1000 steps with automatic resets, giving at least 10,240 episodes. Across methods, every policy deployed to production is evaluated this way, apart from CPO which is evaluated at regular update intervals defined in Table 3.
Tuning budget. A default setting for Dejavu's anchor coefficient and clip level were chosen by results on an external lightweight benchmark not including the CRAX environments, and are applied in Table 3. The other settings were chosen based on existing sensible defaults on other popular RL methods and the environment data constraints. CPO's trust-region
Table 1. Settings shared by every method.
| Setting | Value |
|---|---|
| Seeds | 20 |
| Root seed | 0 (1 for CPO's production training) |
| Prod param seed | 101, 202, 0 (HalfCheetahVelocity, PointGoal, IcyLake) |
| Policy | diagonal Gaussian (HalfCheetahVelocity, PointGoal); categorical (IcyLake) |
| Networks | actor, reward critic and cost critic, each , tanh |
| Optimizer | Adam, , learning rate , gradient-norm clip 0.5 |
| Reward discount | 0.99 |
| Cost discount | 0.99 |
| GAE parameter | 0.95 |
Table 2. Environment settings, identical across methods. Production parameters are drawn once per seed, uniformly over the range shown. *Selected among (HalfCheetahVelocity, warm-started from an unconstrained policy) or (PointGoal) by a 64-episode evaluation at the most adverse corner of the production range.
| Setting | HalfCheetahVelocity | PointGoal | IcyLake |
|---|---|---|---|
| Cost trigger | speed > 3.21 m/s | in a hazard or by a wall | on an icy tile |
| Cost limit | 5 | 8 | 1.4 |
| Simulation cost limit | 5 | 8 | 1.4 |
| Cost bound | 1 | 1 | 1 |
| Episode length | 1000 | 1000 | 100 |
| Horizon | 1000 | 1000 | 100 |
| Simulation environment | gain, mass, damping 1 | gain, mass, damping 1 | success 0.50 |
| Production gain | [1.1, 1.3] | [1.1, 1.3] | - |
| Production mass | [0.9, 1.0] | [0.9, 1.05] | - |
| Production damping | [0.8, 1.0] | [0.65, 0.9] | - |
| Production actuator lag | none | one step (previous action applied) | - |
| Production success | - | - | [0.30, 0.40] |
| Initial policy | CRPO in simulation, | CRPO in simulation, | fixed, biased to one action |
settings are those of the reference implementation of Ray et al. (2019), and its networks, critic steps and batch size are the shared settings of Tables 1 and 3. HCPI keeps the train split, per-test level and test-set handling of Thomas et al. (2015b), with one CPO step on the training episodes as its candidate search. SPiDR's pessimism coefficient , the weight of the penalty in its penalized cost, follows As et al. (2025, Appendix E), with one added condition. Its starting value makes the penalty, whose mean per step is estimated in the simulation environment, about as large as the largest per-step cost, which is 1 in every environment: , 0.66 and 120 on HalfCheetahVelocity, PointGoal and IcyLake. Then is lowered over about five values, each run on 3 production seeds, and we keep the value with the highest final reward among those with the fewest seeds ever deploying a policy with . The added condition is that a value of is used only if some policy keeps its discounted cost plus times its discounted penalty within in the simulation environment. Otherwise SPiDR's constraint cannot be met, and its constrained optimizer (CRPO Xu et al. (2021)) only takes steps that lower the penalized cost, never steps on the reward. The values of were on HalfCheetahVelocity, on PointGoal (starting below ) and on IcyLake ( fails the condition), giving 0.1, 0.1 and 5 (Table 3).
Table 3. Per-method settings. Simulation training (rows marked †) is shared by the Dejavu proposer and SPiDR.
| Method | Setting | HalfCheetahVelocity | PointGoal | IcyLake |
|---|---|---|---|---|
| Dejavu | Tests (maximum) | 50 | 50 | 40 |
| Simulation steps per test† | 4.1M | 4.1M | 4.1M | |
| Parallel simulation environments† | 256 | 256 | 256 | |
| Rollout length, epochs, minibatch† | 128, 4, 512 | 128, 4, 512 | 128, 4, 512 | |
| Ratio clip, reward and cost† | 0.2, 0.05 | 0.2, 0.05 | 0.2, 0.05 | |
| Value-loss coefficient† | 0.5 | 0.5 | 0.5 | |
| Entropy coefficient† | 0.0075 | 0.0075 | 0.02 | |
| Anchor coefficient (Equation (9)) | 2 | 2 | 2 | |
| Clip level ln ρmax | 1.0 | 1.0 | 1.0 | |
| Chunk size n0 | 32 | 32 | 64 | |
| Data budget per test Nmax | 1024 | 1024 | 4096 | |
| Production budget (steps) | 10M | 10M | 1M | |
| Initial-policy trajectories | 256 | 256 | chunks of 64 until it passes, at most 1024 | |
| Lifetime budget α, initial απ0 | 0.075, 0.025 | 0.075, 0.025 | 0.075, 0.025 | |
| Early-refusal level (Equation (66)) | 0.1 | 0.1 | 0.1 | |
| Early refusal checked from | 256 trajectories | 256 trajectories | 256 trajectories | |
| Retained mass (mean) | 0.80 | 0.92 | 0.98 | |
| SPiDR | Pessimism coefficient λ | 0.1 | 0.1 | 5 |
| Ensemble size | 8 | 8 | 8 | |
| Randomized parameter | gain, [1.0, 1.4] | gain, [1.0, 1.4] | success, [0.25, 0.55] | |
| Anchor coefficient | 4 | 4 | 2 | |
| Tests | 30 | 30 | 10 | |
| CPO | Production environments, rollout | 64, 128 | 64, 128 | 64, 128 |
| Production budget (steps) | 10M | 10M | 1.05M | |
| Trust region | 0.01 | 0.01 | 0.01 | |
| Backtracking (coefficient, steps) | 0.8, 10 | 0.8, 10 | 0.8, 10 | |
| CG damping, full-batch critic steps | 0.1, 40 | 0.1, 40 | 0.1, 40 | |
| Evaluation freq | 25 updates | 25 updates | 8 updates | |
| HCPI | Episodes per iteration (train, test) | 320 (64, 256) | 320 (64, 256) | 320 (64, 256) |
| Test level δ, per test | 0.075 | 0.075 | 0.075 | |
| CPO trust region, step sizes | 0.01, {1, 1/2, 1/4, 1/8} | 0.01, {1, 1/2, 1/4, 1/8} | 0.01, {1, 1/2, 1/4, 1/8} | |
| Production budget (steps) | 10M | 10M | 1M |
Table 4. Production steps consumed per seed, mean (maximum) over seeds. Dejavu includes the initial policy's certification. Tuning trials and truth evaluations are not counted for any method.
| Method | HalfCheetahVelocity | PointGoal | IcyLake |
|---|---|---|---|
| Dejavu | 9.57M (9.98M) | 8.65M (9.98M) | 0.80M (1.00M) |
| SPiDR | 0 | 0 | 0 |
| CPO | 10M | 10M | 1M |
| HCPI | 9.86M (9.86M) | 9.86M (9.86M) | 0.98M (1.00M) |