Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiffLight: A Partial Rewards Conditioned Diffusion Model for Traffic Signal Control with Missing Data

pytorch arXiv License

This repo is the official code release for the NeurIPS 2024 conference paper:

 

DiffLight: A Partial Rewards Conditioned Diffusion Model for Traffic Signal Control with Missing Data
Hanyang Chen1,2, Yang Jiang1,2, Shengnan Guo1,2,*, Xiaowei Mao1,2, Youfang Lin1,2, Huaiyu Wan1,2
The Thirty-Eighth Annual Conference on Neural Information Processing Systems (NeurIPS 2024)
1School of Computer Science and Technology, Beijing Jiaotong University, China  
2Beijing Key Laboratory of Traffic Data Analysis and Mining, Beijing, China   
*Corresponding author.

 

🧾 Introduction

In this paper, we study the problem of TSC with missing data in the offline setting. We introduce DiffLight, a novel conditional diffusion model for TSC under data-missing scenarios in the offline setting. Specifically, we integrate two essential sub-tasks, i.e., traffic data imputation and decision-making, by leveraging a Partial Rewards Conditioned Diffusion (PRCD) model to prevent missing rewards from interfering with the learning process. Meanwhile, to effectively capture the spatial-temporal dependencies among intersections, we design a Spatial-Temporal transFormer (STFormer) architecture. In addition, we propose a Diffusion Communication Mechanism (DCM) to promote better communication and control performance under data-missing scenarios.

Extensive experiments on five datasets with various data-missing scenarios demonstrate that DiffLight is an effective controller to address TSC with missing data.

💻 Repository Structure

  • checkpoints/: Stores the trained models of DiffLight.
  • data/: Contains datasets for different cities and traffic scenarios.
  • memory/: Stores memories of the datasets for different data-missing scenarios.
  • models/: Contains the implementation of DiffLight.
  • records/: Stores the results and logs of different experiments.
  • utils/: Utility scripts for data processing, configuration, and model evaluation.
  • run_difflight.py: Main script to run the DiffLight algorithm.
  • summary.py: Script to summarize and evaluate the results of the experiments.
  • requirements.txt: List of dependencies required to run the project.

🛠️ Usage

Prerequisites

  1. Install Python 3.8 or higher.
  2. Install the required dependencies by running:
    pip install -r requirements.txt
  3. Install CityFlow by following the instructions here.

Data Preparation

  1. Download the memories of datasets from the following links:
  2. Place the downloaded memories in the memory/fourphase/ directory.
  3. Unzip the memories using the following command:
    unzip memory/fourphase/[dataset].zip -d memory/fourphase/

Running DiffLight

  1. Run the DiffLight algorithm using the following command:
    python run_difflight.py -[dataset] -[pattern & rate]
    where [dataset] is the city name (e.g., hangzhou_1, jinan_1, newyork) and [pattern & rate] is the data-missing scenario (e.g., rm_1: random missing, km_wn_1: kriging missing w/ neighbors, km_won_1: kriging missing wo/ neighbors).

Evaluating Results

  1. After running the experiments, you can summarize and evaluate the results using:
    python summary.py

Example Configuration

Here is an example for running the DiffLight algorithm on the Hangzhou dataset with random missing data:

python run_difflight.py -hangzhou_1 -rm_1

🙏 Acknowledgements

DiffLight is based on many open-source projects, including Decision Diffuser, Advanced-XLight, CityFlow, CoLight and FRAP. We would like to thank the authors for their contributions to the communities.

🏷️ License

DiffLight is licensed under the GPLv3 License.

📝 Citation

If you find this work useful, please consider citing the following paper:

@article{chen2024difflight,
  title={DiffLight: A Partial Rewards Conditioned Diffusion Model for Traffic Signal Control with Missing Data},
  author={Chen, Hanyang and Jiang, Yang and Guo, Shengnan and Mao, Xiaowei and Lin, Youfang and Wan, Huaiyu},
  journal={Advances in Neural Information Processing Systems},
  year={2024}
}

About

Official code for "DiffLight: A Partial Rewards Conditioned Diffusion Model for Traffic Signal Control with Missing Data".

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages