Example: confidence

Notes on Convolutional Neural Networks - Cogprints

Notes on Convolutional Neural NetworksJake BouvrieCenter for Biological and Computational LearningDepartment of Brain and Cognitive SciencesMassachusetts Institute of TechnologyCambridge, MA 22, 20061 IntroductionThis document discusses the derivation and implementation of Convolutional Neural Networks (CNNs) [3, 4], followed by a few straightforward extensions. Convolutional Neural Networks in-volve many more connections than weights; the architecture itself realizes a form of addition, a Convolutional network automatically provides some degree of translation particular kind of Neural network assumes that we wish to learnfilters, in a data-driven fash-ion, as a means to extract features describing the inputs. The derivation we present is specific totwo-dimensional data and convolutions, but can be extended without much additional effort to anarbitrary number of begin with a description of classical backpropagation in fully connected Networks , followed by aderivation of the backpropagation updates for the filtering and subsampling layers in a 2D convolu-tional Neural

Convolutional neural networks in-volve many more connections than weights; the architecture itself realizes a form of regularization. In addition, a convolutional network automatically provides some degree of translation invariance. This particular kind of neural network assumes that we wish to learn filters, in a data-driven fash-

Tags:

  Network, Neural network, Neural, Convolutional, Convolutional networks, Convolutional neural

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Notes on Convolutional Neural Networks - Cogprints

1 Notes on Convolutional Neural NetworksJake BouvrieCenter for Biological and Computational LearningDepartment of Brain and Cognitive SciencesMassachusetts Institute of TechnologyCambridge, MA 22, 20061 IntroductionThis document discusses the derivation and implementation of Convolutional Neural Networks (CNNs) [3, 4], followed by a few straightforward extensions. Convolutional Neural Networks in-volve many more connections than weights; the architecture itself realizes a form of addition, a Convolutional network automatically provides some degree of translation particular kind of Neural network assumes that we wish to learnfilters, in a data-driven fash-ion, as a means to extract features describing the inputs. The derivation we present is specific totwo-dimensional data and convolutions, but can be extended without much additional effort to anarbitrary number of begin with a description of classical backpropagation in fully connected Networks , followed by aderivation of the backpropagation updates for the filtering and subsampling layers in a 2D convolu-tional Neural network .

2 Throughout the discussion, we emphasize efficiency of the implementation,and give small snippets of MATLAB code to accompany the equations. The importance of writingefficient code when it comes to CNNs cannot be overstated. We then turn to the topic of learninghow to combine feature maps from previous layers automatically, and consider in particular, learningsparse combinations of feature : This rough note could contain errors, exaggerations, and false Vanilla Back-propagation Through Fully Connected NetworksIn typical Convolutional Neural Networks you might find in the literature, the early analysis consists ofalternating convolution and sub-sampling operations, while the last stage of the architecture consistsof a generic multi-layer network : the last few layers (closest to the outputs) will be fully connected1-dimensional layers.

3 When you re ready to pass the final 2D feature maps as inputs to the fullyconnected 1-D network , it is often convenient to just concatenate all the features present in all theoutput maps into one long input vector, and we re back to vanilla backpropagation. The standardbackprop algorithm will be described before going onto specializing the algorithm to the case ofconvolutional Networks (see [1] for more details). Feedforward PassIn the derivation that follows, we will consider the squared-error loss function. For a multiclassproblem withcclasses andNtraining examples, this error is given byEN=12N n=1c k=1(tnk ynk) thek-th dimension of then-th pattern s corresponding target (label), andynkis similarlythe value of thek-th output layer unit in response to then-th input pattern.

4 For multiclass classifi-cation problems, the targets will typically be organized as a one-of-c code where thek-th elementoftnis positive if the patternxnbelongs to classk. The rest of the entries oftnwill be either zeroor negative depending on the choice of your output activation function (to be discussed below).Because the error over the whole dataset is just a sum over the individual errors on each pattern, wewill consider backpropagation with respect to a single pattern, say then-th one:En=12c k=1(tnk ynk)2=12 tn yn 22.(1)With ordinary fully connected layers, we can compute the derivatives ofEwith respect to the net-work weights using backpropagation rules of the following form. Let`denote the current layer,with the output layer designated to be layerLand the input layer designated to be layer1.

5 Definethe output of this layer to bex`=f(u`),withu`=W`x` 1+b`(2)where the output activation functionf( )is commonly chosen to be the logistic (sigmoid) functionf(x) = (1 +e x) 1or the hyperbolic tangent functionf(x) =atanh(bx). The logistic functionmaps[ ,+ ] [0,1], while the hyperbolic tangent maps[ ,+ ] [ a,+a]. Thereforewhile the outputs of the hyperbolic tangent function will typically be near zero, the outputs of asigmoid will be non-zero on average. However, normalizing your training data to have mean 0 andvariance 1 along the features can often improve convergence during gradient descent [5]. With anormalized dataset, the hyperbolic tangent function is thus preferrable. LeCun recommendsa= 2/3, so that the point of maximum nonlinearity occurs atf( 1) = 1and will thusavoid saturation during training if the desired training targets are normalized to take on the values 1[5].

6 Backpropagation PassThe errors which we propagate backwards through the network can be thought of as sensitivities of each unit with respect to perturbations of the bias1. That is to say, E b= E u u b= (3)since in this case u b= 1. So the bias sensitivity and the derivative of the error with respect to aunit s total input is equivalent. It is this derivative that is backpropagated from higher layers to lowerlayers, using the following recurrence relation: `= (W`+1)T `+1 f (u`)(4)where denotes element-wise multiplication. For the error function (1), the sensitivities for theoutput layer neurons will take a slightly different form: L=f (uL) (yn tn).Finally, the delta rule for updating a weight assigned to a given neuron is just a copy of the inputsto that neuron, scaled by the neuron s delta.

7 In vector form, this is computed as an outer productbetween the vector of inputs (which are the outputs from the previous layer) and the vector ofsensitivities: E W`=x` 1( `)T(5) W`= E W`(6)with analogous expressions for the bias update given by (3). In practice there is often a learning rateparameter ijspecific to each weight(W) nifty interpretation is due to Sebastian Seung3 Convolutional Neural NetworksTypically Convolutional layers are interspersed with sub-sampling layers to reduce computation timeand to gradually build up furtherspatialandconfiguralinvariance. A small sub-sampling factor isdesirable however in order to maintainspecificityat the same time. Of course, this idea is not new,but the concept is both simple and powerful.

8 The mammalian visual cortex and models thereof [12,8, 7] draw heavily on these themes, and auditory neuroscience has revealed in the past ten yearsor so that these same design paradigms can be found in the primary and belt auditory areas of thecortex in a number of different animals [6, 11, 9]. Hierarchical analysis and learning architecturesmay yet be the key to success in the auditory Convolution LayersLet s move forward with deriving the backpropagation updates for Convolutional layers in a a convolution layer, the previous layer s feature maps are convolved with learnable kernels andput through the activation function to form the output feature map. Each output map may combineconvolutions with multiple input maps.

9 In general, we have thatx`j=f( i Mjx` 1i k`ij+b`j),whereMjrepresents a selection of input maps, and the convolution is of the valid border handlingtype when implemented in MATLAB. Some common choices of input maps include all-pairs or all-triplets, but we will discuss how one might learn combinations below. Each output map is given anadditive biasb, however for a particular output map, the input maps will be convolved with distinctkernels. That is to say, if output mapjand mapkboth sum over input mapi, then the kernelsapplied to mapiare different for output Computing the GradientsWe assume that each convolution layer`is followed by a downsampling layer`+1. The backpropa-gation algorithm says that in order to compute the sensitivity for a unit at layer`, we should first sumover the next layer s sensitivies corresponding to units that are connected to the node of interest inthe current layer`, and multiply each of those connections by the associated weights defined at layer`+ 1.

10 We then multiply this quantity by the derivative of the activation function evaluated at thecurrent layer s pre-activation inputs,u. In the case of a Convolutional layer followed by a downsam-pling layer, one pixel in the next layer s associated sensitivity map corresponds to a block of pixelsin the Convolutional layer s output map. Thus each unit in a map at layer`connects to only one unitin the corresponding map at layer`+ 1. To compute the sensitivities at layer`efficiently, we canupsamplethe downsampling layer s sensitivity map to make it the same size as the convolutionallayer s map and then just multiply the upsampled sensitivity map from layer`+1with the activationderivative map at layer`element-wise. The weights defined at a downsampling layer map are allequal to (a constant, see section ), so we just scale the previous step s result by to finish thecomputation of `.


Related search queries