NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learn to Interpret Atari Agents

Zhao Yang, Song Bai, Li Zhang, Philip H. S. Torr

Abstract

This paper introduces RS-Rainbow, a Deep Reinforcement Learning (DeepRL) agent that integrates a region-sensitive attention module into the state-of-the-art Rainbow DQN architecture. Unlike traditional a-posteriori interpretation methods, RS-Rainbow's attention mechanism is innate, improving both performance and interpretability. We evaluate the model on the Arcade Learning Environment, where it achieves significant performance gains—up to 555% in Space Invaders—while providing real-time visualizations of its strategic focus.

Introduction

Deep Reinforcement Learning (DeepRL) agents have achieved superhuman performance in complex environments like Atari 2600 games, yet they often remain "black boxes." Understanding why an agent chooses a specific action—such as dodging an enemy versus chasing a power-up—is critical for trust and safety.

Existing interpretation methods typically generate saliency maps after training, which requires significant computational overhead and does not aid the agent during the learning process. The authors propose Region-Sensitive Rainbow (RS-Rainbow) to bridge this gap. By embedding an attention mechanism directly into the model, the agent develops an innate ability to visualize its focus, which simultaneously serves to improve its learning efficiency and final performance.

Methodology: The Region-Sensitive Module

RS-Rainbow builds upon the "Rainbow" agent, a powerful combination of several Deep Q-Network (DQN) improvements. The core innovation is the addition of a Region-sensitive Module between the image encoder and the policy layers.

The RS-Rainbow architecture featuring the Region-sensitive Module, which masks features to highlight important spatial regions before decision-making.

The module operates through four key stages:

  1. Image Encoding: A standard Convolutional Neural Network (CNN) processes raw game frames into high-level feature maps.
  2. Attention Mapping: These features pass through two 1x1 convolutional layers to generate $N$ "score maps."
  3. Feature Masking: The score maps act as spatial filters, emphasizing critical regions (e.g., moving cars or ghosts) and suppressing irrelevant background noise.
  4. Integration: The filtered features are combined with the original feature maps via element-wise multiplication (Hadamard product) before proceeding to the final decision-making layers.

To visualize the agent's "gaze," gradients are backpropagated from the attention module to the input frames, revealing exactly which objects the agent tracks in real-time.

Experimental Setup

The model was evaluated using the Arcade Learning Environment (ALE) across eight popular Atari 2600 games: Beam Rider, Breakout, Enduro, Frostbite, Ms. Pac-Man, Pong, Seaquest, and Space Invaders. The researchers also tested the method's versatility on Airstriker-Genesis via Gym Retro.

Results and Interpretability

RS-Rainbow significantly outperformed the standard Rainbow implementation in seven out of the eight games tested. Notable performance gains include a 555% improvement in Space Invaders and a 233% improvement in Seaquest. In Ms. Pac-Man, the agent achieved a score of 7,219.3, outperforming other state-of-the-art methods like Distributional DQN.

Beyond raw scores, the region-sensitive module provides qualitative insights into the agent's strategies.

Visualizations of RS-Rainbow's "gaze" across various Atari games, showing the agent's focus on key game elements like enemies, players, and goals.

Key observations include:

  • Strategic Focus: In Enduro, the agent naturally splits its focus into two "gazes": one to track its own car and another to scan the horizon for upcoming traffic.
  • Emergent Planning: In Ms. Pac-Man, the gaze was observed "looking ahead" at tunnel exits before the agent even entered the tunnel, suggesting path planning rather than simple reaction.
  • Contextual Awareness: The agent ignores the score board in Enduro during general play but focuses on it when nearing level completion—a behavior dubbed "counting down" to victory.
  • Failure Analysis: Visualizations revealed that in "Smog" conditions in Enduro, the agent's gaze wanders aimlessly, explaining its performance drop in low-visibility scenarios.

Conclusion

RS-Rainbow demonstrates that interpretability and performance can be mutually reinforcing in DeepRL. By forcing the model to identify and attend to important regions, the agent performs internal feature engineering that accelerates learning. While the current $7 \times 7$ attention grid is somewhat coarse, future work could explore multi-scale features for finer object-level analysis and extend the method to continuous action domains and multi-agent systems.

Summary updated

BibTeX
@misc{yang2018learn,
  author = {Zhao Yang and Song Bai and Li Zhang and Philip H. S. Torr},
  title = {{Learn to Interpret Atari Agents}},
  year = {2018},
  eprint = {1812.11276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.11276},
}
Figure