The main content of this project lies in the simple_run_scripts.
To run the scripts, you can run_experiments.py for the TGB workloads and run_benchtemp_exp_with_sampled_metrics.py for BenchTemp.
If you wish to create your own heuristic, make sure that it:
- Implements all the functions of the abstract base class
Trackerintrackers/base.py. - Gives a score which is an integer (a natural number) with a max value (assuming you wish to utilize the
FenwickTreeranking technique).
To create your own stacked heuristic, you can do:
from simple_run_scripts.trackers.global_tracker import GlobalRecencyTracker
from simple_run_scripts.trackers.popularity_tracker import GlobalPopularityTracker
from simple_run_scripts.trackers.combination_ranker import CombinationTracker
# Create [GR, GP] ranker
class CustomTracker(CombinationTracker):
def __init__(self, all_timestamps, num_nodes, num_edges):
trackers = [
GlobalRecencyTracker(all_timestamps, num_nodes, num_edges),
GlobalPopularityTracker(all_timestamps, num_nodes, num_edges),
]
super().__init__(
all_timestamps,
num_nodes,
num_edges,
trackers_list=trackers
)Please make sure that you have installed:
- TGB (
pip install py-tgb) - Benchtemp (
pip install benchtemp) - torch_geometric installed (see installation instructions here)
Upon using this repository for your work, or finding our proposed analysis useful for your research, please consider citing our paper this paper:
@InProceedings{pmlr-v296-cornell25a,
title = {On the Power of Heuristics in Temporal Graphs},
author = {Cornell, Filip and Smirnov, Oleg and Zarzar Gandler, Gabriela and Cao, Lele},
booktitle = {Proceedings on "I Can't Believe It's Not Better: Challenges in Applied Deep Learning" at ICLR 2025 Workshops},
pages = {37--46},
year = {2025},
volume = {296},
series = {Proceedings of Machine Learning Research},
month = {28 Apr},
publisher = {PMLR},
url = {https://proceedings.mlr.press/v296/cornell25a.html},
}