NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Semi-Automated Synthesis of Driving Rules

Diego Ortiz Barbosa, Leilani Gilpin, Alvaro A. CárdenasVehicleSec 2023

Introduction

As autonomous vehicles (AVs) move closer to widespread deployment, research has traditionally focused on "hard safety"—the immediate mechanics of avoiding collisions and maintaining lane positioning. However, human driving is governed by a complex layer of "common sense" and regional societal norms that are difficult to encode. For example, understanding that a trailer increases jackknifing risks in high winds or knowing when it is socially acceptable (or legal) to turn right on a red light requires more than just obstacle detection.

Manually hard-coding these rules for every jurisdiction is unscalable. To address this, researchers have developed a semi-automated pipeline designed to ingest natural language driving handbooks and output machine-readable formal logic. This framework allows AVs to monitor their own behavior for subtle failures or anomalies that standard safety checks might overlook.

Methodology

The proposed system transforms standard PDF driver handbooks into a formal specification through a multi-stage pipeline:

  1. Data Filtering: Text is extracted from safety-oriented chapters using PyPDF2, while administrative sections (e.g., licensing procedures) are manually excluded.
  2. NLP Parsing: The system identifies conditional logic by scanning for keywords such as "IF," "THEN," and "BECAUSE."
  3. Rule Synthesis: Sentences are decomposed into antecedents (if-phrases) and consequents (then-phrases).
  4. Formal Representation: Rules are converted into standardized strings and Resource Description Framework (RDF) triples—(subject, verb, object). This format ensures the rules are programming-language-agnostic and portable across various simulators like CARLA or LGSVL.
  5. Validation: Human researchers review the output to refine incorrectly parsed logic and discard non-actionable information.
The multi-stage pipeline for extracting and validating driving rules from PDF handbooks.

Datasets and Regional Nuance

The study evaluated official driver handbooks from the 15 most populated U.S. states and 6 Australian states/territories. This diverse dataset allowed the system to capture regional differences, such as left-hand side driving and unique environmental hazards like "black ice" in northern states or "dust storms" in Arizona.

Interestingly, the researchers found that California’s manual was the most "machine-readable" due to a writing style that heavily favored clear IF-THEN structures. This suggests that the way laws are drafted can significantly impact the ease with which they are translated into AI constraints.

Key Results

The pipeline successfully generated a corpus of 278 driving rules. While the system is not yet fully autonomous, it significantly accelerates the rule-encoding process through a human-in-the-loop approach.

  • Automation Success: The system automatically identified 67 semantically correct rules without human intervention.
  • Refinement: An additional 212 rules were produced through manual refinement of the automated output.
  • Categorization: Extracted rules were clustered into four primary domains: Vehicle Behavior, Road Signs, Environmental Conditions, and Safety Hazards.
Quantitative breakdown of rule extraction performance by state and territory.

Analysis of the results showed that "self isa" was the most significant bigram, confirming that the majority of driving rules center on the state and identity of the "ego vehicle."

Limitations and Future Directions

The research highlighted several technical hurdles, particularly regarding PDF parsing. Complex layouts, tables, and figure boxes often led to "broken words" and discarded rules, especially in manuals from Tasmania and Washington. Furthermore, the current IF-THEN logic struggles with temporal constraints (e.g., "wait for 3 seconds") and complex qualifiers.

Future work will focus on moving from rule synthesis to active monitoring. The goal is to implement these rules within live anomaly detection systems to flag instances where an AV's behavior deviates from established "common sense" driving norms during simulation.

Summary updated

BibTeX
@inproceedings{barbosa2023semi,
  author = {Diego Ortiz Barbosa and Leilani Gilpin and Alvaro A. Cárdenas},
  title = {{Semi-Automated Synthesis of Driving Rules}},
  booktitle = {VehicleSec},
  year = {2023},
  doi = {10.14722/vehiclesec.2023.23083},
}
Figure