Deep Temporal Graph Clustering: A Comprehensive Benchmark and Datasets

Meng Liu, Ke Liang, Siwei Wang, Xingchen Hu, Sihang Zhou, Xinwang Liu

Abstract

Temporal Graph Clustering (TGC) is an emerging task focusing on node clustering in temporal graphs. Unlike static graph clustering, TGC seeks a balance between time and space requirements through an interaction sequence-based batch-processing pattern. However, the development of TGC has been hindered by inapplicable clustering techniques and a lack of suitable datasets. To address these challenges, we propose BenchTGC, a comprehensive benchmark. We design the BenchTGC Framework to illustrate the paradigm of temporal graph clustering and adapt existing techniques for temporal data. Additionally, we introduce Data4TGC, a suite of datasets specifically curated for the TGC task. Extensive experiments verify the advantages of BenchTGC and demonstrate the necessity of time-aware clustering in dynamic, real-world scenarios.

Introduction

Graph clustering is a fundamental unsupervised task used to group similar nodes, such as community detection in social networks or field classification in academic citations. While deep learning has advanced static graph clustering, real-world graphs are inherently dynamic. Most existing methods treat graphs as static snapshots, which introduces two critical flaws: knowledge leakage and the memory wall.

The Problem: Knowledge Leakage and Memory Constraints

In static graph clustering, all interactions are compressed into a single adjacency matrix. This allows "future-to-past" information flow, where a connection made in the future influences the model's understanding of a node's past state—an unrealistic scenario for real-world applications. Furthermore, static methods rely on adjacency matrices that scale quadratically $\mathcal{O}(\mathcal{N}^2)$ with the number of nodes, leading to Out-Of-Memory (OOM) errors on large-scale datasets.

Knowledge leakage in static graphs: future information (2024) incorrectly influences past states (2012) through message passing.

Temporal Graph Clustering (TGC) solves these issues by processing interactions as a chronological sequence. This approach scales with the number of edges $\mathcal{O}(\mathcal{E})$, bypassing the memory wall and maintaining temporal integrity.

The BenchTGC Framework and Datasets

To standardize and advance this field, we developed the BenchTGC Framework and a dedicated dataset suite.

Overview of the BenchTGC Datasets (left) and the three-stage Framework (right) consisting of Pre-processing, Training with specialized modules, and Clustering.

The BenchTGC Framework

The framework follows a three-stage pipeline:

  1. Pre-processing: Addresses the "cold-start" problem in temporal datasets by generating initial node features using positional encoding or pre-trained embeddings.
  2. Training: Adapts classic clustering losses (Reconstruction, Alignment, Contrastive Learning) for batch-based temporal processing. We introduce Cross-Batch Calibration to stabilize cluster centers across chronological steps and Cluster Scaling (dilation and shrinking) to improve cluster separation.
  3. Clustering: Uses the resulting time-aware node embeddings for final grouping via standard algorithms like K-means.

Data4TGC: Curated Datasets

We audited over 100 public datasets and found most unsuitable for clustering due to a lack of structural labels. We introduce Data4TGC, which includes 3 refined public datasets (DBLP, Brain, Patent) and 6 new datasets, including the massive arXivLarge with 1.3 million nodes and 13 million interactions.

Key Results and Insights

Our experiments demonstrate that the BenchTGC framework significantly enhances the performance of existing temporal models:

  • Performance Gains: Applying our framework to baseline models improved clustering metrics in 99% of test cases. For instance, the arXivCS dataset saw a 42.15% improvement in the Adjusted Rand Index (ARI).
  • Memory Efficiency: On the arXivLarge dataset, all static graph methods failed due to OOM errors. In contrast, temporal models using BenchTGC successfully processed the data using less than 10GB of GPU memory.
  • Time-Space Balance: The batch-processing nature of TGC allows researchers to tune batch sizes to find the optimal trade-off between training speed and memory consumption.

Conclusion

BenchTGC provides the first comprehensive foundation for Deep Temporal Graph Clustering. By addressing the limitations of static models—specifically knowledge leakage and memory bottlenecks—we enable more realistic and scalable graph analysis. Future work will explore "open world" scenarios where new nodes appear in real-time and methods for automatically determining cluster counts in dynamic environments.

Summary updated

BibTeX
@article{liu2025deep,
  author = {Meng Liu and Ke Liang and Siwei Wang and Xingchen Hu and Sihang Zhou and Xinwang Liu},
  title = {{Deep Temporal Graph Clustering: A Comprehensive Benchmark and Datasets}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2025},
}
Figure