Data and code from: PathVGAE: A path-based variational graph autoencoder framework for ranking centrality in road networks
Data files
Aug 15, 2025 version files 47.72 MB
-
layers.py
5.28 KB
-
main.py
3.42 KB
-
models.py
2.02 KB
-
README.md
2.65 KB
-
sim_data_betweenness.pth
3.53 MB
-
sim_data_closeness.pth
3.53 MB
-
simulation.py
3.87 KB
-
testing_data_betweenness.pth
10.17 MB
-
testing_data_closeness.pth
9.92 MB
-
training_data_betweenness.pth
10.28 MB
-
training_data_closeness.pth
10.28 MB
-
utils.py
6.10 KB
Abstract
Natural hazards including wildfires, hurricanes, and floods change network topology, which in turn, affect the vulnerability of road network components (e.g., intersections and road segments). Therefore, a dynamic assessment of the road network vulnerability is essential during disruptions to obtain up-to-date information on at-risk components. However, dynamically assessing vulnerability requires repeatedly recalculating centrality measures, which can be computationally expensive and time-consuming. To address this, we propose a machine learning architecture called PathVGAE that leverages the embedding structure of a Variational Graph Auto-Encoder (VGAE) with a path sampling encoder to learn latent representations that capture key topological features for centrality predictions. Our model can accurately identify high importance roads in seconds by leveraging only the static structure of the network. The experimental results demonstrate that PathVGAE outperforms baseline models in accurately ranking high importance roads, making it a valuable tool for vulnerability analysis of complex transit networks during disruptions.
Dataset DOI: 10.5061/dryad.8w9ghx40m
Description of the data and file structure
The data was generated using the OSMnx package in Python. The files are organized into training, testing, and simulation data which can be accessed using the "torch.load" function from the PyTorch package. Further instructions can be found in "main.py" file.
Files and variables
File: layers.py
Description: The graph neural network layers used to construct the PathVGAE model, including the layer-wise aggregation mechanism.
File: main.py
Description: Train PathVGAE on the Los Angeles County road network and test it on various network across the U.S.
File: simulation.py
Description: Run a simulated event whereby the network topology changes to test PathVGAE's performance in a dynamic situation.
File: models.py
Description: The PathVGAE model.
File: utils.py
Description: Utility functions used for pre-processing, calculating loss, and calculating Kendall-Tau rank scores.
File: training_data_betweenness.pth
Description: Training dataset (betweenness centrality).
File: sim_data_betweenness.pth
Description: Simulation dataset (betweenness centrality).
File: sim_data_closeness.pth
Description: Simulation dataset (closeness centrality).
File: training_data_closeness.pth
Description: Training dataset (closeness centrality).
File: testing_data_betweenness.pth
Description: Testing dataset (betweenness centrality).
File: testing_data_closeness.pth
Description: Testing dataset (closeness centrality).
Code/software
The project was developed using Python 3.10, and it relies on several libraries:
- PyTorch(v2.0): for building and training graph neural network models, including modules from torch, torch.nn, torch.nn.functional, and torch.utils.data.
- OSMNx (v1.6.0): for downloading and processing road network data from OpenStreetMap.
- NetworkX (v3.2.1): for graph based computations and computing centrality measures.
- Pandas (v2.2.1): for handling tabular data and graph statistics.
- NumPy(v1.26): for general-purpose numerical computation.
- SciPy (v1.13): for the kendalltau function to evaluate rank scores.
- Matplotlib (v3.8): for visualizing road networks and model predictions.
Access information
Other publicly accessible locations of the data: