[Paper Review] Explaining Reinforcement Learning with Shapley Values
This paper introduces SVERL (Shapley Values for Explaining Reinforcement Learning), a theoretically grounded framework that uses Shapley values to attribute contributions of individual state features to an agent's performance in reinforcement learning. By modeling feature contributions via policy-based characteristic functions and leveraging on-manifold sampling for approximation, SVERL produces intuitive, accurate explanations that align with human intuition across multiple environments.
For reinforcement learning systems to be widely adopted, their users must understand and trust them. We present a theoretical analysis of explaining reinforcement learning using Shapley values, following a principled approach from game theory for identifying the contribution of individual players to the outcome of a cooperative game. We call this general framework Shapley Values for Explaining Reinforcement Learning (SVERL). Our analysis exposes the limitations of earlier uses of Shapley values in reinforcement learning. We then develop an approach that uses Shapley values to explain agent performance. In a variety of domains, SVERL produces meaningful explanations that match and supplement human intuition.
Motivation & Objective
- To address the lack of principled, post-hoc explanation methods for high-capacity reinforcement learning agents using function approximators like deep neural networks.
- To identify and correct theoretical flaws in prior uses of Shapley values in reinforcement learning, which often misapplied the framework.
- To develop a new framework that explains agent performance by quantifying the contribution of individual state features to expected return.
- To ensure the explanation method is theoretically sound, satisfying fairness axioms from game theory while remaining computationally feasible.
- To validate that the resulting explanations align with human intuition and improve interpretability in real-world RL applications.
Proposed method
- Proposes SVERL, a framework that formulates reinforcement learning explanation as a cooperative game where state features are players and performance is the outcome.
- Defines a characteristic value function $ v(C) $ as the expected return when only features in set $ C $ are observable, with full policy behavior conditioned on those features.
- Uses the standard Shapley value formula $ \phi_i(v) = \sum_{C \subseteq \mathcal{F} \setminus \{i\}} \frac{|C|!(|\mathcal{F}| - |C| - 1)!}{|\mathcal{F}|!} \cdot \delta(i, C) $, where $ \delta(i, C) $ is the marginal gain of adding feature $ i $ to coalition $ C $.
- Applies on-manifold sampling to approximate the characteristic function values, sampling state transitions conditioned on subsets of features to estimate expected returns.
- Employs Monte Carlo rollouts to estimate expected returns under different partial-observation policies, enabling scalable computation of Shapley values.
- Introduces SVERL-P, a variant that explicitly models policy changes when features are removed, ensuring accurate attribution of performance impact.

Experimental results
Research questions
- RQ1How can Shapley values be correctly and consistently applied to explain reinforcement learning policies, avoiding prior theoretical errors?
- RQ2What aspects of reinforcement learning are most valuable to explain, and why is agent performance a critical but overlooked target?
- RQ3Can Shapley-based explanations of state features produce intuitive and meaningful insights that align with human understanding?
- RQ4How can Shapley values be efficiently approximated in high-dimensional state spaces common in real-world RL tasks?
- RQ5What are the practical implications of using feature attribution for improving trust, debugging, and policy design in RL systems?
Key findings
- SVERL provides a theoretically sound explanation framework that satisfies the fairness axioms of Shapley values, correcting earlier incorrect or incomplete applications in RL.
- The SVERL-P variant, which models policy changes upon feature removal, produces explanations that are both accurate and aligned with human intuition in gridworld and other domains.
- Approximate computation via on-manifold sampling enables feasible deployment of SVERL in large state spaces, with convergence guarantees similar to those in supervised learning.
- The method successfully identifies which state features contribute most to agent performance, offering actionable insights for policy improvement and debugging.
- SVERL's explanations are interpretable and extendable, allowing users to hypothesize on feature roles—though such hypotheses require empirical validation.
- The framework is generalizable and compatible with existing advances in Shapley value methods, such as groupShapley, for scalable and grouped feature attribution.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.