Artificial Intelligence CSC 361 Dr Yousef AlOhali Computer

  • Slides: 33
Download presentation
Artificial Intelligence CSC 361 Dr. Yousef Al-Ohali Computer Science Depart. CCIS – King Saud

Artificial Intelligence CSC 361 Dr. Yousef Al-Ohali Computer Science Depart. CCIS – King Saud University Saudi Arabia yousef@ccis. edu. sa http: //faculty. ksu. edu. sa/YAlohali

Intelligent Systems Part II: Neural Nets

Intelligent Systems Part II: Neural Nets

Developing Intelligent Program Systems Machine Learning : Neural Nets n n Artificial Neural Networks:

Developing Intelligent Program Systems Machine Learning : Neural Nets n n Artificial Neural Networks: Artificial Neural Networks are crude attempts to model the highly massive parallel and distributed processing we believe takes place in the brain. Two main areas of activity: n Biological: Try to model biological neural systems. n Computational: develop powerful applications.

Developing Intelligent Program Systems Machine Learning : Neural Nets Neural nets can be used

Developing Intelligent Program Systems Machine Learning : Neural Nets Neural nets can be used to answer the following: n Pattern recognition: Does that image contain a face? n Classification problems: Is this cell defective? n Prediction: Given these symptoms, the patient has disease X n n n Forecasting: predicting behavior of stock market Handwriting: is character recognized? Optimization: Find the shortest path for the TSP.

Developing Intelligent Program Systems Machine Learning : Neural Nets Strength and Weaknesses of ANN

Developing Intelligent Program Systems Machine Learning : Neural Nets Strength and Weaknesses of ANN n Examples may be described by a large number of attributes (e. g. , pixels in an image). n Data may contain errors. n The time for training may be extremely long. n Evaluating the network for a new example is relatively fast. n Interpretability of the final hypothesis is not relevant (the NN is treated as a black box).

Artificial Neural Networks Biological Neuron

Artificial Neural Networks Biological Neuron

The Neuron n The neuron receives nerve impulses through its dendrites. It then sends

The Neuron n The neuron receives nerve impulses through its dendrites. It then sends the nerve impulses through its axon to the terminal buttons where neurotransmitters are released to simulate other neurons.

The neuron n The unique components are: n n Cell body or soma which

The neuron n The unique components are: n n Cell body or soma which contains the nucleus The dendrites The axon The synapses

The neuron - dendrites n n n The dendrites are short fibers (surrounding the

The neuron - dendrites n n n The dendrites are short fibers (surrounding the cell body) that receive messages The dendrites are very receptive to connections from other neurons. The dendrites carry signals from the synapses to the soma.

The neuron - axon n The axon is a long extension from the soma

The neuron - axon n The axon is a long extension from the soma that transmits messages Each neuron has only one axon. The axon carries action potentials from the soma to the synapses.

The neuron - synapses n n n The synapses are the connections made by

The neuron - synapses n n n The synapses are the connections made by an axon to another neuron. They are tiny gaps between axons and dendrites (with chemical bridges) that transmit messages A synapse is called excitatory if it raises the local membrane potential of the post synaptic cell. Inhibitory if the potential is lowered.

Artificial Neural Networks History of ANNs

Artificial Neural Networks History of ANNs

History of Artificial Neural Networks n 1943: Mc. Culloch and Pitts proposed a model

History of Artificial Neural Networks n 1943: Mc. Culloch and Pitts proposed a model of a neuron --> Perceptron n 1960 s: Widrow and Hoff explored Perceptron networks (which they called “Adalines”) and the delta rule. n 1962: Rosenblatt proved the convergence of the perceptron training rule. n n 1969: Minsky and Papert showed that the Perceptron cannot deal with nonlinearly-separable data sets---even those that represent simple function such as X-OR. 1970 -1985: Very little research on Neural Nets 1986: Invention of Backpropagation [Rumelhart and Mc. Clelland, but also Parker and earlier on: Werbos] which can learn from nonlinearlyseparable data sets. Since 1985: A lot of research in Neural Nets

Artificial Neural Networks artificial Neurons

Artificial Neural Networks artificial Neurons

Artificial Neuron • • Incoming signals to a unit are combined by summing their

Artificial Neuron • • Incoming signals to a unit are combined by summing their weighted values Output function: Activation functions include Step function, Linear function, Sigmoid function, … x 1 w 1 Inputs xp wp 1 f( ) Output=f( ) w 0 xiwi

Activation functions Step function Sign function Linear function Sigmoid (logistic) function step(x) = 1,

Activation functions Step function Sign function Linear function Sigmoid (logistic) function step(x) = 1, if x >= threshold sign(x) = +1, if x >= 0 -1, if x < 0 0, if x < threshold sigmoid(x) = 1/(1+e-x) (in picture above, threshold = 0) pl(x) =x Adding an extra input with activation a 0 = -1 and weight W 0, j = t (called the bias weight) is equivalent to having a threshold at t. This way we can always assume a 0 threshold.

Real vs. Artificial Neurons dendrites cell axon synapse dendrites x 0 w 0 Threshold

Real vs. Artificial Neurons dendrites cell axon synapse dendrites x 0 w 0 Threshold units o xn wn

Neurons as Universal computing machine n In 1943, Mc. Culloch and Pitts showed that

Neurons as Universal computing machine n In 1943, Mc. Culloch and Pitts showed that a synchronous assembly of such neurons is a universal computing machine. That is, any Boolean function can be implemented with threshold (step function) units.

Implementing AND -1 x 1 1 W=1. 5 o(x 1, x 2) x 2

Implementing AND -1 x 1 1 W=1. 5 o(x 1, x 2) x 2 1

Implementing OR -1 x 1 1 W=0. 5 o(x 1, x 2) x 2

Implementing OR -1 x 1 1 W=0. 5 o(x 1, x 2) x 2 1 o(x 1, x 2) = 1 if – 0. 5 + x 1 + x 2 > 0 = 0 otherwise

Implementing NOT -1 W=-0. 5 x 1 -1 o(x 1)

Implementing NOT -1 W=-0. 5 x 1 -1 o(x 1)

Implementing more complex Boolean functions x 1 1 x 2 1 -1 0. 5

Implementing more complex Boolean functions x 1 1 x 2 1 -1 0. 5 x 1 or x 2 -1 1 x 3 1 1. 5 (x 1 or x 2) and x 3

Artificial Neural Networks n When using ANN, we have to define: n Artificial Neuron

Artificial Neural Networks n When using ANN, we have to define: n Artificial Neuron Model n ANN Architecture n Learning mode

Artificial Neural Networks ANN Architecture

Artificial Neural Networks ANN Architecture

ANN Architecture n n Feedforward: Links are unidirectional, and there are no cycles, i.

ANN Architecture n n Feedforward: Links are unidirectional, and there are no cycles, i. e. , the network is a directed acyclic graph (DAG). Units are arranged in layers, and each unit is linked only to units in the next layer. There is no internal state other than the weights. Recurrent: Links can form arbitrary topologies, which can implement memory. Behavior can become unstable, oscillatory, or chaotic.

Artificial Neural Network Feedforward Network Output layer fully connected Hidden layers Input layer sparsely

Artificial Neural Network Feedforward Network Output layer fully connected Hidden layers Input layer sparsely connected

Artificial Neural Network Feed. Forward Architecture n Information flow unidirectional n Multi-Layer Perceptron (MLP)

Artificial Neural Network Feed. Forward Architecture n Information flow unidirectional n Multi-Layer Perceptron (MLP) n Radial Basis Function (RBF) n Kohonen Self. Organising Map (SOM)

Artificial Neural Network Recurrent Architecture n n n Feedback connections Hopfield Neural Networks: Associative

Artificial Neural Network Recurrent Architecture n n n Feedback connections Hopfield Neural Networks: Associative memory Adaptive Resonance Theory (ART)

Artificial Neural Network Learning paradigms n Supervised learning: n n Teacher presents ANN input-output

Artificial Neural Network Learning paradigms n Supervised learning: n n Teacher presents ANN input-output pairs, ANN weights adjusted according to error n n n Classification Control Function approximation Associative memory Unsupervised learning: n no teacher n Clustering

ANN capabilities n n n n Learning Approximate reasoning Generalisation capability Noise filtering Parallel

ANN capabilities n n n n Learning Approximate reasoning Generalisation capability Noise filtering Parallel processing Distributed knowledge base Fault tolerance

Main Problems with ANN n Contrary to Expert sytems, with ANN the Knowledge base

Main Problems with ANN n Contrary to Expert sytems, with ANN the Knowledge base is not transparent (black box) n Learning sometimes difficult/slow n Limited storage capability

Some applications of ANNs n Pronunciation: NETtalk program (Sejnowski & Rosenberg 1987) is a

Some applications of ANNs n Pronunciation: NETtalk program (Sejnowski & Rosenberg 1987) is a neural network that learns to pronounce written text: maps characters strings into phonemes (basic sound elements) for learning speech from text n Speech recognition n Handwritten character recognition: a network designed to read zip codes on hand-addressed envelops n ALVINN (Pomerleau) is a neural network used to control vehicles steering direction so as to follow road by staying in the middle of its lane n Face recognition n Backgammon learning program n Forecasting e. g. , predicting behavior of stock market

When to use ANNs? n Input is high-dimensional discrete or real-valued (e. g. raw

When to use ANNs? n Input is high-dimensional discrete or real-valued (e. g. raw sensor input). n Inputs can be highly correlated or independent. n Output is discrete or real valued n Output is a vector of values n Possibly noisy data. Data may contain errors n Form of target function is unknown n Long training time are acceptable n Fast evaluation of target function is required n Human readability of learned target function is unimportant ⇒ ANN is much like a black-box