The Backpropagation Algorithm

Transcription

1 7 The Backpropagation Algorithm 7. Learning as gradient descent We saw in the last chapter that multilayered networks are capable of computing a wider range of Boolean functions than networks with a single layer of computing units. However the computational effort needed for finding the correct combination of weights increases substantially when more parameters and more complicated topologies are considered. In this chapter we discuss a popular learning method capable of handling such large learning problems the backpropagation algorithm. This numerical method was used by different research communities in different contexts, was discovered and rediscovered, until in 985 it found its way into connectionist AI mainly through the work of the PDP group [382]. It has been one of the most studied and used algorithms for neural networks learning ever since. In this chapter we present a proof of the backpropagation algorithm based on a graphical approach in which the algorithm reduces to a graph labeling problem. This method is not only more general than the usual analytical derivations, which handle only the case of special network topologies, but also much easier to follow. It also shows how the algorithm can be efficiently implemented in computing systems in which only local information can be transported through the network. 7.. Differentiable activation functions The backpropagation algorithm looks for the minimum of the error function in weight space using the method of gradient descent. The combination of weights which minimizes the error function is considered to be a solution of the learning problem. Since this method requires computation of the gradient of the error function at each iteration step, we must guarantee the continuity and differentiability of the error function. Obviously we have to use a kind of activation function other than the step function used in perceptrons,

2 52 7 The Backpropagation Algorithm because the composite function produced by interconnected perceptrons is discontinuous, and therefore the error function too. One of the more popular activation functions for backpropagation networks is the sigmoid, a real function s c : IR (0, ) defined by the expression s c (x) = + e cx. The constant c can be selected arbitrarily and its reciprocal /c is called the temperature parameter in stochastic neural networks. The shape of the sigmoid changes according to the value of c, as can be seen in Figure 7.. The graph shows the shape of the sigmoid for c =, c = 2 and c = 3. Higher values of c bring the shape of the sigmoid closer to that of the step function and in the limit c the sigmoid converges to a step function at the origin. In order to simplify all expressions derived in this chapter we set c =, but after going through this material the reader should be able to generalize all the expressions for a variable c. In the following we call the sigmoid s (x) just s(x) x Fig. 7.. Three sigmoids (for c =, c = 2 and c = 3) The derivative of the sigmoid with respect to x, needed later on in this chapter, is d dx s(x) = e x ( + e x = s(x)( s(x)). ) 2 We have already shown that, in the case of perceptrons, a symmetrical activation function has some advantages for learning. An alternative to the sigmoid is the symmetrical sigmoid S(x) defined as S(x) = 2s(x) = e x + e x. This is nothing but the hyperbolic tangent for the argument x/2 whose shape is shown in Figure 7.2 (upper right). The figure shows four types of continuous squashing functions. The ramp function (lower right) can also be used in

3 7. Learning as gradient descent 53 learning algorithms taking care to avoid the two points where the derivative is undefined x x x x - - Fig Graphics of some squashing functions Many other kinds of activation functions have been proposed and the backpropagation algorithm is applicable to all of them. A differentiable activation function makes the function computed by a neural network differentiable (assuming that the integration function at each node is just the sum of the inputs), since the network itself computes only function compositions. The error function also becomes differentiable. Figure 7.3 shows the smoothing produced by a sigmoid in a step of the error function. Since we want to follow the gradient direction to find the minimum of this function, it is important that no regions exist in which the error function is completely flat. As the sigmoid always has a positive derivative, the slope of the error function provides a greater or lesser descent direction which can be followed. We can think of our search algorithm as a physical process in which a small sphere is allowed to roll on the surface of the error function until it reaches the bottom Regions in input space The sigmoid s output range contains all numbers strictly between 0 and. Both extreme values can only be reached asymptotically. The computing units considered in this chapter evaluate the sigmoid using the net amount of excitation as its argument. Given weights w,...,w n and a bias θ, a sigmoidal unit computes for the input x,...,x n the output + exp ( n i= w ix i θ).

4 54 7 The Backpropagation Algorithm Fig A step of the error function A higher net amount of excitation brings the unit s output nearer to. The continuum of output values can be compared to a division of the input space in a continuum of classes. A higher value of c makes the separation in input space sharper. (0,) (,) weight (0,0) (,0) Fig Continuum of classes in input space Note that the step of the sigmoid is normal to the vector (w,..., w n, θ) so that the weight vector points in the direction in extended input space in which the output of the sigmoid changes faster Local minima of the error function A price has to be paid for all the positive features of the sigmoid as activation function. The most important problem is that, under some circumstances, local minima appear in the error function which would not be there if the step function had been used. Figure 7.5 shows an example of a local minimum with a higher error level than in other regions. The function was computed for a single unit with two weights, constant threshold, and four input-output patterns in the training set. There is a valley in the error function and if

5 7.2 General feed-forward networks 55 gradient descent is started there the algorithm will not converge to the global minimum. Fig A local minimum of the error function In many cases local minima appear because the targets for the outputs of the computing units are values other than 0 or. If a network for the computation of XOR is trained to produce 0.9 at the inputs (0,) and (,0) then the surface of the error function develops some protuberances, where local minima can arise. In the case of binary target values some local minima are also present, as shown by Lisboa and Perantonis who analytically found all local minima of the XOR function [277]. 7.2 General feed-forward networks In this section we show that backpropagation can easily be derived by linking the calculation of the gradient to a graph labeling problem. This approach is not only elegant, but also more general than the traditional derivations found in most textbooks. General network topologies are handled right from the beginning, so that the proof of the algorithm is not reduced to the multilayered case. Thus one can have it both ways, more general yet simpler [375] The learning problem Recall that in our general definition a feed-forward neural network is a computational graph whose nodes are computing units and whose directed edges transmit numerical information from node to node. Each computing unit is capable of evaluating a single primitive function of its input. In fact the network represents a chain of function compositions which transform an input to an output vector (called a pattern). The network is a particular implementation of a composite function from input to output space, which we call the network function. The learning problem consists of finding the optimal combination

6 56 7 The Backpropagation Algorithm of weights so that the network function ϕ approximates a given function f as closely as possible. However, we are not given the function f explicitly but only implicitly through some examples. Consider a feed-forward network with n input and m output units. It can consist of any number of hidden units and can exhibit any desired feed-forward connection pattern. We are also given a training set {(x,t ),...,(x p,t p )} consisting of p ordered pairs of n- and m-dimensional vectors, which are called the input and output patterns. Let the primitive functions at each node of the network be continuous and differentiable. The weights of the edges are real numbers selected at random. When the input pattern x i from the training set is presented to this network, it produces an output o i different in general from the target t i. What we want is to make o i and t i identical for i =,...,p, by using a learning algorithm. More precisely, we want to minimize the error function of the network, defined as E = 2 p o i t i 2. i= After minimizing this function for the training set, new unknown input patterns are presented to the network and we expect it to interpolate. The network must recognize whether a new input vector is similar to learned patterns and produce a similar output. The backpropagation algorithm is used to find a local minimum of the error function. The network is initialized with randomly chosen weights. The gradient of the error function is computed and used to correct the initial weights. Our task is to compute this gradient recursively. x i 2(o i t i ) 2 x i 2. 2(o i 2 t i2 ) 2 network network + E i x in 2(o im t im ) 2 Fig Extended network for the computation of the error function The first step of the minimization process consists of extending the network, so that it computes the error function automatically. Figure 7.6 shows

7 7.2 General feed-forward networks 57 how this is done. Every one of the j output units of the network is connected to a node which evaluates the function 2 (o ij t ij ) 2, where o ij and t ij denote the j-th component of the output vector o i and of the target t i. The outputs of the additional m nodes are collected at a node which adds them up and gives the sum E i as its output. The same network extension has to be built for each pattern t i. A computing unit collects all quadratic errors and outputs their sum E + + E p. The output of this extended network is the error function E. We now have a network capable of calculating the total error for a given training set. The weights in the network are the only parameters that can be modified to make the quadratic error E as low as possible. Because E is calculated by the extended network exclusively through composition of the node functions, it is a continuous and differentiable function of the l weights w, w 2,..., w l in the network. We can thus minimize E by using an iterative process of gradient descent, for which we need to calculate the gradient E = ( E w, E w 2,..., E w l ). Each weight is updated using the increment w i = γ E w i for i =,...,l, where γ represents a learning constant, i.e., a proportionality parameter which defines the step length of each iteration in the negative gradient direction. With this extension of the original network the whole learning problem now reduces to the question of calculating the gradient of a network function with respect to its weights. Once we have a method to compute this gradient, we can adjust the network weights iteratively. In this way we expect to find a minimum of the error function, where E = Derivatives of network functions Now forget everything about training sets and learning. Our objective is to find a method for efficiently calculating the gradient of a one-dimensional network function according to the weights of the network. Because the network is equivalent to a complex chain of function compositions, we expect the chain rule of differential calculus to play a major role in finding the gradient of the function. We take account of this fact by giving the nodes of the network a composite structure. Each node now consists of a left and a right side, as shown in Figure 7.7. We call this kind of representation a B-diagram (for backpropagation diagram). The right side computes the primitive function associated with the node, whereas the left side computes the derivative of this primitive function for the same input.

8 58 7 The Backpropagation Algorithm f f Fig The two sides of a computing unit + s s Fig Separation of integration and activation function Note that the integration function can be separated from the activation function by splitting each node into two parts, as shown in Figure 7.8. The first node computes the sum of the incoming inputs, the second one the activation function s. The derivative of s is s and the partial derivative of the sum of n arguments with respect to any one of them is just. This separation simplifies our discussion, as we only have to think of a single function which is being computed at each node and not of two. The network is evaluated in two stages: in the first one, the feed-forward step, information comes from the left and each unit evaluates its primitive function f in its right side as well as the derivative f in its left side. Both results are stored in the unit, but only the result from the right side is transmitted to the units connected to the right. The second step, the backpropagation step, consists in running the whole network backwards, whereby the stored results are now used. There are three main cases which we have to consider. First case: function composition The B-diagram of Figure 7.9 contains only two nodes. In the feed-forward step, incoming information into a unit is used as the argument for the evaluation of the node s primitive function and its derivative. In this step the network computes the composition of the functions f and g. Figure 7.0 shows the state of the network after the feed-forward step. The correct result of the function composition has been produced at the output unit and each unit has stored some information on its left side. In the backpropagation step the input from the right of the network is the constant. Incoming information to a node is multiplied by the value stored in its left side. The result of the multiplication is transmitted to the next unit to the left. We call the result at each node the traversing value at this node. Figure 7. shows the final result of the backpropagation step, which is f (g(x))g (x), i.e., the derivative of the function composition f(g(x))

9 7.2 General feed-forward networks 59 x g g f f Fig Network for the composition of two functions function composition x g (x) g f (g(x)) f f(g(x)) Fig Result of the feed-forward step implemented by this network. The backpropagation step provides an implementation of the chain rule. Any sequence of function compositions can be evaluated in this way and its derivative can be obtained in the backpropagation step. We can think of the network as being used backwards with the input, whereby at each node the product with the value stored in the left side is computed. backpropagation f (g(x)) g (x) g (x) g f (g(x)) f Fig. 7.. Result of the backpropagation step function composition f (x) f x + f (x) + f 2 (x) f 2 (x) f 2 Fig Addition of functions

10 60 7 The Backpropagation Algorithm Second case: function addition The next case to consider is the addition of two primitive functions. Figure 7.2 shows a network for the computation of the addition of the functions f and f 2. The additional node has been included to handle the addition of the two functions. The partial derivative of the addition function with respect to any one of the two inputs is. In the feed-forward step the network computes the result f (x) + f 2 (x). In the backpropagation step the constant is fed from the left side into the network. All incoming edges to a unit fan out the traversing value at this node and distribute it to the connected units to the left. Where two right-to-left paths meet, the computed traversing values are added. Figure 7.3 shows the result f (x) + f 2(x) of the backpropagation step, which is the derivative of the function addition f + f 2 evaluated at x. A simple proof by induction shows that the derivative of the addition of any number of functions can be handled in the same way. backpropagation f (x) f f (x) + f 2 (x) + f 2 (x) f 2 Fig Result of the backpropagation step feed-forward x w wx backpropagation w w Fig Forward computation and backpropagation at an edge

11 7.2 General feed-forward networks 6 Third case: weighted edges Weighted edges could be handled in the same manner as function compositions, but there is an easier way to deal with them. In the feed-forward step the incoming information x is multiplied by the edge s weight w. The result is wx. In the backpropagation step the traversing value is multiplied by the weight of the edge. The result is w, which is the derivative of wx with respect to x. From this we conclude that weighted edges are used in exactly the same way in both steps: they modulate the information transmitted in each direction by multiplying it by the edges weight Steps of the backpropagation algorithm We can now formulate the complete backpropagation algorithm and prove by induction that it works in arbitrary feed-forward networks with differentiable activation functions at the nodes. We assume that we are dealing with a network with a single input and a single output unit. Algorithm 7.2. Backpropagation algorithm. Consider a network with a single real input x and network function F. The derivative F (x) is computed in two phases: Feed-forward: the input x is fed into the network. The primitive functions at the nodes and their derivatives are evaluated at each node. The derivatives are stored. Backpropagation: the constant is fed into the output unit and the network is run backwards. Incoming information to a node is added and the result is multiplied by the value stored in the left part of the unit. The result is transmitted to the left of the unit. The result collected at the input unit is the derivative of the network function with respect to x. The following proposition shows that the algorithm is correct. Proposition. Algorithm 7.2. computes the derivative of the network function F with respect to the input x correctly. Proof. We have already shown that the algorithm works for units in series, units in parallel and also for weighted edges. Let us make the induction assumption that the algorithm works for any feed-forward network with n or fewer nodes. Consider now the B-diagram of Figure 7.5, which contains n+ nodes. The feed-forward step is executed first and the result of the single output unit is the network function F evaluated at x. Assume that m units, whose respective outputs are F (x),..., F m (x) are connected to the output unit. Since the primitive function of the output unit is ϕ, we know that

12 62 7 The Backpropagation Algorithm F (x) w F 2 (x) x. w 2 ϕ (s) w m ϕ(s) F(x) F m (x) Fig Backpropagation at the last node F(x) = ϕ(w F (x) + w 2 F 2 (x) + + w m F m (x)). The derivative of F at x is thus F (x) = ϕ (s)(w F (x) + w 2F 2 (x) + + w mf m (x)), where s = ϕ(w F (x) + w 2 F 2 (x) + + w m F m (x)). The subgraph of the main graph which includes all possible paths from the input unit to the unit whose output is F (x) defines a subnetwork whose network function is F and which consists of n or fewer units. By the induction assumption we can calculate the derivative of F at x, by introducing a into the unit and running the subnetwork backwards. The same can be done with the units whose outputs are F 2 (x),..., F m (x). If instead of we introduce the constant ϕ (s) and multiply it by w we get w F (x)ϕ (s) at the input unit in the backpropagation step. Similarly we get w 2 F 2(x)ϕ (s),..., w m F m(x)ϕ (s) for the rest of the units. In the backpropagation step with the whole network we add these m results and we finally get ϕ (s)(w F (x) + w 2F 2 (x) + + w mf m (x)) which is the derivative of F evaluated at x. Note that introducing the constants w ϕ (s),..., w m ϕ (s) into the m units connected to the output unit can be done by introducing a into the output unit, multiplying by the stored value ϕ (s) and distributing the result to the m units through the edges with weights w, w 2,...,w m. We are in fact running the network backwards as the backpropagation algorithm demands. This means that the algorithm works with networks of n + nodes and this concludes the proof. Implicit in the above analysis is that all inputs to a node are added before the one-dimensional activation function is computed. We can consider

13 7.2 General feed-forward networks 63 also activation functions f of several variables, but in this case the left side of the unit stores all partial derivatives of f with respect to each variable. Figure 7.6 shows an example for a function f of two variables x and x 2, delivered through two different edges. In the backpropagation step each stored partial derivative is multiplied by the traversing value at the node and transmitted to the left through its own edge. It is easy to see that backpropagation still works in this more general case. x F x F F x 2 x 2 Fig Stored partial derivatives at a node The backpropagation algorithm also works correctly for networks with more than one input unit in which several independent variables are involved. In a network with two inputs for example, where the independent variables x and x 2 are fed into the network, the network result can be called F(x, x 2 ). The network function now has two arguments and we can compute the partial derivative of F with respect to x or x 2. The feed-forward step remains unchanged and all left side slots of the units are filled as usual. However, in the backpropagation step we can identify two subnetworks: one consists of all paths connecting the first input unit to the output unit and another of all paths from the second input unit to the output unit. By applying the backpropagation step in the first subnetwork we get the partial derivative of F with respect to x at the first input unit. The backpropagation step on the second subnetwork yields the partial derivative of F with respect to x 2 at the second input unit. Note that we can overlap both computations and perform a single backpropagation step over the whole network. We still get the same results Learning with backpropagation We consider again the learning problem for neural networks. Since we want to minimize the error function E, which depends on the network weights, we have to deal with all weights in the network one at a time. The feed-forward step is computed in the usual way, but now we also store the output of each unit in its right side. We perform the backpropagation step in the extended network that computes the error function and we then fix our attention on one of the weights, say w ij whose associated edge points from the i-th to the

14 64 7 The Backpropagation Algorithm j-th node in the network. This weight can be treated as an input channel into the subnetwork made of all paths starting at w ij and ending in the single output unit of the network. The information fed into the subnetwork in the feed-forward step was o i w ij, where o i is the stored output of unit i. The backpropagation step computes the gradient of E with respect to this input, i.e., E/ o i w ij. Since in the backpropagation step o i is treated as a constant, we finally have E E = o i. w ij o i w ij Summarizing, the backpropagation step is performed in the usual way. All subnetworks defined by each weight of the network can be handled simultaneously, but we now store additionally at each node i: The output o i of the node in the feed-forward step. The cumulative result of the backward computation in the backpropagation step up to this node. We call this quantity the backpropagated error. If we denote the backpropagated error at the j-th node by δ j, we can then express the partial derivative of E with respect to w ij as: E w ij = o i δ j. Once all partial derivatives have been computed, we can perform gradient descent by adding to each weight w ij the increment w ij = γo i δ j. This correction step is needed to transform the backpropagation algorithm into a learning method for neural networks. This graphical proof of the backpropagation algorithm applies to arbitrary feed-forward topologies. The graphical approach also immediately suggests hardware implementation techniques for backpropagation. 7.3 The case of layered networks An important special case of feed-forward networks is that of layered networks with one or more hidden layers. In this section we give explicit formulas for the weight updates and show how they can be calculated using linear algebraic operations. We also show how to label each node with the backpropagated error in order to avoid redundant computations.

15 7.3 The case of layered networks Extended network We will consider a network with n input sites, k hidden, and m output units. The weight between input site i and hidden unit j will be called w () ij. The weight between hidden unit i and output unit j will be called w ij. The bias θ of each unit is implemented as the weight of an additional edge. Input vectors are thus extended with a component, and the same is done with the output vector from the hidden layer. Figure 7.7 shows how this is done. The weight between the constant and the hidden unit j is called w () n+,j and the weight between the constant and the output unit j is denoted by w k+,j. k hidden units n input sites... m output units site n+ () w w n+, k k +, m connection matrix W connection matrix W 2 Fig Notation for the three-layered network There are (n + ) k weights between input sites and hidden units and (k + ) m between hidden and output units. Let W denote the (n + ) k matrix with component w () ij at the i-th row and the j-th column. Similarly let W 2 denote the (k + ) m matrix with components w ij. We use an overlined notation to emphasize that the last row of both matrices corresponds to the biases of the computing units. The matrix of weights without this last row will be needed in the backpropagation step. The n-dimensional input vector o = (o,..., o n ) is extended, transforming it to ô = (o,...,o n, ). The excitation net j of the j-th hidden unit is given by n+ net j = w () ij ôi. i= The activation function is a sigmoid and the output o () j of this unit is thus

16 66 7 The Backpropagation Algorithm ( n+ o () j = s w () ij ôi i= The excitation of all units in the hidden layer can be computed with the vector-matrix multiplication ôw. The vector o () whose components are the outputs of the hidden units is given by o () = s(ôw ), using the convention of applying the sigmoid to each component of the argument vector. The excitation of the units in the output layer is computed using the extended vector ô () = (o (),..., o() k, ). The output of the network is the m-dimensional vector o, where o = s(ô () W 2 ). These formulas can be generalized for any number of layers and allow direct computation of the flow of information in the network with simple matrix operations. ) Steps of the algorithm Figure 7.8 shows the extended network for computation of the error function. In order to simplify the discussion we deal with a single input-output pair (o,t) and generalize later to p training examples. The network has been extended with an additional layer of units. The right sides compute the quadratic deviation 2 (o i t i ) for the i-th component of the output vector and the left sides store (o i t i ). Each output unit i in the original network computes the sigmoid s and produces the output o i. Addition of the quadratic deviations gives the error E. The error function for p input-output examples can be computed by creating p networks like the one shown, one for each training pair, and adding the outputs of all of them to produce the total error of the training set. After choosing the weights of the network randomly, the backpropagation algorithm is used to compute the necessary corrections. The algorithm can be decomposed in the following four steps: i) Feed-forward computation ii) Backpropagation to the output layer iii) Backpropagation to the hidden layer iv) Weight updates The algorithm is stopped when the value of the error function has become sufficiently small.

18 68 7 The Backpropagation Algorithm From this path we can collect by simple inspection all the multiplicative terms which define the backpropagated error δ j. Therefore δ j = o j ( o j )(o j t j ), and the partial derivative we are looking for is E w ij = [o j ( o j )(o j t j )]o () i = δ j o () i. Remember that for this last step we consider the weight w ij and its input o i () a constant. to be a variable o i () w ij δ j Fig Input and backpropagated error at an edge Figure 7.20 shows the general situation we find during the backpropagation algorithm. At the input side of the edge with weight w ij we have o () i and at the output side the backpropagated error δ j. Third step: backpropagation to the hidden layer Now we want to compute the partial derivatives E/ w () ij. Each unit j in the hidden layer is connected to each unit q in the output layer with an edge of weight w jq, for q =,...,m. The backpropagated error up to unit j in the hidden layer must be computed taking into account all possible backward paths, as shown in Figure 7.2. The backpropagated error is then δ () j = o () j ( o () j ) m q= w jq δ q. Therefore the partial derivative we are looking for is E w () ij = δ () j o i. The backpropagated error can be computed in the same way for any number of hidden layers and the expression for the partial derivatives of E keeps the same analytic form.

19 7.3 The case of layered networks 69 backpropagated error input site i o i backpropagated error to the j-th hidden unit w ij () o () j ( o () j ) Σ w jq δ q o j () ( o j () ) m q = o j () hidden unit j w j w j 2 w jm δ δ δ m backpropagation Fig All paths up to input site i Fourth step: weight updates After computing all partial derivatives the network weights are updated in the negative gradient direction. A learning constant γ defines the step length of the correction. The corrections for the weights are given by and w ij = γo () i δ j, for i =,...,k + ; j =,...,m, w () ij = γo i δ () j, for i =,...,n + ; j =,...,k, where we use the convention that o n+ = o () k+ =. It is very important to make the corrections to the weights only after the backpropagated error has been computed for all units in the network. Otherwise the corrections become intertwined with the backpropagation of the error and the computed corrections do not correspond any more to the negative gradient direction. Some authors fall in this trap [6]. Note also that some books define the backpropagated error as the negative traversing value in the network. In that case the update equations for the network weights do not have a negative sign (which is absorbed by the deltas), but this is a matter of pure convention. More than one training pattern In the case of p > input-output patterns, an extended network is used to compute the error function for each of them separately. The weight corrections

20 70 7 The Backpropagation Algorithm are computed for each pattern and so we get, for example, for weight w () ij corrections w () ij, 2w () ij,..., pw () ij. The necessary update in the gradient direction is then w () ij = w () ij + 2 w () ij + + p w () ij. We speak of batch or off-line updates when the weight corrections are made in this way. Often, however, the weight updates are made sequentially after each pattern presentation (this is called on-line training). In this case the corrections do not exactly follow the negative gradient direction, but if the training patterns are selected randomly the search direction oscillates around the exact gradient direction and, on average, the algorithm implements a form of descent in the error function. The rationale for using on-line training is that adding some noise to the gradient direction can help to avoid falling into shallow local minima of the error function. Also, when the training set consists of thousands of training patterns, it is very expensive to compute the exact gradient direction since each epoch (one round of presentation of all patterns to the network) consists of many feed-forward passes and on-line training becomes more efficient [39]. the Backpropagation in matrix form We have seen that the graph labeling approach for the proof of the backpropagation algorithm is completely general and is not limited to the case of regular layered architectures. However this special case can be put into a form suitable for vector processors or special machines for linear algebraic operations. We have already shown that in a network with a hidden and an output layer (n, k and m units) the input o produces the output o = s(ô () W 2 ) where o () = s(ôw ). In the backpropagation step we only need the first n rows of matrix W. We call this n k matrix W. Similarly, the k m matrix W 2 is composed of the first k rows of the matrix W 2. We make this reduction because we do not need to backpropagate any values to the constant inputs corresponding to each bias. The derivatives stored in the feed-forward step at the k hidden units and the m output units can be written as the two diagonal matrices and D 2 = o ( o ) o 2 ( o 2 ) o m ( o m ),

INTRODUCTION TO NEURAL NETWORKS Pictures are taken from http://www.cs.cmu.edu/~tom/mlbook-chapter-slides.html http://research.microsoft.com/~cmbishop/prml/index.htm By Nobel Khandaker Neural Networks An

Linear Threshold Units w x hx (... w n x n w We assume that each feature x j and each weight w j is a real number (we will relax this later) We will study three different algorithms for learning linear

Artificial Neural Networks and Support Vector Machines CS 486/686: Introduction to Artificial Intelligence 1 Outline What is a Neural Network? - Perceptron learners - Multi-layer networks What is a Support

SOLVING LINEAR SYSTEMS Linear systems Ax = b occur widely in applied mathematics They occur as direct formulations of real world problems; but more often, they occur as a part of the numerical analysis

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

Chapter 4 Spline Curves A spline curve is a mathematical representation for which it is easy to build an interface that will allow a user to design and control the shape of complex curves and surfaces.

SUCCESSFUL PREDICTION OF HORSE RACING RESULTS USING A NEURAL NETWORK N M Allinson and D Merritt 1 Introduction This contribution has two main sections. The first discusses some aspects of multilayer perceptrons,

Neural Nets To give you an idea of how new this material is, let s do a little history lesson. The origins are typically dated back to the early 1940 s and work by two physiologists, McCulloch and Pitts.

Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

SECOND DERIVATIVE TEST FOR CONSTRAINED EXTREMA This handout presents the second derivative test for a local extrema of a Lagrange multiplier problem. The Section 1 presents a geometric motivation for the

4 Perceptron Learning 4.1 Learning algorithms for neural networks In the two preceding chapters we discussed two closely related models, McCulloch Pitts units and perceptrons, but the question of how to

Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

Lecture 6 Artificial Neural Networks 1 1 Artificial Neural Networks In this note we provide an overview of the key concepts that have led to the emergence of Artificial Neural Networks as a major paradigm

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model 1 September 004 A. Introduction and assumptions The classical normal linear regression model can be written

This document is designed to help North Carolina educators teach the Common Core (Standard Course of Study). NCDPI staff are continually updating and improving these tools to better serve teachers. Algebra

2.2. Creaseness operator 31 2.2 Creaseness operator Antonio López, a member of our group, has studied for his PhD dissertation the differential operators described in this section [72]. He has compared

2.6 Iterative Solutions of Linear Systems 143 2.6 Iterative Solutions of Linear Systems Consistent linear systems in real life are solved in one of two ways: by direct calculation (using a matrix factorization,

Algebra I Overview View unit yearlong overview here Many of the concepts presented in Algebra I are progressions of concepts that were introduced in grades 6 through 8. The content presented in this course

Applications to Data Smoothing and Image Processing I MA 348 Kurt Bryan Signals and Images Let t denote time and consider a signal a(t) on some time interval, say t. We ll assume that the signal a(t) is

238 CHAPTER 3. DISCRETE DYNAMICAL SYSTEMS WITH MANY VARIABLES 3.2 Roulette and Markov Chains In this section we will be discussing an application of systems of recursion equations called Markov Chains.

The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to

1 Determinants and the Solvability of Linear Systems In the last section we learned how to use Gaussian elimination to solve linear systems of n equations in n unknowns The section completely side-stepped

7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method

13 The Hopfield Model One of the milestones for the current renaissance in the field of neural networks was the associative model proposed by Hopfield at the beginning of the 1980s. Hopfield s approach

Chapter 7 Factorization Theorems This chapter highlights a few of the many factorization theorems for matrices While some factorization results are relatively direct, others are iterative While some factorization

LINEAR ALGEBRA MATH 27.6 SPRING 23 (COHEN) LECTURE NOTES Sets and Set Notation. Definition (Naive Definition of a Set). A set is any collection of objects, called the elements of that set. We will most

The Basics of Graphical Models David M. Blei Columbia University October 3, 2015 Introduction These notes follow Chapter 2 of An Introduction to Probabilistic Graphical Models by Michael Jordan. Many figures

LINEAR ALGEBRA W W L CHEN c W W L Chen, 1997, 2008 This chapter is available free to all individuals, on understanding that it is not to be used for financial gain, and may be downloaded and/or photocopied,

CHAPTER 4 CURVES 4.1 Introduction In order to understand the significance of curves, we should look into the types of model representations that are used in geometric modeling. Curves play a very significant

Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 10 Curves So today we are going to have a new topic. So far

NOTES ON LINEAR TRANSFORMATIONS Definition 1. Let V and W be vector spaces. A function T : V W is a linear transformation from V to W if the following two properties hold. i T v + v = T v + T v for all

Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length

PowerTeaching i3: Algebra I Mathematics Alignment to the Common Core State Standards for Mathematics Standards for Mathematical Practice and Standards for Mathematical Content for Algebra I Key Ideas and

MATHEMATICS: THE LEVEL DESCRIPTIONS In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data. Attainment target

93 CHAPTER 5 PREDICTIVE MODELING STUDIES TO DETERMINE THE CONVEYING VELOCITY OF PARTS ON VIBRATORY FEEDER 5.1 INTRODUCTION The development of an active trap based feeder for handling brakeliners was discussed

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important