Introduction
Reinforcement Learning (RL) policies are often unnecessarily complex, making them difficult to interpret and analyze. While deep RL can train agents to solve incredibly difficult tasks, the resulting policies frequently act as "black boxes" that make thousands of decisions per episode. This paper introduces a novel method to rank the importance of specific decisions using software testing techniques, demonstrating that many agents can maintain peak performance even when taking simple "default" actions in up to 90% of states.
The Complexity Problem in Deep RL
The core argument of the paper is that many decisions made by an RL agent are redundant. In many safe states, an agent might just be "going through the motions," and a simple default action—such as "keep moving forward"—would suffice.
The challenge lies in identifying which specific states are truly critical. If researchers can pinpoint these "load-bearing" decisions, they can simplify policies, making them easier to audit, explain, and potentially deploy on lower-power hardware.
Methodology: Spectrum-Based Fault Localization
To solve this, the authors borrow a clever trick from the world of software engineering: Spectrum-Based Fault Localization (SBFL). In traditional programming, SBFL identifies buggy lines of code by comparing which lines are executed in "passing" versus "failing" test runs.
To apply this to RL, the authors treat a "bad outcome" (e.g., failing to reach a goal or getting a low reward) as a software bug. Their process works as follows:
- Mutant Executions: They create "mutant" versions of a trajectory where, at certain states, the agent's trained action is replaced by a default action (like "repeat the previous action").
- Pass/Fail Labeling: Each trajectory is labeled as a "pass" or "fail" based on a predefined reward threshold.
- Statistical Ranking: Using standard SBFL formulas, they calculate a "suspiciousness" score for each state. A state is deemed important if mutating the action there frequently leads to a "fail," while leaving it alone leads to a "pass."
- Policy Pruning: To validate the ranking, they create "pruned policies" that only use the complex RL model in the top $r\%$ of important states, defaulting to a simple rule everywhere else.
Key Insights and Interpretability
The method was evaluated on a diverse set of standard RL benchmarks, including MiniGrid, CartPole, and Atari Games, using pre-trained black-box policies.
A major finding is the 90/10 Rule: for many tasks, the vast majority of states are "unimportant." In Breakout, for instance, the agent only needs its full neural network in 10% of states to recover 90% of its original performance. Furthermore, the authors demonstrate that frequency does not equal importance. A common mistake is assuming that states visited most often are the most critical. However, frequency-based ranking performs poorly because critical decisions often happen in rare, high-stakes states.
By ranking states, the authors can generate heatmaps that show exactly where a policy is doing the heavy lifting. In navigation tasks, the "important" states are typically corners or intersections where a turn is required, while long hallways are marked as unimportant.
Quantitative Results
The quantitative results show that SBFL-based pruning is significantly more effective than random or frequency-based pruning.
In CartPole, the agent maintained 90% of its reward while using the original policy in only 31% of states, translating to only 22% of the actual steps taken during a run. As shown in the performance curves below, the SBFL ranking allows for much steeper pruning than random or frequency-based approaches before performance drops.
Limitations and Future Work
While promising, the approach has limitations. The effectiveness of pruning depends heavily on having a sensible default action, which may not be universal across all environments. Additionally, the current model uses a hard pass/fail threshold for rewards; moving to a continuous measure could further refine rankings. Finally, for high-dimensional inputs like Atari pixels, the method requires basic state abstraction to group similar states together, and the ranking quality is sensitive to how this abstraction is defined. Future work will also require formal human studies to prove these rankings practically improve user trust and understanding.
Summary updated