|
|
Line 1: |
Line 1: |
| A '''Hopfield network''' is a form of [[Recurrent neural network|recurrent]] [[artificial neural network]] invented by [[John Hopfield]] in 1982. Hopfield nets serve as [[content-addressable memory]] systems with [[Binary numeral system|binary]] threshold [[Artificial neuron|nodes]]. They are guaranteed to converge to a [[local minimum]], but convergence to a false pattern (wrong local minimum) rather than the stored pattern (expected local minimum) can occur. Hopfield networks also provide a model for understanding human memory.
| | Nice to meet you, I am Marvella Shryock. In her professional life she is a payroll clerk but she's always wanted her own business. He is really fond of doing ceramics but he is having difficulties to discover time for it. Puerto Rico is exactly where he and his spouse reside.<br><br>Here is my blog post: home std test ([http://www.gaysphere.net/blog/167593 just click the following webpage]) |
| | |
| ==Structure==
| |
| [[Image:Hopfield-net.png|thumb|A Hopfield net with four nodes.]]
| |
| 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 normally have units that take on values of 1 or -1, and this convention will be used throughout the article. However, other literature might use units that take values of 0 and 1.
| |
| | |
| Every pair of units ''i'' and ''j'' in a Hopfield network have a connection that is described by the connectivity weight <math> w_{ij} </math>. In this sense, the Hopfield network can be formally described as a complete undirected graph <math> G = <V, f> </math>, where <math>V</math> is a set of [[Artificial neuron|McCulloch-Pitts neurons]] and <math>f:V^2 \rightarrow R</math> is a function that links pairs of nodes to a real value, the connectivity weight.
| |
| | |
| 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_{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 behavior is confined to relatively small parts of the phase space, and does not impair the network's ability to act as a content-addressable associative memory system.
| |
| | |
| ==Updating==
| |
| | |
| Updating one unit (node in the graph simulating the artificial neuron) in the Hopfield network is performed using the following rule:
| |
| | |
| <math>s_i \leftarrow \left\{\begin{array}{ll} '1' & \mbox {if }\sum_{j}{w_{ij}s_j}\geq\theta_i, \\
| |
| '-1' & \mbox {otherwise.}\end{array}\right.</math>
| |
| | |
| where:
| |
| * <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>\theta_i</math> is the threshold of unit i.
| |
| | |
| Updates in the Hopfield network can be performed in two different ways:
| |
| * '''Asynchronous''': Only one unit is updated at a time. This unit can be picked at random, or a pre-defined order can be imposed from the very beginning.
| |
| * '''Synchronous''': All units are updated at the same time. This requires a central clock to the system in order to maintain synchronization. This method is less realistic, since biological or physical systems lack a global clock that keeps track of time.
| |
| | |
| ===Neurons attract or repel each other===
| |
| The weight between two units has a powerful impact upon the values of the neurons. Consider the connection weight <math>w_{ij}</math> between two neurons i and j. If <math>w_{ij} > 0 </math>, the updating rule implies that:
| |
| * when <math>s_{j} = 1</math>, the contribution of j in the weighted sum is positive. Thus, <math>s_{i}</math> is pulled by j towards its value <math>s_{j} = 1</math>
| |
| * when <math>s_{j} = -1</math>, the contribution of j in the weighted sum is negative. Then again, <math>s_{i}</math> is pulled by j towards its value <math>s_{j} = -1</math>
| |
| | |
| Thus, the values of neurons i and j will converge if the weight between them is positive. Similarly, they will diverge if the weight is negative.
| |
| | |
| ==Energy==
| |
| | |
| [[File:Energy landscape.png|thumb|right|500px|Energy Landscape of a Hopfield Network, highlighting the current state of the network (up the hill), an attractor state to which it will eventually converge, a minimum energy level and a basin of attraction shaded in green. Note how the update of the Hopfield Network is always going down in Energy.]]
| |
| | |
| Hopfield nets have a scalar value associated with each state of the network referred to as the "energy", E, of the network, where:
| |
| :<math>E = -\frac12\sum_{i,j}{w_{ij}{s_i}{s_j}}+\sum_i{\theta_i\ s_i}</math>
| |
| | |
| This value is called the "energy" because the definition ensures that when units are randomly chosen to update, the energy E will either lower in value or stay the same. Furthermore, under repeated updating the network will eventually converge to a state which is a [[local minimum]] 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. Note that this energy function belongs to a general class of models in [[physics]], under the name of [[Ising model]]s; these in turn are a special case of [[Markov networks]], since the associated [[probability measure]], the [[Gibbs measure]], has the [[Markov property]].
| |
| | |
| ==Initialization and Running==
| |
| | |
| Initialization of the Hopfield Networks is done by setting the values of the units to the desired start pattern. Repeated updates are then performed until the network converges to an attractor pattern. In the context of Hopfield Networks, an attractor pattern is a pattern that cannot change any value within it under updating.
| |
| | |
| ==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. The net can be used to recover from a distorted input to the trained state that is most similar to that input. This is called associative memory because it recovers memories on the basis of similarity. 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.
| |
| | |
| ===Learning Rules===
| |
| There are various different learning rules that can be used to store information in the memory of the Hopfield Network. It is desirable for a learning rule to have both of the following two properties:
| |
| * ''Local'': A learning rule is ''local'' if each weight is updated using information available to neurons on either side of the connection that is associated with that particular weight.
| |
| * ''Incremental'': New patterns can be learned without using information from the old patterns that have been also used for training. That is, when a new pattern is used for training, the new values for the weights only depend on the old values and on the new pattern.<ref name="storkey1991basins" />
| |
| | |
| These properties are desirable, since a learning rule satisfying them is more biologically plausible. For example, since the human brain is always learning new concepts, one can reason that human learning is incremental. A learning system that would not be incremental would generally be trained only once, with a huge batch of training data.
| |
| | |
| ===Hebbian Learning Rule for Hopfield Networks===
| |
| The [[Hebbian theory|Hebbian Theory]] was introduced by Donald Hebb in 1949, in order to explain "associative learning", in which simultaneous activation of neuron cells leads to pronounced increases in synaptic strength between those cells.<ref>Hebb, Donald Olding. The organization of behavior: A neuropsychological theory. Lawrence Erlbaum, 2002.</ref> It is often summarized as "Neurons that fire together, wire together. Neurons that fire out of sync, fail to link".
| |
| | |
| The Hebbian rule is both local and incremental. For the Hopfield Networks, it is implemented in the following manner, when learning <math>n</math>
| |
| binary patterns:
| |
| | |
| <math> w_{ij}=\frac{1}{n}\sum_{\mu=1}^{n}\epsilon_{i}^\mu \epsilon_{j}^\mu </math>
| |
| | |
| where <math>\epsilon_i^\mu</math> represents bit i from pattern <math>\mu</math>. | |
| | |
| If the bits corresponding to neurons i and j are equal in pattern <math>\mu</math>, then the product <math> \epsilon_{i}^\mu \epsilon_{j}^\mu </math> will be positive. This would, in turn, have a positive effect on the weight <math>w_{ij} </math> and the values of i and j will tend to become equal. The opposite happens if the bits corresponding to neurons i and j are different.
| |
| | |
| ===The Storkey Learning Rule===
| |
| This rule was introduced by Amos Storkey in 1997 and is both local and incremental. Storkey also showed that a Hopfield network trained using this rule has a greater capacity than a corresponding network trained using the Hebbian rule.<ref name="storkey1997">Storkey, Amos. "Increasing the capacity of a Hopfield network without sacrificing functionality." Artificial Neural Networks—ICANN'97 (1997): 451-456.</ref> The weight matrix of an attractor neural network is said to follow the Storkey learning rule if it obeys:
| |
| | |
| <math> w_{ij}^{\nu} = w_{ij}^{\nu-1}
| |
| +\frac{1}{n}\epsilon_{i}^{\nu} \epsilon_{j}^{\nu}
| |
| -\frac{1}{n}\epsilon_{i}^{\nu} h_{ji}^{\nu}
| |
| -\frac{1}{n}\epsilon_{j}^{\nu} h_{ij}^{\nu}
| |
| </math>
| |
| | |
| where <math> h_{ji}^{\nu} = \sum_{k=1,k\neq j}^{n} w_{ik}^{\nu-1}\epsilon_{k}^{\nu} </math> is a form of ''local field'' <ref name="storkey1991basins">Storkey, Amos J., and Romain Valabregue. "The basins of attraction of a new Hopfield learning rule." Neural Networks 12.6 (1999): 869-876.</ref> at neuron i.
| |
|
| |
| This learning rule is local, since the synapses take into account only neurons at their sides. The rule makes use of more information from the patterns and weights than the generalized Hebbian rule, due to the effect of the local field.
| |
| | |
| ==Spurious Patterns==
| |
| Patterns that the network uses for training, called ''retrieval states'', become attractors of the system. Repeated updates would eventually lead to convergence to one of the retrieval states. However, sometimes the network will converge to spurious patterns, that are different from the training patterns.<ref name="hertz1991neural">Hertz, John A., Anders S. Krogh, and Richard G. Palmer. Introduction to the theory of neural computation. Vol. 1. Westview press, 1991.</ref> The energy in these spurious patterns is also a local minima. For each stored pattern x, the negation -x is also a spurious pattern.
| |
| | |
| A spurious state can also be a linear combination of an odd number of retrieval states. For example, when using 3 patterns <math> \mu_1, \mu_2, \mu_3</math>, one can get the following spurious state:
| |
| | |
| <math> \epsilon_{i}^{mix} = \pm sgn(\pm \epsilon_{i}^{\mu_{1}}
| |
| \pm \epsilon_{i}^{\mu_{2}}
| |
| \pm \epsilon_{i}^{\mu_{3}})
| |
| </math>
| |
| | |
| Spurious patterns that have an even number of states cannot exist, since they might sum up to zero <ref name="hertz1991neural" />
| |
| | |
| ==Capacity==
| |
| | |
| The Network capacity of the Hopfield network model is determined by neuron amounts and connections within a given network. Therefore, the number of memories that are able to be stored are dependent on neurons and connections. Furthermore, it was shown that the recall accuracy between vectors and nodes was .138 (approximately 138 vectors can be recalled from storage for every 1000 nodes) (Hertz et al., 1991). Therefore, it is evident that many mistakes will occur if you try to store a large number of vectors. When the Hopfield model does not recall the right pattern, it is possible that an intrusion has taken place, since semantically related items tend to confuse the individual, and recollection of the wrong pattern occurs. Therefore, the Hopfield network model is shown to confuse one stored item with that of another upon retrieval. Perfect recalls and high capacity, >0.14, can be loaded in the network by Hebbian learning method.<ref>{{cite journal | last=Liou | first=C.-Y. | last2=Lin | first2=S.-L. | title=Finite memory loading in hairy neurons |journal=Natural Computing |volume=5 |issue=1 |pages=15–42 |year=2006 |doi=10.1007/s11047-004-5490-x |url=http://link.springer.com/content/pdf/10.1007/s11047-004-5490-x.pdf}}</ref><ref>{{cite journal | last=Liou | first=C.-Y. | last2=Yuan | first2=S.-K. | title=Error Tolerant Associative Memory |journal=Biological Cybernetics |volume=81 | pages=331–342 |year=1999 |doi=10.1007/s004220050566 |url=http://link.springer.com/content/pdf/10.1007/s004220050566.pdf}}</ref>
| |
| | |
| ==Human memory==
| |
| The Hopfield model accounts for [[associative memory]] through the incorporation of memory vectors. Memory vectors can be slightly used, and this would spark the retrieval of the most similar vector in the network. However, we will find out that due to this process, intrusions can occur. In associative memory for the Hopfield network, there are two types of operations: auto-association and hetero-association. The first being when a vector is associated with itself, and the latter being when two different vectors are associated in storage. Furthermore, both types of operations are possible to store within a single memory matrix, but only if that given representation matrix is not one or the other of the operations, but rather the combination (auto-associative and hetero-associative) of the two. It is important to note that Hopfield’s network model utilizes the same learning rule as [[Hebbian theory|Hebb’s (1949) learning rule]], which basically tried to show that learning occurs as a result of the strengthening of the weights by when activity is occurring.
| |
| | |
| Rizzuto and Kahana (2001) were able to show that the neural network model can account for repetition on recall accuracy by incorporating a probabilistic-learning algorithm. During the retrieval process, no learning occurs. As a result, the weights of the network remains fixed, showing that the model is able to switch from a learning stage to a recall stage. By adding contextual drift we are able to show the rapid forgetting that occurs in a Hopfield model during a cued-recall task. The entire network contributes to the change in the activation of any single node.
| |
| | |
| McCullough and Pitts (1943), dynamical rule, which describes the behavior of neurons, does so in a way that shows how the activations of multiple neurons map onto the activation of a new neuron’s firing rate, and how the weights of the neurons strengthen the synaptic connections between the new activated neuron (and those that activated it). Hopfield would use McCullough-Pitts's dynamical rule in order to show how retrieval is possible in the Hopfield network. However, it is important to note that Hopfield would do so in a repetitious fashion. Hopfield would use a nonlinear activation function, instead of using a linear function. This would therefore create the Hopfield dynamical rule and with this, Hopfield was able to show that with the nonlinear activation function, the dynamical rule will always modify the values of the state vector in the direction of one of the stored patterns.
| |
| | |
| ==See also==
| |
| * [[Associative memory]]
| |
| * [[Autoassociative memory]]
| |
| * [[Boltzmann machine]] — like a Hopfield net but uses annealed Gibbs sampling instead of gradient descent
| |
| * [[Cognitive model#Associative Memory|Dynamical systems model of cognition]]
| |
| * [[Ising model]]
| |
| * [[Hebbian theory]]
| |
| | |
| ==References==
| |
| {{Reflist}}
| |
| | |
| {{Refbegin}}
| |
| * J. J. Hopfield, "Neural networks and physical systems with emergent collective computational abilities", ''Proceedings of the National Academy of Sciences of the USA'', vol. 79 no. 8 pp. 2554–2558, April 1982.
| |
| | |
| * Hebb, D.O. (1949). Organization of behavior. New York: Wiley
| |
| | |
| * Hertz, J., Krogh, A., & Palmer, R.G. (1991). Introduction to the theory of neural computation. Redwood City, CA: Addison-Wesley.
| |
| | |
| * McCullough, W.S., & Pitts, W.H. (1943). A logical calculus of the ideas immanent in nervous activity. Bulletin of Mathematical Biophysics,5, 115-133
| |
| | |
| * Polyn, S.M., & Kahana, M.J. (2008). Memory search and the neural representation of context. Trends in Cognitive Sciences, 12, 24-30.
| |
| | |
| * Rizzuto, D.S., & Kahana, M.J. (2001). An autoassociative neural network model of paired-associate learning. Neural Computation, 13, 2075-2092.
| |
| | |
| * Kruse, Borgelt, Klawonn, Moewes, Russ, Steinbrecher (2011). Computational Intelligence.
| |
| | |
| {{Refend}}
| |
| | |
| == External links ==
| |
| {{commons|Hopfield net}}
| |
| * Chapter 13 [http://page.mi.fu-berlin.de/rojas/neural/chapter/K13.pdf The Hopfield model] of [http://page.mi.fu-berlin.de/rojas/neural/index.html.html ''Neural Networks - A Systematic Introduction''] by Raul Rojas (ISBN 978-3-540-60505-8)
| |
| *[http://www.heatonresearch.com/articles/61/page1.html Hopfield Neural Network Applet]
| |
| *[http://ai4r.org Hopfield Neural Network implementation in Ruby (AI4R)]
| |
| *[http://to-campos.planetaclix.pt/neural/hope.html The Travelling Salesman Problem] - Hopfield Neural Network JAVA Applet
| |
| *[http://www.scholarpedia.org/article/Hopfield_network scholarpedia.org- Hopfield network] - Article on Hopfield Networks by John Hopfield
| |
| *[http://www.tristanfletcher.co.uk/DLVHopfield.pdf Hopfield Network Learning Using Deterministic Latent Variables] - Tutorial by Tristan Fletcher
| |
| *[http://gna.org/projects/neurallab/ Neural Lab Graphical Interface] - Hopfield Neural Network graphical interface (Python & gtk)
| |
| | |
| {{Stochastic processes}}
| |
| | |
| [[Category:Neural networks]]
| |