STACHE: Local Black-Box Explanations for Reinforcement Learning Policies
Andrew Elashkin, Orna Grumberg
TL;DR
STACHE tackles the challenge of local, black-box explanations for discrete RL policies by defining Robustness Regions and Minimal Counterfactuals within a factored state space. It offers an exact, model-agnostic BFS-based method to compute these explanations without surrogate models, ensuring fidelity to the agent's actual behavior. Empirical results in Taxi-v3 and MiniGrid show how policy logic crystallizes during training, with brittle, high-precision actions developing narrow stability regions and more stable navigation widening those regions. The framework provides actionable debugging insights for reliability and safety in real-world RL deployments.
Abstract
Reinforcement learning agents often behave unexpectedly in sparse-reward or safety-critical environments, creating a strong need for reliable debugging and verification tools. In this paper, we propose STACHE, a comprehensive framework for generating local, black-box explanations for an agent's specific action within discrete Markov games. Our method produces a Composite Explanation consisting of two complementary components: (1) a Robustness Region, the connected neighborhood of states where the agent's action remains invariant, and (2) Minimal Counterfactuals, the smallest state perturbations required to alter that decision. By exploiting the structure of factored state spaces, we introduce an exact, search-based algorithm that circumvents the fidelity gaps of surrogate models. Empirical validation on Gymnasium environments demonstrates that our framework not only explains policy actions, but also effectively captures the evolution of policy logic during training - from erratic, unstable behavior to optimized, robust strategies - providing actionable insights into agent sensitivity and decision boundaries.
