Skip to main content
Log in

Gravity algorithm for the community detection of large-scale network

  • Original Research
  • Published:
Journal of Ambient Intelligence and Humanized Computing Aims and scope Submit manuscript

Abstract

Community detection refers to the task of finding groups of nodes in a network that share common properties. The identified groups are called communities, which have tight intra-connections and feeble inter-connections. For the large-scale networks, we need a stable algorithm to detect communities quickly and does not depend on previous knowledge about the possible communities and any special parameter tuning. Therefore, this paper introduces a novel algorithm for community detection that is inspired by the surface Gravity of astronomical objects. In this algorithm, each vertex of a network and its degree and size are metaphors for an astronomical object and its mass and radius, respectively. The algorithm defines the gravity force for each vertex of a network. So, as a dense astronomical object, a dense vertex has a high mass and a low radius and exerts a high gravity force on its neighbours. In this paper, we define a particular modularity gain function to evaluate the merging gain of two vertexes. The algorithm is very fast, and its computational complexity is from the order of \(O(n\log n)\). Although there is a trade-off between the modularity and speed of algorithms, the results showed that the suggested algorithm is much faster than the current well-known algorithms. Furthermore, it is reliable, stable and free from parameter tuning as well as predefined knowledge about communities. In this paper, the proposed algorithm is extended to run faster than the original Gravity. The extended Gravity algorithm divides a large scale network into some smaller sub-networks. Then the communities of each part are detected in serial and parallel modes. By preserving the modularity of detected communities, the extended Gravity is extremely faster than the original Gravity algorithm.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. http://glaros.dtc.umn.edu/gkhome/metis/metis/download

References

  • Aghaalizadeh S, Afshord ST, Bouyer A, Anari B (2021) A three-stage algorithm for local community detection based on the high node importance ranking in social networks. Phys A Stat Mech Appl 563:125420

    Article  MATH  Google Scholar 

  • Agrawal S, Patel A (2021) unsupervised graph clustering based on collaborative similarity for community detection in complex networks. Phys A Stat Mech Appl 563:125459

    Article  Google Scholar 

  • Ahajjam S, El Haddad M, Badir H (2018) A new scalable leader-community detection approach for community detection in social networks. Soc Netw 54:41–49

    Article  Google Scholar 

  • Al-Andoli M, Cheah WP, Tan SC (2021a) Deep learning-based community detection in complex networks with network partitioning and reduction of trainable parameters. J Ambient Intell Hum Comput 12(2):2527–2545

    Article  Google Scholar 

  • Al-Andoli M, Cheah WP, Tan SC (2021b) Deep autoencoder-based community detection in complex networks with particle swarm optimization and continuation algorithms. J Int Fuzzy Syst 40(3):4517–4533

    Google Scholar 

  • Arasteh M, Alizadeh S (2019a) Community detection in complex networks using a new agglomerative approach. Turk J Electric Eng Comput Sci 27(5):3356–3367

    Article  Google Scholar 

  • Arasteh M, Alizadeh S (2019b) A fast divisive community detection algorithm based on edge degree betweenness centrality. Appl Intell 49(2):689–702

    Article  Google Scholar 

  • Basuchowdhuri P, Sikdar S, Nagarajan V, Mishra K, Gupta S, Majumder S (2019) Fast detection of community structures using graph traversal in social networks. Knowl Inf Syst 59(1):1–31

    Article  Google Scholar 

  • Bedi P, Sharma C (2016) Community detection in social networks. Wiley Interdiscipl Rev Data Min Knowl Discov 6(3):115–135

    Article  Google Scholar 

  • Beni HA, Bouyer A (2020) TI-SC: top-k influential nodes selection based on community detection and scoring criteria in social networks. J Ambient Intell Human Comput 11:4889–4908

    Article  Google Scholar 

  • Berahmand K, Bouyer A (2019) Link-based similarity for improving community detection based on label propagation algorithm. J Syst Sci Complex 32(3):737–758

    Article  MATH  Google Scholar 

  • Blondel VD, Guillaume JL, Lambiotte R, Lefebvre E (2008) Fast unfolding of communities in large networks. J Stat Mech Theory Exp 2008(10):P10008

    Article  MATH  Google Scholar 

  • Bouyer A, Roghani H (2020) A fast and robust local community detection starting from low degree nodes in social networks. Future Gener Comput Syst 113:41–57

    Article  Google Scholar 

  • Brandes U, Delling D, Gaertler M, Gorke R, Hoefer M, Nikoloski Z, Wagner D (2008) On modularity clustering. IEEE Trans Knowl Data Eng 20(2):172–188

    Article  MATH  Google Scholar 

  • Bui TN, Jones C (1992) Finding good approximate vertex and edge partitions is NP-hard. Inf Process Lett 42(3):153–159

    Article  MATH  Google Scholar 

  • Chakraborty T, Dalmia A (2017) Metrics for community analysis: a survey. ACM Comput Surv (CSUR) 50(4):54

    Google Scholar 

  • Choe TY, Park CI (2004) A k-way graph partitioning algorithm based on clustering by eigenvector. In: International conference on computational science, vol 3037, pp 598–601. Springer, Berlin, Heidelberg

    MATH  Google Scholar 

  • Clauset A, Newman M, Moore C (2004) Finding community structure in very large networks. Phys Rev E 70(6):066111

    Article  Google Scholar 

  • Corneil DG, Krueger RM (2008) A unified view of graph searching. SIAM J Discrete Math 22(4):1259–1276

    Article  MATH  Google Scholar 

  • Creusefond J, Largillier T, Peyronnet S (2017) A lexdfs-based approach on finding compact communities. From social data mining and analysis to prediction and community detection. Springer, Cham, pp 141–177

    Google Scholar 

  • Erdos P, Renyi A (1957) On random graphs. Publ Math (Debrecen) 6:290–297

    Article  MATH  Google Scholar 

  • Estrada E (2006) Virtual identification of essential proteins within the protein interaction network of yeast. Proteomics 6(1):35–40

    Article  Google Scholar 

  • Farivar F, Shoorehdeli M.A, Manthouri M (2020) Improved teaching–learning based optimization algorithm using Lyapunov stability analysis. J Ambient Intell Human Comput. https://doi.org/10.1007/s12652-020-02012-z

  • Fortunato S (2010) Community detection in graphs. Phys Rep 486(3–5):75–174

    Article  Google Scholar 

  • Gao C, Ma Z, Zhang AY, Zhou HH (2018) Community detection in degree-corrected block models. Ann Stat 46(5):2153–2185

    Article  MATH  Google Scholar 

  • García SÁ (2014) Compact and efficient representations of graphs. Doctoral dissertation, Universidade da Coruña. https://lbd.udc.es/Repository/Thesis/1417160280628_thesis_(11).pdf

  • Girvan M, Newman ME (2002) Community structure in social and biological networks. Proc Natl Acad Sci 99(12):7821–7826

    Article  MATH  Google Scholar 

  • Halliday D, Resnick R, Walker J (2014) Fundamentals of physics, 10th edn. Wiley (ISBN 978-1-118-23072-5 (Extended edition))

    MATH  Google Scholar 

  • Hurajová JC, Madaras T (2016) Revising the Newman-Girvan algorithm. ITAT 1649:200–205

    Google Scholar 

  • Javed MA, Younis MS, Latif S, Qadir J, Baig A (2018) Community detection in networks: a multidisciplinary review. J Netw Comput Appl 108:87–111

    Article  Google Scholar 

  • Jokar E, Mosleh M (2019) Community detection in social networks based on improved label propagation algorithm and balanced link density. Phys Lett A 383(8):718–727

    Article  Google Scholar 

  • Malliaros FD, Vazirgiannis M (2013) Clustering and community detection in directed networks: a survey. Phys Rep 533(4):95–142

    Article  MATH  Google Scholar 

  • Midoun MA, Wang X (2019) New magnetic algorithm to detect community structure based on the magnets' approach. Mod Phys Lett B 33(13):1950166

    Article  Google Scholar 

  • Midoun MA, Wang X, Talhaoui MZ (2020) A pyramidal community detection algorithm based on a generalization of the clustering coefficient. J Ambient Intell Human Comput. https://doi.org/10.1007/s12652-020-02608-5

  • Mochón MC (2016) Social network analysis and big data tools applied to the systemic risk supervision. Ijimai 3(6):34–37

    Article  Google Scholar 

  • Moghaddam A (2011) Detection of malicious user communities in data networks, University of Victoria (MSc Thesis). http://dspace.library.uvic.ca/handle/1828/3235

  • Newman M (2014) Fast algorithm for detecting community structure in networks. Phys Rev E 69(6):066133

    Article  Google Scholar 

  • Palla G, Derényi I, Farkas I, Vicsek T (2005) Uncovering the overlapping community structure of complex networks in nature and society. Nature 435(7043):814

    Article  Google Scholar 

  • Papadopoulos S, Kompatsiaris Y, Vakali A, Spyridonos P (2012) Community detection in social media. Data Min Knowl Discov 24(3):515–554

    Article  Google Scholar 

  • Pizzuti C (2018) Evolutionary computation for community detection in networks: a review. IEEE Trans Evol Comput 22(3):464–483

    Article  Google Scholar 

  • Radicchi F, Castellano C, Cecconi F, Loreto V, Parisi D (2004) Defining and identifying communities in networks. Proc Natl Acad Sci 101(9):2658–2663

    Article  Google Scholar 

  • Raghavan UN, Albert R, Kumara S (2007) Near linear time algorithm to detect community structures in large-scale networks. Phys Rev E 76(3):036106

    Article  Google Scholar 

  • Rashedi E, Nezamabadi-Pour H, Saryazdi S (2009) GSA: a gravitational search algorithm. Inf Sci 179(13):2232–2248

    Article  MATH  Google Scholar 

  • Rosvall M, Bergstrom CT (2008) Maps of random walks on complex networks reveal community structure. Proc Natl Acad Sci 105(4):1118–1123

    Article  Google Scholar 

  • Schaeffer SE (2007) Graph clustering. Comput Sci Rev 1(1):27–64

    Article  MATH  Google Scholar 

  • Shahabi Sani N, Manthouri M, Farivar F (2020) A multi-objective ant colony optimization algorithm for community detection in complex networks. Ambient Intell Hum Comput 11(1):5–21

    Article  Google Scholar 

  • Shi C, Yan Z, Cai Y, Wu B (2012) Multi-objective community detection in complex networks. Appl Soft Comput 12(2):850–859

    Article  Google Scholar 

  • Stam CJ (2014) Modern network science of neurological disorders. Nat Rev Neurosci 15(10):683

    Article  Google Scholar 

  • Tan F, Xia Y, Zhu B (2014) Link prediction in complex networks: a mutual information perspective. PLoS One 9(9):e107056

    Article  Google Scholar 

  • Tasgin M, Bingol HO (2019) Community detection using boundary nodes in complex networks. Phys A Stat Mech Appl 513:315–324

    Article  Google Scholar 

  • Waltman L, Van Eck NJ (2013) A smart local moving algorithm for large-scale modularity-based community detection. Eur Phys J B 86(11):471

    Article  Google Scholar 

  • Wasserman S, Faust K (1994) Social network analysis: methods and applications. Cambridge University Press, p 8

    Book  MATH  Google Scholar 

  • Yang B, Liu D, Liu J (2010) Discovering communities from social networks: methodologies and applications. Handbook of social network technologies and applications. Springer, Boston, pp 331–346

    Book  Google Scholar 

  • Yin G, Chi K, Dong Y, Dong H (2017) An approach of community evolution based on gravitational relationship refactoring in dynamic networks. Phys Lett A 381(16):1349–1355

    Article  Google Scholar 

  • You X, Ma Y, Liu Z (2020) A three-stage algorithm on community detection in social networks. Knowl-Based Syst 187:1048225

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Majid Arasteh.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Arasteh, M., Alizadeh, S. & Lee, CG. Gravity algorithm for the community detection of large-scale network. J Ambient Intell Human Comput 14, 1217–1228 (2023). https://doi.org/10.1007/s12652-021-03374-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12652-021-03374-8

Keywords

Navigation