= Solution
A standard binary <Hopfield network> contains $M$ recurrently connected units with activities $x_i\in\{-1,+1\}$. Choose symmetric weights $w_{ij}=w_{ji}$, omit self-couplings by setting $w_{ii}=0$, and use zero thresholds for the energy in the next part. To store desired binary patterns $\xi^\mu$, a simple choice is <Hebbian memory weights for a Hopfield network>:
$$
\boxed{w_{ij}=\frac1M\sum_{\mu=1}^P\xi_i^\mu\xi_j^\mu\quad(i\ne j),\qquad w_{ii}=0.}
$$
Correlated activity strengthens connections between units agreeing across the training patterns and makes disagreement contribute negatively. This creates attraction toward the stored configurations when cross-talk is sufficiently small. For one stored pattern, its local field is $(M-1)\xi_i/M$, so every bit is stable for $M>1$. With multiple patterns, the other patterns add cross-talk; the rule does not guarantee exact retrieval for an arbitrary collection.
Start retrieval from a partial or corrupted cue and update one unit at a time using its current field
$$
h_i=\sum_{j\ne i}w_{ij}x_j,\qquad
x_i' =\begin{cases}+1,&h_i>0,\\-1,&h_i<0,\\x_i,&h_i=0.\end{cases}
$$
A cyclic or random fair asynchronous schedule lets the network relax toward a fixed point, completing a memory when the cue lies in its basin. This is content-addressable retrieval: the initial pattern selects the memory without an explicit address. Nonzero thresholds can be included in a more general model, but their corresponding linear terms must then be included in the energy.
Back to article page