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.

Slides:



Advertisements
Similar presentations
© Negnevitsky, Pearson Education, Lecture 7 Artificial neural networks: Supervised learning Introduction, or how the brain works Introduction, or.
Advertisements

Perceptron Lecture 4.
Learning in Neural and Belief Networks - Feed Forward Neural Network 2001 년 3 월 28 일 안순길.
1 Machine Learning: Lecture 4 Artificial Neural Networks (Based on Chapter 4 of Mitchell T.., Machine Learning, 1997)
Artificial Neural Networks (1)
NEURAL NETWORKS Perceptron
Kostas Kontogiannis E&CE
Machine Learning: Connectionist McCulloch-Pitts Neuron Perceptrons Multilayer Networks Support Vector Machines Feedback Networks Hopfield Networks.
Artificial Intelligence (CS 461D)
The back-propagation training algorithm
Prénom Nom Document Analysis: Artificial Neural Networks Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
1 Chapter 11 Neural Networks. 2 Chapter 11 Contents (1) l Biological Neurons l Artificial Neurons l Perceptrons l Multilayer Neural Networks l Backpropagation.
Rutgers CS440, Fall 2003 Neural networks Reading: Ch. 20, Sec. 5, AIMA 2 nd Ed.
Prénom Nom Document Analysis: Artificial Neural Networks Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
Data Mining with Neural Networks (HK: Chapter 7.5)
CS 4700: Foundations of Artificial Intelligence
CS 484 – Artificial Intelligence
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
Traffic Sign Recognition Using Artificial Neural Network Radi Bekker
Artificial neural networks:
Artificial neural networks:
1 Introduction to Artificial Neural Networks Andrew L. Nelson Visiting Research Faculty University of South Florida.
Neurons, Neural Networks, and Learning 1. Human brain contains a massively interconnected net of (10 billion) neurons (cortical cells) Biological.
MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way
Artificial Neural Networks (ANN). Output Y is 1 if at least two of the three inputs are equal to 1.
Artificial Neural Networks
Artificial Neural Nets and AI Connectionism Sub symbolic reasoning.
2101INT – Principles of Intelligent Systems Lecture 10.
Neural Networks AI – Week 23 Sub-symbolic AI Multi-Layer Neural Networks Lee McCluskey, room 3/10
Waqas Haider Khan Bangyal. Multi-Layer Perceptron (MLP)
1 Chapter 6: Artificial Neural Networks Part 2 of 3 (Sections 6.4 – 6.6) Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath.
Machine Learning Dr. Shazzad Hosain Department of EECS North South Universtiy
1 Machine Learning The Perceptron. 2 Heuristic Search Knowledge Based Systems (KBS) Genetic Algorithms (GAs)
Artificial Neural Network Supervised Learning دكترمحسن كاهاني
NEURAL NETWORKS FOR DATA MINING
 Diagram of a Neuron  The Simple Perceptron  Multilayer Neural Network  What is Hidden Layer?  Why do we Need a Hidden Layer?  How do Multilayer.
LINEAR CLASSIFICATION. Biological inspirations  Some numbers…  The human brain contains about 10 billion nerve cells ( neurons )  Each neuron is connected.
Artificial Intelligence Techniques Multilayer Perceptrons.
10/17/2015Intelligent Systems and Soft Computing1 Lecture 7 Artificial neural networks: Supervised learning Introduction, or how the brain works Introduction,
1 Chapter 11 Neural Networks. 2 Chapter 11 Contents (1) l Biological Neurons l Artificial Neurons l Perceptrons l Multilayer Neural Networks l Backpropagation.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Neural Networks.
Multi-Layer Perceptron
Non-Bayes classifiers. Linear discriminants, neural networks.
Neural Network Basics Anns are analytical systems that address problems whose solutions have not been explicitly formulated Structure in which multiple.
Introduction to Neural Networks Introduction to Neural Networks Applied to OCR and Speech Recognition An actual neuron A crude model of a neuron Computational.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
EEE502 Pattern Recognition
Neural Networks 2nd Edition Simon Haykin
Artificial Intelligence CIS 342 The College of Saint Rose David Goldschmidt, Ph.D.
Chapter 6 Neural Network.
Bab 5 Classification: Alternative Techniques Part 4 Artificial Neural Networks Based Classifer.
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
 Negnevitsky, Pearson Education, Lecture 7 Artificial neural networks: Supervised learning n Introduction, or how the brain works n The neuron.
Learning with Neural Networks Artificial Intelligence CMSC February 19, 2002.
CSE343/543 Machine Learning Mayank Vatsa Lecture slides are prepared using several teaching resources and no authorship is claimed for any slides.
Neural networks.
Neural Networks.
Learning with Perceptrons and Neural Networks
Artificial Intelligence (CS 370D)
Artificial neural networks:
Real Neurons Cell structures Cell body Dendrites Axon
CSE 473 Introduction to Artificial Intelligence Neural Networks
Intelligent Systems and Soft Computing
with Daniel L. Silver, Ph.D. Christian Frey, BBA April 11-12, 2017
CSE P573 Applications of Artificial Intelligence Neural Networks
Data Mining with Neural Networks (HK: Chapter 7.5)
CSE 573 Introduction to Artificial Intelligence Neural Networks
network of simple neuron-like computing elements
David Kauchak CS158 – Spring 2019
Presentation transcript:

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 on the structure and inner workings of the brain?

The Brain The human brain consists of: Approximately 10 billion neurons …and 60 trillion connections The brain is a highly complex, nonlinear, parallel information-processing system By firing neurons simultaneously, the brain performs faster than the fastest computers in existence today

The human brain consists of: Approximately 10 billion neurons …and 60 trillion connections ( synapses )

An individual neuron has a very simple structure Cell body is called a soma Small connective fibers are called dendrites Single long fibers are called axons An army of such elements constitutes tremendous processing power

Artificial Neural Networks An artificial neural network consists of a number of very simple processors called neurons Neurons are connected by weighted links The links pass signals from one neuron to another based on predefined thresholds

Artificial Neural Networks An individual neuron (McCulloch & Pitts, 1943): Computes the weighted sum of the input signals Compares the result with a threshold value,  If the net input is less than the threshold, the neuron output is –1 (or 0) Otherwise, the neuron becomes activated and its output is +1

Artificial Neural Networks X = x 1 w 1 + x 2 w x n w n  threshold

Activation Functions Individual neurons adhere to an activation function, which determines whether they propagate their signal (i.e. activate ) or not: Sign Function

Activation Functions

The step, sign, and sigmoid activation functions are also often called hard limit functions We use such functions in decision-making neural networks Support classification and other pattern recognition tasks

Perceptrons Can an individual neuron learn? In 1958, Frank Rosenblatt introduced a training algorithm that provided the first procedure for training a single-node neural network Rosenblatt’s perceptron model consists of a single neuron with adjustable synaptic weights, followed by a hard limiter

Perceptrons X = x 1 w 1 + x 2 w 2 Y = Y step

Perceptrons A perceptron: Classifies inputs x 1, x 2,..., x n into one of two distinct classes A 1 and A 2 Forms a linearly separable function defined by:

Perceptrons Perceptron with three inputs x 1, x 2, and x 3 classifies its inputs into two distinct sets A 1 and A 2

Perceptrons How does a perceptron learn? A perceptron has initial (often random) weights typically in the range [-0.5, 0.5] Apply an established training dataset Calculate the error as expected output minus actual output : error e = Y expected – Y actual Adjust the weights to reduce the error

Perceptrons How do we adjust a perceptron’s weights to produce Y expected ? If e is positive, we need to increase Y actual (and vice versa) Use this formula:, where and α is the learning rate (between 0 and 1) e is the calculated error

Perceptron Example – AND Train a perceptron to recognize logical AND Use threshold Θ = 0.2 and learning rate α = 0.1

Perceptron Example – AND Train a perceptron to recognize logical AND Use threshold Θ = 0.2 and learning rate α = 0.1

Perceptron Example – AND Repeat until convergence i.e. final weights do not change and no error Use threshold Θ = 0.2 and learning rate α = 0.1

Perceptron Example – AND Two-dimensional plot of logical AND operation: A single perceptron can be trained to recognize any linear separable function Can we train a perceptron to recognize logical OR? How about logical exclusive-OR (i.e. XOR)?

Perceptron – OR and XOR Two-dimensional plots of logical OR and XOR:

Perceptron Coding Exercise Write a code to: Calculate the error at each step Modify weights, if necessary i.e. if error is non-zero Loop until all error values are zero for a full epoch Modify your code to learn to recognize the logical OR operation Try to recognize the XOR operation....

Multilayer neural networks consist of: An input layer of source neurons One or more hidden layers of computational neurons An output layer of more computational neurons Input signals are propagated in a layer-by-layer feedforward manner Multilayer Neural Networks

I n p u t S i g n a l s O u t p u t S i g n a l s

Multilayer Neural Networks I n p u t S i g n a l s p u t S i g n a l s O u t p u t S i g n a l s

Multilayer Neural Networks X INPUT = x 1 X H = x 1 w 11 + x 2 w x i w i x n w n1 X OUTPUT = y H1 w 11 + y H2 w y Hj w j y Hm w m1

Three-layer network: Multilayer Neural Networks w 14

Commercial-quality neural networks often incorporate 4 or more layers Each layer consists of about individual neurons Experimental and research-based neural networks often use 5 or 6 (or more) layers Overall, millions of individual neurons may be used Multilayer Neural Networks

A back-propagation neural network is a multilayer neural network that propagates error backwards through the network as it learns Weights are modified based on the calculated error Training is complete when the error is below a specified threshold e.g. less than Back-Propagation NNs

Use the sigmoid activation function; and apply Θ by connecting fixed input -1 to weight Θ w 14 Initially: w13 = 0.5, w14 = 0.9, w23 = 0.4, w24 = 1.0,  w35 = -1.2, w45 = 1.1,  3 = 0.8,  4 = -0.1 and  5 = 0.3.

33 Step 2: Activation Activate the back-propagation neural network by applying inputs x 1 (p), x 2 (p),…, x n (p) and desired outputs y d,1 (p), y d,2 (p),…, y d,n (p). (a) Calculate the actual outputs of the neurons in the hidden layer: where n is the number of inputs of neuron j in the hidden layer, and sigmoid is the sigmoid activation function.

34 (b) Calculate the actual outputs of the neurons in the output layer: Step 2 : Activation (continued) where m is the number of inputs of neuron k in the output layer.

35 We consider a training set where inputs x 1 and x 2 are equal to 1 and desired output y d,5 is 0. The actual outputs of neurons 3 and 4 in the hidden layer are calculated as We consider a training set where inputs x 1 and x 2 are equal to 1 and desired output y d,5 is 0. The actual outputs of neurons 3 and 4 in the hidden layer are calculated as Now the actual output of neuron 5 in the output layer is determined as: Now the actual output of neuron 5 in the output layer is determined as: Thus, the following error is obtained: Thus, the following error is obtained:

10/16/2015Intelligent Systems and Soft Computing36 Step 3: Weight training Update the weights in the back-propagation network propagating backward the errors associated with output neurons. (a) Calculate the error gradient for the neurons in the output layer: where Calculate the weight corrections: Update the weights at the output neurons:

10/16/2015Intelligent Systems and Soft Computing37 (b) Calculate the error gradient for the neurons in the hidden layer: Step 3: Weight training (continued) Calculate the weight corrections: Update the weights at the hidden neurons:

10/16/2015Intelligent Systems and Soft Computing38 The next step is weight training. To update the weights and threshold levels in our network, we propagate the error, e, from the output layer backward to the input layer. The next step is weight training. To update the weights and threshold levels in our network, we propagate the error, e, from the output layer backward to the input layer. First, we calculate the error gradient for neuron 5 in the output layer: First, we calculate the error gradient for neuron 5 in the output layer: Then we determine the weight corrections assuming that the learning rate parameter, , is equal to 0.1: Then we determine the weight corrections assuming that the learning rate parameter, , is equal to 0.1:

10/16/2015Intelligent Systems and Soft Computing39 Next we calculate the error gradients for neurons 3 and 4 in the hidden layer: Next we calculate the error gradients for neurons 3 and 4 in the hidden layer: We then determine the weight corrections: We then determine the weight corrections:

10/16/2015Intelligent Systems and Soft Computing40 At last, we update all weights and threshold: At last, we update all weights and threshold: The training process is repeated until the sum of squared errors is less than The training process is repeated until the sum of squared errors is less than