論文題目:Deep Learning
論文來源:Deep Learning
翻譯人:BDML@CQUT實驗室
Yann LeCun, Yoshua Bengio & Geoffrey Hinton
Yann LeCun, Yoshua Bengio & Geoffrey Hinton
Deep learning allows computational models that are composed of multiple processing layers to learn representations of data with multiple levels of abstraction. These methods have dramatically improved the state-of-the-art in speech recognition, visual object recognition, object detection and many other domains such as drug discovery and genomics. Deep learning discovers intricate structure in large data sets by using the backpropagation algorithm to indicate how a machine should change its internal parameters that are used to compute the representation in each layer from the representation in the previous layer. Deep convolutional nets have brought about breakthroughs in processing images, video, speech and audio, whereas recurrent nets have shone light on sequential data such as text and speech.
深度學習允許由多個處理層的計算模型來學習具有多個抽象級別的數據表示。這些方法極大地改善了語音識別、視覺物件識別、物體檢測以及藥物發現和基因組學等許多其他領域的最新技術。深度學習通過反向傳播演算法來指示機器應如何更改其內部參數(用於從前一層中的表示計算每個層中的表示)來發現大數據集中的複雜結構。深度折積網路在處理影象、視訊、語音和音訊方面帶來了突破,而回圈網路在處理序列數據,比如文字和語音方面表現出了閃亮的一面。
Machine-learning technology powers many aspects of modern society: from web searches to content filtering on social networks to recommendations on e-commerce websites, and it is increasingly present in consumer products such as cameras and smartphones. Machine-learning systems are used to identify objects in images, transcribe speech into text, match news items, posts or products with users’ interests, and select relevant results of search. Increasingly, these applications make use of a class of techniques called deep learning.
Conventional machine-learning techniques were limited in their ability to process natural data in their raw form. For decades, constructing a pattern-recognition or machine-learning system required careful engineering and considerable domain expertise to design a feature extractor that transformed the raw data (such as the pixel values of an image) into a suitable internal representation or feature vector from which the learning subsystem, often a classifier, could detect or classify patterns in the input.
Representation learning is a set of methods that allows a machine to be fed with raw data and to automatically discover the representations needed for detection or classification. Deep-learning methods are representation-learning methods with multiple levels of representation,obtained by composing simple but non-linear modules that each transform the representation at one level (starting with the raw input) into a representation at a higher, slightly more abstract level. With the composition of enough such transformations, very complex functions can be learned. For classification tasks, higher layers of representation amplify aspects of the input that are important for discrimination and suppress irrelevant variations. An image, for example, comes in the form of an array of pixel values, and the learned features in the first layer of representation typically represent the presence or absence of edges at particular orientations and locations in the image. The second layer typically detects motifs by spotting particular arrangements of edges, regardless of small variations in the edge positions. The third layer may assemble motifs into larger combinations that correspond to parts of familiar objects, and subsequent layers would detect objects as combinations of these parts. The key aspect of deep learning is that these layers of features are not designed by human engineers: they are learned from data using a general-purpose learning procedure.
Deep learning is making major advances in solving problems that have resisted the best attempts of the artificial intelligence community for many years. It has turned out to be very good at discovering intricate structures in high-dimensional data and is therefore applicable to many domains of science, business and government. In addition to beating records in image recognition and speech recognition, it has beaten other machine-learning techniques at predicting the activity of potential drug molecules, analysing particle accelerator data, reconstructing brain circuits, and predicting the effects of mutations in non-coding DNA on gene expression and disease. Perhaps more surprisingly, deep learning has produced extremely promising results for various tasks in natural language understanding, particularly topic classification, sentiment analysis, question answering and language translation.
We think that deep learning will have many more successes in the near future because it requires very little engineering by hand, so it can easily take advantage of increases in the amount of available computation and data. New learning algorithms and architectures that are currently being developed for deep neural networks will only accelerate this progress.
機器學習技術爲現代社會的許多方面提供了動力:從網路搜尋到社羣網路上的內容過濾,再到電子商務網站上的推薦,它越來越多地出現在相機和智慧手機等消費品中。機器學習系統用於識別影象中的物件,將語音轉錄成文字,將新聞專案、貼文或產品與使用者的興趣相匹配,並選擇相關的搜尋結果。 這些應用越來越多地使用一種叫做深度學習的技術。
傳統的機器學習處理原始數據的能力是有限的。幾十年來,構建模式識別或機器學習系統需要細緻的工程和相當多的專業知識來設計一個特徵提取器,將原始數據(如影象的畫素值)轉換爲適當的內部表示或特徵向量,學習子系統通常是分類器,可以完成對輸入樣本的檢測或分類。
表示學習是一種方法,它允許機器輸入原始數據,並自動發現檢測或分類所需的表示。深度學習方法是一種具有多個表示級別的表示學習方法,它是通過組成簡單但非線性的模組來獲得的,每個模組將一個級別的表示(從原始輸入開始)轉換爲一個更高、更抽象的級別的表示。通過足夠多的轉換,即使非常複雜的函數也可以被學習到。對於分類任務,更高層次的表示可以放大輸入的區別並且抑制無關的變化。例如,對於一幅影象來說,以畫素值矩陣的形式輸入,在第一層中被學習的往往是在影象中某些特定方向或位置邊緣存在與否的特徵。第二層往往是根據提取邊界的走向來檢測圖案,而忽略邊緣位置的細小變化。第三層可能是將圖案組合成更大的組合圖案,從而與相似的目標部分對應,並且隨後的層會將這些部分再聯合從而構成檢測的目標。深度學習的關鍵是,這些特徵層不是由人類工程師設計的:它們是使用通用學習程式從數據中學習的。
深度學習在解決多年來阻礙人工智慧發展最佳嘗試的問題方面取得了重大進展。事實證明,它非常善於發現高維數據中複雜的結構,因此適用於許多科學、商業和政府領域。除了打破在影象識別和語音識別方面的記錄外,它還擊敗了諸如用於預測潛在藥物分子的活性,分析粒子加速器數據,重建腦回路,以及預測非編碼DNA突變對基因表達和疾病的影響等其他機器學習技術。也許更令人驚訝的是,深度學習在自然語言理解方面的課題中產生了非常好的成果,特別是主題分類、情感分析、問題回答和語言翻譯。我們認爲,在不久的將來,深度學習將有更多的成功,因爲它只需要很少的人工幹預,所以它可以很容易地利用好現有計算能力和數據量的提升。目前正在爲深度神經網路開發的新的學習演算法和體系結構只會加速這一進展。
The most common form of machine learning, deep or not, is supervised learning. Imagine that we want to build a system that can classify images as containing, say, a house, a car, a person or a pet. We first collect a large data set of images of houses, cars, people and pets, each labelled with its category. During training, the machine is shown an image and produces an output in the form of a vector of scores, one for each category. We want the desired category to have the highest score of all categories, but this is unlikely to happen before training. We compute an objective function that measures the error (or distance) between the output scores and the desired pattern of scores. The machine then modifies its internal adjustable parameters to reduce this error. These adjustable parameters, often called weights, are real numbers that can be seen as ‘knobs’ that define the input–output function of the machine. In a typical deep-learning system, there may be hundreds of millions of these adjustable weights, and hundreds of millions of labelled examples with which to train the machine.
To properly adjust the weight vector, the learning algorithm computes a gradient vector that, for each weight, indicates by what amount the error would increase or decrease if the weight were increased by a tiny amount. The weight vector is then adjusted in the opposite direction to the gradient vector.
The objective function, averaged over all the training examples, can be seen as a kind of hilly landscape in the high-dimensional space of weight values. The negative gradient vector indicates the direction of steepest descent in this landscape, taking it closer to a minimum, where the output error is low on average.
In practice, most practitioners use a procedure called stochastic gradient descent (SGD). This consists of showing the input vector for a few examples, computing the outputs and the errors, computing the average gradient for those examples, and adjusting the weights accordingly. The process is repeated for many small sets of examples from the training set until the average of the objective function stops decreasing. It is called stochastic because each small set of examples gives a noisy estimate of the average gradient over all examples. This simple procedure usually finds a good set of weights surprisingly quickly when compared with far more elaborate optimization techniques18. After training, the performance of the system is measured on a different set of examples called a test set. This serves to test the generalization ability of the machine — its ability to produce sensible answers on new inputs that it has never seen during training.
Many of the current practical applications of machine learning use linear classifiers on top of hand-engineered features. A two-class linear classifier computes a weighted sum of the feature vector components. If the weighted sum is above a threshold, the input is classified as belonging to a particular category.
Since the 1960s we have known that linear classifiers can only carve their input space into very simple regions, namely half-spaces separated by a hyperplane19. But problems such as image and speech recognition require the input–output function to be insensitive to irrelevant variations of the input, such as variations in position, orientation or illumination of an object, or variations in the pitch or accent of speech, while being very sensitive to particular minute variations (for example, the difference between a white wolf and a breed of wolf-like white dog called a Samoyed). At the pixel level, images of two Samoyeds in different poses and in different environments may be very different from each other, whereas two images of a Samoyed and a wolf in the same position and on similar backgrounds may be very similar to each other. A linear classifier, or any other ‘shallow’ classifier operating on raw pixels could not possibly distinguish the latter two, while putting the former two in the same category. This is why shallow classifiers require a good feature extractor that solves the selectivity–invariance dilemma — one that produces representations that are selective to the aspects of the image that are important for discrimination, but that are invariant to irrelevant aspects such as the pose of the animal. To make classifiers more powerful, one can use generic non-linear features, as with kernel methods20, but generic features such as those arising with the Gaussian kernel do not allow the learner to generalize well far from the training examples21. The conventional option is to hand design good feature extractors, which requires a considerable amount of engineering skill and domain expertise. But this can all be avoided if good features can be learned automatically using a general-purpose learning procedure. This is the key advantage of deep learning.
Figure 1 | Multilayer neural networks and backpropagation. a, A multilayer neural network (shown by the connected dots) can distort the input space to make the classes of data (examples of which are on the red and blue lines) linearly separable. Note how a regular grid (shown on the left) in input space is also transformed (shown in the middle panel) by hidden units. This is an illustrative example with only two input units, two hidden units and one output unit, but the networks used for object recognition or natural language processing contain tens or hundreds of thousands of units. Reproduced with permission from C. Olah (http://colah.github.io/). b, The chain rule of derivatives tells us how two small effects (that of a small change of x on y, and that of y on z) are composed. A small change Δx in x gets transformed first into a small change Δy in y by getting multiplied by ∂y/∂x (that is, the definition of partial derivative). Similarly, the change Δy creates a change Δz in z. Substituting one equation into the other gives the chain rule of derivatives — how Δx gets turned into Δz through multiplication by the product of ∂y/∂x and ∂z/∂x. It also works when x, y and z are vectors (and the derivatives are Jacobian matrices). c, The equations used for computing the forward pass in a neural net with two hidden layers and one output layer, each constituting a module through which one can backpropagate gradients. At each layer, we first compute the total input z to each unit, which is a weighted sum of the outputs of the units in the layer below. Then a non-linear function f(.) is applied to z to get the output of the unit. For simplicity, we have omitted bias terms. The non-linear functions used in neural networks include the rectified linear unit (ReLU) f(z) = max(0,z), commonly used in recent years, as well as the more conventional sigmoids, such as the hyberbolic tangent,f(z) (exp(z)− exp(−z))/(exp(z)+exp(−z)) and logistic function logistic, f(z) =1/(1 + exp(−z)). d, The equations used for computing the backward pass. At each hidden layer we compute the error derivative with respect to the output of each unit, which is a weighted sum of the error derivatives with respect to the total inputs to the units in the layer above. We then convert the error derivative with respect to the output into the error derivative with respect to the input by multiplying it by the gradient of f(z).At the output layer, the error derivative with respect to the output of a unit is computed by differentiating the cost function. This gives yl−tl if the cost function for unit l is 0.5(yl−tl)2, where tl is the target value. Once the ∂E/∂zk is known, the error-derivative for the weight wjk on the connection from unit j in the layer below is just yj ∂E/∂zk
Figure 2 | Inside a convolutional network. The outputs (not the filters) of each layer (horizontally) of a typical convolutional network architecture applied to the image of a Samoyed dog (bottom left; and RGB (red, green, blue) inputs, bottom right). Each rectangular image is a feature map
A deep-learning architecture is a multilayer stack of simple modules, all (or most) of which are subject to learning, and many of which compute non-linear input–output mappings. Each module in the stack transforms its input to increase both the selectivity and the invariance of the representation. With multiple non-linear layers, say a depth of 5 to 20, a system can implement extremely intricate functions of its inputs that are simultaneously sensitive to minute details— distinguishing Samoyeds from white wolves — and insensitive to large irrelevant variations such as the background, pose, lighting and surrounding objects.
機器學習最常見的形式,無論深入與否,都是監督學習。想象一下,我們想建立一個系統,可以將影象內容進行分類,例如,房子,汽車,人或寵物。我們首先收集大量的房屋、汽車、人和寵物的影象,每個影象都貼上了它的類別。在訓練過程中,機器被給與一張圖片,就會輸出一個其對於所有類別的得分構成的向量。我們希望期望的類別在所有類別中得分最高,但在訓練前不太可能發生這種情況。我們計算一個目標函數,它測量輸出分數與所需分數模式之間的誤差(或距離),然後機器修改其內部可調參數以減少此錯誤。這些可調參數,通常稱爲權重,是實數,可以看作是定義機器輸入輸出功能的「旋鈕」。 在一個典型的深度學習系統中,可能有數億個這些可調的重量,以及數億個標記的例子來訓練機器。
爲了正確地調整權重向量,學習演算法計算一個梯度向量,對於每個權重,該梯度向量指示如果權重增加少量,誤差將增加或減少多少。然後向與梯度向量相反的方向調整權重向量。
平均了所有樣本的目標函數,可以看作是一種在權值的高維空間上的丘陵地形。負的梯度向量方向表示地形中下降最快的方向,地形上越接近它的最小值,也就取得了平均上的最小誤差。
在實踐中,大多數實踐者使用一種稱爲隨機梯度下降(SGD)的過程。這包括顯示幾個範例的輸入向量,計算輸出和錯誤,計算這些範例的平均梯度,並相應地調整權重。這個過程被重複了許多小的例子集,從訓練集,直到目標函數的平均值停止下降。它被稱爲隨機,因爲每個小的例子集給出了對所有例子的平均梯度的有噪聲估計。這個簡單的過程通常會很快找到一組很好的權重,與更精細的優化技術相比。經過訓練,系統的效能是在一組不同的例子上測量的,稱爲測試集。 這有助於測試機器的泛化能力-它能夠在訓練中從未見過的新輸入上產生明智的答案。
目前機器學習的許多實際應用都在手工設計的特徵之上使用線性分類器。兩類線性分類器計算特徵向量分量的加權和。如果加權和高於閾值,則輸入被歸類爲屬於特定類別。
自20世紀60年代以來,我們已經知道線性分類器只能將它們的輸入空間劃分爲非常簡單的區域,即由超平面分隔的半空間。 但是,像影象和語音識別這樣的問題要求輸入輸出函數對輸入的不相關變化不敏感,例如物體的位置、方向或照明的變化,或語音音調或口音的變化,同時對特定的微小變化非常敏感(例如,白狼和狼樣的白狗之間的差異,稱爲Samoyed。 在畫素級,兩個Samoyeds在不同姿勢和不同環境中的影象可能彼此非常不同,而兩個Samoyed和狼在相同位置和相似背景下的影象可能非常相似。線性分類器或任何其他在原始畫素上操作的「淺層」分類器都不可能區分後兩者,同時將前兩者置於同一類別中。這就是爲什麼淺層分類器需要很好的用於解決選擇不變問題的特徵提取能器——一個能夠提取出影象中區分目標的那些關鍵特徵,但是這些特徵對於分辨動物的姿勢就無能爲力了。爲了使分類器更強大,可以使用通用的非線性特徵,如核方法,但是諸如通過高斯核產生的這些通用特徵,不能使學習物件具有對於所有的訓練樣本都很好的泛化效果。傳統的選擇是人工去設計好的特徵提取器,而這需要大量的工程技能和專業經驗。通過使用通用目標的學習過程,可以自動學習到好的特徵,從而避免上述問題。這是深度學習的關鍵優勢。
圖1.多層神經網路和反向傳播。a多層神經網路(由連線的點顯示)可以扭曲輸入空間,使數據的類別(例如在紅線和藍線上)線性可分。 請注意輸入空間中的規則網格(如左所示)也是如何由隱藏單元轉換的(如中間面板所示。 這是一個說明性的例子,只有兩個輸入單元,兩個隱藏單元和一個輸出單元,但用於物件識別或自然語言處理的網路包含數萬或數十萬個單元。經C.Olah許可轉載(http://colah.github.io/).b.導數的鏈規則告訴我們兩個小效應(x對y的小變化和y對z的小變化)是如何組成的。在x中Δx的一個小的變化首先通過乘∂y/∂x(即偏導數的定義)轉化爲y中的一個小的變化)。類似地,更改Δy在z中建立更改Δz。將一個方程替換爲另一個方程給出了導數的鏈規則-Δx如何通過∂y/∂x和z/∂x的乘積轉化爲Δz。當x、y和z是向量時,它也起作用(導數是Jacobian矩陣). c 在帶有兩個隱形層和一個輸出層的神經網路中計算前向通路的值時使用這些等式,每個都包含一個可以反向傳播梯度的模組。在每一層中,我們首先計算每一個節點的總輸入z,即上一層輸出的加權和。然後將非線性函數作用於z就得到這個節點的輸出。爲了簡便,我們省略了偏置項。在神經網路中使用的非線性函數包括近些年廣泛使用的修正線性單元(ReLU)f(z)=max(z,0),以及使用更廣泛的S函數,例如雙曲正切函數f(z)=(exp(z)-exp(-z))/(exp(z)+exp(-z))和Logistic函數f(z)=1/(1+exp(-z))。d.用於計算後向傳球的方程。在每個隱藏層,我們計算相對於每個單元的輸出的誤差導數,這是相對於上面層中的單元的總輸入的誤差導數的加權和。然後,我們將輸出的誤差導數轉化爲輸入的誤差導數,將其乘以f(Z)的梯度。在輸出層,通過區分成本函數來計算相對於單元輸出的誤差導數。如果單元l的成本函數爲0.5(yl−tl)2,其中tl是目標值,則給出yl−tl。一旦∂E/∂zk已知,下面 下麪層中單元j連線上的權重wjk的誤差導數只是yj∂E/∂zk。
圖2. 卷及網路內部。一個應用於薩摩耶犬影象的典型折積網路的每一層的輸出(不是濾波器)。每一個矩形影象是一個特徵圖,對應了由每一個位置的檢測學習到的特徵的輸出。資訊流自下而上,低層特徵充當定向邊緣檢測器,並利用修正線性單元爲輸出中的每個影象類計算分數。
一個深度學習框架是簡單模組的多層堆疊,其所有(或大多數)的目標是學習,並且很多是在計算非線性的輸入輸出對映關係。每個模組都在轉換其輸入,是爲了同時增加選擇性和表達的不變性。有5到20層的非線性層的系統,可以形成對一些細節很敏感的複雜函數——能夠從白色的狼中區分出薩摩耶,並且對大型的不相關變數不敏感,例如背景,姿勢,光照和周圍的物體。
From the earliest days of pattern recognition, the aim of researchers has been to replace hand-engineered features with trainable multilayer networks, but despite its simplicity, the solution was not widely understood until the mid 1980s. As it turns out, multilayer architectures can be trained by simple stochastic gradient descent. As long as the modules are relatively smooth functions of their inputs and of their internal weights, one can compute gradients using the backpropagation procedure. The idea that this could be done, and that it worked, was discovered independently by several different groups during the 1970s and 1980s.
The backpropagation procedure to compute the gradient of an objective function with respect to the weights of a multilayer stack of modules is nothing more than a practical application of the chain rule for derivatives. The key insight is that the derivative (or gradient) of the objective with respect to the input of a module can be computed by working backwards from the gradient with respect to the output of that module (or the input of the subsequent module) (Fig. 1). The backpropagation equation can be applied repeatedly to propagate gradients through all modules, starting from the output at the top (where the network produces its prediction) all the way to the bottom (where the external input is fed). Once these gradients have been computed, it is straightforward to compute the gradients with respect to the weights of each module.
Many applications of deep learning use feedforward neural network architectures (Fig. 1), which learn to map a fixed-size input (for example, an image) to a fixed-size output (for example, a probability for each of several categories). To go from one layer to the next, a set of units compute a weighted sum of their inputs from the previous layer and pass the result through a non-linear function. At present, the most popular non-linear function is the rectified linear unit (ReLU), which is simply the half-wave rectifier f(z)= max(z, 0). In past decades, neural nets used smoother non-linearities, such as tanh(z) or 1/(1+exp(−z)), but the ReLU typically learns much faster in networks with many layers, allowing training of a deep supervised network without unsupervised pre-training28. Units that are not in the input or output layer are conventionally called hidden units. The hidden layers can be seen as distorting the input in a non-linear way so that categories become linearly separable by the last layer (Fig. 1).
In the late 1990s, neural nets and backpropagation were largely forsaken by the machine-learning community and ignored by the computer-vision and speech-recognition communities. It was widely thought that learning useful, multistage, feature extractors with little prior knowledge was infeasible. In particular, it was commonly thought that simple gradient descent would get trapped in poor local minima — weight configurations for which no small change would reduce the average error.
In practice, poor local minima are rarely a problem with large networks. Regardless of the initial conditions, the system nearly always reaches solutions of very similar quality. Recent theoretical and empirical results strongly suggest that local minima are not a serious issue in general. Instead, the landscape is packed with a combinatorially large number of saddle points where the gradient is zero, and the surface curves up in most dimensions and curves down in the remainder. The analysis seems to show that saddle points with only a few downward curving directions are present in very large numbers, but almost all of them have very similar values of the objective function. Hence, it does not much matter which of these saddle points the algorithm gets stuck at.
Interest in deep feedforward networks was revived around 2006(refs 31–34) by a group of researchers brought together by the Canadian Institute for Advanced Research (CIFAR). The researchersintroduced unsupervised learning procedures that could create layers of feature detectors without requiring labelled data. The objective in learning each layer of feature detectors was to be able to reconstruct or model the activities of feature detectors (or raw inputs) in the layer below. By ‘pre-training’ several layers of progressively more complex feature detectors using this reconstruction objective, the weights of a deep network could be initialized to sensible values. A final layer of output units could then be added to the top of the network and the whole deep system could be fine-tuned using standard backpropagation. This worked remarkably well for recognizing handwritten digits or for detecting pedestrians, especially when the amount of labelled data was very limited.
The first major application of this pre-training approach was in speech recognition, and it was made possible by the advent of fast graphics processing units (GPUs) that were convenient to program and allowed researchers to train networks 10 or 20 times faster. In 2009, the approach was used to map short temporal windows of coefficients extracted from a sound wave to a set of probabilities for the various fragments of speech that might be represented by the frame in the centre of the window. It achieved record-breaking results on a standard speech recognition benchmark that used a small vocabulary and was quickly developed to give record-breaking results on a large vocabulary task39. By 2012, versions of the deep net from 2009 were being developed by many of the major speech groups and were already being deployed in Android phones. For smaller data sets, unsupervised pre-training helps to prevent overfitting40, leading to significantly better generalization when the number of labelled examples is small, or in a transfer setting where we have lots of examples for some ‘source’ tasks but very few for some ‘target’ tasks. Once deep learning had been rehabilitated, it turned out that the pre-training stage was only needed for small data sets.
There was, however, one particular type of deep, feedforward network that was much easier to train and generalized much better than networks with full connectivity between adjacent layers. This was the convolutional neural network (ConvNet). It achieved many practical successes during the period when neural networks were out of favour and it has recently been widely adopted by the computervision community.
從模式識別的最初幾天起,研究人員的目的一直是用可訓練的多層網路來取代手工設計的特徵,但儘管它很簡單,但直到20世紀80年代中期才被廣泛理解。 結果表明,多層體系結構可以通過簡單的隨機梯度下降來訓練。 只要模組是其輸入和內部權重的相對平滑的函數,就可以使用反向傳播過程計算梯度。 1970年代和1980年代,幾個不同的團體獨立地發現了這樣一種想法,即可以做到這一點,而且行之有效。
計算目標函數相對於多層模組堆疊權重的梯度的反向傳播過程只不過是導數鏈規則的實際應用。關鍵的洞察力是,目標相對於模組輸入的導數(或梯度)可以通過從相對於該模組的輸出(或後續模組的輸入)的梯度向後工作來計算(圖1)。 反向傳播方程可以反覆 反復應用於通過所有模組傳播梯度,從頂部的輸出(網路產生其預測)一直到底部(外部輸入被饋送)。一旦計算了這些梯度,就很容易計算相對於每個模組權重的梯度。
深度學習的許多應用使用前饋神經網路結構(圖1),它學習將固定大小的輸入(例如影象)對映到固定大小的輸出(例如幾個類別中的每一個的概率)。爲了從一層到下一層,一組單元計算它們從上一層輸入的加權和,並通過非線性函數傳遞結果。目前,最流行的非線性函數是整流線性單元(ReLU),它簡單地說是半波整流器f(Z)=max(z,0)。在過去的幾十年裡,神經網路使用了更平滑的非線性,如tanh(Z)或1/(1exp(−z),但ReLU通常在具有多個層的網路中學習得更快,允許在沒有無監督預訓練的情況下訓練深度監督網路。不在輸入或輸出層中的單元通常稱爲隱藏單元。 隱藏層可以看作是以非線性的方式扭曲輸入,從而使類別由最後一層線性可分(圖1)。
在20世紀90年代末,神經網路和反向傳播在很大程度上被機器學習社羣所拋棄,被計算機視覺和語音識別社羣所忽視。人們普遍認爲,學習有用的、多階段的、缺乏先驗知識的特徵提取器是不可行的。特別是,人們普遍認爲,簡單的梯度下降會被困在較差的區域性極小值-重量設定中,沒有小的變化就會減少平均誤差。
在實踐中,較差的區域性極小值很少是大型網路的問題。無論初始條件如何,系統幾乎總是達到非常相似的品質解決方案。最近的理論和經驗結果強烈地表明,區域性極小值一般不是一個嚴重的問題。相反,景觀充滿了大量的馬鞍點,其中梯度爲零,表面曲線上升在大多數維度,曲線下降在其餘。分析似乎表明,只有幾個向下彎曲方向的鞍點數量很大,但幾乎所有的鞍點都有非常相似的目標函數值。因此,演算法陷入這些鞍點中的哪一個並不重要。
2006年左右,由加拿大高階研究所(CIFAR)召集的一組研究人員恢復了對深度前饋網路的興趣)。研究人員引入了無監督的學習程式,可以在不需要標記數據的情況下建立一層特徵檢測器。學習每一層特徵檢測器的目的是能夠重建或建模特徵檢測器(或原始輸入)在下面 下麪一層的活動。通過「預訓練」使用這個重建目標的幾層逐漸更復雜的特徵檢測器,可以將深層網路的權重初始化爲合理的值。最後一層輸出單元可以新增到網路的頂部,整個深層系統可以使用標準反向傳播進行微調。這對於識別手寫數位或檢測行人非常有效,特別是當標記數據的數量非常有限時。
這種預訓練方法的第一個主要應用是語音識別,它是由於快速圖形處理單元(GPU)的出現而成爲可能的,該單元便於程式設計37,並允許研究人員以10或20倍的速度訓練網路。 2009年,該方法被用於將從聲波中提取的係數的短時間視窗對映到可能由視窗中心的框架表示的各種語音片段的一組概率。它在一個使用少量詞彙的標準語音識別基準上取得了破記錄的結果,並被快速開發以在一個大的詞彙任務上取得破記錄的結果。到2012年,許多主要演講團體正在開發2009年的深度網路版本,並已在Android手機中部署。 對於較小的數據集,無監督的預訓練有助於防止過度擬合,當標記範例的數量較少時,或在傳輸設定中,我們有許多用於某些「源」任務的範例,但對於某些「目標」任務則很少。 一旦恢復了深度學習,結果表明,培訓前階段只需要小數據集。
然而,有一種特殊型別的深度前饋網路比相鄰層之間具有完全連通性的網路更容易訓練和推廣。 這是折積神經網路(ConvNet)。在神經網路不受歡迎的時期,它取得了許多實際的成功,並且最近已經被計算機視覺領域的研究者們廣泛接受。
ConvNets are designed to process data that come in the form of multiple arrays, for example a colour image composed of three 2D arrays containing pixel intensities in the three colour channels. Many data modalities are in the form of multiple arrays: 1D for signals and sequences, including language; 2D for images or audio spectrograms; and 3D for video or volumetric images. There are four key ideas behind ConvNets that take advantage of the properties of natural signals: local connections, shared weights, pooling and the use of many layers.
The architecture of a typical ConvNet (Fig. 2) is structured as a series of stages. The first few stages are composed of two types of layers: convolutional layers and pooling layers. Units in a convolutional layer are organized in feature maps, within which each unit is connected to local patches in the feature maps of the previous layer through a set of weights called a filter bank. The result of this local weighted sum is then passed through a non-linearity such as a ReLU. All units in a feature map share the same filter bank. Different feature maps in a layer use different filter banks. The reason for this architecture is twofold. First, in array data such as images, local groups of values are often highly correlated, forming distinctive local motifs that are easily detected. Second, the local statistics of images and other signals are invariant to location. In other words, if a motif can appear in one part of the image, it could appear anywhere, hence the idea of units at different locations sharing the same weights and detecting the same pattern in different parts of the array. Mathematically, the filtering operation performed by a feature map is a discrete convolution, hence the name.
Although the role of the convolutional layer is to detect local conjunctions of features from the previous layer, the role of the pooling layer is to merge semantically similar features into one. Because the relative positions of the features forming a motif can vary somewhat, reliably detecting the motif can be done by coarse-graining the position of each feature. A typical pooling unit computes the maximum of a local patch of units in one feature map (or in a few feature maps). Neighbouring pooling units take input from patches that are shifted by more than one row or column, thereby reducing the dimension of the representation and creating an invariance to small shifts and distortions. Two or three stages of convolution, non-linearity and pooling are stacked, followed by more convolutional and fully-connected layers. Backpropagating gradients through a ConvNet is as simple as through a regular deep network, allowing all the weights in all the filter banks to be trained.
Deep neural networks exploit the property that many natural signals are compositional hierarchies, in which higher-level features are obtained by composing lower-level ones. In images, local combinations of edges form motifs, motifs assemble into parts, and parts form objects. Similar hierarchies exist in speech and text from sounds to phones, phonemes, syllables, words and sentences. The pooling allows representations to vary very little when elements in the previous layer vary in position and appearance.
The convolutional and pooling layers in ConvNets are directly inspired by the classic notions of simple cells and complex cells in visual neuroscience, and the overall architecture is reminiscent of the LGN–V1–V2–V4–IT hierarchy in the visual cortex ventral pathway. When ConvNet models and monkeys are shown the same picture,the activations of high-level units in the ConvNet explains half of the variance of random sets of 160 neurons in the monkey’s inferotemporal cortex. ConvNets have their roots in the neocognitron,the architecture of which was somewhat similar, but did not have an end-to-end supervised-learning algorithm such as backpropagation.A primitive 1D ConvNet called a time-delay neural net was used for the recognition of phonemes and simple words.
There have been numerous applications of convolutional networks going back to the early 1990s, starting with time-delay neural networks for speech recognition47 and document reading. The document reading system used a ConvNet trained jointly with a probabilistic model that implemented language constraints. By the late 1990s this system was reading over 10% of all the cheques in the United States. A number of ConvNet-based optical character recognition and handwriting recognition systems were later deployed by Microsoft. ConvNets were also experimented with in the early 1990s for object detection in natural images, including faces and hands,and for face recognition.
ConvNet被設計用來處理以多個數組形式出現的數據,例如由三個包含三個顏色通道中畫素強度的二維陣列組成的彩色影象。許多數據模式以多個陣列的形式存在:信號和序列的1D,包括語言;影象或音訊譜圖的2D;視訊或體積影象的3D。 在ConvNet背後有四個關鍵的想法,它們利用了自然信號的特性:本地連線、共用權重、池和許多層的使用。
典型ConvNet的體系結構(圖2)是一系列階段的結構。前幾個階段由兩種型別的層組成:折積層和池層。折積層中的單元被組織在特徵對映中,其中每個單元通過一組稱爲濾波器組的權重連線到上一層特徵對映中的區域性修補程式。然後,這個區域性加權和的結果通過一個非線性,如ReLU。特徵對映中的所有單元共用相同的過濾庫。層中不同的特徵對映使用不同的過濾庫。 這種架構的原因是雙重的。 首先,在像影象這樣的陣列數據中,區域性值組往往高度相關,形成獨特的區域性基序,很容易被檢測到。第二,影象和其他信號的區域性統計對位置不變。換句話說,如果一個基序可以出現在影象的一個部分,它可以出現在任何地方,因此在不同位置的單元共用相同的權重,並在陣列的不同部分檢測相同的模式。從數學上講,特徵對映執行的濾波操作是一個離散折積,因此得名。
雖然折積層的作用是從上一層檢測特徵的區域性連詞,但池層的作用是將語意上相似的特徵合併成一個。由於構成基序的特徵的相對位置可以有所不同,因此可以通過粗劃分每個特徵的位置來可靠地檢測基序。典型的池單元計算一個特徵對映(或幾個特徵對映)中區域性單元修補程式的最大值)。相鄰池單元從多個行或列移動的修補程式中獲取輸入,從而減少表示的維數,並對小移位和失真產生不變性。 折積,非線性和池化兩個或三個階段疊加,然後是更多的折積層和完全連線層。通過ConvNet反向傳播梯度就像通過一個規則的深度網路一樣簡單,允許對所有濾波器組中的所有權重進行訓練。
深層神經網路利用了許多自然信號是組成層次的特性,其中較高層次的特徵是通過組成較低層次的特徵來獲得的。在影象中,邊緣的區域性組合形成圖案,圖案組裝成零件,零件形成物體。從聲音到電話、音素、音節、單詞和句子,語音和文字中也存在類似的層次結構。當前一層中的元素在位置和外觀上發生變化時,池允許表示變化很小。
ConvNet中的折積層和池層直接受到視覺神經科學中簡單細胞和複雜細胞的經典概唸的啓發,總體結構使人想起視覺皮層腹側通路中的LGN-V1-V2-V4-IT層次結構。當ConvNet模型和猴子顯示相同的圖片時,ConvNet中高階單元的啓用解釋了猴子顳下皮層160個神經元隨機集的一半方差。Conv Nets的根源在於新認知(neocognitron46),其架構有點相似,但沒有端到端的監督學習演算法,如反向傳播。一個原始的一維ConvNet被稱爲時滯神經網路,用於識別音素和簡單單詞。
折積網路的許多應用可以追溯到20世紀90年代初,從語音識別和文件讀取的時滯神經網路開始。文件閱讀系統使用了一個ConvNet,該網路與一個實現語言約束的概率模型聯合訓練。到20世紀90年代末,這一系統的讀數超過了美國所有支票的10%。微軟後來部署了一些基於ConvNet的光學字元識別和手寫識別系統。在20世紀90年代初,ConvNet還進行了實驗,用於自然影象中的物體檢測,包括人臉和手,以及人臉識別。
Since the early 2000s, ConvNets have been applied with great success to the detection, segmentation and recognition of objects and regions in images. These were all tasks in which labelled data was relatively abundant, such as traffic sign recognition, the segmentation of biological images particularly for connectomics, and the detection of faces, text, pedestrians and human bodies in natural images. A major recent practical success of ConvNets is face recognition.
Importantly, images can be labelled at the pixel level, which will have applications in technology, including autonomous mobile robots and self-driving cars. Companies such as Mobileye and NVIDIA are using such ConvNet-based methods in their upcoming vision systems for cars. Other applications gaining importance involve natural language understanding and speech recognition.
Despite these successes, ConvNets were largely forsaken by the mainstream computer-vision and machine-learning communities until the ImageNet competition in 2012. When deep convolutional networks were applied to a data set of about a million images from the web that contained 1,000 different classes, they achieved spectacular results, almost halving the error rates of the best competing approaches. This success came from the efficient use of GPUs, ReLUs, a new regularization technique called dropout, and techniques to generate more training examples by deforming the existing ones. This success has brought about a revolution in computer vision; ConvNets are now the dominant approach for almost all recognition and detection tasks and approach human performance on some tasks. A recent stunning demonstration combines ConvNets and recurrent net modules for the generation of image captions (Fig. 3).
Figure 3 | From image to text. Captions generated by a recurrent neural network (RNN) taking, as extra input, the representation extracted by a deep convolution neural network (CNN) from a test image, with the RNN trained to ‘translate’ high-level representations of images into captions (top). Reproduced with permission from ref. 102. When the RNN is given the ability to focus its attention on a different location in the input image (middle and bottom; the lighter patches were given more attention) as it generates each word (bold), we found that it exploits this to achieve better ‘translation’ of images into captions.Recent ConvNet architectures have 10 to 20 layers of ReLUs, hundreds of millions of weights, and billions of connections between units. Whereas training such large networks could have taken weeks only two years ago, progress in hardware, software and algorithm parallelization have reduced training times to a few hours.
The performance of ConvNet-based vision systems has caused most major technology companies, including Google, Facebook, Microsoft, IBM, Yahoo!, Twitter and Adobe, as well as a quickly growing number of start-ups to initiate research and development projects and to deploy ConvNet-based image understanding products and services.
ConvNets are easily amenable to efficient hardware implementations in chips or field-programmable gate arrays. A number of companies such as NVIDIA, Mobileye, Intel, Qualcomm and Samsung are developing ConvNet chips to enable real-time vision applications in smartphones, cameras, robots and self-driving cars.
自20世紀初以來,ConvNet已成功地應用於影象中物體和區域的檢測、分割和識別。 這些都是標記數據相對豐富的任務,如交通標誌識別、生物影象的分割,特別是用於連線組學的分割,以及在自然影象中檢測人臉、文字、行人和人體。 最近ConvNet的一個主要實際成功是人臉識別。
重要的是,影象可以在畫素級標記,這將在技術上有應用,包括自主移動機器人和自動駕駛汽車。 像Mobileye和NVIDIA這樣的公司正在他們即將推出的汽車視覺系統中使用這種基於ConvNet的方法。 其他越來越重要的應用包括自然語言理解和語音識別。
儘管取得了這些成功,ConvNet在很大程度上被主流的計算機視覺和機器學習社羣所拋棄,直到2012年的影象競爭。 當將深折積網路應用於包含1000個不同類的來自網路的大約100萬幅影象的數據集時,它們取得了驚人的結果,幾乎將最佳競爭方法的錯誤率減半。 這一成功來自於GPU、ReLU的有效使用,這是一種新的正則化技術,稱爲輟學,以及通過修改現有的訓練範例來生成更多訓練範例的技術。 這一成功帶來了計算機視覺的革命;ConvNet現在是幾乎所有識別和檢測任務的主導方法,並接近人類在某些任務上的表現。 最近的一個驚人的演示結合了ConvNet和遞回網路模組來生成影象標題(圖3)。
圖3.從影象到文字。由遞回神經網路(RNN)生成的描述,作爲額外的輸入,由深度折積神經網路(CNN)從測試影象中提取的表示,RNN訓練爲將影象的高階表示「轉換」爲標題。圖轉載自參考文獻102。當遞回神經網路在產生每個單詞(粗體)時,它具備了關注輸入影象不同位置的能力(圖中二三行;較亮的部分被給予了更多的關注),我們發現它使得將圖片「翻譯」成文字的技術有了極大的擴充套件。
最近的ConvNet體系結構有10到20層ReLU、數億權重和數十億個單元之間的連線。 雖然僅僅兩年前訓練這樣的大型網路可能需要數週時間,但硬體、軟體和演算法並行化方面的進展將訓練時間減少到了幾個小時。
基於ConvNet的視覺系統的效能已經導致了大多數主要的技術公司,包括谷歌、Facebook、微軟、IBM、雅虎、Twitter和Adobe,以及越來越多的初創企業,以啓動研究和開發專案,並部署基於ConvNet的影象理解產品和服務。
ConvNet很容易在晶片或現場可程式化門陣列中實現有效的硬體實現。 許多公司,如NVIDIA,Mobileye,英特爾,高通和三星正在開發ConvNet晶片,以使智慧手機,相機,機器人和自動駕駛汽車的實時視覺應用。
Deep-learning theory shows that deep nets have two different exponential advantages over classic learning algorithms that do not use distributed representations21. Both of these advantages arise from the power of composition and depend on the underlying data-generating distribution having an appropriate componential structure40. First, learning distributed representations enable generalization to new combinations of the values of learned features beyond those seen during training (for example, 2n combinations are possible with n binary features)68,69. Second, composing layers of representation in a deep net brings the potential for another exponential advantage70 (exponential in the depth).
The hidden layers of a multilayer neural network learn to represent the network’s inputs in a way that makes it easy to predict the target outputs. This is nicely demonstrated by training a multilayer neural network to predict the next word in a sequence from a local context of earlier words. Each word in the context is presented to the network as a one-of-N vector, that is, one component has a value of 1 and the rest are 0. In the first layer, each word creates a different pattern of activations, or word vectors (Fig. 4). In a language model, the other layers of the network learn to convert the input word vectors into an output word vector for the predicted next word, which can be used to predict the probability for any word in the vocabulary to appear as the next word. The network learns word vectors that contain many active components each of which can be interpreted as a separate feature of the word, as was first demonstrated27 in the context of learning distributed representations for symbols. These semantic features were not explicitly present in the input. They were discovered by the learning procedure as a good way of factorizing the structured relationships between the input and output symbols into multiple ‘micro-rules’. Learning word vectors turned out to also work very well when the word sequences come from a large corpus of real text and the individual micro-rules are unreliable71. When trained to predict the next word in a news story, for example, the learned word vectors for Tuesday and Wednesday are very similar, as are the word vectors for Sweden and Norway. Such representations are called distributed representations because their elements (the features) are not mutually exclusive and their many configurations correspond to the variations seen in the observed data. These word vectors are composed of learned features that were not determined ahead of time by experts, but automatically discovered by the neural network. Vector representations of words learned from text are now very widely used in natural language applications.
The issue of representation lies at the heart of the debate between the logic-inspired and the neural-network-inspired paradigms forcognition. In the logic-inspired paradigm, an instance of a symbol is something for which the only property is that it is either identical or non-identical to other symbol instances. It has no internal structure that is relevant to its use; and to reason with symbols, they must be bound to the variables in judiciously chosen rules of inference. By contrast, neural networks just use big activity vectors, big weight matrices and scalar non-linearities to perform the type of fast ‘intuitive’ inference that underpins effortless commonsense reasoning.
Before the introduction of neural language models71, the standard approach to statistical modelling of language did not exploit distributed representations: it was based on counting frequencies of occurrences of short symbol sequences of length up to N (called N-grams). The number of possible N-grams is on the order of VN, where V is the vocabulary size, so taking into account a context of more than a handful of words would require very large training corpora. N-grams treat each word as an atomic unit, so they cannot generalize across semantically related sequences of words, whereas neural language models can because they associate each word with a vector of real valued features, and semantically related words end up close to each other in that vector space (Fig. 4).
Figure 4 | Visualizing the learned word vectors. On the left is an illustration of word representations learned for modelling language, non-linearly projected to 2D for visualization using the t-SNE algorithm103. On the right is a 2D representation of phrases learned by an English-to-French encoder–decoder recurrent neural network75. One can observe that semantically similar words or sequences of words are mapped to nearby representations. The distributed representations of words are obtained by using backpropagation to jointly learn a representation for each word and a function that predicts a target quantity such as the next word in a sequence (for language modelling) or a whole sequence of translated words (for machine translation).
深度學習理論表明,與不使用分佈式表示的經典學習演算法相比,深度網路具有兩種不同的指數優勢。這兩個優點都來自組成的力量,並且取決於具有適當元件結構的底層數據生成分佈。首先,學習分佈式表示可以將學習到的特徵值的新組合泛化到訓練過程中看到的值之外(例如,2n組合與n個二進制特徵是可能的)。 第二,在深網中組成表示層帶來了另一個指數優勢(深度指數)的潛力。
多層神經網路的隱藏層學會以一種易於預測目標輸出的方式表示網路的輸入。這通過訓練多層神經網路來從早期單詞的區域性上下文中預測序列中的下一個單詞來很好地證明。
上下文中的每個單詞作爲一個N向量呈現給網路,即一個分量的值爲1,其餘的值爲0。在第一層中,每個單詞建立不同的啓用模式,或單詞向量(圖4)。在語言模型中,網路的其他層學習將輸入的單詞向量轉換爲預測的下一個單詞的輸出單詞向量,用於預測詞彙中任何單詞作爲下一個單詞出現的概率。網路學習包含許多活動元件的單詞向量,每個元件都可以被解釋爲單詞的一個單獨的特徵,這是在學習符號的分佈式表示的背景下首次演示的。這些語意特徵沒有明確地存在於輸入中。它們被學習過程發現是一種很好的方法,將輸入和輸出符號之間的結構化關係分解成多個「微規則’。當單詞序列來自大量的真實文字並且單個的微規則是不可靠的時,學習單詞向量也會很好地工作。例如,當被訓練來預測新聞故事中的下一個單詞時,週二和週三的學習單詞向量非常相似,瑞典和挪威的單詞向量也是如此。這種表示被稱爲分佈式表示,因爲它們的元素(特徵)不是相互排斥的,它們的許多設定對應於觀測數據中看到的變化。這些詞向量是由學習到的特徵組成的,這些特徵不是由專家提前確定的,而是由神經網路自動發現的。 從文字中學到的單詞的向量表示現在在自然語言應用中得到了非常廣泛的應用。
表徵問題是邏輯啓發和神經網路啓發的認知範式之間爭論的核心。在邏輯啓發的範式中,符號的範例是唯一的屬性是它要麼與其他符號範例相同,要麼與其他符號範例不相同。它沒有與其使用相關的內部結構;爲了用符號進行推理,它們必須在明智選擇的推理規則中與變數系結。相反,神經網路只使用大活動向量、大權矩陣和標量非線性來執行支援毫不費力的常識推理的快速「直覺」推理型別。
在引入神經語言模型之前,語言統計建模的標準方法沒有利用分佈式表示:它是基於長度達到N(稱爲N-gram)的短符號序列出現的計數頻率。可能的N-gram的數量是按VN的順序排列的,其中V是詞彙大小,因此,考慮到大量單詞的上下文,需要非常大的訓練語料庫。語法將每個單詞視爲一個原子單位,因此它們不能跨越語意相關的單詞序列進行泛化,而神經語言模型可以這樣做,因爲它們將每個單詞與真實值特徵的向量相關聯,語意相關的單詞最終在該向量空間中彼此接近(圖4)。
圖4.視覺化學習的單詞向量。左圖是用於建模語言的單詞表示的插圖,非線性地投影到2D,用於使用t-SNE演算法進行視覺化。右圖是由英法編解碼遞回神經網路學習的短語的二維表示。人們可以觀察到,語意上相似的單詞或單詞序列被對映到附近的表示。單詞的分佈式表示是通過使用反向傳播來共同學習每個單詞的表示和一個函數來預測目標數量,例如序列中的下一個單詞(用於語言建模)或整個翻譯單詞序列(用於機器翻譯)。
When backpropagation was first introduced, its most exciting use was for training recurrent neural networks (RNNs). For tasks that involve sequential inputs, such as speech and language, it is often better to use RNNs (Fig. 5). RNNs process an input sequence one element at a time, maintaining in their hidden units a ‘state vector’ that implicitly contains information about the history of all the past elements of the sequence. When we consider the outputs of the hidden units at different discrete time steps as if they were the outputs of different neurons in a deep multilayer network (Fig. 5, right), it becomes clear how we can apply backpropagation to train RNNs.
RNNs are very powerful dynamic systems, but training them has proved to be problematic because the backpropagated gradients either grow or shrink at each time step, so over many time steps they typically explode or vanish.
Thanks to advances in their architecture and ways of training them, RNNs have been found to be very good at predicting the next character in the text or the next word in a sequence, but they can also be used for more complex tasks. For example, after reading an English sentence one word at a time, an English ‘encoder’ network can be trained so that the final state vector of its hidden units is a good representation of the thought expressed by the sentence. This thought vector can then be used as the initial hidden state of (or as extra input to) a jointly trained French ‘decoder’ network, which outputs a probability distribution for the first word of the French translation. If a particular first word is chosen from this distribution and provided as input to the decoder network it will then output a probability distribution for the second word of the translation and so on until a full stop is chosen. Overall, this process generates sequences of French words according to a probability distribution that depends on the English sentence. This rather naive way of performing machine translation has quickly become competitive with the state-of-the-art, and this raises serious doubts about whether understanding a sentence requires anything like the internal symbolic expressions that are manipulated by using inference rules. It is more compatible with the view that everyday reasoning involves many simultaneous analogies that each contribute plausiblilty to a conclusion.
Instead of translating the meaning of a French sentence into an English sentence, one can learn to ‘translate’ the meaning of an image into an English sentence (Fig. 3). The encoder here is a deep ConvNet that converts the pixels into an activity vector in its last hidden layer. The decoder is an RNN similar to the ones used for machine translation and neural language modelling. There has been a surge of interest in such systems recently (see examples mentioned in ref. 86).
RNNs, once unfolded in time (Fig. 5), can be seen as very deep feedforward networks in which all the layers share the same weights. Although their main purpose is to learn long-term dependencies, theoretical and empirical evidence shows that it is difficult to learn to store information for very long.
Figure 5 | A recurrent neural network and the unfolding in time of the computation involved in its forward computation. The artificial neurons (for example, hidden units grouped under node s with values st at time t) get inputs from other neurons at previous time steps (this is represented with the black square, representing a delay of one time step, on the left). In this way, a recurrent neural network can map an input sequence with elements xt into an output sequence with elements ot, with each ot depending on all the previous xtʹ (for tʹ≤t). The same parameters (matrices U,V,W ) are used at each time step. Many other architectures are possible, including a variant in which the network can generate a sequence of outputs (for example, words), each of which is used as inputs for the next time step. The backpropagation algorithm(Fig.1) can be directly applied to the computational graph of the unfolded network on the right, to compute the derivative of a total error (for example, the log-probability of generating the right sequence of outputs) with respect to all the states st and all the parameters.
To correct for that, one idea is to augment the network with an explicit memory. The first proposal of this kind is the long short-term memory (LSTM) networks that use special hidden units, the natural behaviour of which is to remember inputs for a long time. A special unit called the memory cell acts like an accumulator or a gated leaky neuron: it has a connection to itself at the next time step that has a weight of one, so it copies its own real-valued state and accumulates the external signal, but this self-connection is multiplicatively gated by another unit that learns to decide when to clear the content of the memory.
LSTM networks have subsequently proved to be more effective than conventional RNNs, especially when they have several layers for each time step, enabling an entire speech recognition system that goes all the way from acoustics to the sequence of characters in the transcription. LSTM networks or related forms of gated units are also currently used for the encoder and decoder networks that perform so well at machine translation.
Over the past year, several authors have made different proposals to augment RNNs with a memory module. Proposals include the Neural Turing Machine in which the network is augmented by a ‘tape-like’ memory that the RNN can choose to read from or write to, and memory networks, in which a regular network is augmented by a kind of associative memory. Memory networks have yielded excellent performance on standard question-answering benchmarks. The memory is used to remember the story about which the network is later asked to answer questions.
Beyond simple memorization, neural Turing machines and memory networks are being used for tasks that would normally require reasoning and symbol manipulation. Neural Turing machines can be taught ‘algorithms’ . Among other things, they can learn to output a sorted list of symbols when their input consists of an unsorted sequence in which each symbol is accompanied by a real value that indicates its priority in the list. Memory networks can be trained to keep track of the state of the world in a setting similar to a text adventure game and after reading a story, they can answer questions that require complex inference. In one test example, the network is shown a 15-sentence version of the The Lord of the Rings and correctly answers questions such as 「where is Frodo now?".
當反向傳播首次引入時,它最令人興奮的用途是訓練遞回神經網路(RNNs)。對於涉及順序輸入的任務,如語音和語言,通常最好使用RNN(圖5)。RNNs一次處理一個元素的輸入序列,在其隱藏單元中保持一個「狀態向量」,它隱式地包含關於序列所有過去元素的歷史資訊。當我們考慮隱藏單元在不同離散時間步驟下的輸出時,就好像它們是深層多層網路中不同神經元的輸出一樣(圖5右圖),我們如何應用反向傳播來訓練RNN變得很清楚。
RNN是非常強大的動態系統,但訓練它們已經證明是有問題的,因爲反向傳播的梯度要麼在每個時間步長上增長,要麼縮小,所以在許多時間步驟中,它們通常會爆炸或消失。
由於它們的體系結構和訓練它們的方法的進步,RNN被發現非常善於預測文字中的下一個字元或序列中的下一個單詞,但它們也可以用於更復雜的任務。 例如,在一次讀一個單詞的英語句子後,可以訓練一個英語「編碼器」網路,使其隱藏單元的最終狀態向量能夠很好地表示句子所表達的思想。然後,這個思想向量可以用作聯合訓練的法語「解碼器」網路的初始隱藏狀態(或作爲額外輸入),該網路輸出法語翻譯第一個單詞的概率分佈。 如果從這個分佈中選擇一個特定的第一個單詞,並提供給解碼器網路作爲輸入,那麼它將輸出翻譯的第二個單詞的概率分佈,以此類推,直到選擇句號爲止。總的來說,這個過程根據取決於英語句子的概率分佈生成法語單詞序列。 這種相當天真的機器翻譯方法很快就與最先進的方法競爭,這引起了人們對理解一個句子是否需要任何東西的嚴重懷疑,比如使用推理規則操縱的內部符號表示式。它更符合這樣一種觀點,即日常推理涉及許多同時進行的類比,每一種類比都有助於推理的合理性。
與將一個法語句子翻譯成英語不同,我們也可以學習將一幅影象的意思「翻譯」成一個英文句子(圖3)。這裏的編碼器是一個深度ConvNet,它將畫素轉換爲其最後一個隱藏層中的活動向量。 解碼器是一種類似於機器翻譯和神經語言建模的RNN。最近對這類系統的興趣激增(見參考文獻中提到的例子86)。
一旦及時展開RNN(圖5),可以看作是非常深的前饋網路,其中所有層共用相同的權重。雖然他們的主要目的是學習長期依賴關係,但理論和經驗證據表明,很難學會長期儲存資訊。
圖5.一個遞回神經網路和展開時間的計算涉及其正向計算。在前一個時間節拍上,人工神經元(例如在時刻,節點下有值的隱藏節點)從其他神經元獲取輸入(由圖中左邊黑方塊代表,表示了一個時間節拍的延遲)。通過這樣,遞回神經網路就可以將輸入序列元素對映到輸出序列元素,每個都由前一個決定()。相同的參數(矩陣U,V,W)在任一時刻都會被利用。很多結構都可以這樣,包括很多可以生成一個輸出佇列(如單詞)的網路,這些輸出都會作爲下一層的輸入。反向傳播演算法(圖1)可以直接應用在右邊的展開網路中,用於計算總誤差關於所有的狀態以及參數的導數(例如產生正確輸出的對數概率)。
爲了糾正這一點,一個想法是用顯式記憶體來增強網路。 第一種建議是使用特殊隱藏單元的長期短期記憶(LSTM)網路,其自然行爲是長時間記住輸入。 一個被稱爲儲存單元的特殊單元的作用就像一個累加器或一個門控泄漏神經元:它在下一個時間步驟中與自己有一個連線,其權重爲一個,因此它複製自己的實值狀態並積累外部信號,但這種自連線被另一個學習決定何時清除記憶體內容的單元多路門控。
隨後,LSTM網路被證明比傳統的RNN更有效,特別是當它們每個時間步驟都有幾層時,使得整個語音識別系統能夠從聲學一直到轉錄中的字元序列。目前LSTM網路或相關形式的門控單元也被用於編碼器和解碼器網路,這些網路在機器翻譯中表現得非常好。
Unsupervised learning91–98 had a catalytic effect in reviving interest in deep learning, but has since been overshadowed by the successes of purely supervised learning. Although we have not focused on it in this Review, we expect unsupervised learning to become far more important in the longer term. Human and animal learning is largely unsupervised: we discover the structure of the world by observing it, not by being told the name of every object.
Human vision is an active process that sequentially samples the optic array in an intelligent, task-specific way using a small, high-resolution fovea with a large, low-resolution surround. We expect much of the future progress in vision to come from systems that are trained end-toend and combine ConvNets with RNNs that use reinforcement learning to decide where to look. Systems combining deep learning and reinforcement learning are in their infancy, but they already outperform passive vision systems99 at classification tasks and produce impressive results in learning to play many different video games.
Natural language understanding is another area in which deep learning is poised to make a large impact over the next few years. We expect systems that use RNNs to understand sentences or whole documents will become much better when they learn strategies for selectively attending to one part at a time.
Ultimately, major progress in artificial intelligence will come about through systems that combine representation learning with complex reasoning. Although deep learning and simple reasoning have been used for speech and handwriting recognition for a long time, new paradigms are needed to replace rule-based manipulation of symbolic expressions by operations on large vectors.
無監督學習對恢復對深度學習的興趣具有催化作用,但自那以後,純粹監督學習的成功就黯然失色。 雖然我們在這篇綜述中沒有關注它,但我們期望無監督學習在長期內變得更加重要。人類和動物的學習在很大程度上是不受監督的:我們通過觀察世界的結構,而不是通過告訴每個物體的名稱來發現世界的結構。
人類視覺是一個主動的過程,它以一種智慧的、特定於任務的方式,使用一個小的、高解析度的凹,並有一個大的、低解析度的環繞。 我們預計未來在視覺方面的進展將來自經過訓練的端對端系統,並將ConvNet與使用強化學習來決定在哪裏看的RNN相結合。 深度學習和強化學習相結合的系統處於起步階段,但它們在分類任務上已經優於被動視覺系統,並在學習玩許多不同的電子遊戲方面產生了令人印象深刻的結果。
自然語言理解是另一個領域,深度學習將在未來幾年產生巨大影響。 我們期望使用RNN來理解句子或整個文件的系統在學習一次有選擇地處理一個部分的策略時會變得更好。
最終,人工智慧的重大進步將通過將表徵學習與複雜推理相結合的系統來實現。 雖然深度學習和簡單推理已經被用於語音和筆跡識別很長一段時間,但是用操作大型向量的方法去替代基於規則的符號表達方法需要新的範例。