We provide the code (in PyTorch) for our paper "Dual-Prompt Tuning for Spatial-Temporal Graphs".
From JODIE dataset website, download the required data files (e.g., wikipedia.csv, reddit.csv). Place the downloaded files into the processed/ directory.
Run the following scripts to preprocess the raw data.
# The --data argument can be changed to 'reddit' or other datasets
python utils/preprocess_data.py --data wikipedia --bipartite
python utils/downstream_process.pyThe pre-training part of the code references the paper "Node-Time Conditional Prompt Learning in Dynamic Graphs".
Execute the following command to pre-train the model.
python pre-training.py --use_memoryUse the pre-trained model to perform the downstream task.
python downstream_task.py --use_memory