Causal Composition Diffusion Model for Closed-loop Traffic Generation

Haohong Lin, Xin Huang, Tung Phan, David S. Hayden, Huan Zhang, Ding Zhao, Siddhartha S. Srinivasa, Eric M. Wolff, Hongge Chen

Abstract

Generating realistic yet highly controllable traffic simulations is essential for the safe deployment of autonomous vehicles (AVs). However, existing generative models often face a fundamental trade-off between behavioral realism and the ability to steer agents toward specific safety-critical events. We introduce CCDiff (Causal Compositional Diffusion), a framework that addresses this by explicitly modeling causal dependencies between traffic agents. By integrating a Decision Causal Graph (DCG) into a diffusion-based generative process, CCDiff enables precise control over agent behavior without compromising the realism of the overall scene. Our evaluation on real-world datasets demonstrates that CCDiff achieves a superior balance of realism and controllability, effectively reaching the Pareto frontier of traffic generation performance.

Introduction

Testing AVs requires exposure to rare, safety-critical scenarios—such as near-misses or complex intersection maneuvers—that are difficult to find in naturalistic driving data. Generating these scenarios synthetically presents a significant challenge: models must balance realism (human-like behavior) with controllability (the ability to force specific outcomes).

Qualitative comparison of CCDiff against baselines (STRIVE, CTG, TrafficSim) in generating realistic, safety-critical scenarios.

As shown in Figure 1, existing models often fail this trade-off. Data-driven models like TrafficSim are realistic but struggle to generate rare collisions, while rule-based or guided models like CTG often produce robotic or jittery behavior when forced into safety-critical states. This is primarily due to "gradient conflicts," where the objective for realism and the objective for control point in opposing directions.

Methodology

CCDiff frames traffic generation as a Constrained Factored Markov Decision Process (CFMDP). The core of the approach is the Decision Causal Graph (DCG), which identifies "who is reacting to whom" at each timestep.

The pipeline consists of three key components:

  1. Causal Composition Scene Encoder: A transformer-based architecture that uses temporal tokenizers and spatial attention to embed agent histories. It employs a "Time-to-Collision" (TTC) mask to focus only on causally relevant agents.
  2. Causal Ranking: To minimize noise and gradient conflicts, the model identifies the "Top-K" most influential agents using graph-based community detection.
  3. Structure-Guided Diffusion: The model uses a diffusion process to denoise random trajectories. It applies classifier-free guidance as a "do-intervention" only on the causally relevant agents, preserving the realism of the rest of the scene.

Key Results

We evaluated CCDiff against state-of-the-art baselines, including STRIVE, CTG, and TrafficSim, using the nuScenes dataset and the tbsim closed-loop simulation environment.

The Pareto frontier of Realism vs. Controllability, showing CCDiff's superior performance over baselines.

As illustrated in Figure 6, CCDiff consistently sits closer to the Pareto frontier than previous models. In multi-agent generation tasks, CCDiff outperformed or matched baselines in 10 out of 12 metrics. Notably, it maintained high realism scores over long-horizon (5-second) simulations, whereas models like STRIVE often drifted into unrealistic behavior. Qualitatively, CCDiff was uniquely capable of generating complex multi-car coordination, such as unprotected left turns, with high fidelity.

Conclusion

CCDiff represents a significant step forward in controllable traffic simulation by leveraging causal reasoning to resolve the conflict between realism and guidance. By focusing interventions on the most influential agents, the model generates high-quality, safety-critical scenarios that are essential for AV testing. Future work will focus on automating hyperparameter tuning and scaling the approach to larger traffic foundation models.

Summary updated

BibTeX
@inproceedings{lin2025causal,
  author = {Haohong Lin and Xin Huang and Tung Phan and David S. Hayden and Huan Zhang and Ding Zhao and Siddhartha S. Srinivasa and Eric M. Wolff and Hongge Chen},
  title = {{Causal Composition Diffusion Model for Closed-loop Traffic Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02565},
}
Figure