Perceptrons Gary Cottrell. Cognitive Science Summer School 2 Perceptrons: A bit of history Frank Rosenblatt studied a simple version of a neural net called.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 12. Two Layer ANNs
Advertisements

Multi-Layer Perceptron (MLP)
Perceptron Lecture 4.
Beyond Linear Separability
Slides from: Doug Gray, David Poole
1 Machine Learning: Lecture 4 Artificial Neural Networks (Based on Chapter 4 of Mitchell T.., Machine Learning, 1997)
G53MLE | Machine Learning | Dr Guoping Qiu
Artificial Neural Networks (1)
Perceptron Learning Rule
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.
For Wednesday Read chapter 19, sections 1-3 No homework.
Introduction to Training and Learning in Neural Networks n CS/PY 399 Lab Presentation # 4 n February 1, 2001 n Mount Union College.
Introduction to Artificial Intelligence (G51IAI)
CS Perceptrons1. 2 Basic Neuron CS Perceptrons3 Expanded Neuron.
Perceptron.
Artificial Neural Networks
Simple Neural Nets For Pattern Classification
The Perceptron CS/CMPE 333 – Neural Networks. CS/CMPE Neural Networks (Sp 2002/2003) - Asim LUMS2 The Perceptron – Basics Simplest and one.
An Illustrative Example
CS 4700: Foundations of Artificial Intelligence
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
-Artificial Neural Network- Chapter 3 Perceptron 朝陽科技大學 資訊管理系 李麗華教授.
CSCI 347 / CS 4206: Data Mining Module 04: Algorithms Topic 06: Regression.
Neural Networks Lecture 8: Two simple learning algorithms
Dr. Hala Moushir Ebied Faculty of Computers & Information Sciences
1 Introduction to Artificial Neural Networks Andrew L. Nelson Visiting Research Faculty University of South Florida.
Neural Networks. Plan Perceptron  Linear discriminant Associative memories  Hopfield networks  Chaotic networks Multilayer perceptron  Backpropagation.
Artificial Neural Networks
1 Machine Learning The Perceptron. 2 Heuristic Search Knowledge Based Systems (KBS) Genetic Algorithms (GAs)
Artificial Intelligence Lecture No. 29 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Artificial Neural Networks. The Brain How do brains work? How do human brains differ from that of other animals? Can we base models of artificial intelligence.
CS 478 – Tools for Machine Learning and Data Mining Backpropagation.
Data Mining Practical Machine Learning Tools and Techniques Chapter 4: Algorithms: The Basic Methods Section 4.6: Linear Models Rodney Nielsen Many of.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Neural Networks.
ADVANCED PERCEPTRON LEARNING David Kauchak CS 451 – Fall 2013.
CSE & CSE6002E - Soft Computing Winter Semester, 2011 Neural Networks Videos Brief Review The Next Generation Neural Networks - Geoff Hinton.
Linear Classification with Perceptrons
CS-424 Gregory Dudek Today’s Lecture Neural networks –Training Backpropagation of error (backprop) –Example –Radial basis functions.
Back-Propagation Algorithm AN INTRODUCTION TO LEARNING INTERNAL REPRESENTATIONS BY ERROR PROPAGATION Presented by: Kunal Parmar UHID:
Insight: Steal from Existing Supervised Learning Methods! Training = {X,Y} Error = target output – actual output.
For Friday No reading Take home exam due Exam 2. For Monday Read chapter 22, sections 1-3 FOIL exercise due.
Chapter 2 Single Layer Feedforward Networks
Supervised learning network G.Anuradha. Learning objectives The basic networks in supervised learning Perceptron networks better than Hebb rule Single.
EEE502 Pattern Recognition
Hazırlayan NEURAL NETWORKS Backpropagation Network PROF. DR. YUSUF OYSAL.
IE 585 History of Neural Networks & Introduction to Simple Learning Rules.
1 Perceptron as one Type of Linear Discriminants IntroductionIntroduction Design of Primitive UnitsDesign of Primitive Units PerceptronsPerceptrons.
Perceptrons Michael J. Watts
Previous Lecture Perceptron W  t+1  W  t  t  d(t) - sign (w(t)  x)] x Adaline W  t+1  W  t  t  d(t) - f(w(t)  x)] f’ x Gradient.
Chapter 6 Neural Network.
Artificial Intelligence Methods Neural Networks Lecture 3 Rakesh K. Bissoondeeal Rakesh K. Bissoondeeal.
Linear Models & Clustering Presented by Kwak, Nam-ju 1.
Computational Intelligence Semester 2 Neural Networks Lecture 2 out of 4.
Pattern Recognition Lecture 20: Neural Networks 3 Dr. Richard Spillman Pacific Lutheran University.
Multinomial Regression and the Softmax Activation Function Gary Cottrell.
CSE343/543 Machine Learning Mayank Vatsa Lecture slides are prepared using several teaching resources and no authorship is claimed for any slides.
Neural networks.
Fall 2004 Backpropagation CS478 - Machine Learning.
Real Neurons Cell structures Cell body Dendrites Axon
CSE 473 Introduction to Artificial Intelligence Neural Networks
Announcements HW4 due today (11:59pm) HW5 out today (due 11/17 11:59pm)
Classification with Perceptrons Reading:
with Daniel L. Silver, Ph.D. Christian Frey, BBA April 11-12, 2017
Perceptron as one Type of Linear Discriminants
Neural Networks Chapter 5
Artificial Intelligence 12. Two Layer ANNs
CSE (c) S. Tanimoto, 2007 Neural Nets
David Kauchak CS158 – Spring 2019
EE 193/Comp 150 Computing with Biological Parts
Outline Announcement Neural networks Perceptrons - continued
Presentation transcript:

Perceptrons Gary Cottrell

Cognitive Science Summer School 2 Perceptrons: A bit of history Frank Rosenblatt studied a simple version of a neural net called a perceptron: A single layer of processing Binary output Can compute simple things like (some) boolean functions (OR, AND, etc.)

Cognitive Science Summer School 3 Perceptrons: A bit of history Computes the weighted sum of its inputs (the net input, compares it to a threshold, and “fires” if the net is greater than or equal than the threshold. (Note in the picture it’s “>”, but we will use “>=“ to make sure you’re awake!)

Cognitive Science Summer School 4 The Perceptron Activation Rule This is called a linear threshold unit net input output

Cognitive Science Summer School 5 Quiz Assume: FALSE == 0, TRUE==1, so if X1 is false, it is 0. Can you come up with a set of weights and a threshold so that a two-input perceptron computes OR? X1X2X1 OR X

Cognitive Science Summer School 6 Quiz Assume: FALSE == 0, TRUE==1 Can you come up with a set of weights and a threshold so that a two-input perceptron computes AND? X1X2X1 AND X

Cognitive Science Summer School 7 Quiz Assume: FALSE == 0, TRUE==1 Can you come up with a set of weights and a threshold so that a two-input perceptron computes XOR? X1X2X1 XOR X

Cognitive Science Summer School 8 Perceptrons The goal was to make a neurally-inspired machine that could categorize inputs – and learn to do this from examples

Learning: A bit of history Rosenblatt (1962) discovered a learning rule for perceptrons called the perceptron convergence procedure. Rosenblatt (1962) discovered a learning rule for perceptrons called the perceptron convergence procedure. Guaranteed to learn anything computable (by a two-layer perceptron) Guaranteed to learn anything computable (by a two-layer perceptron) Unfortunately, not everything was computable (Minsky & Papert, 1969) Unfortunately, not everything was computable (Minsky & Papert, 1969) Cognitive Science Summer School 9 12/14/2015

10 Perceptron Learning It is supervised learning: It is supervised learning: There is a set of input patterns There is a set of input patterns and a set of desired outputs (the targets or teaching signal) and a set of desired outputs (the targets or teaching signal) The network is presented with the inputs, and FOOMP, it computes the output, and the output is compared to the target. The network is presented with the inputs, and FOOMP, it computes the output, and the output is compared to the target. If they don’t match, it changes the weights and threshold so it will get closer to producing the target next time. If they don’t match, it changes the weights and threshold so it will get closer to producing the target next time. Cognitive Science Summer School

11 Perceptron Learning First, get a training set - let’s choose OR Four “patterns”: X1X2X1 OR X

Cognitive Science Summer School 12 Perceptron Learning Made Simple Output activation rule: Output activation rule: First, compute the output of the network: First, compute the output of the network: Learning rule: Learning rule: If output is 1 and should be 0, then lower weights to active inputs and raise the threshold θ If output is 0 and should be 1, then raise weights to active inputs and lower the threshold θ (“active input” means x i = 1, not 0)

Cognitive Science Summer School 13 Perceptron Learning First, get a training set - let’s choose OR Four “patterns”: Now, randomly present these to the network, apply the learning rule, and continue until it doesn’t make any mistakes. X1X2X1 OR X

Cognitive Science Summer School 14 STOP HERE FOR TRAINING DEMO of OR.

Cognitive Science Summer School 15 Characteristics of perceptron learning Supervised learning: Gave it a set of input- output examples for it to model the function (a teaching signal) Error correction learning: only corrected it when it is wrong (never praised! ;-)) Random presentation of patterns. Slow! Learning on some patterns ruins learning on others. This can explain the U-shaped learning of the past tense in English. 12/14/2015

Cognitive Science Summer School 16 Perceptron Learning Made Simple for Computer Science Output activation rule: First, compute the output of the network: Learning rule: If output is 1 and should be 0, then lower weights to active inputs and raise the threshold θ If output is 0 and should be 1, then raise weights to active inputs and lower the threshold θ (“active input” means x i = 1, not 0)

Cognitive Science Summer School 17 Perceptron Learning Made Simple for Computer Science Learning rule: If output is 1 and should be 0, then lower weights to active inputs and raise the threshold If output is 0 and should be 1, then raise weights to active inputs and lower the threshold Easy one-line program to do this: w i (t+1) = w i (t) + α(teacher – output)x i (α is the learning rate) This is known as the delta rule because learning is based on the delta (difference) between what you did and what you should have done: δ = (teacher - output)

Cognitive Science Summer School 18 Let’s convince ourselves these are the same… Learning rule: If output is 1 and should be 0, then lower weights to active inputs and raise the threshold w i (t+1) = w i (t) + α(teacher – output)x i w i (t+1) = w i (t) + α(0 – 1)1 (“x i is an active input” means x i = 1) = w i (t) – αlower weight What if x i is inactive? w i (t+1) = w i (t) + α(teacher – output)x i w i (t+1) = w i (t) + α(teacher – output)0 = w i (t) (no change)

Cognitive Science Summer School 19 Let’s convince ourselves these are the same… Learning rule: If output is 0 and should be 1, then raise weights to active inputs and lower the threshold w i (t+1) = w i (t) + α(teacher – output)x i w i (t+1) = w i (t) + α(1 – 0)1 = w i (t) + α(raise weight)

Cognitive Science Summer School 20 Let’s convince ourselves these are the same… What about the threshold? We just treat θ as a weight from a unit that is always a constant -1. If output is 1 and should be 0, then lower weights to active inputs and raise the threshold Learning rule: w i (t+1) = w i (t) + α(teacher – output)x i I.e.:θ(t+1) = θ(t) + α(0 – 1)(-1) θ(t+1) = θ(t) + α(–1)(-1) θ(t+1) = θ(t) + αraise θ

Cognitive Science Summer School 21 Let’s convince ourselves these are the same… What if we get it right??? Then teacher = output, and … Learning rule: w i (t+1) = w i (t) + α(teacher – output)x i w i (t+1) = w i (t) + α(0)x i = w i (t) (no change)

Cognitive Science Summer School 22 But wait! There’s more!!! Learning rule: w i (t+1) = w i (t) + α(teacher – output)x i (α is the learning rate) In fact, this learning rule works for arbitrary numeric inputs. I.e., the x i ’s don’t need to be binary – they can be real numbers, or integers (like pixel values!). So, I can train a perceptron to be a “Gary detector,” since an image is just a table of pixel values. (Illustrate on board)

Cognitive Science Summer School 23 But wait! There’s more!!! Learning rule: w i (t+1) = w i (t) + α(teacher – output)x i (α is the learning rate) In fact, this learning rule works for linear outputs I.e., we can use this to do linear regression! (Illustrate on board) The learning rule itself can be derived as minimizing the euclidean distance between the desired outputs (the teaching signal) and the actual outputs.

Cognitive Science Summer School 24 But wait! There’s more!!! A simple variant gives us logistic regression Logistic regression, if you don’t know what that is, is when you have a nominal output variable, e.g., “give this guy a loan? Or not?” This ends up being a kind of “soft” perceptron. It is more useful than a perceptron because it gives a probability of the output being true. (Do Demo, if possible)