  We propose an efficient algorithm to solve inverse problems in the presence
of binary clustered datasets. We consider the paradigmatic Hopfield model in a
teacher student scenario, where this situation is found in the retrieval phase.
This problem has been widely analyzed through various methods such as
mean-field approaches or the pseudo-likelihood optimization. Our approach is
based on the estimation of the posterior using the Thouless-Anderson-Palmer
(TAP) equations in a parallel updating scheme. At the difference with other
methods, it allows to retrieve the exact patterns of the teacher and the
parallel update makes it possible to apply it for large system sizes. We also
observe that the Approximate Message Passing (AMP) equations do not reproduce
the expected behavior in the direct problem, questioning the standard practice
used to obtain time indexes coming from Belief Propagation (BP). We tackle the
same problem using a Restricted Boltzmann Machine (RBM) and discuss the
analogies between the two algorithms.
