REVEAL-IT: REinforcement learning with Visibility of Evolving Agent poLicy for InTerpretability

Shuang Ao, Simon Khan, Haris Aziz, Flora D. Salim

TL;DR

REVEAL-IT is a novel framework that brings transparency to deep reinforcement learning (RL) by visualizing how an agent's neural network policy evolves across different training tasks. By employing a Graph Neural Network (GNN) to identify and highlight critical weight updates, the system not only explains the agent's decision-making process but also provides actionable insights to optimize training curricula, significantly boosting performance in complex 3D environments.

What Problem Does This Paper Address?

Deep Reinforcement Learning has achieved remarkable success in games and robotics, yet these agents remain "black boxes." In complex, high-dimensional environments, it is notoriously difficult to understand why an agent succeeds or fails.

Prior explainability methods often rely on Structural Causal Models (SCMs) or heatmaps of value functions. While effective in simple 2D grids, these approaches struggle with the intricate transition dynamics of 3D worlds. Furthermore, most existing methods provide a "snapshot" of a single action rather than explaining the broader learning process. The authors argue that to truly trust and improve RL agents, we need to see how they acquire specific skills over time and how different training tasks contribute to their final mastery.

Methods

The REVEAL-IT framework consists of two primary components designed to work in tandem with any standard online RL algorithm (like PPO or DQN):

  1. Policy Visualization Module: The agent’s policy (typically a Multi-Layer Perceptron) is represented as a node-link diagram. This allows researchers to see which parts of the network are being updated during training and which nodes are "active" during evaluation.
  2. GNN-based Explainer: This is the core innovation. A Graph Neural Network is trained alongside the RL agent. It treats the policy network as a graph, where nodes are neurons and edges are weights. The GNN learns to predict "learning progress"—the improvement in reward—based on the patterns of weight updates.

As shown in the architecture below, the framework uses these insights to highlight the most important sections of the policy, effectively filtering out the "noise" of millions of minor weight revisions to show the human designer what the agent is actually focusing on.

Figure 1: The main structure of REVEAL-IT. Assume that we need to train an RL agent within an environment to accomplish complex tasks, while directly training the agent on these tasks is challenging and inefficient. In practical application, we will devise sequences of pre-defined sub-tasks (sub-task 1, sub-task 2,..., sub-task N) for training. In REVEAL-IT, we implement the RL agent in the given environment, allowing it to explore and collect data. Subsequently, we train the controller (the control policy πθ), using the collected data. Then, we visualize the policy updates with a node-link diagram. The visualization will depict the structure of the policy and highlight the specific sections that have been updated. After that, REVEAL-IT employs a GNN-based explanation to examine policy updates and ascertain the significant capabilities that the policy has acquired in a certain sub-task. This will help us comprehend how much a sub-task has improved the agent’s performance in the test. Furthermore, the GNN-based explainer provides a clearer and more accurate comprehension of the value of each sub-task in training. This can enhance the effectiveness and efficiency of designing RL training task sequences in real-world settings.

Datasets

The authors evaluated REVEAL-IT on two distinct benchmarks:

  • ALFWorld: A challenging cross-modality simulator for embodied household tasks (e.g., "heat an egg and put it on the dining table"). It requires long-term planning and interaction with many objects in a 3D environment.
  • OpenAI Gym: A suite of standard RL control tasks (HalfCheetah, Hopper, Walker2d, etc.) used to demonstrate the framework's generalizability across different environments and RL algorithms.

Key Insights and Ideas

  • Learning is Modular and Overlapping: By visualizing updates, the authors discovered that tasks requiring similar "common sense"—like opening a microwave vs. taking an item out of it—share specific regions of the policy network. Identifying these "shared components" helps explain how knowledge generalizes.
  • Update-Based Interpretability: Instead of just looking at which neurons fire, REVEAL-IT looks at which weights change. This "delta" is a much stronger signal for what the agent is currently learning.
  • Closing the Loop with Curriculum Learning: The GNN explainer doesn't just explain; it helps optimize. By predicting which sub-tasks provide the highest "learning progress," the framework can dynamically adjust the training sequence (the curriculum), moving the agent from simple tasks like "looking" and "picking" to complex ones like "heating" only when the foundational skills are mastered.
Figure 2: Visualized important policy updates by GNN explainer. We provide a larger version in Appendix. D, and detailed analysis in section 5.3. In this figure, the first line depicts the sequential arrangement of sub-tasks that must be accomplished step-by-step to accomplish a given task fully. One of the sub-tasks is located on the left side of the second line. The first to third columns of the tree diagram illustrates the RL policy update process. The blue circles represent nodes in the neural network, while the connections between the circles represent weight updates. Thicker connections indicate larger updates in weight amplitude (selected by GNN explainer). The red circles in the tree diagram on the far right illustrate the specific policy nodes that are active during the evaluation process. The links here represent the revised weights throughout the training phase of this subtask. The orange squares indicate the portions of the policy that are common to several sub-tasks. We opt to depict the 8 interconnected nodes with the most significant weight adjustment, facilitating comprehension of the reinforcement learning policy’s learning process and highlighting the policy’s shared component more distinctly.

Key Results

  • Superior Performance in ALFWorld: REVEAL-IT achieved an average success rate of 0.80, dwarfing state-of-the-art Vision-Language Model (VLM) agents like MiniGPT-4 (0.16) and InstructBLIP (0.22). It approached human-level performance (0.91) without relying on pre-trained Large Language Models for planning.
  • Improved Efficiency: On OpenAI Gym benchmarks, adding REVEAL-IT consistently improved the final rewards and sample efficiency of PPO, A2C, and Policy Gradient methods.
  • Robust Explanations: In ablation studies, the REVEAL-IT explainer outperformed standard graph explanation tools like GNNExplainer, proving that an explainer trained in sync with the RL agent is better at capturing the nuances of the learning process.

Limitations and Future Work

While powerful, REVEAL-IT currently has a few constraints:

  • Modality Limits: In the ALFWorld experiments, the framework focused primarily on the visual environment, not yet fully integrating the textual feedback available in the simulator.
  • Human-in-the-loop: While the visualizations are intuitive, they still require a technically literate human to interpret the node-link diagrams.

The authors suggest that future work could involve automatically translating these neural network updates into natural language explanations, making the agent's "thoughts" and "learning hurdles" accessible to non-experts.

Summary updated

Abstract

Understanding the agent's learning process, particularly the factors that contribute to its success or failure post-training, is crucial for comprehending the rationale behind the agent's decision-making process. Prior methods clarify the learning process by creating a structural causal model (SCM) or visually representing the distribution of value functions. Nevertheless, these approaches have constraints as they exclusively function in 2D-environments or with uncomplicated transition dynamics. Understanding the agent's learning process in complicated environments or tasks is more challenging. In this paper, we propose REVEAL-IT, a novel framework for explaining the learning process of an agent in complex environments. Initially, we visualize the policy structure and the agent's learning process for various training tasks. By visualizing these findings, we can understand how much a particular training task or stage affects the agent's performance in test. Then, a GNN-based explainer learns to highlight the most important section of the policy, providing a more clear and robust explanation of the agent's learning process. The experiments demonstrate that explanations derived from this framework can effectively help in the optimization of the training tasks, resulting in improved learning efficiency and final performance.
BibTeX
@misc{ao2024reveal,
  author = {Shuang Ao and Simon Khan and Haris Aziz and Flora D. Salim},
  title = {{REVEAL-IT: REinforcement learning with Visibility of Evolving Agent poLicy for InTerpretability}},
  year = {2024},
  eprint = {2406.14214},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.14214},
}
Figure