Enhancing Vision-Language Models with Scene Graphs for Traffic Accident Understanding

Aaron Lohner, Francesco Compagno, Jonathan Francis, Alessandro Oltramari · DOI

Introduction

Identifying that a traffic accident has occurred is a foundational task for autonomous systems, but understanding the underlying mechanics—the how and why—remains a significant challenge. While modern Vision-Language Models (VLMs) like CLIP excel at recognizing general visual patterns, they often struggle with the precise structural and relational logic of a traffic scene, such as the specific orientation of vehicles or their relative distances within lanes.

To address this, researchers have developed Traffic-Scene-Graph Inference (TSGi). This multimodal pipeline treats scene graphs as a "third modality" alongside video and text, explicitly modeling spatial relationships to provide a structured backbone for accident understanding.

Methodology: The TSGi Pipeline

The TSGi framework introduces a multi-stage process to integrate symbolic reasoning with deep learning features.

The TSGi pipeline architecture, illustrating the integration of video, text, and scene graph modalities for accident classification.

1. Data Pre-processing and Scene Graph Generation

The system begins by sampling frames from accident videos. Using tools like roadscene2vec, it extracts objects such as vehicles and lanes, then generates a "Bird’s Eye View" (BEV) projection. From this BEV, a scene graph is constructed where nodes represent objects and edges represent categorical relationships, such as "near collision," "visible," or directional orientations relative to the "ego" vehicle.

The scene graph extraction process, showing the transition from raw video frames to object detection, bird's eye view projection, and the final symbolic scene graph.

2. Encoding and Alignment

The pipeline employs specialized encoders for each modality:

  • Video: Processed via X-CLIP, which is optimized for video-level temporal communication.
  • Text: Processed using the standard CLIP text encoder.
  • Scene Graphs: Encoded using a Multi-Relational Graph Convolutional Network (MRGCN) paired with LSTMs to capture temporal evolution across frames.

Inspired by contrastive learning techniques, the Scene Graph Encoder (SGE) is aligned with the frozen vision and language encoders. This ensures that the structural graph representation resides within the same semantic space as the video and text embeddings.

3. Classification

A final Multi-Layer Perceptron (MLP) head receives the concatenated embeddings from all three modalities to classify the accident into one of four distinct types.

Datasets

The model was evaluated using two primary sources:

  • Detection of Traffic Anomaly (DoTA): A benchmark of 4,677 YouTube videos. The study focused on a subset of 2,163 "ego" videos where the recording vehicle was directly involved in the incident.
  • CARLA: A synthetic traffic simulator used to establish a pre-training baseline for the scene graph encoder.

Results and Key Insights

The inclusion of structured scene graphs yielded a measurable performance improvement. The TSGi method achieved a balanced accuracy of 57.77% on the DoTA subset, representing a 5-percentage-point boost over baseline models utilizing only video and text.

Key takeaways from the experimental results include:

  • The Power of Structure: Scene graphs capture critical relational data—such as lane positioning and relative distances—that are often lost in raw pixel data or generic text descriptions.
  • Alignment Challenges: While aligning the graph modality with vision and language is theoretically beneficial, it requires substantial batch sizes and training time to outperform models where the graph encoder is trained directly on the classification task.
  • Domain Gap: Pre-training the SG encoder on real-world DoTA data significantly outperformed pre-training on synthetic CARLA data (by approximately 13 percentage points), highlighting the difficulty of transferring simulated traffic logic to real-world footage.
  • Neuro-Symbolic Synergy: The success of TSGi demonstrates the potential of neuro-symbolic AI, combining the pattern recognition of VLMs with the explicit logic of symbolic scene graphs.

Limitations and Future Directions

While promising, the current implementation has several limitations. The scene graphs are relatively low-resolution, restricted to three lanes and basic distance categories. Future work could incorporate higher-fidelity semantic details, such as vehicle velocity or complex maneuvers. Additionally, the language modality was somewhat underutilized with generic captions; generating dynamic, graph-informed captions could provide a richer training signal. Finally, expanding the model to account for relationships between all visible actors, rather than just those relative to the ego vehicle, would enhance its utility for general road monitoring.

Summary updated

BibTeX
@misc{lohner2024enhancing,
  author = {Aaron Lohner and Francesco Compagno and Jonathan Francis and Alessandro Oltramari},
  title = {{Enhancing Vision-Language Models with Scene Graphs for Traffic Accident Understanding}},
  year = {2024},
  eprint = {2407.05910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.05910},
}
Figure