EQ-TAA: Equivariant Traffic Accident Anticipation via Diffusion-Based Accident Video Synthesis

Jianwu Fang, Lei-Lei Li, Zhedong Zheng, Hongkai Yu, Jianru Xue, Zhengguo Li, Tat-Seng Chua · DOI

Abstract

Traffic Accident Anticipation (TAA) is critical for enhancing the safety of autonomous driving systems. However, traditional supervised TAA models are limited by the high cost of manual frame-level annotations and the "background confounding" issue, where models learn to associate specific scenery with accidents rather than identifying true causal precursors. This paper introduces EQ-TAA, a novel framework that leverages an Attentive Video Diffusion (AVD) model to synthesize counterfactual futures—both accident and accident-free—from the same observation. By training on these synthetic triplets using an Equivariant Triple Loss (ETL), the model learns to isolate causal features from background noise, achieving state-of-the-art anticipation performance without requiring laborious manual labels.

Introduction

Predicting a traffic accident seconds before it occurs is a fundamental challenge in computer vision for automotive safety. While deep learning has made strides in this area, two major bottlenecks persist. First, the Annotation Bottleneck: existing methods require precise temporal labels indicating exactly when an accident begins, which is difficult to scale across diverse datasets. Second, the Background Confounding Issue: because accidents are rare, models often overfit to the static background (e.g., a specific intersection or weather condition) rather than the dynamic causal events (e.g., a vehicle suddenly swerving).

Figure 1: Overview of the proposed approach, showing how a single observation can be used to generate both accident (Acc) and non-accident (Non-Acc) future frames to train the anticipation model.

To address these, EQ-TAA reframes TAA as a causal inference problem. By using generative AI to create "what-if" scenarios from real-world dashcam footage, the framework provides a way to train models on perfectly controlled experiments where the only variable that changes is the occurrence of an accident.

Methodology

Attentive Video Diffusion (AVD)

The core of the data generation process is the AVD model, a text-to-video diffusion system based on Latent Diffusion Models (LDM). Given a sequence of "anchor" frames (normal driving footage), AVD uses text prompts (e.g., "ego-car hits a car" vs. "ego-car goes straight") to synthesize a realistic continuation of the video. To ensure temporal consistency and high-fidelity generation, the authors developed a 3D Cross-Attention Block (3D-CAB) that maintains the visual style of the original observation while accurately reflecting the semantic content of the text prompt.

Equivariant TAA and Triple Loss

The EQ-TAA model is trained using a triplet of videos: the original observation ($V^a$), a generated pseudo-accident video ($V^+$), and a generated pseudo-normal video ($V^-$). Because $V^+$ and $V^-$ share the exact same background as the anchor $V^a$, the model is forced to focus on the differences introduced by the text prompts—the causal events.

Figure 3: The causal graph and the EQ-TAA training architecture. The framework uses intervention on the causal part (C) to generate counterfactuals, which are then processed by the Video Content Encoder (VCE) and Accident Score Decoder (ASD) under an Equivariant Triple Loss.

The Equivariant Triple Loss (ETL) ensures that the predicted accident scores for these videos are consistent with their generated labels. This approach allows the model to learn the "riskiness" of a scene relative to its safe counterpart, effectively neutralizing the influence of background confounders.

Adaptive Token Sampling (AdpTokS)

To further improve focus, the EQ-TAA architecture incorporates an adaptive sampling module. This module filters out irrelevant visual tokens during encoding, prioritizing regions containing critical objects like vehicles and pedestrians that are likely to be involved in a collision.

Experiments and Results

Video Generation Quality

The AVD model was trained on the MM-AU dataset and evaluated on its ability to transform normal footage from HEV-I and BDD-A. It outperformed existing state-of-the-art diffusion models, achieving a Fréchet Video Distance (FVD) of 7924.75 and a CLIP score of 29.63, indicating superior temporal consistency and text-video alignment.

Anticipation Performance

EQ-TAA was tested on standard benchmarks including DADA-2000, A3D, and CCD. Despite not using any manual accident annotations during training, the model achieved highly competitive results:

  • DADA-2000: Reached an AUC of 0.580 and an Average Precision (AP) of 0.725.
  • Early Warning: The model achieved a mean Time-to-Accident (mTTA) of 4.258 seconds on DADA-2000, providing a significant lead time for potential intervention.
  • Stability: Ablation studies confirmed that the combination of ETL and AdpTokS significantly reduced prediction variance, leading to more stable and reliable accident scores compared to baseline models.

Conclusion

EQ-TAA demonstrates that generative AI can do more than just create realistic images; it can serve as a powerful tool for causal discovery in safety-critical tasks. By synthesizing counterfactual futures, EQ-TAA overcomes the limitations of manual labeling and background confounding, paving the way for more robust and scalable traffic accident anticipation systems. Future work will focus on narrowing the domain gap between synthetic and real-world physics to further enhance prediction accuracy.

Summary updated

Abstract

Traffic Accident Anticipation (TAA) in traffic scenes is a challenging problem for achieving zero fatalities in the future. Current approaches typically treat TAA as a supervised learning task needing the laborious annotation of accident occurrence duration. However, the inherent long-tailed, uncertain, and fast-evolving nature of traffic scenes has the problem that real causal parts of accidents are difficult to identify and are easily dominated by data bias, resulting in a background confounding issue. Thus, we propose an Attentive Video Diffusion (AVD) model that synthesizes additional accident video clips by generating the causal part in dashcam videos, i.e., from normal clips to accident clips. AVD aims to generate causal video frames based on accident or accident-free text prompts while preserving the style and content of frames for TAA after video generation. This approach can be trained using datasets collected from various driving scenes without any extra annotations. Additionally, AVD facilitates an Equivariant TAA (EQ-TAA) with an equivariant triple loss for an anchor accident-free video clip, along with the generated pair of contrastive pseudo-normal and pseudo-accident clips. Extensive experiments have been conducted to evaluate the performance of AVD and EQ-TAA, and competitive performance compared to state-of-the-art methods has been obtained.
BibTeX
@article{fang2025eq,
  author = {Jianwu Fang and Lei-Lei Li and Zhedong Zheng and Hongkai Yu and Jianru Xue and Zhengguo Li and Tat-Seng Chua},
  title = {{EQ-TAA: Equivariant Traffic Accident Anticipation via Diffusion-Based Accident Video Synthesis}},
  journal = {IEEE Trans. Multimedia},
  year = {2025},
  doi = {10.1109/tmm.2025.3607808},
}
Figure