Artificial Neural Networks

Slides:



Advertisements
Similar presentations
Artificial Neural Networks
Advertisements

Multi-Layer Perceptron (MLP)
Slides from: Doug Gray, David Poole
1 Machine Learning: Lecture 4 Artificial Neural Networks (Based on Chapter 4 of Mitchell T.., Machine Learning, 1997)
Introduction to Neural Networks Computing
For Wednesday Read chapter 19, sections 1-3 No homework.
Artificial Neural Networks
CSCI 347 / CS 4206: Data Mining Module 07: Implementations Topic 03: Linear Models.
Tuomas Sandholm Carnegie Mellon University Computer Science Department
Classification Neural Networks 1
Perceptron.
Machine Learning Neural Networks
Overview over different methods – Supervised Learning
INTRODUCTION TO Machine Learning ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Artificial Neural Networks
20.5 Nerual Networks Thanks: Professors Frank Hoffmann and Jiawei Han, and Russell and Norvig.
Back-Propagation Algorithm
Machine Learning Motivation for machine learning How to set up a problem How to design a learner Introduce one class of learners (ANN) –Perceptrons –Feed-forward.
Data Mining with Neural Networks (HK: Chapter 7.5)
Artificial Neural Networks
LOGO Classification III Lecturer: Dr. Bo Yuan
CHAPTER 11 Back-Propagation Ming-Feng Yeh.
Foundations of Learning and Adaptive Systems ICS320
Dr. Hala Moushir Ebied Faculty of Computers & Information Sciences
Artificial Neural Networks
Computer Science and Engineering
1 Artificial Neural Networks Sanun Srisuk EECP0720 Expert Systems – Artificial Neural Networks.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Wednesday, 08 February 2007.
CS464 Introduction to Machine Learning1 Artificial N eural N etworks Artificial neural networks (ANNs) provide a general, practical method for learning.
Machine Learning Chapter 4. Artificial Neural Networks
11 CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering
Artificial Neural Network Yalong Li Some slides are from _24_2011_ann.pdf.
Machine Learning Dr. Shazzad Hosain Department of EECS North South Universtiy
LINEAR CLASSIFICATION. Biological inspirations  Some numbers…  The human brain contains about 10 billion nerve cells ( neurons )  Each neuron is connected.
CS 478 – Tools for Machine Learning and Data Mining Backpropagation.
1 Pattern Classification X. 2 Content General Method K Nearest Neighbors Decision Trees Nerual Networks.
A note about gradient descent: Consider the function f(x)=(x-x 0 ) 2 Its derivative is: By gradient descent. x0x0 + -
Neural Networks and Machine Learning Applications CSC 563 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Linear Discrimination Reading: Chapter 2 of textbook.
Non-Bayes classifiers. Linear discriminants, neural networks.
11 1 Backpropagation Multilayer Perceptron R – S 1 – S 2 – S 3 Network.
Neural Networks and Backpropagation Sebastian Thrun , Fall 2000.
Back-Propagation Algorithm AN INTRODUCTION TO LEARNING INTERNAL REPRESENTATIONS BY ERROR PROPAGATION Presented by: Kunal Parmar UHID:
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
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21: Perceptron training and convergence.
Artificial Neural Network
EEE502 Pattern Recognition
Neural Networks 2nd Edition Simon Haykin
1 Perceptron as one Type of Linear Discriminants IntroductionIntroduction Design of Primitive UnitsDesign of Primitive Units PerceptronsPerceptrons.
Neural NetworksNN 21 Architecture We consider the architecture: feed- forward NN with one layer It is sufficient to study single layer perceptrons with.
Artificial Neural Network. Introduction Robust approach to approximating real-valued, discrete-valued, and vector-valued target functions Backpropagation.
Artificial Neural Network. Introduction Robust approach to approximating real-valued, discrete-valued, and vector-valued target functions Backpropagation.
Learning: Neural Networks Artificial Intelligence CMSC February 3, 2005.
Pattern Recognition Lecture 20: Neural Networks 3 Dr. Richard Spillman Pacific Lutheran University.
Learning with Neural Networks Artificial Intelligence CMSC February 19, 2002.
Fall 2004 Backpropagation CS478 - Machine Learning.
Learning with Perceptrons and Neural Networks
Chapter 2 Single Layer Feedforward Networks
with Daniel L. Silver, Ph.D. Christian Frey, BBA April 11-12, 2017
Artificial Neural Networks
Machine Learning Today: Reading: Maria Florina Balcan
CSC 578 Neural Networks and Deep Learning
Data Mining with Neural Networks (HK: Chapter 7.5)
Classification Neural Networks 1
Perceptron as one Type of Linear Discriminants
Lecture Notes for Chapter 4 Artificial Neural Networks
Seminar on Machine Learning Rada Mihalcea
Artificial Intelligence Chapter 3 Neural Networks
Presentation transcript:

Artificial Neural Networks

Outline Biological Motivation Perceptron Gradient Descent Least Mean Square Error Multi-layer networks Sigmoid node Backpropagation

Biological Neural Systems Neuron switching time : > 10-3 secs Number of neurons in the human brain: ~1010 Connections (synapses) per neuron : ~104–105 Face recognition : 0.1 secs High degree of parallel computation Distributed representations

Artificial Neural Networks Many simple neuron-like threshold units Many weighted interconnections Multiple outputs Highly parallel and distributed processing Learning by tuning the connection weights

Perceptron: Linear threshold unit x0=1 x1 w1 w0 w2 x2 S o . i=0n wi xi wn xn 1 if i=0n wi xi >0 o(xi)= -1 otherwise {

Decision Surface of a Perceptron + - x1 x2 Xor x2 + + + - - x1 + - - Linearly Separable Theorem: VC-dim = n+1

Perceptron Learning Rule S sample xi input vector t=c(x) is the target value o is the perceptron output  learning rate (a small constant ), assume =1 wi = wi + wi wi =  (t - o) xi

Perceptron Algo. Correct Output (t=o) False Negative (t=-1 and o=1) Weights are unchanged Incorrect Output (to) Change weights ! False Positive (t=1 and o=-1) Add x to w False Negative (t=-1 and o=1) Subtract x from w

Perceptron Learning Rule (x,t)=([2,1],-1) o=sgn(0.45-0.6+0.3) =1 w=[0.25 –0.1 0.5] x2 = 0.2 x1 – 0.5 o=-1 w=[0.2 –0.2 –0.2] (x,t)=([-1,-1],1) o=sgn(0.25+0.1-0.5) =-1 (x,t)=([1,1],1) o=sgn(0.25-0.7+0.1) =-1 w=[0.2 0.2 0.2] w=[-0.2 –0.4 –0.2]

Perceptron Algorithm: Analysis Theorem: The number of errors of the Perceptron Algorithm is bounded Proof: Make all examples positive change <xi,bi> to <bixi, +1> Margin of hyperplan w

Perceptron Algorithm: Analysis II Let mi be the number of errors of xi M=  mi From the algorithm: w=  mixi Let w* be a separating hyperplane

Perceptron Algorithm: Analysis III Change in weights: Since w errs on xi , we have wxi <0 Total weight:

Perceptron Algorithm: Analysis IV Consider the angle between w and w* Putting it all together

Gradient Descent Learning Rule Consider linear unit without threshold and continuous output o (not just –1,1) o=w0 + w1 x1 + … + wn xn Train the wi’s such that they minimize the squared error E[w1,…,wn] = ½ dS (td-od)2 where S is the set of training examples

Gradient Descent S={<(1,1),1>,<(-1,-1),1>, <(1,-1),-1>,<(-1,1),-1>} (w1,w2) Gradient: E[w]=[E/w0,… E/wn] w=- E[w] (w1+w1,w2 +w2) wi=- E/wi =/wi 1/2d(td-od)2 = /wi 1/2d(td-i wi xi)2 = d(td- od)(-xi)

Gradient Descent Gradient-Descent(S:training_examples, ) Until TERMINATION Do Initialize each wi to zero For each <x,t> in S Do Compute o=<x,w> For each weight wi Do wi= wi +  (t-o) xi For each weight wi Do1 wi=wi+wi

Incremental Stochastic Gradient Descent Batch mode : Gradient Descent w=w -  ES[w] over the entire data S ES[w]=1/2d(td-od)2 Incremental mode: gradient descent w=w -  Ed[w] over individual training examples d Ed[w]=1/2 (td-od)2 Incremental Gradient Descent can approximate Batch Gradient Descent arbitrarily closely if  is small enough

Comparison Perceptron and Gradient Descent Rule Perceptron learning rule guaranteed to succeed if Training examples are linearly separable No guarantee otherwise Linear unit using Gradient Descent Converges to hypothesis with minimum squared error. Given sufficiently small learning rate  Even when training data contains noise Even when training data not linearly separable

Multi-Layer Networks output layer hidden layer(s) input layer

Sigmoid Unit S . x0=1 x1 w1 w0 w2 x2 o wn xn z=i=0n wi xi o=(z)=1/(1+e-z) w2 x2 S o . wn (z) =1/(1+e-z) sigmoid function. xn

Sigmoid Function (z) =1/(1+e-z) d(z)/dz= (z) (1- (z)) Gradient Decent Rule: one sigmoid function E/wi = -d(td-od) od (1-od) xi Multilayer networks of sigmoid units: backpropagation

Backpropagation: overview Make threshold units differentiable Use sigmoid functions Given a sample compute: The error The Gradient Use the chain rule to compute the Gradient

Backpropagation Motivation Consider the square error ES[w]=1/2d  S k  output (td,k-od,k)2 Gradient: ES[w] Update: w=w -  ES[w] How do we compute the Gradient?

Backpropagation: Algorithm Forward phase: Given input x, compute the output of each unit Backward phase: For each output k compute

Backpropagation: Algorithm Backward phase For each hidden unit h compute: Update weights: wi,j=wi,j+wi,j where wi,j=  j xi

Backpropagation: output node

Backpropagation: output node

Backpropagation: inner node

Backpropagation: inner node

Backpropagation: Summary Gradient descent over entire network weight vector Easily generalized to arbitrary directed graphs Finds a local, not necessarily global error minimum in practice often works well requires multiple invocations with different initial weights A variation is to include momentum term wi,j(n)=  j xi +  wi,j (n-1) Minimizes error training examples Training is fairly slow, yet prediction is fast

Expressive Capabilities of ANN Boolean functions Every boolean function can be represented by network with single hidden layer But might require exponential (in number of inputs) hidden units Continuous functions Every bounded continuous function can be approximated with arbitrarily small error, by network with one hidden layer [Cybenko 1989, Hornik 1989] Any function can be approximated to arbitrary accuracy by a network with two hidden layers [Cybenko 1988]

VC-dim of ANN A more general bound. Concept class F(C,G): G : Directed acyclic graph C: concept class, d=VC-dim(C) n: input nodes s : inner nodes (of degree r) Theorem: VC-dim(F(C,G)) < 2ds log (es)

Proof: Bound |F(C,G)(m)| Find smallest d s.t. |F(C,G)(m)| <2m Let S={x1, … , xm} For each fixed G we define a matrix U U[i,j]= ci(xj), where ci is a specific i-th concept U describes the computations of S in G TF(C,G) = number of different matrices.

Proof (continue) Clearly |F(C,G)(m)|  TF(C,G) Let G’ be G without the root. |F(C,G)(m)|  TF(C,G)  TF(C,G’) |C(m)| Inductively, |F(C,G)(m)|  |C(m)|s Recall VC Bound: |C(m)|  (em/d)d Combined bound |F(C,G)(m)| (em/d)ds

Proof (cont.) Solve for: (em/d)ds2m Holds for m  2ds log(es) QED Back to ANN: VC-dim(C)=n+1 VC(ANN)  2(n+1) log (es)