๐ฆ LLM-Assisted Light (LA-Light)
July 10, 2025 ยท View on GitHub
Official implementation of LLM-Assisted Light: Augmenting Traffic Signal Control with Large Language Model in Complex Urban Scenarios.
๐ข Latest News
- [July 2025] Introducing VLMLight: Our next-generation framework featuring image-based traffic signal control using Vision-Language Models (VLMs) for enhanced scene understanding and real-time decision-making.
- [August 2023] We have migrated the simulation platform used in this project from Aiolos to TransSimHub (TSHub). We would like to express our sincere gratitude to our colleagues at SenseTime, @KanYuheng (้ๅฎ่กก), @MaZian (้ฉฌๅญๅฎ), and @XuChengcheng (ๅพๆฟๆ) (in alphabetical order) for their valuable contributions. The development of TransSimHub (TSHub) is a continuation of the work done on Aiolos.
๐งฉ Core Framework
Five-stage hybrid decision-making for human-AI collaborative traffic control:
- Task Planning: LLM defines traffic management role
- Tool Selection: Dynamically invokes perception & decision tools
- Environment Interaction: Real-time traffic data collection
- Data Analysis: Decision unit generates control strategies
- Execution Feedback: Implements decisions with explainable justifications
๐งช Quick Validation
๐ ๏ธ Installation
Install TransSimHub:
git clone https://github.com/Traffic-Alpha/TransSimHub.git
cd TransSimHub
pip install -e ".[all]"
๐ค RL Model Training & Evaluation
For training and evaluating the RL model, refer to TSCRL. You can use the following command to start training:
python train_rl_agent.py
The RL Result directory contains the trained models and training results. Use the following command to evaluate the performance of the model:
python eval_rl_agent.py
๐ง Pure LLM Inference
To directly use LLM for inference without invoking any tools, run the following script:
python llm.py --env_name '3way' --phase_num 3 --detector_break 'E0--s'
๐ LA-Light Joint Decision-Making
To test LA-Light, run the following script. In this case, we will randomly generate congestion on E1 and the sensor on the E2--s direction will fail.
python llm_rl.py --env_name '4way' --phase_num 4 --edge_block 'E1' --detector_break 'E2--s'
The effect of running the above test is shown in the following video. Each decision made by LA-Light involves multiple tool invocations and subsequent decisions based on the tool's return results, culminating in a final decision and explanation.
Due to the video length limit, we only captured part of the first decision-making process, including:
- Action 1: Obtaining the intersection layout, the number of lanes, and lane functions (turn left, go straight, or turn right) for each edge.
- Action 3: Obtaining the occupancy of each edge. The -E3 straight line has a higher occupancy rate, corresponding to the simulation. At this point, LA-Light can use tools to obtain real-time road network information.
- Final Decision and Explanation: Based on a series of results, LA-Light provides the final decision and explanation.
๐ฅ Scenario Demos
Examples of LA-Lights Utilizing Tools to Control Traffic Signals (Normal Scenario)
Examples of LA-Lights Utilizing Tools to Control Traffic Signals (Emergency Vehicle (EMV) Scenario)
๐ Citation
If you find this work useful, please cite our papers:
@article{wang2024llm,
title={LLM-Assisted Light: Leveraging Large Language Model Capabilities for Human-Mimetic Traffic Signal Control in Complex Urban Environments},
author={Wang, Maonan and Pang, Aoyu and Kan, Yuheng and Pun, Man-On and Chen, Chung Shue and Huang, Bo},
journal={arXiv preprint arXiv:2403.08337},
year={2024}
}
๐ค Open-Source Foundations
This project stands on the shoulders of these open-source giants:
๐ฎ Contact
If you have any questions, please report issues on GitHub.