Bavo Lesy, Arne Troch, Nigel De Meulder, Ali Anwar, Siegfried Mercelis
Reinforcement learning (RL) from pixels has achieved strong performance in simulated environments but faces challenges before it can be deployed in real-world, safety-critical domains due to diverse visual conditions and safety constraints. Existing vision-based RL methods often encode task-irrelevant features from observations, which can distract the agent, reduce performance, and limit policy generalization. While approaches have been proposed to tackle this problem, they are not directly suited for policy learning under safety constraints. We propose Safety-Aware Invariant Representations (SAIR), a bisimulation-based approach that learns behaviorally equivalent latent representations while incorporating safety considerations in a Constrained Markov Decision Process (CMDP) setting. To evaluate SAIR, we introduce the Distracting Safety Gymnasium, an openly available safety benchmark with visual distractions based on previous distraction and safety benchmarks. Experimental results show that SAIR outperforms existing SafeRL methods in dynamic distraction settings.
Colors can either be statically set at the start of episodes, or be dynamic and change at every timestep. The rate of change and the color variation intensity can all be configured when creating the environment.
Users have the ability to change the background of the environment to either static images or dynamic videos. Users can also add their own visuals.
Users can configure which objects in the safety gymnasium are affected by the color changes. In this example, the goal, hazards and vases are set to dynamically change color
The code for the distracting-safety-gymnasium can be found here: https://github.com/BavoLesy/distracting-safety-gymnasium. The authors are unable to release source code for the SAIR algorithm at this time. However, trained weights and evaluation scripts are also included and readers are encouraged to contact the first author with any questions.