RDPI: A Refine Diffusion Probability Generation Method for Spatiotemporal Data Imputation

April 27, 2026 · View on GitHub

--

In this file, we provide some instructions for the reproducibility of the experiments presented in the paper.

Directory structure

The directory is structured as follows:

rdpi
├── config
│   └── rdpi
├── datasets
│   ├── air_quality
│   ├── metr_la
│   ├── pems_bay
├── lib
│   ├── __init__.py
│   ├── data
│   ├── datasets
│   ├── fillers
│   ├── nn
│   └── utils
├── requirements.txt
└── scripts
    └── run_diffusion.py

Note that, given the size of the files, the datasets are not readily available in the folder. See the next section for the downloading instructions.

Datasets

All the datasets used in the experiment are open and can be downloaded from this link.

Configuration files

The config directory stores all the configuration files used to run the experiment. They are divided into folders, according to the model.

Library

The support code, including the models and the datasets readers, are packed in a python library named lib. Should you have to change the paths to the datasets location, you have to edit the __init__.py file of the library.

Scripts

The scripts used for the experiment in the paper are in the scripts folder.

  • run_diffusion.py is used to compute the metrics for the pre_train methods and diffusion method. An example of pre_train initial model is

    python ./scripts/run_diffusion.py --config/rdpi/air36.yaml --in-sample True --pre_train
    
  • An example of train RDPI is

    python ./scripts/run_diffusion.py --config/rdpi/air36.yaml --in-sample True --n_samples 50 --denoising
    

Requirements

We run all the experiments in python 3.8, see requirements.txt for the list of pip dependencies.