ChatScene: Knowledge-Enabled Safety-Critical Scenario Generation for Autonomous Vehicles

Jiawei Zhang, Chejian Xu, Bo Li

arXiv:2405.14062 · 2026-07-27 공개 · arXiv · PDF

reinforcement-learning large-language-models autonomous-vehicles safety-critical collision-avoidance rl-finetuning scenario-generation knowledge-retrieval

Abstract

We present ChatScene, a Large Language Model (LLM)-based agent that leverages the capabilities of LLMs to gener-ate safety-critical scenarios for autonomous vehicles. Given unstructured language instructions, the agent first generates textually described traffic scenarios using LLMs. These scenario descriptions are subsequently broken down into several sub-descriptions for specified details such as behaviors and locations of vehicles. The agent then distinctively transforms the textually described sub-scenarios into domain-specific languages, which then generate actual code for prediction and control in simulators, facilitating the creation of diverse and complex scenarios within the CARLA simulation environment. A key part of our agent is a comprehensive knowledge retrieval component, which efficiently translates specific textual descriptions into corresponding domain-specific code snippets by training a knowledge database containing the scenario description and code pairs. Extensive experimental results underscore the efficacy of ChatScene in improving the safety of autonomous vehicles. For instance, the scenarios generated by ChatScene show a 15% increase in collision rates compared to state-of-the-art baselines when tested against different reinforcement learning-based ego vehicles. Furthermore, we show that by using our generated safety-critical scenarios to fine-tune different RL-based autonomous driving models, they can achieve a 9% reduction in collision rates, surpassing current SOTA methods. ChatScene effectively bridges the gap between textual descriptions of traffic scenarios and practical CARLA simulations, providing a unified way to conveniently generate safety-critical scenarios for safety testing and improvement for AVs. The code is available at https://github.com/javyduck/ChatScene.

한국어 요약

한 줄 요약

ChatScene은 LLM을 활용해 CARLA 시뮬레이션에서 안전-critical 시나리오를 생성하는 에이전트로, 15% 높은 충돌률을 보인다.

핵심 기여도

핵심 아이디어

ChatScene은 LLM을 활용하여 텍스트 기반의 안전-critical 시나리오를 생성하고, 이를 Scenic 언어로 변환하여 CARLA 시뮬레이션에 적용하는 시스템이다. 기존 방법은 직접 코드 생성에 제한이 있었으나, ChatScene은 LLM을 사용해 텍스트를 분해하고, Scenic 코드 스니펫을 검색하여 조합하는 방식을 채택함으로써 실행 가능한 시뮬레이션 코드를 생성한다. 특히, 텍스트 설명과 코드 쌍을 포함한 지식 데이터베이스를 학습하여 효율적인 텍스트-코드 변환을 가능하게 한다. 이는 기존의 직접 생성 방식보다 안정성과 실행 가능성 측면에서 우수한 결과를 제공한다.

기술적 접근법

주요 결과

의의 및 한계

ChatScene은 텍스트 기반의 시나리오 생성과 시뮬레이션 코드 생성을 통합한 체계적인 프레임워크로, 기존 방법보다 시나리오 생성의 범위와 다양성을 확장한다. 특히, LLM과 Scenic 언어의 결합은 텍스트-코드 변환의 효율성과 실행 가능성 문제를 해결하며, 자율주행 시스템의 안전성 테스트를 강화하는 데 기여한다. 그러나, 생성된 코드의 실행 가능성이나 API 호환성 문제는 여전히 존재하며, 더 많은 코드 예시와 데이터셋 확보가 필요하다. 또한, 모든 시나리오가 실제 운전 상황을 완벽히 반영하지 못할 수 있으며, 추가적인 현실성 검증이 요구된다.

실용적 활용

ChatScene은 자율주행 시스템 개발자들이 다양한 안전-critical 시나리오를 빠르게 생성하고 테스트할 수 있는 도구로 활용될 수 있다. 특히, 강화학습 기반 모델의 안정성 향상을 위한 미세조정 데이터 생성에 효과적이다. 또한, CARLA와 같은 시뮬레이션 플랫폼에서 사용 가능한 코드 생성 기능은 시나리오 테스트의 효율성을 높이며, 산업 현장에서의 실용성을 강화한다.