Decisions that Explain Themselves: A User-Centric Deep Reinforcement Learning Explanation System

Xiaoran Wu, Zihan Yan, Chongjie Zhang, Tongshuang WuarXiv 2022 · DOI

Abstract

Deep Reinforcement Learning (DRL) agents often operate as "black boxes," making their decision-making processes difficult for human developers to interpret. Existing explainable RL (XRL) methods frequently rely on techno-centric visualizations like saliency maps, which can be superficial or misleading. This paper introduces LangXRL, an interactive system that generates natural language explanations by causally inferring the "reason" and "result" of agent actions. By utilizing object-level counterfactual inference and influence graphs, LangXRL provides human-readable logic that aligns with the agent's internal policy. Experimental results in autonomous driving and StarCraft II environments demonstrate that LangXRL helps developers identify 21% more model abnormalities and improves human-AI team performance by up to 25%.

Introduction

Deep Reinforcement Learning (DRL) has achieved remarkable success in complex tasks, yet its opacity remains a significant barrier to deployment in safety-critical domains. When a self-driving car brakes unexpectedly or a game AI makes a counter-intuitive move, developers struggle to diagnose the underlying cause.

Current XRL tools are largely designed for researchers, often falling into several traps:

  1. Simplism: Explanations are too superficial to reveal actual reasoning.
  2. Parochialism: Tools fail to generalize to novel scenarios.
  3. Subjectivism: Explanations often reflect human intuition rather than the AI's internal logic.
  4. Formalism: High cognitive load due to complex mathematical or graphical representations.

LangXRL addresses these pitfalls by shifting the focus toward human-centric, actionable, and causally-grounded natural language explanations.

The LangXRL Framework

LangXRL generates explanations by asking "what if?" through counterfactual inference. Instead of analyzing raw pixels, the system identifies discrete objects (e.g., vehicles, pedestrians, or allies) using Mask R-CNN.

Causal Inference and Influence Graphs

The system masks specific objects and observes the resulting change in the agent's action distribution. This influence is quantified using the Jensen-Shannon (JS) divergence between the original and masked policy. These influences are mapped over time into a multi-layer Influence Graph, where nodes represent objects at specific time steps and edges represent causal influence.

The LangXRL interactive interface, featuring task selection (A), historical influence visualization (B/F), real-time scenario view (C), timeline controls (D), and natural language explanations (E).

Max-Flow Reasoning and Natural Language Generation

To extract the core "reason" for a decision, LangXRL applies a maximum flow algorithm to the influence graph, identifying the most significant causal path from historical observations to the current action. These paths are then translated into human-readable templates: "I observed [Object A's behavior], so I [Action] to [Resulting change in Object B]."

Experimental Evaluation

The system was evaluated in two high-stakes environments: the CARLA Simulator for autonomous driving and StarCraft II (SMAC) for tactical micromanagement. LangXRL was compared against a baseline method that used supervised learning to generate text from human-annotated data.

Key Results

  • Abnormality Detection: In driving tasks, developers using LangXRL identified 87.1% of intentional model bugs, a significant improvement over the 66.2% achieved with the baseline.
  • Human-AI Collaboration: In "Human-RL" team tests, LangXRL boosted performance significantly. In autonomous driving, the success rate rose from 68.4% to 90.3%. In StarCraft II, the win rate increased from 51.5% to 65.2%.
  • User Trust: Participants rated LangXRL higher for trust-building and discovering model limitations compared to traditional heatmaps or supervised text models.
Historical influence visualization showing the causal impact of object states over time on the current decision.

Discussion and Future Work

LangXRL demonstrates that grounding explanations in causality rather than correlation leads to more reliable and actionable insights. However, the system currently focuses on the single most influential factor, whereas real-world decisions are often multi-factorial. Future work will explore multi-factor explanations and more efficient computational methods to handle environments with hundreds of interactive objects. Additionally, the authors aim to implement a "layered exploration structure" to better guide users through complex debugging processes.

Summary updated

BibTeX
@misc{wu2022decisions,
  author = {Xiaoran Wu and Zihan Yan and Chongjie Zhang and Tongshuang Wu},
  title = {{Decisions that Explain Themselves: A User-Centric Deep Reinforcement Learning Explanation System}},
  year = {2022},
  eprint = {2212.00888},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.00888},
}
Figure