From Wikipedia:<p><i>Modularity is one measure of the structure of networks or graphs. It was designed to measure the strength of division of a network into modules (also called groups, clusters or communities). Networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes in different modules. Modularity is often used in optimization methods for detecting community structure in networks. However, it has been shown that modularity suffers a resolution limit and, therefore, it is unable to detect small communities. Biological networks, including animal brains, exhibit a high degree of modularity. A 2013 paper shows that modularity in biological networks may have evolved due to selection pressures to reduce connection costs.</i><p>Paper on Modularity Maximization algo to identify communities in graph is at <a href="http://www-scf.usc.edu/~gaurava/modularity.pdf" rel="nofollow">http://www-scf.usc.edu/~gaurava/modularity.pdf</a><p>There are many other ways to cluster the graph.