Abstract
Although deep Reinforcement Learning (RL) has proven successful in a wide range of tasks, one challenge it faces is interpretability when applied to real-world problems. Saliency maps are frequently used to provide interpretability for deep neural networks. However, in the RL domain, existing saliency map approaches are either computationally expensive and thus cannot satisfy the real-time requirement of real-world scenarios or cannot produce interpretable saliency maps for RL policies. In this work, we propose an approach of Distillation with selective Input Gradient Regularization (DIGR) which uses policy distillation and input gradient regularization to produce new policies that achieve both high interpretability and computation efficiency in generating saliency maps. Our approach is also found to improve the robustness of RL policies to multiple adversarial attacks. We conduct experiments on three tasks, MiniGrid (Fetch Object), Atari (Breakout) and CARLA Autonomous Driving, to demonstrate the importance and effectiveness of our approach.
The Interpretability Dilemma in RL
Deep Reinforcement Learning (RL) agents often operate as "black boxes," making it difficult to understand the reasoning behind their actions. Saliency maps—visualizations that highlight input regions influencing an agent's decision—are a common solution. However, current methods face a stark trade-off:
- Gradient-based methods (e.g., Vanilla Gradient) are fast but often produce noisy, uninterpretable maps.
- Perturbation-based methods (e.g., SARFA) produce high-quality, human-readable maps but are computationally intensive, often taking nearly a second per frame.
In safety-critical applications like autonomous driving, waiting a full second for an explanation is unacceptable.
The DIGR Approach
To bridge this gap, we introduce DIGR (Distillation with selective Input Gradient Regularization). Instead of trying to extract better explanations from a fixed model, DIGR trains agents to be inherently interpretable.
The framework employs a teacher-student distillation process:
- Policy Distillation: A "student" policy ($\pi_\theta$) is trained to mimic the behavior of a pre-trained "teacher" policy ($\pi_t$) using KL Divergence.
- Selective Input Gradient Regularization: The student's internal gradients ($M_g^\theta$) are regularized against high-quality perturbation maps ($M_p^t$) generated offline from the teacher. Crucially, this regularization is selective: it only penalizes gradients in regions the teacher deemed irrelevant, preventing the loss of performance often associated with global regularization.
Experimental Evaluation
We evaluated DIGR across three environments: MiniGrid (Red-Fetch-Green), Atari (Breakout), and CARLA Autonomous Driving. We also introduced a quantitative benchmark for MiniGrid, measuring map accuracy by comparing highlighted regions against ground-truth task-relevant objects.
Key Results
DIGR achieves the "best of both worlds": high-fidelity explanations at near-instantaneous speeds.
- Massive Speedup: In the CARLA environment, DIGR generated maps in 0.0021 seconds, a ~460x speedup over perturbation methods (0.97 seconds).
- Superior Accuracy: As shown in the visual comparisons, DIGR maps are significantly cleaner than other gradient-based methods, focusing precisely on relevant objects (like the target in MiniGrid) while effectively eliminating background noise.
- Robustness via Clarity: By forcing the model to focus only on task-relevant features, DIGR agents became significantly more robust to adversarial attacks (e.g., FGSM, PGD) compared to standard RL agents.
Conclusion and Future Work
DIGR demonstrates that interpretability can be treated as a training objective rather than just a post-hoc analysis tool. By aligning fast gradient signals with high-quality perturbation signals, we enable real-time, high-fidelity explanations for RL agents. Future work includes exploring human-in-the-loop training, where expert annotations could further align agent "attention" with human intuition.
Summary updated