# Poster 30963

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/30963

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi everyone, I'm Tristan, and on behalf of my co-authors Meng Fang and Mikola Peczynski, I'll introduce Hazard, a new game benchmark for Safe RL. Reinforcement learning benchmarks face numerous challenges, and there is a lack of environment standard for particular domains. As a result, researchers often resort to ad hoc adaptations, spending time customizing environments instead of focusing on their core research.
Once such domains is safe RL. The core focus among existing benchmarks has been on physics-based environments for continuous control, where the observations are mainly proprioceptive and the environment is usually fully observable. The motivation for this is clear, we don't want our robots to break stuff. But of course, safe RL exists in other formulations, an important one being learning from imagery. Several safety environments exist for this as well.
However, they all focus on safe navigation, requiring the agent to move to some location while avoiding collisions. This makes life very easy for the cost critic, which many safe RL methods utilize. If the safety hazard is close to the agent in the middle of the screen, a collision is very likely, so the cost critic has assigned a high cost value for such a scenario, whereas if no such safety hazard is visible, it is likely a low cost scenario. Although these environments are designed with their own focus in mind,
There are competencies that they don't measure. To address this, we introduce HAZARD, a safe RL benchmark tailored for vision-based learning. It features six tasks requiring nuanced comprehension and decision-making for efficient solutions. We include three levels of difficulty and two action spaces to challenge future methods while offering an easier training loop.
The training objective is to maximize rewards while limiting costs. We assign a default cost budget to each task and run some popular baselines. PPO only cares about high rewards, while PPO cost naively treats costs as negative rewards. The Lagrange and PID Lagrange versions closely meet the thresholds with the latter yielding higher rewards. And finally, P3O and PPO saute occasionally exceed the cost budget.
We can of course vary the safety threshold. Adhering to a tighter budget requires a sacrifice of rewards while looser bounds allow for more unsafe behavior and this trade-off appears in all tasks.
Since most tasks involve navigation, we can investigate what insights we can gain from the agent's movement. Taking remedy rush as an example where the agent has to gather vials while avoiding all other items, we can visualize the environment as a 2D map in a top-down view and then overlay an evolving heat map of the agent's most frequently visited locations during training. Since PPO neglects costs, the outcome is rather straightforward. In contrast, observing the policy evolution of PPO PID reveals a different pattern.
pattern. The agent starts out similar to PPO of training high rewards with high costs, but then nearly stops moving entirely to meet the safety budget and then slowly optimizes for a safe policy. In Precipice Plunge, the agent has to reach the bottom of the cave without falling. PPO finds that the most efficient way to accomplish this is to take a direct leap down, while PPO-PID learns to carefully follow the winding staircase to mitigate fall damage and eventually obtain nearly the same rewards as PPO.
We increase task difficulty not only by tweaking configuration parameters but introducing new mechanics. For instance, as armament burden, the agent has to collect and deliver weapons while not exceeding its carrying load. Level 2 then adds obstacles and a more complex terrain while Level 3 introduces decoy items and acid pits. The heatmap overlays reveal how these added challenges increasingly inhibit the agent's movement, making it stay closer to the starting zone on the left.
In collateral damage, Dajin has to shoot enemies without harming the neutral units, and higher levels increase the challenge. And Dajin struggles to learn a good policy, so perhaps this can be improved by learning the levels sequentially. So instead of training directly on level 3, we split the data budget equally across levels and train sequentially. The curriculum trained agent takes more calculated risks, achieving 30% higher rewards with the same cost. On Remedy Rush, the improvement is even three-fold.
We can assess the visual complexity of hazard by creating simplified representations of the observations, such as through segmentation. This makes it easier for the agent to learn the task. Another approach would be to include the depth information as a fourth channel to the input. This again simplifies learning for the agent when spatial relationships matter.
We have integrated hazard with sample factory for efficient training, enabling high FPS and frequent policy updates. We run the same algorithm using identical hardware on Safety Gymnasium, the benchmark closest to our work. Compared to its out-of-the-box integration with OmniSafe, hazard runs orders of magnitude faster. To increase the challenge, we include a setting that uses the game's original full action space. This noticeably raises the task difficulty.
On level one, the agent is often still able to learn a meaningful policy, although much slower. However, in level three, that is generally not the case. We expect these higher complexity settings to be a proper challenge for future safe RL methods. And with that being said, I'd like to thank you for your attention.
