Nonparametric and Robust Methods for Community Detection in Complex Networks