Self-Supervised Discovering of Interpretable Features for Reinforcement Learning

Wenjie Shi, Gao Huang, Shiji Song, Zhuoyuan Wang, Tingyu Lin, Cheng Wu

TL;DR

This paper introduces a novel self-supervised framework (SSINet) that generates interpretable attention masks for vision-based reinforcement learning (RL) agents. By learning to highlight task-relevant information without external labels, SSINet provides insights into how agents make decisions and why they perform well or poorly, crucial for safety-critical applications.

What Problem Does This Paper Address?

Deep Reinforcement Learning (RL) agents have achieved remarkable success in complex tasks, but their decision-making processes remain largely opaque "black boxes." This lack of interpretability is a significant barrier to their deployment in safety-critical domains where understanding an agent's reasoning is paramount. While some methods exist to explain vision-based RL, they often lack detailed explanations, require class information, or produce coarse visualizations. This paper aims to bridge this gap by providing a framework that discovers fine-grained, interpretable features that clearly indicate what information the agent uses and why it makes specific decisions.

Methods

The core of the proposed solution is a Self-Supervised Interpretable Network (SSINet). SSINet operates in two stages:

  1. Expert Policy Pretraining: An RL agent (actor network) is first pretrained using standard RL algorithms (PPO, SAC, TD3) on visual inputs. This trained agent serves as the "expert policy."
  2. SSINet Training: The SSINet is then trained to produce an attention mask. This mask is learned by ensuring that the agent's behavior remains consistent when its input state is overlaid with the attention mask (maximum behavior resemblance) and by encouraging the mask to be as sparse as possible (minimum region retaining). Crucially, this training is self-supervised: it uses the expert policy's own actions and states as the learning signal, without requiring any human-annotated labels. The SSINet utilizes a U-Net-like encoder-decoder architecture to generate high-resolution attention maps.

Datasets

  • Atari 2600 games: Used for evaluating the framework on discrete RL tasks. Specific games mentioned include Tennis, Riverraid, and Breakout.
  • Duckietown: A self-driving car simulator environment used for evaluating the framework on continuous control tasks. The paper introduces customized maps for lane-following tasks to test generalization and robustness.

Key Insights and Ideas

  • Self-Supervised Interpretability: The most significant insight is the demonstration that high-quality, interpretable attention masks can be learned in a self-supervised manner, solely through interaction with the environment. This bypasses the need for expensive and time-consuming human annotation.
  • Behavioral Consistency as a Learning Signal: The core principle of learning the mask by ensuring the agent's actions don't change significantly when presented with an attention-masked state is a clever way to infer task-relevance.
  • Interpretability of Performance: The framework not only explains how decisions are made but also provides metrics (FOR and BER) to quantitatively assess why an agent performs well or poorly, especially in novel scenarios.
  • Attention Shift as a Cause of Failure: The paper highlights "attention shift" – where an agent diverts its focus from task-relevant to irrelevant background features in novel situations – as a key reason for performance degradation and lack of robustness.

Key Results

  • High-Resolution Attention Masks: SSINet generates sharper and more informative attention masks compared to gradient-based and perturbation-based saliency methods.
  • Performance Preservation: Policies trained with SSINet's attention masks (mask policy) achieve comparable or even better average returns than the original expert policy across various tasks and environments. For instance, in Duckietown, the mask policy consistently achieved greater long-term rewards than the expert policy on most maps.
  • Quantitative Performance Explanation: The proposed metrics (FOR and BER) show a strong correlation with the agent's average return, indicating their effectiveness in explaining performance. Specifically, high performance is achieved when both FOR and BER are high, meaning the agent effectively captures relevant features while ignoring irrelevant ones.
  • Algorithm and Architecture Insights: The framework successfully explains performance differences between RL algorithms (PPO, SAC, TD3) and actor network architectures, demonstrating that simpler architectures can sometimes lead to better performance by avoiding excessive background attention.

Limitations and Future Work

  • Ground Truth for Metrics: While FOR and BER are valuable, obtaining ground truth "true" features for quantitative evaluation is challenging. The paper addresses this by manually annotating features in Duckietown, but this is not a general solution.
  • Generalization of Self-Supervised Learning: The success of SSINet in learning masks without labels suggests potential for broader applications in self-supervised vision tasks like segmentation and detection.
  • Transferability to Other Domains: The framework's applicability to any vision-based RL agent is a strong point, but further exploration in diverse domains beyond games and driving simulators would be beneficial.
  • Human Experience Alignment: The paper notes that the learned attention patterns align with human gaze behavior, suggesting a promising avenue for developing more human-aligned AI systems.

Summary updated

BibTeX
@article{shi2022self,
  author = {Wenjie Shi and Gao Huang and Shiji Song and Zhuoyuan Wang and Tingyu Lin and Cheng Wu},
  title = {{Self-Supervised Discovering of Interpretable Features for Reinforcement Learning}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  url = {https://openreview.net/forum?id=00cdxJCweA5},
}
Figure