Introduction
Autonomous vehicles (AVs) must navigate not only physical obstacles but also a complex landscape of regional traffic laws and social norms. Traffic regulations are notoriously context-dependent and vary significantly across jurisdictions—for instance, right-turn-on-red rules differ between the United States and Singapore. Current AV systems often rely on rigid, hand-coded logic that is difficult to scale and fails to capture the semantic nuance of legal language. While Large Language Models (LLMs) offer advanced reasoning capabilities, they are prone to hallucinations regarding specific local ordinances.
We present DriveReg, a modular framework that utilizes Retrieval-Augmented Generation (RAG) to ground LLM reasoning in actual traffic regulations. By dynamically retrieving city-specific laws and safety guidelines, DriveReg provides transparent, compliant, and safe driving decisions with human-readable justifications.
Methodology
The DriveReg framework consists of three integrated stages designed to move from raw sensory data to a legally justified driving action.
- Environment Analysis: A Vision-Language Model (VLM) processes multi-view camera images alongside the vehicle's navigation goals. It generates a structured scene description and a natural language query tailored for rule retrieval.
- Traffic Regulation Retrieval (TRR) Agent: Acting as a digital librarian, this agent searches a comprehensive database of regulatory documents, including city codes, state laws, driver manuals, and court cases. It employs a two-level RAG approach: first identifying relevant paragraphs via dense vector embeddings (FAISS) and then pinpointing specific sentences for maximum precision.
- Reasoning Agent: An LLM (e.g., GPT-4o) evaluates candidate actions against the retrieved rules. It distinguishes between Compliance (mandatory laws) and Safety (non-mandatory guidelines). The output includes a Chain-of-Thought (CoT) explanation that cites specific legal sections, ensuring transparency.
Dataset and Evaluation
To evaluate the framework, the researchers introduced the DriveReg Scenarios Dataset, a comprehensive benchmark for regulation-aware driving. It contains 500 scenarios across Boston, Singapore, and Los Angeles, including 360 hypothesized cases covering edge-case behaviors and 140 real-world scenarios sourced from nuScenes and test vehicle logs. Unlike previous datasets, every scenario is uniquely linked to specific regulatory text and annotated for action-level compliance and safety.
Key Results
DriveReg demonstrates significant improvements in decision-making accuracy and interpretability across diverse urban environments.
- Superior Accuracy: In "Hard" scenarios, DriveReg increased GPT-4o’s compliance accuracy from 86% to 99%. Across all normal hypothesized scenarios, it achieved 98% accuracy in both compliance and safety.
- Zero-Shot Regional Adaptation: The system adapts to new cities without retraining; users simply update the retrieval database. Deployment tests in Los Angeles confirmed its ability to handle complex local rules like "No Turn on Red" and pedestrian crossings.
- Interpretability and Trust: In human studies, participants rated the system's explanations 4.93/5 for clarity. By citing specific laws (e.g., "Massachusetts General Law Chapter 89"), the system moves away from "black box" AI toward an auditable decision process.
- Real-World Feasibility: When optimized, the Reasoning Agent processes decisions in approximately 1 second, making it viable for high-level tactical planning in real driving environments.
Conclusion
DriveReg bridges the gap between perception-based planning and legally-aware driving. By grounding LLM reasoning in a dynamic library of traffic regulations, it provides a scalable, transparent, and highly accurate solution for autonomous navigation. Future work will focus on integrating this reasoning directly into continuous trajectory planning and improving the robustness of the initial perception stage.
Summary updated