Hopfield Network
A Hopfield network is a fully connected Ising model with a symmetric
weight matrix,
Hopfield networks can be used as an associative memory, or content addressable memory.
Suppose we train on a set of fully observed bit vectors, corresponding to patterns we want to memorize. At test time, we present a partial pattern to the network. We would like to estimate the missing variables; this is called pattern completion.
Since exact inference is intractable in this model, it is standard to use a coordinate descent algorithm known as iterative conditional modes (ICM), which just sets each node to its most likely (lowest energy) state, given all its neighbours. The full conditional can be shown to be:
Picking the most probable state amounts to using the rule
Boltzmann machines generalize the Hopfield/Ising model by including some hidden nodes, which makes the model representationally more powerful. Inference in such models often uses Gibbs sampling, which is a stochastic version of ICM.
Binary Hopfield network
Our convention in general will be that
A Hopfield network consists of
a Hopfield network’s activity rule is for each neuron to update its state as if it were a single neuron with the threshold activation function:
Since there is feedback in a Hopfield network (every neurons’ output is an input to all other neurons), we will have to specify an order for the updates to occur. These updates may be synchronous or asynchronous.
For synchronous updates, all neurons compute their activations:
and update their states simultaneously to
For asynchronous updates, one neuron at a time computes its activations and updates its state. The sequence of updates may be a fixed or random sequence.
The learning rule is intended to make a set of desired memories
The Hebb’s rule of learning corresponds to the sum of outer products:
where