A Johnson-Lindenstrauss-based metric for dynamic graph generative model evaluation
Project description
Quality Measures for Dynamic Graph Generative Models
This repository contains the source code for our manuscript Quality Measures for Dynamic Graph Generative Models. Our JL-Metric provides a principled approach to evaluating generative models for continuous-time dynamic graphs (CTDGs). This repository contains both the metric implementation for practical use and the experimental code from our paper.
Quick Start
To evaluate the quality of your generated dynamic graphs, follow the instructions below:
Installation
pip install jl-metric
Basic Usage
Our evaluator accepts graphs in the form of PyTorch Geometric TemporalData objects. These should contain temporal interactions with source nodes (src), destination nodes (dst), timestamps (t), and optionally messages/features (msg).
from jl_metric import JLEvaluator
# Initialize the evaluator
evaluator = JLEvaluator()
# Prepare your graphs as PyG TemporalData objects
# reference_graph = your ground truth or reference graph
# generated_graph = your model's generated graph
# Create input dictionary
input_dict = {
'reference': reference_graph,
'generated': generated_graph
}
# Evaluate and get results
result_dict = evaluator.eval(input_dict)
print(f"JL-Metric score: {result_dict['JL-Metric']}")
Advanced Configuration
The evaluator accepts several optional parameters:
evaluator = JLEvaluator(
node_dim=100, # Dimension for node embeddings
graph_dim=100, # Dimension for graph embeddings
seed=42 # Random seed for reproducibility
)
Paper Experiments
The experiments from our paper can be reproduced using the code in our github repository.
Citing Our Work
If you use JL-Metric in your research, please cite our paper:
@inproceedings{jl-metric,
title={Quality Measures for Dynamic Graph Generative Models},
author={Ryien Hosseini and Filippo Simini and Venkatram Vishwanath and Rebecca Willett and Henry Hoffmann},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=8bjspmAMBk}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jl_metric-0.1.0.tar.gz.
File metadata
- Download URL: jl_metric-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b863cb23dd1e3c23307afad6c73f67c9a9976898c43159c818c1dc26c0c4c9fd
|
|
| MD5 |
202b6c1332d7539577a90475416287a6
|
|
| BLAKE2b-256 |
467541154ece4063b3acc09166e836b76e9202c71eabe1709f9fae86639f72ef
|
File details
Details for the file jl_metric-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jl_metric-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc806e3a52d226b576262335b389d65ff889044368cab642e35839671f1a1b0c
|
|
| MD5 |
d0279f594d0006f1e23cd5bab6a30fd7
|
|
| BLAKE2b-256 |
c9204b1e78fc4ac5b7e9659536492d2dd6f9b1fc3a0798c4994bea20ff447227
|