  How to determine the community structure of complex networks is an open
question. It is critical to establish the best strategies for community
detection in networks of unknown structure. Here, using standard synthetic
benchmarks, we show that none of the algorithms hitherto developed for
community structure characterization perform optimally. Significantly,
evaluating the results according to their modularity, the most popular measure
of the quality of a partition, systematically provides mistaken solutions.
However, a novel quality function, called Surprise, can be used to elucidate
which is the optimal division into communities. Consequently, we show that the
best strategy to find the community structure of all the networks examined
involves choosing among the solutions provided by multiple algorithms the one
with the highest Surprise value. We conclude that Surprise maximization
precisely reveals the community structure of complex networks.
