Jump to content

Hopfield network: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Corvi42 (talk | contribs)
Structure: connections do not need to be symmetric - see discussion
Corvi42 (talk | contribs)
Structure: correction on symmetric weights
Line 4: Line 4:
The units in Hopfield nets are binary threshold units, i.e. the units only take on two different values for their states and the value is determined by whether or not the units' input exceeds their threshold. Hopfield nets can either have units that take on values of 1 or -1, or units that take on values of 1 or 0. So, the two possible definitions for unit ''i'''s activation, <math>a_i</math>, are:
The units in Hopfield nets are binary threshold units, i.e. the units only take on two different values for their states and the value is determined by whether or not the units' input exceeds their threshold. Hopfield nets can either have units that take on values of 1 or -1, or units that take on values of 1 or 0. So, the two possible definitions for unit ''i'''s activation, <math>a_i</math>, are:


(1) <math>a_i = \left\{\begin{matrix} 1 & \mbox {if }\sum_{j}{w_{ij}s_j}>\theta_i, \\
(1) <math>a_i \leftarrow \left\{\begin{matrix} 1 & \mbox {if }\sum_{j}{w_{ij}s_j}>\theta_i, \\
-1 & \mbox {otherwise.}\end{matrix}\right.</math>
-1 & \mbox {otherwise.}\end{matrix}\right.</math>


(2) <math>a_i = \left\{\begin{matrix} 1 & \mbox {if }\sum_{j}{w_{ij}s_j}>\theta_i, \\
(2) <math>a_i \leftarrow \left\{\begin{matrix} 1 & \mbox {if }\sum_{j}{w_{ij}s_j}>\theta_i, \\
0 & \mbox {otherwise.}\end{matrix}\right.</math>
0 & \mbox {otherwise.}\end{matrix}\right.</math>


Where:
Where:
* <math>w_{ij}</math> is the connection weight from unit j to unit i.
* <math>w_{ij}</math> is the strength of the connection weight from unit j to unit i (the weight of the connection).
* <math>s_j</math> is the state of unit j.
* <math>s_j</math> is the state of unit j.
* <math>\theta_i</math> is the [[threshold]] of unit i.
* <math>\theta_i</math> is the [[threshold]] of unit i.


The connections in a Hopfield net have the following restriction:
The connections in a Hopfield net typically have the following restrictions:
* <math>w_{ii}=0, \forall i</math>. (No unit has a connection with itself.)
* <math>w_{ii}=0, \forall i</math> (no unit has a connection with itself)
* <math>w_{ij} = w_{ji} \forall i,j</math> (connections are symmetric)

The requirement that weights be symmetric is typically used, as it will guarantee that the energy function decreases monotonically while following the activation
rules, and the network may exhibit some periodic or chaotic behaviour if non-symmetric weights are used. However, Hopfield found that this chaotic behaviour was confined
to relatively small parts of the phase space, and did not impare the network's abilities to act as a content-addressable associative memory system.


Hopfield nets have a scalar value associated with each state of the network referred to as the "energy", E, of the network, where:
Hopfield nets have a scalar value associated with each state of the network referred to as the "energy", E, of the network, where:

Revision as of 17:33, 24 April 2006

A Hopfield net is a form of recurrent artificial neural network invented by John Hopfield. Hopfield nets serve as content-addressable memory systems with binary threshold units. They are guaranteed to converge to a stable state.

Structure

The units in Hopfield nets are binary threshold units, i.e. the units only take on two different values for their states and the value is determined by whether or not the units' input exceeds their threshold. Hopfield nets can either have units that take on values of 1 or -1, or units that take on values of 1 or 0. So, the two possible definitions for unit i's activation, , are:

(1)

(2)

Where:

  • is the strength of the connection weight from unit j to unit i (the weight of the connection).
  • is the state of unit j.
  • is the threshold of unit i.

The connections in a Hopfield net typically have the following restrictions:

  • (no unit has a connection with itself)
  • (connections are symmetric)

The requirement that weights be symmetric is typically used, as it will guarantee that the energy function decreases monotonically while following the activation rules, and the network may exhibit some periodic or chaotic behaviour if non-symmetric weights are used. However, Hopfield found that this chaotic behaviour was confined to relatively small parts of the phase space, and did not impare the network's abilities to act as a content-addressable associative memory system.

Hopfield nets have a scalar value associated with each state of the network referred to as the "energy", E, of the network, where:

This value is called the "energy" because the definition ensures that if units are randomly chosen to update their activations the network will converge to states which are local minima in the energy function (which is considered to be a Lyapunov function). Thus, if a state is a local minimum in the energy function it is a stable state for the network.

Training

Training a Hopfield net involves lowering the energy of states that the net should "remember". This allows the net to serve as a content addressable memory system, that is to say, the network will converge to a "remembered" state if it is given only part of the state. For example, if we train a Hopfield net with five units so that the state (1, 0, 1, 0, 1) is an energy minimum, and we give the network the state (1, 0, 0, 0, 1) it will converge to (1, 0, 1, 0, 1). Thus, the network is properly trained when the energy of states which the network should remember are local minima.

References

J. J. Hopfield, "Neural networks and physical systems with emergent collective computational abilities", Proceedings of National Academy of Sciences, vol. 79 no. 8 pp. 2554–2558, April 1982. PNAS Reprint (Abstract) PNAS Reprint (PDF)

See also