Evolutionary Discovery of Heuristic Policies for Traffic Signal Control

Ruibing Wang, Shuhan Guo, Zeen Li, Zhen Wang, Quanming YaoarXiv 2025 · DOI

Traffic Signal Control (TSC) is a fundamental urban optimization problem that has long faced a difficult trade-off. Classic heuristics like Fixed-Time or MaxPressure are fast and reliable but often too rigid for dynamic traffic. Conversely, Deep Reinforcement Learning (DRL) offers high performance but results in "black box" policies that are difficult to interpret and often fail when deployed in new environments.

This paper introduces Temporal Policy Evolution for Traffic (TPET), a framework that utilizes Large Language Models (LLMs) as an evolutionary engine to synthesize high-performance, interpretable Python-based traffic heuristics. Unlike recent attempts to use LLMs as real-time decision-makers—which suffer from high latency and API costs—TPET positions the LLM as an offline architect that "breeds" specialized code capable of running in milliseconds.

The TPET Framework: LLM as Architect

The core innovation of TPET is the use of the LLM as a mutation engine within an evolutionary loop. Instead of executing actions directly, the LLM writes and refines the logic that governs traffic signals. This approach solves the latency problem entirely, as the final output is a standalone Python script that requires no LLM calls during actual operation.

Overview of the TPET framework showing the evolutionary loop between the LLM engine, the traffic environment, and the feedback modules.

Bridging the Semantic Gap

To enable LLMs to reason effectively about the messy, numerical world of traffic sensors, TPET introduces two novel modules that bridge the gap between raw data and linguistic reasoning:

  1. Structured State Abstraction (SSA): LLMs struggle with high-dimensional numerical arrays. SSA acts as a translator, converting numerical data (e.g., "Queue length: 25") into temporal-logical predicates (e.g., "Congestion: Critical"). This provides the LLM with a structured "vocabulary" it can use to write logic.
  2. Credit Assignment Feedback (CAF): In typical evolution, a simple scalar "fitness score" is the only feedback. CAF goes deeper by performing a post-hoc analysis of simulation logs to identify specific "defects," such as Wasted Green Time (giving a green light to an empty lane) or Phase Starvation (ignoring a lane for too long). These are provided as a text-based critique, allowing the LLM to "debug" its own policy.
Detailed view of the SSA and CAF modules, illustrating the transformation of raw traffic metrics into logical predicates and actionable critiques for policy refinement.

Experimental Results

The authors evaluated TPET using the CityFlow simulator on real-world traffic flow datasets from Jinan and Hangzhou, China. TPET demonstrated superior performance across multiple metrics:

  • Performance: In the Hangzhou dataset, TPET achieved an Average Wait Time (AWT) of 31.41s, significantly lower than GPT-4 acting as an online agent (58.09s) and the classic MaxPressure heuristic (49.60s).
  • Stability: Unlike online LLM actors, which showed high variance, TPET’s evolved heuristics were highly stable and consistent across multiple runs.
  • Efficiency: The final Python functions operate with millisecond latency, making them practical for real-world deployment.

Conclusion and Future Work

TPET demonstrates that the most effective way to use LLMs in control systems is to use them to synthesize the "inner loop" logic rather than acting as the controller itself. While the current framework relies on a predefined library of defect patterns for feedback, future work will explore how LLMs might evolve collaborative strategies for city-wide coordination and "green waves" across multiple intersections.

Summary updated

BibTeX
@misc{wang2025evolutionary,
  author = {Ruibing Wang and Shuhan Guo and Zeen Li and Zhen Wang and Quanming Yao},
  title = {{Evolutionary Discovery of Heuristic Policies for Traffic Signal Control}},
  year = {2025},
  eprint = {2511.23122},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.23122},
}
Figure