Explainable Reinforcement Learning through a Causal Lens

Prashan Madumal, Tim Miller, Liz Sonenberg, Frank Vetere

Introduction

Reinforcement Learning (RL) agents have achieved remarkable success in complex domains, yet they remain largely "black boxes." While an agent might master StarCraft II or robotic control, human observers often struggle to understand the rationale behind specific actions or why alternative strategies were rejected. Traditional Explainable AI (XAI) techniques, often designed for supervised learning, fail to account for the long-term environmental consequences inherent in RL. This work introduces a framework that leverages Structural Causal Models (SCMs) to generate human-centric, contrastive explanations.

The Action Influence Model

The proposed approach centers on an Action Influence Model, which extends SCMs to the RL domain. This model operates in three primary stages:

  1. Causal Graph Specification: A domain expert provides a Directed Acyclic Graph (DAG) representing the causal relationships between state variables (e.g., worker counts, unit health) and rewards.
  2. Structural Equation Learning: As the agent interacts with the environment, multivariate regression models (such as Linear Regression or MLPs) are trained to approximate the structural equations. These equations quantify how actions influence state transitions.
  3. Explanation Generation: The model generates "Why?" explanations by tracing causal chains to rewards, and "Why not?" explanations through counterfactual analysis—simulating the outcomes of alternative actions.
The Action Influence Model illustrated via a causal graph for a StarCraft II task, showing how actions like building structures (As, Ab) and training units (Am) influence state variables and eventual rewards.

To ensure clarity, the framework produces minimally complete explanations, focusing on the most immediate causal drivers and the ultimate goal, rather than overwhelming users with the entire causal chain.

Experimental Evaluation

The framework was evaluated through both computational benchmarks and a large-scale human study.

  • Computational Benchmarks: The model's fidelity was tested across six environments, including Cartpole, LunarLander, and a custom StarCraft II scenario.
  • Human Study: 120 participants evaluated explanations while observing an RL agent in StarCraft II. The study compared causal explanations against no explanations and a baseline of "relevant variables."

Key Results and Insights

The causal approach demonstrated high fidelity and significantly improved human understanding. In the StarCraft II domain, the learned causal model achieved a 94.7% task prediction accuracy, indicating it accurately captured the agent's underlying logic.

Crucially, the human study revealed that causal explanations significantly enhanced a user's mental model of the agent. Participants receiving causal explanations were markedly better at predicting the agent's future actions compared to those in the control groups.

Comparison of participant scores across different explanation models (N: None, R: Relevant Variables, D: Detailed, C: Causal). The causal model (C) shows a significant improvement in task prediction scores (T).

Furthermore, users rated causal explanations as more "complete," "sufficient," and "satisfying." Interestingly, simple Linear Regression often outperformed complex neural networks in learning structural equations, suggesting that local causal influences in these environments are often approximately linear.

Limitations and Future Directions

While promising, the current framework relies on human-provided DAGs. Future research will focus on causal discovery to automate the learning of graph structures. Additionally, extending the model to continuous action spaces remains a challenge. Finally, the study noted a "trust gap": while understanding improved, trust did not necessarily follow, suggesting that trust is influenced by factors beyond mere transparency, such as the agent's perceived competence.

Summary updated

BibTeX
@inproceedings{madumal2020explainable,
  author = {Prashan Madumal and Tim Miller and Liz Sonenberg and Frank Vetere},
  title = {{Explainable Reinforcement Learning through a Causal Lens}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i03.5631},
}
Figure