1 Chapter 11 Neural Networks. 2 Chapter 11 Contents (1) l Biological Neurons l Artificial Neurons l Perceptrons l Multilayer Neural Networks l Backpropagation.
Published byModified over 4 years ago
Presentation on theme: "1 Chapter 11 Neural Networks. 2 Chapter 11 Contents (1) l Biological Neurons l Artificial Neurons l Perceptrons l Multilayer Neural Networks l Backpropagation."— Presentation transcript:
2 Chapter 11 Contents (1) l Biological Neurons l Artificial Neurons l Perceptrons l Multilayer Neural Networks l Backpropagation
3 Chapter 11 Contents (2) l Recurrent Networks l Hopfield Networks l Bidirectional Associative Memories l Kohonen Maps l Hebbian Learning l Evolving Neural Networks
4 Biological Neurons l The human brain is made up of billions of simple processing units – neurons. l Inputs are received on dendrites, and if the input levels are over a threshold, the neuron fires, passing a signal through the axon to the synapse which then connects to another neuron.
5 Artificial Neurons (1) l Artificial neurons are based on biological neurons. l Each neuron in the network receives one or more inputs. l An activation function is applied to the inputs, which determines the output of the neuron – the activation level. l The charts on the right show three typical activation functions.
6 Artificial Neurons (2) l A typical activation function works as follows: l Each node i has a weight, w i associated with it. The input to node i is x i. l t is the threshold. l So if the weighted sum of the inputs to the neuron is above the threshold, then the neuron fires.
7 Perceptrons (1) l A perceptron is a single neuron that classifies a set of inputs into one of two categories (usually 1 or -1). l If the inputs are in the form of a grid, a perceptron can be used to recognize visual images of shapes. l The perceptron usually uses a step function, which returns 1 if the weighted sum of inputs exceeds a threshold, and –1 otherwise.
8 Perceptrons (2) l The perceptron is trained as follows: nFirst, inputs are given random weights (usually between –0.5 and 0.5). nAn item of training data is presented. If the perceptron mis-classifies it, the weights are modified according to the following: l e is the size of the error, and a is the learning rate, between 0 and 1.
9 Perceptrons (3) l Perceptrons can only classify linearly separable functions. l The first of the following graphs shows a linearly separable function (OR). l The second is not linearly separable (Exclusive-OR).
10 Multilayer Neural Networks l Multilayer neural networks can classify a range of functions, including non linearly separable ones. l Each input layer neuron connects to all neurons in the hidden layer. l The neurons in the hidden layer connect to all neurons in the output layer. A feed-forward network
11 Backpropagation (1) l Multilayer neural networks learn in the same way as perceptrons. l However, there are many more weights, and it is important to assign credit (or blame) correctly when changing weights. l Backpropagation networks use the sigmoid activation function, as it is easy to differentiate:
12 Backpropagation (2) l For node j, X j is the output Y j is the output n is the number of inputs to node j j is the threshold for j l After values are fed forward through the network, errors are fed back to modify the weights in order to train the network. l For each node, we calculate an error gradient.
13 Backpropagation (3) For a node k in the output layer, the error e k is the difference between the desired output and the actual output. l The error gradient for k is: l Similarly, for a node j in the hidden layer: l Now the weights are updated as follows: is the learning rate, (a positive number below 1)
14 Recurrent Networks l Feed forward networks do not have memory. l Recurrent networks can have connections between nodes in any layer, which enables them to store data – a memory. l Recurrent networks can be used to solve problems where the solution depends on previous inputs as well as current inputs (e.g. predicting stock market movements).
15 Hopfield Networks l A Hopfield Network is a recurrent network. l Use a sign activation function: l If a neuron receives a 0 as an input it does not change state. l Inputs are usually represented as matrices. l The network is trained to represent a set of attractors, or stable states. l Any input will be mapped to an output state which is the attractor closest to the input. l A Hopfield network is autoassociative – it can only associate an item with itself or a similar one.
16 Bidirectional Associative Memories l A BAM is a heteroassociative memory: nLike the brain, it can learn to associate one item with another completely unrelated item. l The network consists of two fully connected layers of nodes – every node in one layer is connected to every node in the other layer.
17 Kohonen Maps l An unsupervised learning system. l Two layers of nodes: an input layer and a cluster (output) layer. l Uses competitive learning: nEvery input is compared with the weight vectors of each node in the cluster node. nThe node which most closely matches the input, fires. This is the classification of the input. nEuclidean distance is used. nThe winning node has its weight vector modified to be closer to the input vector.
18 Kohonen Maps (example) Initially, the weights are arranged as shown here: The diagram on the left shows the training data. The nodes in the cluster layer are arranged in a grid, as shown:
19 Kohonen Maps (example) After training, the weight vectors have been rearranged to match the training data:
20 Hebbian Learning (1) l Hebb’s law: “When an axon of cell A is near enough to excite a cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A’s efficiency, as one of the cells firing B, is increased”. l Hence, if two neurons that are connected together fire at the same time, the weights of the connection between them is strengthened.
21 Hebbian Learning (2) l The activity product rule is used to modify the weights of a connection between two nodes that fire at the same time: l is the learning rate; x i is the input to node i and y i is the output of node i. l Hebbian networks usually also use a forgetting factor, which decreases the weight of the connection between if two nodes if they fire at different times.
22 Evolving Neural Networks l Neural networks can be susceptible to local maxima. l Evolutionary methods (genetic algorithms) can be used to determine the starting weights for a neural network, thus avoiding these kinds of problems.