G-DynaDist
An embedding-based distance for temporal graphs
GDynaDist is a Python package to compute the distance between pairs of temporal graphs. Graphs can be matched (with a known correspondence between their nodes) or unmatched, and they can differ in size and time span. The distance is computed in an embedded space: for each graph, we obtain the limiting distribution of time-respecting random walks and embed it with EDRep. The method is described in our Nature Communications article.

Installation
Install the package from PyPI:
pip install gdynadist
GDynaDist relies on the EDRep algorithm to embed temporal graphs. See the EDRep documentation and the TMLR paper.
Contents
Citation
If you use this package, please cite the Nature Communications article in which the distance was proposed:
@article{dallamico2024embeddingbased,
title = {An embedding-based distance for temporal graphs},
author = {Dall'Amico, Lorenzo and Barrat, Alain and Cattuto, Ciro},
journal = {Nature Communications},
volume = {15},
number = {1},
year = {2024},
month = nov,
issn = {2041-1723},
publisher = {Springer Science and Business Media LLC},
doi = {10.1038/s41467-024-54280-4},
url = {http://dx.doi.org/10.1038/s41467-024-54280-4}
}
and the TMLR paper introducing the EDRep algorithm on which the distance relies:
@article{dallamico2025learning,
title = {Learning distributed representations with efficient SoftMax normalization},
author = {Dall'Amico, Lorenzo and Belliardo, Enrico Maria},
journal = {Transactions on Machine Learning Research},
issn = {2835-8856},
year = {2025},
url = {https://openreview.net/forum?id=9M4NKMZOPu}
}