Multi-Layer Perceptron (MLP)

Multi-Layer Perceptron (MLP)

Finger Biometric -- Neural networks 1 Neural networks Neural networks are made up of many artificial neurons. Each input into the neuron has its own weight associated with it illustrated by the red circle. A weight is simply a floating point number and it's these we

adjust when we eventually come to train the network. 2 Neural networks A neuron can have any number of inputs from one to n, where n is the total number of inputs. The inputs may be represented therefore as x1, x2, x3 xn.

And the corresponding weights for the inputs as w1, w2, w3 wn. Output a = x1w1+x2w2+x3w3... +xnwn 3 How do we actually use an artificial neuron? Feedforward network: The neurons in each layer feed their output forward to the next layer until we get the final output

from the neural network. There can be any number of hidden layers within a feedforward network. The number of neurons can be completely arbitrary. 4 Neural Networks by an Example

let's design a neural network that will detect the number '4'. Given a panel made up of a grid of lights which can be either on or off, we want our neural net to let us know whenever it thinks it sees the character '4'. The panel is eight cells square and looks like this: the neural net will have 64 inputs, each one representing a particular cell in the panel and a hidden layer consisting of a number of neurons (more on

this later) all feeding their output into just one neuron in the output layer 5 Neural Networks by an Example initialize the neural net with random weights feed it a series of inputs which represent, in this example, the different panel configurations For each configuration we check to see what its output is and adjust the weights accordingly so that whenever it sees

something looking like a number 4 it outputs a 1 and for everything else it outputs a zero. More: http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol4/cs11/rep ort.html 6 Multi-Layer Perceptron (MLP)

7 x1 xn We will introduce the MLP and the backpropagation algorithm which is used to train it MLP used to describe any general feedforward (no recurrent connections) network

However, we will concentrate on nets with units arranged in layers 8 x1 xn Different books refer to the above as either 4 layer (no. of layers of neurons) or 3 layer (no. of layers of adaptive

weights). We will follow the latter convention 1st question: what do the extra layers gain you? Start with looking at what a single layer cant do 9 Perceptron Learning Theorem Recap: A perceptron (threshold unit) can learn anything that it can represent (i.e. anything separable with a hyperplane)

10 The Exclusive OR problem A Perceptron cannot represent Exclusive OR since it is not linearly separable. 11 12

Minsky & Papert (1969) offered solution to XOR problem by combining perceptron unit responses using a second layer of Units. Piecewise linear classification using an MLP with threshold (perceptron) units +1 1 3 2

+1 13 Three-layer networks x1 x2 Input Output

xn Hidden layers 14 Properties of architecture No connections within a layer Each unit is a perceptron

m yi f ( wij x j bi ) j 1 15 Properties of architecture No connections within a layer No direct connections between input and output layers

Each unit is a perceptron m yi f ( wij x j bi ) j 1 16

Properties of architecture No connections within a layer No direct connections between input and output layers Fully connected between layers Each unit is a perceptron m yi f ( wij x j bi )

j 1 17 Properties of architecture No connections within a layer No direct connections between input and output layers Fully connected between layers Often more than 3 layers Number of output units need not equal number of input units

Number of hidden units per layer can be more or less than input or output units Each unit is a perceptron m yi f ( wij x j bi ) j 1 Often include bias as an extra weight

18 What do each of the layers do? 1st layer draws linear boundaries 2nd layer combines the boundaries

3rd layer can generate arbitrarily complex 19 boundaries Backpropagation learning algorithm BP Solution to credit assignment problem in MLP. Rumelhart, Hinton and Williams (1986) (though actually invented earlier in a PhD thesis relating to economics) BP has two phases:

Forward pass phase: computes functional signal, feed forward propagation of input pattern signals through network Backward pass phase: computes error signal, propagates the error backwards through network starting at output units (where the error is the difference between actual and desired output values) 20 Conceptually: Forward Activity Backward Error

21 Forward Propagation of Activity Step 1: Initialise weights at random, choose a learning rate Until network is trained: For each training example i.e. input pattern and target output(s): Step 2: Do forward pass through net (with fixed weights) to produce output(s)

i.e., in Forward Direction, layer by layer: Inputs applied Multiplied by weights Summed

Squashed by sigmoid activation function Output passed to each neuron in next layer Repeat above until network output(s) produced 22 Step 3. Back-propagation of error Compute error (delta or local gradient) for each output unit k Layer-by-layer, compute error (delta or local

gradient) for each hidden unit j by backpropagating errors (as shown previously) Step 4: Next, update all the weights wij By gradient descent, and go back to Step 2 The overall MLP learning algorithm, involving forward pass and backpropagation of error (until the network training completion), is known as the Generalised Delta Rule (GDR), or more commonly, the Back Propagation (BP) algorithm

23 Back-prop algorithm summary (with Maths!) (Not Examinable) 24 Back-prop algorithm summary (with NO Maths!)

25 MLP/BP: A worked example 26 Worked example: Forward Pass 27

Worked example: Forward Pass 28 Worked example: Backward Pass 29 Worked example: Update Weights Using Generalized Delta Rule (BP)

30 Similarly for the all weights wij: 31 Verification that it works 32

Training This was a single iteration of back-prop Training requires many iterations with many training examples or epochs (one epoch is entire presentation of complete training set) It can be slow ! Note that computation in MLP is local (with respect to each neuron) Parallel computation implementation is also

possible 33 Training and testing data How many examples ? The more the merrier ! Disjoint training and testing data sets learn from training data but evaluate performance (generalization ability) on

unseen test data Aim: minimize error on test data 34

Recently Viewed Presentations

  • Prezentace aplikace PowerPoint

    Prezentace aplikace PowerPoint

    SMS modules in CZSO practice Statistical Tasks - brief description Goal of the TASKS sub-system: full description of a statistical task via metadata from the various aspects: content (variables, statistical units, code-lists) functions (validation rules, response duty, aggregation algorithms) structures...
  • Financial Aid Money Matters Financial Aid Office Mandate

    Financial Aid Money Matters Financial Aid Office Mandate

    be available to full-time students completing an international student abroad program as part of their degree requirement at the University of New Brunswick (Fredericton Campus) The award will be contingent on the students' registration and completion of the student abroad...
  • Lessons from Noah & the Flood - Eastside church

    Lessons from Noah & the Flood - Eastside church

    Lessons from Noah & The Flood. Questions about the flood: How could Noah have gotten so many different animals on the ark? Are there any witnesses outside of Scripture? Where is the scientific evidence that such a flood occurred? It...
  • Introduction to Computer Systems 15-213/18-243, spring 2009

    Introduction to Computer Systems 15-213/18-243, spring 2009

    4.6 MB archive of 1496 object files. I/O, memory allocation, signal handling, string handling, data and time, random numbers, integer math. libm.a (the C math library) 2 MB archive of 444 object files. floating point math (sin, cos, tan, log,...
  • Geneva Lacrosse - LeagueAthletics.com

    Geneva Lacrosse - LeagueAthletics.com

    Advanced Defensive Checks. As stated earlier multiple times, body positioning is the key to playing good defense. There are additional advanced takeaway checks that defensemen can learn, but these should come secondary to learning solid fundamental defensive positioning and the...
  • The PDST is funded by the Department of

    The PDST is funded by the Department of

    relationship to lca courses. selection of task from alternatives considered. time. resources. The PDST is funded by the Department of Education and Skills . under the National Development Plan, 2007-2013
  • Gilded age politics

    Gilded age politics

    White southern politicians sought to limit African American access to the polls through such measures as the poll tax, literacy tests, and the "grandfather clause." As a result, African Americans in the South had effectively been disfranchised by the 1900s.
  • Chapter Three - Johannessimatupang's Weblog

    Chapter Three - Johannessimatupang's Weblog

    One-Shot Case Study. X 0. 1. A single group of test units is exposed to a treatment . X. A single measurement on the dependent variable is taken (0. 1). There is no random assignment of test units. The one-shot...