Hybrid Reasoning Based on Large Language Models for Autonomous Car Driving

Mehdi Azarafza, Mojtaba Nayyeri, Charles Steinmetz, Steffen Staab, Achim Rettberg

Abstract

This paper introduces a hybrid reasoning framework for autonomous driving that integrates the common-sense capabilities of Large Language Models (LLMs) with precise physical calculations. By combining real-time sensor data and object detection with GPT-4, the researchers demonstrate that LLMs can generate accurate throttle and brake commands. This approach significantly outperforms traditional methods in complex, low-visibility weather conditions, providing a path toward more generalizable and explainable autonomous vehicle (AV) decision-making.

Introduction: The Generalization Gap

Autonomous vehicle decision-making typically relies on two pillars: rule-based systems and reinforcement learning (RL). Rule-based systems are safe but brittle, struggling to generalize to "edge cases" not explicitly programmed. RL is more adaptable but often acts as a "black box," lacking formal guarantees and struggling with complex reasoning in dynamic environments like heavy rain or thick fog.

This research addresses the gap in generalizable reasoning by exploring whether LLMs can serve as a "brain" for AVs—one that understands driving regulations and physical laws while possessing the common sense to adjust for environmental hazards.

Comparison of reasoning abilities across different methods, highlighting the trade-offs between flexibility, awareness, and response time.

Methodology: The Hybrid Reasoning Workflow

The researchers developed a workflow that connects the CARLA autonomous driving simulator with GPT-4. The process follows four key stages:

  1. Perception: The system uses YOLOv8 to detect objects (vehicles, pedestrians, signs) from the car's camera feed.
  2. Contextualization: Data such as the car's current speed, distance to detected objects, and weather conditions are converted into natural language prompts.
  3. Hybrid Reasoning: The paper compares three types of LLM reasoning:
  4. Common-sense: General qualitative advice (e.g., "It's raining, you should slow down").
  5. Arithmetic: Pure mathematical formulas for deceleration based on physics.
  6. Hybrid: A combination where the LLM uses environmental context to select and solve specific physical formulations, outputting precise SPEED_LIST and BRAKE_LIST values for the next five seconds of driving.
  7. Control: These values are fed back into CARLA to control the vehicle's physical actuators.
The workflow of hybrid reasoning integrating CARLA for simulation, YOLOv8 for perception, and GPT-4 for decision-making.

Key Insights and Results

Experimental evaluations conducted in the CARLA "Town7" environment revealed several critical advantages of the hybrid approach:

  • Contextual Math Advantage: Pure arithmetic reasoning often fails in bad weather because it neglects factors like reduced visibility or increased reaction time. Hybrid reasoning allows the LLM to "pad" its mathematical safety margins based on its common-sense understanding of the weather.
  • Explainability: Unlike RL agents, the LLM provides a step-by-step breakdown of its logic, citing specific physical laws (like $v = u - a \cdot t$) and environmental factors.
  • Weather Resilience: In heavy rain and fog, hybrid reasoning maintained an average accuracy exceeding 65%. While common-sense solutions became too vague and arithmetic solutions became too risky, the hybrid approach maintained precision by adjusting deceleration rates to account for slippery, low-visibility conditions.

Limitations and Future Work

The most significant hurdle for this framework is latency. Current LLMs like GPT-4 are too slow for the millisecond-level responses required in real-world driving. The authors suggest that the next step is developing domain-specific small language models (SLMs). These would be trained on structured driving data to provide the same reasoning benefits but with the speed necessary for real-time deployment. Additionally, optimizing input parameters to reduce the token load will be essential for streamlining the decision-making process.

Summary updated

BibTeX
@inproceedings{azarafza2024hybrid,
  author = {Mehdi Azarafza and Mojtaba Nayyeri and Charles Steinmetz and Steffen Staab and Achim Rettberg},
  title = {{Hybrid Reasoning Based on Large Language Models for Autonomous Car Driving}},
  booktitle = {ICCMA},
  year = {2024},
  url = {https://openreview.net/forum?id=qAEVahDW8o},
}
Figure