  Various attempts have been made in recent years to solve the Resolution Limit
(RL) problem in community detection by considering variants of the modularity
metric in the detection algorithms. These metrics purportedly largely mitigate
the RL problem and are preferable to modularity in many realistic scenarios.
However, they are not generally suitable for analyzing weighted networks or for
detecting hierarchical community structure. Resolution limit problems can be
complicated, though, and in particular it can be unclear when it should be
considered as problem. In this paper, we introduce a metric that we call
generalized modularity density $Q_g$ that eliminates the RL problem at any
desired resolution and is easily extendable to study weighted and hierarchical
networks. We also propose a benchmark test to quantify the resolution limit
problem, examine various modularity-like metrics to show that the new metric
$Q_g$ performs best, and show that $Q_g$ can identify modular structure in
real-world and artificial networks that is otherwise hidden.
