Community Detection in Dynamic Heterogeneous Graphs with Supervised and Probabilistic Learning

Authors

DOI:

https://doi.org/10.21015/vtse.v14i4.2665

Abstract

Community detection in dynamic heterogeneous graphs requires modeling multiple relation types across intermittent observations. This study presents DyHetCom, a framework with supervised and unsupervised pathways. The supervised pathway combines relation-specific GraphSAGE with activity-aware temporal consensus to infer persistent community labels. The unsupervised pathway fuses GraphSAGE and GATv2 through gated residual connections, separates stable and dynamic representations, and estimates snapshot-specific soft memberships using time-varying prototypes. A modularity eigengap procedure estimates the number of communities from the graph's typed relations. DyHetCom was evaluated on DBLP (1969--2008) and IMDb (1916--2016), each represented by four chronological snapshots. Across ten stratified, entity-disjoint splits, supervised accuracy and macro-F1 were 0.9489 ± 0.0080 and 0.9455 ± 0.0083 on DBLP and 0.6480 ± 0.0095 and 0.4325 ± 0.0088 on IMDb, respectively (mean ± standard deviation). Repeated unsupervised evaluation on DBLP yielded an accuracy of 0.7499 ± 0.0528 after Hungarian matching and an adjusted Rand index (ARI) of 0.5472 ± 0.0711. In the separate automatic community-count evaluation, normalized mutual information (NMI) and ARI were 0.7178 and 0.7551 on DBLP and 0.3241 and 0.0110 on IMDb. In fixed-partition comparisons with HeteroSAGE, DyHetCom achieved lower multiclass Brier scores on both datasets and lower expected calibration error on IMDb. Ablations indicated contributions from temporal consensus, semantic context reconstruction, and prototype assignment. Edge removal produced the largest performance degradation among the tested perturbations.

References

[1] S. Fortunato, “Community detection in graphs,” Physics Reports, vol. 486, no. 3–5, pp. 75–174, 2010, doi: 10.1016/j.physrep.2009.11.002. DOI: https://doi.org/10.1016/j.physrep.2009.11.002

[2] S. Fortunato and D. Hric, “Community detection in networks: A user guide,” Physics Reports, vol. 659, pp. 1–44, 2016, doi: 10.1016/j.physrep.2016.09.002. DOI: https://doi.org/10.1016/j.physrep.2016.09.002

[3] V. D. Blondel, J.-L. Guillaume, R. Lambiotte, and E. Lefebvre, “Fast unfolding of communities in large networks,” Journal of Statistical Mechanics: Theory and Experiment, vol. 2008, no. 10, p. P10008, 2008, doi: 10.1088/1742-5468/2008/10/P10008. DOI: https://doi.org/10.1088/1742-5468/2008/10/P10008

[4] V. A. Traag, L. Waltman, and N. J. van Eck, “From Louvain to Leiden: Guaranteeing well-connected communities,” Scientific Reports, vol. 9, no. 1, p. 5233, 2019, doi: 10.1038/s41598-019-41695-z. DOI: https://doi.org/10.1038/s41598-019-41695-z

[5] C. Shi, Y. Li, J. Zhang, Y. Sun, and P. S. Yu, “A survey of heterogeneous information network analysis,” IEEE Transactions on Knowledge and Data Engineering, vol. 29, no. 1, pp. 17–37, 2017, doi: 10.1109/TKDE.2016.2598561. DOI: https://doi.org/10.1109/TKDE.2016.2598561

[6] C. Yang, Y. Xiao, Y. Zhang, Y. Sun, and J. Han, “Heterogeneous network representation learning: A unified framework with survey and benchmark,” IEEE Transactions on Knowledge and Data Engineering, vol. 34, no. 10, pp. 4854–4873, 2022, doi: 10.1109/TKDE.2020.3045924. DOI: https://doi.org/10.1109/TKDE.2020.3045924

[7] G. Rossetti and R. Cazabet, “Community discovery in dynamic networks: A survey,” ACM Computing Surveys, vol. 51, no. 2, pp. 1–37, 2018, Art. no. 35, doi: 10.1145/3172867. DOI: https://doi.org/10.1145/3172867

[8] S. M. Kazemi, R. Goel, K. Jain, I. Kobyzev, A. Sethi, P. Forsyth, and P. Poupart, “Representation learning for dynamic graphs: A survey,” Journal of Machine Learning Research, vol. 21, no. 70, pp. 1–73, 2020. [Online]. Available: https://jmlr.org/papers/v21/19-447.html

[9] P. J. Mucha, T. Richardson, K. Macon, M. A. Porter, and J.-P. Onnela, “Community structure in time-dependent, multiscale, and multiplex networks,” Science, vol. 328, no. 5980, pp. 876–878, 2010, doi: 10.1126/science.1184819. DOI: https://doi.org/10.1126/science.1184819

[10] W. Hamilton, Z. Ying, and J. Leskovec, “Inductive representation learning on large graphs,” in Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 1024–1034. [Online]. Available: https://papers.nips.cc/paper/6703-inductive-representation-learning-on-large-graphs

[11] P. Veličković, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph attention networks,” in International Conference on Learning Representations (ICLR), 2018. [Online]. Available: https://openreview.net/forum?id=rJXMpikCZ

[12] S. Brody, U. Alon, and E. Yahav, “How attentive are graph attention networks?” in International Conference on Learning Representations (ICLR), 2022. [Online]. Available: https://openreview.net/forum?id=F72ximsx7C1

[13] X. Wang, H. Ji, C. Shi, B. Wang, Y. Ye, P. Cui, and P. S. Yu, “Heterogeneous graph attention network,” in The World Wide Web Conference (WWW), 2019, pp. 2022–2032, doi: 10.1145/3308558.3313562. DOI: https://doi.org/10.1145/3308558.3313562

[14] X. Fu, J. Zhang, Z. Meng, and I. King, “MAGNN: Metapath aggregated graph neural network for heterogeneous graph embedding,” in Proceedings of The Web Conference 2020, 2020, pp. 2331–2341, doi: 10.1145/3366423.3380297. DOI: https://doi.org/10.1145/3366423.3380297

[15] Z. Hu, Y. Dong, K. Wang, and Y. Sun, “Heterogeneous graph transformer,” in Proceedings of The Web Conference 2020, 2020, pp. 2704–2710, doi: 10.1145/3366423.3380027. DOI: https://doi.org/10.1145/3366423.3380027

[16] X. Liu, Y. Wu, G. Fiumara, and P. De Meo, “Heterogeneous graph community detection method based on K-nearest neighbor graph neural network,” Intelligent Data Analysis, vol. 28, no. 6, pp. 1445–1466, 2024, doi: 10.3233/IDA-230356. DOI: https://doi.org/10.3233/IDA-230356

[17] A. Sankar, Y. Wu, L. Gou, W. Zhang, and H. Yang, “DySAT: Deep neural representation learning on dynamic graphs via self-attention networks,” in Proceedings of the 13th International Conference on Web Search and Data Mining (WSDM), 2020, pp. 519–527, doi: 10.1145/3336191.3371845. DOI: https://doi.org/10.1145/3336191.3371845

[18] A. Pareja, G. Domeniconi, J. Chen, T. Ma, T. Suzumura, H. Kanezashi, T. Kaler, T. B. Schardl, and C. E. Leiserson, “EvolveGCN: Evolving graph convolutional networks for dynamic graphs,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, no. 4, 2020, pp. 5363–5370, doi: 10.1609/aaai.v34i04.5984. DOI: https://doi.org/10.1609/aaai.v34i04.5984

[19] D. Xu, C. Ruan, E. Korpeoglu, S. Kumar, and K. Achan, “Inductive representation learning on temporal graphs,” in International Conference on Learning Representations (ICLR), 2020. [Online]. Available: https://arxiv.org/abs/2002.07962

[20] E. Rossi, B. Chamberlain, F. Frasca, D. Eynard, F. Monti, and M. Bronstein, “Temporal graph networks for deep learning on dynamic graphs,” 2020. [Online]. Available: https://arxiv.org/abs/2006.10637

[21] M. Teng, C. Gao, X. Li, Z. Wang, K. Fan, and V. Nekorkin, “Multi-scale graph contrastive learning for community detection in dynamic graphs,” Information Processing & Management, vol. 63, no. 2, p. 104410, 2026, doi: 10.1016/j.ipm.2025.104410. DOI: https://doi.org/10.1016/j.ipm.2025.104410

[22] P. Shahgholi, A. Bouyer, B. Arasteh, H. Kusetogullari, and X. Liu, “Dynamic community detection using enhanced GraphSage deep model with fast semi-supervised time-step label matching in social networks,” Applied Network Science, vol. 11, no. 46, p. 46, 2026, doi: 10.1007/s41109-026-00802-6.

[23] Y. Fan, M. Ju, C. Zhang, and Y. Ye, “Heterogeneous temporal graph neural network,” in Proceedings of the 2022 SIAM International Conference on Data Mining (SDM), 2022, pp. 657–665, doi: 10.1137/1.9781611977172.74. DOI: https://doi.org/10.1137/1.9781611977172.74

[24] H. Liu, P. Jiao, X. Guo, H. Wu, M. Gao, and J. Zhang, “HGN2T: A simple but plug-and-play framework extending HGNNs on heterogeneous temporal graphs,” IEEE Transactions on Big Data, vol. 10, no. 5, pp. 620–632, 2024, doi: 10.1109/TBDATA.2024.3366085. DOI: https://doi.org/10.1109/TBDATA.2024.3366085

[25] Z. Wen, Y. Fang, P. Wei, F. Liu, Z. Chen, and M. Wu, “Temporal and heterogeneous graph neural network for remaining useful life prediction,” IEEE Transactions on Neural Networks and Learning Systems, vol. 36, no. 11, pp. 19748–19761, 2025, doi: 10.1109/TNNLS.2025.3592788. DOI: https://doi.org/10.1109/TNNLS.2025.3592788

[26] W. Bai, L. Qiu, and W. Zhao, “Dynamic heterogeneous graph representation via contrastive learning based on long-range community mining,” Neurocomputing, vol. 664, Art. no. 132160, 2026, doi: 10.1016/j.neucom.2025.132160. DOI: https://doi.org/10.1016/j.neucom.2025.132160

[27] Y. Zheng, S. Chen, X. Zhang, X. Zhang, X. Yang, and D. Wang, “Heterogeneous-temporal graph convolutional networks: Make the community detection much better,” 2020, version 2, revised Mar. 13, 2020; originally submitted Sep. 23, 2019. [Online]. Available: https://arxiv.org/abs/1909.10248

[28] M. Zhang, J. Zhang, and W. Dai, “Fast community detection in dynamic and heterogeneous networks,” Journal of Computational and Graphical Statistics, vol. 33, no. 2, pp. 487–500, 2024, doi: 10.1080/10618600.2023.2232852. DOI: https://doi.org/10.1080/10618600.2023.2232852

[29] D. Kong, A. Zhang, and Y. Li, “Learning persistent community structures in dynamic networks via topological data analysis,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 38, no. 8, 2024, pp. 8617–8626, doi: 10.1609/aaai.v38i8.28706. DOI: https://doi.org/10.1609/aaai.v38i8.28706

[30] J. Xie, R. Girshick, and A. Farhadi, “Unsupervised deep embedding for clustering analysis,” in Proceedings of the 33rd International Conference on Machine Learning, vol. 48, 2016, pp. 478–487. [Online]. Available: https://proceedings.mlr.press/v48/xieb16.html

[31] C. Wang, S. Pan, R. Hu, G. Long, J. Jiang, and C. Zhang, “Attributed graph clustering: A deep attentional embedding approach,” in Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI), 2019, pp. 3670–3676, doi: 10.24963/ijcai.2019/509. DOI: https://doi.org/10.24963/ijcai.2019/509

[32] D. Bo, X. Wang, C. Shi, M. Zhu, E. Lu, and P. Cui, “Structural deep clustering network,” in Proceedings of The Web Conference 2020, 2020, pp. 1400–1410, doi: 10.1145/3366423.3380214. DOI: https://doi.org/10.1145/3366423.3380214

[33] W. Tu, S. Zhou, X. Liu, X. Guo, Z. Cai, E. Zhu, and J. Cheng, “Deep fusion clustering network,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 35, no. 11, 2021, pp. 9978–9987, doi: 10.1609/aaai.v35i11.17198. DOI: https://doi.org/10.1609/aaai.v35i11.17198

[34] Y. Liu, W. Tu, S. Zhou, X. Liu, L. Song, X. Yang, and E. Zhu, “Deep graph clustering via dual correlation reduction,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 36, no. 7, 2022, pp. 7603–7611, doi: 10.1609/aaai.v36i7.20726. DOI: https://doi.org/10.1609/aaai.v36i7.20726

[35] L. Sun, Z. Huang, H. Peng, Y. Wang, C. Liu, and P. S. Yu, “LSEnet: Lorentz structural entropy neural network for deep graph clustering,” in Proceedings of the 41st International Conference on Machine Learning, vol. 235, 2024, pp. 47078–47104. [Online]. Available: https://proceedings.mlr.press/v235/sun24g.htm

Downloads

Published

2026-11-22

How to Cite

Haddad, H., Attariuas, H., & Younes, A. (2026). Community Detection in Dynamic Heterogeneous Graphs with Supervised and Probabilistic Learning. VFAST Transactions on Software Engineering, 14(4), 215–244. https://doi.org/10.21015/vtse.v14i4.2665