STMARL: A Spatio-Temporal Multi-Agent Reinforcement Learning Approach for Traffic Light Control

Yanan Wang, Tong Xu, Xin Niu, Chang Tan, Enhong Chen, Hui Xiong

Abstract

The development of intelligent traffic light control systems is essential for smart transportation management. While some efforts have been made to optimize the use of individual traffic lights in an isolated way, related studies have largely ignored the fact that the use of multi-intersection traffic lights is spatially influenced and there is a temporal dependency of historical traffic status for current traffic light control. To that end, in this paper, we propose a novel Spatio-Temporal Multi-Agent Reinforcement Learning (STMARL) framework for effectively capturing the spatio-temporal dependency of multiple related traffic lights and control these traffic lights in a coordinating way. Specifically, we first construct the traffic light adjacency graph based on the spatial structure among traffic lights. Then, historical traffic records will be integrated with current traffic status via Recurrent Neural Network structure. Moreover, based on the temporally-dependent traffic information, we design a Graph Neural Network based model to represent relationships among multiple traffic lights, and the decision for each traffic light will be made in a distributed way by the deep Q-learning method. Finally, the experimental results on both synthetic and real-world data have demonstrated the effectiveness of our STMARL framework, which also provides an insightful understanding of the influence mechanism among multi-intersection traffic lights.

Introduction

Traffic congestion is a significant global issue, resulting in substantial economic and environmental costs. Traditional traffic management systems often rely on fixed-time controllers or isolated intelligent agents that fail to account for the complex interdependencies within urban road networks. Specifically, existing solutions frequently overlook two critical factors:

  1. The Isolation Problem (Spatial Dependency): Many systems treat each intersection as an independent unit. In reality, a green light at one intersection creates a surge of traffic that neighboring intersections must handle shortly after.
  2. The Memory Problem (Temporal Dependency): Traffic is dynamic. Current conditions are heavily influenced by historical patterns and recent events (e.g., a sudden bottleneck). Reacting only to immediate snapshots leads to suboptimal control.

To address these challenges, we introduce STMARL (Spatio-Temporal Multi-Agent Reinforcement Learning), a framework designed to coordinate multiple traffic lights by modeling their relationships across both space and time.

Methodology

The STMARL framework utilizes a multi-agent reinforcement learning approach where each traffic light acts as an agent. The architecture is defined by three core components:

Directional Graph Construction

To capture the spatial layout of the city, the road network is modeled as a directed graph. In this representation, intersections are nodes, and the roads connecting them are edges that preserve traffic flow directionality (e.g., North to South).

Spatial structure and the resulting constructed graph used for modeling traffic light interactions.

The Spatio-Temporal Graph Block

The heart of STMARL is the Graph Block, which processes information through two specialized layers:

  • Temporal Learning (LSTM): Each agent employs a Long Short-Term Memory (LSTM) network to maintain a memory of historical traffic data, such as queue lengths and vehicle speeds. This allows the system to understand trends and handle noisy sensor data.
  • Spatial Learning (GNN with Attention): Following the temporal update, a Graph Neural Network (GNN) facilitates communication between neighboring intersections. An attention mechanism is used to weigh the importance of different neighbors, allowing an intersection to prioritize high-volume incoming traffic dynamically.
The STMARL architecture showing the flow from observation to Q-value generation via Graph Blocks and LSTMs.

Distributed Deep Q-Learning

The agents are trained using a distributed Deep Q-Learning method. While they share a neural network structure to improve training efficiency and scalability, each intersection makes independent, real-time decisions based on its local spatio-temporal context.

Experimental Evaluation

STMARL was rigorously tested using the CityFlow simulator across several scenarios, including synthetic 6x6 grids and real-world datasets from Hangzhou and Hefei, China.

Key Results

  • Efficiency Gains: In the Hefei dataset, STMARL reduced average travel time to 63.86 seconds, representing a 20.6% improvement over the strongest baseline (Neighbor RL).
  • Emergent Coordination: The model autonomously learned to implement "green waves," synchronizing lights to allow vehicle platoons to pass through multiple intersections without stopping.
  • Robustness: STMARL exhibited the lowest standard deviation in travel times across all tests, indicating a more consistent and predictable traffic flow for drivers.

Discussion and Insights

Ablation studies revealed that while both temporal and spatial modeling are beneficial, spatial coordination (neighboring intersection data) provided the most significant performance boost. Furthermore, the attention mechanism proved dynamic, shifting focus to different neighbors based on fluctuating traffic volumes throughout the day. During peak hours, intersections naturally prioritized high-volume upstream neighbors.

Conclusion

STMARL provides a scalable and effective solution for urban traffic light control. By integrating GNNs and LSTMs, the framework successfully captures the complex spatio-temporal dependencies of modern road networks. Future work will explore more flexible phase switching and the integration of additional environmental features like weather and pedestrian traffic to further refine the spatio-temporal context.

Summary updated

Abstract

The development of intelligent traffic light control systems is essential for smart transportation management. While some efforts have been made to optimize the use of individual traffic lights in an isolated way, related studies have largely ignored the fact that the use of multi-intersection traffic lights is spatially influenced and there is a temporal dependency of historical traffic status for current traffic light control. To that end, in this paper, we propose a novel SpatioTemporal Multi-Agent Reinforcement Learning (STMARL) framework for effectively capturing the spatio-temporal dependency of multiple related traffic lights and control these traffic lights in a coordinating way. Specifically, we first construct the traffic light adjacency graph based on the spatial structure among traffic lights. Then, historical traffic records will be integrated with current traffic status via Recurrent Neural Network structure. Moreover, based on the temporally-dependent traffic information, we design a Graph Neural Network based model to represent relationships among multiple traffic lights, and the decision for each traffic light will be made in a distributed way by the deep Q-learning method. Finally, the experimental results on both synthetic and real-world data have demonstrated the effectiveness of our STMARL framework, which also provides an insightful understanding of the influence mechanism among multi-intersection traffic lights.
BibTeX
@misc{wang2019stmarl,
  author = {Yanan Wang and Tong Xu and Xin Niu and Chang Tan and Enhong Chen and Hui Xiong},
  title = {{STMARL: A Spatio-Temporal Multi-Agent Reinforcement Learning Approach for Traffic Light Control}},
  year = {2019},
  eprint = {1908.10577},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.10577},
}
Figure