LLM-based Realistic Safety-Critical Driving Video Generation

arXiv cs.RO / 4/14/2026

💬 OpinionIdeas & Deep AnalysisTools & Practical UsageModels & Research

Key Points

  • The paper introduces an LLM-based framework that uses few-shot code generation to automatically synthesize safety-critical driving scenarios for the CARLA simulator, including precise specification of traffic participants’ behavior and placement with emphasis on collision-relevant events.
  • By providing example prompts and code snippets, the LLM generates scenario scripts that can create rare edge cases such as pedestrian crossings under occlusion and sudden vehicle cut-ins.
  • To improve realism beyond simulation, the authors integrate a video generation pipeline that uses Cosmos-Transfer1 with ControlNet to translate rendered scenes into more realistic driving videos aligned with real-world appearance.
  • Experimental results indicate the approach produces realistic, diverse, and safety-critical scenarios, supporting more effective simulation-based testing of autonomous driving systems.

Abstract

Designing diverse and safety-critical driving scenarios is essential for evaluating autonomous driving systems. In this paper, we propose a novel framework that leverages Large Language Models (LLMs) for few-shot code generation to automatically synthesize driving scenarios within the CARLA simulator, which has flexibility in scenario scripting, efficient code-based control of traffic participants, and enforcement of realistic physical dynamics. Given a few example prompts and code samples, the LLM generates safety-critical scenario scripts that specify the behavior and placement of traffic participants, with a particular focus on collision events. To bridge the gap between simulation and real-world appearance, we integrate a video generation pipeline using Cosmos-Transfer1 with ControlNet, which converts rendered scenes into realistic driving videos. Our approach enables controllable scenario generation and facilitates the creation of rare but critical edge cases, such as pedestrian crossings under occlusion or sudden vehicle cut-ins. Experimental results demonstrate the effectiveness of our method in generating a wide range of realistic, diverse, and safety-critical scenarios, offering a promising tool for simulation-based testing of autonomous vehicles.