Introduction
Deep Reinforcement Learning (RL) has achieved remarkable success in continuous control tasks, but its outputs—deep neural networks—are essentially "black boxes." They are notoriously difficult to interpret, nearly impossible to formally verify for safety, and often fail to generalize to slightly different environments.
Programmatic Reinforcement Learning (PRL) aims to solve this by representing policies as short, human-readable programs (e.g., using PID controllers or decision trees). While programs are easier to verify and generalize better, they are hard to train because the space of programs is discrete and non-differentiable. Previous "distillation" methods trained a neural network first and then tried to convert it into a program in one shot, often resulting in a massive performance drop known as the "distillation gap."
To address this, researchers have introduced PROPEL (Imitation-Projected Programmatic Reinforcement Learning), a meta-algorithm that learns interpretable, symbolic programmatic policies by combining the high performance of deep RL with the structure of program synthesis. By framing the problem as constrained mirror descent, PROPEL "lifts" a programmatic policy into a more flexible neural-programmatic space to find improvements, and then "projects" it back into a pure program via imitation learning.
The PROPEL Method
PROPEL treats programmatic learning as an iterative optimization problem. The core logic follows a "lift-and-project" cycle based on Functional Mirror Descent:
- The Mixed Policy Space: Instead of looking only at programs, PROPEL considers a joint space where a policy is the sum of a programmatic part and a neural "residual" part.
- The UPDATE Step (Lifting): Starting from a program, the algorithm takes a gradient step in the neural space. It uses standard deep RL (like DDPG) to train a neural network that "corrects" or improves upon the current programmatic policy.
- The PROJECT Step (Projecting): Once the combined policy (Program + Neural) performs well, the algorithm uses program synthesis via imitation learning (specifically the DAgger algorithm) to find a new, pure programmatic policy that mimics the behavior of the combined "lifted" policy.
- Iteration: This process repeats, gradually refining the program using neural "hints" to navigate the complex policy landscape.
Key Insights
- Neural Nets as Search Guides: The most powerful idea in PROPEL is using neural networks not as the final product, but as a "differentiable guide" to help search the non-differentiable space of programs.
- Mirror Descent Framework: By casting PRL as constrained mirror descent, the authors provide a rigorous mathematical foundation for why this "train-then-synthesize" loop actually converges to a good solution.
- Safety through Structure: Programmatic policies are shown to be significantly more stable. While a neural network might learn to drive fast but occasionally fly off the track (high variance), a programmatic policy tends to be more consistent and "safer" during training.
- Formal Verifiability: Because the output is a program, the authors were able to use the Z3 SMT-solver to formally verify smoothness properties of their racing policy in under half a second—something impossible with a deep neural network.
Experimental Results
The researchers evaluated PROPEL on three continuous control domains, including classic control benchmarks (Mountain-Car, Pendulum) and TORCS (a high-fidelity racing simulator with five distinct tracks). They compared PROPEL against pure neural RL (DDPG), existing programmatic methods (NDPS, VIPER), and manual PID controllers.
- Superior Performance: PROPEL consistently outperformed state-of-the-art programmatic baselines across all TORCS tracks.
- Lower Crash Rates: In TORCS, the neural baseline (DDPG) had a high crash ratio (up to 92% on some tracks). PROPEL-based programs had significantly lower crash ratios (often <16%) while maintaining competitive lap times.
- Better Generalization: Policies trained on one track and tested on others showed that PROPEL programs generalized much better than neural networks, which often crashed immediately when faced with a new track layout.
- Closing the Gap: PROPEL significantly reduced the "distillation gap," achieving lap times much closer to (and sometimes better than) the noisy neural experts.
Limitations and Future Work
While PROPEL represents a significant step forward, it has some limitations. Its performance is somewhat dependent on the stability of the underlying deep RL algorithm (DDPG); if the neural update fails to find a good direction, the program synthesis step will struggle. Additionally, while better than neural nets, the programmatic policies still showed some performance degradation on unseen tracks, suggesting a need for more diverse training environments.
Finally, the quality of the policy is limited by the Domain-Specific Language (DSL) provided. If the DSL doesn't contain the right building blocks, PROPEL cannot synthesize a winning policy. Future work could involve automatically evolving the DSL itself to further enhance the flexibility and power of programmatic reinforcement learning.
Summary updated