For my research work I need to put a comparison of different community detection algorithms. Instead of implementing all those algorithms once again, I would like to use the methods already provided by Mathematica. Would anyone help me in figuring out the different algorithms used in FindGraphCommunities. I found there are 6 methods to get the community structures.

Among the 6, the method "Centrality" possibly use the same algorithm by Girvan and Newman in 2002 with edge betweenness centrality.

And the method "Modularity" works similar to the algorithm proposed by Newman and Girvan in 2004.

However, there are different version of the same kind of algorithms in the literature. I would like to put proper citations for these algorithms. How could I find the details of the implementations of all 6 algorithms. Please provide me with the information.

Also, please provide me with the link of full documentation of the Function FindGraphCommunities with all the options available to each method. I could not able to find options in the reference documents.

Thank You.

  • 1
    $\begingroup$ for the doc links try goog = Import["https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\mathematica%20findgraphcommunities", "JSON"]; Hyperlink["url"] /. ("results" /. ("responseData" /. goog)):) $\endgroup$
    – kglr
    Aug 26, 2014 at 14:11
  • 2
    $\begingroup$ I think this type of information should be made public, modulo proprietary bits. There is this concept in scientific workflow of replication and data provenance. In the analytics and "machine learning" age this becomes increasingly important since obtained results can drive real world decisions: financial, medical, &c. $\endgroup$ Aug 26, 2014 at 16:50
  • 2
    $\begingroup$ I think only Wolfram Research can answer this. $\endgroup$ Sep 2, 2014 at 20:12
  • 1
    $\begingroup$ Have you contacted Wolfram support with this question? Did you receive an answer? $\endgroup$
    – Szabolcs
    Dec 5, 2014 at 18:04
  • 1
    $\begingroup$ Related meta post. $\endgroup$
    – Szabolcs
    Dec 5, 2014 at 18:12

1 Answer 1


This can indeed be a serious problem when using Mathematica. It's very convenient that it has an implementation of e.g. the Girvan–Newman algorithm, but without the documentation at least confirming that this is indeed what it uses, without significant modifications, I cannot use it in a publication. After all, we're only guessing that Method -> "Centrality" is a standard Girvan–Newman procedure ...

FindGraphCommunities is quite different from functions like e.g. Eigenvectors because there is no simple way to verify its result. I don't need to know how Mathematica computed some eigenvectors to use them. All I need to know is: 1. what is an eigenvector 2. that the result is correct. Point (1) is easy because the definition is standard. Point (2) is also easy: eigenvectors are much simpler to verify than to compute. FindGraphCommunities fails on both points: there's no confirmation of what it does and there's no easy way to verify that the result is correct.

IGraph/M, a Mathematica interface for igraph may come in handy here. It has implementations of many community detection algorithms with references for each, and it is well integrated into Mathematica. It works with Mathematica's Graph datastructure.

enter image description here

While the IGraph/M documentation is a bit sparse (due to lack of time), you'll find a lot more information on each implemented method in the igraph reference manual.

This takes care of point (1). You know exactly what each function is supposed to do. For (2), i.e. correctness, you still have to trust the implementation. While it's open source, it is not particularly realistic to hand-verify their implementation.

What's more realistic is to ask Wolfram Support for references on what each method does. If they confirm that Method -> "Centrality" is indeed Girvan–Newman without modifications, then you now have two independent implementations for checking:

g = ExampleData[{"NetworkGraph", "DolphinSocialNetwork"}];

SortBy[Length]@IGCommunitiesEdgeBetweenness[g]["Communities"] === 
 SortBy[Length]@FindGraphCommunities[g, Method -> "Centrality"]

(* True *)

Having two systems complementing each other is always better than having just one, regardless of whether they're open source or closed.

Of course this won't work in every case because many of these algorithms use stochastic methods ...

BTW IGraph/M will return more information about the community structure than FindGraphCommunities. Here's for example the dendrogram:

 LeafLabels -> (Rotate[#, Pi/2] &), Axes -> {False, True}]

enter image description here

It shows you the edge betweenness values where the network is split into components.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.