Abstract
While deep reinforcement learning (deep RL) agents are effective at maximizing rewards, it is often unclear what strategies they use to do so. In this paper, we take a step toward explaining deep RL agents through a case study using Atari 2600 environments. In particular, we focus on using saliency maps to understand how an agent learns and executes a policy. We introduce a method for generating useful saliency maps and use it to show 1) what strong agents attend to, 2) whether agents are making decisions for the right or wrong reasons, and 3) how agents evolve during learning. We also test our method on non-expert human subjects and find that it improves their ability to reason about these agents. Overall, our results show that saliency information can provide significant insight into an RL agent's decisions and learning behavior.
Introduction
Deep Reinforcement Learning (RL) agents have achieved superhuman performance in complex environments like Atari 2600 games. However, these agents often remain "black boxes"—we can observe their success, but the underlying reasoning for specific actions remains opaque. This lack of transparency is a significant barrier to building trust and reliability in AI systems. Previous visualization tools, such as Jacobian saliency (which relies on gradients), often produce noisy and uninterpretable maps. This research seeks to bridge the gap by developing a visualization tool that is both technically grounded and intuitive for humans to interpret.
Perturbation-Based Saliency
The authors introduce a perturbation-based saliency technique to identify which parts of the input frame are most influential to an agent's policy. Instead of analyzing raw gradients, the method asks: "If I remove information from this specific part of the screen, how much does the agent's plan change?"
The process involves applying a localized Gaussian blur to a small region $(i, j)$ of the input frame. Blurring is chosen over solid masks to remove detail without introducing artificial sharp edges that might confuse the neural network. The saliency is then calculated by measuring the difference between the agent’s original action scores (logits) and the scores produced when the screen is blurred.
The method generates two types of maps:
- Actor Saliency: Highlights regions critical for deciding which action to take (typically shown in blue).
- Critic Saliency: Highlights regions critical for estimating expected rewards (typically shown in red).
Understanding Agent Strategies
By applying this method to agents trained with the A3C algorithm on various Atari games, several key insights emerged:
- Strategic Attention: In Pong, agents exhibit a "lazy" attention pattern, barely looking at the ball when it is far away. Because the environment is deterministic, the agent focuses on its own paddle until the ball is close enough to require precise timing.
- Mode Switching: In Breakout, agents transition into a "tunneling mode." Saliency maps show the Critic network suddenly focusing intensely on the corners of the brick wall just before the ball breaks through to the top.
- Identifying "Cheaters": Saliency maps can distinguish between robust learning and overfitting. In a modified environment with "hint pixels" (cheats), saliency revealed that overfit agents ignored the game logic to stare at the hints, whereas robust agents tracked the actual game objects.
- Failure Analysis: In MsPacman, the agent failed to track ghosts effectively, instead using the density of dots in corridors as a proxy for its location, leaving it vulnerable to enemies.
Key Results and Human Evaluation
The perturbation method produces significantly cleaner and more human-readable saliency maps compared to traditional gradient-based methods like Jacobian saliency.
To validate the interpretability of these maps, the authors conducted a study with 31 non-expert participants. When shown saliency maps, participants were significantly better at identifying whether an agent was using a robust strategy or a "cheating" strategy based on hint pixels. Without these maps, participants were often unable to distinguish between the two, highlighting the value of saliency for human-AI trust.
Limitations and Future Work
While effective for visual inputs, the method faces challenges in non-visual state spaces. Additionally, while saliency shows what an agent is looking at, it does not fully explain the logical "if-then" reasoning used to process that information. Future work aims to extend these visualizations to recurrent memory states (LSTMs) to understand how agents remember past events, moving beyond instantaneous visual attention.
Summary updated