arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.19658cs.SEcs.AI
收藏

大型语言模型在安全自动驾驶汽车代码协同生成中的应用

Large Language Models in Code Co-generation for Safe Autonomous Vehicles

Volvo Cars(沃尔沃汽车公司);University of Gothenburg(哥德堡大学);Chalmers University of Technology(查尔姆斯理工大学)

Ali Nouri, Beatriz Cabrero-Daniel, Zhennan Fei, Krishna Ronanki, Håkan Sivencrona, Christian Berger

AI总结:

针对安全自动驾驶系统,提出评估流水线对LLM生成代码进行健全性检查,比较六种模型性能并创建故障模式目录,以支持代码审查。

摘要:

各工业领域的软件工程师已经在使用大型语言模型(LLMs)来加速软件系统部分实现的进程。在考虑将其用于汽车领域的ADAS或AD系统的潜在应用时,需要系统地评估这一新设置:由于LLMs的随机性,它们给安全相关系统的开发带来了一系列已充分记录的风险。为了减少代码审查者评估LLM生成代码的工作量,我们提出了一种评估流水线,对生成的代码进行健全性检查。我们比较了六个最先进的LLMs(CodeLlama、CodeGemma、DeepSeek-r1、DeepSeek-Coders、Mistral和GPT-4)在四个安全相关编程任务上的性能。此外,我们定性分析了这些LLMs生成的最常见故障,创建了一个故障模式目录以支持人工审查者。最后,讨论了LLMs在代码生成中的局限性和能力,以及所提出的流水线在现有流程中的应用。

英文摘要:

Software engineers in various industrial domains are already using Large Language Models (LLMs) to accelerate the process of implementing parts of software systems. When considering its potential use for ADAS or AD systems in the automotive context, there is a need to systematically assess this new setup: LLMs entail a well-documented set of risks for safety-related systems' development due to their stochastic nature. To reduce the effort for code reviewers to evaluate LLM-generated code, we propose an evaluation pipeline to conduct sanity-checks on the generated code. We compare the performance of six state-of-the-art LLMs (CodeLlama, CodeGemma, DeepSeek-r1, DeepSeek-Coders, Mistral, and GPT-4) on four safety-related programming tasks. Additionally, we qualitatively analyse the most frequent faults generated by these LLMs, creating a failure-mode catalogue to support human reviewers. Finally, the limitations and capabilities of LLMs in code generation, and the use of the proposed pipeline in the existing process, are discussed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑