Quality Measures for Dynamic Graph Generative Models

Ryien Hosseini, Filippo Simini, Venkatram Vishwanath, Rebecca Willett, Henry Hoffmann

Abstract

Evaluating generative models for dynamic graphs is notoriously difficult because traditional metrics rely on computationally heavy, static snapshots that ignore temporal dependencies. We introduce a novel, unified metric based on the Johnson-Lindenstrauss lemma that applies random projections directly to continuous-time graph data. The resulting JL-Metric is a fast, scalar measure that captures both topological and feature-based temporal dynamics far better than existing baselines. Our evaluation across real-world and synthetic datasets demonstrates that the JL-Metric is highly sensitive to both fidelity and diversity issues, outperforming traditional snapshot-based statistics in both accuracy and computational efficiency.

Introduction

Deep generative models are increasingly utilized to generate dynamic graphs—networks where both the structure (topology) and node/edge attributes (features) evolve over time, such as social networks or financial transaction logs. However, unlike images or text, quantitative evaluation of these models is non-trivial.

Currently, the standard approach to evaluating Dynamic Graph Generative Models (DGGMs) involves discretizing continuous-time dynamic graphs (CTDGs) into a series of static snapshots. Classical graph statistics, such as average node degree or largest connected component, are calculated for each snapshot and then averaged. This approach suffers from several critical flaws:

  1. Temporal Neglect: It treats snapshots as independent and identically distributed (i.i.d.), missing the temporal dependencies defining dynamic graphs.
  2. Metric Fragmentation: Metrics usually measure either topology or features, but rarely their interaction.
  3. Computational Overhead: Instantiating thousands of graph snapshots is memory and compute-intensive.
  4. Ambiguity: It produces multiple conflicting scores without a clear method for aggregation.

Methodology: The JL-Metric

To address these limitations, we propose the JL-Metric, inspired by the Johnson-Lindenstrauss (JL) lemma, which guarantees that random linear projections can reduce dimensionality while preserving distances between data points. Instead of building static snapshots, the JL-Metric processes the graph as a continuous stream of events through a four-step pipeline:

  1. Node-Level Concatenation: For every node, all events it participates in (timestamps and features) are concatenated into a single, time-ordered vector.
  2. First Random Projection ($W_1$): A random projection matrix squashes these variable-length node histories into fixed-dimensional node embeddings.
  3. Second Random Projection ($W_2$): A second projection aggregates node embeddings into a single, fixed-size matrix representing the entire dynamic graph.
  4. Distance Calculation: The matrices of the real and generated graphs are compared using cosine distance.

To ensure computational feasibility, we utilize Structured Random Matrices (SRMs) based on Hadamard transforms. This reduces the time complexity of matrix multiplications from $O(N^2)$ to $O(N \log N)$, drastically lowering memory overhead.

Experimental Evaluation

We evaluated the metric on five datasets, including real-world bipartite temporal interaction graphs (Reddit, Wikipedia, MOOC, and LastFM) and a synthetic "Grid" dataset designed with explicit dependencies between temporal and topological aspects. The metric's performance was measured using sensitivity analysis (Spearman rank correlation) to assess how well it tracks controlled degradations in data quality.

Results and Discussion

Comprehensive sensitivity analysis across five perturbation types. The JL-Metric (far right, pink) consistently maintains high correlation with ground truth perturbations compared to topological and feature-based baselines.

Fidelity and Diversity

The JL-Metric demonstrated superior performance in detecting various types of model failures:

  • Event Permutation: When features were randomly swapped between valid edges—preserving topology but ruining the feature-topology link—traditional metrics were completely blind, scoring near 0.0 correlation. In contrast, the JL-Metric achieved a median correlation of 0.988.
  • Mode Dropping: When simulating a generator that ignores a subset of the data distribution, the JL-Metric scored 0.915, significantly outperforming baselines like Node Degree (0.794) or Maximum Mean Discrepancy (0.286).
Comparison of metrics under Event Permutation. Traditional metrics fail to detect feature-topology mismatches (correlation ~0), while the JL-Metric captures them effectively.

Computational Efficiency

The JL-Metric is remarkably efficient, processing approximately 100 events in 1.05 seconds. For comparison, snapshot-based metrics like the Largest Connected Component (LCC) required up to 11.99 seconds for the same data due to the overhead of instantiating static graphs.

Conclusion

The JL-Metric provides a robust, application-agnostic tool for evaluating DGGMs. By embedding features and topology together through the lens of the JL lemma, it respects the "arrow of time" and detects mismatches that classical metrics miss. While it is not intended to replace domain-specific metrics (e.g., molecular ring counting), it offers a powerful, unified baseline for the generative modeling community. Future work will focus on automated hyperparameter selection for projection dimensions and resolving timestamp collisions in high-concurrency datasets.

Summary updated

BibTeX
@inproceedings{hosseini2025quality,
  author = {Ryien Hosseini and Filippo Simini and Venkatram Vishwanath and Rebecca Willett and Henry Hoffmann},
  title = {{Quality Measures for Dynamic Graph Generative Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=8bjspmAMBk},
}
Figure