Manuscript Offprint

arXiv:2610.42028

CausalXRL: Explainable Reinforcement Learning through Causal Graph Reasoning

Yanming Zhang, Eric Papenhausen, Klaus Mueller

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reinforcement learning is a powerful paradigm for training autonomous agents and has achieved impressive performance in complex environments. However, this success often comes at the cost of interpretability, diminishing trust and complicating efforts to debug and improve agent behavior. To address these challenges, we introduce CausalXRL, a novel framework for explainable reinforcement learning (XRL). A key feature of CausalXRL is its use of causal graph reasoning, which provides transparent, structured, multilevel explanations of agent decision-making. We validate CausalXRL through comprehensive case studies and a two-part evaluation: (1) a quantitative analysis of explanation fidelity and causal-structure learning efficiency in benchmark RL environments, and (2) a qualitative expert study assessing explainability in the real-time strategy (RTS) benchmark MicroRTS. The quantitative results show that CausalXRL can provide faithful explanations while efficiently learning causal structures, and the qualitative expert study suggests that participants found CausalXRL useful for inspecting high-level RTS strategies.

1. Introduction

Recent advances in machine learning (ML) have transformed many fields, with reinforcement learning (RL) emerging as a powerful but opaque paradigm (Puiutta & Veith, 2020). RL trains agents to select actions that maximize cumulative rewards in interactive environments, typically formalized as Markov Decision Processes (MDPs) where actions depend only on the current state. This makes RL well-suited for planning and sequential decision-making,

and it has been successfully applied in domains such as gaming, self-driving cars, robotics, and healthcare. However, traditional RL struggles in environments with high-dimensional inputs—such as pixels, sound, or large-scale sensor data—limiting generalization. Deep Reinforcement Learning (DRL) addresses these challenges by combining RL with deep neural networks, enabling agents to solve complex, real-world tasks. Notably, well-trained DRL agents have outperformed experienced human experts (Warchalski et al., 2020; Alicioglu & Sun, 2022) and even defeated top masters, as in AlphaGo's historic victory over Go champion Lee Sedol in 2016.

However, this power comes at a cost: DRL models are inherently opaque, making their internal reasoning difficult for humans to interpret or predict. This lack of transparency poses a barrier to adoption in high-stakes domains such as healthcare (Vallée, 2024). To address this, Explainable Reinforcement Learning (XRL) has emerged, aiming to provide clear, human-readable explanations of how and why agents make decisions. XRL research has largely focused on post-hoc explainability (Wells & Bednarz, 2021; Wang et al., 2022; Madumal et al., 2020; Qing et al., 2022; Dazeley et al., 2023) and can be broadly categorized into model-, reward-, state-, and task-level approaches (Qing et al., 2022). State-based methods clarify how a state arose (history), how it influences an agent's action (influence), and what it may lead to (intent), often using saliency maps to highlight input regions most relevant to decisions (Greydanus et al., 2018; Huber et al., 2019; Simonyan et al., 2013). By contrast, model- and reward-based approaches focus on the "why," explaining why an action was selected over alternatives and assisting developers with debugging (Dazeley et al., 2023), while some translate RL models into simpler proxy models for improved interpretability.

Providing causal explanations aligns with the mechanism how people make sense of the world (Sloman & Sloman, 2009). While it is not new to incorporate causality into reinforcement learning—many works have leveraged causality to guide the RL learning process (Wang et al., 2025; Seitzer et al., 2021; Cohen et al., 2020)—leveraging causal inference methods for explanation tasks in RL remains sparse. Madumal et al. (2020) employed graphical causal models

¹Department of Computer Science, Stony Brook University, Stony Brook, USA. Correspondence to: Yanming Zhang yanmzhang@cs.stonybrook.edu.

Proceedings of the 43rd International Conference on Machine Learning, Seoul, South Korea. PMLR 306, 2026. Copyright 2026 by the author(s).

as an inherently interpretable approach to reasoning. They introduced the Action Influence Model (AIM), which extends structural causal models by explicitly incorporating the agent's action space into the causal edges. However, the construction of AIM requires a predefined causal structure from domain experts, and its action space is limited to finite sets. Yu et al. (2023) made the approach more practical by incorporating conditional independence tests (CITs) to determine the causal structure and introducing attention-based inference networks to compute the action contributions associated with each causal edge. This adaption enables AIM for continuous action spaces.

Yet, we identify two limitations. First, AIM's design, which binds causal edges directly to actions, makes it impractical for use in multi-unit environments such as real-time strategy (RTS) games. Because units are typically tied to specific capabilities by design, the resulting causal dependencies become deterministic rather than probabilistic. For example, in RTS games, a causal edge Ally Attacking Units→Enemy Base would always be present when ally attacking units are destroying the enemy's base, since this is the only capability tied to the attacking units. Humans derive limited additional insight beyond what can be obtained by simply watching the game, and in this case, AIM diminishes the ability of causal models to provide strategic or high-level explanations. Second, current structural learning algorithms that discover causal structures in the framework rely on CITs, which are extremely time-consuming. Their worst-case time complexity is O(nk+2)O(n^{k+2}), where k≫1k \gg 1 is the maximum number of neighbors per node in the true graph, which constrains the efficiency of the entire XRL pipeline. In contrast, our proposed CausalXRL eliminates the need for predefined causal structures, avoids the computational burden of conditional independence tests, and generalizes beyond single-agent settings by operating over human-interpretable representations rather than binding causal edges directly to actions. Unlike AIM and its CIT-based extension, CausalXRL scales efficiently to multi-agent environments while remaining fully data-driven.

Our proposed CausalXRL is a new XRL framework designed to elucidate the decision-making process of model-free reinforcement learning agents through causal models. The pipeline of the framework can be divided into three segments: representation extraction, causal dependency inference and explainable causal models. In the representation extraction stage, we generate and efficiently collect interpretable representations from raw RL experiences. The resulting representation pool is then used to train Rubin Causal Models (1974) to infer causal dependencies. Causal structures can be efficiently inferred from these dependencies at time complexity O(n2)O(n^2). Lastly, these models are used to construct global causal graphs and local causal models, each serving complementary explanatory purposes. The

global causal graphs provide an overview of the causal relationships among the extracted representations, while the local causal models offer situational insights that enable humans to perform counterfactual reasoning in specific contexts. We evaluated our approach on four RL benchmarks, and the results indicate that it accurately predicts behavior while remaining computationally efficient. Furthermore, we conducted an exploratory qualitative expert study using our tool in MicroRTS, a classic RTS game environment (Ontanon, 2013). Participants' feedback suggests that the framework has the potential to provide useful and interpretable explanations of agent strategies. Code can be found at: https://github.com/yanmluk/causal-xrl

References (47)

  • A survey of visual analytics for explainable artificial intelligence methods
  • Recursive partitioning for heterogeneous causal effects
  • OpenAI Gym, 2016
  • Cicero: Multi-turn, contextual argumentation for accurate crowdsourcing
  • Statemask: Explaining deep reinforcement learning through state mask
  • Optimal structure identification with greedy search
  • The rational use of causal inference to guide reinforcement learning strengthens with age
  • Explainable reinforcement learning for broad-XAI: a conceptual framework and survey
  • Interpretable concept bottlenecks to align reinforcement learning agents
  • Visualizing and understanding Atari agents
  • Concept-based understanding of emergent multi-agent behavior
  • EDGE: Explaining deep reinforcement learning policies
  • Bayesian nonparametric modeling for causal inference
  • Gym-μrts: Toward affordable full game real-time strategy games research with deep reinforcement learning
  • Enhancing explainability of deep reinforcement learning through selective layer-wise relevance propagation
  • Quantitative testing with concept activation vectors (TCAV)
  • Concept bottleneck models
  • Metalearners for estimating heterogeneous treatment effects using machine learning
  • Assessing demand for intelligibility in context-aware applications
  • A unified approach to interpreting model predictions
  • Explainable reinforcement learning through a causal lens
  • A mathematical model of the finding of usability problems
  • The combinatorial multi-armed bandit problem and its application to real-time strategy games
  • Causality: Models, Reasoning, and Inference
  • Explainable reinforcement learning: A survey
  • A survey on explainable reinforcement learning: Concepts, algorithms, challenges (opens arXiv in a new tab)
  • Why Should I Trust You?
  • Á., and Brumback, B. Marginal structural models and causal inference in epidemiology
  • The central role of the propensity score in observational studies for causal effects
  • Estimating causal effects of treatments in randomized and nonrandomized studies
  • Causal influence detection for improving efficiency in reinforcement learning
  • Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps
  • Causal models: How people think about the world and its alternatives
  • Causal inference in the presence of latent variables and selection bias
  • Causation, prediction, and search
  • MuJoCo: A physics engine for model-based control
  • Generation of policy-level explanations for reinforcement learning
  • Envisioning the future of personalized medicine: Role and realities of digital twins
  • Estimation and inference of heterogeneous treatment effects using random forests
  • Visual analytics for RNN-based deep reinforcement learning
  • ERCI: An explainable experience replay approach with causal inference for deep reinforcement learning
  • Deep RL agent for a real-time action strategy game (opens arXiv in a new tab)
  • Explainable AI and reinforcement learning—a systematic review of current approaches and trends
  • d. Measurable counterfactual local explanations for any classifier (opens arXiv in a new tab)
  • LICORICE: Label-efficient concept-based interpretable reinforcement learning
  • Explainable reinforcement learning via a causal world model
  • Concept learning for interpretable multi-agent reinforcement learning