Teach the Shield, Don't Remove It: A Multi-Seed Reproducibility Study of Shield Dependency in Deep Reinforcement Learning
Shields block unsafe actions during reinforcement learning (RL). Two papers disagree on whether a shielded agent stays safe once the shield is gone: Carr et al. (2023) report that it does, especially if the shield is faded out gradually, while Könighofer et al. (2022) report that shielded agents violate the specification more often than unshielded ones, even when blocked actions are penalised (an informed shield). Neither reports how many training runs its results rest on. We test four of their claims with DQN, PPO and REINFORCE, 10 seeds per configuration, permutation tests with a Holm correction and explicit verdict rules, in two of the domains of Carr et al., in single-player Snake and in a re-implementation of the two-player Snake of Könighofer et al. Shields speed up learning, and a shielded policy deployed without its shield is much less safe: in Snake, its fill of the board drops from 98% to 9%. Fading the shield out at most halves the violations during training, against the 70 to 100 times reported, mostly because fewer steps are played without the shield, and its final policies are no better than after a sudden switch-off. The informed shield, in contrast, yields policies at least as safe without the shield as those trained without one, with DQN in every environment; with PPO in Snake it needs a ten times larger penalty, chosen post hoc, and in the two-player game it makes the agents passive. Teaching the shield is the only regime we test that is safe both during training and after the shield is removed.
Authors
- Jaime del Campo Montaña (ORCID: https://orcid.org/0009-0003-6195-3788)
Institutions
- Universidad Carlos III de Madrid (ES)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-01
- DOI
- https://doi.org/10.5281/zenodo.24699929
- Primary Topic
- Reinforcement Learning in Robotics
- Type
- preprint