TrafficAlign: Aligning Large Language Models for Traffic Scenario Generation

TL;DR

TrafficAlign synthesizes traffic scenarios from videos, uses DSL validation, and fine-tunes LLMs for regional traffic distribution alignment, improving autonomous driving safety.

cs.CV 🔴 Advanced 2026-06-28 37 views
Zhi Tu Liangkun Niu Tianyi Zhang
traffic scenario generation large language models autonomous driving data validation model fine-tuning

Key Findings

Methodology

TrafficAlign integrates multimodal LLMs to automatically extract traffic scenarios from real-world videos, translating descriptions into a formal DSL for semantic validation. This process filters out invalid or incomplete scenarios. The validated data then guides parameter-efficient fine-tuning (LoRA) of large models, aligning their generation with regional traffic distributions. Experiments on three autonomous driving models demonstrated a 10.8% increase in collision detection over state-of-the-art methods, while fine-tuning reduced collision rates by 36.1%. The approach was validated across six geographically diverse regions, showing high correlation with real traffic patterns.

Key Results

  • TrafficAlign-generated scenarios increased collision detection by 10.8% compared to ChatScene across three models, indicating higher challenge levels.
  • Fine-tuning models with these scenarios led to a 36.1% reduction in collision rates on test sets, significantly enhancing safety.
  • Across six regions, generated scenarios closely matched actual traffic distributions, confirming regional adaptability.

Significance

This work addresses the longstanding challenge of aligning synthetic traffic scenarios with real-world distributions, crucial for robust autonomous vehicle testing. By combining video-based synthesis, formal validation, and efficient model adaptation, it advances the automation and regionalization of safety verification. The methodology enhances the diversity and realism of test scenarios, reducing reliance on manual rule-based approaches and static datasets, thus offering scalable solutions for industry and academia.

Technical Contribution

The paper introduces a comprehensive framework integrating multimodal scenario extraction, formal semantic validation via DSL, and parameter-efficient fine-tuning (LoRA) for regional alignment. This combination ensures high-quality, diverse, and region-specific traffic scenarios, overcoming limitations of prior rule-based or static data methods. The approach provides theoretical guarantees of scenario validity and practical scalability, enabling large-scale deployment in safety validation pipelines.

Novelty

This is the first work to combine video-derived scenario synthesis with formal DSL validation and targeted model fine-tuning for regional traffic distribution alignment. Unlike prior methods relying solely on static datasets or handcrafted rules, it leverages multimodal data and automated validation, offering a scalable, adaptive, and more realistic scenario generation pipeline with broad applicability.

Limitations

  • Dependence on large volumes of high-quality traffic videos, which may be scarce in extreme weather or remote regions, limiting diversity.
  • DSL validation, while effective, may struggle with highly complex or abnormal traffic behaviors, requiring further enhancement.
  • Model fine-tuning with LoRA, though efficient, still incurs significant computational costs, especially for very large models. Future work should explore more scalable training strategies.

Future Work

Future research will focus on integrating real-time traffic data and multi-sensor inputs to generate dynamic, context-aware scenarios. Enhancing the expressiveness of the formal validation language and reducing computational costs of fine-tuning will also be prioritized, aiming for real-time adaptive scenario generation to support autonomous vehicle deployment in diverse environments.

AI Executive Summary

The safety and robustness of autonomous vehicles hinge on their ability to handle complex, unpredictable traffic scenarios. Traditional simulation methods often fall short, relying on static datasets or handcrafted rules that cannot fully capture the diversity of real-world environments. TrafficAlign introduces a novel framework that leverages the abundance of online traffic videos to automatically synthesize high-fidelity traffic scenarios. Using advanced multimodal large language models, it extracts detailed scene descriptions, which are then converted into a formal domain-specific language (DSL). This formalization enables rigorous semantic validation, filtering out unrealistic or incomplete scenarios, thereby ensuring high data quality.

Once validated, these scenarios serve as targeted training data for fine-tuning large models via parameter-efficient methods like LoRA. This process aligns the models with the specific traffic distributions of different regions, enhancing their realism and regional adaptability. Extensive experiments across three autonomous driving models and six geographically diverse regions demonstrate that TrafficAlign-generated scenarios are more challenging, increasing collision detection by 10.8% over the state-of-the-art. After fine-tuning, the models show a 36.1% reduction in collision rates, indicating significant safety improvements.

Furthermore, the generated scenarios exhibit strong alignment with real-world traffic patterns, validating the approach’s regional generalization capabilities. This work not only advances the automation of traffic scenario generation but also provides a scalable, region-specific validation tool that can adapt to various environments. Future directions include integrating real-time traffic data and multi-sensor inputs, further improving scenario realism and dynamic complexity. Overall, TrafficAlign represents a significant step toward safer, more reliable autonomous driving systems, bridging the gap between synthetic testing and real-world deployment.

Deep Analysis

Background

Recent advances in autonomous driving have emphasized the importance of high-fidelity traffic scenario simulation for safety validation. Early methods relied heavily on handcrafted rules or limited real-world datasets, which restricted diversity and realism. Techniques like Meta-Sim, STRIVE, and SLEDGE introduced probabilistic models and structured representations to generate scenarios, but often lacked regional specificity and scalability. Meanwhile, large language models (LLMs) have shown promise in generating traffic descriptions, yet their outputs often deviate from actual distributions. The challenge remains to synthesize diverse, regionally accurate scenarios that can be systematically validated and used for model training. TrafficAlign addresses this by combining video-based data extraction, formal validation, and model fine-tuning, filling a critical gap in scalable, realistic scenario generation.

Core Problem

The core issue is how to generate traffic scenarios that are both realistic and region-specific, leveraging large-scale video data while ensuring semantic correctness. Existing approaches struggle with limited diversity, poor regional adaptation, or lack of formal validation, leading to scenarios that do not accurately reflect real-world traffic conditions. This hampers the effectiveness of autonomous vehicle testing and model training. Additionally, aligning large language models with regional traffic distributions remains an open problem, as models trained on generic data often produce homogeneous or unrealistic scenarios. Addressing these bottlenecks requires an integrated framework that can extract, validate, and adapt scenarios automatically, ensuring high fidelity and regional relevance.

Innovation

TrafficAlign's key innovations include: 1) multimodal extraction of traffic scenarios from videos using advanced LLMs, enabling automatic, large-scale data synthesis; 2) formal validation via a domain-specific language (DSL), which ensures semantic completeness and realism; 3) a region-specific fine-tuning process using LoRA, aligning LLMs with local traffic distributions. These innovations collectively enable scalable, high-quality scenario generation that is both diverse and geographically accurate, surpassing prior rule-based or static data-driven methods. The integration of formal validation with adaptive model tuning is particularly novel, providing a robust pipeline for safety-critical applications.

Methodology

  • �� Data collection: Sample traffic videos from YouTube across six diverse regions, extracting frames every 15 seconds to ensure diversity.
  • �� Scenario synthesis: Use GPT-4.1 nano with carefully designed prompts to generate detailed natural language descriptions of traffic scenes, including environment, actors, and behaviors.
  • �� Formal validation: Convert descriptions into a DSL using GPT-5, checking syntax and semantics for completeness and relevance. Discard invalid scenarios.
  • �� Self-refinement: Iteratively improve incomplete scenarios through feedback loops, enhancing data quality.
  • �� Model alignment: Fine-tune large models with LoRA on validated scenarios, focusing on regional traffic patterns.
  • �� Application: Generate synthetic scenarios for simulation in CARLA, using Scenic scripts derived from descriptions, to evaluate and improve autonomous driving models.

Experiments

The evaluation involved testing three deep RL autonomous driving models (PPO, SAC, TD3) within the SafeBench platform, using scenarios generated by TrafficAlign and baselines. Metrics included collision rate, route completion, and lane invasion. Experiments covered six regions, assessing scenario challenge level and regional fidelity. Ablation studies compared models with and without LLM alignment, confirming the importance of region-specific fine-tuning. The results demonstrated that TrafficAlign scenarios consistently induced higher challenge levels, leading to better model robustness and safety improvements after fine-tuning. Hyperparameters included 60 training steps with a learning rate of 2e-4 for LoRA tuning.

Results

TrafficAlign scenarios increased collision detection by 10.8% over ChatScene across three models, indicating higher challenge and realism. Fine-tuning with these scenarios reduced collision rates by 36.1%, significantly improving safety metrics. Cross-region evaluations showed high correlation between generated and real traffic distributions, validating regional adaptability. Ablation studies confirmed that without LLM alignment, scenario realism and challenge level decreased, underscoring the importance of the proposed alignment process. Overall, the approach demonstrated superior performance in both scenario challenge and model robustness enhancement.

Applications

This framework can be immediately applied to autonomous vehicle safety validation, providing scalable, region-specific testing scenarios that reflect real-world conditions. It reduces reliance on manual scenario design, accelerates testing cycles, and enhances model robustness. Long-term, integrating real-time traffic data and multi-sensor inputs could enable dynamic scenario generation, supporting continuous learning and adaptation of autonomous systems in diverse environments, ultimately leading to safer autonomous driving solutions worldwide.

Limitations & Outlook

Dependence on high-quality traffic videos limits applicability in data-scarce regions or adverse weather conditions. DSL validation may not fully capture complex or abnormal behaviors, requiring further enhancement. Fine-tuning large models remains computationally intensive, especially for real-time applications. Future work should focus on improving data efficiency, expanding validation language expressiveness, and reducing training costs to enable broader deployment.

Plain Language Accessible to non-experts

Imagine you’re trying to teach a robot how to drive a car safely through a busy city. Instead of just showing it a few pictures or giving vague instructions, you watch tons of videos of real traffic—cars, buses, pedestrians, traffic lights, everything. From these videos, you write down detailed descriptions of what happens in each scene, like where the cars are, how fast they go, and what the weather is like. To make sure these descriptions make sense, you check them with a special set of rules, kind of like a recipe book that ensures everything is correct. Then, you use these checked descriptions to teach the robot’s brain, adjusting it so it understands how traffic works in different places, like New York or Switzerland. Now, when the robot tries to imagine driving in these places, it can create realistic traffic scenes that help it learn to drive safely. This way, the robot gets better at handling real-world traffic, making driving safer for everyone.

ELI14 Explained like you're 14

Imagine you want to help a video game character learn how to navigate a busy city street. Instead of just giving it simple instructions, you watch real videos of city traffic—cars, buses, people walking, traffic lights changing—and then write down what happens in each scene. But these descriptions can sometimes be messy or incomplete, like missing details about where the cars are or what the weather is. So, you use a special checklist to make sure each scene makes sense and matches real traffic patterns. Once everything checks out, you use these scenes to teach the character how to drive in different places, like New York or a small town. The character then learns to handle all kinds of traffic situations, making it safer and smarter. It’s like giving the game a set of realistic scenarios to practice with, so it can become a better driver in the real world. This process helps make autonomous cars safer by training them with scenes that are as close to real life as possible.

Glossary

Large Language Model (大规模语言模型)

一种基于深度学习的模型,能理解和生成自然语言,用于描述交通场景和模型微调。论文中用GPT-4.1和Llama-3.2实现场景描述和对齐。

从交通视频中提取信息,生成场景描述,并进行区域微调。

Domain-Specific Language (领域特定语言)

一种专为特定领域设计的形式化语言,用于表达交通场景的结构和语义,便于验证。论文中用DSL进行语义验证。

将自然语言描述转化为DSL,确保场景的合理性。

LoRA (低秩适应)

一种参数高效微调技术,通过引入低秩矩阵调整预训练模型的部分参数,实现快速适应新任务。论文中用以区域对齐。

微调大模型以匹配特定地区交通特征。

SafeBench

自动驾驶性能评估平台,提供多项指标衡量模型在不同场景中的安全性和功能性。论文中用作评估工具。

评估TrafficAlign生成场景的挑战性和模型鲁棒性。

Open Questions Unanswered questions from this research

  • 1 如何提升DSL验证的表达能力,涵盖更复杂交通行为,仍需深入研究。
  • 2 在极端天气或数据稀缺地区,如何确保场景多样性和真实性是未来的挑战。
  • 3 大模型微调的计算成本仍高,需开发更高效的训练策略。

Applications

Immediate Applications

自动驾驶安全验证

利用TrafficAlign自动合成符合地区特征的交通场景,用于测试自动驾驶系统,减少实际道路测试风险。

仿真训练环境

通过自动生成高质量场景,为自动驾驶车辆提供多样化训练环境,提升模型鲁棒性。

Long-term Vision

智能交通管理

结合TrafficAlign生成的场景,优化地区交通策略,实现智能调度和管理。

Abstract

Recent research has investigated the use of large language models (LLMs) to generate traffic scenarios for autonomous driving. However, pretrained LLMs often fail to align with real-world traffic distributions. In this work, we present TrafficAlign, an automated framework that synthesizes traffic scenarios based on real-world driving videos, performs data validation, and aligns LLMs with the synthesized scenarios. The evaluation shows that traffic scenarios generated by TrafficAlign are highly effective, revealing up to 10.8% more collisions on average across three autonomous driving models than state-of-the-art methods. Furthermore, fine-tuning these driving models with TrafficAlign-generated scenarios significantly reduced collision rates by 36.1% compared with the original models. A qualitative study using traffic datasets from six geographically diverse regions shows that TrafficAlign-generated scenarios exhibit strong alignment with corresponding traffic distributions in these regions.

cs.CV