Introduction
Deep Reinforcement Learning (RL) has achieved remarkable success in complex environments like Atari games. However, these agents often suffer from a "distraction" problem: they overfit to raw pixel data and learn spurious correlations rather than the underlying game logic. This paper introduces OCCAM (Object-Centric Attention via Masking), a method designed to enhance robustness by filtering out irrelevant background details and focusing the agent's attention on task-relevant objects.
The Distraction Problem
Standard RL agents, such as those using Deep Q-Networks (DQN) or Proximal Policy Optimization (PPO), typically process raw video frames. While effective in static training environments, these agents are often "lazy," relying on shortcuts—like the position of a static background element—to predict rewards. When the environment undergoes even minor visual perturbations (e.g., color shifts or background noise), the performance of these agents often collapses because the learned shortcuts no longer hold. Previous attempts to solve this via symbolic data (like coordinate lists) often lost vital spatial information or required complex, task-specific engineering.
The OCCAM Framework
Inspired by Occam’s Razor, the authors propose that the simplest representation is often the most robust. OCCAM implements a "hard attention" mechanism by masking out everything in a video frame except for the objects.
The framework follows a multi-step process:
- Detection: Identifying objects within the raw state.
- Masking: Creating a mask that isolates these objects.
- Classification: Categorizing objects to provide different levels of abstraction.
The researchers explored four distinct levels of visual abstraction to determine the optimal balance between detail and generalization:
- Object Masks: Retains original object colors and textures but removes the background.
- Binary Masks: Simplifies all objects into white blocks on a black background, removing color and texture distractions.
- Class Masks: Assigns unique colors to different object categories (e.g., all enemies are red, the player is green).
- Planes: Decomposes the scene into multiple binary layers, one for each object class, similar to how chess AI represents pieces.
Because these abstractions remain in an image-like grid format, they can be plugged directly into standard Convolutional Neural Networks (CNNs) without requiring changes to the agent's architecture.
Experimental Setup and Results
The authors evaluated OCCAM using the Atari Learning Environment (ALE) and the HackAtari framework, which allows for systematic perturbations of game logic and visuals. Testing across 12 diverse games, including Pong, Breakout, Freeway, MsPacman, and Skiing, revealed several key insights:
- Robustness to Visual Noise: OCCAM agents maintained high performance under color shifts and sprite changes that caused standard pixel-based agents to fail. For instance, while a standard PPO agent might fail if an enemy's color changes, an OCCAM agent using Binary Masks is indifferent to such cosmetic shifts.
- Solving the "Pong Misalignment": In Pong, standard agents often learn to track the opponent's paddle rather than the ball. If the opponent stops moving (a "Lazy Enemy" perturbation), these agents fail. OCCAM's "Planes" abstraction enforces a focus on all objects, mitigating this specific type of shortcut learning.
- Performance Parity: Despite the reduced input information, OCCAM-based agents matched or exceeded human-level performance (Human Normalized Scores > 1.0) in half of the tested environments. In complex tasks like MsPacman, the structured abstraction actually led to superior performance over raw pixel baselines.
- Spatial Importance: The study found that 2D masks significantly outperformed "Semantic Vectors" (one-dimensional lists of object coordinates). This indicates that preserving the spatial relationships between objects in a grid format is vital for the CNN's feature extraction and policy learning.
- Generalization: In MsPacman, removing maze textures via Binary Masks actually improved the agent's ability to generalize to new levels, proving that texture is often a distraction rather than a useful feature for navigation-heavy tasks.
Conclusion
OCCAM demonstrates that "less is more" in deep reinforcement learning. By enforcing an object-centric bias through simple masking, agents become significantly more robust to environmental changes without the need for complex symbolic reasoning or specialized architectures. While the current implementation relies on an external object detector and remains sensitive to changes in underlying game physics, it provides a powerful foundation for building AI that focuses on the actors, not the stage.
Summary updated