TL;DR
This paper introduces Traffic-R1, a novel 3-billion parameter LLM-based system for traffic signal control (TSC). Traffic-R1 leverages a two-stage reinforcement learning approach, combining expert guidance with self-exploration, to achieve human-like reasoning for zero-shot generalization to new environments and out-of-distribution incidents, all while being efficient enough for edge deployment.
What Problem Does This Paper Address?
Traffic congestion is a major urban problem, leading to wasted time, fuel, and increased emissions. Traffic signal control (TSC) is a key lever for mitigating this, but traditional methods (like fixed-time or max-pressure) struggle with dynamic traffic demands. While reinforcement learning (RL) has shown promise, existing RL-based TSC systems face challenges with:
- Generalization: Policies trained in one city often perform poorly in another.
- Interpretability: Decisions are often opaque, hindering practitioner trust.
- Robustness: Models falter during unexpected events like accidents or emergency vehicle passages.
Recent attempts to use Large Language Models (LLMs) in TSC have either relied on LLMs to explain existing RL policies (inheriting their limitations) or used them as assistants, adding latency. This paper aims to bridge the gap between research and real-world deployment by creating a foundational TSC model that is generalizable, efficient, and exhibits human-like reasoning.
Methods
Traffic-R1 employs a two-stage reinforcement learning (RL) finetuning approach on a Qwen2.5-3B base model:
- Offline Human-Informed RL: This stage uses an "expert-collaborative" dataset of ~3,000 traffic scenarios. Instead of relying on a teacher RL model, human traffic experts provide validated actions. The LLM is trained to generate reasoning and actions via self-iteration, guided by a reward function that balances accuracy and format. This stage focuses on learning foundational TSC knowledge and reasoning.
- Online Open-World RL: This stage allows the LLM to interact with a simulated traffic environment (CityFlow) to adapt to dynamic scenarios and explore multi-step, multi-intersection coordination. A "Stepwise Trajectory Policy Optimization" (STPO) method is introduced to decompose trajectory rewards into denser, step-level signals, making it more suitable for interactive environments than traditional trajectory-level rewards.
- Asynchronous Communication Network: To facilitate multi-intersection coordination, an asynchronous communication network is proposed. Intersections are partitioned into two groups, allowing for message passing between them in a staggered manner, mimicking human traffic agent collaboration.
Datasets
- Training/Evaluation: Two public traffic flow datasets (Jinan1, Jinan2, Jinan3, Hangzhou1, Hangzhou2) were used for conventional TSC evaluation.
- OOD Incidents: ~200 representative textual examples of traffic emergency incidents were collected from traffic management departments.
- Expert-Collaborative Dataset: A ~3,000-sample dataset was created using a human-in-the-loop pipeline where experts validated and corrected LLM-suggested actions.
Key Insights and Ideas
- Human-like Reasoning is Key for Generalization: The paper strongly suggests that LLMs trained with RL-based self-exploration and expert guidance develop internal reasoning capabilities that lead to superior zero-shot generalization, outperforming imitation-based instruction finetuning.
- Compact LLMs Can Be Powerful TSC Agents: A 3B-parameter model can achieve state-of-the-art performance, challenging the notion that only massive models are effective for complex tasks like TSC. This has significant implications for edge deployment.
- Asynchronous Communication is Crucial for Multi-Intersection Coordination: The proposed asynchronous network design is shown to be effective for enabling LLM agents to coordinate across multiple intersections, a critical aspect of real-world traffic management.
- RL Finetuning Offers Advantages Over Instruction Finetuning: The RL approach fosters internal reasoning and avoids "catastrophic forgetting" often seen in LLMs finetuned solely on static datasets.
Key Results
- Zero-Shot Performance: Traffic-R1 significantly outperforms traditional methods, RL-based methods, and even larger LLMs in zero-shot settings on conventional TSC tasks. It achieves better performance than SOTA LLMs like DeepSeek-R1-671B while using only 1% of their parameters.
- OOD Incident Handling: Traffic-R1 demonstrates stable performance on out-of-distribution incidents, outperforming larger general LLMs and LLMLight by over 30% across metrics.
- Real-World Deployment: In a live deployment controlling 10 intersections serving over 55,000 drivers daily, Traffic-R1 reduced average queue lengths by 9.3% and maximum queue lengths by 4.4%. Crucially, it achieved a ~75% reduction in human labor for daily operations.
- Efficiency: The 3B-parameter model is suitable for real-time inference on mobile-class chips.
Limitations and Future Work
- Textual Modality Reliance: The current model relies on structured textual data for traffic observations and incident information. This can lead to inconvenience and potential information loss in real-world deployments.
- Deployment Scale and Constraints: Detailed analysis of LLM hallucination-related instability and driver feedback was limited by deployment scale and traffic management agency constraints.
- Future Work: The authors plan to address the textual modality limitation by developing reinforced vision-language models and multimodal input pipelines. They also aim to explore further scalability and efficiency improvements.
Summary updated