arXiv:2610.29149eess.SYOct 2026

Manuscript Offprint

arXiv:2610.29149

SAFTER: Safety-Aware Filtering Through Explicit Recoverability for Robust Reinforcement Learning under Distribution Shift

Benedictus C. G. Cinun, Bin Hu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Learning safe policies that generalize to unseen environments is difficult under bounded actuation, where an unsafe decision may become unrecoverable. Conventional control barrier function (CBF) filters enforce only instantaneous safety and ignore future recoverability. We propose SAFTER (Safety-Aware Filtering Through Explicit Recoverability), which embeds a differentiable, closed-form backup-CBF filter into Soft Actor-Critic training. SAFTER unifies current safety, finite-horizon backup safety, terminal recoverability, and input admissibility into a single differentiable certificate. Its CBF condition yields an exact minimum-intervention projection without iterative online optimization. In quadruped navigation, SAFTER reaches 90% training success with 30.6% fewer transitions than Vanilla SAC and 34.1–35.1% fewer than current-state CBF-filtered SAC baselines. Across unseen simulated environments, SAFTER improves success by up to 42.4 and 61.4 percentage points over the state-of-the-art methods CBF–RL and SEA–Nav, respectively, and achieves 73.3% and 76.7% success on two real-world navigation maps. Ablations identify accurate differentiation through the safety filter as a key contributor to robustness, in which replacing the projection Jacobian with the identity approximation reduces success rate in a High-Shift environment from 61.4% to 6.2%. These results show that recoverability-aware filtering serves as both a runtime safety mechanism and a learning mechanism for sample-efficient, robust policies.

1 INTRODUCTION

Reinforcement learning (RL) can produce adaptive navigation policies directly from interaction and local sensory observations, but trial-and-error exploration can generate unsafe actions during both training and deployment (Brunke et al., 2022; Guerrier et al., 2024; Xu et al., 2023). Reward penalties can discourage collisions or constraint violations, yet they provide only an indirect learning signal and do not ensure that each executed action satisfies a prescribed safety condition (Krasowski et al., 2023). For safety-critical robotic navigation, a useful learning architecture should therefore protect the system during interaction while still allowing the policy to improve from the intervention it receives.

Control barrier functions (CBFs) provide a principled way to enforce state constraints by minimally modifying a nominal control input so that a safe set remains forward invariant (Ames et al., 2019). This reactive view, however, is incomplete under bounded actuation. A system can satisfy all instantaneous geometric constraints and still enter a state from which the available control authority is no longer sufficient to prevent a future violation. Backup CBFs (bCBFs) address this distinction by asking a stronger question: if the nominal behavior becomes unsafe, does a prescribed recovery maneuver remain feasible over a finite horizon and reach a terminal safe set? (Gurriet et al., 2018; Chen et al., 2021). This notion of future recoverability is particularly relevant to learning-based navigation because the policy should ideally avoid actions that are safe only momentarily but eliminate subsequent braking or avoidance authority.

The challenge is to make this predictive notion of safety practical inside RL training. A sampled bCBF introduces many simultaneous conditions: current-state safety, safety at multiple future backup states, terminal recoverability, and bounded-input constraints. Direct enforcement therefore leads to a multi-constraint online optimization that must be solved at every environment interaction. Existing work has separately developed smooth CBF composition, closed-form CBF filters, backup-based safe sets, and differentiable safety layers (Rabiee & Hoagg, 2025; Wang et al., 2025; van Wijk et al., 2026; Yun et al., 2026). What remains important for learning is a formulation that preserves finite-horizon backup recoverability, handles bounded commands, collapses the resulting constraint collection to an analytical minimum-intervention map, and exposes the exact filter Jacobian to the task policy during training.

We introduce SAFTER, a recoverability-aware safety-filtered RL framework built around this objective. Figure 1 summarizes the central idea. The actor proposes a task-oriented nominal action. SAFTER predicts a prescribed backup maneuver, composes current, future, terminal, and input-admissibility conditions into a single differentiable certificate, and projects the nominal command through an exact closed-form safety map. During training, the filtered action is the action actually executed and evaluated by the critic, while the actor differentiates through the analytical safety correction. During deployment, the actor is frozen and the same filter remains active. Thus, the safety layer is used not only to shield the robot but also to shape what the policy learns.

Our contributions are threefold. First, we construct a recoverability-aware composite certificate that combines current-state HOCBF conditions, sampled backup-horizon safety, terminal recoverability, and bounded-input admissibility after control-input augmentation. The construction reduces the sampled predictive-safety conditions to one affine CBF constraint whose exact minimum-intervention solution is available in closed form. Second, we embed this analytical filter directly into SAC so that the critic learns from executed filtered actions and the actor receives gradients through the exact recoverability-aware filter mapping. Third, controlled quadruped experiments separate learning efficiency, policy internalization, distribution-shift robustness, and filter-gradient effects. The results show faster transition-based convergence in a matched moderate-speed study and substantially improved navigation success in unseen, geometrically shifted environments; ablations identify the analytical filter Jacobian as an important learning mechanism.

References (72)