solutions. Remark that, if we restrict the set of equations (\[eq:invchis\]), e.g. by some thresholding procedure, in such a way that the corresponding graph is a spanning tree, then, by construction, $\chi_{ij} \equiv \hat\chi_{ij}$ will be solution on this restricted set of edges, simply because the BP equations are exact on a tree. The various methods proposed for example in [@MoMe; @YaTa] actually correspond to different heuristics for finding approximate solutions to this set of constraints. As noted in [@NgBe], a direct way to proceed is to eliminate $\chi_{ij}$ in the equations obtained from (\[eq:Jij\]) and (\[eq:invchis\]): $$\begin{aligned}
\chi_{ij}^2+2\chi_{ij}(m_im_j-\coth(2J_{ij}))+(1-m_i^2)(1-m_j^2) = 0\\[0.2cm]
\chi_{ij}^2-\frac{\chi_{ij}}{[\chi^{-1}]_{ij}}-(1-m_i^2)(1-m_j^2) = 0.\end{aligned}$$ This leads directly to $$\label{eq:JBETHE}
J_{ij}^{Bethe} = -\frac{1}{2}\operatorname{atanh}\Bigl(\frac{2[\hat\chi^{-1}]_{ij}}{\sqrt{1+4(1-{\hat m}_i^2)
(1-{\hat m}_j^2)[\hat\chi^{-1}]_{ij}^2}-2{\hat m}_i{\hat m}_j[\hat\chi^{-1}]_{ij}}\Bigr),$$ while the corresponding computed of $\chi_{ij}$, instead of the observed one $\hat \chi_{ij}$, has to be inserted in (\[eq:hi\]) to be fully consistent. Note that $J_{ij}^{Bethe}$ and $J_{ij}^{TAP}$ coincide at second order in $[\hat\chi^{-1}]_{ij}$.

#### Hopfield model

As mentioned in the introduction when the distribution to be modeled is multi-modal, the situation corresponds to finding an Ising model in the low temperature phase with many modes, referred to as Mattis states in the physics literature. Previous methods assume implicitly a high temperature where 