Embedding High-Level Knowledge into DQNs to Learn Faster and More Safely

Zihang Gao, Fangzhen Lin, Yi Zhou, Hao Zhang 0071, Kaishun Wu, Haodi Zhang

Deep Reinforcement Learning (DRL) has achieved remarkable success in complex tasks, yet it faces significant hurdles: the "cold start" problem where initial exploration is slow and random, the risk of catastrophic failures during training, and a general lack of explainability. This paper, presented at AAAI-20, introduces Rule-interposing Learning (RIL), a framework that bridges the gap between "black-box" deep learning and human-readable symbolic logic by injecting high-level knowledge into the training loop.

The Rule-interposing Learning (RIL) Framework

In a standard Deep Q-Network (DQN), the agent selects actions based solely on predicted Q-values. RIL modifies this by passing the agent's proposed action through a symbolic "rule set" before execution. Rules are defined as pairs $(\eta, \delta)$, where $\eta$ is a first-order logic condition about the environment and $\delta$ is a set of recommended or allowed actions.

The framework utilizes two distinct interposing schemes:

  1. Acceleration Rules: These act as "training wheels" with an intervention probability that decays as the agent learns. They steer the agent away from useless exploration in the early stages, effectively pruning the search space.
  2. Safety Rules: These are permanent guards that always intervene if the DQN suggests a "dangerous" action, replacing it with a safe alternative from the knowledge base to prevent catastrophic mistakes.

Experimental Evaluation

The authors evaluated RIL against a standard DQN across four classic environments: Flappy Bird, Space War, Breakout, and Grid World. Each environment was augmented with simple heuristic rules (e.g., "don't fly too high" or "move the paddle toward the ball's horizontal position").

The four experimental environments used to validate the RIL framework: Flappy Bird, Space War, Breakout, and Grid World.

Key Results and Insights

The experiments demonstrated that RIL outperformed standard DQNs in every scenario. By pruning the exploration space, RIL reached high reward thresholds significantly faster and with fewer training episodes.

Learning curves showing average reward over episodes for RIL (blue) vs. baseline DQN (orange) across all four test environments.

Key takeaways include:

  • Hybrid AI Efficiency: RIL effectively combines the perception power of deep networks with the reliability of symbolic logic, leading to steeper learning curves and smoother training.
  • Safety as a Constraint: In the Grid World experiment, safety rules prevented the agent from suffering massive negative rewards from traps, allowing for much higher performance in the earliest stages of training.
  • Modularity: Because the rules are separate from the neural network architecture, they can be easily swapped or transferred between similar tasks without retraining the entire model.

Conclusion

RIL provides a practical path toward more efficient and safer reinforcement learning. While current rules are manually authored, the framework demonstrates the power of neuro-symbolic integration. Future work may focus on automated rule discovery or scaling the framework to high-dimensional continuous state spaces like autonomous driving.

Summary updated

BibTeX
@inproceedings{gao2020embedding,
  author = {Zihang Gao and Fangzhen Lin and Yi Zhou and Hao Zhang and Kaishun Wu and Haodi Zhang},
  title = {{Embedding High-Level Knowledge into DQNs to Learn Faster and More Safely}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i09.7091},
}
Figure