Ann Unit Iv
Ann Unit Iv
UNIT-IV
Attractor Neural Networks
By
Dr.Satyabrata Dash
Assistant Professor
Department of Computer Science and
Engineering, GITAM Deemed to be
University
Course Educational Objectives( ANN)
1. To understand the architecture, learning algorithm and issues of various neural
networks.
2. Analyze ANN learning, Error correction learning, Memory-based learning,
Competitive learning and Boltzmann learning
3. To adopt gradient - descent techniques in real time applications
4. Provide knowledge on Generalization and function approximation and various
5. architectures of building an ANN
6. Implement and learn the applications of Self-organization Map
2
SYLLABUS
3
SYLLABUS
4
Introduction to Associative Learning
5
1. Associative learning is a type of learning process in psychology where individuals
form associations or connections between Stimuli and Behaviors.
2. Learning occurs when you learn something based on a new stimulus.
3. It is a fundamental concept in the field of behavioral psychology and is often used
to explain how organisms, including humans, acquire new behaviors through their
experiences with the environment.
4. It is expressed as the modification of existing behaviors, or the development of
novel behaviors, that reflects the conscious or unconscious recognition
6
Primary Forms of Associative Learning
7
Primary Forms of Associative Learning
• Classical Conditioning
In classical conditioning, a neutral stimulus (one that does not naturally elicit a
response) is paired with an unconditioned stimulus (one that naturally triggers a
response) to produce a conditioned response.
• Operant Conditioning
In operant conditioning, behaviors are strengthened or weakened based on the
consequences they produce. Behaviors that are followed by desirable consequences
tend to be repeated, while those followed by undesirable consequences are less
likely to be repeated.
8
Associative Memory Network
9
Associative Memory Network
Associative Memory
1. It is a supervised learning model in Artificial Neural Network.
2. An associate memory network refers to a content addressable memory structure
that associates a relationship between the set of input patterns and output patterns.
3. A content addressable memory structure is a kind of memory structure that enables
the recollection of data based on the intensity of similarity between the input
pattern and the patterns stored in the memory.
4. These types of memories are also called Content-Addressable Memory (CAM).
5. Associative memory makes a parallel search with the stored patterns as data files.
6. Following are the two types of associative memories we can observe
1.Auto Associative Memory
2. Hetero Associative memory
10
Auto Associative Memory
An auto-associative memory recovers a previously stored pattern that most closely relates
to the current pattern. It is also known as an auto-associative correlator.
Consider x[1], x[2], x[3],….. x[M], be the number of stored pattern vectors, and let
x[m] be the element of these vectors, showing characteristics obtained from the
patterns. The auto-associative memory will result in a pattern vector x[m] when putting
a noisy or incomplete version of x[m].
11
ANN used to represent auto-associative Memory
12
Hetero Associative memory
Hetero Associative memory
• In a hetero-associate memory, the recovered pattern is generally different from the
input pattern not only in type and format but also in content. It is also known as a
hetero-associative correlator
14
Linear Associative memory
1. Linear Associative Memory (LAM) is a type of artificial neural network or
information retrieval system used in the field of machine learning and cognitive science.
2. It is a simplified model inspired by the way human memory works, specifically the idea
of association between items or concepts
3. It is a collection of simple processing units which have a quite complex collective
computational capability and behavior.
4. stores and retrieves information based on linear associations between input and
output patterns.
5. It's a simplified form of associative memory that uses a linear transformation to map
inputs to outputs.
6. The linear associator model is a feed-forward type network where produced output is
in the form of single feed-forward computation.
15
Linear Associative memory
16
Linear Associative memory
1. The model comprises of two layers of processing units, one work as an input layer
while the other work as an output layer.
2. The input is directly associated with the outputs, through a series of weights.
3. The connections carrying weights link each input to every output.
4. The addition of the products of the weights and the input is determined in each neuron
node.
5. All p inputs units are associated to all q output units via associated weight matrix
W = [wij]p * q where wij describes the strength of the unidirectional association of
the ith input unit to the jth output unit.
The connection weight matrix stores the z different associated pattern pairs {(Xk,Yk);
k= 1,2,3,…,z}. Constructing an associative memory is building the connection weight
matrix w such that if an input pattern is presented, the stored pattern associated with the
input pattern is recovered.
17
Attractor Associative Memory(Attractor Neural Network (ANNs))
18
Attractor Neural Network (ANNs))
1. An attractor neural network, also known as a recurrent neural network (RNN) with
attractor dynamics, is a type of artificial neural network designed to model and simulate
certain properties of biological neural networks, especially those related to memory and
pattern recognition.
2. These networks are characterized by the presence of attractors, which are stable states or
patterns of neural activity that the network tends to converge to under certain conditions.
3. Attractors: Attractors are stable states of neural activity in the network. These can be
fixed-point attractors (where the network settles into a single stable state) or cyclic
attractors (where the network's activity follows a repeating pattern). Attractors
represent memory states or patterns that the network can recall or maintain.
4. Attractor neural networks are often used to model memory processes and pattern
recognition. They can store and retrieve information through the stable attractor states.
When presented with incomplete or noisy input, the network can often complete or
recognize patterns based on its stored attractors.
19
Application of Attractor Neural Network (ANNs))
Attractor neural networks are used for several reasons in the field of artificial intelligence and
neuroscience due to their unique properties and capabilities
Memory and Attractor neural networks are particularly well-suited for modeling memory
Pattern processes and pattern recognition. They can store and retrieve information
Recognition: through stable attractor states, making them useful for tasks like associative
memory and content-addressable memory retrieval.
Robustness to These networks can tolerate noisy or incomplete inputs and still retrieve the
Noise: closest stored pattern or memory, which is valuable in applications where input
data may be corrupted or incomplete.
Cognitive Attractor networks have been used to model cognitive processes, such as how
Modeling: the brain stores and retrieves information. They provide a simplified but
effective way to understand memory and decision-making mechanisms.
Optimization They have been applied to solve combinatorial optimization problems by
Problems: mapping the problem space to the attractor states. This can lead to efficient
solutions for problems like the traveling salesman problem or graph coloring.
Neuroscience Attractor neural networks are used in neuroscience to gain insights into how
Research: certain brain regions work, especially those associated with memory and
decision-making. These models can help researchers understand the dynamics
of neural systems.
20
Hopfield Network
21
Hopfield Network
22
Hopfield Network
.A recurrent network is a Hopfield network when
• The neurons have discrete output (for convenience we use bipolar encoding, i.e.,
activation function is the sign function)
• Each neuron has a threshold
• Each pair of neurons is connected by a weighted connection. The weight matrix
is symmetric and has a zero diagonal (no connection from a neuron to itself)
• The Hopfield network consists of associative memory. This memory allows the
system to retrieve the memory using an incomplete portion.
• The network can restore the closest pattern using the data captured in associative
memory.
• This feature of Hopfield networks makes it a good candidate for pattern recognition.
23
Architecture of Hopfield Network
24
Hopfield Network
25
Architecture of Hopfield Network
26
TRAINING Algorithm for Hopfield Network
27
TRAINING Algorithm for Hopfield Network
The rule is different for binary and bipolar. For storing a set of 'N' input patterns [ X(n)
where n = 1 to N ], the rule followed is as follows:
Binary Input:
Bipolar Input:
29
Testing Algorithm for Hopfield Network
Testing Algorithm
1. Initialize the weights using the above training algorithm rules.
2. Follow steps 3 to 7 for each input vector 'Xi'.
3. Assign the value of external input vector 'Xi' to initial activators Yi', for all i = 1 to N.
4. Follow steps 5 to 7 for each initial activator 'Yi'.
5. Calculate the network's net input 'Yin' using the below rule:
Based on the calculated net input and threshold value, calculate the output. There are three
different conditions for the output. These are:
Broadcast the obtained output 'Yi' to all other units. And update the activation vector
and Test the network.
30
Application of Hopfield Network
Hopfield Network are used for several reasons in the field of artificial intelligence and neuroscience
due to their unique properties and capabilities
Memory and Hopfield Network are particularly well-suited for modeling memory processes
Pattern and pattern recognition. They can store and retrieve information through stable
Recognition: attractor states, making them useful for tasks like associative memory and
content-addressable memory retrieval.
Robustness to These networks can tolerate noisy or incomplete inputs and still retrieve the
Noise: closest stored pattern or memory, which is valuable in applications where input
data may be corrupted or incomplete.
Cognitive Hopfield Network have been used to model cognitive processes, such as how
Modeling: the brain stores and retrieves information. They provide a simplified but
effective way to understand memory and decision-making mechanisms.
Optimization They have been applied to solve combinatorial optimization problems by
Problems: mapping the problem space to the attractor states. This can lead to efficient
solutions for problems like the traveling salesman problem or graph coloring.
Neuroscience Hopfield Network are used in neuroscience to gain insights into how certain
Research: brain regions work, especially those associated with memory and decision-
making. These models can help researchers understand the dynamics of neural
systems.
31
Brain State in a Box(BSB) neural Network
1. The Brain-State-in-a-Box neural network is a nonlinear auto-associative neural
network and can be extended to hetero-association with two or more layers.
2. It is also similar to Hopfield network.
3. It was proposed by J.A. Anderson, J.W. Silverstein, S.A. Ritz and R.S. Jones in 1977.
4. BSB is a fully connected network with the maximum number of nodes depending upon
the dimensionality n of the input space.
5. All the neurons are updated simultaneously.
6. Neurons take values between -1 to +1.
• The positive feedback in the BSB model causes x(0) to increase in Euclidean
norm with an increasing number of iterations until it hits a wall of the box (unit
hypercube) then slides along the wall and eventually ends in a stable corner of
the box, where it cannot get out of the box.
BSB Algorithm
• BSB model is basically a positive feedback system with amplitude limitation.
• BSB algorithm defined by the given equation.
• With X(0) initial state vector of the model representing an input activation pattern
B >0 small constant called feedback factor ,
• W can be considered by a single layer linear neuron network
and the activation function is pricewise linear
Algorithm:
• Storage (Learning): In this learning step of BAM, weight matrix is calculated
between M pairs of patterns (fundamental memories) are stored in the synaptic
weights of the network following the equation .
•
𝑀
𝑊 = 𝑋𝑚 ∗ 𝑌𝑚 𝑇
𝑚=1
d. Repeat the iteration until convergence, when input and output remain unchanged.
Advantages Explanations
Associative BAM is designed specifically for associative memory tasks, allowing
Memory: it to store and retrieve patterns in a bi-directional manner. This means
it can recall patterns from partial or noisy input, making it suitable for
tasks like pattern completion and recognition.
Robustness to BAM can tolerate some level of noise in the input patterns. It can
Noise: often reconstruct a stored pattern even if the input is corrupted or
incomplete. This makes it useful in real-world scenarios where data
may not be perfect.
Simple BAM has a relatively simple and straightforward architecture
Architecture: compared to some other neural networks, like deep feedforward
networks or recurrent neural networks. This simplicity can make it
easier to understand and implement for certain applications.
Stability: BAM networks are stable and tend to converge to a stable state during
recall, which is beneficial in applications requiring consistent and
predictable responses.
Pattern BAM can effectively separate and store multiple patterns, even if
Separation: there is some overlap in their features. This makes it useful for tasks
where different patterns need to be stored and retrieved without
interference.
Architecture
The following diagram shows the
architecture of Boltzmann machine. It is
clear from the diagram, that it is a two-
dimensional array of units. Here, weights
on interconnections between units are –p
where p > 0. The weights of self-
connections are given by b where b > 0.
• wii also exists, i.e. there would be the self-connection between units.
• Now, when the state changes from either 1 to 0 or from 0 to 1, then the change in
consensus can be given by the following relation −
• Here ui is the current state of Ui.
• Generally, unit Ui does not change its state, but if it does then the information would be
residing local to the unit. With that change, there would also be an increase in the
consensus of the network.
• Probability of the network to accept the change in the state of the unit is given by the
following relation −
• Here, T is the controlling parameter. It will decrease as CF reaches the maximum value.
Step 4 − Assume that one of the state has changed the weight and choose the integer I, J
as random values between 1 and n.
53