# Towards Lawful Autonomous Driving: Deriving Scenario-Aware Driving Requirements from Traffic Laws and Regulations

Source: [Towards Lawful Autonomous Driving: Deriving Scenario-Aware Driving Requirements from Traffic Laws and Regulations](<https://www.sota2.com/research/paper/69f03f8155a3c32af89fa5e3>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-04-29T05:00:19.306Z

Authors: Bowen Jian, Rongjie Yu, Hong Wang, Liqiang Wang, Zihang Zou

Published: 2026-04-27T14:49:44.000Z

## Abstract

Driving in compliance with traffic laws and regulations is a basic requirement for human drivers, yet autonomous vehicles (AVs) can violate these requirements in diverse real-world scenarios. To encode law compliance into AV systems, conventional approaches use formal logic languages to explicitly specify behavioral constraints, but this process is labor-intensive, hard to scale, and costly to maintain. With recent advances in artificial intelligence, it is promising to leverage large language models (LLMs) to derive legal requirements from traffic laws and regulations. However, without explicitly grounding and reasoning in structured traffic scenarios, LLMs often retrieve irrelevant provisions or miss applicable ones, yielding imprecise requirements. To address this, we propose a novel pipeline that grounds LLM reasoning in a traffic scenario taxonomy through node-wise anchors that encode hierarchical semantics. On Chinese traffic laws and OnSite dataset (5,897 scenarios), our method improves law-scenario matching by 29.1\\% and increases the accuracy of derived mandatory and prohibitive requirements by 36.9\\% and 38.2\\%, respectively. We further demonstrate real-world applicability by constructing a law-compliance layer for AV navigation and developing an onboard, real-time compliance monitor for in-field testing, providing a solid foundation for future AV development, deployment, and regulatory oversight.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Deriving driving requirements on Tagged scenarios Mandatory behaviors (test)](<https://www.sota2.com/research/sota/deriving-driving-requirements-on-tagged-scenarios-mandatory-behaviors-test.md>): Deriving driving requirements; Tagged scenarios Mandatory behaviors (test); 1-gram F1: 73.3.

- [Deriving driving requirements on Tagged scenarios Prohibitive behaviors (test)](<https://www.sota2.com/research/sota/deriving-driving-requirements-on-tagged-scenarios-prohibitive-behaviors-test.md>): Deriving driving requirements; Tagged scenarios Prohibitive behaviors (test); 1-gram F1 Score: 77.2.

- [Law-Scenario Matching on Law-Scenario Matching Dataset](<https://www.sota2.com/research/sota/law-scenario-matching-on-law-scenario-matching-dataset.md>): Law-Scenario Matching; Law-Scenario Matching Dataset; Recall: 95.3.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2604.24562>)

[PDF](<https://arxiv.org/pdf/2604.24562.pdf>)
