  We propose a unified framework for studying both latent and stochastic block
models, which are used to cluster simultaneously rows and columns of a data
matrix. In this new framework, we study the behaviour of the groups posterior
distribution, given the data. We characterize whether it is possible to
asymptotically recover the actual groups on the rows and columns of the matrix,
relying on a consistent estimate of the parameter. In other words, we establish
sufficient conditions for the groups posterior distribution to converge (as the
size of the data increases) to a Dirac mass located at the actual (random)
groups configuration. In particular, we highlight some cases where the model
assumes symmetries in the matrix of connection probabilities that prevents
recovering the original groups. We also discuss the validity of these results
when the proportion of non-null entries in the data matrix converges to zero.
