Predictive Traffic Rule Compliance using Reinforcement Learning

Yanliang Huang, Sebastian Mair, Zhuoqi Zeng, Amr Alanwar, Matthias AlthoffarXiv 2025 · DOI

Introduction

Autonomous vehicle (AV) motion planning typically relies on a limited look-ahead horizon, often spanning only a few seconds. While sufficient for immediate obstacle avoidance, this short-sightedness frequently leads to violations of complex traffic rules that require long-term anticipation. For instance, a vehicle might initiate an overtaking maneuver only to encounter a "no overtaking" zone shortly thereafter, resulting in a late and potentially unsafe correction. This paper proposes a hybrid framework that integrates the reliability of classical motion planning with the predictive foresight of Reinforcement Learning (RL) to ensure long-term rule compliance.

Proposed Methodology

The core of the proposed system is a modified Actor-Critic (AC) architecture. Unlike standard Deep Reinforcement Learning (DRL) where the "actor" is a black-box neural network, this approach utilizes a deterministic, cost-based motion planner as the actor.

System architecture showing the integration of the GNN-based Critic with the Motion Planner.

The Planner-Critic Integration

  1. Motion Planner as Actor: The system employs the Commonroad Reactive Planner, a lattice-based tool that samples candidate trajectories. It selects the optimal path by minimizing a cost function that now includes a "future value" term provided by the critic.
  2. GNN Critic: A Graph Neural Network (GNN) acts as the critic, learning a state-value function $V(s)$. This function estimates the expected "rule robustness"—a quantitative measure of traffic rule satisfaction over time.
  3. Rule Formalization: Traffic regulations, such as safe following distances (R_G1) and overtaking restrictions (R_I2, R_I6), are formalized using Signal Temporal Logic (STL). These formalizations provide the mathematical foundation for the reward signals used to train the critic.

Experimental Setup

The model was trained and evaluated using the highD dataset, which contains naturalistic vehicle trajectories from German highways recorded by drones. To specifically test predictive capabilities regarding static traffic signs, the researchers augmented 100 scenarios by manually inserting "no overtaking" signs. The state representation utilizes a Vehicle-to-Vehicle (V2V) graph, capturing spatial relationships and lane-specific features between the ego-vehicle and its neighbors.

Results and Analysis

The integration of the RL critic significantly enhances the planner's ability to anticipate future constraints. A key observation is the "predictive shift" in the vehicle's behavior. While a purely reactive planner only responds to a traffic sign once it enters its immediate sensor range, the RL-augmented planner begins adjusting its trajectory much earlier.

Heatmaps illustrating the Value Network Output and Rule Robustness, demonstrating predictive behavior ahead of traffic signs.

As shown in the heatmaps, the critic learns that certain lanes or positions near an upcoming sign have lower "future value." Consequently, the vehicle may begin a lateral lane change approximately 70 meters before a sign, compared to 50 meters for a reactive baseline.

Quantitatively, the critic achieved high accuracy for rules like safe following distance (R_G1), with an explained variance of approximately 0.9. However, dynamic rules like "no overtaking on the right" (R_I2) proved more challenging due to the complex, multi-agent interactions involved, leading to higher prediction volatility. The "no overtaking" rule (R_I6) was the easiest to learn as it depends primarily on the ego-vehicle's position relative to static infrastructure.

Conclusion

This research demonstrates that augmenting classical motion planners with an RL-based critic can effectively bridge the gap between short-term safety and long-term rule compliance. By leveraging the predictive power of GNNs and the formal rigor of STL, AVs can achieve a level of "foresight" previously unattainable with standard reactive methods. Future work will explore more complex graph architectures to better handle dynamic multi-agent scenarios and test the framework in diverse urban environments where rule hierarchies are more complex.

Summary updated

BibTeX
@misc{huang2025predictive,
  author = {Yanliang Huang and Sebastian Mair and Zhuoqi Zeng and Amr Alanwar and Matthias Althoff},
  title = {{Predictive Traffic Rule Compliance using Reinforcement Learning}},
  year = {2025},
  eprint = {2503.22925},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.22925},
}
Figure