Sign of the unnormalized log likelihood in Ising model Here is a section of Machine Learning: a Probabilistic Perspective by Kevin Patrick Murphy

I don't understand in (19.18) why there is a negative sign. For me, $\log \tilde{p}(\mathbf{y})=\sum_{s\sim t}\log\psi_{st}(y_s,y_t)$ holds. When $y_s$ and $y_t$ agree, $\log\psi_{st}(y_s,y_t)=w_{st}$, otherwise $\log\psi_{st}(y_s,y_t)=-w_{st}$. So shouldn't it be $\log \tilde{p}(\mathbf{y})=\sum_{s\sim t} y_sw_{st}y_t$? Also, when all entries of $\mathbf{y}$ agree, $\sum_{s\sim t} y_sw_{st}y_t$ is maximized because all summands are positive. So where is the problem? Do I miss something? Thank you.
 A: I suspect that it is just that the authors/editors got confused because the physics problem is usually described in terms of energies, which map to (play the a role analogous to) negative log-likelihoods.  Note that in the final sentence they refer to "low-energy".
In the physics literature the Ising model is cannonically defined as
$$
H(Y)=- \sum_{<ij>} J_{ij} y_i y_j 
$$
the sum is over all pairs of interacting sites, $Y$ is my notation for the entire state of the sites (i.e. a given $Y$ specifies $y_i$ for all $i$).  Note the minus sign.  One might be inclined to write $H(Y)=\vec{y}^T W \vec{y}$
The partition function is given by $Z=\sum_{Y} e^{-\beta H(Y)}$; yet another minus sign.
The probability that you'll see the physical system in the state $Y$  is given by
$$ 
P(Y) = \frac{ e^{-\beta H(Y)}}{Z} = \frac{ e^{\beta \sum_{<ij>} J_{ij} y_i y_j} } {Z} = \frac{e^{-\beta  \vec{y}^T W \vec{y}}}{Z}
$$
I left $\beta=1/k_BT$ in these expressions since these are the expressions typically written by physicists, but in this problem, one can just absorb it into the definition of the $J_{ij}$ (or equivalently set $\beta=1$).
The main point is that when dealing with statistical mechanics physicists are use to dealing with "energies" which have the property that lower (more negative) energy states are more likely to be occupied.  This is in the opposite sense from log-likelihoods (higher log-likelihoods are associated with more probable outcomes), and can lead to confusion when one tries to switch back and forth between these two conceptions.
