Introduction
Reinforcement Learning (RL) has achieved remarkable success in solving complex, high-dimensional tasks. However, these models often function as "black boxes," making it difficult for human supervisors to understand the underlying logic of an agent's strategy. When an autonomous agent fails, it is often unclear whether the error was a stochastic anomaly or a systemic flaw in its policy.
Current Explainable AI (XAI) techniques for RL primarily focus on local explanations, such as saliency maps that highlight specific input features (e.g., pixels) influencing a single decision. While useful for debugging immediate actions, these methods fail to provide a "big picture" view of the agent's long-term objectives and planning. To bridge this gap, Topin and Veloso (AAAI-19) proposed a framework for generating global, policy-level explanations.
The Granularity Gap
A fundamental challenge in RL explainability is the granularity gap. Deep RL agents operate on low-level, high-dimensional inputs and make thousands of discrete decisions. In contrast, humans conceptualize tasks through high-level abstractions and sequences of logical steps. Local XAI methods do not address how an agent transitions between different phases of a task or how it handles novel sequences of states. To foster trust in real-world deployments, we require global explanations that map the policy's logic across the entire state space.
Methodology: Abstracted Policy Graphs
The authors introduce Abstracted Policy Graphs (APGs) as a solution for summarizing complex RL strategies. An APG represents a policy as a directed graph where nodes are "abstract states"—clusters of grounded states that the agent treats as functionally equivalent—and edges represent actions and the associated transition probabilities.
To construct these graphs, the researchers developed the APG Gen algorithm. This post-hoc, model-agnostic approach builds abstractions by analyzing a learned policy and its corresponding value function ($V_\pi$). The algorithm employs a recursive splitting process:
- Initialization: It begins with a single abstract state containing all observed data.
- Feature Importance: It utilizes a "Feature Importance Ranking Measure" (FIRM) to identify which state feature most significantly influences the agent's expected future reward (the value function).
- Recursive Division: The abstract state is split into two based on the most influential feature. This process continues until the importance of all remaining features falls below a pre-defined threshold ($\epsilon$).
- Graph Construction: Finally, transition probabilities between these abstract states are calculated from training data to form a Markov chain.
Experimental Evaluation: PrereqWorld
The effectiveness of APG Gen was evaluated using PrereqWorld, a synthetic domain designed specifically for testing RL explainability. PrereqWorld simulates a production-style task where an agent must gather prerequisite components to create complex items. This domain is highly scalable, allowing for state spaces ranging from thousands to billions of states, and features controllable stochasticity. Because the underlying logic of PrereqWorld is known, it serves as a ground truth to verify if the generated APGs accurately capture the task's dependencies.
Key Results and Insights
The study yielded several significant findings regarding the accuracy and efficiency of policy-level abstractions:
- High Fidelity: APG Gen correctly identified important features over 93% of the time with only 10% of state transitions sampled. This accuracy increased to 98.7% when 80% of the data was available.
- Predictive Accuracy: The resulting APGs were able to accurately predict the distribution of an agent's future actions over multiple time steps, confirming that the abstraction preserves the core logic of the original policy.
- Sub-linear Scalability: A critical observation was the relationship between domain size and explanation complexity. As the state space grows exponentially, the size of the corresponding APG grows only sub-linearly. This suggests that even for extremely complex environments, human-readable summaries remain feasible.
Discussion and Future Work
The APG framework provides a powerful tool for moving beyond pixel-level saliency toward comprehensive strategy maps. By using the agent's own value function as a proxy for behavior, the method identifies which features are contextually important. For instance, a specific item might be critical in one phase of a task but irrelevant in another; APGs naturally capture this nuance.
However, limitations remain. The current APG Gen algorithm relies on binary features and a greedy splitting logic, which may struggle with complex non-linear feature interactions or continuous data. Furthermore, while the graphs are mathematically concise, future research involving human user studies is necessary to quantify their actual utility for non-expert operators in high-stakes environments.
Summary updated