TrafficGPT: Viewing, Processing and Interacting with Traffic Foundation Models

Siyao Zhang, Daocheng Fu, Zhao Zhang, Bin Yu, Pinlong CaiarXiv 2023 · DOI

Introduction

Urban traffic management is a domain characterized as "data-rich but insight-poor." While modern cities generate massive amounts of data through sensors, cameras, and simulations, extracting actionable insights remains a challenge. Currently, two powerful but mismatched tools exist: Large Language Models (LLMs), which excel at reasoning and natural language interaction but struggle with numerical precision, and Traffic Foundation Models (TFMs), which are highly accurate for specific tasks like signal optimization but require expert configuration and lack complex reasoning capabilities.

TrafficGPT addresses this gap by fusing the reasoning capabilities of LLMs with the specialized precision of TFMs. By acting as an intelligent orchestrator, TrafficGPT allows users to analyze datasets, run simulations, and optimize controls through simple natural language dialogues.

System Architecture and Methods

The core of TrafficGPT is a multi-layered architecture designed to move away from direct data interaction toward an orchestrated "Thought-Action-Observation" loop. The system uses an LLM (specifically gpt-3.5-turbo) as a "brain" to deconstruct complex human requests into executable sub-tasks.

The multi-layered architecture of TrafficGPT, connecting data sources to LLM-driven task completion.

The Orchestrator and TFM Toolset

When a user submits a query, the LLM engages in Task Planning. Rather than performing calculations itself, it selects the appropriate tool from a library of TFMs. Each TFM is defined with structured metadata, including its name, usage instructions, and input/output formats. This allows the LLM to determine, for example, whether to call a "Plot Heatmap" tool or a "Webster Signal Optimization" tool.

Prompt Management and Feedback

To ensure reliability and prevent hallucinations, the system employs a System Prefix that defines the AI’s role and a Human Intervention Protocol. If a request is ambiguous or a tool fails, the AI asks for clarification. Furthermore, the system maintains a Dialogue History, enabling contextual inference. For instance, if a user asks for data from "the same time period" in a subsequent turn, the LLM references previous reasoning to populate the TFM's parameters correctly.

Experimental Setup and Datasets

The framework was evaluated using two primary data sources:

  1. Xuancheng Synthetic Dataset: A city-scale dataset containing over 1.8 million vehicle trip records, including precise departure times and origin-destination (OD) paths.
  2. SUMO (Simulation of Urban MObility): A widely used open-source traffic simulation suite. TrafficGPT interacts with SUMO to retrieve real-time states and write back optimized signal control configurations.

Key Results

The authors demonstrated the framework's utility through two specialized implementations: the Data Processing Bot and the Simulation Control Bot.

Demonstration of the Data Processing Bot (left) and Simulation Control Bot (right) handling natural language queries.
  • Data Processing Bot: This bot successfully handled "fuzzy" visualization requests. It generated OD maps and traffic volume tables from millions of records based on simple prompts, demonstrating an ability to bridge the gap between human intent and complex data processing.
  • Simulation Control Bot: This bot identified intersections with poor performance (e.g., high delay) and autonomously applied optimization algorithms like the Webster method. It demonstrated a closed-loop "Perception-Evaluation-Optimization" workflow by automatically updating simulation configuration files.

Discussion and Insights

The primary insight of TrafficGPT is the role of the LLM as a middleware manager. Its value lies not in its knowledge of traffic physics, but in its ability to translate natural language into machine-executable API calls. This allows for a more intuitive interface for complex traffic systems.

However, limitations remain. The system's performance is tied to the diversity of its tool library, and the multi-step reasoning process introduces latency that may be unsuitable for high-frequency, real-time control. Additionally, while TFMs handle calculations, the LLM must still interpret the outputs, which remains subject to the inherent reasoning limitations of current language models.

Conclusion

TrafficGPT represents a significant step toward making complex traffic management tools accessible to non-experts. By leveraging LLMs as orchestrators for specialized foundation models, the framework provides a scalable and interactive approach to urban traffic analysis and optimization.

Summary updated

BibTeX
@misc{zhang2023trafficgpt,
  author = {Siyao Zhang and Daocheng Fu and Zhao Zhang and Bin Yu and Pinlong Cai},
  title = {{TrafficGPT: Viewing, Processing and Interacting with Traffic Foundation Models}},
  year = {2023},
  eprint = {2309.06719},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.06719},
}
Figure