arXiv:2611.09344cs.LGNov 2026

Manuscript Offprint

arXiv:2611.09344

Probably Safe Sim-to-Real Transfer with Lifetime Validity

Rohan Tangri, Jan-Peter Calliess

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.