Artificial Neuron and its Model

An Artificial Neuron


 figure176
Figure 2.1:   An Artificial Neuron.

The artificial neuron shown in Figure 2.1 is a very simple processing unit. The neuron has a fixed number of inputs n; each input is connected to the neuron by a weighted link wi. The neuron sums up the net input according to the equation: net = ∑i=1n xi wi or expressed as vectors net = xT w. To calculate the output a activation function f is applied to the net input of the neuron. This function is either a simple threshold function or a continuous non linear function. Two often used activation functions are:

fC(net) = {11-e-net}

fT(net) = {{ if a > θ then else }
The artificial neuron is an abstract model of the biological neuron. The strength of a connection is coded in the weight. The intensity of the input signal is modeled by using a real number instead of a temporal summation of spikes. The artificial neuron works in discrete time steps; the inputs are read and processed at one moment in time.
There are many different learning methods possible for a single neuron. Most of the supervised methods are based on the idea of changing the weight in a direction that the difference between the calculated output and the desired output is decreased. Examples of such rules are the Perceptron Learning Rule, the Widrow-Hoff Learning Rule, and the Gradient descent Learning Rule.
The Gradient descent Learning Rule operates on a differentiable activation function. The weight updates are a function of the input vector x, the calculated output f(net), the derivative of the calculated output f'(net), the desired output d, and the learning constant η.

net = xT w
Δw = ηf'(net) (d-f(net)) x
The delta rule changes the weights to minimize the error. The error is defined by the difference between the calculated output and the desired output. The weights are adjusted for one pattern in one learning step. This process is repeated with the aim to find a weight vector that minimizes the error for the entire training set.
A set of weights can only be found if the training set is linearly separable [mins69]. This limitation is independent of the learning algorithm used; it can be simply derived from the structure of the single neuron.
To illustrate this consider an artificial neuron with two inputs and a threshold activation function fT; this neuron is intended to learn the XOR-problem (see table). It can easily be shown that there are no real numbers w1 and w2 to solve the equations, and hence the neuron can not learn this problem.

Input VectorDesired OutputWeight Equation
0 010 w1 + 0 w2 > θ⇒0 > θ
1 001 w1 + 0 w2 < θ⇒w1 < θ
0 100 w1 + 1 w2 < θ⇒w2 < θ
1 111 w1 + 1 w2 > θ⇒w1 + w2 > θ



Neural Network model

A neural network is put together by hooking together many of our simple “neurons,” so that the output of a neuron can be the input of another. For example, here is a small neural network:
In this figure, we have used circles to also denote the inputs to the network. The circles labeled “+1” are called bias units, and correspond to the intercept term. The leftmost layer of the network is called theinput layer, and the rightmost layer the output layer (which, in this example, has only one node). The middle layer of nodes is called the hidden layer, because its values are not observed in the training set. We also say that our example neural network has 3 input units (not counting the bias unit), 3 hidden units, and 1 output unit.
We will let nl denote the number of layers in our network; thus nl=3 in our example. We label layer las Ll, so layer L1 is the input layer, and layer Lnl the output layer. Our neural network has parameters (W,b)=(W(1),b(1),W(2),b(2)), where we write Wij(l) to denote the parameter (or weight) associated with the connection between unit j in layer l, and unit i in layer l+1. (Note the order of the indices.) Also, bi(l) is the bias associated with unit i in layer l+1. Thus, in our example, we have W(1)3×3, and W(2)1×3. Note that bias units don’t have inputs or connections going into them, since they always output the value +1. We also let sl denote the number of nodes in layer l (not counting the bias unit).
We will write ai(l) to denote the activation (meaning output value) of unit i in layer l. For l=1, we also use ai(1)=xi to denote the i-th input. Given a fixed setting of the parameters W,b, our neural network defines a hypothesis hW,b(x) that outputs a real number. Specifically, the computation that this neural network represents is given by:
a1(2)=f(W11(1)x1+W12(1)x2+W13(1)x3+b1(1))a2(2)=f(W21(1)x1+W22(1)x2+W23(1)x3+b2(1))a3(2)=f(W31(1)x1+W32(1)x2+W33(1)x3+b3(1))hW,b(x)=a1(3)=f(W11(2)a1(2)+W12(2)a2(2)+W13(2)a3(2)+b1(2))
In the sequel, we also let zi(l) denote the total weighted sum of inputs to unit i in layer l, including the bias term (e.g., zi(2)=j=1nWij(1)xj+bi(1)), so that ai(l)=f(zi(l)).
Note that this easily lends itself to a more compact notation. Specifically, if we extend the activation function f() to apply to vectors in an element-wise fashion (i.e., f([z1,z2,z3])=[f(z1),f(z2),f(z3)]), then we can write the equations above more compactly as:
z(2)=W(1)x+b(1)a(2)=f(z(2))z(3)=W(2)a(2)+b(2)hW,b(x)=a(3)=f(z(3))
We call this step forward propagation. More generally, recalling that we also use a(1)=x to also denote the values from the input layer, then given layer l’s activations a(l), we can compute layer l+1’s activations a(l+1) as:
z(l+1)=W(l)a(l)+b(l)a(l+1)=f(z(l+1))
By organizing our parameters in matrices and using matrix-vector operations, we can take advantage of fast linear algebra routines to quickly perform calculations in our network.
We have so far focused on one example neural network, but one can also build neural networks with other architectures (meaning patterns of connectivity between neurons), including ones with multiple hidden layers. The most common choice is a nl-layered network where layer 1 is the input layer, layer nlis the output layer, and each layer l is densely connected to layer l+1. In this setting, to compute the output of the network, we can successively compute all the activations in layer L2, then layer L3, and so on, up to layer Lnl, using the equations above that describe the forward propagation step. This is one example of a feedforward neural network, since the connectivity graph does not have any directed loops or cycles.
Neural networks can also have multiple output units. For example, here is a network with two hidden layers layers L2 and L3 and two output units in layer L4:
To train this network, we would need training examples (x(i),y(i)) where y(i)2. This sort of network is useful if there’re multiple outputs that you’re interested in predicting. (For example, in a medical diagnosis application, the vector x might give the input features of a patient, and the different outputs yi’s might indicate presence or absence of different diseases.)

No comments:

Post a Comment