Abstract
Traffic accident analysis has traditionally relied on numerical classification models that often fail to capture the complex, narrative nature of road incidents. This paper introduces CrashLLM, a novel framework that treats traffic safety analysis as a natural language reasoning task. By fine-tuning Large Language Models (LLMs) on a newly curated dataset of textualized crash reports, the authors achieve significant improvements in prediction accuracy and enable sophisticated "what-if" causal analyses. The results demonstrate that language serves as a superior unified interface for heterogeneous data sources, including police reports, infrastructure data, and satellite imagery.
Introduction: The Limitations of Traditional Crash Analysis
Traffic accidents represent a persistent global crisis, yet analytical methodologies have remained largely static. Conventional machine learning approaches typically treat crash data as a simple classification problem, flattening nuanced variables—such as weather conditions, road geometry, and human behavior—into rigid numerical vectors or one-hot encodings. This reductionist approach often loses the "story" of the crash, failing to account for the complex interplay of factors described in unstructured police reports or visual satellite data. Existing models struggle to reason through these heterogeneous sources, limiting the ability of city planners to identify hidden causal factors or simulate hypothetical safety scenarios.
The CrashLLM Framework
To address these challenges, the researchers developed CrashLLM, a framework designed to leverage the pre-trained world knowledge of Large Language Models for traffic safety.
The framework operates by converting non-numeric data into a structured, paragraph-based format. This "textualization" process allows the model to digest diverse information—from GPS coordinates to vehicle types—within a single narrative context.
Methods: Textualization and Model Architecture
The core innovation lies in the transformation of raw data into descriptive prompts. The team gathered data from the Highway Safety Information System (HSIS), satellite imagery, and police reports, reorganizing it into four primary categories: General Information, Infrastructure, Event Information, and Unit (vehicle/person) Information.
Using an AI-human collaborative approach, these categories were synthesized into ~300-word descriptive paragraphs. For instance, instead of a binary code for road conditions, the model reads a detailed description of the surface at the time of the incident. The researchers fine-tuned Llama-2 (7B, 13B, and 70B variants) using Low-Rank Adaptation (LoRA), a parameter-efficient technique. To enhance classification precision, specialized tokens (e.g., [<FATAL>]) were added to the model's vocabulary.
The CrashEvent Dataset
The study introduced CrashEvent, a large-scale dataset comprising 19,340 real-world crash records from Washington State in 2022. This dataset includes over 6 million words of textualized content and 50 attributes per record. Notably, satellite imagery was processed via vision-language models to provide descriptive context regarding road layouts, further enriching the textual prompts.
Key Insights and Experimental Results
The experiments revealed that language acts as a superior "container" for heterogeneous data. By leveraging its pre-training, CrashLLM can reason over patterns rather than just matching them. For example, while traditional ML might correlate rain with crashes, CrashLLM can reason why a specific intersection becomes hazardous under wet conditions.
Furthermore, CrashLLM demonstrated a significant ability to overcome data imbalance. Traffic data is often skewed toward minor incidents; traditional models frequently "cheat" by always predicting the majority class. CrashLLM showed much higher sensitivity to rare, high-severity events.
Key results include:
- Superior Accuracy: The 70B version of CrashLLM outperformed all traditional baselines, including Random Forest, XGBoost, and Bayesian Networks.
- F1 Score Improvement: The average F1 score across tasks (injury count, severity, and accident type) increased from 34.9% to 53.8%.
- Causal Discovery: Through "what-if" analysis—perturbing input text to simulate counterfactuals—the model identified that doubling work-zone-related cases would lead to a 21% increase in high-injury crashes and a 42% increase in serious crashes.
Conclusion and Future Directions
While CrashLLM represents a major step forward, the authors note several limitations. Currently, the model requires task-specific prompts or separate training for different outcomes. Additionally, the computational cost of 70B parameter models may hinder real-time deployment for some agencies. Future work will focus on developing unified "all-in-one" traffic safety models and exploring more advanced LLM architectures to further refine the reasoning capabilities of the system.
Summary updated