Artificial Neural Network :...

20
Artificial Neural Network : Introduction Debasis Samanta IIT Kharagpur [email protected] 23.03.2018 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 1 / 20

Transcript of Artificial Neural Network :...

Page 1: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial Neural Network : Introduction

Debasis Samanta

IIT Kharagpur

[email protected]

23.03.2018

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 1 / 20

Page 2: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Biological nervous system

Biological nervous system is the most important part of manyliving things, in particular, human beings.

There is a part called brain at the center of human nervoussystem.

In fact, any biological nervous system consists of a large numberof interconnected processing units called neurons.

Each neuron is approximately 10µm long and they can operate inparallel.

Typically, a human brain consists of approximately 1011 neuronscommunicating with each other with the help of electricalimpulses.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 2 / 20

Page 3: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Brain: Center of the nervous system

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 3 / 20

Page 4: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Neuron: Basic unit of nervous system

Dendrite of another neuron

soma

Synapse

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 4 / 20

Page 5: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Neuron and its working

Dendrite of another neuron

soma

Synapse

Figure shows a schematic of a biological neuron. There are differentparts in it : dendrite, soma, axon and synapse.

Dendrite : A bush of very thin fibre.

Axon : A long cylindrical fibre.

Soma : It is also called a cell body, and just like as a nucleus ofcell.

Synapse : It is a junction where axon makes contact with thedendrites of neighboring dendrites.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 5 / 20

Page 6: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Neuron and its working

There is a chemical in each neuron called neurotransmitter.

A signal (also called sense) is transmitted across neurons by thischemical.

That is, all inputs from other neuron arrive to a neurons throughdendrites.These signals are accumulated at the synapse of the neuron andthen serve as the output to be transmitted through the neuron.

An action may produce an electrical impulse, which usually lastsfor about a millisecond.

Note that this pulse generated due to an incoming signal and allsignal may not produce pulses in axon unless it crosses athreshold value.Also, note that an action signal in axon of a neuron is commutativesignals arrive at dendrites which summed up at soma.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 6 / 20

Page 7: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Neuron and its working

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 7 / 20

Page 8: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

In fact, the human brain is a highly complex structure viewed as amassive, highly interconnected network of simple processingelements called neurons.

Artificial neural networks (ANNs) or simply we refer it as neuralnetwork (NNs), which are simplified models (i.e. imitations) of thebiological nervous system, and obviously, therefore, have beenmotivated by the kind of computing performed by the human brain.

The behavior of a biolgical neural network can be captured by asimple model called artificial neural network.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 8 / 20

Page 9: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Analogy between BNN and ANN

x1

x2

x3

xn

w1

w2

w3

wn

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 9 / 20

Page 10: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

We may note that a neutron is a part of an interconnected network ofnervous system and serves the following.

Compute input signals

Transportation of signals (at a very high speed)

Storage of information

Perception, automatic training and learning

We also can see the analogy between the biological neuron andartificial neuron. Truly, every component of the model (i.e. artificialneuron) bears a direct analogy to that of a biological neuron. It is thismodel which forms the basis of neural network (i.e. artificial neuralnetwork).

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 10 / 20

Page 11: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

…..

x1

x2

x3

xn

w1

w2

w3

wn

input weightSummation

unitThreshold unit output

Here, x1, x2, · · · , xn are the n inputs to the artificial neuron.

w1,w2, · · · ,wn are weights attached to the input links.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 11 / 20

Page 12: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

Note that, a biological neuron receives all inputs through thedendrites, sums them and produces an output if the sum isgreater than a threshold value.

The input signals are passed on to the cell body through thesynapse, which may accelerate or retard an arriving signal.

It is this acceleration or retardation of the input signals that ismodeled by the weights.

An effective synapse, which transmits a stronger signal will have acorrespondingly larger weights while a weak synapse will havesmaller weights.

Thus, weights here are multiplicative factors of the inputs toaccount for the strength of the synapse.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 12 / 20

Page 13: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

Hence, the total input say I received by the soma of the artificialneuron is

I = w1x1 + w2x2 + · · · + wnxn =∑n

i=1 wixi

To generate the final output y , the sum is passed to a filter φcalled transfer function, which releases the output.That is, y = φ(I)

…..

x1

x2

x3

xn

w1

w2

w3

wn

input weightSummation

unitThreshold unit output

I

Ø(I)

y

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 13 / 20

Page 14: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

A very commonly known transfer function is the thresholdingfunction.

In this thresholding function, sum (i.e. I) is compared with athreshold value θ.

If the value of I is greater than θ, then the output is 1 else it is 0(this is just like a simple linear filter).In other words,

y = φ(∑n

i=1 wixi − θ)

where

φ(I) =

{1 , if I > θ0 , if I ≤ θ

Such a Φ is called step function (also known as Heaviside function).

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 14 / 20

Page 15: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Artificial neural network

Following figures illustrates two simple thresholding functions.

+1.0

-1.0

(I)(I)

0

output

input

(a) Hard-limit transfer function (b) Signum transfer function

I

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 15 / 20

Page 16: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Transformation functions

Hard-limit transfer function : The transformation we have justdiscussed is called hard-limit transfer function. It is generally usedin perception neuron.In other words,

φ(I) =

{1 , if I > θ0 , if I ≤ θ

Linear transfer function : The output of the transfer function ismade equal to its input (normalized) and its lies in the range of−1.0 to +1.0. It is also known as Signum or Quantizer functionand it defined as

φ(I) =

{+1 , if I > θ−1 , if I ≤ θ

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 16 / 20

Page 17: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Other transformation functions

Sigmoid transfer function : This function is a continuousfunction that varies gradually between the asymptotic values 0and 1 (called log-sigmoid) or -1 and +1 (called Tan-sigmoid)threshold function and is given by

φ(I) = 11+e−αI [log-Sigmoid]

φ(I) = tanh(I) = eαI−e−αI

eαI+e−αI [tan-Sigmoid]

Here, α is the coefficient of transfer function.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 17 / 20

Page 18: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Transfer functions in ANN

(b) Tan-Sigmoid transfer function

-1

(I)

α=10

α=0.3

α=0.5α=1.0

1

1-10

-1

(I)

α=10

α=0.3

α=0.5α=1.0

1

1-1

0

(a) Log-Sigmoid transfer function

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 18 / 20

Page 19: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Advantages of ANN

ANNs exhibits mapping capabilities, that is, they can map inputpatterns to their associated output pattern.

The ANNs learn by examples. Thus, an ANN architecture can betrained with known example of a problem before they are tested fortheir inference capabilities on unknown instance of the problem. Inother words, they can identify new objects previous untrained.

The ANNs posses the capability to generalize. This is the powerto apply in application where exact mathematical model toproblem are not possible.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 19 / 20

Page 20: Artificial Neural Network : Introductioncse.iitkgp.ac.in/~dsamanta/courses/sca/resources/slides/NN-01... · The behavior of a biolgical neural network can be captured by a simple

Advantages of ANN

The ANNs are robust system and fault tolerant. They cantherefore, recall full patterns from incomplete, partial or noisypatterns.

The ANNS can process information in parallel, at high speed andin a distributed manner. Thus a massively parallel distributedprocessing system made up of highly interconnected (artificial)neural computing elements having ability to learn and acquireknowledge is possible.

Debasis Samanta (IIT Kharagpur) Soft Computing Applications 23.03.2018 20 / 20