用大模型生成自动驾驶代码,并通过仿真自动评估修复,提升开发效率与安全性。
On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Software
- 构建LLM-Agent+仿真+规则反馈的闭环流程,实现代码自动生成与验证。
- 在ACC和避撞场景中,多种大模型生成代码通过仿真测试,表现稳定可靠。
- 工业级专家实测认可,适合自动驾驶研发团队加速安全代码迭代。
自动驾驶系统(ADS)是负责环境感知与决策的安全关键软件,其复杂场景下的持续改进依赖迭代式DevOps流程,但该流程本身耗时耗力。本文提出一种基于大语言模型(LLM)的自动化代码生成与评估原型,采用由LLM代理、仿真模型和规则反馈生成器组成的流水线,在工业环境中进行验证。生成的代码在多个关键交通场景下通过仿真自动评估,并生成反馈用于代码修正或缺陷修复。实验使用Codellama:34b、DeepSeek (r1:32b、Coder:33b)、CodeGemma:7b、Mistral:7b及GPT4,在自适应巡航控制(ACC)和无监督避撞机动(CAEM)任务中进行测试。最终通过访谈研究,由两家整车厂的11位专家对工具进行了评估,结果表明该方法具备实际应用潜力。
原文摘要 · Abstract (English)
Automated Driving System (ADS) is a safety-critical software system responsible for the interpretation of the vehicle's environment and making decisions accordingly. The unbounded complexity of the driving context, including unforeseeable events, necessitate continuous improvement, often achieved through iterative DevOps processes. However, DevOps processes are themselves complex, making these improvements both time- and resource-intensive. Automation in code generation for ADS using Large Language Models (LLM) is one potential approach to address this challenge. Nevertheless, the development of ADS requires rigorous processes to verify, validate, assess, and qualify the code before it can be deployed in the vehicle and used. In this study, we developed and evaluated a prototype for automatic code generation and assessment using a designed pipeline of a LLM-based agent, simulation model, and rule-based feedback generator in an industrial setup. The LLM-generated code is evaluated automatically in a simulation model against multiple critical traffic scenarios, and an assessment report is provided as feedback to the LLM for modification or bug fixing. We report about the experimental results of the prototype employing Codellama:34b, DeepSeek (r1:32b and Coder:33b), CodeGemma:7b, Mistral:7b, and GPT4 for Adaptive Cruise Control (ACC) and Unsupervised Collision Avoidance by Evasive Manoeuvre (CAEM). We finally assessed the tool with 11 experts at two Original Equipment Manufacturers (OEMs) by conducting an interview study.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。