Manuscript Offprint

arXiv:2610.09563

EvoSignal: LLM-Guided Evolutionary Design of Modular Traffic Signal Control Programs

Leizhen Wang, Peibo Duan, Zhenlin Qin, Yancheng Ling, Jian Xu, Yue Wang, Hao Wang, Zhenliang Ma

Abstract

Effective traffic signal control (TSC) requires policies that respond to changing traffic demand and network conditions while meeting different control objectives. However, adapting existing strategies often involves repeated manual design and adjustment, making it difficult to systematically explore better control rules for a target network. Large language models (LLMs) can automate this process, but directly using them to select signal phases leaves decision rules embedded in black-box models and incurs recurring inference costs and latency. This paper formulates TSC as a modular program design problem and proposes EvoSignal, an LLM-guided evolutionary framework using traffic knowledge and performance feedback. The modular representation separates traffic feature extraction, local phase prioritization, and optional network-based priority adjustment. Starting from several established strategies, EvoSignal improves programs through feedback on congestion and signal operation, retaining strategies with different performance trade-offs. The resulting programs operate without online LLM inference. Simulation experiments across five scenarios on two real-world road networks show that the selected default EvoSignal program reduces waiting time by 16.8–49.2% relative to the lowest waiting time achieved by the 20 conventional, reinforcement learning-based, and LLM-based baselines in each scenario. A program prioritizing travel time and queue length outperforms all 20 baselines on all three metrics in the search scenario and remains among the top three on each metric when transferred unchanged to the other four scenarios. These findings support automated design of inspectable control programs that transfer across the evaluated road networks and traffic demands. Code is available at https://github.com/georgewanglz2019/EvoSignal.

1 Introduction

Traffic signal control (TSC) is an important component of urban traffic management. By selecting signal phases that serve competing traffic movements, a controller can reduce vehicle queues and waiting times at intersections. Effective control must account for changing traffic demand and interactions between intersections: releasing vehicles from one intersection may increase congestion on downstream roads and affect traffic conditions elsewhere in the network. These characteristics make the design of effective control policies challenging, particularly when road networks, traffic demand, and control objectives differ across scenarios [1, 2].

Existing TSC methods include conventional traffic engineering approaches and reinforcement learning (RL)-based approaches. Conventional methods, such as fixed-time control, adaptive signal control, and max-pressure control, provide well-established principles for determining signal settings [3–5]. Their control rules can respond to traffic conditions, but selecting and extending these rules for a target network still requires engineering effort. RL-based methods learn policies through interactions with a traffic environment and have achieved strong performance in signal coordination and network-wide control [6–8]. However, training requires interaction data and computation, and neural policies can be difficult to inspect and mod-

PREPRINT

ify when control requirements change [2]. Programmatic policies offer explicit decision rules that can be examined and adjusted [9], motivating automated design methods that retain this form of control.

Recent studies use large language models (LLMs) to bring traffic knowledge and reasoning into signal control. LLMLight and Traffic-R1 analyze traffic conditions and select signal phases through LLM inference [10, 11]. This places language generation within the repeated control loop, adding inference latency and computational demand across intersections. Traffic-specialized models, including LightGPT and Traffic-R1, also require data collection and model training, although smaller models and efficient inference can mitigate deployment costs [10, 11]. Their language-based rationales help explain individual actions, but the complete decision rule remains encoded in model parameters and cannot be directly inspected and edited as a control program. These considerations motivate using LLM capabilities to improve controller design while keeping online phase selection computationally simple and explicit.

An alternative is to use an LLM to generate and revise a control program offline. The resulting program selects phases directly from traffic observations, removing repeated LLM inference from operation and exposing the implemented decision rules for inspection. Program revision can also adapt the controller without updating the LLM's parameters. LLM-guided program evolution provides a mechanism for this process: candidate code is generated, evaluated, and improved using feedback. FunSearch, AlphaEvolve, OpenEvolve, and ShinkaEvolve establish this approach for program optimization [12–15]. Their general search mechanisms leave the traffic control representation and domain-specific evaluation guidance to the application designer. In TSC, the earlier EvolveSignal study explores fixed-time strategy design at a single intersection [16], while SignalClaw evolves interpretable skills using structured traffic feedback and event-based composition [17]. Building on these advances, an important question is how to organize the evolution of state-responsive control programs across a road network, using existing strategies and observed traffic behavior to meet different control objectives.

This design problem involves four connected challenges. First, control decisions depend on local queues and approaching vehicles as well as downstream and network conditions. Evolving an undifferentiated program makes it harder to revise these functions separately or match them to available observations. Second, a single initial program represents only one control strategy, leaving other established approaches to pressure, demand, and service fairness unused at initialization. Third, aggregate performance scores rank programs but do not identify where queues accumulate or which phase-selection patterns contribute to long waiting times. Effective revision requires diagnostic feedback that connects observed traffic behavior to control logic. Finally, travel time, queue length, and waiting time can favor different strategies. Selecting only by a combined score can overlook useful alternatives and their reusable control ideas. These challenges call for a traffic-specific organization of program structure, initialization, diagnostic feedback, and strategy reuse within the evolutionary process.

We formulate TSC as a modular program design problem: an executable policy maps traffic observations to signal phase decisions, and its control logic is optimized for specified performance objectives. To address this problem, we propose EvoSignal, an LLM-guided evolutionary framework. Its three-module representation (3M) separates traffic feature extraction, local phase prioritization, and optional network-based priority adjustment, allowing control logic to reflect the available traffic information. Multi-strategy initialization (Multi-init) supplies programs based on established control strategies and complementary design principles. The simulation performance analyzer (SPA) diagnoses congestion and phase-selection behavior and suggests program revisions, while a Pareto strategy archive (PSA) supplies experience from recently evaluated strategies with different performance trade-offs. The LLM uses these inputs to revise candidate programs, whose measured control performance guides further evolution. Feedback consists of traffic observations and performance measurements; in this study, these are obtained through simulation. The selected program subsequently determines signal phases directly from traffic observations.

PREPRINT

The main contributions are summarized as follows:

  1. We formulate TSC as a modular program design problem, where an executable policy maps traffic observations to signal phase decisions under specified control objectives. The representation connects traffic feature extraction, local phase prioritization, and optional network-based priority adjustment through explicit interfaces, enabling targeted revision and inspection of the control logic.

  2. We develop EvoSignal, an evolutionary framework that combines multiple initial control strategies, diagnostic feedback on traffic control performance, and reuse of strategies with different objective trade-offs to guide LLM-based program revision.

  3. We evaluate EvoSignal across five scenarios on two real-world road networks against conventional, RL-based, and LLM-based controllers, and LLM-guided program evolution frameworks. The results demonstrate competitive control performance and more consistent search outcomes. A program evolved in one scenario transfers unchanged to the other four scenarios, ranking among the top three on travel time, queue length, and waiting time against 20 reference controllers.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 formulates the modular program design problem and presents the EvoSignal search framework. Section 4 describes the experimental setup and evaluates control performance, search behavior, and component contributions. Section 5 analyzes the evolved programs and discusses their implications and limitations. Section 6 concludes the paper.

References (69)