Deep Reinforcement Learning (RL) has achieved remarkable success in domains ranging from complex board games to robotics. However, for human observers, these policies often function as "black boxes," making moves that are difficult to interpret. While explainable AI (XAI) has made strides in classification tasks, explaining the sequential decision-making of an RL agent—such as why it chose a specific path several steps ago—remains a significant challenge.
In a recent study presented at AAAI-23, researchers introduced Strategic State eXplanation (SSX). This framework explains RL policies by identifying meaningful "meta-states" and the "strategic milestones" an agent aims for, bridging the gap between raw actions and high-level intent.
The Challenge of Intent in RL
Most existing XAI methods for RL fall into two categories: global summaries, which are often too complex for humans to digest, or action-based explanations, which group states where the agent performs the same action. The latter often fails to capture intent. For instance, in a navigation task, an agent might move "Up" to reach a doorway or "Up" to avoid an obstacle. Action-based grouping would treat these as identical, despite their different strategic goals.
Strategic State eXplanation (SSX)
SSX addresses these limitations through a two-step process that prioritizes policy dynamics over simple action similarity:
- Learning Meta-States: Instead of clustering states by visual features, SSX clusters them based on how the agent moves through the environment. Using a regularized version of spectral clustering, the "distance" between states is defined by the maximum likelihood path of the expert policy. This naturally partitions the state space into "meta-states" that represent distinct phases of a task.
- Identifying Strategic States: Within each meta-state, the algorithm identifies "strategic states"—bottlenecks or milestones that the agent frequently passes through to progress toward the final goal. This is formulated as a submodular objective function, allowing a greedy algorithm to efficiently find high-quality milestones.
For environments with massive state spaces, SSX utilizes local approximations, focusing on a specific window of steps ahead to maintain computational tractability while providing relevant local context.
Experimental Evaluation
The framework was evaluated on several classic RL benchmarks, including Four Rooms, Door-Key, Minipacman, and Pong. In the Door-Key environment, the agent must navigate a complex state space to find a key and unlock a door to reach its goal. SSX successfully identifies the key and the door as strategic milestones without prior knowledge of the map's topology.
Key Results and User Study
The researchers conducted a task-oriented user study comparing SSX to VIPER, a state-of-the-art method that extracts decision trees from policies. The results highlighted the superiority of intent-based explanations:
- Predictive Accuracy: Participants were asked to predict an agent's intent (e.g., "Hunt" vs. "Eat" in Minipacman). Users provided with SSX explanations achieved ~70% accuracy, significantly outperforming the ~50% (near-random) accuracy of those using VIPER.
- User Clarity: Less than 5% of users found SSX explanations "unclear," compared to over 25% for the rule-based VIPER explanations.
- Automatic Discovery: In the Four Rooms task, SSX automatically identified doorways as strategic states based solely on policy dynamics, demonstrating that "where the policy is going" is more informative than "what the policy is doing right now."
Conclusion and Future Directions
SSX demonstrates that local, dynamic-based explanations provide a much clearer window into an agent's strategy than traditional rule-based methods. By highlighting strategic milestones, the framework provides humans with tractable intermediate goals to follow. Future work may extend this approach to continuous state spaces and explore using these identified milestones as intermediate rewards to accelerate the training of new RL agents.
Summary updated