Introduction
Modern autonomous vehicles (AVs) excel in routine traffic but struggle with "long-tail" events—rare, high-risk corner cases that are difficult to capture in standard training datasets. Current data-driven paradigms often suffer from data bias and a lack of interpretability, operating as "black boxes" that make safety guarantees challenging. Large Language Models (LLMs) offer a promising alternative due to their human-like reasoning and common-sense knowledge. However, LLMs can be overconfident and struggle to accurately perceive "coupled risks"—the complex interactions between multiple vehicles, speeds, and road geometries. SafeDrive addresses these challenges by bridging the gap between explicit risk quantification and LLM-based reasoning.
The SafeDrive Framework
SafeDrive is a modular framework that treats GPT-4 as a driving agent constrained by explicit safety knowledge. The architecture consists of four primary components: a Risk Module, a Memory Module, a Reasoning Module, and a Reflection Module.
1. Risk Module (The Knowledge Core)
Instead of providing raw coordinates to the LLM, the Risk Module calculates a Quantified Perceived Risk (QPR). It utilizes an omnidirectional Driver Risk Field (DRF) that accounts for vehicle dynamics, such as speed and steering angle, and the potential consequences of surrounding objects (e.g., the higher risk associated with a truck versus a sedan). This provides the agent with a 360-degree awareness, crucial for safe lane changes and intersection navigation.
2. Memory and Reasoning Modules
The Memory Module uses a vector database to store and retrieve past successful experiences, allowing the agent to "recall" how to handle similar tricky situations. The Reasoning Module employs GPT-4 using Chain-of-Thought (CoT) prompts. It processes scene descriptions, quantified risk assessments, and retrieved memories to determine the optimal driving action.
3. Reflection Module
To ensure continuous improvement, the Reflection Module acts as a self-correction mechanism. If the agent makes a suboptimal choice, this module analyzes the error, corrects the logic, and updates the Memory Module to prevent future occurrences of the same mistake.
Experimental Evaluation
The framework was evaluated using three prominent real-world traffic trajectory datasets: HighD (highway data), InD (complex urban intersections), and RounD (non-linear roundabout paths).
Key Results
SafeDrive achieved a 100% safety rate on the HighD and RounD datasets, significantly outperforming vanilla GPT-4 (which hovered around 70-77%) and the standard Intelligent Driver Model (IDM). Furthermore, the system’s decisions aligned with real-world human driver actions over 85% of the time. Ablation studies highlighted the importance of the Memory Module, which alone improved safety rates by nearly 10%, proving that experience is vital for AI drivers.
Discussion and Future Work
SafeDrive demonstrates that bridging "System 1" (fast, instinctive risk perception) and "System 2" (slow, deliberate logical reasoning) can mitigate LLM hallucinations and overconfidence in high-stakes environments.
However, a significant limitation remains: latency. With an average response time of 18–24 seconds per decision, the current system is not suitable for real-time deployment. Future work will focus on utilizing faster models (such as OpenAI’s o1-preview), fine-tuning LLMs specifically for traffic safety, and incorporating more granular environmental features like road boundaries and static obstacles.
Summary updated