Abstract
Reinforcement Learning (RL) agents often operate as "black boxes," making their decision-making processes opaque. This paper proposes Causal State Distillation, a framework that enhances transparency by distilling sparse, orthogonal causal factors from an environment's state. By combining Reward Decomposition with Structural Causal Modeling, the framework identifies specific state components responsible for individual reward signals. Evaluated on Atari and MiniGrid environments, the method demonstrates high fidelity and visual accuracy, providing intrinsically interpretable explanations that avoid common causal fallacies found in post-hoc saliency methods.
Introduction
Reinforcement Learning (RL) agents are notoriously difficult to interpret. While we can observe an agent's actions, understanding the underlying logic remains a challenge. Traditional explainability methods often rely on post-hoc saliency maps—heatmaps indicating where an agent "looked." However, these maps suffer from two major flaws: a lack of grounding (they may not reflect the actual logic used during training) and causal fallacies (they often highlight features correlated with success, like a scoreboard, rather than those that cause behavior).
While Reward Decomposition (RD) techniques help by breaking down total rewards into sub-rewards (e.g., "points for eating" vs. "points for avoiding enemies"), they fail to explain which specific visual features led to those sub-rewards.
Methodology: Causal State Distillation
The authors propose Causal State Distillation to separate a state $s$ into causal factors and non-causal factors. Using a Structural Causal Model (SCM), the framework decomposes the state into components $s^i$ that map to specific reward channels $r^i$.
The framework optimizes for four primary desiderata using information-theoretic measures:
- Causal Sufficiency: The distilled factors must contain all information necessary to predict the reward or action.
- Sparsity: Explanations should be simple, masking irrelevant background pixels.
- Orthogonality: Different reward channels should depend on non-overlapping state components.
- Intervention: To separate causal from non-causal features (like scoreboards), the model uses Fourier-based perturbations to ensure invariance to semantic-preserving noise.
The paper introduces two paradigms: R-Mask, which distills factors by predicting sub-rewards, and Q-Mask, which distills factors based on the expected long-term return (Q-values) associated with those rewards.
Experimental Evaluation
The framework was evaluated across three distinct environments:
- Monster-Treasure (MiniGrid): A 2D grid task for ground-truth validation where the agent navigates to a treasure while avoiding a monster.
- Gopher (Atari 2600): A complex visual task where the agent protects carrots from a gopher.
- MsPacman (Atari 2600): A high-dimensional environment with multiple interdependent reward sources (dots, pills, ghosts).
Key Insights
- Reward vs. Q-Value Saliency: Saliency based on immediate reward prediction (R-Mask) proved more informative than Q-value-based saliency. Q-values tend to compress long-term information, which can obscure the direct causal link between a state feature and an immediate action.
- Intrinsic Interpretability: Unlike post-hoc methods, these masks are learned alongside the agent's policy, ensuring the explanations are "baked into" the agent's world model.
- The Intervention Trick: Fourier-based perturbations allow the model to ignore spurious correlations, such as scoreboards, which typically confuse standard saliency methods.
Results
- Fidelity: In the Gopher environment, R-Mask achieved a fidelity score of 84.58%, meaning the agent maintained its decision-making quality using only the distilled causal factors while using a significantly sparser representation.
- Visual Accuracy: Qualitative analysis showed that R-Mask successfully ignored background noise and scoreboards, focusing precisely on relevant entities like the gopher and the player avatar.
- Precision: In the Monster-Treasure task, Q-Mask converged to optimal masks, identifying exact coordinates for key objects with higher precision than the R-Mask baseline.
Conclusion and Future Work
While effective, the framework currently assumes the existence of multiple reward channels, which may not be available in all real-world tasks. Additionally, in environments like MsPacman, where reward causes are highly intertwined, maintaining orthogonality remains a challenge. Future research will explore generalizing the method to single-scalar reward settings and utilizing Large Language Models (LLMs) to translate distilled causal factors into natural language explanations.
Summary updated