Consider the way we are able to retrieve a pattern from a partial key as in Figure 10 1.

Similar documents
Hopfield Neural Network

Artificial Intelligence Hopfield Networks

Lecture 7 Artificial neural networks: Supervised learning

In biological terms, memory refers to the ability of neural systems to store activity patterns and later recall them when required.

Associative Memory : Soft Computing Course Lecture 21 24, notes, slides RC Chakraborty, Aug.

Hopfield Neural Network and Associative Memory. Typical Myelinated Vertebrate Motoneuron (Wikipedia) Topic 3 Polymers and Neurons Lecture 5

Storage Capacity of Letter Recognition in Hopfield Networks

Chapter 10 Associative Memory Networks We are in for a surprise though!

Using Variable Threshold to Increase Capacity in a Feedback Neural Network

CHAPTER 3. Pattern Association. Neural Networks

7 Recurrent Networks of Threshold (Binary) Neurons: Basis for Associative Memory

7 Rate-Based Recurrent Networks of Threshold Neurons: Basis for Associative Memory

A. The Hopfield Network. III. Recurrent Neural Networks. Typical Artificial Neuron. Typical Artificial Neuron. Hopfield Network.

A. The Hopfield Network. III. Recurrent Neural Networks. Typical Artificial Neuron. Typical Artificial Neuron. Hopfield Network.

Introduction to Computational Neuroscience

Memories Associated with Single Neurons and Proximity Matrices

Hopfield Network for Associative Memory

Introduction to Neural Networks

Computational Intelligence Lecture 6: Associative Memory

Artificial Neural Network and Fuzzy Logic

Marr's Theory of the Hippocampus: Part I

1. A discrete-time recurrent network is described by the following equation: y(n + 1) = A y(n) + B x(n)

Neural Network Essentials 1

Other examples of neurons can be found in:

2- AUTOASSOCIATIVE NET - The feedforward autoassociative net considered in this section is a special case of the heteroassociative net.

CSE 5526: Introduction to Neural Networks Hopfield Network for Associative Memory

Hopfield Networks. (Excerpt from a Basic Course at IK 2008) Herbert Jaeger. Jacobs University Bremen

How can ideas from quantum computing improve or speed up neuromorphic models of computation?

Introduction to Artificial Neural Networks

Artificial Neural Networks Examination, March 2004

Neural Networks Introduction

Terminal attractor optical associative memory with adaptive control parameter

Convolutional Associative Memory: FIR Filter Model of Synapse

Properties of Associative Memory Model with the β-th-order Synaptic Decay

Associative Memories (I) Hopfield Networks

Pattern Association or Associative Networks. Jugal Kalita University of Colorado at Colorado Springs

Neuro-Fuzzy Comp. Ch. 4 June 1, 2005

Hopfield networks. Lluís A. Belanche Soft Computing Research Group

Learning and Memory in Neural Networks

An Introductory Course in Computational Neuroscience

Associative Neural Networks using Matlab

Neural Networks and Fuzzy Logic Rajendra Dept.of CSE ASCET

( ) T. Reading. Lecture 22. Definition of Covariance. Imprinting Multiple Patterns. Characteristics of Hopfield Memory

Neuro-Fuzzy Comp. Ch. 4 March 24, R p

Simple neuron model Components of simple neuron

SCRAM: Statistically Converging Recurrent Associative Memory

Neuro-Fuzzy Comp. Ch. 1 March 24, 2005

Neural Nets and Symbolic Reasoning Hopfield Networks

Hopfield Network Recurrent Netorks

Artificial Neural Networks Examination, June 2004

Neural Networks. Mark van Rossum. January 15, School of Informatics, University of Edinburgh 1 / 28

Iterative Autoassociative Net: Bidirectional Associative Memory

Sample Exam COMP 9444 NEURAL NETWORKS Solutions

On the Hopfield algorithm. Foundations and examples

Slide10 Haykin Chapter 14: Neurodynamics (3rd Ed. Chapter 13)

Learning in Multidimensional Spaces Neural Networks. Matrix Formulation

Artificial Neural Networks Examination, June 2005

Neural networks: Associative memory

Lecture 4: Feed Forward Neural Networks

COMP9444 Neural Networks and Deep Learning 11. Boltzmann Machines. COMP9444 c Alan Blair, 2017

REAL-TIME COMPUTING WITHOUT STABLE

Neuro-Fuzzy Computing

A thesis submitted to the. School of Computing. in conformity with the requirements for. the degree of Master of Science. Queen s University

HOPFIELD MODEL OF NEURAL NETWORK

Neural Nets in PR. Pattern Recognition XII. Michal Haindl. Outline. Neural Nets in PR 2

Memory capacity of networks with stochastic binary synapses

Computational Neuroscience. Structure Dynamics Implementation Algorithm Computation - Function

Several ways to solve the MSO problem

Associative content-addressable networks with exponentially many robust stable states

CN2 1: Introduction. Paul Gribble. Sep 10,

Week 4: Hopfield Network

Application of hopfield network in improvement of fingerprint recognition process Mahmoud Alborzi 1, Abbas Toloie- Eshlaghy 1 and Dena Bazazian 2

Logic Learning in Hopfield Networks

A MEAN FIELD THEORY OF LAYER IV OF VISUAL CORTEX AND ITS APPLICATION TO ARTIFICIAL NEURAL NETWORKS*

Fundamentals of Neural Networks

Data Mining Part 5. Prediction

Learning Vector Quantization

9 Competitive Neural Networks

Lecture 5: Recurrent Neural Networks

Temporal Backpropagation for FIR Neural Networks

1 Introduction Tasks like voice or face recognition are quite dicult to realize with conventional computer systems, even for the most powerful of them

Information storage capacity of incompletely connected associative memories

Slide02 Haykin Chapter 2: Learning Processes

Neural networks: Unsupervised learning

arxiv:quant-ph/ v1 17 Oct 1995

Dynamics of Ordinary and Recurrent Hopfield Networks: Novel Themes

Feedforward Neural Nets and Backpropagation

Classification of Ordinal Data Using Neural Networks

Learning Vector Quantization (LVQ)

Recurrent Neural Networks

Neural Networks. Prof. Dr. Rudolf Kruse. Computational Intelligence Group Faculty for Computer Science

Unit III. A Survey of Neural Network Model

Integer weight training by differential evolution algorithms

Plan. Perceptron Linear discriminant. Associative memories Hopfield networks Chaotic networks. Multilayer perceptron Backpropagation

Short Term Memory and Pattern Matching with Simple Echo State Networks

Neural Networks Lecture 6: Associative Memory II

Machine Learning. Neural Networks

ASYMPTOTICALLY STABLE MULTI-VALUED MANY-TO-MANY ASSOCIATIVE MEMORY NEURAL NETWORK AND ITS APPLICATION IN IMAGE RETRIEVAL

Content-Addressable Memory Associative Memory Lernmatrix Association Heteroassociation Learning Retrieval Reliability of the answer

Definition 2.1. Let w be a word. Then the coset C + w of w is the set {c + w : c C}.

Transcription:

CompNeuroSci Ch 10 September 8, 2004 10 Associative Memory Networks 101 Introductory concepts Consider the way we are able to retrieve a pattern from a partial key as in Figure 10 1 Figure 10 1: A key (left) and a complete retrieved pattern (right) Imagine a question what is it in relation to the right image The hood of the Volkswagen is the key to our associative memory neural network and the stored representation of the whole Volkswagen can be thought of as an network attractor for all similar keys The key starts a retrieval process which ends in an attractor which contained both the whole car and its name (maybe you go only for the name since the question is what is it ) AP Papliński, L Gustafsson 10 1

CompNeuroSci Ch 10 September 8, 2004 Storing a memory like the shape of a Volkswagen in an associative memory network and retrieving it, starting with a key, ie an incomplete version of the stored memory is the topic of this chapter There are two fundamental types of the associate memory networks: Feedforward associative memory networks in which retrieval of a stored memory is a one-step procedure Recurrent associative memory networks in which retrieval of a stored memory is a multi-step relaxation procedure Recurrent binary associative memory networks are often referred to as the Hopfield networks For simplicity we will be working mainly with binary patterns, each element of the pattern having values { 1, +1} ξ M = 2 4 6 8 10 Example of a simple binary pattern 2 4 6 8 = 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ; ξ = AP Papliński, L Gustafsson 10 2 1 1 +1 +1 1 1 +1 1

CompNeuroSci Ch 10 September 8, 2004 1011 Encoding and decoding single memories The concept of creating a memory in a neural network, that is, memorizing a pattern in synaptic weights and its subsequent retrieval is based on the read-out property of the outer product of two vectors that we have studied earlier Assume that we have a pair of column vectors: p-component vector ξ representing the input pattern m-component vector q representing the desired output association with the input pattern The pair { ξ, q } to be stored is called a fundamental memory Encoding a single memory We store or encode this pair in a matrix W which is calculated as an outer product (column row) of these two vectors W = q ξ T (101) Decoding a single memory The retrieval or decoding of the store pattern is based on application of the input pattern x to the weight matrix W The result can be calculated as follows: y = W ξ = q ξ T ξ = ξ q (102) The equation says that the decoded vector y for a given input pattern ξ is proportional to the encoded vector q, the length of the input pattern ξ being the proportionality constant AP Papliński, L Gustafsson 10 3

CompNeuroSci Ch 10 September 8, 2004 1012 Feedforward Associative Memory The above considerations give rise to a simple feed-forward associative memory known also as the linear associator It is a well-known single layer feed-forward network with m neurons each with p synapses as illustrated in Figure 10 2 afferent signals x = [ x 1 x 2 xp ] T matrix W = weight w1: w2: wm: w 11 w 12 w 1p w 21 w 22 w 2p w m1 w m2 wmp v 1 v 2 vm y1 y2 ym efferent signals x p W m y Figure 10 2: The structure of a feed-forward linear associator: y = (W x) For such a simple network to work as an associative memory, the input/output signal are binary signals with {0, 1} being mapped to { 1, +1} During the encoding phase the fundamental memories are stored (being encoded) in the weight matrix W During the decoding or retrieval phase for a given input vector x which is the key to the memory a specific output vector y is decoded AP Papliński, L Gustafsson 10 4

CompNeuroSci Ch 10 September 8, 2004 1013 Encoding multiple memories Extending the introductory concepts let us assume that we would like to store/encode N pairs of column vectors (fundamental memories) arranged in the two matrices: Ξ = ξ(1) ξ(n) a matrix of p-component vectors representing the desired input patterns Q = q(1) q(n) a matrix of m-component vectors representing the desired output associations with the input patterns In order to encode the {Ξ, Q} patterns we sum outer products of all pattern pairs: N W = 1 q(n) ξ T (n) = 1 N n=1 N Q ΞT (103) The sum of the outer products can be conveniently replaced by product of two matrices consisting of the pattern vectors The resulting m p matrix W encodes all the desired N pattern pairs x(n), q(n) Note that eqn (103) can be seen as an extension of the Hebb s learning law in which we multiply afferent and efferent signals to form the synaptic weights AP Papliński, L Gustafsson 10 5

CompNeuroSci Ch 10 September 8, 2004 1014 Decoding operation Retrieval of a pattern is equally simple and involves acting with the weight matrix on the input pattern (the key) y = (W x) (104) where the function is the sign function: It is expected that 1 x = ξ y j = (v j ) = +1 if v j 0 1 otherwise If the key (input vector) x is equal to one of the fundamental memory vectors ξ, then the decoded pattern y will be equal to the stored/encoded pattern q for the related fundamental memory 2 x = ξ + n (105) If the key (input vector) x can be considered as one of the fundamental memory vectors ξ, corrupted by noise n then the decoded pattern y will be also equal to the stored/encoded pattern q for the related fundamental memory 3 x ξ + n If the key (input vector) x is definitely different to any of the fundamental memory vectors ξ, then the decoded pattern y is a spurious pattern AP Papliński, L Gustafsson 10 6

CompNeuroSci Ch 10 September 8, 2004 The above expectations are difficult to satisfy in a feedforward associative memory network if the number of stored patterns N is more than a fraction of m and p It means that the memory capacity of the feedforward associative memory network is low relative to the dimension of the weight matrix W In general, associative memories also known as content-addressable memories (CAM) are divided in two groups: Auto-associative: In this case the desired patterns Ξ are identical to the input patterns X, that is, Q = Ξ Also p = m Eqn (103) describing encoding of the fundamental memories can be now written as: W = 1 N N n=1 ξ(n) ξ T (n) = 1 N Ξ ΞT (106) Such a matrix W is also known as the auto-correlation matrix Hetero-associative: In this case the input Ξ and stored patterns Q and are different AP Papliński, L Gustafsson 10 7

CompNeuroSci Ch 10 September 8, 2004 1015 Numerical examples Assume that a fundamental memory (a pattern to be encoded) is ξ = [ 1 1 1 1 1 1 ] T The weight matrix that encodes the memory is: W = ξ ξ T = 1 1 1 1 1 1 [ 1 1 1 1 1 1 ] = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Let us use the following two keys to retrieve the stored pattern: W X = W [x(1) x(2)] = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 = 6 2 6 2 6 2 6 2 6 2 6 2 AP Papliński, L Gustafsson 10 8

CompNeuroSci Ch 10 September 8, 2004 Y = [y(1) y(2)] = (W X) = ( 6 2 6 2 6 2 6 2 6 2 6 2 ) = The first key, x(1), is identical to the encoded fundamental memory, but the other, x(2), is different from ξ in two positions However, in both cases the retrieved vectors y(1), y(2) are equal to ξ 1 1 1 1 1 1 1 1 1 1 1 1 = [ ξ ξ ] Recurrent associative memory The capacity of the feedforward associative memory is relatively low, a fraction of the number of neurons When we encode many patterns often the retrieval results in a corrupted version of the fundamental memory However, if we use again the corrupted pattern as a key, the next retrieved pattern is usually closer to the fundamental memory This feature is exploited in the recurrent associative memory networks AP Papliński, L Gustafsson 10 9

CompNeuroSci Ch 10 September 8, 2004 102 Recurrent Associative Memory Discrete Hopfield networks 1021 Structure D D D x 1 x 2 w 11 w 12 w 21 w 22 w 1m w 2m v 1 v2 y1 y2 x δ(k) m W m x m w m1 w m2 w mm v m ym y(k) D y(k+1) Figure 10 3: A dendritic and block diagram of a recurrent associative memory A recurrent network is built in such a way that the output signals are fed back to become the network inputs at the next time step, k The working of the network is described by the following expressions: y(k + 1) = (W (x δ(k) + y(k)) = (W x) for k = 0 (W y(k)) for k = 1, 2, The function δ(k) is called the Kronecker delta and is equal to one for k = 0, and zero otherwise It is a convenient way of describing the initial conditions, in this case, the initial values of the input signals are equal to x(0) (107) AP Papliński, L Gustafsson 10 10

CompNeuroSci Ch 10 September 8, 2004 A discrete Hopfield network is a model of an associative memory which works with binary patterns coded with { 1, +1} Note that if v {0, 1} then u = 2v 1 { 1, +1} The feedback signals y are often called the state signals During the storage (encoding) phase the set of N m-dimensional fundamental memories: Ξ = [ξ(1), ξ(2),, ξ(n)] is stored in a matrix W in a way similar to the feedforward auto-associative memory networks, namely: W = 1 m N n=1 ξ(n) ξ(n) T N I m = 1 m Ξ ΞT N I m (108) By subtracting the appropriately scaled identity matrix I m the diagonal terms of the weight matrix are made equal to zero, (w jj = 0) This is required for a stable behaviour of the Hopfield network During the retrieval (decoding) phase the key vector x is imposed on the network as an initial state of the network y(0) = x The network then evolves towards a stable state (also called a fixed point), such that, y(k + 1) = y(k) = y s It is expected that the y s will be equal to the fundamental memory ξ closest to the key x AP Papliński, L Gustafsson 10 11

CompNeuroSci Ch 10 September 8, 2004 1022 Example of the Hopfield network behaviour for m = 3 (based on Haykin, Neural Networks) Consider a discrete Hopfield network with three neurons as in Figure 10 4 x 1 x 2 x 3 D D D 2/3 2/3 2/3 2/3 2/3 2/3 v 1 v 2 v3 y3 y 1 y 2 W = 1 3 0 2 +2 2 0 2 +2 2 0 Figure 10 4: Example of a discrete Hopfield network with m = 3 neurons: its structure and the weight matrix With m = 3 neurons, the network can be only in 2 3 = 8 different states It can be shown that out of 8 states only two states are stable, namely: (1, 1, 1) and ( 1, 1, 1) In other words the network stores two fundamental memories Starting the retrieval with any of the eight possible states, the successive states are as depicted in Figure 10 5 AP Papliński, L Gustafsson 10 12

CompNeuroSci Ch 10 September 8, 2004 y2 ( 1,1, 1) (y, y, y ) 3 2 1 ( 1,1,1) (1,1, 1) (1,1,1) y 3 ( 1, 1, 1) (1, 1, 1) (1, 1,1) y 1 ( 1, 1,1) Figure 10 5: Evolution of states for two stable states Let us calculate the network state for all possible initial states X = y 3 y 2 y 1 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (The following MATLAB command does the trick: X = 2*(dec2bin(0:7)- 0 ) -1 ) Y = (W X) = 1 3 = 1 3 0 2 +2 2 0 2 +2 2 0 0 4 4 0 0 4 4 0 4 0 4 0 0 4 0 4 0 0 4 4 4 4 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 AP Papliński, L Gustafsson 10 13

CompNeuroSci Ch 10 September 8, 2004 It is expected that after a number of relaxation steps Y = W Y all patterns converge to one of two fundamental memories as in Figure 10 5 We will test such examples in our practical work Retrieval of numerical patterns stored in a Recurrent Associative Memory (Hopfield network) (from Haykin, pages 697, 698) Figure 10 6: Retrieval of numerical patterns in by a Hopfield network AP Papliński, L Gustafsson 10 14

CompNeuroSci Ch 10 September 8, 2004 Retrieval from a corrupted pattern (key) succeeds because it was within the basin of attraction of the correct attractor, that is, a stored pattern, or fundamental memory Figure 10 7: Unsuccessful retrieval of a numerical pattern in by a Hopfield network This time retrieval from a corrupted pattern does not succeed because it was within the basin of attraction of an incorrect attractor, or stored pattern This is not surprising AP Papliński, L Gustafsson 10 15

CompNeuroSci Ch 10 September 8, 2004 AP Papliński, L Gustafsson 10 16