derekwtian / sst-gcn

Stochastic Spatio-Temporal Graph Convolutional Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SST-GCN

This is the python repository associated to the paper Spatio-Temporal Graph Convolutional Networks for Stochastic Traffic Speed Imputation [1]

The paper implements a method to estimate the missing speed distribution given a traffic dataset.

Paper Abstract

The rapid increase of traffic data generated by different sensing systems opens many opportunities to improve transportation services. An important opportunity is to enable high-resolution stochastic routing that computes the arrival time probabilities for each suggested route instead of only the expected travel time. Stochastic routing relies on stochastic speed data that captures the speed distributions of vehicles in a road network. However, traffic datasets typically have many missing values, which prevents the construction of stochastic speeds. To address this limitation, we propose the Stochastic Spatio-Temporal Graph Convolutional Network (SSTGCN) architecture that accurately imputes missing speed distributions in a road network. SST-GCN combines Temporal Convolutional Networks and Graph Convolutional Networks into a single framework to capture both spatial and temporal correlations between road segments and time intervals, thereby providing a highly accurate estimation model for speed distributions. Moreover, to cope with datasets with many missing values, we propose a novel self-adaptive context-aware diffusion process that regulates the propagated information around the network, avoiding the spread of false information. We extensively evaluate the effectiveness of SST-GCN on real-world datasets, showing that it achieves from 4.6% to 50% higher accuracy than state-of-the-art baselines using three different evaluation metrics. Furthermore, multiple ablation studies confirm our design choices and scalability to large road networks.

framework

General framework

Requirements

The code is written in Python 3.7 and Pytorch. Specifically:

  • numpy==1.19.5
  • pyemd==0.5.1
  • scikit-learn==0.23.2
  • scipy==1.6.1
  • torch==1.7.1

Dataset

The dataset is given already preprocessed on each fold (1-5). The raw data is described in [2]

The dataset is divided according to the missing information rate, e.g, rm_0.5 means that 50% of the speed distributions is missing during training.

The dataset is further divided according the number of edges of the road network subset, i.e., 173 and 40.

Highway Tollgates Network dataset [3] is not public any more, thus, we don't share it here.

Run

To run check first the parameters on the file config.py. Then,

python run_cross_validation.py

This will run a full 5-fold-cross validation and return the evaluation metrics for each fold as well the average.

Please note that the package does not include implementations of baseline methods.

SSP Simulation

The code in ssp_simulation.py performs a simulation of a Stochastic Routing Algorithm in Chengdu dataset and generates statistics such as:

  • Average probability of arriving later than threshold.
  • Max probability of arriving later than threshold

These values are compared against a deterministic routing algorithm showing that using Stochastic Routing Algorithms is superior to deterministic ones if the traveler's delay tolerance needs to be considered.

Reference

[1]: Carlos Muniz Cuza, Nguyen Ho, Eleni Tzirita Zacharatou, Torben Pedersen, Bin Yang. Spatio-Temporal Graph Convolutional Networks for Stochastic Traffic Speed Imputation. SIGSPATIAL. 2022.

[2]: F. Guo, D. Zhang, Y. Dong, and Z. Guo. Urban link travel speed dataset from a megacity road network. Scientific data, 2019.

[3] KDD ’17: Proceedings of the 23rd ACM SIGKDD. 2017.

About

Stochastic Spatio-Temporal Graph Convolutional Network

License:Apache License 2.0


Languages

Language:Python 100.0%