CBLab: Supporting the Training of Large-scale Traffic Control Policies with Scalable Traffic Simulation

Chumeng Liang, Zherui Huang, Yicheng Liu, Zhanyu Liu, Guanjie Zheng, Hanyuan Shi, Kan Wu, Yuhao Du, Fuliang Li, Zhenhui Jessie Li

Introduction

Optimizing urban traffic through intelligent signal timing and congestion pricing holds the potential to save billions in fuel costs and lost productivity. However, developing Reinforcement Learning (RL) agents for these tasks is challenging; real-world experimentation is prohibited by safety and gridlock risks. While researchers rely on simulators, existing tools like SUMO or Cityflow often hit a "scalability wall," struggling to manage more than a few hundred intersections or lacking realistic, ready-to-use map data.

CBLab addresses these limitations by providing an open-source toolkit designed for city-wide traffic control training. It enables the simulation of networks with over 10,000 intersections and 1,000,000 vehicles—scales previously considered computationally unfeasible.

The CBLab Framework

CBLab is composed of three integrated components that streamline the transition from raw data to optimized traffic policies.

The CBLab architecture integrates raw traffic data, simulation tools, and RL environments to train traffic control policies.
  1. CBData: This component provides a "one-click" pipeline to transform raw OpenStreetMap data into simulation-ready road networks for 100 global cities, including New York and Shanghai. It also features "Learning to Simulate," which uses real-world GPS trajectories (such as 123,481 trajectories from Shenzhen) to automatically calibrate driving and routing parameters.
  2. CBEngine: A high-performance microscopic traffic simulator optimized for extreme scale and speed.
  3. CBScenario: A standardized interface that formulates traffic tasks as Markov Decision Processes (MDPs), allowing researchers to benchmark RL algorithms against traditional methods.

Optimizing for Hardware Efficiency

The primary bottleneck in large-scale traffic simulation is often not the complexity of the physics, but memory management. Traditional simulators typically update vehicle statuses and actions in separate, sequential steps. This approach leads to frequent, slow memory accesses and high cache miss rates.

Comparison of thread models: CBEngine (bottom) uses a unified Compute() call to improve memory locality compared to traditional split-step simulators (top).

CBEngine introduces a redesigned parallelization architecture that merges these updates into a single Compute() call. By maximizing memory locality and aligning data processing with CPU cache behavior, CBEngine significantly reduces computational overhead. This architectural shift allows the simulator to run massive scenarios on standard hardware that would crash or stall other tools.

Key Results and Performance

CBLab has been rigorously tested across various benchmarks, including traffic flow datasets for Hangzhou and Manhattan.

  • Speed and Scalability: In a simulation of Shanghai involving 8,474 intersections, CBEngine outperformed Cityflow by approximately 4x and SUMO by 13x. It maintained a 1:4 real-to-simulation time ratio (simulating one hour of traffic in 15 minutes) even at scales of 10,000 intersections and 100,000 vehicles.
  • Policy Effectiveness: RL-based policies trained within CBLab, such as Deep Q-Networks (DQN), significantly outperformed traditional transportation engineering methods like FixedTime or SOTL, resulting in higher throughput and reduced travel times.
  • Community Validation: The toolkit's robustness was demonstrated during the KDD Cup 2021, where it supported over 1,100 teams competing to optimize traffic signals.

Conclusion and Future Directions

While CBLab significantly narrows the "sim-to-real" gap through automated calibration, the authors acknowledge that simulation can never perfectly capture every nuance of human driving. Future work will focus on expanding the toolkit to include more complex scenarios, such as dynamic lane restrictions, and integrating a broader library of advanced RL algorithms like Intellilight and FRAP to serve as stronger community baselines. By providing both the computational muscle and the necessary data, CBLab paves the way for truly city-scale traffic optimization.

Summary updated

BibTeX
@inproceedings{liang2022cblab,
  author = {Chumeng Liang and Zherui Huang and Yicheng Liu and Zhanyu Liu and Guanjie Zheng and Hanyuan Shi and Kan Wu and Yuhao Du and Fuliang Li and Zhenhui Jessie Li},
  title = {{CBLab: Supporting the Training of Large-scale Traffic Control Policies with Scalable Traffic Simulation}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
}
Figure