Abstract
Deep Reinforcement Learning (RL) has achieved remarkable success in complex tasks, yet its application in safety-critical domains is limited by the difficulty of formally verifying neural network policies. This paper introduces a framework for training Binarized Neural Networks (BNNs)—networks with 1-bit weights and activations—to perform RL tasks. By combining a high-expressivity BNN architecture (BQN-L) with a full-precision target network during training, the authors produce policies that achieve competitive performance on Atari benchmarks while being significantly easier to formally verify for safety and robustness than standard deep networks.
Introduction
While Deep RL excels in games and robotics, its "black box" nature hinders adoption in safety-critical systems like autonomous vehicles. Formally proving that a policy will never take a dangerous action is an NP-hard problem for standard deep neural networks (DNNs). As networks grow, the exponential increase in activation patterns makes safety certification computationally impossible. This work addresses the scalability gap by utilizing BNNs, which offer a discrete mathematical structure that is far more manageable for formal verification tools.
Methods
The authors propose Deep Binary Q-Learning, a modification of the classic DQN algorithm designed to overcome the poor convergence typically seen when binarizing RL agents. Two key innovations facilitate this:
- Increased Expressivity (BQN-L): To compensate for the information loss of 1-bit neurons, the authors developed a larger architecture with additional convolutional layers. Despite the increased neuron count, the 1-bit parameters ensure the model remains ~21x smaller in memory than a standard DQN.
- Hybrid Training: The training process employs a full-precision target network to calculate Bellman updates. This provides a high-resolution signal that stabilizes the learning of the binary "active" policy network.
For verification, the BNN's logic is encoded into Mixed-Integer Programming (MIP) constraints, allowing solvers to exhaustively check for counterexamples to specific safety properties, such as robustness against input perturbations.
Experimental Setup
The approach was evaluated on seven classic Atari 2600 games via the OpenAI Gym environment, including Beam Rider, Breakout, Enduro, Pong, Qbert, Seaquest, and Space Invaders*. These benchmarks require agents to process raw pixel data to make high-stakes decisions.
Key Results
Performance and Compression
The BQN-L model achieved scores comparable to full-precision DQNs across most games. Notably, in Qbert*, BQN-L (2033) slightly outperformed the standard DQN (2017). Beyond performance, the binarized models offer massive compression: standard BQN models are 31x smaller than DQNs, while the larger BQN-L remains 21x smaller, making them highly suitable for edge device deployment.
Verification Success
The core advantage of the binary approach is demonstrated in verification tasks. When attempting to verify robustness against luminance changes within a 30-minute timeout, the standard DQN failed to verify a single property. In contrast, the BQN model successfully verified 78% of properties, and the more complex BQN-L verified 52%.
Discussion and Future Work
The results highlight a manageable trade-off between verifiability and performance. The discrete search space of BNNs (weights restricted to +1 or -1) allows solvers to navigate the model's logic far more efficiently than the continuous range of floating-point weights.
However, limitations remain. Verification scalability still declines as the binary network grows (from 78% in BQN to 52% in BQN-L). Furthermore, while Q-Learning is well-suited for binarization, applying these techniques to Policy Gradient methods like PPO remains a challenge due to the non-differentiable nature of binary blocks. Future research will focus on certifying more complex temporal safety properties, such as ensuring an agent avoids collisions over a multi-step time horizon.
Summary updated