Neural-to-Tree Policy Distillation with Policy Improvement Criterion

Zhao-Hua Li, Yang Yu, Yingfeng Chen, Ke Chen, Zhipeng Hu, Changjie FanarXiv 2021

TL;DR

This paper tackles the challenge of making complex deep reinforcement learning (RL) policies interpretable by distilling them into decision trees. They introduce a novel distillation objective that maximizes an "advantage evaluation" rather than simply cloning behavior, leading to more consistent and higher-performing distilled policies that better capture the nuances of the original RL agent.

What Problem Does This Paper Address?

Deep Reinforcement Learning (DRL) agents, often powered by deep neural networks (DNNs), have achieved remarkable success in complex tasks. However, these DNNs are notoriously "black boxes," making it difficult to understand why they make certain decisions. This lack of interpretability is a significant hurdle for deployment in safety-critical applications like autonomous driving or in domains where understanding decision-making is crucial for debugging and verification.

A common approach to gain interpretability is "model distillation," where a complex model (the "teacher," here a DRL DNN) is used to train a simpler, interpretable model (the "student," here a decision tree). The challenge in RL is that the data distribution is not stationary; it changes as the agent interacts with the environment and learns. Traditional distillation methods, often based on supervised learning and behavior cloning, assume a fixed data distribution. When applied to RL, even small errors in cloning the teacher's behavior can lead to a "data distribution shift," causing the distilled student policy to perform poorly or deviate significantly from the teacher's intended behavior. This paper aims to bridge this gap by developing a distillation method that is robust to these distribution shifts and produces more faithful and performant decision trees.

Methods

The core innovation of this paper lies in their proposed distillation objective, which they call Dpic (Neural-to-Tree Policy Distillation with Policy Improvement Criterion). Instead of directly mimicking the teacher's actions (behavior cloning), Dpic focuses on maximizing an "advantage evaluation."

Here's a breakdown:

  • Policy Improvement Criterion: The authors draw inspiration from policy optimization algorithms like TRPO. The idea is to evaluate how much better a proposed action is compared to the average action, considering long-term rewards. This is captured by the "advantage function" ($A_{\pi^*}(s, a)$), which quantifies the benefit of taking action $a$ in state $s$ under the expert policy $\pi^*$.
  • Maximizing Advantage: The distillation objective is formulated to maximize the expected advantage of the distilled tree policy's actions. This means the decision tree is trained to select actions that are not just similar to the teacher's, but are actively advantageous according to the teacher's learned value functions.
  • Handling Distribution Shift: By focusing on the advantage, the method inherently addresses the distribution shift problem. It prioritizes learning from states where the teacher's actions are significantly better than alternatives, rather than just trying to replicate every action, thus mitigating the impact of errors accumulating from a shifting data distribution.
  • Decision Tree Learning: The paper adapts standard decision tree learning algorithms (like ID3 for classification and CART for regression) to incorporate this new advantage-based splitting criterion. They also introduce a regularized version (DpicR) that penalizes deviations from behavior cloning to maintain model complexity and prevent overfitting.

Datasets

The paper evaluates their method on a variety of tasks:

  • Gym Tasks: Standard reinforcement learning environments like CartPole, MountainCar, and Acrobot. These are classic control tasks used to benchmark RL algorithms.
  • Commercial Fight Game: A more complex, custom environment requiring strategic combat.
  • Self-Driving Car Simulator: A realistic simulation environment for autonomous driving.

The "transfer data" used for distillation is collected by interacting with these environments using pre-trained, high-performing DNN policies (the "teachers").

Key Insights and Ideas

  • Advantage over Imitation: The most significant insight is that simply imitating an RL agent's behavior (behavior cloning) is suboptimal for distillation, especially in dynamic environments. Focusing on the advantage of actions, which captures the long-term reward implications, leads to a more faithful and performant distilled policy.
  • Controlling Distribution Shift: The advantage-based objective naturally helps control the data distribution shift problem inherent in RL distillation. By focusing on critical states and actions that yield high advantage, the method avoids being overly influenced by less informative or potentially misleading data points arising from the shifting distribution.
  • Interpretable Decisions: The distilled decision trees provide human-readable rules. The paper demonstrates that these rules are not just statistically derived but also reflect sensible decision-making logic, particularly in complex scenarios like fighting games and driving.
  • Robustness to Complexity: The proposed methods (Dpic and DpicR) can achieve good performance even with limited tree complexity, making them practical for generating interpretable models.

Key Results

  • Higher Cumulative Rewards: The proposed Dpic and DpicR methods consistently achieve higher cumulative rewards compared to behavior cloning (BC) and other baseline distillation methods (like Viper) across various tasks, including classic control tasks, a fighting game, and a self-driving simulator. For instance, in Table 2, Dpic and DpicR often outperform other methods across different tree sizes.
  • Improved Consistency: The distilled policies from Dpic are more consistent with the original teacher policy, as evidenced by lower state distribution discrepancy (MMD) values in the Atari Pong benchmark (0.0871 for Dpic vs. 0.3445 for Viper).
  • Meaningful Explanations: In the fighting game, the distilled decision trees provide explanations that focus on relevant game mechanics (e.g., combo statuses) rather than superficial features. Similarly, in the autopilot simulation, the distilled trees highlight important radar bearings related to obstacles and orientation, offering more insightful explanations than baseline methods.

Limitations and Future Work

  • Hyperparameter Tuning: The regularized version (DpicR) introduces a hyperparameter ($\alpha$) that controls the trade-off between advantage maximization and behavior cloning. The paper mentions exploring values for this parameter and choosing the best one, implying that tuning is necessary.
  • Tree Complexity: While the methods perform well with limited complexity, the paper notes that as tree complexity increases, the difference between teacher and student decreases, suggesting that for very complex policies, a larger tree might still be beneficial.
  • Future Work: The authors suggest that their approach can be conveniently applied to real-world games and industrial simulators, potentially improving interpretability and security for automatic systems. Further exploration into applying these methods to even more complex and diverse RL domains would be a natural next step.

Summary updated

BibTeX
@misc{li2021neural,
  author = {Zhao-Hua Li and Yang Yu and Yingfeng Chen and Ke Chen and Zhipeng Hu and Changjie Fan},
  title = {{Neural-to-Tree Policy Distillation with Policy Improvement Criterion}},
  year = {2021},
  eprint = {2108.06898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.06898},
}
Figure