Scalable dynamic community detection on temporal graphs using graph neural networks
Proposes a scalable dynamic community detection framework using graph neural networks with diffusion-guided contrastive learning on temporal graphs.
Key Findings
Methodology
This paper introduces a diffusion-guided contrastive learning framework that leverages local temporal diffusion affinity matrices to construct positive and negative node-time pairs. The approach employs a multi-layer temporal graph encoder to learn low-dimensional representations of node-time instances, capturing structural and temporal dependencies. Contrastive loss aligns related instances while separating unrelated ones, embedding local temporal structures into the representation space. Clustering algorithms applied to these embeddings detect evolving communities. Experiments on synthetic datasets show significant improvements over static baselines, with metrics like AMI and ARI exceeding 15% and 12%, respectively. The method scales linearly with network size, demonstrated on the large-scale OpenAlex dataset, revealing persistent and evolving scientific collaboration communities.
Key Results
- On synthetic networks, the proposed method outperformed static and dynamic baselines, achieving over 15% higher AMI and 12% higher ARI scores, with robust scalability across increasing network sizes.
- Applied to OpenAlex, it identified meaningful, evolving research communities, aligning with known scientific collaboration patterns, and demonstrated efficient runtime performance.
- Ablation studies confirmed the importance of diffusion similarity and contrastive objectives, with the full model consistently outperforming variants without these components.
Significance
This work addresses the challenge of scalable, fine-grained dynamic community detection in large temporal networks. By integrating representation learning with local structural supervision, it overcomes limitations of snapshot and link-stream methods, enabling real-time analysis of evolving communities. Its applicability spans social, scientific, and financial networks, providing insights into community evolution, stability, and fragmentation. The framework advances both theoretical understanding and practical tools for dynamic network analysis, facilitating better decision-making in complex systems.
Technical Contribution
The core innovation lies in combining local temporal diffusion affinity with contrastive learning to produce community-aware node-time embeddings. The multi-layer temporal encoder captures structural dependencies at different scales, while the contrastive loss enforces structural consistency over time. The mini-batch training strategy ensures scalability to large datasets. The method bridges the gap between static graph clustering and continuous-time dynamic community detection, offering a unified, efficient solution with theoretical guarantees on embedding quality.
Novelty
This is the first work to integrate diffusion-guided contrastive learning with node-time instance representations for large-scale dynamic community detection. Unlike prior methods limited to static or snapshot-based approaches, it directly models continuous-time interactions, capturing fine-grained temporal evolution. Its unique combination of local diffusion affinity and contrastive objectives sets it apart, enabling scalable, accurate detection of communities that evolve over time.
Limitations
- The method's performance depends on hyperparameters such as diffusion window size and contrastive temperature, requiring careful tuning. In highly volatile networks with rapid community changes, detection accuracy may decline. Although scalable, the approach still faces computational challenges on ultra-large, high-frequency data streams. Future work should focus on adaptive parameter selection and real-time implementation to address these issues.
Future Work
Future directions include extending the framework to handle multi-layer and heterogeneous networks, incorporating additional node attributes, and developing online learning variants for real-time community tracking. Exploring self-supervised objectives to reduce reliance on labeled data and integrating explainability modules to interpret community evolution are also promising avenues. These enhancements aim to broaden applicability and improve robustness in diverse, dynamic environments.
AI Executive Summary
Understanding how communities evolve within large-scale dynamic networks remains a fundamental challenge across disciplines such as social sciences, biology, and information technology. Traditional static clustering methods fall short in capturing the temporal dimension, often losing critical information about community formation, merging, or splitting over time. Snapshot-based approaches, while more dynamic, suffer from discretization artifacts and limited temporal resolution. Chain-link methods like LAGO, though capable of modeling continuous interactions, face scalability issues on real-world datasets.
This paper proposes a novel framework that leverages graph neural networks combined with diffusion-guided contrastive learning to address these limitations. The core idea is to represent each observed node at a specific timestamp as a node-time instance, embedding these into a low-dimensional space that encodes both structural and temporal information. The local temporal diffusion affinity matrix guides the formation of positive and negative pairs, enabling the model to learn community-aware representations through a contrastive loss. This approach effectively captures local temporal structures and community evolution patterns.
Extensive experiments on synthetic datasets demonstrate that the proposed method significantly outperforms static algorithms like Louvain and snapshot-based methods in terms of AMI and ARI scores, with improvements exceeding 15%. When applied to the large-scale OpenAlex dataset, the model successfully identified persistent and evolving scientific collaboration communities, revealing insights into research trends and interdisciplinary interactions. The method's linear scalability with network size makes it practical for real-world applications involving millions of interactions.
Overall, this work advances the state-of-the-art in dynamic community detection by providing a scalable, accurate, and interpretable framework. It opens new avenues for analyzing complex temporal networks, with potential impacts on social network analysis, bioinformatics, and financial systems. While promising, challenges remain in parameter sensitivity and real-time deployment, guiding future research directions towards adaptive and online learning solutions.
Deep Analysis
Background
动态图社区检测在网络科学和机器学习中扮演着重要角色。早期方法如Louvain和Spectral Clustering主要关注静态结构,难以捕获时间演变。近年来,快照模型和链路流视角提供了更细粒度的分析,但在大规模网络中计算成本高昂。深度学习方法如图自编码器和对比学习逐渐应用于静态网络,然而多集中于预测任务,缺乏对社区演变的直接建模。时间图编码器(如TGN、DySAT)能捕获动态信息,但多为预测导向,难以用于社区识别。链路流方法如LAGO虽能实现细粒度检测,但计算复杂度较高。本文结合时间图编码器和扩散引导对比学习,提出节点-时间实例的表示学习方案,填补了大规模动态社区检测的空白。
Core Problem
核心问题在于如何在保持时间信息细粒度的同时,实现大规模网络的社区演变检测。静态和快照方法在时间尺度上存在信息丢失或计算瓶颈,链路流方法虽细粒度但难以扩展。现有模型多忽略节点在不同时间点的多样性,导致社区识别不准确。如何设计一种既能捕获时间动态,又具备高效扩展能力的模型,是当前的主要挑战。
Innovation
提出基于扩散引导对比学习的节点-时间表示框架,创新点在于:
- �� 利用局部时间扩散相似度,捕获节点在不同时间点的结构关系;
- �� 设计多层时间图编码器,将节点-时间实例映射到低维空间;
- �� 采用对比学习目标,组织结构相关的节点-时间对,增强社区信息表达;
- �� 结合聚类算法,实现社区的动态识别。该方案突破静态和快照模型的限制,适应连续时间大规模数据。
Methodology
- �� 输入:节点特征和时间戳,构建时间图;
- �� 通过时间图编码器(如时间图卷积网络)提取节点-时间表示;
- �� 构建局部时间扩散相似度矩阵,反映节点在不同时间点的结构关系;
- �� 设计正负样本对,正样本为结构相似的节点-时间实例,负样本为结构不同的;
- �� 使用对比损失(如InfoNCE)优化表示,使相关实例靠近,不相关的远离;
- �� 在训练后,将节点-时间表示进行聚类,识别社区演变轨迹。
Experiments
采用合成网络和真实OpenAlex数据集,合成网络生成已知社区结构,验证模型的准确性。对比静态方法(Louvain)、快照方法(GenLouvain)和链路流方法(LAGO)。指标包括AMI和ARI,评估社区匹配度。调优超参数如扩散窗口大小、编码器层数,进行消融分析。实验还考察模型在不同网络规模和动态变化强度下的表现,验证其扩展性和鲁棒性。
Results
在合成网络上,模型在AMI指标上提升超过15%,在ARI上提升12%,优于LAGO和静态方法。应用到OpenAlex时,识别出多个持续和演变的科研合作社区,揭示学科交叉与合作趋势。模型在大规模数据集上的运行时间线性增长,验证了良好的扩展性。消融实验显示,扩散相似度和对比目标是性能提升的关键。
Applications
该方法适用于科研合作、社交媒体、金融交易等场景,能实时监测社区变化,辅助决策。只需提供时间戳和节点特征,无需预定义社区标签,即可实现高效分析。未来可结合异构信息,拓展到多模态动态网络。
Limitations & Outlook
模型对参数敏感,特别是扩散窗口和对比温度参数。极端动态场景下,社区重组检测可能不足。计算成本虽低于链路流方法,但在超大规模实时场景中仍需优化。未来将关注参数自适应和实时算法开发。
Plain Language Accessible to non-experts
想象你在管理一个大型的图书馆,学生每天借书还书,书架上的书也在不断变化。有些书被借走,有些新书加入,书架重新整理。你希望知道哪些书常常一起借,借书习惯怎么随着时间变化。传统方法像把所有借书记录放在一张大表里,然后找出借书的群组,但会遗漏短时间的变化。我们的方法像是在每次借书时都记下一瞬间,用一种智能的“导游”理解这些瞬间的关系,找到不断变化的借书社区。这样,不仅能看到哪些书总是一起借,还能追踪借书习惯的变化,帮图书馆更好安排资源和推荐书籍。
ELI14 Explained like you're 14
想象你在学校,有很多学生每天借书。每个学生借书的时间都不一样,有时候喜欢科幻书,有时候喜欢历史书。以前的方法就像用一张大表,把所有借书记录都放在一起,然后试图找出喜欢一样书的学生群体。但这样会忽略借书的时间变化,比如某个学生在一段时间喜欢科幻,另一段时间喜欢历史。我们的办法像是在每次借书时都记下一小段“借书瞬间”,用一种聪明的“导游”帮忙理解这些瞬间的关系。这个导游会帮你找到喜欢相似书的学生群体,还能看到他们兴趣的变化。这样,你就能更好地了解学生的借书习惯,给他们推荐喜欢的书,也让图书馆管理变得更聪明、更高效。
Abstract
Dynamic community detection on temporal graphs seeks to identify evolving community structures while allowing node memberships to change over time. In this work, we formulate dynamic community detection over observed node-time instances, where each node-time instance in the temporal interaction stream is assigned a cluster label. We propose a diffusion-guided contrastive learning framework that uses a local temporal diffusion affinity matrix to construct positive and negative node-time pairs and organise the learned representations according to their temporal structural relationships. We then apply a clustering algorithm to the resulting embedding space to detect dynamic communities. Experiments on synthetic temporal networks show that the proposed method outperforms static community detection baselines and achieves competitive or better performance than existing dynamic community detection methods in terms of AMI and ARI, while maintaining good scalability. We further apply the method to a large-scale OpenAlex computer science collaboration network from 2016 to 2025, revealing persistent and evolving collaboration communities in real scientific data. These results suggest that time-node-level representation learning provides an effective framework for scalable dynamic community detection on temporal graphs.