用大模型精准提取交通法规在真实场景下的驾驶要求
Towards Lawful Autonomous Driving: Deriving Scenario-Aware Driving Requirements from Traffic Laws and Regulations

- 通过场景分类体系锚定大模型推理,提升法规匹配精度
- 在5897个场景上使强制/禁止类要求准确率分别提升36.9%和38.2%
- 已部署于自动驾驶系统,支持实时合规监测
遵守交通法规是人类驾驶员的基本要求,但自动驾驶车辆在复杂现实场景中仍可能违规。传统方法使用形式逻辑显式定义行为约束,但耗时费力且难维护。借助大语言模型(LLMs)从法规中推导法律要求成为新方向,但缺乏对结构化交通场景的显式建模,导致模型常误引无关条款或遗漏适用条款,产生不精确的要求。为此,本文提出一种新型流水线,通过节点级锚点将大模型推理锚定于交通场景分类体系,编码层级语义。在中文交通法规与OnSite数据集(5,897个场景)上,该方法使法规-场景匹配率提升29.1%,强制性与禁止性要求的准确率分别提高36.9%和38.2%。进一步验证了其在真实场景中的可行性:构建了自动驾驶导航的合规层,并开发了车载实时合规监控系统,为未来自动驾驶系统的研发、部署及监管提供坚实基础。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。