【翻译】【AlexNet】ImageNet Classification with Deep Convolutional Neural Networks

ImageNet Classification with Deep Convolutional Neural Networks
用深度卷积神经网络进行ImageNet分类

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton

论文地址:https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf

Abstract(摘要)

We trained a large, deep convolutional neural network to classify the 1.2 million high-resolution images in the ImageNet LSVRC-2010 contest into the 1000 different classes. On the test data, we achieved top-1 and top-5 error rates of 37.5% and 17.0% which is considerably better than the previous state-of-the-art. The neural network, which has 60 million parameters and 650,000 neurons, consists of five convolutional layers, some of which are followed by max-pooling layers, and three fully-connected layers with a final 1000-way softmax. To make training faster, we used non-saturating neurons and a very efficient GPU implementation of the convolution operation. To reduce overfitting in the fully-connected layers we employed a recently-developed regularization method called “dropout” that proved to be very effective. We also entered a variant of this model in the ILSVRC-2012 competition and achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry.
  我们训练了一个大型的深度卷积神经网络,将ImageNet LSVRC-2010竞赛中的120万张高分辨率图像分类到1000个不同的类别。在测试数据上,我们取得了37.5%和17.0%的Top-1和Top-5错误率,大大优于以前的最先进水平。该神经网络有6000万个参数和65万个神经元,由5个卷积层组成,其中一些后面跟着最大池化层,还有3个全连接层,最后是1000路的softmax。为了使训练更快,我们使用了非饱和神经元和一个非常高效的GPU实现卷积操作。为了减少全连接层的过拟合,我们采用了最近开发的名为 "dropout"的正则化方法,该方法被证明是非常有效的。我们还将这个模型的一个变体参加了ILSVRC-2012比赛,并取得了15.3%的Top-5测试错误率,而第二名的错误率为26.2%。

1 Introduction(介绍)

Current approaches to object recognition make essential use of machine learning methods. To improve their performance, we can collect larger datasets, learn more powerful models, and use better techniques for preventing overfitting. Until recently, datasets of labeled images were relatively small — on the order of tens of thousands of images (e.g., NORB [16], Caltech-101/256 [8, 9], and CIFAR-10/100 [12]). Simple recognition tasks can be solved quite well with datasets of this size, especially if they are augmented with label-preserving transformations. For example, the currentbest error rate on the MNIST digit-recognition task (<0.3%) approaches human performance [4]. But objects in realistic settings exhibit considerable variability, so to learn to recognize them it is necessary to use much larger training sets. And indeed, the shortcomings of small image datasets have been widely recognized (e.g., Pinto et al. [21]), but it has only recently become possible to collect labeled datasets with millions of images. The new larger datasets include LabelMe [23], which consists of hundreds of thousands of fully-segmented images, and ImageNet [6], which consists of over 15 million labeled high-resolution images in over 22,000 categories.
  目前的目标识别方法对机器学习方法的使用至关重要。为了提高它们的性能,我们可以收集更大的数据集,学习更强大的模型,并使用更好的技术来防止过拟合。直到最近,标记图像的数据集相对较小–在数万张图像的数量级上(例如,NORB[16],Caltech-101/256[8,9],和CIFAR-10/100[12])。简单的识别任务可以通过这种规模的数据集得到很好的解决,特别是如果它们得到了标签保护性转换的增强。例如,目前MNIST数字识别任务的最佳错误率(<0.3%)接近人类的表现[4]。但是现实环境中的目标表现出相当大的差异性,所以要学会识别它们,就必须使用更大的训练集。事实上,小型图像数据集的缺点已经被广泛认可(例如,Pinto等人[21]),但直到最近才有可能收集具有数百万张图像的标记数据集。新的较大的数据集包括LabelMe[23],它由数十万张完全分割的图像组成,以及ImageNet[6],它由22000多个类别的1500多万张标记的高分辨率图像组成。
  To learn about thousands of objects from millions of images, we need a model with a large learning capacity. However, the immense complexity of the object recognition task means that this problem cannot be specified even by a dataset as large as ImageNet, so our model should also have lots of prior knowledge to compensate for all the data we don’t have. Convolutional neural networks (CNNs) constitute one such class of models [16, 11, 13, 18, 15, 22, 26]. Their capacity can be controlled by varying their depth and breadth, and they also make strong and mostly correct assumptions about the nature of images (namely, stationarity of statistics and locality of pixel dependencies). Thus, compared to standard feedforward neural networks with similarly-sized layers, CNNs have much fewer connections and parameters and so they are easier to train, while their theoretically-best performance is likely to be only slightly worse.
  为了从数以百万计的图像中学习成千上万的目标,我们需要一个具有较大学习能力的模型。然而,目标识别任务的巨大复杂性意味着即使像ImageNet这样大的数据集也不能说明这个问题,所以我们的模型还应该有很多先验知识来弥补我们没有的所有数据。卷积神经网络(CNN)构成了这样一类模型[16, 11, 13, 18, 15, 22, 26]。它们的能力可以通过改变其深度和广度来控制,而且它们还对图像的性质做出了强有力的、大部分正确的假设(即统计的静止性和像素依赖的位置性)。因此,与具有类似大小的层的标准前馈神经网络相比,CNN的连接和参数要少得多,因此它们更容易训练,而其理论上的最佳性能可能只是略差。
  Despite the attractive qualities of CNNs, and despite the relative efficiency of their local architecture, they have still been prohibitively expensive to apply in large scale to high-resolution images. Luckily, current GPUs, paired with a highly-optimized implementation of 2D convolution, are powerful enough to facilitate the training of interestingly-large CNNs, and recent datasets such as ImageNet contain enough labeled examples to train such models without severe overfitting.
  尽管CNN具有吸引人的特质,尽管其局部结构具有相对的效率,但它们在大规模应用于高分辨率图像方面的成本仍然过高。幸运的是,目前的GPU与高度优化的二维卷积实现相搭配,足以促进有趣的大型CNN的训练,而且最近的数据集,如ImageNet,包含足够的标记实例来训练这样的模型,而不会出现严重的过拟合。
  The specific contributions of this paper are as follows: we trained one of the largest convolutional neural networks to date on the subsets of ImageNet used in the ILSVRC-2010 and ILSVRC-2012 competitions [2] and achieved by far the best results ever reported on these datasets. We wrote a highly-optimized GPU implementation of 2D convolution and all the other operations inherent in training convolutional neural networks, which we make available publicly1. Our network contains a number of new and unusual features which improve its performance and reduce its training time, which are detailed in Section 3. The size of our network made overfitting a significant problem, even with 1.2 million labeled training examples, so we used several effective techniques for preventing overfitting, which are described in Section 4. Our final network contains five convolutional and three fully-connected layers, and this depth seems to be important: we found that removing any convolutional layer (each of which contains no more than 1% of the model’s parameters) resulted in inferior performance.
  本文的具体贡献如下:我们在ILSVRC-2010和ILSVRC-2012比赛中使用的ImageNet子集上训练了迄今为止最大的卷积神经网络之一[2],并取得了迄今为止在这些数据集上报告的最佳结果。我们编写了一个高度优化的二维卷积的GPU实现,以及训练卷积神经网络中固有的所有其他操作,我们公开提供代码。我们的网络包含一些新的和不寻常的功能,这些功能提高了它的性能并减少了它的训练时间,这些将在第3节详细介绍。我们网络的规模使得过拟合成为一个重要的问题,即使有120万个标记的训练例子,所以我们使用了一些有效的技术来防止过拟合,这些将在第4节中描述。我们最终的网络包含五个卷积层和三个全连接层,这个深度似乎很重要:我们发现,去除任何卷积层(每个卷积层包含的参数不超过模型的1%)都会导致性能下降。
  In the end, the network’s size is limited mainly by the amount of memory available on current GPUs and by the amount of training time that we are willing to tolerate. Our network takes between five and six days to train on two GTX 580 3GB GPUs. All of our experiments suggest that our results can be improved simply by waiting for faster GPUs and bigger datasets to become available.
  最后,网络的规模主要受限于当前GPU上的可用内存量和我们愿意容忍的训练时间量。我们的网络在两个GTX580 3GB GPU上需要五到六天的时间来训练。我们所有的实验表明,只要等待更快的GPU和更大的数据集出现,我们的结果就可以得到改善。

2 The Dataset(数据库)

ImageNet is a dataset of over 15 million labeled high-resolution images belonging to roughly 22,000 categories. The images were collected from the web and labeled by human labelers using Amazon’s Mechanical Turk crowd-sourcing tool. Starting in 2010, as part of the Pascal Visual Object Challenge, an annual competition called the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) has been held. ILSVRC uses a subset of ImageNet with roughly 1000 images in each of 1000 categories. In all, there are roughly 1.2 million training images, 50,000 validation images, and 150,000 testing images.
  ImageNet是一个由超过1500万张贴有标签的高分辨率图像组成的数据集,属于大约22000个类别。这些图像是从网上收集的,并由人类标签员使用亚马逊的Mechanical Turk众包工具进行标注。从2010年开始,作为Pascal视觉对象挑战赛的一部分,每年都会举办一个名为ImageNet大规模视觉识别挑战赛(ILSVRC)的比赛。ILSVRC使用ImageNet的一个子集,在1000个类别中的每一个都有大约1000张图片。总的来说,大约有120万张训练图像,5万张验证图像和15万张测试图像。
  ILSVRC-2010 is the only version of ILSVRC for which the test set labels are available, so this is the version on which we performed most of our experiments. Since we also entered our model in the ILSVRC-2012 competition, in Section 6 we report our results on this version of the dataset as well, for which test set labels are unavailable. On ImageNet, it is customary to report two error rates: top-1 and top-5, where the top-5 error rate is the fraction of test images for which the correct label is not among the five labels considered most probable by the model.
  ILSVRC-2010是唯一一个有测试集标签的ILSVRC版本,所以这也是我们进行大部分实验的版本。由于我们的模型也参加了ILSVRC-2012的比赛,在第6节中,我们也报告了我们在这个版本的数据集上的结果,因为测试集的标签是不可用的。在ImageNet上,通常报告两个错误率:Top-1和Top-5,其中Top-5错误率是指正确标签不在模型认为最可能的五个标签中的测试图像的比例。
  ImageNet consists of variable-resolution images, while our system requires a constant input dimensionality. Therefore, we down-sampled the images to a fixed resolution of 256 × 256. Given a rectangular image, we first rescaled the image such that the shorter side was of length 256, and then cropped out the central 256×256 patch from the resulting image. We did not pre-process the images in any other way, except for subtracting the mean activity over the training set from each pixel. So we trained our network on the (centered) raw RGB values of the pixels.
  ImageNet由不同分辨率的图像组成,而我们的系统需要一个恒定的输入维度。因此,我们将图像下采样为256×256的固定分辨率。给定一个长方形的图像,我们首先重新缩放图像,使短边的长度为256,然后从得到的图像中裁剪出中央的256×256块。除了从每个像素上减去训练集的平均活动外,我们没有以任何其他方式预处理图像。所以我们在像素的(居中)原始RGB值上训练我们的网络。

3 The Architecture(框架)

The architecture of our network is summarized in Figure 2. It contains eight learned layers five convolutional and three fully-connected. Below, we describe some of the novel or unusual features of our network’s architecture. Sections 3.1-3.4 are sorted according to our estimation of their importance, with the most important first.
  我们的网络结构概述于图2。它包含八个学习层,五个卷积层和三个全连接层。下面,我们将描述我们的网络结构的一些新颖或不寻常的特点。第3.1-3.4节是根据我们对其重要性的估计进行排序的,最重要的放在前面。

加载失败
Figure 2: An illustration of the architecture of our CNN, explicitly showing the delineation of responsibilities between the two GPUs. One GPU runs the layer-parts at the top of the figure while the other runs the layer-parts at the bottom. The GPUs communicate only at certain layers. The network’s input is 150,528-dimensional, and the number of neurons in the network’s remaining layers is given by 253,440–186,624–64,896–64,896–43,2644096–4096–1000.
图2:我们的CNN的架构图,明确显示了两个GPU之间的职责划分。一个GPU运行图中顶部的层部分,而另一个则运行底部的层部分。GPU只在某些层进行通信。网络的输入是150,528维,网络其余层的神经元数量由253,440-186,624-64,896-64,896-43,2644096-4096-1000给出。

3.1 ReLU Nonlinearity(非线性的ReLU)

The standard way to model a neuron’s output f f f as a function of its input x x x is with f ( x ) = t a n h ( x ) f(x) = tanh(x) f(x)=tanh(x) or f ( x ) = ( 1 + e − x ) − 1 f(x) = (1 + e^{−x})−1 f(x)=(1+ex)1. In terms of training time with gradient descent, these saturating nonlinearities are much slower than the non-saturating nonlinearity f ( x ) = m a x ( 0 , x ) f (x) = max(0, x) f(x)=max(0,x). Following Nair and Hinton [20], we refer to neurons with this nonlinearity as Rectified Linear Units (ReLUs). Deep convolutional neural networks with ReLUs train several times faster than their equivalents with tanh units. This is demonstrated in Figure 1, which shows the number of iterations required to reach 25% training error on the CIFAR-10 dataset for a particular four-layer convolutional network. This plot shows that we would not have been able to experiment with such large neural networks for this work if we had used traditional saturating neuron models.
  用来模拟神经元的输出 f f f作为其输入 x x x的函数的标准方法是 f ( x ) = t a n h ( x ) f(x)=tanh(x) f(x)=tanh(x) f ( x ) = ( 1 + e − x ) − 1 f(x)=(1+e^{-x})-1 f(x)=(1+ex)1。就梯度下降的训练时间而言,这些饱和非线性比非饱和非线性 f ( x ) = m a x ( 0 , x ) f (x) = max(0, x) f(x)=max(0,x)慢得多。继Nair和Hinton[20]之后,我们将具有这种非线性的神经元称为整流线性单元(ReLU)。具有ReLU的深度卷积神经网络比具有tanh单元的深度卷积神经网络的训练速度快几倍。这在图1中得到了证明,该图显示了在CIFAR-10数据集上,一个特定的四层卷积网络达到25%的训练误差所需的迭代次数。该图显示,如果我们使用传统的饱和神经元模型,我们将无法在这项工作中试验如此大的神经网络。

加载失败
Figure 1: A four-layer convolutional neural network with ReLUs (solid line) reaches a 25% training error rate on CIFAR-10 six times faster than an equivalent network with tanh neurons (dashed line). The learning rates for each network were chosen independently to make training as fast as possible. No regularization of any kind was employed. The magnitude of the effect demonstrated here varies with network architecture, but networks with ReLUs consistently learn several times faster than equivalents with saturating neurons.
图1:一个带有ReLU的四层卷积神经网络(实线)在CIFAR-10上达到25%的训练错误率,比带有tanh神经元的同等网络(虚线)快六倍。每个网络的学习率是独立选择的,以使训练尽可能快。没有采用任何形式的正则化。这里展示的效果的大小随网络结构而变化,但具有ReLU的网络始终比具有饱和神经元的同等网络快几倍。。

We are not the first to consider alternatives to traditional neuron models in CNNs. For example, Jarrett et al. [11] claim that the nonlinearity f ( x ) = ∣ t a n h ( x ) ∣ f (x) = |tanh(x)| f(x)=tanh(x) works particularly well with their type of contrast normalization followed by local average pooling on the Caltech-101 dataset. However, on this dataset the primary concern is preventing overfitting, so the effect they are observing is different from the accelerated ability to fit the training set which we report when using ReLUs. Faster learning has a great influence on the performance of large models trained on large datasets.
  我们并不是第一个考虑在CNN中替代传统神经元模型的人。例如,Jarrett等人[11]声称非线性 f ( x ) = ∣ t a n h ( x ) ∣ f (x) = |tanh(x)| f(x)=tanh(x)在Caltech-101数据集上与他们的对比度归一化类型以及局部平均池化的效果特别好。然而,在这个数据集上,主要关注的是防止过拟合,所以他们观察到的效果与我们使用ReLU时报告的加速拟合训练集的能力不同。更快的学习对在大型数据集上训练的大型模型的性能有很大影响。

3.2 Training on Multiple GPUs(在多个GPU上进行训练)

A single GTX 580 GPU has only 3GB of memory, which limits the maximum size of the networks that can be trained on it. It turns out that 1.2 million training examples are enough to train networks which are too big to fit on one GPU. Therefore we spread the net across two GPUs. Current GPUs are particularly well-suited to cross-GPU parallelization, as they are able to read from and write to one another’s memory directly, without going through host machine memory. The parallelization scheme that we employ essentially puts half of the kernels (or neurons) on each GPU, with one additional trick: the GPUs communicate only in certain layers. This means that, for example, the kernels of layer 3 take input from all kernel maps in layer 2. However, kernels in layer 4 take input only from those kernel maps in layer 3 which reside on the same GPU. Choosing the pattern of connectivity is a problem for cross-validation, but this allows us to precisely tune the amount of communication until it is an acceptable fraction of the amount of computation.
  一台GTX 580 GPU只有3GB内存,这限制了在其上训练的网络的最大规模。事实证明,120万个训练实例足以训练出太大的网络,而这些网络在一个GPU上是放不下的。因此,我们将网络分散在两个GPU上。目前的GPU特别适合于跨GPU并行化,因为它们能够直接从对方的内存中读取和写入,而不需要通过主机内存。我们采用的并行化方案基本上是将一半的内核(或神经元)放在每个GPU上,并有一个额外的技巧:GPU只在某些层进行通信。这意味着,例如,第3层的内核从第2层的所有内核图中获取输入。然而,第4层的内核只从驻扎在同一GPU上的第3层的内核图中获取输入。选择连接模式是交叉验证的一个问题,但这允许我们精确调整通信量,直到它是计算量的一个可接受的部分。
  The resultant architecture is somewhat similar to that of the “columnar” CNN employed by Cire ̧ san et al. [5], except that our columns are not independent (see Figure 2). This scheme reduces our top-1 and top-5 error rates by 1.7% and 1.2%, respectively, as compared with a net with half as many kernels in each convolutional layer trained on one GPU. The two-GPU net takes slightly less time to train than the one-GPU net2.
  由此产生的架构与Ciresan等人[5]采用的 "柱状 "CNN有点类似,只是我们的柱子不是独立的(见图2)。与在一个GPU上训练的每个卷积层有一半内核的网络相比,这个方案将我们的Top-1和Top-5错误率分别降低了1.7%和1.2%。双GPU网络的训练时间比单GPU网络的训练时间略短(在最后的卷积层中,单GPU网络实际上与双GPU网络有相同数量的内核。这是因为该网络的大部分参数都在第一个全连接层中,该层将最后一个卷积层作为输入。因此,为了使两个网络的参数数量大致相同,我们没有将最后的卷积层(以及后面的全连接层)的大小减半。因此,这种比较是偏向于单GPU网络的,因为它比双GPU网络的 "一半大小 "要大)。

3.3 Local Response Normalization(局部响应归一化)

ReLUs have the desirable property that they do not require input normalization to prevent them from saturating. If at least some training examples produce a positive input to a ReLU, learning will happen in that neuron. However, we still find that the following local normalization scheme aids generalization. Denoting by a x , y i a_{x,y}^i ax,yi the activity of a neuron computed by applying kernel i i i at position ( x , y ) (x, y) (x,y) and then applying the ReLU nonlinearity, the response-normalized activity b x , y i b_{x,y}^i bx,yi is given by the expression
  ReLU有一个理想的特性,即它们不需要输入归一化来防止它们饱和。如果至少有一些训练实例对ReLU产生了积极的输入,学习就会在该神经元中发生。然而,我们仍然发现,下面的局部归一化方案有助于泛化。用 a x , y i a_{x,y}^i ax,yi表示通过在 ( x , y ) (x,y) (x,y)位置应用核 i i i,然后应用ReLU非线性计算的神经元的活动,响应归一化的活动 b x , y i b_{x,y}^i bx,yi由以下表达式给出
  在这里插入图片描述
where the sum runs over n n n “adjacent” kernel maps at the same spatial position, and N N N is the total number of kernels in the layer. The ordering of the kernel maps is of course arbitrary and determined before training begins. This sort of response normalization implements a form of lateral inhibition inspired by the type found in real neurons, creating competition for big activities amongst neuron outputs computed using different kernels. The constants k , n , α , k, n, α, k,n,α, and β β β are hyper-parameters whose values are determined using a validation set; we used k = 2 , n = 5 , α = 1 0 − 4 k = 2, n = 5, α = 10^{−4} k=2,n=5,α=104, and β = 0.75 β = 0.75 β=0.75. We applied this normalization after applying the ReLU nonlinearity in certain layers (see Section 3.5).
  其中,总和在同一空间位置的 n n n"相邻 "内核图上运行, N N N是该层中核的总数量。当然,内核图的排序是任意的,并在训练开始前确定。这种反应正常化实现了一种横向抑制的形式,其灵感来自于真实神经元的类型,在使用不同内核计算的神经元输出之间产生了大活动的竞争。常数 k , n , α , k, n, α, k,n,α, β β β是超参数,其值通过验证集确定;我们使用 k = 2 , n = 5 , α = 1 0 − 4 k = 2, n = 5, α = 10^{-4} k=2,n=5,α=104, 和 β = 0.75 β = 0.75 β=0.75。我们在某些层中应用ReLU非线性后应用了这种归一化(见第3.5节)。
  This scheme bears some resemblance to the local contrast normalization scheme of Jarrett et al. [11], but ours would be more correctly termed “brightness normalization”, since we do not subtract the mean activity. Response normalization reduces our top-1 and top-5 error rates by 1.4% and 1.2%, respectively. We also verified the effectiveness of this scheme on the CIFAR-10 dataset: a four-layer CNN achieved a 13% test error rate without normalization and 11% with normalization3.
  这个方案与Jarrett等人[11]的局部对比度归一化方案有些相似,但我们的方案更正确的说法是 “亮度归一化”,因为我们不减去平均活动。响应归一化使我们的Top-1和Top-5错误率分别降低了1.4%和1.2%。我们还在CIFAR-10数据集上验证了这个方案的有效性:一个四层的CNN在没有归一化的情况下取得了13%的测试错误率,在归一化的情况下取得了11%的错误率(由于篇幅限制,我们无法详细描述这个网络,但这里提供的代码和参数文件对其进行了精确的规定:http://code.google.com/p/cuda-convnet/)。

3.4 Overlapping Pooling(重叠池化)

Pooling layers in CNNs summarize the outputs of neighboring groups of neurons in the same kernel map. Traditionally, the neighborhoods summarized by adjacent pooling units do not overlap (e.g., [17, 11, 4]). To be more precise, a pooling layer can be thought of as consisting of a grid of pooling units spaced s s s pixels apart, each summarizing a neighborhood of size z × z z × z z×z centered at the location of the pooling unit. If we set s = z s = z s=z, we obtain traditional local pooling as commonly employed in CNNs. If we set s < z s < z s<z, we obtain overlapping pooling. This is what we use throughout our network, with s = 2 s = 2 s=2 and z = 3 z = 3 z=3. This scheme reduces the top-1 and top-5 error rates by 0.4% and 0.3%, respectively, as compared with the non-overlapping scheme s = 2 , z = 2 s = 2, z = 2 s=2,z=2, which produces output of equivalent dimensions. We generally observe during training that models with overlapping pooling find it slightly more difficult to overfit.
  CNN中的池化层总结了同一内核图中相邻的神经元组的输出。传统上,相邻的汇集单元所总结的邻域是不重叠的(例如,[17,11,4])。更准确地说,一个池化层可以被认为是由一个间隔为 s s s像素的池化单元网格组成,每个池化单元是以池化单元的位置为中心,邻域大小为 z × z z×z z×z的和。如果我们设定 s = z s=z s=z,我们就得到了CNN中通常采用的传统的局部池化。如果我们设定 s < z s<z s<z,我们就得到重叠池化。这就是我们在整个网络中使用的, s = 2 s=2 s=2 z = 3 z=3 z=3。与非重叠方案 s = 2 , z = 2 s = 2, z = 2 s=2,z=2相比,这个方案将Top-1和Top-5的错误率分别降低了0.4%和0.3%,这产生了同等维度的输出。在训练过程中,我们普遍观察到,采用重叠池化的模型发现过拟合的难度略大。

3.5 Overall Architecture(整体框架)

Now we are ready to describe the overall architecture of our CNN. As depicted in Figure 2, the net contains eight layers with weights; the first five are convolutional and the remaining three are fullyconnected. The output of the last fully-connected layer is fed to a 1000-way softmax which produces a distribution over the 1000 class labels. Our network maximizes the multinomial logistic regression objective, which is equivalent to maximizing the average across training cases of the log-probability of the correct label under the prediction distribution.
  现在我们准备描述我们的CNN的整体结构。如图2所示,该网络包含八个带权重的层;前五个是卷积层,其余三个是全连接层。最后一个全连接层的输出被送入一个1000路softmax,产生1000个类别标签的分布。我们的网络最大化了多叉逻辑回归的目标,这相当于最大化了预测分布下正确标签的对数概率的整个训练案例的平均值。
  The kernels of the second, fourth, and fifth convolutional layers are connected only to those kernel maps in the previous layer which reside on the same GPU (see Figure 2). The kernels of the third convolutional layer are connected to all kernel maps in the second layer. The neurons in the fullyconnected layers are connected to all neurons in the previous layer. Response-normalization layers follow the first and second convolutional layers. Max-pooling layers, of the kind described in Section 3.4, follow both response-normalization layers as well as the fifth convolutional layer. The ReLU non-linearity is applied to the output of every convolutional and fully-connected layer.
  第二、第四和第五卷积层的内核只与前一层中位于同一GPU上的内核图相连(见图2)。第三卷积层的内核与第二层的所有内核图相连接。完全连接层的神经元与前一层的所有神经元相连。响应归一化层紧随第一和第二卷积层。第3.4节中描述的那种最大池化层,紧随局部归一化层以及第五卷积层。ReLU非线性被应用于每个卷积层和全连接层的输出。
  The first convolutional layer filters the 224 × 224 × 3 input image with 96 kernels of size 11 × 11 × 3 with a stride of 4 pixels (this is the distance between the receptive field centers of neighboring neurons in a kernel map). The second convolutional layer takes as input the (response-normalized and pooled) output of the first convolutional layer and filters it with 256 kernels of size 5 × 5 × 48. The third, fourth, and fifth convolutional layers are connected to one another without any intervening pooling or normalization layers. The third convolutional layer has 384 kernels of size 3 × 3 × 256 connected to the (normalized, pooled) outputs of the second convolutional layer. The fourth convolutional layer has 384 kernels of size 3 × 3 × 192 , and the fifth convolutional layer has 256 kernels of size 3 × 3 × 192. The fully-connected layers have 4096 neurons each.
  第一个卷积层用96个大小为11×11×3的核对224×224×3的输入图像进行过滤,跨度为4像素(这是核图中相邻神经元的感受野中心的距离)。第二个卷积层将第一个卷积层的输出(响应归一化和池化化)作为输入,并用256个大小为5×5×48的内核对其进行过滤。第三、第四和第五卷积层相互连接,没有任何中间的池化或归一化层。第三卷积层有384个大小为3×3×256的核,与第二卷积层的(归一化、池化的)输出相连。第四卷积层有384个大小为3×3×192的核,第五卷积层有256个大小为3×3×192的核。全连接层每个有4096个神经元。

4 Reducing Overfitting(减少过拟合)

Our neural network architecture has 60 million parameters. Although the 1000 classes of ILSVRC make each training example impose 10 bits of constraint on the mapping from image to label, this turns out to be insufficient to learn so many parameters without considerable overfitting. Below, we describe the two primary ways in which we combat overfitting.
  我们的神经网络架构有6000万个参数。尽管ILSVRC的1000个类使每个训练实例对从图像到标签的映射施加了10比特的约束,但事实证明,这不足以在没有相当大的过拟合的情况下学习这么多的参数。下面,我们将描述我们对抗过拟合的两种主要方式。

4.1 Data Augmentation(数据增强)

The easiest and most common method to reduce overfitting on image data is to artificially enlarge the dataset using label-preserving transformations (e.g., [25, 4, 5]). We employ two distinct forms of data augmentation, both of which allow transformed images to be produced from the original images with very little computation, so the transformed images do not need to be stored on disk. In our implementation, the transformed images are generated in Python code on the CPU while the GPU is training on the previous batch of images. So these data augmentation schemes are, in effect, computationally free.
  减少图像数据过拟合的最简单和最常见的方法是使用标签保护的变换来人为地扩大数据集(例如,[25,4,5])。我们采用了两种不同形式的数据放大,这两种方法都允许以很少的计算量从原始图像中产生变换后的图像,因此变换后的图像不需要存储在磁盘上。在我们的实施中,转换后的图像是在CPU上用Python代码生成的,而GPU正在对前一批图像进行训练。因此,这些数据增强方案实际上是无计算的。
  The first form of data augmentation consists of generating image translations and horizontal reflections. We do this by extracting random 224 × 224 patches (and their horizontal reflections) from the 256×256 images and training our network on these extracted patches4. This increases the size of our training set by a factor of 2048, though the resulting training examples are, of course, highly interdependent. Without this scheme, our network suffers from substantial overfitting, which would have forced us to use much smaller networks. At test time, the network makes a prediction by extracting five 224 × 224 patches (the four corner patches and the center patch) as well as their horizontal reflections (hence ten patches in all), and averaging the predictions made by the network’s softmax layer on the ten patches.
  数据增强的第一种形式包括生成图像的平移和水平反射。我们通过从256×256的图像中提取随机的224×224的patches(以及它们的水平反射),并在这些提取的patches上训练我们的网络(这就是为什么图2中的输入图像是224×224×3维的原因)。 这使我们的训练集的大小增加了2048倍,当然,由此产生的训练实例是高度相互依赖的。如果没有这个方案,我们的网络就会出现严重的过拟合现象,这将迫使我们使用更小的网络。在测试时,网络通过提取五个224×224的斑块(四个角patches和中心patches)以及它们的水平反射(因此总共有十个patches)来进行预测,并对网络的softmax层对这十个patches的预测进行平均。
  The second form of data augmentation consists of altering the intensities of the RGB channels in training images. Specifically, we perform PCA on the set of RGB pixel values throughout the ImageNet training set. To each training image, we add multiples of the found principal components, with magnitudes proportional to the corresponding eigenvalues times a random variable drawn from a Gaussian with mean zero and standard deviation 0.1. Therefore to each RGB image pixel I x y = [ I x y R , I x y G , I x y B ] T I_{xy} = [I_{xy}^R, I_{xy}^G, I_{xy}^B]^T Ixy=[IxyR,IxyG,IxyB]T we add the following quantity:
  数据增强的第二种形式包括改变训练图像中的RGB通道的强度。具体来说,我们对整个ImageNet训练集的RGB像素值的集合进行PCA。在每张训练图像中,我们添加所发现的主成分的倍数,其大小与相应的特征值乘以从高斯中抽取的随机变量成正比,其平均值为零,标准差为0.1。因此,对于每个RGB图像像素 I x y = [ I x y R , I x y G , I x y B ] T I_{xy} = [I_{xy}^R, I_{xy}^G, I_{xy}^B]^T Ixy=[IxyR,IxyG,IxyB]T,我们添加以下数量。
  在这里插入图片描述
where p i p_i pi and λ i λ_i λi are i i ith eigenvector and eigenvalue of the 3 × 3 covariance matrix of RGB pixel values, respectively, and α i α_i αi is the aforementioned random variable. Each α i α_i αi is drawn only once for all the pixels of a particular training image until that image is used for training again, at which point it is re-drawn. This scheme approximately captures an important property of natural images, namely, that object identity is invariant to changes in the intensity and color of the illumination. This scheme reduces the top-1 error rate by over 1%.
其中 p i p_i pi λ i λ_i λi分别是RGB像素值的3×3协方差矩阵的第 i i i个特征向量和特征值, α i α_i αi是前述的随机变量。每个 α i α_i αi对某一特定训练图像的所有像素只画一次,直到该图像再次被用于训练,这时再重新画。这个方案近似地捕捉到了自然图像的一个重要属性,即物体身份对光照强度和颜色的变化是不变的。这个方案将top-1的错误率降低了1%以上。

4.2 Dropout

Combining the predictions of many different models is a very successful way to reduce test errors [1, 3], but it appears to be too expensive for big neural networks that already take several days to train. There is, however, a very efficient version of model combination that only costs about a factor of two during training. The recently-introduced technique, called “dropout” [10], consists of setting to zero the output of each hidden neuron with probability 0.5. The neurons which are “dropped out” in this way do not contribute to the forward pass and do not participate in back-propagation. So every time an input is presented, the neural network samples a different architecture, but all these architectures share weights. This technique reduces complex co-adaptations of neurons, since a neuron cannot rely on the presence of particular other neurons. It is, therefore, forced to learn more robust features that are useful in conjunction with many different random subsets of the other neurons. At test time, we use all the neurons but multiply their outputs by 0.5, which is a reasonable approximation to taking the geometric mean of the predictive distributions produced by the exponentially-many dropout networks.
  结合许多不同模型的预测是减少测试错误的一个非常成功的方法[1, 3],但对于已经需要几天时间来训练的大型神经网络来说,它似乎太昂贵了。然而,有一个非常有效的模型组合版本,在训练期间只需要花费大约2倍的成本。最近引入的技术被称为 “Dropout”[10],包括以0.5的概率将每个隐藏神经元的输出设置为零。以这种方式被 "剔除 "的神经元对前向传递没有贡献,也不参与反向传播。因此,每次有输入时,神经网络都会对不同的架构进行采样,但所有这些架构都共享权重。这种技术减少了神经元的复杂共同适应,因为一个神经元不能依赖特定的其他神经元的存在。因此,它被迫学习更强大的特征,这些特征与其他神经元的许多不同的随机子集一起使用。在测试时,我们使用所有的神经元,但将它们的输出乘以0.5,这是一个合理的近似值,即取指数型多辍学网络产生的预测分布的几何平均值。
  We use dropout in the first two fully-connected layers of Figure 2. Without dropout, our network exhibits substantial overfitting. Dropout roughly doubles the number of iterations required to converge.
  我们在图2的前两个全连接层中使用dropout。在没有dropout的情况下,我们的网络表现出严重的过拟合。dropout使收敛所需的迭代次数大约增加一倍。

5 Details of learning(学习详情)

We trained our models using stochastic gradient descent with a batch size of 128 examples, momentum of 0.9, and weight decay of 0.0005. We found that this small amount of weight decay was important for the model to learn. In other words, weight decay here is not merely a regularizer: it reduces the model’s training error. The update rule for weight w w w was
  我们使用随机梯度下降法训练我们的模型,批次大小为128,动量为0.9,权重衰减为0.0005。我们发现,这种少量的权重衰减对模型的学习很重要。换句话说,这里的权重衰减不仅仅是一个正则器:它减少了模型的训练误差。权重 w w w的更新规则是
  在这里插入图片描述
where i i i is the iteration index, v v v is the momentum variable, ϵ \epsilon ϵ is the learning rate, and ⟨ ∂ L ∂ w ∣ w i ⟩ D i \langle\frac{\partial{L}}{\partial{w}}|_{w_i}\rangle_{D_i} wLwiDi is the average over the i i ith batch D i D_i Di of the derivative of the objective with respect to w w w, evaluated at w i w_i wi.
  其中 i i i是迭代指数, v v v是动量变量, ϵ \epsilon ϵ是学习率, ⟨ ∂ L ∂ w ∣ w i ⟩ D i \langle\frac{\partial{L}}{\partial{w}}|_{w_i}\rangle_{D_i} wLwiDi是第 i i i D i D_i Di的目标相对于 w w w的导数的平均值,在 w i w_i wi评估。
  We initialized the weights in each layer from a zero-mean Gaussian distribution with standard deviation 0.01. We initialized the neuron biases in the second, fourth, and fifth convolutional layers, as well as in the fully-connected hidden layers, with the constant 1. This initialization accelerates the early stages of learning by providing the ReLUs with positive inputs. We initialized the neuron biases in the remaining layers with the constant 0.
  我们从标准差为0.01的零均高斯分布中初始化了每一层的权重。我们将第二、第四和第五卷积层以及全连接隐藏层中的神经元偏置初始化为常数1。这种初始化通过为ReLU提供正的输入来加速学习的早期阶段。我们用常数0来初始化其余各层的神经元偏差。
  We used an equal learning rate for all layers, which we adjusted manually throughout training. The heuristic which we followed was to divide the learning rate by 10 when the validation error rate stopped improving with the current learning rate. The learning rate was initialized at 0.01 and reduced three times prior to termination. We trained the network for roughly 90 cycles through the training set of 1.2 million images, which took five to six days on two NVIDIA GTX 580 3GB GPUs.
  我们对所有的层使用相同的学习率,在整个训练过程中手动调整。我们遵循的启发式方法是,当验证错误率不再随当前的学习率提高时,将学习率除以10。学习率初始化为0.01,在终止前减少三次。我们通过120万张图像的训练集对网络进行了大约90个周期的训练,这在两个NVIDIA GTX 580 3GB GPU上花费了五到六天的时间。

6 Results(结果)

Our results on ILSVRC-2010 are summarized in Table 1. Our network achieves top-1 and top-5 test set error rates of 37.5% and 17.0%5. The best performance achieved during the ILSVRC2010 competition was 47.1% and 28.2% with an approach that averages the predictions produced from six sparse-coding models trained on different features [2], and since then the best published results are 45.7% and 25.7% with an approach that averages the predictions of two classifiers trained on Fisher Vectors (FVs) computed from two types of densely-sampled features [24].
  我们在ILSVRC-2010上的结果总结于表1。我们的网络实现了Top-1和Top-5测试集的错误率为37.5%和17.0%5。在ILSVRC2010比赛期间,用一种方法取得的最好成绩是47.1%和28.2%,该方法平均了六个在不同特征上训练的稀疏编码模型产生的预测结果[2],此后公布的最好成绩是45.7%和25.7%,该方法平均了两个在两类密集采样特征计算的Fisher Vectors(FVs)上训练的分类器的预测结果[24]。
在这里插入图片描述
  We also entered our model in the ILSVRC-2012 competition and report our results in Table 2. Since the ILSVRC-2012 test set labels are not publicly available, we cannot report test error rates for all the models that we tried. In the remainder of this paragraph, we use validation and test error rates interchangeably because in our experience they do not differ by more than 0.1% (see Table 2). The CNN described in this paper achieves a top-5 error rate of 18.2%. Averaging the predictions of five similar CNNs gives an error rate of 16.4%. Training one CNN, with an extra sixth convolutional layer over the last pooling layer, to classify the entire ImageNet Fall 2011 release (15M images, 22K categories), and then “fine-tuning” it on ILSVRC-2012 gives an error rate of 16.6%. Averaging the predictions of two CNNs that were pre-trained on the entire Fall 2011 release with the aforementioned five CNNs gives an error rate of 15.3%. The second-best contest entry achieved an error rate of 26.2% with an approach that averages the predictions of several classifiers trained on FVs computed from different types of densely-sampled features [7].
  我们还将我们的模型参加了ILSVRC-2012比赛,并在表2中报告了我们的结果。由于ILSVRC-2012的测试集标签没有公开,我们无法报告我们尝试的所有模型的测试误差率。在本段的其余部分,我们交替使用验证和测试错误率,因为根据我们的经验,它们的差异不超过0.1%(见表2)。本文描述的CNN实现了18.2%的Top-5错误率。对五个类似的CNN的预测进行平均,得出的错误率为16.4%。训练一个CNN,在最后一个集合层上增加第六个卷积层,对整个ImageNet 2011秋季版(15M图像,22K类别)进行分类,然后在ILSVRC-2012上进行 “微调”,错误率为16.6%。将在整个2011年秋季版本上预训练的两个CNN的预测结果与上述五个CNN的预测结果平均起来,错误率为15.3%。第二好的参赛作品的错误率为26.2%,其方法是对在由不同类型的密集采样特征计算的FV上训练的几个分类器的预测进行平均[7]。
  在这里插入图片描述
  Finally, we also report our error rates on the Fall 2009 version of ImageNet with 10,184 categories and 8.9 million images. On this dataset we follow the convention in the literature of using half of the images for training and half for testing. Since there is no established test set, our split necessarily differs from the splits used by previous authors, but this does not affect the results appreciably. Our top-1 and top-5 error rates on this dataset are 67.4% and 40.9%, attained by the net described above but with an additional, sixth convolutional layer over the last pooling layer. The best published results on this dataset are 78.1% and 60.9% [19].
  最后,我们还报告了2009年秋季版本的ImageNet的错误率,该版本有10,184个类别和890万张图片。在这个数据集上,我们遵循文献中的惯例,使用一半的图像进行训练,一半进行测试。由于没有既定的测试集,我们的分法必然与之前作者使用的分法不同,但这并不明显影响结果。我们在这个数据集上的Top-1和Top-5的错误率是67.4%和40.9%,是由上述的网络达到的,但在最后一个集合层上增加了第六个卷积层。在这个数据集上发表的最佳结果是78.1%和60.9%[19]。

6.1 Qualitative Evaluations(定性评价)

Figure 3 shows the convolutional kernels learned by the network’s two data-connected layers. The network has learned a variety of frequency- and orientation-selective kernels, as well as various colored blobs. Notice the specialization exhibited by the two GPUs, a result of the restricted connectivity described in Section 3.5. The kernels on GPU 1 are largely color-agnostic, while the kernels on on GPU 2 are largely color-specific. This kind of specialization occurs during every run and is independent of any particular random weight initialization (modulo a renumbering of the GPUs).
  图3显示了该网络的两个数据连接层所学习的卷积核。该网络已经学会了各种频率和方向选择的核,以及各种颜色的斑点。请注意两个GPU表现出的专业性,这是第3.5节中描述的限制性连接的结果。GPU 1上的内核在很大程度上是不分颜色的,而GPU 2上的内核在很大程度上是特定颜色的。这种特殊化发生在每次运行期间,并且与任何特定的随机权重初始化无关(除GPU的重新编号外)。
  在这里插入图片描述
  In the left panel of Figure 4 we qualitatively assess what the network has learned by computing its top-5 predictions on eight test images. Notice that even off-center objects, such as the mite in the top-left, can be recognized by the net. Most of the top-5 labels appear reasonable. For example, only other types of cat are considered plausible labels for the leopard. In some cases (grille, cherry) there is genuine ambiguity about the intended focus of the photograph.
  在图4的左侧面板中,我们通过计算网络在8张测试图像上的Top-5预测结果来定性地评估网络所学到的东西。请注意,即使是偏离中心的物体,如左上方的螨虫,也能被网络识别。大多数Top-5的标签看起来都很合理。例如,只有其他类型的猫被认为是豹子的合理标签。在某些情况下(格栅、樱桃),对于照片的预期焦点确实存在模糊不清的地方。
在这里插入图片描述
  Another way to probe the network’s visual knowledge is to consider the feature activations induced by an image at the last, 4096-dimensional hidden layer. If two images produce feature activation vectors with a small Euclidean separation, we can say that the higher levels of the neural network consider them to be similar. Figure 4 shows five images from the test set and the six images from the training set that are most similar to each of them according to this measure. Notice that at the pixel level, the retrieved training images are generally not close in L2 to the query images in the first column. For example, the retrieved dogs and elephants appear in a variety of poses. We present the results for many more test images in the supplementary material.
  另一种探测网络视觉知识的方法是考虑最后一个4096维隐藏层的图像所引起的特征激活。如果两幅图像产生的特征激活向量具有较小的欧氏分离度,我们可以说,神经网络的高层认为它们是相似的。图4显示了来自测试集的五幅图像和来自训练集的六幅图像,根据这个衡量标准,它们各自最相似。请注意,在像素层面上,检索到的训练图像与第一列中的查询图像在L2上一般不接近。例如,检索到的狗和大象以各种姿势出现。我们在补充材料中介绍了更多测试图像的结果。
  Computing similarity by using Euclidean distance between two 4096-dimensional, real-valued vectors is inefficient, but it could be made efficient by training an auto-encoder to compress these vectors to short binary codes. This should produce a much better image retrieval method than applying autoencoders to the raw pixels [14], which does not make use of image labels and hence has a tendency to retrieve images with similar patterns of edges, whether or not they are semantically similar.
  通过使用两个4096维的实值向量之间的欧几里得距离来计算相似性是低效的,但是可以通过训练一个自动编码器将这些向量压缩成短的二进制代码来使其高效。这应该会产生一种比对原始像素应用自动编码器更好的图像检索方法[14],因为自动编码器不利用图像标签,因此倾向于检索具有相似边缘模式的图像,无论它们在语义上是否相似。

7 Discussion(讨论)

Our results show that a large, deep convolutional neural network is capable of achieving recordbreaking results on a highly challenging dataset using purely supervised learning. It is notable that our network’s performance degrades if a single convolutional layer is removed. For example, removing any of the middle layers results in a loss of about 2% for the top-1 performance of the network. So the depth really is important for achieving our results.
  我们的结果表明,一个大型的深度卷积神经网络能够在一个极具挑战性的数据集上使用纯粹的监督学习取得破纪录的结果。值得注意的是,如果去掉一个卷积层,我们网络的性能就会下降。例如,去掉任何一个中间层,都会使网络的最高性能损失约2%。因此,深度对于实现我们的结果真的很重要。
  To simplify our experiments, we did not use any unsupervised pre-training even though we expect that it will help, especially if we obtain enough computational power to significantly increase the size of the network without obtaining a corresponding increase in the amount of labeled data. Thus far, our results have improved as we have made our network larger and trained it longer but we still have many orders of magnitude to go in order to match the infero-temporal pathway of the human visual system. Ultimately we would like to use very large and deep convolutional nets on video sequences where the temporal structure provides very helpful information that is missing or far less obvious in static images.
  为了简化我们的实验,我们没有使用任何无监督的预训练,尽管我们预计它将有所帮助,特别是如果我们获得足够的计算能力来显著增加网络的大小而不获得相应的标记数据量的增加。到目前为止,我们的结果已经随着我们的网络规模的扩大和训练时间的延长而有所改善,但我们仍有许多数量级的工作要做,以便与人类视觉系统的近时路径相匹配。最终,我们希望在视频序列上使用非常大的深度卷积网络,因为时间结构提供了非常有用的信息,而这些信息在静态图像中是缺失的或不明显的。


  1. http://code.google.com/p/cuda-convnet/ ↩︎

  2. The one-GPU net actually has the same number of kernels as the two-GPU net in the final convolutional layer. This is because most of the net’s parameters are in the first fully-connected layer, which takes the last convolutional layer as input. So to make the two nets have approximately the same number of parameters, we did not halve the size of the final convolutional layer (nor the fully-conneced layers which follow). Therefore this comparison is biased in favor of the one-GPU net, since it is bigger than “half the size” of the two-GPU net. ↩︎

  3. We cannot describe this network in detail due to space constraints, but it is specified precisely by the code and parameter files provided here: http://code.google.com/p/cuda-convnet/ ↩︎

  4. This is the reason why the input images in Figure 2 are 224 × 224 × 3-dimensional. ↩︎

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值