Explainable Reinforcement Learning via Model Transforms
The "Anticipation Gap" in Reinforcement Learning
Reinforcement Learning (RL) agents often operate in high-dimensional spaces using complex neural networks, rendering their decision-making processes opaque. When an agent behaves unexpectedly—for example, a self-driving car taking a seemingly unnecessary detour—a human observer experiences an anticipation gap.
Existing Explainable RL (XRL) methods usually focus on "saliency maps" (highlighting which pixels the agent looked at) or "reward decomposition" (showing which part of the reward function was maximized). However, these techniques often fail to provide a symbolic, "human-style" reason for the behavior. The authors of this paper argue that discrepancies often exist because the observer has an incomplete or incorrect mental model of the environment. The challenge is to automatically find which specific environmental features—like a hidden fuel constraint or a specific transition probability—are causing the agent to deviate from the expected path.
A Novel Framework: Explaining the Environment, Not the Agent
To address this, the paper introduces a novel framework that identifies why an agent’s behavior deviates from expectations by searching through a space of "model transforms." These are symbolic changes to the environment, such as removing a constraint or ignoring a specific risk. By finding a simplified version of the world where the agent’s actions finally make sense to the human, the system provides a clear, high-level explanation for the anticipation gap.
The authors formalize this as the Reinforcement Learning Policy Explanation (RLPE) problem, involving three key entities:
- The Actor: The RL agent performing the task.
- The Observer: A human (or system) with an "anticipated policy" of how the agent should behave.
- The Explainer: An agent that has access to a set of MDP Transforms.
MDP Transforms are the core innovation. These formal operations modify a Markov Decision Process (MDP) and include:
- State Mapping: Grouping states together (e.g., "ignore the fuel level variable").
- Action Mapping: Simplifying actions (e.g., "assume the 'move' action never fails" or "ignore the precondition that a car needs fuel to move").
Efficiently Searching for Explanations
The Explainer performs a search—similar to Dijkstra’s algorithm—through the space of possible transforms. It looks for the minimal sequence of transforms that, when applied to the environment, results in an optimal policy matching what the observer expected.
Because re-training an RL agent for every possible model transform is computationally expensive, the authors introduce methods to make this search efficient:
- PRE-TRAIN: Using the agent's existing policy to "bootstrap" learning in the transformed environment rather than starting from scratch.
- PRE+CLUSTER: Grouping similar transforms together to prune the search space. You don't need a perfect policy for every transform; you just need to see if the direction of the policy shifts toward the observer's expectation.
Key Results and Insights
The researchers evaluated their approach on 12 different environments, covering both single-agent and multi-agent settings. These included classic RL tasks (like Frozen Lake and Taxi), logic-based planning tasks from PDDLGym (like Sokoban and Blocks World), and multi-agent scenarios.
- High Satisfaction: Across all domains, the framework successfully found transform sequences that reconciled the agent's behavior with the observer's expectations.
- Symbolic Grounding: Because the transforms act on the symbolic variables of the environment, the resulting explanations are inherently more interpretable than raw neural network weights. If removing a "fuel constraint" makes the agent's behavior match the human's expectation, the explanation is simply: "The agent is behaving this way because of the fuel constraint."
- Search Efficiency: The PRE+CLUSTER method proved significantly faster than a naive search. In the Triangle Tireworld domain, it was over 7x faster than the baseline Dijkstra search while maintaining an 84% success rate.
- Multi-Agent Utility: The framework successfully identified multi-agent specific explanations, such as "the agent is taking a detour to avoid a collision with another agent," a nuance often missed by simpler XRL methods.
Limitations and Future Work
While promising, the current framework relies on discrete state and action spaces. Extending this to continuous control environments remains a challenge. Additionally, the current "satisfaction" metric requires an exact match between the anticipated and actual policy; future work could incorporate more flexible, "fuzzy" metrics. Finally, while the transforms are symbolic, translating them into fluid natural language sentences (e.g., "I went to the gas station because I was low on fuel") is an area for future development, alongside adapting the approach for adversarial, non-cooperative settings.
Summary updated