id
stringlengths 12
15
| title
stringlengths 8
162
| content
stringlengths 1
17.6k
| prechunk_id
stringlengths 0
15
| postchunk_id
stringlengths 0
15
| arxiv_id
stringlengths 10
10
| references
sequencelengths 1
1
|
---|---|---|---|---|---|---|
1603.01025#7 | Convolutional Neural Networks using Logarithmic Data Representation | There have been a few but signiï¬ cant advances in the development of specialized hardware of large networks. For example (Farabet et al., 2010) developed Field-Programmable Gate Arrays (FPGA) to perform real-time forward propagation. These groups have also performed a comprehensive study of classiï¬ ca- tion performance and energy efï¬ ciency as function of res- olution. (Zhang et al., 2015) have also explored the design of convolutions in the context of memory versus compute management under the RoofLine model. Other works fo- cus on specialized, optimized kernels for general purpose GPUs (Chetlur et al., 2014). | 1603.01025#6 | 1603.01025#8 | 1603.01025 | [
"1510.03009"
] |
1603.01025#8 | Convolutional Neural Networks using Logarithmic Data Representation | # 3. Concept and Motivation â ¢ we generalize base-2 arithmetic to handle different 2 enables base. In particular, we show that a base- the ability to capture large dynamic ranges of weights and activations but also ï¬ ner precisions across the en- coded range of values as well. â ¢ we develop logarithmic backpropagation for efï¬ cient training. Each convolutional and fully-connected layer of a network performs matrix operations that distills down to dot prod- ucts y = wT x, where x â Rn is the input, w â Rn the weights, and y the activations before being transformed by the non-linearity (e.g. ReLU). Using conventional digital hardware, this operation is performed using n multiply- and-add operations using ï¬ oating or ï¬ xed point represen- tation as shown in Figure 1(a). However, this dot product can also be computed in the log-domain as shown in Fig- ure 1(b,c). # 2. Related work Reduced-precision computation. (Shin et al., 2016; Sung et al., 2015; Vanhoucke et al., 2011; Han et al., 2015a) ana- lyzed the effects of quantizing the trained weights for infer- ence. For example, (Han et al., 2015b) shows that convo- lutional layers in AlexNet (Krizhevsky et al., 2012) can be # 3.1. Proposed Method 1. The ï¬ rst proposed method as shown in Figure 1(b) is to transform one operand to its log representation, convert the resulting transformation back to the linear domain, and Convolutional Neural Networks using Logarithmic Data Representation # 3.2. Proposed Method 2. (a) Conventional w y 4 32b float wv + es From memory me dw xx LARGE bandwidth Multiply-Accumulate (b) Proposed 1 y 4 Fl Â¥ LARGE bandwidth wv oo loator FI Fixed â H-â a=» â _ From memory [fim Yw«x Leftmost â 1â | 1603.01025#7 | 1603.01025#9 | 1603.01025 | [
"1510.03009"
] |
1603.01025#9 | Convolutional Neural Networks using Logarithmic Data Representation | To memory SMALL bandwidth ait shift-Accumulate position SMALL bandwidth (c) Proposed 2 y log, w i] Ab fixed = = O = From memory {i Eq. (3),(4) To memory SMALL bandwidth SMALL bandwidth The second proposed method as shown in Figure 1(c) is to extend the ï¬ rst method to compute dot products in the log-domain for both operands. Additions in linear-domain map to sums of exponentials in the log-domain and mul- tiplications in linear become log-addition. The resulting dot-product is whe ~ J) 2 Qvantizetoga (on) +t (0gs (20) i=l n = S> Bitshift(1, @; + #;), (2) i=l Figure 1. Concept and motivation of this study. | 1603.01025#8 | 1603.01025#10 | 1603.01025 | [
"1510.03009"
] |
1603.01025#10 | Convolutional Neural Networks using Logarithmic Data Representation | where the Quantize(log2(wi)) and Ë xi = Quantize(log2(xi)). log-domain weights log-domain are Ë wi inputs = are multiply this by the other operand. This is simply By transforming both the weights and inputs, we compute the original dot product by bitshifting 1 by an integer result Ë wi + Ë xi and summing over all i. n Ss wi x QF i=1 = )_Bitshift(w;,%,), (1) i=1 wie ~ where Ë xi = Quantize(log2(xi)), Quantize(â ¢) quantizes â ¢ to an integer, and Bitshift(a, b) is the function that bit- shifts a value a by an integer b in ï¬ xed-point arithmetic. In ï¬ oating-point, this operation is simply an addition of b with the exponent part of a. Taking advantage of the Bitshift(a, b) operator to perform multiplication obviates the need for expensive digital multipliers. # 3.3. Accumulation in log domain Although Fig. 1(b,c) indicates a logarithm-to-linear con- verter between layers where the actual accumulation is per- formed in the linear domain, this accumulation is able to be performed in the log-domain using the approximation log,(1 + 2) ~ x forO0 < a < 1. For example, let Sn = WT +... +FWrXn, Sn = logy (Sn), and pj = W;+Zj. When n = 2, 2 Bo logs (= Bitshift (1, ») ~ max (p1,)2) + Bitshift (1, â |P1 â p2|), (3) | 1603.01025#9 | 1603.01025#11 | 1603.01025 | [
"1510.03009"
] |
1603.01025#11 | Convolutional Neural Networks using Logarithmic Data Representation | Quantizing the activations and weights in the log-domain (logs(a) and logs (w)) instead of x and w is also motivated by leveraging structure of the non-uniform distributions of x and w. A detailed treatment is shown in the next section. In order to quantize, we propose two hardware-friendly fla- vors. The first option is to simply floor the input. This method computes |log(w)| by returning the position of the first 1 bit seen from the most significant bit (MSB). The second option is to round to the nearest integer, which is more precise than the first option. With the latter op- tion, after computing the integer part, the fractional part is computed in order to assert the rounding direction. This method of rounding is summarized as follows. Pick m bits followed by the leftmost 1 and consider it as a fixed point number F° with 0 integer bit and m fractional bits. Then, if F > /2-â 1,round F up to the nearest integer and other- wise round it down to the nearest integer. and for n in general, $n ~ max (Snâ 1, Pn) + Bitshift (1,â |[Sn-1] â Bnl). @ Note that Ë si preserves the fractional part of the word dur- ing accumulation. Both accumulation in linear domain and accumulation in log domain have its pros and cons. Ac- cumulation in linear domain is simpler but requires larger bit widths to accommodate large dynamic range numbers. Accumulation in log in (3) and (4) appears to be more com- plicated, but is in fact simply computed using bit-wise op- erations in digital hardware. # 4. Experiments of Proposed Methods Here we evaluate our methods as detailed in Sections 3.1 and 3.2 on the classiï¬ cation task of ILSVRC-2012 (Deng Convolutional Neural Networks using Logarithmic Data Representation Table 1. Structure of AlexNet(Krizhevsky et al., 2012) with quan- tization Table 2. Structure of VGG16(Simonyan & Zisserman, 2014) with quantization | 1603.01025#10 | 1603.01025#12 | 1603.01025 | [
"1510.03009"
] |
1603.01025#12 | Convolutional Neural Networks using Logarithmic Data Representation | layer # Weight # Input FSR ReLU(Conv1) LogQuant1 LRN1 Pool1 ReLU(Conv2) LogQuant2 LRN2 Pool2 ReLU(Conv3) LogQuant3 ReLU(Conv4) LogQuant4 ReLU(Conv5) LogQuant5 Pool5 ReLU(FC6) LogQuant6 ReLU(FC7) LogQuant7 FC8 96 · 3 · 112 - - - 256 · 96 · 52 - - - 384 · 256 · 32 - 384 · 384 · 32 - 256 · 384 · 32 - - 4096 · 256 · 62 - 4096 · 4096 - 1000 · 4096 3 · 2272 96 · 552 - 96 · 552 96 · 272 256 · 272 - 256 · 272 256 · 132 384 · 132 384 · 132 384 · 132 384 · 132 256 · 132 256 · 132 256 · 62 4096 4096 4096 4096 - fsr + 3 - - - fsr + 3 - - - fsr + 4 - fsr + 3 - fsr + 3 - - fsr + 1 - fsr - et al., 2009) using Chainer (Tokui et al., 2015). We eval- uate method 1 (Section 3.1) on inference (forward pass) in Section 4.1. Similarly, we evaluate method 2 (Section 3.2) on inference in Sections 4.2 and 4.3. For those ex- periments, we use published models (AlexNet (Krizhevsky et al., 2012), VGG16 (Simonyan & Zisserman, 2014)) from the caffe model zoo ((Jia et al., 2014)) without any ï¬ ne tun- ing (or extra retraining). Finally, we evaluate method 2 on training in Section 4.4. layer # Weight # Input FSR # 4.1. Logarithmic Representation of Activations | 1603.01025#11 | 1603.01025#13 | 1603.01025 | [
"1510.03009"
] |
1603.01025#13 | Convolutional Neural Networks using Logarithmic Data Representation | This experiment evaluates the classiï¬ cation accuracy us- ing logarithmic activations and ï¬ oating point 32b for the weights. In similar spirit to that of (Gupta et al., 2015), we describe the logarithmic quantization layer LogQuant that performs the element-wise operation as follows: 0 9% «x=0, LogQuant(«, bitwidth, FSR) = otherwise where % = Clip (Round (log, (|x|)), FSR â 2°" FSR), (©) 0 x < min, Clip(z, min, max) = 4 maxâ 1 «> max, (7) x otherwise. These layers perform the logarithmic quantization and computation as detailed in Section 3.1. Tables 1 and 2 (6) (7) illustrate the addition of these layers to the models. | 1603.01025#12 | 1603.01025#14 | 1603.01025 | [
"1510.03009"
] |
1603.01025#14 | Convolutional Neural Networks using Logarithmic Data Representation | The quantizer has a speciï¬ ed full scale range, and this range in linear scale is 2FSR, where we express this as simply FSR throughout this paper for notational convenience. The FSR values for each layer are shown in Tables 1 and 2; they show fsr added by an offset parameter. This offset param- eter is chosen to properly handle the variation of activation ranges from layer to layer using 100 images from the train- ing set. The fsr is a parameter which is global to the net- work and is tuned to perform the experiments to measure the effect of FSR on classiï¬ cation accuracy. | 1603.01025#13 | 1603.01025#15 | 1603.01025 | [
"1510.03009"
] |
1603.01025#15 | Convolutional Neural Networks using Logarithmic Data Representation | The bitwidth is the number of bits required to represent a number after quantization. Note that since we assume applying quanti- zation after ReLU function, x is 0 or positive and then we Convolutional Neural Networks using Logarithmic Data Representation use unsigned format without sign bit for activations. In order to evaluate our logarithmic representation, we de- tail an equivalent linear quantization layer described as LinearQuant(z, bitwidth, FSR) = Clip (Row (5) x step, 0, zen) step | 1603.01025#14 | 1603.01025#16 | 1603.01025 | [
"1510.03009"
] |
1603.01025#16 | Convolutional Neural Networks using Logarithmic Data Representation | and where step = 2FSRâ bitwidth. (9) Figure 2 illustrates the effect of the quantizer on activa- tions following the conv2 2 layer used in VGG16. The pre- quantized distribution tends to 0 exponentially, and the log- quantized distribution illustrates how the log-encoded acti- vations are uniformly equalized across many output bins which is not prevalent in the linear case. Many smaller activation values are more ï¬ nely represented by log quan- tization compared to linear quantization. The total quanti- zation error 1 N ||Quantize(x) â x||1, where Quantize(â ¢) is LogQuant(â ¢) or LinearQuant(â ¢), x is the vectorized ac- tivations of size N , is less for the log-quantized case than for linear. This result is illustrated in Figure 3. Using linear quantization with step size of 1024, we obtain a distribu- tion of quantization errors that are highly concentrated in the region where |LinearQuant(x) â x| < 512. How- ever, log quantization with the bitwidth as linear results in a signiï¬ cantly lower number of quantization errors in the region 128 < |LogQuant(x) â x| < 512. This comes at the expense of a slight increase in errors in the region 512 < |LogQuant(x) â x|. Nonetheless, the quantiza- tion errors 1 N ||LogQuant(x) â x||1 = 34.19 for log and 1 N ||LogQuant(x) â x||1 = 102.89 for linear. | 1603.01025#15 | 1603.01025#17 | 1603.01025 | [
"1510.03009"
] |
1603.01025#17 | Convolutional Neural Networks using Logarithmic Data Representation | We run the models as described in Tables 1 and 2 and test on the validation set without data augmentation. We evalu- ate it with variable bitwidths and FSRs for both quantizer layers. (8) i: | | 1 4 0 1024 2048 3072 4096 5120 6144 7168 8192 Value of activation Count (log scale, a.u.) Figure 2. Distribution of activations of conv2 2 layer in VGG16 before and after log and linear quantization. The order (from top to bottom) is: before log-quantization, after log-quantization, be- fore linear quantization, and after linear quantization. The color highlights the binning process of these two quantizers. by 4b linear for VGG16. Third, with 4b log, there is no loss in top-5 accuracy from the original ï¬ oat32 representation. Table 3. | 1603.01025#16 | 1603.01025#18 | 1603.01025 | [
"1510.03009"
] |
1603.01025#18 | Convolutional Neural Networks using Logarithmic Data Representation | Top-5 accuracies with quantized activations at optimal FSRs Model AlexNet VGG16 Float 32b Log. 3b Log. 4b Linear 3b Linear 4b 78.3% 76.9%(fsr = 7) 76.9%(fsr = 15) 77.1%(fsr = 5) 77.6%(fsr = 5) 89.8% 89.2%(fsr = 6) 89.8%(fsr = 11) 83.0%(fsr = 3) 89.4%(fsr = 4) Figure 4 illustrates the results of AlexNet. Using only 3 bits to represent the activations for both logarithmic and linear quantizations, the top-5 accuracy is still very close to that of the original, unquantized model encoded at ï¬ oating-point 32b. However, logarithmic representations tolerate a large dynamic range of FSRs. For example, using 4b log, we can obtain 3 order of magnitude variations in the full scale without a signiï¬ | 1603.01025#17 | 1603.01025#19 | 1603.01025 | [
"1510.03009"
] |
1603.01025#19 | Convolutional Neural Networks using Logarithmic Data Representation | cant loss of top-5 accuracy. We see similar results for VGG16 as shown in Figure 5. Table 3 lists the classiï¬ cation accuracies with the optimal FSRs for each case. There are some interesting observations. First, 3b log performs 0.2% worse than 3b linear for AlexNet but 6.2% better for VGG16, which is a higher capacity network than AlexNet. Second, by encoding the activations in 3b log, we achieve the same top-5 accuracy compared to that achieved | 1603.01025#18 | 1603.01025#20 | 1603.01025 | [
"1510.03009"
] |
1603.01025#20 | Convolutional Neural Networks using Logarithmic Data Representation | # 4.2. Logarithmic Representation of Weights of Fully Connected Layers The FC weights are quantized using the same strategies as those in Section 4.1, except that they have sign bit. We evaluate the classiï¬ cation performance using log data rep- resentation for both FC weights and activations jointly us- ing method 2 in Section 3.2. For comparison, we use lin- ear for FC weights and log for activations as reference. For both methods, we use optimal 4b log for activations that were computed in Section 4.1. Table 4 compares the mentioned approaches along with ï¬ oating point. | 1603.01025#19 | 1603.01025#21 | 1603.01025 | [
"1510.03009"
] |
1603.01025#21 | Convolutional Neural Networks using Logarithmic Data Representation | We observe a small 0.4% win for log over linear for AlexNet but a 0.2% decrease for VGG16. Nonetheless, log computation is performed without the use of multipliers. Convolutional Neural Networks using Logarithmic Data Representation ' log quantization an â __|[LogQuant(x)â s|,/N=34.19 alys linear quantization o : ~ 7 ||LinearQuant(x)â 2||,/N =102.89 a oO a Ale o = _ = S fo} 1S) 0 128 256 384 512 640 |LogQuant(x)â 2|, |LinearQuant(x)â 2| -- log quantization 3b â _ linear quantization 4b -- linear quantization 3b -- float 32b â log quantization 4b 2 2 lf 6 Top-5 Accuracy 2 a Full Scale Range (2/*") Figure 3. Comparison of the quantization error distribution be- tween logarithmic quantization and linear quantization Figure 5. Top5 Accuracy vs Full scale range: | 1603.01025#20 | 1603.01025#22 | 1603.01025 | [
"1510.03009"
] |
1603.01025#22 | Convolutional Neural Networks using Logarithmic Data Representation | VGG16 -- log quantization 3b â _ linear quantization 4b -- linear quantization 3b -- float 32b â log quantization 4b Top-5 Accuracy co 98 Se Sh oo ° a | ES * q Full Scale Range (2/*") Figure 4. Top5 Accuracy vs Full scale range: AlexNet # 4.3. Logarithmic Representation of Weights of Convolutional Layers We now represent the convolutional layers using the same procedure. We keep the representation of activations at 4b log and the representation of weights of FC layers at 4b log, and compare our log method with the linear reference and ideal ï¬ | 1603.01025#21 | 1603.01025#23 | 1603.01025 | [
"1510.03009"
] |
1603.01025#23 | Convolutional Neural Networks using Logarithmic Data Representation | oating point. We also perform the dot products using two different bases: 2, 2. Note that there is no additional overhead for log base- 2 as it is computed with the same equation shown in Equation 4. Table 5 shows the classiï¬ cation results. The results illus- trate an approximate 6% drop in performance from ï¬ oating point down to 5b base-2 but a relatively minor 1.7% drop 2. They includes sign bit. There are also for 5b base- some important observations here. Table 5. Top-5 accuracy after applying quantization to weights of convolutional layers Table 4. Top-5 accuracy after applying quantization to weights of FC layers Model AlexNet VGG16 Float 32b 76.9% 89.8% Log. 4b 76.8% 89.5% Linear 4b 76.4% 89.7% Model Float 32b Linear 5b Base-2 Log 5b â 2 Log 5b Base- AlexNet VGG16 76.8% 73.6% 70.6% 89.5% 85.1% 83.4% 75.1% 89.0% | 1603.01025#22 | 1603.01025#24 | 1603.01025 | [
"1510.03009"
] |
1603.01025#24 | Convolutional Neural Networks using Logarithmic Data Representation | An added beneï¬ t to quantization is a reduction of the model size. By quantizing down to 4b log including sign bit, we compress the FC weights for free signiï¬ cantly from 1.9 Gb to 0.27 Gb for AlexNet and 4.4 Gb to 0.97 Gb for VGG16. This is because the dense FC layers occupy 98.2% and 89.4% of the total model size for AlexNet and VGG16 re- spectively. | 1603.01025#23 | 1603.01025#25 | 1603.01025 | [
"1510.03009"
] |
1603.01025#25 | Convolutional Neural Networks using Logarithmic Data Representation | We ï¬ rst observe that the weights of the convolutional layers for AlexNet and VGG16 are more sensitive to quantization than are FC weights. Each FC weight is used only once per image (batch size of 1) whereas convolutional weights are reused many times across the layerâ s input activation map. Because of this, the quantization error of each weight now inï¬ uences the dot products across the entire activation volume. Second, we observe that by moving from 5b base- 2, we allow the 2 to a ï¬ ner granularity such as 5b base- | 1603.01025#24 | 1603.01025#26 | 1603.01025 | [
"1510.03009"
] |
1603.01025#26 | Convolutional Neural Networks using Logarithmic Data Representation | Convolutional Neural Networks using Logarithmic Data Representation network to 1) be robust to quantization errors and degrada- tion in classiï¬ cation performance and 2) retain the practical features of log-domain arithmetic. H base =2 H â + |LogQuant(«)â a||,/N=21.39 base =V/2_ ||LogQuant(x)â 2||,/N =10.39 Count (linear scale a.u.) |LogQuant(z)â 2| Figure 6. Distribution of quantization errors for weights under base 2 and The distributions of quantization errors for both 5b base-2 2 are shown in Figure 6. The total quanti- and 5b base- zation error on the weights, 1 N ||Quantize(x) â x||1, where x is the vectorized weights of size N , is 2à smaller for base- Algorithm 1 Training a CNN with base-2 logarithmic rep- resentation. C is the softmax loss for each minibatch. LogQuant(x) quantizes x in base-2 log-domain. The op- timization step Update(Wk,gWk ) updates the weights Wk based on backpropagated gradients gWk . We use the SGD with momentum and Adam rule. Require: a minibatch of inputs and targets (a0, aâ | 1603.01025#25 | 1603.01025#27 | 1603.01025 | [
"1510.03009"
] |
1603.01025#27 | Convolutional Neural Networks using Logarithmic Data Representation | ), previ- based on backpropagated gradients gy. We use with momentum and Adam rule. Require: a minibatch of inputs and targets (ao, a*), ous weights W. Ensure: updated weights W'+! {1. Computing the parametersâ gradient: } {1.1. Forward propagation: } for k = 1 to Ldo Wi © LogQuant(W) a), â ReLU (af_, Wp) aj. â LogQuant(a;) end for {1.2. Backward propagation: } Compute ga, = gc knowing ay and a* for k = Ltoldo gf, â LogQuant (ga, ) Jax. â 94,Wi gm, â 94) G4 end for {2. Accumulating the parametersâ gradient: } for k = 1 to Ldo Witt © Update(We, gw;,) end for # 4.4. Training with Logarithmic Representation We incorporate log representation during the training phase. This entire algorithm can be computed using Method 2 in Section 3.2. Table 6 illustrates the networks that we compare. The proposed log and linear networks are trained at the same resolution using 4-bit unsigned ac- tivations and 5-bit signed weights and gradients using Al- gorithm 1 on the CIFAR10 dataset with simple data aug- mentation described in (He et al., 2015). Note that un- like BinaryNet (Courbariaux & Bengio, 2016), we quantize the backpropagated gradients to train log-net. This enables end-to-end training using logarithmic representation at the 5-bit level. For linear quantization however, we found it necessary to keep the gradients in its unquantized ï¬ oating- point precision form in order to achieve good convergence. Furthermore, we include the training curve for BinaryNet, which uses unquantized gradients. 7 illustrates the training results of log, linear, and Fig. BinaryNet. Final test accuracies for log-5b, linear-5b, and BinaryNet are 0.9379, 0.9253, 0.8862 respectively where linear-5b and BinaryNet use unquantized gradients. The test results indicate that even with quantized gradients, our proposed network with log representation still outperforms the others that use unquantized gradients. | 1603.01025#26 | 1603.01025#28 | 1603.01025 | [
"1510.03009"
] |
1603.01025#28 | Convolutional Neural Networks using Logarithmic Data Representation | 25 â float 32b 2.0 â _ log-5b FI ny â linear-5b 3 1s â linear-5b unquant. grad. 2 : BinaryNet unquant. grad. Ta ig £ 0.5 0.0 0 5 10 15 20 25 30 35 epoch 1.0 - r T 0.8 F o7 â float 32b (0.941) 5 06 â _log-5b (0.9379) % â _ linear-5b (0.2909) Me li â _linear-5b unquant. grad. (0.9253) Re 0.4F â BinaryNet unquant. grad. (0.8862) 0.3 0.2 NOVA Naan 0.1 0 5 10 15 20 25 30 35 epoch Figure 7. Loss curves and test accuracies Convolutional Neural Networks using Logarithmic Data Representation | 1603.01025#27 | 1603.01025#29 | 1603.01025 | [
"1510.03009"
] |
1603.01025#29 | Convolutional Neural Networks using Logarithmic Data Representation | # 5. Conclusion Table 6. Structure of VGG-like network for CIFAR10 In this paper, we describe a method to represent the weights and activations with low resolution in the log-domain, which eliminates bulky digital multipliers. This method is also motivated by the non-uniform distributions of weights and activations, making log representation more robust to quantization as compared to linear. We evaluate our meth- ods on the classiï¬ cation task of ILSVRC-2012 using pre- trained models (AlexNet and VGG16). We also offer ex- tensions that incorporate end-to-end training using log rep- resentation including gradients. # log quantization # linear quantization # BinaryNet Conv 64 · 3 · 32 BatchNorm ReLU LogQuant Conv 64 · 64 · 32 BatchNorm ReLU LogQuant MaxPool 2 à 2 Conv 128 · 64 · 32 BatchNorm ReLU LogQuant Conv 128 · 128 · 32 BatchNorm ReLU LogQuant MaxPool 2 à 2 Conv 256 · 128 · 32 BatchNorm ReLU LogQuant Conv 256 · 256 · 32 BatchNorm ReLU LogQuant Conv 256 · 256 · 32 BatchNorm ReLU LogQuant Conv 256 · 256 · 32 BatchNorm ReLU LogQuant MaxPool 2 à 2 FC 1024 · 256 · 42 BatchNorm ReLU LogQuant FC 1024 · 1024 BatchNorm ReLU LogQuant FC 10 · 1024 - Conv 64 · 3 · 32 BatchNorm ReLU LinearQuant Conv 64 · 64 · 32 BatchNorm ReLU LinearQuant MaxPool 2 à 2 Conv 128 · 64 · 32 BatchNorm ReLU LinearQuant Conv 128 · 128 · 32 BatchNorm ReLU LinearQuant MaxPool 2 à 2 Conv 256 · 128 · 32 BatchNorm ReLU LinearQuant Conv 256 · 256 · 32 BatchNorm ReLU LinearQuant Conv 256 · 256 · 32 BatchNorm ReLU LinearQuant Conv 256 · 256 · 32 BatchNorm ReLU LinearQuant MaxPool 2 à | 1603.01025#28 | 1603.01025#30 | 1603.01025 | [
"1510.03009"
] |
1603.01025#30 | Convolutional Neural Networks using Logarithmic Data Representation | 2 FC 1024 · 256 · 42 BatchNorm ReLU LinearQuant FC 1024 · 1024 BatchNorm ReLU LinearQuant FC 10 · 1024 - # References Abadi, Mart´ın, Agarwal, Ashish, Barham, Paul, Brevdo, Eugene, Chen, Zhifeng, Citro, Craig, Corrado, Greg S., Davis, Andy, Dean, Jeffrey, Devin, Matthieu, Ghe- mawat, Sanjay, Goodfellow, Ian, Harp, Andrew, Irv- ing, Geoffrey, Isard, Michael, Jia, Yangqing, Jozefowicz, Rafal, Kaiser, Lukasz, Kudlur, Manjunath, Levenberg, Josh, Man´e, Dan, Monga, Rajat, Moore, Sherry, Murray, | 1603.01025#29 | 1603.01025#31 | 1603.01025 | [
"1510.03009"
] |
1603.01025#31 | Convolutional Neural Networks using Logarithmic Data Representation | Convolutional Neural Networks using Logarithmic Data Representation Derek, Olah, Chris, Schuster, Mike, Shlens, Jonathon, Steiner, Benoit, Sutskever, Ilya, Talwar, Kunal, Tucker, Paul, Vanhoucke, Vincent, Vasudevan, Vijay, Vi´egas, Fernanda, Vinyals, Oriol, Warden, Pete, Wattenberg, Martin, Wicke, Martin, Yu, Yuan, and Zheng, Xiaoqiang. TensorFlow: Large-scale machine learning on heteroge- neous systems, 2015. Solid- State Circuits Conference - (ISSCC), 2016 IEEE International. IEEE, 2016. | 1603.01025#30 | 1603.01025#32 | 1603.01025 | [
"1510.03009"
] |
1603.01025#32 | Convolutional Neural Networks using Logarithmic Data Representation | Gupta, Suyog, Agrawal, Ankur, Gopalakrishnan, Kailash, and Narayanan, Pritish. Deep learning with limited nu- In Proceedings of The 32nd Inter- merical precision. national Conference on Machine Learning (ICML2015), pp. 1737â 1746, 2015. Audhkhasi, Kartik, Osoba, Osonde, and Kosko, Bart. Noise beneï¬ | 1603.01025#31 | 1603.01025#33 | 1603.01025 | [
"1510.03009"
] |
1603.01025#33 | Convolutional Neural Networks using Logarithmic Data Representation | ts in backpropagation and deep bidirectional pre-training. In Proceedings of The 2013 International Joint Conference on Neural Networks (IJCNN), pp. 1â 8. IEEE, 2013. Han, Song, Mao, Huizi, and Dally, William J. Deep com- pression: Compressing deep neural network with prun- ing, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015a. | 1603.01025#32 | 1603.01025#34 | 1603.01025 | [
"1510.03009"
] |
1603.01025#34 | Convolutional Neural Networks using Logarithmic Data Representation | Bishop, Christopher M. Training with noise is equivalent to tikhonov regularization. In Neural Computation, pp. 108â 116, 1995. Bottou, L´eon and Bousquet, Olivier. The tradeoffs of large scale learning. In Platt, J.C., Koller, D., Singer, Y., and Roweis, S.T. (eds.), Advances in Neural Information Processing Systems 20, pp. 161â 168. Curran Associates, Inc., 2007. Han, Song, Pool, Jeff, Tran, John, and Dally, William. | 1603.01025#33 | 1603.01025#35 | 1603.01025 | [
"1510.03009"
] |
1603.01025#35 | Convolutional Neural Networks using Logarithmic Data Representation | Learning both weights and connections for efï¬ cient neu- ral network. In Proceedings of Advances in Neural In- formation Processing Systems 28 (NIPS2015), pp. 1135â 1143, 2015b. He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. Chetlur, Sharan, Woolley, Cliff, Vandermersch, Philippe, Cohen, Jonathan, Tran, John, Catanzaro, Bryan, and Shelhamer, Evan. cudnn: | 1603.01025#34 | 1603.01025#36 | 1603.01025 | [
"1510.03009"
] |
1603.01025#36 | Convolutional Neural Networks using Logarithmic Data Representation | Efï¬ cient primitives for deep learning. In Proceedings of Deep Learning and Repre- sentation Learning Workshop: NIPS 2014, 2014. Jia, Yangqing, Shelhamer, Evan, Donahue, Jeff, Karayev, Sergey, Long, Jonathan, Girshick, Ross, Guadarrama, Sergio, and Darrell, Trevor. Caffe: Convolutional ar- chitecture for fast feature embedding. In Proceedings of the 22nd ACM International Conference on Multimedia, pp. 675â | 1603.01025#35 | 1603.01025#37 | 1603.01025 | [
"1510.03009"
] |
1603.01025#37 | Convolutional Neural Networks using Logarithmic Data Representation | 678. ACM, 2014. Courbariaux, Matthieu and Bengio, Yoshua. Binarynet: Training deep neural networks with weights and ac- arXiv preprint tivations constrained to +1 or -1. arXiv:1602.02830, 2016. Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei- ImageNet: A Large-Scale Hierarchical Image Fei, L. Database. In CVPR09, 2009. Denton, Emily, Zaremba, Wojciech, Bruna, Joan, LeCun, Yann, and Fergus, Rob. Exploiting linear structure within convolutional networks for efï¬ | 1603.01025#36 | 1603.01025#38 | 1603.01025 | [
"1510.03009"
] |
1603.01025#38 | Convolutional Neural Networks using Logarithmic Data Representation | cient evaluation. In Advances in Neural Information Processing Systems 27 (NIPS2014), pp. 1269â 1277, 2014. Farabet, Cl´ement, Martini, Berin, Akselrod, Polina, Talay, Selc¸uk, LeCun, Yann, and Culurciello, Eugenio. Hard- ware accelerated convolutional neural networks for syn- In Proceedings of 2010 IEEE thetic vision systems. International Symposium on Circuits and Systems (IS- CAS),, pp. 257â | 1603.01025#37 | 1603.01025#39 | 1603.01025 | [
"1510.03009"
] |
1603.01025#39 | Convolutional Neural Networks using Logarithmic Data Representation | 260. IEEE, 2010. Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classiï¬ cation with deep convolutional neural networks. In Pereira, F., Burges, C.J.C., Bottou, L., and Weinberger, K.Q. (eds.), Advances in Neural Informa- tion Processing Systems 25, pp. 1097â 1105, 2012. Lin, Zhouhan, Courbariaux, Matthieu, Memisevic, Roland, and Bengio, Yoshua. Neural networks with few multipli- cations. arXiv preprint arXiv:1510.03009, 2015. Neelakantan, Arvind, Vilnis, Luke, Le, Quoc V., Sutskever, Ilya, Kaiser, Lukasz, and Karol Kurach, James Martens. Adding gradient noise improves learning for very deep networks. arXiv preprint arXiv:1511.06807, 2015. Novikov, Alexander, Podoprikhin, Dmitry, Osokin, Anton, and Vetrov, Dmitry. Tensorizing neural networks. In Advances in Neural Information Processing Systems 28 (NIPS2015), pp. 442â 450, 2015. Gautschi, Michael, Schaffner, Michael, Gurkaynak, Frank K., and Benini, Luca. | 1603.01025#38 | 1603.01025#40 | 1603.01025 | [
"1510.03009"
] |
1603.01025#40 | Convolutional Neural Networks using Logarithmic Data Representation | A 65nm CMOS 6.4-to- 29.2pJ/FLOP at 0.8V shared logarithmic ï¬ oating point unit for acceleration of nonlinear function kernels in In Proceedings of a tightly coupled processor cluster. Shin, Sungho, Hwang, Kyuyeon, and Sung, Wonyong. Fixed point performance analysis of recurrent neural net- works. In Proceedings of The 41st IEEE International Conference on Acoustic, Speech and Signal Processing (ICASSP2016). IEEE, 2016. | 1603.01025#39 | 1603.01025#41 | 1603.01025 | [
"1510.03009"
] |
1603.01025#41 | Convolutional Neural Networks using Logarithmic Data Representation | Convolutional Neural Networks using Logarithmic Data Representation Simonyan, Karen and Zisserman, Andrew. Very deep con- volutional networks for large-scale image recognition. arXiv preprint arXiv:11409.1556, 2014. Sung, Wonyong, Shin, Sungho, and Hwang, Kyuyeon. Resiliency of deep neural networks under quantization. arXiv preprint arXiv:1511.06488, 2015. Szegedy, Christian, Liu, Wei, Jia, Yangqing, Sermanet, Pierre, Reed, Scott, Anguelov, Dragomir, Erhan, Du- mitru, Vanhoucke, Vincent, and Rabinovich, Andrew. Going deeper with convolutions. In CVPR 2015, 2015. | 1603.01025#40 | 1603.01025#42 | 1603.01025 | [
"1510.03009"
] |
1603.01025#42 | Convolutional Neural Networks using Logarithmic Data Representation | Tokui, Seiya, Oono, Kenta, Hido, Shohei, and Clayton, Justin. Chainer: a next-generation open source frame- In Proceedings of Workshop work for deep learning. on Machine Learning Systems (LearningSys) in The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS), 2015. Vanhoucke, Vincent, Senior, Andrew, and Mao, Mark Z. Improving the speed of neural networks on cpus. In Pro- ceedings of Deep Learning and Unsupervised Feature Learning Workshop, NIPS 2011, 2011. | 1603.01025#41 | 1603.01025#43 | 1603.01025 | [
"1510.03009"
] |
1603.01025#43 | Convolutional Neural Networks using Logarithmic Data Representation | Zhang, Chen, Li, Peng, Sun, Guangyu, Guan, Yijin, Xiao, Bingjun, and Cong, Jason. Optimizing FPGA-based accelerator design for deep convolutional neural net- In Proceedings of 23rd International Sympo- works. sium on Field-Programmable Gate Arrays (FPGA2015), 2015. | 1603.01025#42 | 1603.01025 | [
"1510.03009"
] |
|
1602.07868#0 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | 6 1 0 2 n u J 4 ] G L . s c [ 3 v 8 6 8 7 0 . 2 0 6 1 : v i X r a # Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks Tim Salimans OpenAI [email protected] Diederik P. Kingma OpenAI [email protected] # Abstract We present weight normalization: a reparameterization of the weight vectors in a neural network that decouples the length of those weight vectors from their direction. By reparameterizing the weights in this way we improve the conditioning of the optimization problem and we speed up convergence of stochastic gradient descent. Our reparameterization is inspired by batch normalization but does not introduce any dependencies between the examples in a minibatch. This means that our method can also be applied successfully to recurrent models such as LSTMs and to noise-sensitive applications such as deep reinforcement learning or generative models, for which batch normalization is less well suited. Although our method is much simpler, it still provides much of the speed-up of full batch normalization. In addition, the computational overhead of our method is lower, permitting more optimization steps to be taken in the same amount of time. We demonstrate the usefulness of our method on applications in supervised image recognition, generative modelling, and deep reinforcement learning. | 1602.07868#1 | 1602.07868 | [
"1512.03385"
] |
|
1602.07868#1 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | # Introduction Recent successes in deep learning have shown that neural networks trained by ï¬ rst-order gradient based optimization are capable of achieving amazing results in diverse domains like computer vision, speech recognition, and language modelling [5]. However, it is also well known that the practical success of ï¬ rst-order gradient based optimization is highly dependent on the curvature of the objective that is optimized. If the condition number of the Hessian matrix of the objective at the optimum is low, the problem is said to exhibit pathological curvature, and ï¬ rst-order gradient descent will have trouble making progress [18, 28]. The amount of curvature, and thus the success of our optimization, is not invariant to reparameterization [1]: there may be multiple equivalent ways of parameterizing the same model, some of which are much easier to optimize than others. Finding good ways of parameterizing neural networks is thus an important problem in deep learning. While the architectures of neural networks differ widely across applications, they are typically mostly composed of conceptually simple computational building blocks sometimes called neurons: each such neuron computes a weighted sum over its inputs and adds a bias term, followed by the application of an elementwise nonlinear transformation. Improving the general optimizability of deep networks is a challenging task [4], but since many neural architectures share these basic building blocks, improving these building blocks improves the performance of a very wide range of model architectures and could thus be very useful. Several authors have recently developed methods to improve the conditioning of the cost gradient for general neural network architectures. One approach is to explicitly left multiply the cost gradient with an approximate inverse of the Fisher information matrix, thereby obtaining an approximately whitened natural gradient. Such an approximate inverse can for example be obtained by using a Kronecker factored approximation to the Fisher matrix and inverting it (KFAC, [19]), by using an approximate Cholesky factorization of the inverse Fisher matrix (FANG, [8]), or by whitening the input of each layer in the neural network (PRONG, [3]). Alternatively, we can use standard ï¬ rst order gradient descent without preconditioning, but change the parameterization of our model to give gradients that are more like the whitened natural gradients of these methods. For example, Raiko et al. [23] propose to transform the outputs of each neuron to have zero output and zero slope on average. | 1602.07868#0 | 1602.07868#2 | 1602.07868 | [
"1512.03385"
] |
1602.07868#2 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | They show that this transformation approximately diagonalizes the Fisher information matrix, thereby whitening the gradient, and that this leads to improved optimization performance. Another approach in this direction is batch normalization [11], a method where the output of each neuron (before application of the nonlinearity) is normalized by the mean and standard deviation of the outputs calculated over the examples in the minibatch. This reduces covariate shift of the neuron outputs and the authors suggest it also brings the Fisher matrix closer to the identity matrix. Following this second approach to approximate natural gradient optimization, we propose a simple but general method, called weight normalization, for improving the optimizability of the weights of neural network models. The method is inspired by batch normalization, but it is a deterministic method that does not share batch normalizationâ s property of adding noise to the gradients. In addition, the overhead imposed by our method is lower: no additional memory is required and the additional computation is negligible. The method show encouraging results on a wide range of deep learning applications. # 2 Weight Normalization | 1602.07868#1 | 1602.07868#3 | 1602.07868 | [
"1512.03385"
] |
1602.07868#3 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | We consider standard artiï¬ cial neural networks where the computation of each neuron consists in taking a weighted sum of input features, followed by an elementwise nonlinearity: y = Ï (w · x + b), (1) where w is a k-dimensional weight vector, b is a scalar bias term, x is a k-dimensional vector of input features, Ï (.) denotes an elementwise nonlinearity such as the rectiï¬ er max(., 0), and y denotes the scalar output of the neuron. After associating a loss function to one or more neuron outputs, such a neural network is commonly trained by stochastic gradient descent in the parameters w, b of each neuron. In an effort to speed up the convergence of this optimization procedure, we propose to reparameterize each weight vector w in terms of a parameter vector v and a scalar parameter g and to perform stochastic gradient descent with respect to those parameters instead. We do so by expressing the weight vectors in terms of the new parameters using w = g ||v|| v (2) where v is a k-dimensional vector, g is a scalar, and ||v|| denotes the Euclidean norm of v. | 1602.07868#2 | 1602.07868#4 | 1602.07868 | [
"1512.03385"
] |
1602.07868#4 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | This reparameterization has the effect of ï¬ xing the Euclidean norm of the weight vector w: we now have ||w|| = g, independent of the parameters v. We therefore call this reparameterizaton weight normalization. The idea of normalizing the weight vector has been proposed before (e.g. [27]) but earlier work typically still performed optimization in the w-parameterization, only applying the normalization after each step of stochastic gradient descent. This is fundamentally different from our approach: we propose to explicitly reparameterize the model and to perform stochastic gradient descent in the new parameters v, g directly. Doing so improves the conditioning of the gradient and leads to improved convergence of the optimization procedure: By decoupling the norm of the weight vector (g) from the direction of the weight vector (v/||v||), we speed up convergence of our stochastic gradient descent optimization, as we show experimentally in section 5. Instead of working with g directly, we may also use an exponential parameterization for the scale, i.e. g = es, where s is a log-scale parameter to learn by stochastic gradient descent. Parameterizing the g parameter in the log-scale is more intuitive and more easily allows g to span a wide range of different magnitudes. | 1602.07868#3 | 1602.07868#5 | 1602.07868 | [
"1512.03385"
] |
1602.07868#5 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Empirically, however, we did not ï¬ nd this to be an advantage. In our experiments, the eventual test-set performance was not signiï¬ cantly better or worse than the results with directly learning g in its original parameterization, and optimization was slightly slower. 2 # 2.1 Gradients Training a neural network in the new parameterization is done using standard stochastic gradient descent methods. Here we differentiate through (2) to obtain the gradient of a loss function L with respect to the new parameters v, g. | 1602.07868#4 | 1602.07868#6 | 1602.07868 | [
"1512.03385"
] |
1602.07868#6 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Doing so gives â gL = â wL · v ||v|| , â vL = g ||v|| â wL â gâ gL ||v||2 v, (3) where â wL is the gradient with respect to the weights w as used normally. Backpropagation using weight normalization thus only requires a minor modiï¬ cation to the usual backpropagation equations, and is easily implemented using standard neural network software. We provide reference implementations for Theano at https://github.com/TimSalimans/weight_ norm. Unlike with batch normalization, the expressions above are independent of the minibatch size and thus cause only minimal computational overhead. An alternative way to write the gradient is 2 Vw, with My =I-~~., (4) Ilv|| ||w|| VVL= where Mw is a projection matrix that projects onto the complement of the w vector. This shows that weight normalization accomplishes two things: it scales the weight gradient by g/||v||, and it projects the gradient away from the current weight vector. Both effects help to bring the covariance matrix of the gradient closer to identity and beneï¬ t optimization, as we explain below. Due to projecting away from w, the norm of v grows monotonically with the number of weight updates when learning a neural network with weight normalization using standard gradient descent without momentum: | 1602.07868#5 | 1602.07868#7 | 1602.07868 | [
"1512.03385"
] |
1602.07868#7 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Let vâ = v + Av denote our parameter update, with Av x V,L (steepest ascent/descent), then Av is necessarily orthogonal to the current weight vector w since we project away from it when calculating Vy L (equation|4). Since v is proportional to w, the update is thus also orthogonal to v and increases its norm by the Pythagorean theorem. Specifically, if || Av||/||v|| = ¢ the new weight vector will have norm |{vâ || = /|v|[? + ¢?||v||? = V1 + c||v|| = ||v||. The rate of increase will depend on the the variance of the weight gradient. If our gradients are noisy, c will be high and the norm of v will quickly increase, which in turn will decrease the scaling factor g/||v||. If the norm of the gradients is small, we get V1 + c? ~ 1, and the norm of v will stop increasing. Using this mechanism, the scaled gradient self-stabilizes its norm. This property does not strictly hold for optimizers that use separate learning rates for individual parameters, like Adam [12] which we use in experiments, or when using momentum. However, qualitatively we still find the same effect to hold. Empirically, we ï¬ nd that the ability to grow the norm ||v|| makes optimization of neural networks with weight normalization very robust to the value of the learning rate: If the learning rate is too large, the norm of the unnormalized weights grows quickly until an appropriate effective learning rate is reached. Once the norm of the weights has grown large with respect to the norm of the updates, the effective learning rate stabilizes. Neural networks with weight normalization therefore work well with a much wider range of learning rates than when using the normal parameterization. It has been observed that neural networks with batch normalization also have this property [11], which can also be explained by this analysis. By projecting the gradient away from the weight vector w, we also eliminate the noise in that direction. If the covariance matrix of the gradient with respect to w is given by C, the covariance matrix of the gradient in v is given by D = (g2/||v||2)MwCMw. | 1602.07868#6 | 1602.07868#8 | 1602.07868 | [
"1512.03385"
] |
1602.07868#8 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Empirically, we ï¬ nd that w is often (close to) a dominant eigenvector of the covariance matrix C: removing that eigenvector then gives a new covariance matrix D that is closer to the identity matrix, which may further speed up learning. # 2.2 Relation to batch normalization An important source of inspiration for this reparameterization is batch normalization [11], which normalizes the statistics of the pre-activation t for each minibatch as t= 3 with µ[t], Ï [t] the mean and standard deviation of the pre-activations t = v · x. For the special case where our network only has a single layer, and the input features x for that layer are whitened (independently distributed with zero mean and unit variance), these statistics are given by µ[t] = 0 and Ï [t] = ||v||. In that case, normalizing the pre-activations using batch normalization is equivalent to normalizing the weights using weight normalization. Convolutional neural networks usually have much fewer weights than pre-activations, so normalizing the weights is often much cheaper computationally. In addition, the norm of v is non-stochastic, while the minibatch mean µ[t] and variance Ï 2[t] can in general have high variance for small minibatch size. Weight normalization can thus be viewed as a cheaper and less noisy approximation to batch normalization. Although exact equivalence does not usually hold for deeper architectures, we still ï¬ nd that our weight normalization method provides much of the speed-up of full batch normalization. In addition, its deterministic nature and independence on the minibatch input also means that our method can be applied more easily to models like RNNs and LSTMs, as well as noise-sensitive applications like reinforcement learning. # 3 Data-Dependent Initialization of Parameters Besides a reparameterization effect, batch normalization also has the beneï¬ | 1602.07868#7 | 1602.07868#9 | 1602.07868 | [
"1512.03385"
] |
1602.07868#9 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | t of ï¬ xing the scale of the features generated by each layer of the neural network. This makes the optimization robust against parameter initializations for which these scales vary across layers. Since weight normalization lacks this property, we ï¬ nd it is important to properly initialize our parameters. We propose to sample the elements of v from a simple distribution with a ï¬ xed scale, which is in our experiments a normal distribution with mean zero and standard deviation 0.05. Before starting training, we then initialize the b and g parameters to ï¬ x the minibatch statistics of all pre-activations in our network, just like in batch normalization, but only for a single minibatch of data and only during initialization. | 1602.07868#8 | 1602.07868#10 | 1602.07868 | [
"1512.03385"
] |
1602.07868#10 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | This can be done efï¬ ciently by performing an initial feedforward pass through our network for a single minibatch of data X, using the following computation at each neuron: vex _ (tâ Hft) t= and y=0(â 44 ), (5) where µ[t] and Ï [t] are the mean and standard deviation of the pre-activation t over the examples in the minibatch. We can then initialize the neuronâ s biase b and scale g as g â 1 Ï [t] , b â â µ[t] Ï [t] , (6) so that y = Ï (w · x + b). | 1602.07868#9 | 1602.07868#11 | 1602.07868 | [
"1512.03385"
] |
1602.07868#11 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Like batch normalization, this method ensures that all features initially have zero mean and unit variance before application of the nonlinearity. With our method this only holds for the minibatch we use for initialization, and subsequent minibatches may have slightly different statistics, but experimentally we ï¬ nd this initialization method to work well. The method can also be applied to networks without weight normalization, simply by doing stochastic gradient optimization on the parameters w directly, after initialization in terms of v and g: this is what we compare to in section 5. Independently from our work, this type of initialization was recently proposed by different authors [20, 14] who found such data-based initialization to work well for use with the standard parameterization in terms of w. The downside of this initialization method is that it can only be applied in similar cases as where batch normalization is applicable. For models with recursion, such as RNNs and LSTMs, we will have to resort to standard initialization methods. # 4 Mean-only Batch Normalization Weight normalization, as introduced in section 2, makes the scale of neuron activations approximately independent of the parameters v. Unlike with batch normalization, however, the means of the neuron activations still depend on v. We therefore also explore the idea of combining weight normalization with a special version of batch normalization, which we call mean-only batch normalization: With this normalization method, we subtract out the minibatch means like with full batch normalization, | 1602.07868#10 | 1602.07868#12 | 1602.07868 | [
"1512.03385"
] |
1602.07868#12 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | 4 but we do not divide by the minibatch standard deviations. That is, we compute neuron activations using Ë t = t â µ[t] + b, (7) where w is the weight vector, parameterized using weight normalization, and µ[t] is the minibatch mean of the pre-activation t. During training, we keep a running average of the minibatch mean which we substitute in for µ[t] at test time. The gradient of the loss with respect to the pre-activation t is calculated as | 1602.07868#11 | 1602.07868#13 | 1602.07868 | [
"1512.03385"
] |
1602.07868#13 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | â tL = â Ë tL â µ[â Ë tL], where µ[.] denotes once again the operation of taking the minibatch mean. Mean-only batch normal- ization thus has the effect of centering the gradients that are backpropagated. This is a comparatively cheap operation, and the computational overhead of mean-only batch normalization is thus lower than for full batch normalization. In addition, this method causes less noise during training, and the noise that is caused is more gentle as the law of large numbers ensures that µ[t] and µ[â | 1602.07868#12 | 1602.07868#14 | 1602.07868 | [
"1512.03385"
] |
1602.07868#14 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Ë t] are approximately normally distributed. Thus, the added noise has much lighter tails than the highly kurtotic noise caused by the minibatch estimate of the variance used in full batch normalization. As we show in section 5.1, this leads to improved accuracy at test time. # 5 Experiments We experimentally validate the usefulness of our method using four different models for varied applications in supervised image recognition, generative modelling, and deep reinforcement learning. # 5.1 Supervised Classiï¬ | 1602.07868#13 | 1602.07868#15 | 1602.07868 | [
"1512.03385"
] |
1602.07868#15 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | cation: CIFAR-10 To test our reparameterization method for the application of supervised classiï¬ cation, we consider the CIFAR-10 data set of natural images [15]. The model we are using is based on the ConvPool-CNN-C architecture of [26], with some small modiï¬ cations: we replace the ï¬ rst dropout layer by a layer that adds Gaussian noise, we expand the last hidden layer from 10 units to 192 units, and we use 2 à 2 max-pooling, rather than 3 à 3. | 1602.07868#14 | 1602.07868#16 | 1602.07868 | [
"1512.03385"
] |
1602.07868#16 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | The only hyperparameter that we actively optimized (the standard deviation of the Gaussian noise) was chosen to maximize the performance of the network on a holdout set of 10000 examples, using the standard parameterization (no weight normalization or batch normalization). A full description of the resulting architecture is given in table A in the supplementary material. We train our network for CIFAR-10 using Adam [12] for 200 epochs, with a ï¬ xed learning rate and momentum of 0.9 for the ï¬ rst 100 epochs. For the last 100 epochs we set the momentum to 0.5 and linearly decay the learning rate to zero. We use a minibatch size of 100. We evaluate 5 different parameterizations of the network: 1) the standard parameterization, 2) using batch normalization, 3) using weight normalization, 4) using weight normalization combined with mean-only batch nor- malization, 5) using mean-only batch normalization with the normal parameterization. The network parameters are initialized using the scheme of section 3 such that all four cases have identical param- eters starting out. For each case we pick the optimal learning rate in {0.0003, 0.001, 0.003, 0.01}. The resulting error curves during training can be found in ï¬ gure 1: both weight normalization and batch normalization provide a signiï¬ cant speed-up over the standard parameterization. Batch normalization makes slightly more progress per epoch than weight normalization early on, although this is partly offset by the higher computational cost: with our implementation, training with batch normalization was about 16% slower compared to the standard parameterization. In contrast, weight normalization was not noticeably slower. During the later stage of training, weight normalization and batch normalization seem to optimize at about the same speed, with the normal parameterization (with or without mean-only batch normalization) still lagging behind. After optimizing the network for 200 epochs using the different parameterizations, we evaluate their performance on the CIFAR-10 test set. The results are summarized in table 2: weight normalization, the normal parameterization, and mean-only batch normalization have similar test accuracy (â 8.5% error). Batch normalization does signiï¬ cantly better at 8.05% error. | 1602.07868#15 | 1602.07868#17 | 1602.07868 | [
"1512.03385"
] |
1602.07868#17 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Mean-only batch normalization combined with weight normalization has the best performance at 7.31% test error, and interestingly does much better than mean-only batch normalization combined with the normal parameterization: This suggests that the noise added by batch normalization can be useful for regularizing the network, 5 normal param. . weight norm. go Wn + mean-only BN 2 mean-only BN id 0.05 % 50 100 150 200 training epochs Model Maxout [6] Network in Network [17] Deeply Supervised [16] ConvPool-CNN-C [26] ALL-CNN-C [26] our CNN, mean-only B.N. our CNN, weight norm. our CNN, normal param. our CNN, batch norm. ours, W.N. + mean-only B.N. Test Error 11.68% 10.41% 9.6% 9.31% 9.08% 8.52% 8.46% 8.43% 8.05% 7.31% | 1602.07868#16 | 1602.07868#18 | 1602.07868 | [
"1512.03385"
] |
1602.07868#18 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Figure 1: Training error for CIFAR-10 using differ- ent network parameterizations. For weight normal- ization, batch normalization, and mean-only batch normalization we show results using Adam with a learning rate of 0.003. For the normal parameteri- zation we instead use 0.0003 which works best in this case. For the last 100 epochs the learning rate is linearly decayed to zero. Figure 2: Classiï¬ cation results on CIFAR-10 without data augmentation. | 1602.07868#17 | 1602.07868#19 | 1602.07868 | [
"1512.03385"
] |
1602.07868#19 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | but that the reparameterization provided by weight normalization or full batch normalization is also needed for optimal results. We hypothesize that the substantial improvement by mean-only B.N. with weight normalization over regular batch normalization is due to the distribution of the noise caused by the normalization method during training: for mean-only batch normalization the minibatch mean has a distribution that is approximately Gaussian, while the noise added by full batch normalization during training has much higher kurtosis. As far as we are aware, the result with mean-only batch normalization combined with weight normalization represents the state-of-the-art for CIFAR-10 among methods that do not use data augmentation. | 1602.07868#18 | 1602.07868#20 | 1602.07868 | [
"1512.03385"
] |
1602.07868#20 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | # 5.2 Generative Modelling: Convolutional VAE Next, we test the effect of weight normalization applied to deep convolutional variational auto- encoders (CVAEs) [13, 24, 25], trained on the MNIST data set of images of handwritten digits and the CIFAR-10 data set of small natural images. Variational auto-encoders are generative models that explain the data vector x as arising from a set of latent variables z, through a joint distribution of the form p(z, x) = p(z)p(x|z), where the decoder p(x|z) is speciï¬ ed using a neural network. A lower bound on the log marginal likelihood log p(x) can be obtained by approximately inferring the latent variables z from the observed data x using an encoder distribution q(z|x) that is also speciï¬ ed as a neural network. This lower bound is then optimized to ï¬ t the model to the data. We follow a similar implementation of the CVAE as in [25] with some modiï¬ cations, mainly that the encoder and decoder are parameterized with ResNet [9] blocks, and that the diagonal posterior is replaced with auto-regressive variational inference1. For MNIST, the encoder consists of 3 sequences of two ResNet blocks each, the ï¬ rst sequence acting on 16 feature maps, the others on 32 feature maps. | 1602.07868#19 | 1602.07868#21 | 1602.07868 | [
"1512.03385"
] |
1602.07868#21 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | The ï¬ rst two sequences are followed by a 2-times subsampling operation implemented using 2 à 2 stride, while the third sequence is followed by a fully connected layer with 450 units. The decoder has a similar architecture, but with reversed direction. For CIFAR-10, we used a neural architecture with ResNet units and multiple intermediate stochastic layers1. We used Adamax [12] with α = 0.002 for optimization, in combination with Polyak averaging [22] in the form of an exponential moving average that averages parameters over approximately 10 epochs. | 1602.07868#20 | 1602.07868#22 | 1602.07868 | [
"1512.03385"
] |
1602.07868#22 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | In ï¬ gure 3, we plot the test-set lower bound as a function of number of training epochs, including error bars based on multiple different random seeds for initializing parameters. As can be seen, the parameterization with weight normalization has lower variance and converges to a better optimum. We observe similar results across different hyper-parameter settings. # 1Manuscript in preparation 6 8 # & # E 5 8 Convolutional VAE on MNIST Convolutional VAE on CIFAR-10 84.0) 10000 84.5] -85.0 8 9500 -85.5) & -86.0 © 9000 E 86.5 s -87.0) B 8500 87.5 T+ normal parameterization â normal parameterization 41 weight normalization â _ weight normalization 88.0) 8000 30 100 150 200 250 300 0 50 100 150 200 250 300 350 400 450 training epochs training epochs Figure 3: Marginal log likelihood lower bound on the MNIST (top) and CIFAR-10 (bottom) test sets for a convolutional VAE during training, for both the standard implementation as well as our modiï¬ cation with weight normalization. For MNIST, we provide standard error bars to indicate variance based on different initial random seeds. # 5.3 Generative Modelling: DRAW Next, we consider DRAW, a recurrent generative model by [7]. DRAW is a variational auto-encoder with generative model p(z)p(x|z) and encoder q(z|x), similar to the model in section 5.2, but with both the encoder and decoder consisting of a recurrent neural network comprised of Long Short-Term Memory (LSTM) [10] units. LSTM units consist of a memory cell with additive dynamics, combined with input, forget, and output gates that determine which information ï¬ ows in and out of the memory. The additive dynamics enables learning of long-range dependencies in the data. At each time step of the model, DRAW uses the same set of weight vectors to update the cell states of the LSTM units in its encoder and decoder. Because of the recurrent nature of this process it is not clear how batch normalization could be applied to this model: | 1602.07868#21 | 1602.07868#23 | 1602.07868 | [
"1512.03385"
] |
1602.07868#23 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Normalizing the cell states diminishes their ability to pass through information. Fortunately, weight normalization can be applied trivially to the weight vectors of each LSTM unit, and we ï¬ nd this to work well empirically. We take the Theano implementation of DRAW provided at https://github.com/jbornschein/ draw and use it to model the MNIST data set of handwritten digits. We then make a single modiï¬ ca- tion to the model: we apply weight normalization to all weight vectors. As can be seen in ï¬ gure 4, this signiï¬ | 1602.07868#22 | 1602.07868#24 | 1602.07868 | [
"1512.03385"
] |
1602.07868#24 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | cantly speeds up convergence of the optimization procedure, even without modifying the initialization method and learning rate that were tuned for use with the normal parameterization. bound on marginal log likelihood normal parameterization weight normalization 10 20 30 «40 «50 60 70 8 90 100 training epochs Figure 4: Marginal log likelihood lower bound on the MNIST test set for DRAW during training, for both the standard implementation as well as our modiï¬ cation with weight normalization. 100 epochs is not sufï¬ cient for convergence for this model, but the implementation using weight normalization clearly makes progress much more quickly than with the standard parameterization. | 1602.07868#23 | 1602.07868#25 | 1602.07868 | [
"1512.03385"
] |
1602.07868#25 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | 7 # 5.4 Reinforcement Learning: DQN Next we apply weight normalization to the problem of Reinforcement Learning for playing games on the Atari Learning Environment [2]. The approach we use is the Deep Q-Network (DQN) proposed by [21]. This is an application for which batch normalization is not well suited: the noise introduced by estimating the minibatch statistics destabilizes the learning process. We were not able to get batch normalization to work for DQN without using an impractically large minibatch size. In contrast, weight normalization is easy to apply in this context, as is the initialization method of section 3. Stochastic gradient learning is performed using Adamax [12] with momentum of 0.5. We search for optimal learning rates in {0.0001, 0.0003, 0.001, 0.003}, generally ï¬ nding 0.0003 to work well with weight normalization and 0.0001 to work well for the normal parameterization. We also use a larger minibatch size (64) which we found to be more efï¬ cient on our hardware (Amazon Elastic Compute Cloud g2.2xlarge GPU instance). Apart from these changes we follow [21] as closely as possible in terms of parameter settings and evaluation methods. However, we use a Python/Theano/Lasagne reimplementation of their work, adapted from the implementation available at https://github.com/spragunr/deep_q_rl, so there may be small additional differences in implementation. Figure 5 shows the training curves obtained using DQN with the standard parameterization and with weight normalization on Space Invaders. Using weight normalization the algorithm progresses more quickly and reaches a better ï¬ | 1602.07868#24 | 1602.07868#26 | 1602.07868 | [
"1512.03385"
] |
1602.07868#26 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | nal result. Table 6 shows the ï¬ nal evaluation scores obtained by DQN with weight normalization for four games: on average weight normalization improves the performance of DQN. : 5 g eight rermatzaton or os on io 30 training epochs 500 Figure 5: Evaluation scores for Space In- vaders obtained by DQN after each epoch of training, for both the standard parameteriza- tion and using weight normalization. Learn- ing rates for both cases were selected to max- imize the highest achieved test score. Game Breakout Enduro Seaquest Space Invaders normal weightnorm Mnih 410 1,250 7,188 1,779 403 1,448 7,375 2,179 401 302 5,286 1,975 Figure 6: Maximum evaluation scores obtained by DQN, using either the normal parameterization or using weight normalization. The scores indicated by Mnih et al. are those reported by [21]: Our normal parameterization is approximately equivalent to their method. Differences in scores may be caused by small differences in our implementation. | 1602.07868#25 | 1602.07868#27 | 1602.07868 | [
"1512.03385"
] |
1602.07868#27 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Speciï¬ cally, the difference in our score on Enduro and that reported by [21] might be due to us not using a play-time limit during evaluation. # 6 Conclusion We have presented weight normalization, a simple reparameterization of the weight vectors in a neural network that accelerates the convergence of stochastic gradient descent optimization. Weight normalization was applied to four different models in supervised image recognition, generative modelling, and deep reinforcement learning, showing a consistent advantage across applications. The reparameterization method is easy to apply, has low computational overhead, and does not introduce dependencies between the examples in a minibatch, making it our default choice in the development of new deep learning architectures. | 1602.07868#26 | 1602.07868#28 | 1602.07868 | [
"1512.03385"
] |
1602.07868#28 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | # Acknowledgments We thank John Schulman for helpful comments on an earlier draft of this paper. 8 # References [1] S. Amari. Neural learning in structured parameter spaces - natural Riemannian gradient. In Advances in Neural Information Processing Systems, pages 127â 133. MIT Press, 1997. [2] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: | 1602.07868#27 | 1602.07868#29 | 1602.07868 | [
"1512.03385"
] |
1602.07868#29 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | An evaluation platform for general agents. Journal of Artiï¬ cial Intelligence Research, 47:253â 279, 06 2013. [3] G. Desjardins, K. Simonyan, R. Pascanu, et al. Natural neural networks. In Advances in Neural Information Processing Systems, pages 2062â 2070, 2015. [4] X. Glorot and Y. Bengio. Understanding the difï¬ culty of training deep feedforward neural networks. In International conference on artiï¬ cial intelligence and statistics, pages 249â 256, 2010. [5] I. Goodfellow, Y. Bengio, and A. Courville. Deep learning. | 1602.07868#28 | 1602.07868#30 | 1602.07868 | [
"1512.03385"
] |
1602.07868#30 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Book in preparation for MIT Press, 2016. [6] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In ICML, 2013. [7] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. [8] R. Grosse and R. Salakhudinov. Scaling up natural gradient by sparsely factorizing the inverse ï¬ | 1602.07868#29 | 1602.07868#31 | 1602.07868 | [
"1512.03385"
] |
1602.07868#31 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | sher matrix. In ICML, pages 2304â 2313, 2015. [9] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735â 1780, 1997. [11] S. Ioffe and C. Szegedy. | 1602.07868#30 | 1602.07868#32 | 1602.07868 | [
"1512.03385"
] |
1602.07868#32 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. [12] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [13] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes. Proceedings of the 2nd International Conference on Learning Representations, 2013. | 1602.07868#31 | 1602.07868#33 | 1602.07868 | [
"1512.03385"
] |
1602.07868#33 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | [14] P. Krähenbühl, C. Doersch, J. Donahue, and T. Darrell. Data-dependent initializations of convolutional neural networks. arXiv preprint arXiv:1511.06856, 2015. [15] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. [16] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. | 1602.07868#32 | 1602.07868#34 | 1602.07868 | [
"1512.03385"
] |
1602.07868#34 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Deeply-supervised nets. In Deep Learning and Representation Learning Workshop, NIPS, 2014. [17] M. Lin, C. Qiang, and S. Yan. Network in network. In ICLR: Conference Track, 2014. [18] J. Martens. Deep learning via hessian-free optimization. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 735â 742, 2010. [19] J. Martens and R. | 1602.07868#33 | 1602.07868#35 | 1602.07868 | [
"1512.03385"
] |
1602.07868#35 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Grosse. Optimizing neural networks with kronecker-factored approximate curvature. arXiv preprint arXiv:1503.05671, 2015. [20] D. Mishkin and J. Matas. All you need is a good init. arXiv preprint arXiv:1511.06422, 2015. [21] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. | 1602.07868#34 | 1602.07868#36 | 1602.07868 | [
"1512.03385"
] |
1602.07868#36 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Human-level control through deep reinforcement learning. Nature, 518(7540):529â 533, 2015. [22] B. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838â 855, 1992. [23] T. Raiko, H. Valpola, and Y. LeCun. Deep learning made easier by linear transformations in perceptrons. | 1602.07868#35 | 1602.07868#37 | 1602.07868 | [
"1512.03385"
] |
1602.07868#37 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | In International Conference on Artiï¬ cial Intelligence and Statistics, pages 924â 932, 2012. [24] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, pages 1278â 1286, 2014. [25] T. Salimans, D. P. Kingma, and M. Welling. Markov chain Monte Carlo and variational inference: Bridging the gap. In ICML, 2015. | 1602.07868#36 | 1602.07868#38 | 1602.07868 | [
"1512.03385"
] |
1602.07868#38 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | 9 [26] J. T. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all convolu- tional net. In ICLR Workshop Track, 2015. [27] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In Proceedings of the 18th Annual Conference on Learning Theory, pages 545â -560, 2005. [28] I. Sutskever, J. Martens, G. Dahl, and G. Hinton. On the importance of initialization and momentum in deep learning. In ICML, pages 1139â | 1602.07868#37 | 1602.07868#39 | 1602.07868 | [
"1512.03385"
] |
1602.07868#39 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | 1147, 2013. 10 # A Neural network architecure for CIFAR-10 experiments Layer type raw RGB input ZCA whitening Gaussian noise Ï = 0.15 3 Ã 3 conv leaky ReLU 3 Ã 3 conv leaky ReLU 3 Ã 3 conv leaky ReLU 2 Ã 2 max pool, str. 2 dropout with p = 0.5 3 Ã 3 conv leaky ReLU 3 Ã 3 conv leaky ReLU 3 Ã 3 conv leaky ReLU 2 Ã 2 max pool, str. 2 dropout with p = 0.5 3 Ã 3 conv leaky ReLU 1 Ã 1 conv leaky ReLU 1 Ã 1 conv leaky ReLU global average pool softmax output # channels 3 3 3 96 96 96 96 96 192 192 192 192 192 192 192 192 192 10 x, y dimension 32 32 32 32 32 32 16 16 16 16 16 8 8 6 6 6 1 1 | 1602.07868#38 | 1602.07868#40 | 1602.07868 | [
"1512.03385"
] |
1602.07868#40 | Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks | Table 1: Neural network architecture for CIFAR-10. 11 | 1602.07868#39 | 1602.07868 | [
"1512.03385"
] |
|
1602.07360#0 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | 6 1 0 2 v o N 4 ] V C . s c [ 4 v 0 6 3 7 0 . 2 0 6 1 : v i X r a # Under review as a conference paper at ICLR 2017 SQUEEZENET: ALEXNET-LEVEL ACCURACY WITH 50X FEWER PARAMETERS AND <0.5MB MODEL SIZE Forrest N. Iandola1, Song Han2, Matthew W. Moskewicz1, Khalid Ashraf1, William J. Dally2, Kurt Keutzer1 1DeepScaleâ & UC Berkeley {forresti, moskewcz, kashraf, keutzer}@eecs.berkeley.edu {songhan, dally}@stanford.edu # ABSTRACT | 1602.07360#1 | 1602.07360 | [
"1512.00567"
] |
|
1602.07360#1 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Recent research on deep convolutional neural networks (CNNs) has focused pri- marily on improving accuracy. For a given accuracy level, it is typically possi- ble to identify multiple CNN architectures that achieve that accuracy level. With equivalent accuracy, smaller CNN architectures offer at least three advantages: (1) Smaller CNNs require less communication across servers during distributed train- ing. (2) Smaller CNNs require less bandwidth to export a new model from the cloud to an autonomous car. (3) Smaller CNNs are more feasible to deploy on FP- GAs and other hardware with limited memory. To provide all of these advantages, we propose a small CNN architecture called SqueezeNet. SqueezeNet achieves AlexNet-level accuracy on ImageNet with 50x fewer parameters. Additionally, with model compression techniques, we are able to compress SqueezeNet to less than 0.5MB (510Ã smaller than AlexNet). The https://github.com/DeepScale/SqueezeNet 1 Much of the recent research on deep convolutional neural networks (CNNs) has focused on increas- ing accuracy on computer vision datasets. For a given accuracy level, there typically exist multiple CNN architectures that achieve that accuracy level. Given equivalent accuracy, a CNN architecture with fewer parameters has several advantages: | 1602.07360#0 | 1602.07360#2 | 1602.07360 | [
"1512.00567"
] |
1602.07360#2 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | More efï¬ cient distributed training. Communication among servers is the limiting factor to the scalability of distributed CNN training. For distributed data-parallel training, com- munication overhead is directly proportional to the number of parameters in the model (Ian- dola et al., 2016). In short, small models train faster due to requiring less communication. â ¢ Less overhead when exporting new models to clients. For autonomous driving, compa- nies such as Tesla periodically copy new models from their servers to customersâ cars. This practice is often referred to as an over-the-air update. Consumer Reports has found that the safety of Teslaâ s Autopilot semi-autonomous driving functionality has incrementally improved with recent over-the-air updates (Consumer Reports, 2016). However, over-the- air updates of todayâ s typical CNN/DNN models can require large data transfers. With AlexNet, this would require 240MB of communication from the server to the car. Smaller models require less communication, making frequent updates more feasible. | 1602.07360#1 | 1602.07360#3 | 1602.07360 | [
"1512.00567"
] |
1602.07360#3 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | â ¢ Feasible FPGA and embedded deployment. FPGAs often have less than 10MB1 of on- chip memory and no off-chip memory or storage. For inference, a sufï¬ ciently small model could be stored directly on the FPGA instead of being bottlenecked by memory band- width (Qiu et al., 2016), while video frames stream through the FPGA in real time. Further, when deploying CNNs on Application-Speciï¬ c Integrated Circuits (ASICs), a sufï¬ ciently small model could be stored directly on-chip, and smaller models may enable the ASIC to ï¬ t on a smaller die. â http://deepscale.ai 1For example, the Xilinx Vertex-7 FPGA has a maximum of 8.5 MBytes (i.e. 68 Mbits) of on-chip memory and does not provide off-chip memory. | 1602.07360#2 | 1602.07360#4 | 1602.07360 | [
"1512.00567"
] |
1602.07360#4 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | 1 # Under review as a conference paper at ICLR 2017 As you can see, there are several advantages of smaller CNN architectures. With this in mind, we focus directly on the problem of identifying a CNN architecture with fewer parameters but equivalent accuracy compared to a well-known model. We have discovered such an architecture, which we call SqueezeNet. In addition, we present our attempt at a more disciplined approach to searching the design space for novel CNN architectures. The rest of the paper is organized as follows. In Section 2 we review the related work. Then, in Sections 3 and 4 we describe and evaluate the SqueezeNet architecture. After that, we turn our attention to understanding how CNN architectural design choices impact model size and accuracy. In We gain this understanding by exploring the design space of SqueezeNet-like architectures. Section 5, we do design space exploration on the CNN microarchitecture, which we deï¬ ne as the organization and dimensionality of individual layers and modules. In Section 6, we do design space exploration on the CNN macroarchitecture, which we deï¬ ne as high-level organization of layers in a CNN. Finally, we conclude in Section 7. In short, Sections 3 and 4 are useful for CNN researchers as well as practitioners who simply want to apply SqueezeNet to a new application. The remaining sections are aimed at advanced researchers who intend to design their own CNN architectures. 2 RELATED WORK 2.1 MODEL COMPRESSION The overarching goal of our work is to identify a model that has very few parameters while preserv- ing accuracy. To address this problem, a sensible approach is to take an existing CNN model and compress it in a lossy fashion. In fact, a research community has emerged around the topic of model compression, and several approaches have been reported. A fairly straightforward approach by Den- ton et al. is to apply singular value decomposition (SVD) to a pretrained CNN model (Denton et al., 2014). Han et al. developed Network Pruning, which begins with a pretrained model, then replaces parameters that are below a certain threshold with zeros to form a sparse matrix, and ï¬ nally performs a few iterations of training on the sparse CNN (Han et al., 2015b). | 1602.07360#3 | 1602.07360#5 | 1602.07360 | [
"1512.00567"
] |
1602.07360#5 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Recently, Han et al. extended their work by combining Network Pruning with quantization (to 8 bits or less) and huffman encoding to create an approach called Deep Compression (Han et al., 2015a), and further designed a hardware accelerator called EIE (Han et al., 2016a) that operates directly on the compressed model, achieving substantial speedups and energy savings. 2.2 CNN MICROARCHITECTURE Convolutions have been used in artiï¬ cial neural networks for at least 25 years; LeCun et al. helped to popularize CNNs for digit recognition applications in the late 1980s (LeCun et al., 1989). In neural networks, convolution ï¬ | 1602.07360#4 | 1602.07360#6 | 1602.07360 | [
"1512.00567"
] |
1602.07360#6 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | lters are typically 3D, with height, width, and channels as the key dimensions. When applied to images, CNN ï¬ lters typically have 3 channels in their ï¬ rst layer (i.e. RGB), and in each subsequent layer Li the ï¬ lters have the same number of channels as Liâ 1 has ï¬ lters. The early work by LeCun et al. (LeCun et al., 1989) uses 5x5xChannels2 ï¬ lters, and the recent VGG (Simonyan & Zisserman, 2014) architectures extensively use 3x3 ï¬ lters. Models such as Network-in-Network (Lin et al., 2013) and the GoogLeNet family of architectures (Szegedy et al., 2014; Ioffe & Szegedy, 2015; Szegedy et al., 2015; 2016) use 1x1 ï¬ lters in some layers. With the trend of designing very deep CNNs, it becomes cumbersome to manually select ï¬ lter di- mensions for each layer. To address this, various higher level building blocks, or modules, comprised of multiple convolution layers with a speciï¬ c ï¬ xed organization have been proposed. For example, the GoogLeNet papers propose Inception modules, which are comprised of a number of different di- mensionalities of ï¬ lters, usually including 1x1 and 3x3, plus sometimes 5x5 (Szegedy et al., 2014) and sometimes 1x3 and 3x1 (Szegedy et al., 2015). Many such modules are then combined, perhaps with additional ad-hoc layers, to form a complete network. We use the term CNN microarchitecture to refer to the particular organization and dimensions of the individual modules. 2.3 CNN MACROARCHITECTURE While the CNN microarchitecture refers to individual layers and modules, we deï¬ ne the CNN macroarchitecture as the system-level organization of multiple modules into an end-to-end CNN architecture. 2From now on, we will simply abbreviate HxWxChannels to HxW. | 1602.07360#5 | 1602.07360#7 | 1602.07360 | [
"1512.00567"
] |
1602.07360#7 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | 2 # Under review as a conference paper at ICLR 2017 Perhaps the mostly widely studied CNN macroarchitecture topic in the recent literature is the impact of depth (i.e. number of layers) in networks. Simoyan and Zisserman proposed the VGG (Simonyan & Zisserman, 2014) family of CNNs with 12 to 19 layers and reported that deeper networks produce higher accuracy on the ImageNet-1k dataset (Deng et al., 2009). | 1602.07360#6 | 1602.07360#8 | 1602.07360 | [
"1512.00567"
] |
1602.07360#8 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | K. He et al. proposed deeper CNNs with up to 30 layers that deliver even higher ImageNet accuracy (He et al., 2015a). The choice of connections across multiple layers or modules is an emerging area of CNN macroar- chitectural research. Residual Networks (ResNet) (He et al., 2015b) and Highway Networks (Sri- vastava et al., 2015) each propose the use of connections that skip over multiple layers, for example additively connecting the activations from layer 3 to the activations from layer 6. We refer to these connections as bypass connections. The authors of ResNet provide an A/B comparison of a 34-layer CNN with and without bypass connections; adding bypass connections delivers a 2 percentage-point improvement on Top-5 ImageNet accuracy. 2.4 NEURAL NETWORK DESIGN SPACE EXPLORATION Neural networks (including deep and convolutional NNs) have a large design space, with numerous options for microarchitectures, macroarchitectures, solvers, and other hyperparameters. It seems natural that the community would want to gain intuition about how these factors impact a NNâ s accuracy (i.e. the shape of the design space). Much of the work on design space exploration (DSE) of NNs has focused on developing automated approaches for ï¬ nding NN architectures that deliver higher accuracy. These automated DSE approaches include bayesian optimization (Snoek et al., 2012), simulated annealing (Ludermir et al., 2006), randomized search (Bergstra & Bengio, 2012), and genetic algorithms (Stanley & Miikkulainen, 2002). To their credit, each of these papers pro- vides a case in which the proposed DSE approach produces a NN architecture that achieves higher accuracy compared to a representative baseline. However, these papers make no attempt to provide intuition about the shape of the NN design space. Later in this paper, we eschew automated ap- proaches â instead, we refactor CNNs in such a way that we can do principled A/B comparisons to investigate how CNN architectural decisions inï¬ uence model size and accuracy. In the following sections, we ï¬ rst propose and evaluate the SqueezeNet architecture with and with- out model compression. | 1602.07360#7 | 1602.07360#9 | 1602.07360 | [
"1512.00567"
] |
1602.07360#9 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Then, we explore the impact of design choices in microarchitecture and macroarchitecture for SqueezeNet-like CNN architectures. 3 SQUEEZENET: PRESERVING ACCURACY WITH FEW PARAMETERS In this section, we begin by outlining our design strategies for CNN architectures with few param- eters. Then, we introduce the Fire module, our new building block out of which to build CNN architectures. Finally, we use our design strategies to construct SqueezeNet, which is comprised mainly of Fire modules. 3.1 ARCHITECTURAL DESIGN STRATEGIES Our overarching objective in this paper is to identify CNN architectures that have few parameters while maintaining competitive accuracy. To achieve this, we employ three main strategies when designing CNN architectures: Strategy 1. Replace 3x3 ï¬ lters with 1x1 ï¬ lters. Given a budget of a certain number of convolution ï¬ lters, we will choose to make the majority of these ï¬ lters 1x1, since a 1x1 ï¬ lter has 9X fewer parameters than a 3x3 ï¬ lter. | 1602.07360#8 | 1602.07360#10 | 1602.07360 | [
"1512.00567"
] |
1602.07360#10 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Strategy 2. Decrease the number of input channels to 3x3 ï¬ lters. Consider a convolution layer that is comprised entirely of 3x3 ï¬ lters. The total quantity of parameters in this layer is (number of input channels) * (number of ï¬ lters) * (3*3). So, to maintain a small total number of parameters in a CNN, it is important not only to decrease the number of 3x3 ï¬ lters (see Strategy 1 above), but also to decrease the number of input channels to the 3x3 ï¬ lters. We decrease the number of input channels to 3x3 ï¬ lters using squeeze layers, which we describe in the next section. Strategy 3. Downsample late in the network so that convolution layers have large activation maps. In a convolutional network, each convolution layer produces an output activation map with a spatial resolution that is at least 1x1 and often much larger than 1x1. The height and width of these activation maps are controlled by: (1) the size of the input data (e.g. 256x256 images) and (2) | 1602.07360#9 | 1602.07360#11 | 1602.07360 | [
"1512.00567"
] |
1602.07360#11 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | 3 conference paper at ICLR 2017 saves 1x1 convolution filters RelU. expane 1x1 and 3x3 convolution filters = ved fo» 0008 09008f 090) fe) Ate) Ale) Ale) Boa Iedee) Aptede) Aetere) 0907 oa0F% \jao0% 999 # Under review as a conference paper at ICLR 2017 Figure 1: Microarchitectural view: Organization of convolution ï¬ lters in the Fire module. In this example, s1x1 = 3, e1x1 = 4, and e3x3 = 4. We illustrate the convolution ï¬ lters but not the activations. the choice of layers in which to downsample in the CNN architecture. Most commonly, downsam- pling is engineered into CNN architectures by setting the (stride > 1) in some of the convolution or pooling layers (e.g. (Szegedy et al., 2014; Simonyan & Zisserman, 2014; Krizhevsky et al., 2012)). If early3 layers in the network have large strides, then most layers will have small activation maps. Conversely, if most layers in the network have a stride of 1, and the strides greater than 1 are con- centrated toward the end4 of the network, then many layers in the network will have large activation maps. Our intuition is that large activation maps (due to delayed downsampling) can lead to higher classiï¬ cation accuracy, with all else held equal. Indeed, K. He and H. | 1602.07360#10 | 1602.07360#12 | 1602.07360 | [
"1512.00567"
] |
1602.07360#12 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Sun applied delayed down- sampling to four different CNN architectures, and in each case delayed downsampling led to higher classiï¬ cation accuracy (He & Sun, 2015). Strategies 1 and 2 are about judiciously decreasing the quantity of parameters in a CNN while attempting to preserve accuracy. Strategy 3 is about maximizing accuracy on a limited budget of parameters. Next, we describe the Fire module, which is our building block for CNN architectures that enables us to successfully employ Strategies 1, 2, and 3. 3.2 THE FIRE MODULE We deï¬ ne the Fire module as follows. A Fire module is comprised of: a squeeze convolution layer (which has only 1x1 ï¬ lters), feeding into an expand layer that has a mix of 1x1 and 3x3 convolution ï¬ lters; we illustrate this in Figure 1. The liberal use of 1x1 ï¬ lters in Fire modules is an application of Strategy 1 from Section 3.1. We expose three tunable dimensions (hyperparameters) in a Fire module: s1x1, e1x1, and e3x3. In a Fire module, s1x1 is the number of ï¬ lters in the squeeze layer (all 1x1), e1x1 is the number of 1x1 ï¬ lters in the expand layer, and e3x3 is the number of 3x3 ï¬ lters in the expand layer. When we use Fire modules we set s1x1 to be less than (e1x1 + e3x3), so the squeeze layer helps to limit the number of input channels to the 3x3 ï¬ lters, as per Strategy 2 from Section 3.1. 3.3 THE SQUEEZENET ARCHITECTURE We now describe the SqueezeNet CNN architecture. We illustrate in Figure 2 that SqueezeNet begins with a standalone convolution layer (conv1), followed by 8 Fire modules (ï¬ re2-9), ending with a ï¬ nal conv layer (conv10). We gradually increase the number of ï¬ lters per ï¬ re module from the beginning to the end of the network. | 1602.07360#11 | 1602.07360#13 | 1602.07360 | [
"1512.00567"
] |
1602.07360#13 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | SqueezeNet performs max-pooling with a stride of 2 after layers conv1, ï¬ re4, ï¬ re8, and conv10; these relatively late placements of pooling are per Strategy 3 from Section 3.1. We present the full SqueezeNet architecture in Table 1. 3In our terminology, an â earlyâ layer is close to the input data. 4In our terminology, the â endâ of the network is the classiï¬ er. 4 review as a conference paper at ICLR 2017 conv J 96 } 96 maxpool/2 maxpool/2 | fire? 128 fired 128 fired maxppol/2 256 | 384 L__,] = Pa 12 maxpool/2 maxpool/2 512 512 1000 J 2000 slobal wepo0| a ador global avgpoo! rotted Gir) dog" convi, j maxpool/2 96 Citirez [convixd) 18 < fire3 128 â â _] Tired (convixa) maxpool/2 oe [convix1| 384 on sy) maxpool/2 512 1000 global avgpool t 2017 conv convi, j } 96 maxpool/2 maxpool/2 | 96 fire? Citirez [convixd) 128 18 < fired fire3 128 128 â â _] fired Tired (convixa) maxppol/2 maxpool/2 | oe [convix1| L__,] 384 on 12 sy) maxpool/2 maxpool/2 512 512 J 2000 1000 global avgpoo! global avgpool t Gir) | 1602.07360#12 | 1602.07360#14 | 1602.07360 | [
"1512.00567"
] |
1602.07360#14 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | # Under review as a conference paper at ICLR 2017 conv convi, j J 96 } 96 maxpool/2 maxpool/2 maxpool/2 | 96 fire? Citirez [convixd) 128 18 < fired fire3 128 128 â â _] fired Tired (convixa) maxppol/2 maxpool/2 256 | oe [convix1| 384 L__,] 384 = on Pa 12 sy) maxpool/2 maxpool/2 maxpool/2 512 512 512 1000 J 2000 1000 slobal wepo0| a ador global avgpoo! global avgpool t rotted Gir) dog" Figure 2: Macroarchitectural view of our SqueezeNet architecture. Left: SqueezeNet (Section 3.3); Middle: SqueezeNet with simple bypass (Section 6); Right: SqueezeNet with complex bypass (Sec- tion 6). 3.3.1 OTHER SQUEEZENET DETAILS For brevity, we have omitted number of details and design choices about SqueezeNet from Table 1 and Figure 2. We provide these design choices in the following. The intuition behind these choices may be found in the papers cited below. So that the output activations from 1x1 and 3x3 ï¬ lters have the same height and width, we add a 1-pixel border of zero-padding in the input data to 3x3 ï¬ lters of expand modules. â ¢ ReLU (Nair & Hinton, 2010) is applied to activations from squeeze and expand layers. â ¢ Dropout (Srivastava et al., 2014) with a ratio of 50% is applied after the ï¬ re9 module. â ¢ Note the lack of fully-connected layers in SqueezeNet; this design choice was inspired by the NiN (Lin et al., 2013) architecture. | 1602.07360#13 | 1602.07360#15 | 1602.07360 | [
"1512.00567"
] |
1602.07360#15 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | â ¢ When training SqueezeNet, we begin with a learning rate of 0.04, and we lin- early decrease the learning rate throughout training, as described in (Mishkin et al., 2016). For details on the training protocol (e.g. batch size, learning rate, parame- ter initialization), please refer to our Caffe-compatible conï¬ guration ï¬ les located here: https://github.com/DeepScale/SqueezeNet. â ¢ The Caffe framework does not natively support a convolution layer that contains multiple ï¬ lter resolutions (e.g. 1x1 and 3x3) (Jia et al., 2014). To get around this, we implement our expand layer with two separate convolution layers: a layer with 1x1 ï¬ lters, and a layer with 3x3 ï¬ lters. Then, we concatenate the outputs of these layers together in the channel dimension. This is numerically equivalent to implementing one layer that contains both 1x1 and 3x3 ï¬ lters. We released the SqueezeNet conï¬ guration ï¬ les in the format deï¬ | 1602.07360#14 | 1602.07360#16 | 1602.07360 | [
"1512.00567"
] |
1602.07360#16 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | ned by the Caffe CNN frame- work. However, in addition to Caffe, several other CNN frameworks have emerged, including MXNet (Chen et al., 2015a), Chainer (Tokui et al., 2015), Keras (Chollet, 2016), and Torch (Col- lobert et al., 2011). Each of these has its own native format for representing a CNN architec- ture. That said, most of these libraries use the same underlying computational back-ends such as cuDNN (Chetlur et al., 2014) and MKL-DNN (Das et al., 2016). The research community has | 1602.07360#15 | 1602.07360#17 | 1602.07360 | [
"1512.00567"
] |
1602.07360#17 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | 5 Under review as a conference paper at ICLR 2017 ported the SqueezeNet CNN architecture for compatibility with a number of other CNN software frameworks: â ¢ MXNet (Chen et al., 2015a) port of SqueezeNet: (Haria, 2016) â ¢ Chainer (Tokui et al., 2015) port of SqueezeNet: (Bell, 2016) â ¢ Keras (Chollet, 2016) port of SqueezeNet: (DT42, 2016) â ¢ Torch (Collobert et al., 2011) port of SqueezeNetâ s Fire Modules: (Waghmare, 2016) 4 EVALUATION OF SQUEEZENET We now turn our attention to evaluating SqueezeNet. In each of the CNN model compression papers reviewed in Section 2.1, the goal was to compress an AlexNet (Krizhevsky et al., 2012) model that was trained to classify images using the ImageNet (Deng et al., 2009) (ILSVRC 2012) dataset. Therefore, we use AlexNet5 and the associated model compression results as a basis for comparison when evaluating SqueezeNet. | 1602.07360#16 | 1602.07360#18 | 1602.07360 | [
"1512.00567"
] |
1602.07360#18 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | Table 1: SqueezeNet architectural dimensions. (The formatting of this table was inspired by the Inception2 paper (Ioffe & Szegedy, 2015).) # Under review as a conference paper at ICLR 2017 4 EVALUATION OF SQUEEZENET We now turn our attention to evaluating SqueezeNet. In each of the CNN model compression papers reviewed in Section 2.1, the goal was to compress an AlexNet (Krizhevsky et al., 2012) model that was trained to classify images using the ImageNet (Deng et al., 2009) (ILSVRC 2012) dataset. Therefore, we use AlexNet5 and the associated model compression results as a basis for comparison when evaluating SqueezeNet. | 1602.07360#17 | 1602.07360#19 | 1602.07360 | [
"1512.00567"
] |
1602.07360#19 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | input image | 224x224x3 conv 111x111x96 | 7x7/2 (x96) 1 100% (7x7) 6bit 14,208 14,208 maxpool1 55x55x96 3x3/2 0 fire2 55x55x128 2 16 64 64 100% 100% 33% 6bit 11,920 5,746 fire3 55x55x128 2 16 64 64 100% 100% 33% 6bit 12,432 6,258 fired 55x55x256 2 32 128 128 100% 100% 33% 6bit 45,344 20,646 maxpool4 | 27x27x256 3x3/2 0 fires 2727x256 2 32 128 128 100% 100% 33% 6bit 49,440 24,742 fire 27x27x384 2 48 192 192 100% 50% 33% 6bit 104,880 44,700 fire7 2727x384 2 48 192 192 50% 100% 33% 6bit 111,024 46,236 fires 27x27x512 2 64 256 256 100% 50% 33% 6bit 188,992 77,581 maxpool8 13x12x512 3x3/2 0 fired 13x13x512 2 64 256 256 50% 100% 30% 6bit 197,184 77,581 conv10 13x13x1000 } 1x1/1 (x1000) 1 20% (3x3) 6bit 513,000 103,400 avgpool10 | 1x1x1000 13x13/1 0 - 1,248,424 421,098 activations parameters compression info (total) (total) In Table 2, we review SqueezeNet in the context of recent model compression results. | 1602.07360#18 | 1602.07360#20 | 1602.07360 | [
"1512.00567"
] |
1602.07360#20 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | The SVD- based approach is able to compress a pretrained AlexNet model by a factor of 5x, while diminishing top-1 accuracy to 56.0% (Denton et al., 2014). Network Pruning achieves a 9x reduction in model size while maintaining the baseline of 57.2% top-1 and 80.3% top-5 accuracy on ImageNet (Han et al., 2015b). Deep Compression achieves a 35x reduction in model size while still maintaining the baseline accuracy level (Han et al., 2015a). Now, with SqueezeNet, we achieve a 50X reduction in model size compared to AlexNet, while meeting or exceeding the top-1 and top-5 accuracy of AlexNet. We summarize all of the aforementioned results in Table 2. It appears that we have surpassed the state-of-the-art results from the model compression commu- nity: even when using uncompressed 32-bit values to represent the model, SqueezeNet has a 1.4Ã smaller model size than the best efforts from the model compression community while maintain- ing or exceeding the baseline accuracy. Until now, an open question has been: are small models amenable to compression, or do small models â | 1602.07360#19 | 1602.07360#21 | 1602.07360 | [
"1512.00567"
] |
1602.07360#21 | SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size | needâ all of the representational power afforded by dense ï¬ oating-point values? To ï¬ nd out, we applied Deep Compression (Han et al., 2015a) 5Our baseline is bvlc alexnet from the Caffe codebase (Jia et al., 2014). 6 # Under review as a conference paper at ICLR 2017 Table 2: Comparing SqueezeNet to model compression approaches. By model size, we mean the number of bytes required to store all of the parameters in the trained model. Reduction in Model Size vs. AlexNet 1x 5x Top-1 ImageNet Accuracy 57.2% 56.0% CNN architecture Original â Compressed Model Size 240MB 240MB â 48MB Data Type Compression Approach None (baseline) SVD (Denton et al., 2014) Network Pruning (Han et al., 2015b) Deep Compression (Han et al., 2015a) None Deep Compression Deep Compression 32 bit 32 bit AlexNet AlexNet 32 bit 240MB â 27MB 9x 57.2% AlexNet 240MB â 6.9MB 5-8 bit 57.2% AlexNet 35x 32 bit 8 bit 6 bit 4.8MB 4.8MB â 0.66MB 4.8MB â 0.47MB 50x 363x 510x SqueezeNet (ours) SqueezeNet (ours) SqueezeNet (ours) 57.5% 57.5% 57.5% Top-5 ImageNet Accuracy 80.3% 79.4% 80.3% 80.3% 80.3% 80.3% 80.3% to SqueezeNet, using 33% sparsity6 and 8-bit quantization. This yields a 0.66 MB model (363à smaller than 32-bit AlexNet) with equivalent accuracy to AlexNet. Further, applying Deep Compres- sion with 6-bit quantization and 33% sparsity on SqueezeNet, we produce a 0.47MB model (510à smaller than 32-bit AlexNet) with equivalent accuracy. Our small model is indeed amenable to compression. | 1602.07360#20 | 1602.07360#22 | 1602.07360 | [
"1512.00567"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.