逐字稿 · CC BY 4.0

NYU 深度學習第 1 週:歷史與演進 — Yann LeCun

本頁標題、字幕、摘要與閱讀筆記為已儲存的 AI 譯文,可能有誤。時間戳與來源一致,可展開查看原始字幕,並對照原影片核對。

Yann LeCun 為 NYU 深度學習課程揭開序幕,追溯感知器、梯度下降、卷積架構與階層式表徵學習的發展。

Alfredo Canziani(冷在) · 發佈於 · 1 小時 39 分 · 英文 · 授權:CC BY 4.0 · 來源:在 YouTube 觀看

逐字稿來源:創作者上傳至 YouTube 的字幕。AI 標點由 Vidleaf 加入;原始措辭與時間戳錨點均保留。原始逐字稿見下方。

AI 產生的摘要

這堂深度學習導論課程結合了課程行政事務與該領域的高階概覽。課程由助教 Alfredo Canziani 與 Mark Goldstein 負責,講師在週一進行九場授課,週二的實作課程則由 Mark 進一步主持,涵蓋實務問題、數學複習與 PyTorch 教學;另有三場客座演講、預計可能在三月左右的期中考,以及附有排行榜的最終專案競賽,可能以兩人一組進行,內容大概會結合自監督式學習與自動駕駛。本堂課概述了監督式學習、神經網路與深度學習,接著介紹後續主題,包括反向傳播與架構元件、卷積網路與循環網路、閘控與乘法互動(GRU、LSTM)、記憶網路、Transformer 與 adapter、僅簡略提及的圖神經網路,以及最佳化技巧。深度學習幾乎總是以梯度為基礎的最佳化,但非凸目標函數的幾何性質尚未被理解;能量基礎模型被提出作為監督式、非監督式與自監督式學習的一般化表述,機率模型則為其特例,而自監督式學習被描述為非常活躍、且可能成為主流。歷史部分追溯其根源,從 McCulloch 與 Pitts 的閾值單元神經元與 Hebb 的突觸強度概念,歷經 Wiener 的控制論與 Rosenblatt 的感知器、1960年代末的衰退、1980年代中反向傳播的復興,以及2010年後在語音、視覺與自然語言處理上的復興,並指出機器仍屬狹義且缺乏常識。接著對比兩階段模式識別與端到端深度學習,並解釋為何全連接矩陣對影像不切實際,從而引出卷積與池化。

由逐字稿產生。請對照原始影片檢查連結的段落。

含時間戳的章節摘要

課程行政事務與結構

教學團隊與聯絡方式

  • [0:01] 這門課實際上由助教 Alfredo Canziani 與 Mark Goldstein 負責,學生與他們互動的頻率會遠高於講師。
  • [0:16] 學生不應在課堂結束時提問,因為講師必須立刻離開去趕飛機。

網站與授課時程

  • [0:35] 課程設有網站,講師會盡力上傳投影片的 PDF,可能就在授課前幾分鐘。
  • [0:55] 講師將在週一晚上進行九場授課。

週二實作課程

  • [1:01] 每週二晚上都有實作課程,由 Mark 進一步主持。
  • [1:07] 實作課程涵蓋實務問題、必要數學與基本概念的複習,以及 PyTorch 與各種其他軟體工具的使用教學。

客座演講與主題

  • [1:24] 將有三場客座演講,講者名單尚未定案。
  • [1:29] 客座演講的主題將涵蓋自然語言處理、電腦視覺與自監督式學習。

期中考與期末專題

  • [1:41] 預計會有一次期中考,可能安排在三月左右的某一次上課時間。
  • [1:53] 評量將以期中考與期末專題為依據,學生可能可以兩人一組進行。
  • [2:02] 分組是要兩人或三人一組,目前尚未決定。
  • [2:10] 專題可能會結合自監督式學習與自動駕駛,目前正與各方人士討論資料的取得。

深度學習課程簡介與先修條件

課程概述與範圍

  • [2:23] 第一堂課會廣泛介紹什麼是深度學習、它能做什麼,以及它不能做什麼。
  • [2:36] 這堂課會以淺顯的方式走過整門課的脈絡,讓大家對所有主題有宏觀的高層次概念,之後每個主題才能放進整體的脈絡中理解。

機器學習先修條件

  • [2:55] 本課程要求學生熟悉機器學習,或至少具備基本的機器學習概念。
  • [3:04] 講師會詢問有誰用過 PyTorch 或 TensorFlow,或訓練過神經網路。

深度學習課程概述與基礎

課程規劃與主題順序

  • [3:25] 講師不會預設學生已了解深層的底層技術,並可依先備經驗調整課程步調。
  • [3:52] 今天的課程涵蓋監督式學習、神經網路與深度學習的簡介,包括深度學習能做與不能做的事,以及什麼是好的特徵。
  • [4:05] 下週將涵蓋反向傳播與基本架構元件,例如模組、自動微分、損失函數、激活函數、權重共享、乘法交互作用,以及注意力閘控。
  • [4:35] 將涵蓋的宏觀架構包括專家混合、孿生網路與超網路。
  • [4:46] 將有一到兩堂課,可能包含一場客座演講,涵蓋卷積網路及其應用。

特殊架構:循環、閘控與注意力模型

  • [5:06] 將涵蓋以時間反向傳播訓練的遞迴神經網路,包括在控制與時間序列生成上的應用。
  • [5:26] 本課程涵蓋將遞迴與閘控及乘法互動結合,例如閘控遞迴單元與 LSTM。
  • [5:35] 將討論建立在乘法互動之上的架構,包括記憶網路、transformer 與 adapter,這些是近期在 NLP 及其他領域相當熱門的架構。
  • [5:51] 圖神經網路只會簡略提及,因為 Joan Bruna 的另開課程花了許多時間講授這部分。

最佳化的挑戰與實務訓練技巧

  • [6:08] 本課程將涵蓋讓深度學習系統順利運作的技巧,以及理解神經網路中實際發生的最佳化類型。
  • [6:26] 深度學習幾乎總是涉及以梯度為基礎的最佳化;凸情況的規則已有充分理解,但隨機訓練以及具有局部極小值與鞍點的非凸成本函數則尚未被充分理解。
  • [7:02] 最大的祕密是,其實沒有人真正理解目標函數的幾何結構,而重要的是要理解沒有人理解這件事。
  • [7:12] 實務技巧源自直覺、部分理論分析與經驗搜尋:初始化、正規化、如 drop out 的正則化、用於最佳化的梯度裁剪、動量、平均 HDD,以及平行化 HDD 的方法,其中許多並不奏效。
  • [7:40] 更奇特的方法包括 target prop 以及反向傳播的拉格朗日表述。

能量基礎模型與作為推理的推論

  • [7:47] 能量基礎模型為監督式、非監督式與自監督式學習提供了一般的表述方式,包括涉及推論的方法。
  • [8:04] 推論意指搜尋沒有人告訴你、但系統應該推斷出的變數值,這可以視為以神經網路實作推理。
  • [8:20] 神經網路中的推理可以視為針對某些變數最佳化一個能量函數,所得的數值即為所尋求的變數。
  • [8:34] 將神經網路視為從輸入計算輸出的函數,是相當受限的推論形式,因為對於給定的輸入它只能產生一個輸出。

能量基礎模型與自監督式學習

用於多重答案的能量基礎模型

  • [8:50] 許多問題對於給定的輸入有多個可能答案,而表示這些答案的一種方式是讓它們成為能量函數的極小值。
  • [9:04] 推論演算法會找出讓目標函數最小化的變數值,而多個最小值代表模型對同一個輸入可能產生多個輸出。
  • [9:21] 能量基礎模型是達成這件事的一種方式;機率模型如貝氏方法、圖形模型與貝氏網路屬於特例,而能量方法則更為一般、較不特定。
  • [9:39] 特例包括人們過去所稱的結構預測,在自監督式學習中有許多應用。

自監督式學習的興起

  • [9:52] 自監督式學習是現今非常活躍的研究主題,未來很可能會成為真正的主流。
  • [10:02] 它在一年內就在自然語言處理領域成為主流,而在過去幾個月,幾篇論文顯示自監督式學習方法在電腦視覺領域也運作得非常好。
  • [10:17] 講者猜測自監督式學習在接下來幾年將會征服全世界。

以能量基礎方法理解的範例

  • [10:31] 範例包括變分自動編碼器、去噪自動編碼器,以及 BERT,也就是為自然語言處理訓練的 transformer 架構,而自監督式學習是去噪自動編碼器的特例。
  • [10:47] 這些方法,包括生成對抗網路(GAN),都可以在能量基礎方法的脈絡下理解。

邁向貓級與人類級智慧

  • [11:04] 機器現在並不具備超智慧或非常高的智慧:它們能非常出色地解決非常狹窄的問題,有時甚至達到超越人類的表現,但沒有任何機器具備任何形式的常識。
  • [11:12] 最聰明的機器所具備的常識,可能還不如一隻家貓,這帶出一個問題:如何先達到貓級智慧,然後或許再達到人類級智慧。
  • [11:29] 講者並不假裝自己知道答案,但有一些值得在自監督式學習脈絡下討論的想法。

課程作業與期末專題競賽

作業作為期末專題的準備

  • [11:57] 本課程包含作業。
  • [12:29] 這些作業可作為練習,讓學生熟悉深度學習整體所需的技術,尤其是期末專題所需的技術。

期末專題形式與排行榜

  • [12:21] 期末專題將是各隊伍之間的競賽。
  • [12:26] 競賽將設有排行榜。

作業也為期中考做準備

  • [12:46] 這些作業同時也是期中考的準備。

神經網路與控制論的起源

受大腦啟發但概念上不同

  • [13:03] 深度學習受到關於大腦的觀察所啟發,但這種啟發僅止於概念層面,並非試圖複製大腦。
  • [13:11] 大腦的許多細節並不重要,而且也無從得知它們是否真的與人類智慧有關。
  • [13:18] 這個類比就像飛機受到鳥類啟發:飛行的基本原理本質上相同,但細節卻截然不同。

McCulloch 與 Pitts 的閾值神經元模型

  • [14:17] 這段歷史始於 1940 年代,由 McCulloch 與 Pitts 提出神經元基本上就是開或關的閾值單元。
  • [14:39] 透過連接這類神經元,便能建構布林電路並以神經元進行邏輯推論,暗示大腦基本上是一部邏輯推論機器。
  • [14:56] 神經元會計算其輸入的加權總和,若高於閾值便開啟,低於閾值則關閉,這是對真實神經元極為簡化的觀點。
  • [15:09] 那個模型在該領域沿用了將近四十年,事實上整整四十年。

Hebbian 學習與 Wiener 的控制論

  • [15:22] Donald Hebb 提出大腦透過改變突觸強度來學習,當兩個神經元同時放電時連結會增強,不同時放電時則可能減弱。
  • [15:50] Hebbian 學習並不是一種學習演算法,而或許是最初的想法。
  • [15:55] Norbert Wiener 提出了控制論:具備感測器與致動器的系統可以擁有回饋迴路並自我調節。
  • [16:23] 汽車的轉向使用 PID 控制器作為回饋機制,它量測方向盤與車輪的位置,並修正車輪以與之相符。
  • [16:49] 這類回饋機制的穩定性與規則,基本上最初全都源自這項工作。

Rosenblatt 的感知器硬體

  • [16:57] Frank Rosenblatt 構想了能修改極簡神經網路權重的學習演算法。
  • [17:11] 感知器是一部實體的類比電腦,並非三行的 Python 程式,而是一台由線路與低解析度光學感測器組成、用來向它展示圖片的巨大機器。
  • [17:35] 它的神經元會計算加權總和,而可調整的權重是附有馬達的電位器,能為學習演算法而旋轉,使其成為機電裝置。
  • [17:45] 圖中顯示 Rosenblatt 手持一個內含八個權重、配備馬達驅動電位器的模組。

神經網路研究時間軸

  • [18:07] 透過模擬神經元網路來打造智慧機器的構想誕生於 1940 年代,並在 1950 年代末期稍有起色。

早期神經網路的衰落與復興

1960 年代末期神經網路研究的崩解

  • [18:19] 神經網路研究在 1960 年代末期徹底消亡,因為人們意識到當時提出的學習演算法與架構只能處理基本、非常簡單的模式辨識。

日本、1968–1984 的孤立研究

  • [18:38] 大約在 1968 到 1984 之間,世界上基本上沒有人研究神經網路,只有少數孤立的研究者,且大多在日本。
  • [18:50] 日本被描述為一個相對孤立的資助研究生態系,當地的人不會追隨相同的流行趨勢。

1985 前後的領域復興

  • [19:04] 這個領域大約在 1985 年再度起飛。

反向傳播為何在 1980 年代中期出現

連續、可微的神經元作為先決條件

  • [19:12] 反向傳播是一種訓練多層神經網路的演算法,人們在 1960 年代就尋求類似的東西,但並未找到。
  • [19:24] 先前的失敗源自於使用了錯誤的神經元:二元的 McCulloch-Pitts 神經元。
  • [19:32] 反向傳播需要一個連續且可微、或至少連續的激活函數,而使用連續神經元的想法當時並不存在。
  • [19:46] 由於二元神經元不可微,人們不認為這類系統可以用梯度下降來訓練。

浮點數乘法的運算成本

  • [19:56] 使用二元神經元時不需要乘法:活躍的神經元只是將其權重加到加權和中,而不活躍的神經元則不加入任何東西。
  • [20:13] 連續神經元需要將神經元的激活值乘以權重,才能對加權和有所貢獻。
  • [20:19] 在 1980 年代之前,將兩個數字相乘,尤其是浮點數,在任何非極度昂貴的電腦上都非常緩慢,這形成了避免使用連續神經元的誘因。
  • [20:34] 回顧來看,反向傳播之所以未在 1980 年代中期之前出現,主要是因為那時電腦才變得夠快,足以進行浮點數乘法。

深度學習的復興與在各類應用中的擴散

類神經網路在 1995 之後遭到捨棄

  • [20:53] 對類神經網路的一波熱潮大約從 1985 持續到 1995,之後機器學習大致上捨棄了這個構想。
  • [21:08] 這樣的捨棄一直持續到 2000 年代末與 2010 年代初。

約在 2010 的語音辨識突破

  • [21:10] 大約在 2009/2010,人們發現以反向傳播訓練的多層類神經網路能讓語音辨識有所改善。
  • [21:20] 復興始於約 2010 的語音辨識,而非 ImageNet。
  • [21:28] 在首批論文發表後的 18 個月內,語音辨識領域的每個主要參與者都已部署使用類神經網路的商業系統。
  • [21:38] 約 2012 時 Android 手機上的語音辨識功能便使用了類神經網路,這很可能是現代深度學習最早的大規模部署。

2012–2013 年的電腦視覺轉變

  • [21:55] 在 2012 年底與 2013 年初,電腦視覺社群發現深度學習,尤其是卷積網路,效果遠優於先前的方法。
  • [22:08] 社群轉向卷積網路,大致上捨棄了先前的技術,在電腦視覺領域掀起了第二場革命。

約在 2015–2016 的自然語言處理

  • [22:12] 大約三年後,約在 2015/16,自然語言處理也發生了同樣的轉變,包括語言翻譯。

預期將擴及機器人學與控制

  • [22:28] 類似的革命尚未發生,但預期會出現在機器人學、控制以及一系列其他應用領域。

深度學習中的監督式學習與參數調整

監督式學習的主導地位與成對的訓練資料

  • [22:54] 約 90 幾成的深度學習應用以監督式學習為主要方法。
  • [23:04] 監督式學習蒐集輸入與輸出的成對資料,例如附有類別的影像、附有文字轉錄的音訊片段,或是一種語言的文字及其另一種語言的轉錄。

對不正確輸出的反覆修正

  • [23:22] 將一個範例餵給機器,機器產生輸出;若輸出正確,就幾乎或完全不做事,但若不正確,就微調機器的參數。
  • [23:39] 微調參數化函式的參數,使輸出更接近期望的結果,例如當汽車圖片未被標記為汽車時。

神經網路權重與反向傳播技巧

  • [23:54] 在神經網路中,參數就是模擬神經元裡用來計算加權總和的權重,而這些旋鈕會被微調,讓輸出更接近目標。
  • [24:07] 神經網路的關鍵技巧在於判斷該往哪個方向、調整多少旋鈕,這正是梯度計算與反向傳播所要處理的問題。

感知器、Adaline 與特徵擷取器的瓶頸

感知器與 Adaline 作為閾值模型

  • [24:22] 一連串基礎分類模型始於感知器,以及與之競爭的模型 Adaline。
  • [24:33] 兩者都基於相同的架構:計算輸入的加權總和並與閾值比較,高於閾值就開啟,低於閾值就關閉。
  • [24:45] Bernie Widrow 正在微調的 Adaline 是一部實體類比電腦,在許多方面都比感知器小得多。

感知器的固定聯想層

  • [24:59] 感知器是一個兩層神經網路,其中只有第二層具有可訓練的適應性權重。
  • [25:08] 第一層是固定的,在大多數實驗中是隨機決定的,以隨機權重將輸入像素連接到閾值神經元。
  • [25:27] 這第一層被稱為聯想層,在大約四十年間成為圖樣辨識系統設計的基礎。

特徵擷取器加上可訓練分類器

  • [25:49] 此模型讓輸入通過一個特徵擷取器,其目的是擷取對任務有用的特徵,例如偵測眼睛或汽車的深色圓形。
  • [26:17] 特徵擷取器會產生一個特徵向量,可能是數值或開關值,再饋入可訓練分類器,由它計算加權總和並與閾值比較。
  • [26:41] 問題在於特徵擷取器必須以人工方式設計。

研究重心放在人工設計的特徵

  • [26:41] 統計圖樣辨識以及電腦視覺中偏向辨識的部分,都著重於為特定問題設計特徵擷取器,例如韓文字元辨識。
  • [27:12] 相關工作涵蓋了影像尺寸正規化、骨架化,以及將字元從背景中分割出來等前處理技巧。
  • [27:18] 文獻幾乎完全聚焦於特徵擷取器,對可訓練分類器著墨甚少。

深度學習:端對端多層網路

端對端學習取代人工建構的階段

  • [27:31] 深度學習取代了兩階段式的模式辨識流程——原本輸入的表徵需人工設計——改為端到端學習整個任務。
  • [27:52] 該系統由一連串模組串接而成,每個模組都有可調參數與某種非線性,並堆疊成多層。
  • [28:15] 深度學習中的「深度」一詞僅指具有多層,別無其他含意。
  • [28:20] 端到端訓練整個堆疊會帶出一個問題:如何調整第一層的參數,而這正是反向傳播所要解決的。

為何各層必須為非線性

  • [28:39] 模組必須為非線性,因為兩個線性函數的合成本身仍是線性,所以兩個相繼的線性層會塌縮成一層。
  • [28:53] 將向量先乘上一個矩陣、再乘上另一個矩陣,等於乘上這兩個矩陣預先算好的乘積。
  • [29:06] 若這些層是線性的,那麼擁有多層便毫無意義,不過講者提到仍有一點微小的好處。

最簡單的可調非線性架構

  • [29:46] 輸入(例如影像或音訊)被視為向量,並乘上一個矩陣,其係數即為可調參數。
  • [30:15] 所得向量的每個分量都會通過一個非線性函數,最簡單的選擇是 ReLU(x) = max(x, 0)。
  • [30:26] 同一個函數在神經網路中稱為 ReLU,在工程上稱為半波整流,在數學上則稱為正部。
  • [30:47] 經過 ReLU 之後,凡是加權和小於零的位置,向量中都會出現許多零,而「先相乘、再套用非線性」的流程會反覆進行。

為何稱為神經網路

  • [31:17] 矩陣乘法的每個輸出分量,都是輸入分量以矩陣對應的某一列作為權重所做的加權和。
  • [31:39] 這種加權和的運算類似於單元接收輸入,這正是此架構被稱為神經網路的原因。
  • [31:59] 矩陣乘法後的單元數等於列數,而欄數必須等於輸入大小。

監督式學習與梯度下降

目標函數與訓練集平均

  • [32:21] 監督式學習會將系統對給定輸入的輸出與目標輸出相比較。
  • [32:33] 目標函數、損失模組或散度會計算所產生輸出與目標之間的距離或懲罰。
  • [32:53] 成本函數輸出一個純量,例如目標向量與深度學習系統所產生向量之間的歐幾里得距離。
  • [33:12] 純量成本是對一組輸入輸出配對的訓練集取平均,並針對系統的可調參數將此平均值最小化。

梯度下降與凸性

  • [33:55] 最小化是透過計算梯度來完成,類似於在夜裡濃霧籠罩的平滑山嶺中迷路時,找出最陡下降的方向。
  • [34:22] 搜尋下降方向稱為計算梯度,嚴格來說是負梯度,而每一步都朝該方向前進。
  • [34:36] 若步伐夠小,不至於跳到山的另一側,只要山谷是凸的,過程最終會收斂到谷底。
  • [34:49] 若沒有凸性,像山中小湖這樣的局部最小值可能會困住搜尋,即使視線之外存在更低的山谷,這就是凸性之所以重要的原因。

隨機梯度:效率與泛化

從小樣本批次計算梯度

  • [35:20] 目標函數是對許多樣本取平均,其梯度可透過對整個訓練集取平均來計算。
  • [35:37] 更有效率的方式是取一個樣本或一小組樣本,計算該樣本的誤差及其對參數的梯度,然後邁出一小步。
  • [35:51] 每個新樣本都會產生不同的誤差與梯度,可能指向不同方向,因此路徑會以雜訊般、起伏不定的方式沿成本曲面下降。

兩個權重範例中的不規則路徑

  • [36:16] 所示範例將隨機梯度應用於僅有兩個權重的簡單二維問題。
  • [36:23] 路徑看起來近似週期性,是因為範例總是以相同順序呈現,而這並非使用隨機梯度時應有的做法,且路徑其實非常不規則。

更快的收斂與更好的泛化

  • [36:36] 經驗上,隨機梯度收斂得快非常多,尤其是在訓練集非常龐大時。
  • [36:42] 它也往往能帶來更好的泛化:在獨立集合上測得的效能,通常隨機梯度比真正的梯度下降更好。

全批次梯度下降的成本

  • [37:16] 對整個資料集計算完整梯度在運算上是可行的,每次計算的成本並不會更高,但雜訊較少且速度較慢。
  • [37:37] 若一百萬個樣本的訓練集其實是 10,000 個樣本集合重複 100 次,完整梯度會把相同的值計算一百次,並花費比必要多一百倍的工作量。

雜訊、冗餘與反向傳播

源自冗餘的隨機梯度效率

  • [38:11] 隨機梯度不僅透過重複發揮作用,在更一般的機器學習設定中也是如此,因為樣本含有大量冗餘,且許多樣本彼此非常相似。
  • [38:25] 只要存在某種連貫性,且系統具備泛化能力,隨機梯度就更有效率,因為沒有隨機梯度,你就無法利用那份冗餘。
  • [38:40] 這是雜訊對你有利的一個例子。

反向傳播作為堆疊模組上的鏈式法則

  • [38:53] 非正式地說,反向傳播是鏈式法則的實際應用:神經網路可視為一疊模組,也就是函數的合成。
  • [39:22] F 與 G 合成的導數,等於 F 在 G 之 X 處的導數乘以 G 在 X 處的導數,得到兩個導數的乘積。
  • [39:37] 當函數是以向量為輸入並產生向量輸出的向量函數,或更一般地是多維陣列時,同樣的法則也適用。
  • [40:06] 對於具有多個輸入與多個輸出的函數模組,只要照樣套用,同樣的法則也適用,只是必須使用偏導數。

為何稱為反向傳播

  • [40:20] 為了計算目標函數(期望輸出與實際輸出之間的差異)對網路中任何變數的導數,必須將導數向後傳播並沿途相乘。
  • [40:42] 它之所以稱為反向傳播,是因為它適用於多層;更正式的處理留待下週說明。

將神經網路擴展到影像輸入

影像輸入的維度

  • [41:04] 一張影像即使解析度相對較低,通常每邊也有數百個像素。
  • [41:15] 一張 256 x 256 的汽車影像有 65,536 個像素,再加上 R、G、B 三個分量,大約就有二十萬個數值。
  • [41:33] 因此輸入向量大約有二十萬個分量。

矩陣大小與不切實際

  • [41:40] 與這個向量相乘的矩陣必須有二十萬個行。
  • [41:54] 視第一層的單元數而定,這個矩陣可能是 200,000 x 100,000,非常龐大。
  • [42:06] 即使第一層做了壓縮,這樣的矩陣已經含有數十億個元素。
  • [42:16] 把它當成完整的矩陣來處理並不實際。

受大腦啟發的結構化矩陣

  • [42:23] 處理影像時,必須假設矩陣具有某種結構,使其並非完全稠密,也不會將所有東西都連接到所有東西。
  • [42:33] 完全連接的矩陣並不實用,至少對許多實際應用而言是如此。
  • [42:35] 這正是從大腦汲取靈感之處。

視覺系統階層與快速物件辨識

Hubel 與 Wiesel 的視覺皮質記錄

  • [42:43] 在經典的1960神經科學研究中,Hubel 與 Wiesel 將電極插入貓、猴、小鼠等動物的視覺皮質,以判定視覺皮質神經元的功能,這項研究在1970年代贏得了諾貝爾獎。

視網膜壓縮與脊椎動物的盲點

  • [43:27] 所有哺乳動物的視覺系統組織方式相似:光線照射到視網膜,視網膜上感光細胞前方的數層神經元會先對訊號進行前處理與壓縮。
  • [43:44] 人眼大致相當於一億像素的相機,但若視神經含有一億條纖維,眼睛就會大到無法轉動,因此視網膜神經元會將訊號壓縮到每眼約一百萬條纖維。
  • [44:26] 講者將這種接線方式稱為脊椎動物演化上的錯誤:線路位於視網膜前方並穿透視網膜,造成盲點,而魷魚、章魚等無脊椎動物的線路則從後方穿出。

外側膝狀核與腹側階層

  • [45:33] 訊號從眼睛傳到腦部基底的外側膝狀核,該處會進行一些對比正規化。
  • [45:53] 訊號從那裡傳到腦後方的一級視覺皮質 V1,並經過腹側階層 V1、V2、V4 與 IT,從腦後方延伸到腦側。
  • [46:11] 在下顳葉皮質中,物件類別會受到表徵:無論你的祖母穿著什麼、身處何處或被遮蔽,神經元都會對她產生反應;而在開顱病患身上的記錄也發現了只對珍妮佛·安妮斯頓有反應的神經元。

物件辨識的前饋速度

  • [47:06] 視覺系統似乎以階層式、多層的結構進行模式辨識,而視覺處理一般被認為基本上是前饋的。
  • [47:19] 辨識日常物件大約需要100毫秒,這僅夠訊號以每個神經元數毫秒的延遲,從視網膜傳到顳下皮質。
  • [47:41] 快速辨識時沒有時間進行遞迴連接,不過講者指出這類連接大量存在。

從 Hubel 與 Wiesel 到卷積網路

福島的逐層非監督模型

  • [47:58] 福島邦彥在 1970 年代從 Hubel 與 Wiesel 的研究中獲得啟發,建構了一個具有多層結構的神經網路模型。
  • [49:25] 福島邦彥並未堅持要萃取方向性特徵,而是採用了一種非監督式學習演算法。
  • [49:39] 他以非監督式的方式逐層訓練這個系統,而非採用端到端的方式。
  • [49:51] 他採用了神經元在視野中複製分布的作法,以及 Hubel 與 Wiesel 的複雜細胞概念。

V1 的視網膜拓撲組織與方向選擇性

  • [48:14] Hubel 與 Wiesel 發現,個別的 V1 神經元只對視野中的一小部分有反應。
  • [48:40] 神經元以視網膜拓撲的方式組織,因此相鄰的神經元會對視野中相鄰的區域產生反應。
  • [48:48] 涵蓋同一區域的神經元群似乎會對特定方向的邊緣產生反應,而相鄰的神經元則調諧至略微旋轉的邊緣。
  • [49:18] 因此,V1 被描繪為具有方向選擇性,其中調諧至多種方向的群組會在整個視野中複製分布。

複雜細胞與平移不變性

  • [50:00] 複雜細胞會匯集簡單細胞的活動,而簡單細胞正是具有方向選擇性的單元。
  • [50:15] 當一條有方向的邊緣略微移動時,不同的簡單細胞會被活化,但複雜細胞會持續活化,直到該邊緣離開其感受野。
  • [50:32] 因此,複雜細胞在表徵中建構了些許的平移不變性。
  • [50:44] 這些機制在卷積網路中現在被稱為卷積與池化。

卷積網路:局部連結與權重共享

  • [50:54] 這一系列的研究工作在 1980 年代中後期促成了卷積網路的誕生。
  • [51:00] 卷積網路具有在整個視野中複製分布的局部連結,並在特徵偵測層之間穿插池化運算。
  • [51:34] 層中的每個神經元會對輸入的一小塊區域計算加權總和,而該層中的每個神經元都使用同一組權重。
  • [51:50] 這就是權重綁定或權重共享的概念,而反向傳播讓這類網路得以被訓練來辨識模式。

早期用於字元辨識的端到端神經網路 a

貝爾實驗室在 386 個人電腦上的手寫數字展示

  • [52:02] 講者展示了一段來自 1980 年代末或 1990 年代初的手寫數字展示,同時還有一張他大約三十歲時的照片,以及他當年在新澤西貝爾實驗室的舊電話號碼,該號碼如今已無法使用。
  • [52:21] 按下一個按鍵,就會在一台配備特殊加速卡的 386 個人電腦上執行神經網路,類似先前展示的動畫網路,能辨識任何風格的字元,包括非常奇怪的字元。
  • [52:51] 這在當時是全新的做法,因為當時的模式辨識仍遵循先擷取特徵、再於其上訓練分類器的模式,而這套系統則是從資料端對端學習整個任務。
  • [53:08] 前幾層扮演特徵擷取器的角色,但卻是從資料中訓練出來的;之所以選擇字元辨識,是因為它和語音辨識是當時僅有具備足夠資料的任務,而語音實驗只算小有成果。

用於同時分割與辨識的卷積網路

  • [53:29] 網路的卷積特性讓它們能一次辨識成組的字元,而不只是單一字元,做法是將網路套用到一張大影像上,只要視野中出現可辨識的形狀就會被啟動。
  • [54:02] 一個輸入視窗很小的卷積網路會滑過整張影像,每當它被啟動,就代表偵測到它被訓練要偵測的物件。
  • [54:15] 這套系統執行同時分割與辨識,不同於較早的模式辨識程式,那些程式會先明確地將物件從背景以及彼此之間分離出來,再把每個字元送進辨識器。

用於人臉與行人的滑動視窗偵測

  • [54:42] 同樣的方法也適用於自然影像,例如人臉與行人偵測:用數千個範例訓練一個卷積網路來區分有臉和沒有臉的影像,然後把視窗滑過整張影像。
  • [55:02] 由於人臉可能比視窗還大,因此會對影像進行次取樣使其變小,再反覆滑動網路,讓不論大小的人臉都能被偵測到。

用於機器人導航的卷積障礙物偵測

  • [55:19] 在深度學習普及之前,卷積網路曾被應用於行進中機器人的攝影機影像,依每個小視窗(約 40x40 像素或更小)的中心像素是否位於地面或障礙物上,對每個小視窗進行分類。
  • [55:48] 地面標為綠色,障礙物標為紅色或紫色,並對應到一張俯視圖,用來規劃通往目標的路徑並進行導航。
  • [56:09] 圖中顯示前博士生 Raia Hadsell 與 Pierre Sermanet 正在測試機器人;Sermanet 是加州 Google Brain 的研究科學家,從事機器人研究,Hadsell 則是機器人研究主管。

語意分割與 Mobileye 的採用

滑動視窗語意分割

  • [56:45] 語意分割可採用滑動視窗法,讓卷積網路以視窗為脈絡,對中央像素進行分類。
  • [56:58] 與障礙物偵測不同,這個網路被訓練來分類約 30 個類別,例如道路、行人、植物與樹木。
  • [57:18] 系統誤把華盛頓廣場公園中央判為沙漠,因此並不完美,不過在當時這已是此任務的最先進水準。

在 2010 周遭宣揚深度學習

  • [57:36] 約在 2010,深度學習革命之前,講者四處演講,向人們宣揚深度學習。
  • [57:48] 一位來自以色列的理論派教授參加了其中一場演講,並被其潛在應用深深吸引。

Mobileye 轉向卷積網路

  • [58:03] 這位教授即將前往 Mobileye 休假,當時那是一家以色列的自駕車新創公司。
  • [58:15] 他力勸 Mobileye 嘗試卷積網路,但工程師們否決了這個想法,偏好採用自家方法。
  • [58:26] 他自己實作了卷積網路,並超越他們所有的基準,之後整間公司便轉向卷積網路。

首套車用視覺系統

  • [58:36] Mobileye 是第一家為汽車打造視覺系統的公司,該系統能讓車輛保持在高速公路車道上,並為穿越的行人或自行車騎士煞車。
  • [58:54] 該系統所用的語意分割,與機器人所示範的語意分割非常相似。
  • [58:59] 這位教授是 Shai Shalev-Schwartz。

神經網路硬體與深度學習復興

1980 在貝爾實驗室的神經網路晶片研究

  • [59:08] 在 1980 年代,人們對能極快速執行神經網路的特殊硬體抱有濃厚興趣。
  • [59:16] 講者在新澤西貝爾實驗室的團隊成員實作了數款神經網路晶片,講者本人也參與了其中一些。
  • [59:28] 對神經網路的興趣在 1990 年代中期消退,因此這類硬體的研究便停擺,直到幾年前才重啟。

與 Bengio 和 Hinton 的協同合作

  • [59:08] 在 2000 年代初期,講者、Yoshua Bengio 與 Geoff Hinton 都知道深度學習運作良好,而社群不該對神經網路與深度學習嗤之以鼻。
  • [59:08] 「深度學習」一詞當時尚未出現,是幾年後才被發明的;約在 2003 或 2004,這個群體開始了講者所謂的「密謀」。
  • [59:08] 他們著手在資料集上打破紀錄、發明訓練超大類神經網路的演算法,並蒐集超大型資料集,向全世界證明這些方法真的可行,因為當時根本沒有人相信。

類神經網路加速器成為當今熱門的晶片議題

  • [59:39] 類神經網路加速器現在是晶片業界晶片設計最熱門的議題。
  • [59:52] 在 ISSCC 等電腦架構與固態電路研討會上,大約一半的演講都與類神經網路加速器有關。
  • [1:00:03] 講者曾參與過幾個類神經網路加速器的開發。

從 2010 起的突破

  • [1:00:09] 大約在 2010、2013 與 2015 前後,語音辨識、影像辨識與自然語言處理都出現了進展,而且其他主題也持續有進展。
  • [1:00:23] 講者遺憾地指出,這項突破並非發生在他自己的實驗室,而是發生在朋友那裡。

AlexNet 與電腦視覺的深度學習突破

以 GPU 為基礎的卷積網路與 ImageNet 的設置

  • [1:01:18] Geoff Hinton 的學生 Alex Krizhevsky 花了許多時間在 GPU 上實作卷積網路,而當時 GPU 正逐漸具備高效能。
  • [1:01:36] 這讓他們得以訓練出比以往任何人都還要大得多的卷積網路。
  • [1:01:48] 他們在 ImageNet 的自然照片資料集上進行訓練,系統必須從 1,000 個類別中辨識出主要物件,訓練樣本有 1.3 百萬筆。
  • [1:02:09] 他們大致沿用先前的模型,打造出一個非常大、非常深的卷積網路,在 GPU 上跑了幾週,並以大幅差距擊敗了最佳的競爭系統。

ImageNet 錯誤率的演進與關鍵轉捩點

  • [1:02:27] 在 top-5 錯誤率指標上,2010 年的 ImageNet 錯誤率約為 28%,2011 年則是 25.8%,其中 2011 年的系統非常龐大,而且只訓練了最後一層。
  • [1:03:04] Hinton 的團隊把錯誤率降到 16.4%,這對電腦視覺社群而言是關鍵的轉捩點。
  • [1:03:18] 社群從 2011–2012 年幾乎拒收每一篇涉及類神經網路的論文,轉變為 2016 年拒收沒有卷積網路的論文。

歷代架構的層數膨脹

  • [1:03:50] 隨著架構技巧讓錯誤率快速下降,層數也隨之膨脹:1990 年的卷積網路大約有 7 層。
  • [1:04:03] AlexNet 大約有 12 層,隔年的 VGG 有 19 層,而 GoogLeNet 的層數則難以判定。
  • [1:04:18] 目前物件辨識的標準主幹網路 ResNet-50 有 50 層,而有些網路則有大約 100 層。

ImageNet 準確率與運算及記憶體取捨

網路比較圖表的座標軸

  • [1:04:35] 圖表中的每個圓點代表一種特定的網路架構。
  • [1:04:41] 橫軸顯示計算輸出所需的數十億次運算量。
  • [1:04:50] 縱軸是 ImageNet 上的 top-one 準確率,這是與先前所示不同的效能衡量指標。
  • [1:05:01] 每個圓點的大小代表記憶體佔用量,以儲存權重值所需的百萬個浮點數來衡量。

壓縮與最佳化的誘因

  • [1:04:57] 目前在此準確率指標上,最佳的系統大約在 84 左右。
  • [1:05:12] 人們會壓縮這些網路,例如透過量化,而 Google、Facebook 及其他地方的整個團隊只專注於最佳化和壓縮這些網路,讓它們能快速執行。
  • [1:05:37] 舉例來說,Facebook 每天在其伺服器上執行卷積網路數百億次,這創造了最佳化所需運算量的巨大誘因。

組合性作為深度學習的基礎

自然資料中的組合階層

  • [1:06:01] 卷積網路之所以成功,是因為它們利用了組合性,這是自然資料的一種特性。
  • [1:06:16] 場景由物件組成,物件由部件組成,部件由子部件組成,子部件由基元組成,而基元由輪廓、邊緣或紋理組成,這些都是像素的組合。
  • [1:06:40] 在這個組合階層中,某一層的特定物件組合會形成下一層的物件。

在網路架構中模擬階層

  • [1:06:48] 深度學習在網路架構中模擬組合階層,並讓它學習某一層中能形成下一層特徵的適當特徵組合。
  • [1:07:06] 深度學習關乎學習如何表徵世界並利用其結構,也就是因為世界具有組合性而存在的組織方式。

Stuart Geman 對愛因斯坦名言的改編版本

  • [1:07:19] 布朗大學的 Stuart Geman 改編了愛因斯坦的名言:世界最不可理解之處,在於它竟然可以被理解。
  • [1:07:35] 愛因斯坦的重點是,世界可能複雜到我們完全無法理解,因此我們至少能理解其中一部分,看起來就像是個陰謀。
  • [1:07:47] Geman 的版本是:世界具有組合性,或者存在一位神,因為如果世界不具組合性,就需要超自然的事物才能理解它。

電腦視覺的深度學習進展

深度學習所促成的電腦視覺能力

  • [1:08:06] 深度學習推動了電腦視覺的顯著進展,從不可靠的人物偵測,到精確的逐物件遮罩、姿態估計,以及在行動平台上即時運作。
  • [1:08:25] 這些進展大多建立在兩大基本架構家族之上。

兩大主流架構家族

  • [1:08:34] 其中一個家族是單次通過的物件偵測/辨識架構,例如 RetinaNet 與特徵金字塔網路,或 U-Net。
  • [1:08:43] 另一個家族是 Mark-RCNN;這兩個家族都源自如今在 Facebook 的人,有時是在他們加入之前。
  • [1:08:59] 這些架構運作良好,能偵測部分被遮擋的物件,並為每個物件繪製遮罩。

影像進、影像出的遮罩預測

  • [1:09:05] 該模型是一個卷積神經網路,其輸入是一張影像,輸出也是一組影像,每個類別各一張。
  • [1:09:13] 對每個類別,它輸出屬於該類別之物件的遮罩。

個別物件的實例分割

  • [1:09:23] 這些模型能執行實例分割:給定許多羊,它們能區分並挑出個別的羊,而不只是把某個區域標為羊。
  • [1:09:31] 該模型能數羊,講者開玩笑說這正是你入睡時會做的事。

深度學習的開放研究文化

  • [1:09:50] 深度學習社群大多已擁抱公開進行研究。
  • [1:10:01] 課堂上討論的研究不僅會發表,還會連同程式碼一起發表,且往往附有可下載並執行的預訓練模型。
  • [1:10:13] 一切皆為開源且可免費使用,這真的很新,因為人們,尤其是業界、甚至學術界的人,以往並不以這種方式散布程式碼。

自駕車中的卷積網路

Mobileye 早期的卷積網路部署

  • [1:10:38] Mobileye 是將卷積網路用於自駕車的早期使用者,如一段 Mobileye 影片所示。
  • [1:10:47] 到了 2015 年,Mobileye 已成功將卷積網路放上它為其他用途所設計的晶片。
  • [1:10:52] Mobileye 將這項技術授權給 Tesla,Tesla 首批駕駛輔助車輛便是使用這套 Mobileye 系統,能在高速公路上維持車道並變換車道。
  • [1:11:05] 這個卷積網路運行於後視鏡後方的一小塊晶片上,該晶片朝窗外看。

廣泛部署與市場地位

  • [1:11:18] 此後四、五年間,這項技術已被許多不同公司廣泛部署。
  • [1:11:26] Mobileye 被 Intel 收購,在這些視覺系統市場中約佔 70 或 80 個百分點。
  • [1:11:35] 許多公司和汽車製造商都採用這些系統。

歐洲強制規定的緊急煞車

  • [1:11:41] 在某些歐洲國家,每一輛出廠的車,即使是低階車款,都配備基於卷積網路的視覺系統,用於先進或自動緊急煞車(AEBS)。
  • [1:11:58] 例如法國每一輛車都部署了 AEBS,它能減少 40% 的碰撞事故。
  • [1:12:04] 路上並非每輛車都已配備,因為人們會長期持有車輛,但這意味著它能拯救生命。

深度學習在醫學影像的應用

用於 MRI 分析的 3D 卷積網路

  • [1:12:21] 醫學影像深度學習應用的另一大類別,被形容為當今放射學最熱門的議題。
  • [1:12:34] 紐約大學同事一篇論文中的投影片,展示使用 AI(即卷積網路)分析 MRI 影像。
  • [1:12:41] 卷積網路的一大關鍵優勢,在於檢查 MRI 時不需要逐格檢視畫面。
  • [1:12:53] 它們不必將 MRI 切成 2D 影像,而能直接檢視整個 3D 體積。
  • [1:13:01] 3D 卷積網路檢視整個 MRI 體積,並採用類似語意分割的技術,在輸出影像中凡出現股骨等結構之處便予以標示。
  • [1:13:25] 這種方法在 3D 中比在 2D 切片中效果更好。

乳房攝影中的腫瘤偵測及其他專案

  • [1:13:31] 當網路在乳房攝影(屬於 2D 而非 3D)中偵測到惡性腫瘤時,便會予以標示。
  • [1:13:37] 醫學影像領域還有其他多項專案正在進行。

橫跨科學與物理學的應用

  • [1:13:47] 在科學與物理、生物資訊學及其他領域有許多應用,講者表示之後會再回來討論。

深度學習的奧祕

缺乏完整的理論

  • [1:14:00] 深度學習仍充滿奧祕:人們已有一些理解,但沒有涵蓋一切的完善理論,包括為何這些方法效果如此之好。

為何需要超過兩層

  • [1:14:16] 理論學家長久以來主張任何函式只需兩層就能逼近,因此他們質疑為何需要更多層。

卷積網路的特殊之處

  • [1:14:29] 卷積網路利用了自然影像及其他自然訊號(如語音)的組合性,不過講者坦承這個解釋似乎有點牽強。

在非凸目標下仍能訓練

  • [1:14:45] 儘管最小化的目標函式非常非凸、可能有許多局部最小值,訓練為何仍能成功至今仍不清楚。
  • [1:14:52] 從未實驗過神經網路的批評者反對說,無法保證演算法會收斂,使這個方法令人害怕而不敢使用。

過度參數化與統計建議的對比

  • [1:15:10] 神經網路訓練似乎打破了統計教科書的規則:有 n 個資料點時,參數不應超過 n 個,否則會嚴重過擬合。
  • [1:15:41] 神經網路經常以數億個參數在生產環境中訓練與部署,遠多於訓練樣本數,卻依然有效。

深度學習的當前能力與限制

深度學習今日的實際應用

  • [1:15:59] 今日的深度學習促成了更安全的車輛、更好的醫學影像分析系統,以及雖遠非完美但實用的語言翻譯。
  • [1:16:13] 目前的應用還包括講者所稱的笨聊天機器人,以及非常出色的資訊搜尋、檢索與過濾。
  • [1:16:19] Google 與 Facebook 完全圍繞深度學習建構,少了它就會崩解。
  • [1:16:28] 深度學習在能源管理與生產、製造及環境保護方面也有許多應用。

智慧機器仍欠缺什麼

  • [1:16:34] 我們目前還沒有真正智慧的機器,或具備常識的機器。
  • [1:16:39] 我們同樣缺乏智慧個人助理、智慧聊天機器人和家用機器人。
  • [1:16:45] 有許多事情我們還不知道該怎麼做,這正是研究持續進行的原因。

深度學習與學習到的表徵

什麼是表徵

  • [1:16:51] 深度學習本質上就是在學習表徵。
  • [1:17:09] 表徵會把原始資料轉換成有用的形式,理想上是以一種與任務無關的通用方式發揮作用,不過這個概念並不完全明確。
  • [1:17:28] 至少,表徵應該對你所設想的任務有用。

隨機投影與感知器

  • [1:17:44] 數十年來,人們提出過許多對自然資料進行通用前處理以產生良好表徵的想法,例如統計空間與隨機投影。
  • [1:18:06] 隨機投影大約每五年就會重新出現一次,而每次都得被駁回。
  • [1:18:15] 感知器的第一層就是一層隨機投影。
  • [1:18:21] 隨機投影是一個輸出維度小於輸入維度的隨機矩陣,後面接上某種非線性,就像一個權重隨機的單層神經網路。

極限學習機

  • [1:18:43] 人們會週期性地重新發現隨機投影,並宣稱它們很棒,因為不需要多層訓練。
  • [1:18:50] 這個想法始於感知器,並在 60 年代、1980 年代回歸,如今又再次出現。
  • [1:18:59] 一個主要位於亞洲的社群,把第一層隨機的兩層神經網路稱為「極限學習機」,講者覺得這很荒謬,但也指出它確實存在。

深度學習的階層與批評

跨模態的組合式階層

  • [1:19:27] 世界是組合式的:在視覺中,資訊從像素到邊緣,再到紋理元素、母題、部件與物件。
  • [1:19:30] 文字也遵循類似的階層,從字元到詞、詞組、子句、句子與故事。
  • [1:19:38] 語音同樣具有階層,從個別取樣、頻譜頻帶、聲音、音素、音位到詞。

對深度學習反覆出現的否定

  • [1:19:52] 許多人曾試圖否定深度學習的整個概念,而這些論點已流傳數十年,主要來自理論派人士。
  • [1:20:01] 這些否定論很可能在五年後再度出現,屆時人們會說深度學習很爛。
  • [1:20:10] 其中一種反覆出現的否定論調會問:為什麼不改用支持向量機?

核方法機器與兩層網路

支持向量機作為固定第一層的網路

  • [1:20:55] 支持向量機可視為兩層神經網路,儘管人們不喜歡這樣表述。
  • [1:21:06] 在第一層中,每個單元使用函數 K 將輸入向量 X 與其中一個訓練樣本 X^i 進行比較。
  • [1:21:26] 典型的 K 會取 X 與 X^i 的內積,並將其通過負平方的指數函數,從而給出隨距離變化的高斯響應。
  • [1:21:54] K 產生的分數會以加權和的方式合併,而學習到的參數就是這些權重,也就是 alpha 值。
  • [1:21:59] 第二層可訓練,第一層則是固定的,不過第一層可視為以非監督方式訓練,因為它只使用 X,而不使用 Y。

美化版的範本比對及其代價

  • [1:22:14] 第一層以最簡單的方式使用資料:它儲存每一個 X,並將每一個都用作某個神經元的權重。
  • [1:22:44] 這個方法基本上就是美化版的範本比對,因為它將輸入向量與所有訓練樣本進行比較。
  • [1:22:54] 它對使用原始影像的電腦視覺效果不佳:以一百萬張 ImageNet 影像為例,每張影像都必須與一百萬張影像比較,這非常昂貴。
  • [1:23:19] 比較本身基本上就解決了問題,而最後的加權和其實只是錦上添花。

通用近似與理論派的反對意見

  • [1:23:29] 定理顯示,只要調整 K 函數與 alpha 值,任何函數都能被近似到任意精確的程度。
  • [1:23:39] 因此,理論派人士可能會問:既然核方法機器能近似任何函數,為何還需要深度學習?
  • [1:23:50] 然而,加總中的項數可能非常龐大,而且沒有人指明該使用哪個核函數,因此這並沒有解決問題。

兩層神經網路與深度的代價

  • [1:24:01] 在兩層神經網路中,第一層對矩陣 W^0 與輸入向量的乘積套用非線性函數 F,第二層則乘以第二個矩陣,並將結果通過另一個非線性函數。
  • [1:24:16] 在某些條件下,只要中間向量夠大,這種由兩個線性與非線性運算組成的組合就能近似任何函數。
  • [1:24:31] 若第一層輸出的維度夠高——甚至可能無限大——只要讓這一層趨近無限大,任何函式都能被逼近到任意精確的程度。
  • [1:24:43] 理論學家可能會問,既然兩層就能逼近任何東西,為何還需要多層?但反駁的論點是,用兩層來做可能非常、非常昂貴。

邏輯電路與兩層布林函式

  • [1:25:09] 在邏輯電路設計中,只要用反及閘就能完成所有事情。
  • [1:25:25] 任何布林函式都能寫成一堆且閘,再於最上層接一個或閘,這稱為析取範式(DNF)。
  • [1:25:36] 因此任何布林函式都能用兩層來表示。

電路深度與大小的取捨

淺層電路的指數級寬度

  • [1:25:40] 對大多數函式而言,中間層所需的項數會隨輸入大小呈指數成長。
  • [1:25:48] 對於 N 個輸入位元的同位檢查,兩層電路基本上需要指數數量的閘。
  • [1:26:12] 若允許 log(N) 層,其中 N 是輸入位元數,複雜度就能降到線性。

兩步驟程式的類比

  • [1:26:28] 兩層電路就像一個被限制成兩個循序步驟的程式,其中大多數指令是平行執行的。
  • [1:26:54] 可用的指令是線性組合與非線性等簡單運算,而不是完整的子程式。
  • [1:27:10] 對大多數問題而言,第一步所計算出的中間值數量會隨輸入大小呈指數成長,只有極少數問題能避免指數數量的最小項。

循序步驟以速度換取資源

  • [1:27:25] 允許多個循序步驟能讓程式簡單許多,但執行速度較慢,同時使用更少的記憶體與資源。
  • [1:27:49] 簡單的循序二進位加法器會逐對相加位元並傳遞進位,所需時間與數字大小成正比。

進位預看與深度—面積取捨

  • [1:28:13] 電路設計者使用進位預看來預先計算進位,使加法所需的步驟遠少於 N 步。
  • [1:28:21] 進位預看的代價是電路複雜度大幅增加,以及它在晶片上所占的面積大增。
  • [1:28:35] 這說明了已知的時間與空間之間,或深度與時間之間的取捨。

定義深度學習模型中的深度

稱為深度模型的標準

  • [1:28:46] 具有一個隱藏層的兩層神經網路不被視為「深度」,即使它在技術上使用了反向傳播。
  • [1:28:52] 這種淺層網路並未真正學到複雜的表徵。
  • [1:29:01] 深度學習涉及階層的概念,而 SVM 絕對不是深度的。

流形假設與特徵表徵

自然影像作為像素空間的一小部分子集

  • [1:29:20] 流形假設主張自然資料位於高維環境空間內的低維表面上。
  • [1:29:32] 一張 1,000 x 1,000 像素的彩色影像是一個具有 3 百萬個分量的向量,然而只有極小部分的此類向量對應到自然影像。
  • [1:30:14] 將隨機像素組合成無意義影像的方式,遠多於組合成看起來自然影像的方式。

人臉影像流形的維度

  • [1:30:43] 對於一段人在白色背景前做鬼臉、頭髮不動的長影片,所有影像的集合位於一個低維表面上。
  • [1:33:31] 該人物所佔據的像素數量是表面維度的一個寬鬆上界,因為那些像素並未取遍所有可能的值。
  • [1:33:58] 該維度受臉部可獨立移動的肌肉數量所限制,約為 50 且少於 100,不含舌頭。
  • [1:34:14] 頭部傾斜與平移大約增加 6 個自由度,因此局部而言該表面具有少於 100 個參數,儘管它高度非線性。

理想的特徵擷取與解耦

  • [1:35:35] 理想的特徵擷取器會將觀測資料中可解釋的變異因子解耦。
  • [1:35:45] 每個獨立因子,例如移動臉部肌肉、移動頭部或摘下眼鏡,都是獨立的變異因子。

表徵學習與變異因子解耦

分離獨立變異因子的目標

  • [1:35:53] 光照是另一個可能改變的變異因子範例。
  • [1:36:00] 理想的表徵會個別表示這些變異因子中的每一個。
  • [1:36:06] 學習良好表徵的一項準則是找出資料中獨立且具解釋性的變異因子。

尚未解決的挑戰與最終目標

  • [1:36:18] 重點是,目前沒有人知道該怎麼做這件事。
  • [1:36:23] 這依然是表徵學習的最終目標。
  • [1:36:32] 講者表示這場演講基本上已接近尾聲。

PCA 對非線性人臉流形的限制

PCA 只適用於線性流形

  • [1:36:52] 唯有當流形是線性的,也就是當所有範例或人臉所占據的曲面是一個平面時,PCA 才能找出相關的向量。
  • [1:37:11] 在那個線性假設下,PCA 會找出那個平面的維度。
  • [1:37:18] 實務上,流形並不是線性的。

相近但不同的人臉流形

  • [1:37:29] 講者與他長得像他的長子,以相同姿勢做出相同表情的影像相對接近,即使他們並不是同一個人。
  • [1:37:41] 講者的臉平移了 20 個像素後,反而比他兒子的臉離他自己的臉更遠。
  • [1:37:58] 講者的臉位於一個複雜的流形上,而他兒子的臉則位於一個略微不同、且與之不相交的流形上。
  • [1:38:06] 這兩個流形彼此之間的距離,比任一個流形內任兩個樣本之間的距離都還要近,所以 PCA 基本上什麼也告訴不了你。

頭部旋轉作為圓形流形

  • [1:38:20] 這個曲面不是平面的第二個原因,是講者把頭轉了整整 360 度所形成的一維流形。
  • [1:38:38] 那個流形在拓撲上等同於一個圓,所以它不是平的、也無法被對齊,PCA 不會找到它。

免裝外掛讀取附時間戳記的現有字幕,匯出 TXT、SRT 或 Markdown。免費 YouTube 字幕擷取工具。

前 3 段雙語對照預覽 · 免消耗額度

以下展示前 3 段已儲存繁體中文譯文與英文原版字幕的逐段對照(零額度消耗):

[0:00]

好,首先,我得做個很糟的告解。這門課其實不是由我來帶,而是由這兩位:Alfredo Canziani 和 Mark Goldstein,他們的名字在這裡[指向投影片]。他們是助教,你們跟他們交談的機會會比跟我多得多。這是第一件事。我必須做的另一個告解是,如果你們對這門課有問題,不要在課程結束時才問,因為我下課後得馬上趕去搭飛機。不過那可以等到下週再說。好,那我們就直接開始吧。

OK, so first of all, I have a terrible confession to make. This class is actually being run not by me, but by these two guys: Alfredo Canziani and Mark Goldstein, whose names are here [points to slide]. They are the TA'S and you'll talk to them much more often than you'll talk to me. That's the first thing. The other confession I have to make is that if you have questions about this class, don't ask them at the end of this course because I have to run right after the class to catch an airplane. But that can wait until next week. OK, so let's start right in.

[0:35]

一些非常基本的課程資訊。如你所見,這裡有一個網站。我會盡力把投影片的 PDF 檔放到網站上。通常大概會在講座前,可能就在講座前幾分鐘。不過,應該在你到教室之前就會放上去,或者至少在我到教室之前。我將在週一晚上教授九堂課。另外,每週二晚上還有一堂實作課,之後會由 Mark 來帶領。所以,他們會討論一些實作問題。一些數學方面的複習,也就是這門課所需的數學,以及基本概念。一些關於如何使用 PyTorch 和各種其他軟體工具的教学。

Some very basic course information. There is a website as you can see. I will do what I can to post the PDF of the slides on the website. Probably just before the lecture, probably just a few minutes before the lecture, usually. But, but it should be there by the time you get to class, or at least by the time I get to class. There's going to be nine lectures that I'm going to teach, on Monday evenings. There is also a practical session every Tuesday night that further on Mark will be running. So, they'll go through some of the, you know, practical questions. Some, you know, refreshers on sort of math, you know mathematics that are necessary for this, and basic concepts. Some tutorials on how to use PyTorch and various other software tools.

[1:24]

另外還會有三位客座講者。客座講者的名單尚未定案。但主題會是像自然語言處理、電腦視覺、自監督式學習之類的內容。會有一次期中考,至少我們認為會有。它會佔用其中一堂課的時間,大概在三月左右。評量會以期中考和期末專題來進行。

And there's going to be three guest lectures. The names of the guest lectures are not finalized. But it's gonna be on topics like natural language processing, computer vision, self-supervised learning, things like that. There's going to be a midterm exam, or at least we think there is. And it's going to take one of those sessions, you know, around March. And the evaluation will be done on the midterm and on a final project.

[0:00] 好,首先,我得做個很糟的告解。這門課其實不是由我來帶,而是由這兩位:Alfredo Canziani 和 Mark Goldstein,他們的名字在這裡[指向投影片]。他們是助教,你們跟他們交談的機會會比跟我多得多。這是第一件事。我必須做的另一個告解是,如果你們對這門課有問題,不要在課程結束時才問,因為我下課後得馬上趕去搭飛機。不過那可以等到下週再說。好,那我們就直接開始吧。

[0:35] 一些非常基本的課程資訊。如你所見,這裡有一個網站。我會盡力把投影片的 PDF 檔放到網站上。通常大概會在講座前,可能就在講座前幾分鐘。不過,應該在你到教室之前就會放上去,或者至少在我到教室之前。我將在週一晚上教授九堂課。另外,每週二晚上還有一堂實作課,之後會由 Mark 來帶領。所以,他們會討論一些實作問題。一些數學方面的複習,也就是這門課所需的數學,以及基本概念。一些關於如何使用 PyTorch 和各種其他軟體工具的教学。

[1:24] 另外還會有三位客座講者。客座講者的名單尚未定案。但主題會是像自然語言處理、電腦視覺、自監督式學習之類的內容。會有一次期中考,至少我們認為會有。它會佔用其中一堂課的時間,大概在三月左右。評量會以期中考和期末專題來進行。

[1:58] 而且,你們可以,你知道的,以兩人為一組。我們是說兩人還是三人,還是只有兩人?我們還沒決定,再看看。專題大概會跟自監督式學習和自動駕駛的結合有關。我們正在跟各方人士討論資料之類的事情。好,讓我稍微談一下,這第一堂課真的會是對深度學習究竟是什麼、它能做什麼、不能做什麼的廣泛介紹。

[2:33] 所以它會作為整個課程的介紹。因此,我們會走過整門課的脈絡,如果你想這麼說的話,但是用非常淺顯的方式,讓你們對我們所談的所有主題有個廣泛的高層次概念。而每當我談到某個特定主題時,你們就會看到它落在這整個圖像中的哪個位置。但在那之前……這門課有一個先修要求,那就是:你需要對機器學習有一定程度的熟悉,或者至少具備機器學習的基本概念。

[3:04] 在座有誰玩過 PyTorch、TensorFlow,訓練過神經網路?好。有誰沒做過?別害羞,好嗎。好?所以大多數人都做過。這很好。但我不會假設你們對這一切都瞭若指掌。特別是,我不會假設你們懂很多那些,你知道,比較深的底層技術。好,所以這是課程規劃,視你們告訴我的情況,我可以調整,比如你們覺得某些部分太顯而易見、因為以前玩過,我就可以講快一點,或者其他之類的。

[3:52] 所以是監督式學習、神經網路、深度學習的簡介。這就是我今天要講的。深度學習能做什麼、不能做什麼、什麼是好特徵。深度學習就是在學習表徵。這就是我要講的。下週會講反向傳播和基本架構元件。比如說,你用模組搭建神經網路、把它們互相連接起來。然後你計算梯度、得到自動微分。然後這些各種類型的架構、損失函數、激活函數——你知道,不同的模組。還有權重共享和權重綁定、乘法交互、注意力閘控之類的技巧,對吧。

[4:33] 然後是特定的宏觀架構,像是專家混合、孿生網路、超網路等等。所以我們會很快深入,如果你已經玩過其中一些東西,這樣很合適。然後會有一到兩堂課——我還沒完全決定——關於卷積網路及其應用。其中一堂可能會是客座講座。然後,更具體地,關於在特殊情況下有用的深度學習架構。

[5:06] 所以像是隨時間反向傳播的循環神經網路,這是訓練循環神經網路的方式。還有……還有……循環神經網路在控制、產生時間序列之類的應用。然後是結合循環和閘控以及乘法交互的東西,像是閘控循環單元和 LSTM。然後是真正把乘法交互當作架構基礎的東西,像是記憶網路、transformer、適配器等等,這些是最近非常流行、在 NLP 和其他領域極受歡迎的架構。然後稍微講一點圖神經網路,這個我不會講太多,因為有另一門課是 Joan Bruna 開的,他花很多時間在圖神經網路上。

[6:06] 接著……接著我們會談到如何讓這些深度學習系統運作起來。以及讓它們運作起來的各種技巧。大致上就是理解神經網路中發生的那類最佳化。所以……那類……你知道,我們……我們當然會用到——學習幾乎總是關於最佳化。而深度學習幾乎總是關於基於梯度的最佳化。而且在凸的情況下,關於最佳化有一些規則是被充分理解的。

[6:40] 但當訓練是隨機的時候,這些規則就不被充分理解了,而這正是大多數深度學習系統的情況。而且它們在深度學習中也不太被充分理解,因為成本函數不是……不是凸的。它有局部極小值、鞍點之類的東西。所以理解目標函數的幾何結構很重要。我說很重要,但這裡最大的秘密是,其實沒有人真正理解。所以……重要的是要理解沒有人理解這件事。好嗎?但有一些技巧是透過直覺、一點點理論分析,以及經驗搜尋的組合而出現的。像是初始化技巧、正規化技巧,以及像 dropout 這樣的正則化技巧。

[7:29](梯度裁剪比較偏向最佳化。)像是動量、平均 HDD、各種平行化 HDD 的方法。其中許多都行不通。然後還有一個稍微奇特的東西,叫做目標傳遞(target prop),以及反向傳播的拉格朗日表述。接著我會轉到我最喜歡的主題,也就是能量基礎模型。所以這算是對許多不同學習方法的一種通用表述——無論它們是監督式、非監督式、自監督式。以及它們是否涉及像推論這樣的東西。

[8:04] 就像,你知道,搜尋那些沒有人告訴你數值的變數的值,但你的流程、你的系統應該要推論出來。所以這可以想成一種用神經網路實作推理的方式。所以你可以把神經網路中的推理想成一個流程,其中你有某個能量函數,正對某些變數進行最佳化。而你在這個最佳化結果中得到的值,就是你試圖尋找的那些變數的值。所以,有一種常見的看法認為神經網路就是一個函數,它根據輸入計算出輸出。所以你只要跑過神經網路,就會得到一個輸出。

[8:43] 但這是一種相當受限的推論形式,因為給定一個輸入,你只能產生一個輸出。然而,給定一個輸入,往往會有多個可能的答案。那麼,你要如何表示這類有多個答案、多個可能答案的問題呢?其中一種解答是:讓這些答案成為某個能量函數的極小值,而你的推論演算法會找出能最小化這個目標函數的變數值。而且可能會有多个極小值。這意味著你的模型可能會對給定的一個輸入產生多個輸出。好嗎?

[9:21] 所以,能量基礎模型就是做到這件事的一種方式。這類能量基礎模型的一個特例是機率模型:像是你熟悉的貝氏方法、圖形模型、貝氏網路之類的東西。能量方法則稍微更一般化一些,也就是說比較不那麼特定。所以它的特例包括人們以前稱為結構預測的東西。然後,這在所謂的自監督式學習中有很多應用。而那會是接下來幾堂課的主題。所以,自監督式學習是現今一個非常非常活躍的研究主題。

[9:57] 而且這很可能在未來會變得真正佔據主導地位。它已經……在一年之內,它已經在自然語言處理領域佔據主導地位。而在過去幾個月,僅僅三個月內,就有幾篇論文顯示自監督式學習方法其實在電腦視覺之類的領域也運作得非常好。所以我的猜測是,我的猜測是……自監督式學習將會征服全世界。在接下來幾年內。所以我認為在這門課裡聽到相關內容是很有用的。像是——我不打算把這些一一細數——但有些東西你可能聽過:像是變分自編碼器、去噪自編碼器、BERT,也就是你知道的那些為自然語言處理訓練的 transformer 架構。它們是用自監督式學習訓練的,而且它們是去噪自編碼器的一個特例。

[10:45] 所以,這些東西你可能有聽過,卻沒意識到它們其實都算是同一類——都可以放在這種以能量為基礎的方法脈絡下來理解。這也包含了生成對抗網路(GAN),我相信很多人聽過。接著還有自監督學習,以及更進一步的發展。那麼,我們要怎麼讓機器真正變得非常聰明?它們現在還不是超智慧,也還不算很聰明。它們能把非常狹窄的問題解得很好,有時甚至達到超越人類的表現。但沒有任何機器具備常識。而我們目前最聰明的機器,常識大概還不如一隻家貓。所以,我們要怎麼先達到貓的智慧水準,然後也許再達到人類的智慧水準?

[11:29] 我不假裝自己知道答案,但我有一些想法,在自監督學習的脈絡下討論起來很有意思。我已經有一些應用。有問題嗎?這就是這門課的規劃。好,它可能會動態調整。但至少,這是目前的構想。有問題嗎?……好……[學生提問:這門課也會有作業嗎?] 對,對,會有作業。

[12:00] [……聽不清楚……] 好,所以剛才沒聽到 Alfredo 說話的人,因為他講得不大聲:期末專題實際上會是各組之間的競賽。所以會有排行榜之類的東西。而為了準備這個,作業基本上就是練習,讓你熟悉深度學習整體會用到的各種技術,尤其是期末專題會用到的。

[12:46] [期中考也是。] 對,期中考顯然也是。好,所以你們大多數人可能知道——對一些已經玩過這些東西的人來說,這大概會有點無聊——但我們就從基礎開始。深度學習的靈感來自人們對大腦的觀察,但這種啟發就只是啟發。它並不是要複製大腦,因為大腦有很多細節無關緊要,而我們也不知道它們是否真的與人類智慧有關。所以這種啟發是在概念層次上的。

[13:18] 而且,這跟飛機受到鳥類啟發有點像。但鳥類和飛機飛行的基本原理基本上相同,細節卻極為不同。牠們都有翅膀。牠們都透過在空氣中推進自己來產生升力,但你知道,飛機沒有羽毛,也不會拍動翅膀。所以概念上有點類似。而這段歷史可以追溯到一個幾乎已經消失、或者至少現在已經改名的領域,叫做控制論。如果你想找一位控制論歷史的專家,他就坐在那裡:Joe Lemelin。你可以舉個手嗎?

[13:57] 所以,Joe 其實是哲學家。他對——他其實開了一門研討課,算是關於 AI 的歷史。這是在哪個系?[Joe:媒體、文化與傳播。] 媒體、文化與傳播。所以不是資工系。他對控制論的歷史可說是無所不知。所以這始於 40 年代,由兩位先生開始:McCulloch 和 Pitts。他們的照片在右上角這裡。他們提出了這樣的想法:你知道,當時的人們對邏輯很感興趣,但神經科學在當時還是個非常新興的領域。

[14:32] 而且,他們想到,如果神經元基本上就是開或關的閾值單元,那麼把神經元彼此連接起來,你就能建構布林電路,基本上就能用神經元進行邏輯推論。所以他們說:大腦基本上就是一部邏輯推論機器,因為神經元是二元的。而這個想法——所以這個想法是,神經元會計算其輸入的加權總和,然後把加權總和與閾值比較。如果高於閾值就開啟,低於閾值就關閉。

[15:05] 這算是對真實神經元運作方式的一種簡化觀點——一種非常、非常簡化的觀點。那個模型在該領域沿用了數十年。將近四十年。其實是整整四十年。然後,你知道,幾乎同時地,Donald Hebb 提出了這樣的想法:大腦中的神經元——這是個古老的想法,大腦透過改變神經元之間稱為突觸的連接強度來學習。於是你有了現在所謂的 Hebbian 學習的概念,也就是如果兩個神經元一起放電,那麼連結它們的連接就會增強。如果它們不一起放電,也許就會減弱。

[15:50] 那不是學習演算法的構想,但或許算是個初步的想法。接著,控制論是由這位 Norbert Wiener 提出的,他就在這裡。[右下] 這就是整體的概念:只要系統具有某種感測器和致動器,就能形成回饋迴路,並擁有自我調節的系統。那麼,這背後的理論是什麼?我們現在對此已習以為常。但這個概念是,比如說:你開車的時候,轉動方向盤,就會有一個所謂的 PID 控制器,依照你轉動方向盤的幅度來實際轉動車輪。

[16:36] 這是一種回饋機制,基本上會測量方向盤的位置,並測量車輪的位置。然後,如果兩者之間有差異,就會校正車輪,使其與方向盤的朝向一致。這就是回饋機制。它的穩定性以及相關規則,基本上都源自這項研究。這引領了一位名叫 Frank Rosenblatt 的先生,構想出透過修改非常簡單的神經網路權重來進行學習的演算法。你在下方看到的兩張圖片[左下]:這是 Frank Rosenblatt,而這是感知器(Perceptron)。這是一台實體的類比電腦。它可不是現在那種三行的 Python 程式。

[17:24] 它是一台巨大的機器,有著線路和光學感測器,讓你可以給它看圖片。解析度非常低。然後它有——它有能夠計算加權總和的神經元,而權重可以調整。權重是電位器。電位器上裝有馬達,因此可以為了學習演算法而旋轉。所以它是機電式的。他手上拿的是一個包含八個權重的模組(你可以數一數),上面裝著那些電位器,也就是電動電位器。

[18:02] 好,以上就是神經網路起源的簡短歷史。另一段有趣的歷史是,這種透過模擬神經元網路來打造智慧機器的整體構想,誕生於 40 年代,在 50 年代末期稍微起飛,然後在 1960 年代、1960 年代末期徹底消亡,因為人們意識到,以當時人們提出的學習演算法和架構,根本做不了什麼事。你可以做一些基本的、非常簡單的模式辨識,但也就僅此而已。

[18:36] 所以大約在 1969 到 1968 之間,或者說 1984 左右,我會說,基本上全世界沒有人在做神經網路,除了一些孤立的研究者,大多在日本。日本在資助研究方面算是一個相對孤立的生態系。人們不會跟隨同樣的……潮流,如果你要這麼說的話。然後這個領域大約在 1985 又起飛了,隨著反向傳播(backprop)的出現。所以反向傳播是一種訓練多層神經網路的演算法,你們很多人應該都知道。

[19:20] 人們在 60 年代就在尋找這樣的東西,但基本上找不到。他們找不到的原因是他們用錯了神經元。他們用的是麥卡洛克-皮茨神經元,那是二元的。要讓反向傳播運作,得使用連續、可微的啟動函數,或者至少是連續的。而人們就是沒有……你知道,使用連續神經元的想法。所以他們不認為可以用梯度下降來訓練那些系統,因為那些東西不可微。

[19:56] 現在這還有另一個原因,就是如果你有一個使用二元神經元的神經網路,你永遠不需要計算乘法。你永遠不需要把兩個數字相乘。你只需要把數字相加,對吧。如果你的神經元是活躍的,你就把權重加到加權和上。如果它不活躍,你什麼都不做。如果你有連續神經元,你就需要把神經元的啟動值乘以權重,才能得到對加權和的貢獻。結果是,在 1980 年代之前,在任何不是荒謬地昂貴的電腦上把兩個數字相乘,尤其是浮點數,都極其緩慢。所以基於這個原因,當時有動機不去使用連續神經元。

[20:34] 所以反向傳播之所以沒有在 80 年代中期之前出現,是因為那正是電腦變得夠快、基本上能夠做浮點數乘法的時候。人們並不是這樣想的,但那是,你知道,事後回顧來看,基本上就是這麼回事。所以,在 1985 到 1995 之間出現了一波對神經網路的興趣熱潮——持續了大約 10 年。在 1995,它又死了一次。機器學習界的人基本上放棄了使用神經網路的想法。

[21:05](原因我現在先不細談。)那情況一直持續到2000年代末、2010年初。所以大約在2009/2010左右,人們發現可以用多層神經網路、以反向傳播訓練,並在語音辨識上獲得改善。這一切並非始於 ImageNet,而是始於語音辨識,大約在2010。而在這方面首批論文發表後的18個月內,語音辨識領域的每個主要廠商都已部署了使用神經網路的商用語音辨識系統。所以,如果你當時有 Android 手機,並在2012左右使用 Android 手機上任何使用神經網路的語音辨識功能,那大概就是現代深度學習形式首次真正、真正大規模的部署——如果你要這麼說的話。

[21:55]然後在2012年底/2013年初,同樣的事也發生在電腦視覺領域,電腦視覺社群意識到深度學習、尤其是卷積網路,比他們之前所用的任何方法都好得多,於是開始改用商用網路,基本上捨棄了所有先前的技術。這就造就了第二場革命,這回是在電腦視覺領域。接著三年後,大約在2016左右,同樣的事也發生在自然語言處理——在語言翻譯之類的事情上:2015/16。

[22:28]而現在我們將看到——這還沒發生——但我們將看到同樣的革命發生在機器人學、控制,以及你知道的,一整個系列的應用領域。但讓我講到這一點:好。所以,你們一定都知道什麼是監督式學習。而這確實是絕大多數——不是絕大多數——90幾個百分點的深度學習應用,把監督式學習當作主要方法。所以監督式學習就是這樣一個過程:你收集一堆輸入與輸出的配對,例如影像連同類別(如果你想做影像辨識),或是一堆音訊片段連同它們的文字轉錄:一堆某種語言的文字連同另一種語言的轉錄,等等。

[23:22],然後你餵一個範例給機器。它會產生一個輸出。如果輸出正確,你什麼都不用做,或者不用做太多。如果輸出錯誤,你就調整機器的參數。(把它想成某種參數化的函式。)然後你調整那個函式的參數,讓輸出更接近你想要的結果。好,這就是監督式學習的非技術性說法。給它看一張車子的圖片,如果系統沒說出車子,就調整參數。神經網路裡的參數就是權重,你知道的,就是在那些模擬神經元裡計算加權總和的那些權重。

[24:03]調整旋鈕,讓輸出更接近你想要的那個。神經網路的訣竅在於:你要怎麼判斷該往哪個方向、調整多少,才能讓輸出更接近你想要的結果?這就是梯度計算和反向傳播在做的事。但在講這個之前,再稍微回顧一下歷史。當時湧現了一大批模型,都是用於分類的基礎模型。你知道的,從感知器開始,還有另一個競爭模型叫 Adaline,就在這裡的右上角。它們基於同類型的基本架構:計算輸入的加權總和並與閾值比較。如果高於閾值就開啟,如果低於閾值就關閉。

[24:45]你看到的這個 Adaline,Bernie Widrow 正在調整的東西,其實又是一台實體的類比電腦。所以它跟感知器一樣,但在許多方面都小得多。我告訴你這件事的原因是,感知器其實是一個兩層神經網路,一個第二層可訓練的兩層神經網路,具有自適應權重。但第一層是固定的。事實上,大多數時候、大多數實驗中,它是隨機決定的。你會把影像的輸入像素隨機連接到神經元,那些神經元基本上就是帶有隨機權重的閾值神經元。

[25:27]這就是他們所謂的聯想層。而這基本上成了接下來四十年間模式識別系統概念設計的基礎。我想說四十年。對,差不多就是這樣。所以,那個模型就是這樣運作的:你取一個輸入,讓它通過一個特徵提取器,這個提取器應該要提取出輸入中對任務有用的相關特徵。

[26:01] 所以,你想要辨識人臉?你能偵測眼睛嗎?你要怎麼偵測眼睛?嗯,某處大概會有個深色圓圈。諸如此類的東西,對吧?你想辨識車子,你知道的。嗯,它們算是某種深色、圓形的東西,等等。所以,這裡的問題是——這個特徵提取器產生的是一個特徵向量,這些特徵可能是數值,也可能是開或關。好,所以它就只是一串數字,一個向量。而你要把這個向量餵給可訓練的分類器。以感知器或簡單神經網路來說,它就只是計算加權和、再與閾值比較的系統。

[26:41] 問題在於你必須手工設計特徵提取器。所以整個圖形辨識的文獻(至少是統計圖形辨識)以及大量電腦視覺的研究(至少是電腦視覺中對辨識感興趣的那部分)都聚焦在這個部分:特徵提取器。你要如何為某個特定問題設計特徵提取器?比如說,你想做韓文字元辨識好了。辨識韓文有哪些相關特徵?你要如何用各種演算法技巧把它們提取出來?你要如何前處理這些影像?你知道的,你要如何將它們的尺寸正規化?諸如此類的事情。

[27:16] 你要如何將它們骨架化?你要如何將它們從背景中分割出來?所以整個文獻都投入在這個[特徵提取器]上,投入在[可訓練分類器]上的卻少之又少。而深度學習帶來的,就是這樣一個想法:與其採用這種兩階段的圖形辨識流程,其中一個階段是手工打造的,輸入的表示本質上是某個手工設計程式的產物。

[27:48] 深度學習的想法是你端到端地學習整個任務。好,所以基本上你就是把你的圖形辨識系統,或任何你想用它來做的事,建構成模組的串接或序列。所有這些模組都有可調參數。它們全都有某種非線性。然後你把它們堆疊起來,堆疊多層,這就是為什麼它叫做深度學習。所以深度學習中「深度」這個詞的唯一理由,就是它有多層。除此之外別無其他。

[28:20] 接著你把整個東西端到端地訓練。所以這裡的複雜之處,當然就在於第一個方塊裡的參數:你要怎麼知道該如何調整它們,讓輸出能——你知道的,更接近你想要的輸出?這就是反向傳播為你做的事。好,為什麼所有這些模組都必須是非線性的?因為,如果你有兩個相繼的模組,而它們都是線性的,你就可以把它們合併成單一的線性。對,兩個線性函數的乘積,或者兩個線性函數的合成,是一個線性函數。取一個向量乘以一個矩陣,然後再乘以第二個矩陣。

[28:59] 這就好像你預先算好了那兩個矩陣的乘積,然後把輸入向量乘以那個合成矩陣。所以,如果那些層是線性的,多層就沒有意義。好,其實是有意義的,但只是很小的意義。所以,既然它們必須是非線性的,你能想像出最簡單、具有可調參數——像是神經網路中的權重——而且是非線性的多層架構是什麼?

[29:38] 你很快就會發現它必須長得像這樣:所以……取一個輸入。輸入可以表示成一個向量,對吧。一張影像就只是一串數字。把它當成向量來看,暫時忽略它是影像這件事。一段音訊,無論你的感測器或資料集給你的是什麼,都是一個向量。把這個向量乘以一個矩陣。這個矩陣裡的係數就是可調參數。然後取結果向量,對——當你把矩陣乘以向量時,你會得到一個向量。

[30:15] 把這個向量的每個分量通過一個非線性函數。而且,如果你想要最簡單的非線性函數,就用這裡上方所示的東西 [ReLU(x) = max(x, 0)],神經網路領域的人稱之為 ReLU;工程領域的人稱之為半波整流;數學領域的人稱之為正部。你想怎麼稱呼都行,好。所以,把這個非線性函數套用到由輸入向量乘以矩陣所得向量的每一個分量上。

[30:47] 好。現在你得到一個新的向量,裡面有很多零,因為每當加權總和小於零時,經過 ReLU 之後輸出就是零。然後重複這個過程:拿那個向量,乘上一個權重矩陣;把結果通過逐點非線性;拿結果,通過——乘上一個矩陣——把結果通過非線性。這基本上就是一個基礎的神經網路。好,那為什麼它會被叫做神經網路呢?這是因為當你拿一個向量,把向量乘上一個矩陣,要計算輸出的每一個分量時,你其實是在計算輸入各分量、由矩陣中對應的那一列所加權的加權總和,對吧。所以這裡這個小符號——有一堆向量的分量,進入這一層。然後,你取矩陣的一列,計算那些數值的加權總和,其中權重就是

[31:51] 該矩陣那一列中的數值,這就給你一個加權總和。你對每一列都這麼做,就得到結果,對吧。所以,乘上矩陣之後的單元數量,會等於你矩陣的列數。而矩陣的行數,當然,必須等於輸入的大小。好。那麼監督式學習——用比我先前展示的更正式一點的說法——就是這樣一個概念:你要拿系統產生的輸出……

[32:26] 所以,對,你輸入一個輸入,讓它跑過神經網路,得到一個輸出。你要把這個輸出和目標輸出做比較。你會有一個目標函數、一個損失模組,用來計算距離、差異、懲罰——你想怎麼稱呼都行。散度——好,這東西有各種名稱。然後你要計算它的平均值。所以這個成本函數的輸出是一個純量,對吧。

[32:56] 它計算距離,例如目標向量和神經網路產生的向量、深度學習系統產生的向量之間的歐幾里得距離。然後你可以計算這個成本函數的平均值,它就只是一個純量。你要在訓練集上對它取平均,對吧。所以,訓練集是由一堆輸入與輸出的配對所組成;在訓練集上計算這個的平均值。你想就系統的參數(那些可調的旋鈕)最小化的函數,就是那個平均值。好。所以,你想找到參數的值,使得你想要的輸出和你得到的輸出之間的平均誤差最小,而這個平均是在一組訓練樣本上取的。

[33:47] 所以……我相信在座絕大多數人,至少對梯度下降有直覺上的理解。基本上,要最小化這個函式的方法,就是計算梯度,對吧。這就像你身處一座山中,在山裡迷了路(而且是一座非常平滑的山),但四周有霧、又是夜晚,而你想走到山谷裡的村莊。所以,你能做的最好辦法就是轉過身,看看哪個方向是下坡,然後朝最陡下降的方向踏出一步。

[34:22] 好。所以,這種尋找下坡方向的過程,就叫做「計算梯度」,或者嚴格來說,是負梯度。好,接著你往下踏一步。這就是朝負梯度方向踏出一步。如果你一直這麼做,而且步伐夠小——小到當你踏出一步時,不會跳到山的另一側——那麼,最終你會收斂到山谷,前提是這個山谷是凸的。這是什麼意思?意思是如果中間沒有那種湖泊、沒有山中的湖泊,也就是說,沒有那種局部極小值讓你卡在那裡——山谷也許更低,但你卻看不到。

[35:03] 好。所以這就是為什麼凸性作為一個概念很重要。但這裡還有另一個概念,也就是隨機梯度的概念,我相信你們很多人也聽過。我之後會更詳細地再談這個。你所計算的目標函式,是對許多許多樣本取平均。你可以透過對整個訓練集取平均,來計算整個訓練集上的目標函式及其梯度。

[35:37] 但事實證明,更有效率的做法是只取一個樣本,或一小組樣本,計算這個樣本所造成的誤差,然後計算該誤差對參數的梯度,並踏出一步。一小步。接著新的樣本進來——你會得到另一個誤差值,以及另一個梯度值,而這個梯度可能指向不同的方向,因為它是不同的樣本。然後朝那個方向踏出一步。如果你一直這麼做,你就會沿著成本曲面往下走,但會是以一種帶有雜訊的方式——會有很多波動。

[36:16] 所以這裡展示的就是一個例子。這是將隨機梯度應用在一個非常簡單的二維問題上,其中你只有兩個權重。而且它看起來有點半週期性,因為範例總是以相同的順序出現,而這並不是使用隨機梯度時該做的事。但如你所見,這條路徑非常不規則。為什麼人們會用這個?有各種原因。其中一個原因是,從經驗上來說它收斂得快非常多,特別是在你有一個非常大的訓練集時。另一個原因是,你最終實際上會得到更好的泛化能力。所以如果你在另一個獨立的集合上衡量系統的效能——我假設你們都知道「訓練集」、「測試集」和「驗證集」的概念,但是——所以如果你在不同的集合上測試系統的效能,一般來說,使用隨機梯度會比實際使用真正的梯度下降得到更好的泛化能力。

[37:05] 問題是……是的。[學生提問,聽不清楚]。不。它更糟。所以計算整個資料集的完整梯度——這在運算上是可行的。我的意思是你可以做。它並不會比……你知道的……[學生評論,聽不清楚]更昂貴。它的雜訊會比較少,但會比較慢。所以讓我告訴你為什麼:我的意思是,這是我們在談到最佳化時會再討論的東西。

[37:37] 但讓我告訴你:我給你一個有一百萬個訓練樣本的訓練集。它其實是100次重複同一個訓練樣本,每次有10,000個樣本。好。所以我實際的樣本是10,000個訓練樣本。我把它複製100次,然後我聲稱,你知道的,我把它打亂了。我告訴你這就是我有一百萬個訓練樣本的訓練集。所以如果你做完整的梯度,你會把同樣的值計算一百次。你會花費比必要多一百倍的工作量。

[38:09] 在不知不覺中。好。所以這能成立只是因為重複。但它在機器學習中比較正常的情況下也成立,也就是你有一些樣本,它們之中有很多冗餘,例如非常多樣本彼此非常相似等等。所以如果有任何一種一致性——如果你的系統有能力泛化,那就意味著隨機梯度會更有效率,因為如果你不用隨機梯度,你就無法利用那種冗餘。所以這就是雜訊對你有利的一種情況。

[38:46] 好。別在意這個公式。別被嚇到,因為我們之後會更詳細地回來討論這個。但為什麼反向傳播叫做反向傳播?再次強調,這非常不正式。它基本上就是鏈鎖律的實際應用。所以你可以把之前展示給你看的那種神經網路,想成是一堆堆疊在一起的模組。你可以把它想成函數的合成。你們都知道微積分的基本規則。你知道,要怎麼計算一個函數與另一個函數合成後的導數?

[39:22] 嗯,F 與 G 合成的導數,就是 F 在 G 的 X 那一點的導數,乘以 G 在 X 那一點的導數。對吧。所以你會得到兩個導數的乘積。所以這裡也是一樣,只是這些函數不是純量函數,而是向量函數。它們以向量作為輸入,並以先前的向量作為輸出。更一般地說,其實它們以多維陣列作為輸入,並以多維陣列作為輸出,但那不重要。基本上,對於有多個輸入、多個輸出、可以視為函數的函式模組,這個鏈鎖律的推廣是什麼?對吧。

[40:06] 而且基本上,如果你就盲目地套用,規則是一樣的——就跟你套用在一般導數上的規則一樣。(只是這裡你必須使用偏導數。)你知道,你最後看到的是,如果你想計算你想要的輸出與你得到的輸出之間的差異,也就是你的目標函數的值,對網路內部任何變數的導數,那麼你就必須把導數往回傳播,並在途中把東西乘起來。

[40:37] 好。下週我們會更正式地討論這件事。現在,你只要知道它為什麼叫做反向傳播:因為它適用於多層。好,所以我之前展示的這個神經網路圖很不錯,但如果輸入其實是一張影像呢?對吧。所以,一張影像,即使是解析度相對較低的影像,通常也是,你知道,邊長幾百個像素。

[41:12] 好。那麼,假設是 256 x 256,隨便舉個例子。好,一張汽車影像:256 x 256。所以它有 65,536 個像素,再乘以三,因為它有三個 R、G、B 分量,你知道,每個像素有三個值。所以這大約是二十萬個值。好,所以你這裡的向量是一個有二十萬個分量的向量。如果你有一個矩陣要乘這個向量,這個矩陣就必須有二十萬列——。行,抱歉。

[41:50] 而取決於你在第一層有多少個單元,就會是 200,000 x,你知道,也許是個很大的數字。那是個巨大的矩陣。對吧。即使是 200,000 x 100,000。所以你在第一層有壓縮,你知道,那已經是很多——非常非常大的矩陣:數十億。所以把它想成一個完整的矩陣並不實際。如果你想處理像影像這樣的東西,你就必須對這個矩陣的結構做一些假設,讓它不會是一個完全完整的矩陣,你知道,把一切都連到一切。

[42:33] 那會不切實際。至少對許多實際應用來說是如此。所以這就是來自大腦的靈感回來的地方。在 1960 年代,上面這兩位先生:Hubel 和 Wiesel,在神經科學中有一些工作,經典的工作。他們其實因此在 70 年代贏得了諾貝爾獎。但他們的工作是從 50 年代末到 60 年代初。他們所做的是把電極插進。各種動物的視覺皮質:你知道,貓、猴子、老鼠,你知道,隨便什麼。

[43:05](我想他們很喜歡貓。)。他們試圖弄清楚視覺皮質中的神經元在做什麼。而他們發現的是——所以,首先,嗯,這是人類的大腦。但我的意思是,這張圖表來自更晚得多的時期。但所有哺乳動物的。視覺系統都以類似的方式組織。你有訊號進入你的眼睛,打在你的視網膜上。你的視網膜中有幾層神經元位於你的感光細胞前面,可以說,它們會預先處理訊號。它們會某種程度地壓縮它,因為你不能有——你知道人眼大約是一億像素。

[43:49] 所以這就像是一億像素的相機,百萬像素相機。但問題是,你不可能有一億條纖維從眼睛伸出來,因為這樣你的視神經就會這麼粗。而且你就沒辦法轉動眼睛了。所以視網膜前面的那些神經元會做壓縮。它們不是做 JPEG 壓縮,但它們會做壓縮。這樣訊號就能被壓縮到一百萬條纖維。對。你每隻眼睛都有一百萬條纖維伸出來。這讓你的視神經大約就這麼粗,也就是說,你能夠傳遞訊號並轉動眼睛。

[44:26] 這其實是演化在脊椎動物身上犯的錯誤。無脊椎動物不是這樣。無脊椎動物其實有——所以,這是個大錯誤,因為從視網膜收集資訊的線路,因為在視網膜前面處理訊號的神經元,這些線路必須——它會在視網膜前面,所以會擋住部分視野,可以這麼說。然後它們還得在視網膜上打個洞才能通到大腦。

[44:59] 所以你的視野裡有一個盲點,因為那就是視神經穿過視網膜的地方。所以如果你有這樣的相機,線路從前面伸出來,然後還得在感測器上挖個洞把線路拉回去,這實在有點荒謬。線路從後面伸出來要好得多,對吧?而脊椎動物搞錯了。無脊椎動物搞對了。所以,像魷魚和章魚,牠們的線路其實是從後面伸出來的。牠們幸運多了。不過總之。

[45:33] 所以,訊號從你的眼睛傳到一小塊叫做外側膝狀核的大腦組織,它其實在大腦下方——大約在底部的位置。它會做一些對比正規化。我們幾堂課後會再談到這個。然後,訊號再傳到大腦後方,也就是初級視覺皮質區,叫做 v1 的區域。在人類身上叫做 V1。還有一個叫做腹側階層的東西:V1、V2、V4(IT),這是一堆從後方延伸到側邊的大腦區域。而在這裡的下顳葉皮質,就是物體類別被表徵的地方。

[46:17] 所以,當你四處走動、看到你的祖母時,這個區域會有一群神經元放電,代表你的祖母。而無論你的祖母穿著什麼、處於什麼姿勢、有沒有被遮蔽等等,只要你看到祖母,那些神經元就會放電。所以這是類別層次的事物。這些現象是透過讓病患開顱數週的實驗發現的,實驗中人們插入電極,讓病患看電影,並發現已知只要珍妮佛·安妮斯頓出現在電影裡,這個神經元就會活化。而且它只對珍妮佛·安妮斯頓活化。

[47:03] 因此,基於視覺情境能夠進行模式辨識、且似乎具有這種階層式、多層結構的想法,也有另一種觀點認為視覺歷程本質上是一種前饋歷程。所以你辨識日常物體的過程非常快速,大約只需 100 毫秒。訊號從視網膜傳到顳下皮質的時間幾乎不夠。每經過一個神經元大約有幾毫秒的延遲。

[47:36] 100 毫秒內,你幾乎沒有時間讓少數幾個尖峰訊號穿過整個系統。所以沒有時間進行遞迴連結之類的處理。這並不表示沒有遞迴連結,其實有非常多,但快速的辨識似乎是在沒有它們的情況下完成的。這稱為前饋腹側路徑。而這位先生,福島邦彥,在 70 年代從 Hubel 與 Wiesel 的研究獲得靈感,在電腦上建構了一個神經網路模型,具備了分層的想法,同時也納入了 Hubel 與 Wiesel 的發現,也就是個別神經元只對視野的一小部分有反應。

[48:22] 所以他們把電極插入 V1 的神經元,發現這個 V1 的神經元只對出現在視野中非常小區域的圖樣有反應。接著旁邊的神經元會對緊鄰第一個區域的另一個區域有反應,對吧。所以神經元似乎是以所謂視網膜拓撲的方式組織,意思是相鄰的神經元對視野中相鄰的區域有反應。他們還發現,對視野中同一區域都有反應的那群神經元,似乎會對特定方向的邊緣活化。所以一個神經元會在它的感受野有邊緣、垂直邊緣時活化,旁邊那個則在邊緣稍微傾斜時活化,再旁邊那個則在邊緣稍微旋轉時活化,依此類推。

[49:09] 所以他們有這張關於 V1 的圖像,基本上就是朝向選擇性,也就是神經元會觀察局部視野,然後對朝向產生反應。而那些會對多種朝向產生反應的神經元群,會在整個視野中複製。所以這位 Fukushima 說,那我何不建立一個能做到這件事的神經網路?我不會堅持我的系統一定要擷取朝向特徵,但我會用某種非監督式學習演算法來訓練它。所以他並不是端到端地訓練他的系統。他是以某種非監督式的方式,一層一層地訓練,這部分我就不深入細節了。

[49:48] 然後他用了另一個概念,他用了那些神經元會在整個視野中複製的概念,接著他又用了 Hubel 和 Wiesel 的另一個概念,叫做複雜細胞。複雜細胞是會匯集一群簡單細胞活動的單元,而那些簡單細胞就是具有朝向選擇性的單元。它們的匯集方式是:如果一個朝向、一條有朝向的邊緣稍微移動,會活化不同的簡單細胞,但複雜細胞因為整合了所有那些簡單細胞的輸出,所以會持續活化,直到邊緣移出它的感受野。

[50:32] 所以那些複雜細胞在表徵中建立了一點平移不變性。你可以把邊緣稍微平移,而不會改變那些複雜細胞之一的活化、活動。這就是我們現在在卷積網路脈絡下所稱的「卷積」和「池化」。而這基本上就是讓我在 80 年代中期或 80 年代末期想出卷積網路的原因。所以它們基本上就是連接是局部的網路;它們會在整個視野中複製;而且你會穿插一些特徵偵測層,用池化操作來偵測那些局部特徵。我們會在三個星期後詳細討論這件事。

[51:21] 所以我不會深入每個細節。但它回收了 Hubel 和 Wiesel 以及 Fukushima 的這個想法(如果我能把游標移過去……)。基本上,一層中的每個神經元會計算輸入一小塊區域的加權和,而這個加權和會使用那些權重。但那些權重會被複製,所以一層中的每個神經元都使用同一組權重。好,這就是權重綁定或權重共享的概念。

[51:57] 所以我們用反向傳播,就能訓練出像這樣的類神經網路來辨識手寫數字。這是回溯到80年代末、90年代初的成果。而這是我當年差不多跟你一樣大、或許再大一點的時候。我在這支影片裡大約三十歲。這是我在貝爾實驗室工作時的電話號碼,現在已經打不通了,是紐澤西的號碼。我按下一個鍵,就有一個類神經網路跑在386 PC 上,搭配一張特殊加速卡,辨識那些字元,執行的類神經網路跟我剛剛給你看動畫的那個非常相似。

[52:34] 而這東西能夠辨識任何風格的字元,包括非常奇怪的風格,甚至更奇怪的風格。所以這在當時算是很新的做法,因為那時候字元辨識、或是一般的圖形辨識,還停留在這樣的模式:我們先抽取特徵,然後在上面訓練一個分類器。而這個基本上能夠訓練整個——從頭到尾學會整個任務。

[53:08] 基本上,那個類神經網路的前幾層會扮演特徵抽取器的角色,但它是從資料中訓練出來的。我們之所以用字元辨識,是因為這是當時我們唯一有資料的任務。唯一有足夠資料的任務,不是字元辨識就是語音辨識。語音辨識的實驗算是小有成果,但沒那麼成功。很快地,我們就發現可以把那些卷積網路不只用在辨識單一字元,還能辨識一群字元,也就是同時辨識多個字元。這要歸功於網路的這種卷積特性——我之後在第三講會再回來談——基本上就是讓那些系統可以直接套用到一張大影像上,然後只要它們在視野中看到、只要看到它們能辨識的形狀,就會被觸發。

[54:02] 所以基本上,如果你有一張大影像,你訓練一個卷積網路,讓它有一個小的輸入視窗,然後你把它掃過整張影像,每當它被觸發,就代表它偵測到你訓練它去偵測的物件。所以在這裡,這個系統能夠同時進行分割與辨識。在那之前,圖形辨識領域的人會寫一個明確的程式,把個別物件從背景中、以及彼此之間分離開來,然後把每個個別物件——例如字元——送給辨識器。但用這個方法,你可以同時做這兩件事。

[54:35] 你不必為此操心。你不必為它建置任何特殊的程式。所以特別是,這可以應用於自然影像,用於人臉偵測、行人偵測之類的事情。對。同樣的道理,訓練一個卷積網路來區分有臉的影像和沒有臉的影像,用數千個範例來訓練,然後拿那個視窗在影像上滑動:每當它亮起,就代表有臉。當然,臉可能比視窗還大,所以你對影像做次取樣:把它縮小,再讓你的網路滑動一次,然後再縮小一次,再讓網路滑動一次。所以現在你可以偵測各種大小的臉。

[55:15] 好。特別是你可以用這個來驅動機器人。所以這些是在深度學習變得流行之前所做的工作,好。所以這是一個例子,這裡的網路是卷積網路。它被應用於來自攝影機的影像,來自你知道的、正在行走的機器人。它試圖對每個小視窗——像是 40 x 40 像素左右,甚至更小——進行分類,判斷該視窗中的中心像素是在地面上還是障礙物,對。

[55:48] 所以它分類為在地面上的都是綠色。它分類為障礙物的都是紅色或紫色,如果是在障礙物的底部。然後你可以把這個某種程度上對應到一張地圖,就是你在上方看到的那張。然後在這張地圖中做規劃以抵達某個特定目標,再用這個來導航。所以這是兩位前博士生。右邊是 Raia Hadsell,左邊是 Pierre Sermanet,他們正在騷擾這隻可憐的機器人。

[56:20] 相當有信心機器人不會打斷他們的腿,因為他們實際上寫了程式碼並訓練了它。Pierre Sermanet 是加州 Google Brain 的研究科學家,從事機器人研究。Raia Hadsell 是機器人研究主管——DeepMind 的機器人研究總監。他們做得相當不錯。所以類似的想法可以用於所謂的語意分割。所以語意分割的概念是,你可以再次用這種滑動視窗的方法,訓練一個卷積網路,以視窗作為脈絡來分類中心像素。

[56:58] 但在這裡,它不只被訓練來分類障礙物與非障礙物,而是被訓練來分類大約 30 個類別。這是——這應該是在華盛頓廣場那條路上。這裡是華盛頓廣場公園。而且,你知道,它認得道路、行人、植物、樹木之類的——但它會在華盛頓廣場公園正中央找到沙漠,這可不太……據我所知那裡根本沒有海灘……所以它並不完美。不過在當時,這可是最先進的技術。那是當時做這類語意分割最好的系統。

[57:36] 那時候我四處奔波演講,想向人們宣揚深度學習。大約是在 2010 年左右。所以這算是深度學習革命之前的事。有一位來自以色列的教授來聽了我其中一場演講。他是個理論學家,但他真的被這項技術的潛在應用給深深吸引,而他當時正準備休假,去一家叫 Mobileye 的公司工作——那時它是以色列的一家新創公司——做的是自動駕駛。所以,在他聽完我的演講幾個月後,他就開始在 Mobileye 工作了。

[58:15] 他告訴 Mobileye 的人說——「你們應該試試這種卷積網路的东西。這效果真的很好。」那裡的工程師說——算了吧。不,我們不相信那套。我們有自己的方法。於是他就自己實作了,親自試了試,把他們所有的基準測試都打得落花流水。突然之間,整間公司都改用卷積網路了。而他們是第一家真正做出車用視覺系統的公司,你知道,能讓車子保持在高速公路上行駛,遇到行人或自行車騎士穿越時能煞停。我等一下會再回來講這個。他們基本上用的就是這項技術。

[58:54] 語意分割,跟我之前給機器人看的那個非常相似。這是一位名叫 Shai Shalev-Schwartz 的人做的。你也必須注意到,在 80 年代,人們對使用、對實作能超快速執行神經網路的特殊硬體非常感興趣。這些是實際被實作出來的幾款神經網路晶片的例子——其中有些跟我有關——但它們是由和我同一個團隊的人實作的,當時我在紐澤西的貝爾實驗室。

[59:28] 所以這在1980年代算是個熱門話題,後來當然隨著類神經網路在90年代中期逐漸沒落,大家就不再研究這個了,直到幾年前才又復甦。現在晶片產業裡晶片設計最熱門的主題就是類神經網路加速器。你去參加任何電腦架構的研討會,你知道的,晶片相關的,像是 ISSCC,那是固態電路領域的大型研討會——一半的演講都在講類神經網路加速器。

[1:00:03] 我參與過其中幾項研究。好,後來發生了一些事,就像我跟你說的,大約在2010、13、15年前後,在語音辨識、影像辨識、自然語言處理方面,而且還在持續發展。我們現在正處於其他主題的這波浪潮之中。至於發生了什麼事,我很遺憾地說,這並不是在我的實驗室裡發生的,而是和我們的朋友一起,我們從2000年代初期就和 Yoshua Bengio 與 Geoff Hinton 開始合作——我們知道深度學習運作得非常好,我們也知道整個社群因為輕忽類神經網路和深度學習而犯了錯。所以——我們當時還沒用「深度學習」這個詞,是幾年後才發明的——大約在2003或2004年左右,我們開始了一場陰謀,如果你想這麼說的話。我們聚在一起說,我們就試著去打破一些紀錄、一些資料集,發明一些新演算法,讓我們能夠訓練非常大型的類神經網路。

[1:01:03] 這樣一來,就能收集非常大型的資料集,讓我們向全世界證明這些東西真的可行,因為當時沒有人真的相信。結果這真的超乎我們最瘋狂的想像而成功了。特別是2012年,Geoff Hinton 有一位學生 Alex Krizhevsky,他花了很多時間在 GPU 上實作卷積網路,GPU 在當時算是新東西——它們並非全新,但開始變得效能非常高。所以他非常擅長這類改造,然後他們就能訓練出比以往任何人都還要大得多的類神經網路、卷積網路。

[1:01:44] 於是他們用它來在 ImageNet 資料集上訓練。ImageNet 資料集是一堆自然照片。這個系統應該要能辨識出照片中的主要物件,類別共有1,000種。訓練集有1.3百萬個樣本。這算是滿大的。所以他們做的就是建構這個非常大型、非常深的卷積網路,架構大致和我們之前的一樣,在 GPU 上實作,讓它跑了幾週。就這樣,他們以大幅差距擊敗了最佳的競爭系統。這是 ImageNet 上回溯到2010年的錯誤率。所以2010年時大約是28%的錯誤率,前5名。

[1:02:35] 所以,基本上如果正確類別不在 1,000 中的前 5 名,你就會得到一個錯誤。好,所以這算是一種溫和的錯誤衡量方式。2011 它是 25.8%,能夠做到這件事的系統其實非常、非常龐大。它有點像卷積網路,但它並沒有被訓練。我的意思是只有最後一層被訓練。然後 Geoff 和他的團隊把它降到 16.4%,而那對電腦視覺社群來說是一個分水嶺時刻。很多人說,好,你知道現在我們知道這東西行得通了。

[1:03:18] 整個社群從 2011 和 2012 基本上拒絕每一篇含有神經網路的論文,轉變到 2016 拒絕每一篇沒有卷積網路的論文。所以現在它是新的宗教,對吧。除非你以某種方式使用 ConvNet,否則你無法在電腦視覺會議上發表論文。而且錯誤率下降得非常快,你知道人們找到了各種非常巧妙的架構技巧,那些技巧多少讓這些東西運作得更好。而你在那裡會看到的是層數的膨脹。

[1:03:56] 所以我在 90 年代的卷積網路大約有 7 層,以及從 2000 年代初開始。然後 AlexNet 有,我不知道,12。然後隔年的 VGG,在那之後有 19。GoogLeNet 有我不知道多少層,因為很難弄清楚你要怎麼數。然後現在物件辨識的主力,人們所稱的標準主幹,有 50 層。它叫做 ResNet-50。但有些,你知道,有些網路大約有 100 層。

[1:04:29] 所以 Alfredo 幾年前彙整了這張圖表,顯示每個那些圓點是一個特定的網路架構。而 x 軸是你需要執行多少十億次運算來計算輸出。好,那些東西真的很大。數十億個連接。y 軸是在 ImageNet 上的 top one 準確率。所以這跟我之前給你看的效能衡量方式不同。所以最好的系統今天大約在 84 左右。

[1:05:01] 而圓點的大小是記憶體佔用量,也就是你需要儲存多少百萬個浮點數來儲存權重、權重值。現在人們非常聰明地壓縮這些東西,像是你知道對它們做量化,而且 Google、Facebook 和各種其他地方有整個團隊只專門優化和壓縮這些網路,讓它們能快速執行。因為,給你一個粗略的概念,舉例來說,Facebook 每天在其伺服器上執行卷積網路的次數是數百億次。

[1:05:44] 好。所以最佳化這個所需的運算量有極大的誘因。所以其中一個……一個原因。卷積網路之所以如此成功。是因為它們利用了自然資料的一項特性,也就是組合性。所以,組合性就是。那個。特性,藉由它。一個場景由物件組成;物件由部件組成;部件由子部件組成;子部件其實是基元的組合;而基元是輪廓或邊緣的組合,對吧,或是紋理。

[1:06:33] 而那些只是像素的組合。好,所以有這個所謂的組合階層,你知道,特定的組合。在階層中某一層的物件。形成。下一層的物件。所以如果你,某種程度上,在網路的架構中模仿這個組合階層,並讓它學習某一層中適當的。特徵組合,你知道,形成下一層的特徵,那其實就是深度學習。

[1:07:06] 好。學習表徵世界並利用世界的結構——而世界,就是這個事實:。世界中存在組織,因為世界具有組合性。一位名叫 Stuart Geman 的統計學家,他在布朗大學,說過——所以他是在某種程度上玩味愛因斯坦的名言,愛因斯坦說:關於世界最不可理解的事,就是世界是可理解的。就像,在世界所有複雜的事物中,你知道,世界可能極其複雜,複雜到我們無法理解它。

[1:07:42] 而我們至少能理解世界的一部分,這看起來像是一場陰謀。所以 Stuart Geman 對此的版本是,世界具有組合性……或者存在一位神。(因為如果世界不具組合性,你需要超自然的事物才能理解它。)所以這帶來了電腦視覺等領域的驚人進展,你知道,從你懂的,能夠不可靠地辨識,你知道,偵測人,到能夠為每個物件產生遮罩,準確的遮罩,然後甚至能判斷姿態,然後在行動平台上即時做到這件事,你知道。

[1:08:25] 我的意思是,進展可說是完全驚人,而其中大多數都基於兩大基本架構家族。這種所謂的單次物件偵測/辨識架構,叫做 RetinaNet、特徵金字塔網路。它有很多不同的名稱。或是 U-Net。然後另一種類型叫做 Mark-RCNN,兩者其實都源自 Facebook。或者,最初提出它們的人現在都在 Facebook——他們有時是在加入 Facebook 之前就想出來的。

[1:08:59] 但你知道,這些東西運作得非常好,你知道,它們能做到像這樣的事:偵測被部分遮蔽的物件,而且,你知道,為每個物件繪製遮罩。所以基本上,這是一個神經網路,一個卷積網路,輸入是一張影像。但輸出也是一張影像。事實上,輸出是一大堆影像,每個類別一張。而對每個類別,輸出該類別物件的遮罩。這些東西也能做所謂的「實例分割」。所以如果你有一大群羊,它可以告訴你,你知道,不只是這個區域是羊,而是實際挑出個別的羊,把它們區分開來,而且它會正確地數羊,然後就睡著了。

[1:09:40] 這正是你該做的事,對吧,要睡著就數羊,對吧?而深度學習很酷的地方在於,很多社群成員都接受了研究必須公開進行的整個概念。所以我們在課堂上要談的很多東西,你大概也知道,不只是發表出來,而是,你知道,連同程式碼一起發表。不只是程式碼,實際上是預先訓練好的模型,你可以直接下載並執行。

[1:10:13] 全部開源。全部免費使用。所以這真的很新。我是說,人們以前不會用這種方式做研究,尤其是在產業界。但即使在學術界,人們也不習慣散布他們的程式碼。但深度學習不知怎麼地,這場競賽有點驅使人們對研究更加開放。所以這一切有很多應用,就像我說的,你知道,自駕車。這其實是 Mobileye 的一段影片,而 Mobileye 很早就把卷積網路用在自動駕駛上。

[1:10:45] 到了 2015,他們已經設法把卷積網路硬塞進他們原本為其他用途設計的晶片上。他們把這項技術授權賣給了 Tesla。所以第一批自駕的 Tesla,我是說自駕,不是真的自駕,它們有駕駛輔助,對吧。它們能在高速公路上維持車道並變換車道——用的就是這套 Mobileye 系統。而且,這真的很酷。所以那就是一個卷積網路。它是一顆小晶片,你知道,就在,它朝窗外看,就在後照鏡後面。

[1:11:18] 從那時起——你知道,四五年前——從那時起,這類技術已被許多不同公司廣泛部署。Mobileye 現在仍被 Intel 收購,他們在那些視覺系統市場上佔有約 70 或 80 個百分點。但是,有很多公司——以及汽車製造商——使用這些東西。所以事實上,在一些歐洲國家,每一輛出廠的車,甚至是低階車,都配備了基於卷積網路的視覺系統。他們稱之為:緊急、緊急,算是先進緊急煞車系統或自動緊急煞車系統。

[1:11:56] 舉例來說,AEBS 在法國每一輛車上都有部署。它將碰撞減少了 40%。所以並非道路上每一輛車都已經配備,因為你知道人們會把車開很久。但這意味著它能拯救生命。所以這是深度學習一個非常正面的應用。另一個大的應用類別,當然是醫學影像。所以這大概是現今放射科最熱門的話題——如何將 AI(也就是卷積網路)用於放射科。這張[投影片影像]摘自我們在 NYU 這裡一些同事的論文,他們分析了 MRI 影像。所以卷積網路有一個很大的優勢:它們不需要看著螢幕來看 MRI。特別是為了能夠看 MRI,它們不必把它切成 2D 影像。

[1:12:56] 它們可以看整個 3D 體積。這是這東西所利用的一個特性。它是一個 3D 卷積網路,會看 MRI 影像的整個體積,然後產生,你知道,它使用非常類似的技術,就像我之前展示的,用於語意分割。它會產生,基本上在輸出影像上,只要那裡有某個東西就會標示出來,你知道,這裡是股骨,但你知道,也可能是——所以這就是它產生的那類結果。它在 3D 中比在 2D 切片中效果更好。或者,它可以在乳房攝影中偵測到惡性腫瘤時標示出來。(這是 2D,不是 3D。)

[1:13:37] 而且你知道,醫學影像方面還有各種其他正在進行的專案。好的。科學和物理、生物資訊學等領域有很多應用,你知道,隨便什麼,我們之後會再回來談,所以……好的。所以深度學習中有許多謎團。它們並非完全的謎團,因為人們對這一切已有一些理解,但它們之所以是謎團,是因為我們並沒有對所有事物都有個漂亮的理論。

[1:14:11] 它們為什麼運作得這麼好?所以,多年前當我試著說服全世界深度學習是個好主意時,理論學家們問的一個大問題是,他們會告訴我:嗯,你只要兩層就能逼近任何函數,為什麼還需要更多層?我待會兒會再回到這一點。卷積網路有什麼特別之處?我談過自然影像、或一般而言自然資料的組合性。這對語音以及訊號的值、自然訊號也成立。但這似乎有點牽強。

[1:14:45] 我們怎麼能夠訓練這個系統,儘管我們最小化的目標函數非常非凸。我們可能有很多局部最小值。這是當年人們對神經網路提出的一大批評,那些從沒玩過神經網路的人當年把神經網路丟到一邊。比如說,你知道,你無法保證你的演算法會收斂——你知道,這太可怕了。我不會用它。而最後一個是:為什麼我們訓練神經網路的方式打破了每一本統計學教科書告訴你的一切?

[1:15:19] 每一本統計學教科書都告訴你,如果你有 n 個資料點,你的參數就不該超過 n 個,因為你會瘋狂地過擬合。你知道,你可以做正則化。如果你是貝氏學派,你可以加上先驗。但……(這是等價的)但你有什麼保證?而用神經網路,神經網路是極度過度參數化的。我們經常訓練有數億個參數的神經網路。它們被用在生產環境中。而訓練樣本的數量遠遠不及那個數字。這怎麼運作?

[1:15:53] 但它就是行得通!好,所以我們今天能用深度學習做的事:你知道,我們可以有更安全的車;我們可以有更好的醫療分析、醫療影像分析系統;我們可以有相當不錯的語言翻譯,遠非完美,但有用;愚蠢的聊天機器人;你知道,非常好的資訊搜尋檢索與過濾。Google 和 Facebook nowadays 完全圍繞深度學習建構。你把深度學習從它們身上拿掉,它們就會崩解。

[1:16:27] 而且,你知道,能源管理和生產上有大量應用,還有各種東西;製造業、環境保護。但我們並沒有真正智慧的機器。我們沒有具備常識的機器。我們沒有智慧個人助理。我們沒有,你知道,聰明的聊天機器人。我們沒有家用機器人。你知道,我的意思是,有很多事情我們不知道該怎麼做,對吧。這就是為什麼我們還在研究。好,所以,深度學習其實是在學表徵。但其實我們應該事先知道表徵是什麼。所以我談到了模式識別的傳統模型。

[1:17:04] 但是……表徵其實是關於,你知道,你有你的原始資料,而你想把它轉換成一種有用的形式,某種程度上。理想情況下,你會想把它轉換成一種無論你想拿它做什麼都有用的形式。算是某種一般性的「有用」。好,而且這到底是什麼意思並不完全清楚。但至少,你想把它轉換成一種對你所設想的任務有用的表徵。幾十年來有很多想法,關於用某種一般性的方式來預處理自然資料,好讓你產生良好的表徵。

[1:17:54] 我不打算逐一細講這份落落長的名單。但像是統計空間、做隨機投影這些東西。所以隨機投影其實有點像,你知道,像一隻每隔幾年就會冒出來的怪物,大概每五年一次。每次牠冒出來,你就得往牠頭上敲一下。那就是感知機背後的想法。所以感知機的第一層就是一層隨機投影。那是什麼意思?隨機投影就是一個隨機矩陣,你知道,它的輸出維度比輸入維度小,最後再接上某種非線性,對吧。所以想想一個帶非線性的單層神經網路,但權重是隨機的。

[1:18:38] 所以你可以把這想成隨機投影。很多人會週期性地重新發明這個輪子,宣稱它很棒,因為你不必做多層訓練。所以它從感知機開始,然後你知道它在60年代又回來了,然後在1980年代又回來了,然後又回來了。而現在它又回來了。有一整個社群,主要在亞洲。他們把第一層是隨機的兩層神經網路叫做「極限學習機」,好。

[1:19:12] 這就像,很荒謬,但它確實存在。它們不是「極端」,我是說它們極度愚蠢,但——你知道的。對,所以我剛提到世界的組合性。就是,你知道的,從像素到邊緣到紋理元素、基元、部件、物件。在文字裡你有字元、詞、詞組、子句、句子、故事。在語音裡也一樣,你有個別樣本。你有,你知道的,頻譜頻帶、聲音、音素、詞等等。

[1:19:49] 你總是有這種階層結構。好,所以這裡有許多試圖否定整個深度學習概念的嘗試。好,第一,第一件事。這是我幾十年來聽到的說法,好——主要來自理論家,但很多人也是,你必須了解這些,因為五年後當人們說「喔,深度學習很爛」時,它們會再回來。為什麼不用支持向量機?好,所以,這裡左上角就是支持向量機。支持向量機是一個,我相信你們很多人聽過核方法和支持向量機。

[1:20:22] 誰知道這是什麼?我是說,就算只是粗略的概念也好。好,有幾隻手。誰完全不知道支持向量機是什麼?別害羞。對。對,我是說不知道也沒關係。好,就像大多數人兩邊都沒舉手。[Alfredo:請舉手,知道支持向量機的人。] 好,來,手舉高一點。酷,好。誰完全不知道這是什麼?別害羞,沒關係。[Alfredo:聽不清楚] 好,很好。

[1:20:55] 對,所以這就是支持向量機。支持向量機是一個兩層神經網路。它其實不算是神經網路,人們不喜歡這樣表述,但其實你可以這樣想。它是一個兩層神經網路,其中第一層,由這裡這個函式 K 代表,第一層的每個單元會將輸入向量 X 與其中一個訓練樣本 X^i 做比較。好,所以你拿你的訓練樣本,假設你有一千個——所以你有從 i = 1 到 1,000 的一千個 X^i,然後你有某個函式 K 會比較 X 和 X^i。

[1:21:26] 比較兩者的好函式範例是你取 X 和 X^i 的內積,然後把結果通過,比如,指數負平方之類的。所以你得到一個高斯響應,作為 X 和 X^i 之間距離的函式,好。所以這是一種比較兩個向量的方式,不管它是什麼。然後,你取這個 K 函式比較輸入與每個樣本後輸出的那些分數,並計算它們的加權和。而你要學的就是那些權重,那些 alpha。

[1:21:59] 好,所以這是一個兩層神經網路,其中第二層可訓練,第一層是固定的。但某種程度上,你可以把第一層想成是以非監督式的方式訓練的,因為它使用了訓練集的資料,但它只用了 X,沒用到 Y。它用你能想像最笨的方式來使用資料,也就是你把每一個 X 都存起來,然後把每一個 X 都當成一個神經元的權重,如果你要這麼說的話。好,這就是支持向量機。你可以為它背後那些精巧的數學寫一本上千頁的書。但重點是,它是一個兩層神經網路,第一層用非常笨的非監督式方式訓練,第二層就只是個線性分類器。

[1:22:44] 所以,它基本上就是升級版的範本比對,因為它基本上就是把輸入向量跟所有訓練樣本做比較。所以,如果你想做像用原始影像做電腦視覺之類的事,它行不通。如果 X 是一張影像,而 X^i 是來自 ImageNet 的幾百萬張影像——首先,對每一張影像,你都得跟幾百萬張影像比對,或者如果你夠聰明的話可能少一點,還有你要怎麼訓練它。那會非常昂貴,而你做的這種比對基本上就是解決問題的關鍵。你最後得到的加權和,其實只是錦上添花。

[1:23:24] 其實我太常用那個類比了。所以……你可以逼近,你可以有定理證明,只要調整 K 函數和 alpha,你就能隨心所欲地逼近任何函數,要多接近就多接近。所以,如果你去跟理論派的人談,他們會告訴你:你為什麼需要深度學習?我可以用核機器逼近任何我想要的函數。那個和式裡的項數可能非常多,而且沒有人告訴你能用什麼核函數。所以,那並沒有解決問題。

[1:24:01] 你可以用兩層神經網路,好。所以這就是右上角這個。第一層是把非線性函數 F 套用在矩陣 W^0 與輸入向量的乘積上;然後第二層再乘上第二個矩陣;然後再讓它通過另一個非線性函數。好,所以這是兩個線性與非線性運算的組合。同樣地,你可以證明在某些條件下,用這樣的東西就能逼近任何你想要的函數。前提是你中間的向量夠大。

[1:24:31] 好,所以第一層輸出的維度,如果它夠高——可能無限高——你就可以透過讓這一層趨近無限,來任意逼近任何你想要的函數,要多接近就多接近。所以同樣地,你去跟理論學家談,他們會告訴你:你為什麼需要多層?我用兩層就能逼近任何我想要的東西。但有一種論點是,用兩層來做可能非常、非常昂貴。而且……

[1:25:03] 對你們有些人來說這可能聽起來很熟悉。對大多數人來說大概不是。假設我想設計一個邏輯電路。好,所以當你設計邏輯電路時,對吧,你有 AND 閘、OR 閘,還有……或者 NAND 閘,對吧。你光用 NAND,也就是反 AND,就能做所有事,對吧。而如果你……你可以證明任何布林函數都能寫成一堆 OR 套在一堆……你知道的,一堆 AND 上面,然後最上面再套一個 OR。這叫做析取範式(DNF)。

[1:25:36] 所以任何函數都能用兩層寫出來。問題在於,對大多數函數而言,你中間需要的項數會隨輸入規模呈指數成長。所以舉例來說,如果我給你 N 個位元,要你建一個電路告訴我輸入字串裡被打開的位元數是偶數還是奇數。好,這是個簡單的布林函數:輸出是 1 或 0。如果你用兩層來做,你中間需要的閘數基本上是指數級的。

[1:26:09] 如果你允許自己用 log(N) 層來做,其中 N 是輸入位元數,那它就是線性的。好。所以如果你允許自己使用多層,你就從指數複雜度變成線性複雜度。這就好像,你知道的,當你寫程式時——我跟你說,用這樣的方式寫程式:你的程式只需要兩個循序步驟就能執行。所以基本上你的程式只有兩個循序指令。你的程式裡可以有、可以執行任意數量的指令,但它們大多必須平行執行。而你只被允許有兩個循序步驟。

[1:26:52] 好。而且你能使用的指令種類是像,你知道的,線性組合、非線性——像是一些簡單的東西,對吧。不是像整個子程式那樣。所以對大多數、大多數問題而言,你在第一步必須計算的中間值數量,會隨輸入規模呈指數成長。只有極少數問題,你才能用非指數數量的 minterm 勉強過關。

[1:27:25] 但如果你讓程式依序執行多個步驟,那麼突然之間,你知道,它就可以簡單得多。它會跑得比較慢,但會佔用少得多的記憶體。它會佔用少得多的東西——資源。所以設計電腦電路的人都知道這件事,對吧。你可以設計,比如說,一個把兩個二進位數字相加的電路。而有一個非常簡單的做法,就是你先把前兩個位元拿來相加,然後把進位傳遞到第二位元、第二對位元,你知道,把進位考慮進去,這就給你結果的第二個位元,然後再進位,你知道,傳遞進位,然後你依序這樣做,對吧。

[1:28:02] 所以這樣做的問題在於,它所需的時間與你試圖相加的數字大小成正比。所以電路設計者有一種方法,基本上就是預先計算進位,叫做進位預看,這樣一來,完成一次加法所需的步驟數其實不是 N,而是遠小於那個數。好。但那是以電路複雜度大幅增加為代價。就是那個數量,像是它在晶片上所佔的面積。所以這就是時間與空間之間的取捨,或者說,深度與……之間的取捨。

[1:28:42] 而且,某種程度上,時間是已知的。那麼我們把什麼叫做深度模型呢?所以,你知道,一個兩層的神經網路,只有一個隱藏層的那種,我不會稱它為「深度」,儘管技術上它使用了反向傳播。但是,呃,你知道,它並沒有真正學到複雜的表徵。所以深度學習裡有這種階層性的概念。支持向量機絕對不深。除非你學習複雜的核函數,但那樣它們就不再是支持向量機了。那麼什麼是好特徵?什麼是好表徵?

[1:29:20] 所以,這裡有個我喜歡的例子。有一個東西叫做流形假設,它說的是自然資料——所以,如果我用一台解析度為 1,000 x 1,000 像素的相機拍下這個房間的照片。那是 1 百萬像素、3 百萬個數值。你可以把它想成一個有 3 百萬個分量的向量。在所有可能的有 3 百萬個分量的向量當中,有多少個對應到我們所謂的自然影像?

[1:29:54] 我們看到一張圖片時,就能判斷它是不是自然影像。我們的視覺系統裡有一個模型,會告訴我們這看起來像真實的、像真實的影像。而當它不是的時候,我們也看得出來。所以,那些實際上會被我們視為自然影像的像素組合數量,只是所有可能影像集合中極小、極小、極小、極小、極小的一小部分。把隨機像素組合成毫無意義影像的方式,遠比把像素組合成看起來像自然影像的東西的方式多得多。

[1:30:27] 所以流形假設是說,那些在我們看來很自然的東西,存在於高維環境空間中的一個低維表面上。要說服自己相信這點,有個很好的例子:想像我拍了很多一個人做鬼臉的照片,對吧。這個人站在白色背景前。她的頭髮不動。她大概會把頭轉來轉去,然後做鬼臉等等。那個人的所有影像集合——也就是我替那個人拍了一段很長的影片——那個人的所有影像集合存在於一個低維表面上。

[1:31:07] 所以我想問你們的一個問題是:那個表面的維度是多少?不管數量級是多少,好。有任何想法嗎?是的?[學生發言聽不清楚。] 對,你們大概以前聽過我這套說法,不過……[講者:那個人說了什麼?] 嗯?[講者:他們說了什麼?] 好,所以對還沒聽過的人來說,你們有機會,再有一次回答的機會。好,有任何猜測嗎?

[1:31:41] 沒有嗎?別害羞。我想要多個提案。任何人都可以。你們可以低頭看筆電,不過,你們知道的,我可以點你之類的。好,有任何想法嗎?是的。

[1:32:11] 沒想法嗎?沒關係。你,有任何想法嗎?也許你聽到他說的。 [學生發言聽不清楚。] 線性,那是什麼意思? [學生發言聽不清楚。] 那是一個 1 維空間。好,一個一維子空間。好,還有其他提案嗎?有任何想法嗎?好,我拍的影像是一百萬像素。好,所以環境空間是 3 百萬維。

[1:32:52] [學生發言聽不清楚] 它們不會變,不會。而且這個人可以移動頭部,你知道的,轉來轉去之類的。但並不會真的移動整個身體。我的意思是,你只會看到臉,它大致上居中。 [學生:一千。] 一千,好。為什麼? [學生發言聽不清楚。]

[1:33:23] 好,對,這是個不錯的猜測。至少動機是對的。[聽不清楚的學生評論。] 再說一次。[學生:這個人的表面積。] 這個人的表面積。沒錯。所以它受限於這個人所佔據的像素數量。這是肯定的。那是一個上界。是的。當然,那些像素不會取遍所有可能的值。所以那是一個很寬鬆的上界。還有別的想法嗎?好。所以基本上,如你所說,它的維度受限於這個人臉部肌肉的數量。

[1:34:03] 沒錯。你觀察到的那個人,其自由度數量就是他們臉部肌肉的數量。可獨立活動的肌肉數量,對吧。所以有 3 個自由度,因為你可以把頭往這邊傾、往那邊傾,或往那邊傾。那就是 3,就在那裡。然後是平移,往這邊、往那邊。也許往這邊和往那邊,也許往上或往下。那就是 6。然後是你臉部肌肉的數量,對吧。所以你可以微笑。你可以,你知道,噘嘴。你可以做各種動作,對吧。而且你可以獨立地做這些動作。你閉上一隻眼睛。

[1:34:46] 你可以往一個方向微笑,你知道,我是說……所以,無論你有多少獨立肌肉——不算舌頭,因為舌頭上有超多肌肉。那大約是 50。也許再多一點。所以,不管怎樣,它小於 100。好,所以這個表面,局部來說,如果你想參數化所有那些圖片所佔據的表面——從一張圖片移動到另一張圖片——那是一個表面,由少於 100 個參數決定該表面上一個點的位置。當然,它是一個高度非線性的表面。

[1:35:21] 它不像這裡這個漂亮的卡拉比-丘流形,但它仍然是一個表面。當然,答案就在投影片上,所以,你知道的。所以你想要的是一個理想的特徵提取器,能夠解開你所觀察事物的各種解釋性變異因子。對吧。所以我臉部的不同面向,你知道,不只是我移動肌肉、我轉動頭部——其中每一項都是獨立的變異因子。再者,我也可以摘下我的眼鏡。

[1:35:53] 你知道,光線可能會改變。那是另一組,你知道,變數——變數。而你想要的是一種表徵,基本上能個別地表達每一個變異因子。所以,如果在學習良好表徵時有一個要滿足的準則,那就是:找出你所觀察資料的獨立解釋性變異因子。而關鍵在於,沒有人知道該怎麼做。好。但那會是表徵學習的終極目標。

[1:36:32] 我們基本上已經到最後了。好,如果還有問題,我再回答兩個。是的。[學生提問,聽不清楚。] 好,所以問題是:有沒有某種像 PCA 的預處理方法可以找出那些向量?是的,如果流形是線性的,PCA 就會找出它們。所以如果你假設所有那些範例或人臉所佔據的表面是一個平面,那麼 PCA 就會找出那個平面的維度——主成分分析,對吧。

[1:37:18] 但很遺憾,它並不是線性的,對吧。讓我……對,讓我給你們舉個例子。如果你把我和我那個長得像我的大兒子,讓我們擺出同樣的表情、同樣的位置,我們兩張影像之間的距離會相對很小,即使我們不是同一個人。現在如果你拿我的臉,和我的臉平移 20 個像素,我和平移後的我自己之間的距離,會比我和我兒子之間的距離還要大,好嗎。

[1:37:53] 所以……這意味著,我這張臉的流形,是那個空間中某個複雜的流形。我兒子是另一個稍微不同的流形,與我的流形不相交。然而這兩個流形彼此非常接近,而且它們彼此之間的距離,比我的流形上任意兩個樣本之間、以及他的流形上任意兩個樣本之間都要近。所以基本上 PCA 什麼也告訴不了你。好,這裡還有另一個理由說明那個表面為什麼不是、不是一個平面。

[1:38:26] 你們現在正看著我。現在想像那個流形,一個線性流形、一維流形,就是我一路把頭轉 360。好。那個流形在拓撲上等同於一個圓。它不是平的。不可能是,它無法被對齊。所以 PCA 找不到它。好,我得走了。謝謝!下週見。

查看英文原始字幕

[0:00] OK, so first of all I have a terrible confession to make. This class is actually being run not by me, but by these two guys: Alfredo Canziani and Mark Goldstein, whose names are here [points to slide]. They are the TA'S and you'll talk to them much more often than you'll talk to me. That's the first thing. The other confession I have to make is that if you have questions about this class, don't ask them at the end of this course because I have to run right after the class to catch an airplane. But that can wait until next week. OK, so let's start right in.

[0:35] Some very basic course information. There is a website as you can see. I will do what I can to post the PDF of the slides on the website. Probably just before the lecture, probably just a few minutes before the lecture, usually. But, but it should be there by the time you get to class, or at least by the time I get to class. There's going to be nine lectures that I'm going to teach, on Monday evenings. There is also a practical session every Tuesday night that further on Mark will be running. So, they'll go through some of the, you know, practical questions. Some, you know, refreshers on sort of math, you know mathematics that are necessary for this, and basic concepts. Some tutorials on how to use PyTorch and various other software tools.

[1:24] And there's going to be three guest lectures. The names of the guest lectures are not finalized. But it's gonna be on topics like natural language processing, computer vision, self-supervised learning, things like that. There's going to be a midterm exam, or at least we think there is. And it's going to take one of those sessions, you know, around March. And the evaluation will be done on the midterm and on a final project.

[1:58] And, you can sort of, you know, band in groups of two. Did we say two or three, or just two? We didn't decide yet, we'll see. The project will probably have to do with a combination of self-supervised learning and autonomous driving. We are discussing with various people for data and things like that. Okay, let me talk a little bit about, so this first lecture is really going to be sort of a broad introduction about what deep running is really, and what it can do and what it cannot do.

[2:33] So it will serve as an introduction to the entire thing. So, we'll go through the entire arc, if you want, of the class but in, sort of, very superficial terms so that you get, sort of, broad high-level idea of all the topics we're talking about. And whenever I'll talk about a particular topic you'll see where it fits in this kind of whole picture. But before that... So, there is a prerequisite for the class which is, you know: You need to be kind of familiar with machine learning or at least basic concepts in machine learning.

[3:04] Who here has played with PyTorch, TensorFlow, has trained a neural net? OK. Who has not done that? Don't be shy, OK. OK? So the majority has. Which is good. But I'm not going to assume that you know everything about this. Particularly, I am not going to assume that you know a lot of the, you know, sort of deep underlying techniques. OK, so here is the course plan and depending on what you tell me I can adjust this and sort of, you know, go faster on certain sections that you think are too obvious because you've played with this before, or other things.

[3:52] So intro to Supervised Learning, Neural Nets, Deep Learning. That's what I'm going to talk about today. What deep learning can do, what it cannot do, what are good features. Deep learning is about learning representations. That's what I'm going to talk about. Next week will be about back propagation and basic architectural components. So things like the fact that you build neural nets out of modules that you connect with each other. Then you compute gradients you get automatic differentiations. And then these various types of architectures, loss functions, activation functions — you know different modules. Tricks like weight sharing and weight tying, multiplicative interactions, attention gating — things like this, right.

[4:33] And then particular macro architectures, like mixture of experts, Siamese net, hyper networks, etc. So we'll dive pretty quickly in and that's appropriate if you've already played with some of those things. Then there will be either one or two lectures – I haven't completely decided yet — about convolutional nets and their applications. One of them might end up being a guest lecture. Then, more specifically, about deep learning architectures that are useful in special cases.

[5:06] So things like recurrent neural nets with back propagation through time, which is the way you train recurrent neural nets. And ... ... and sort of ... ... applications of ... recurrent neural nets to things like control and, you know, producing time series and stuff like that. Then things like combine recurrence and gating and multiplicative interactions like gated recurrent units and LSTM. And then things that really use multiplicative interactions as kind of really a basis of their architecture like memory networks, transformers, adapters, etc., which are sort of very recent architectures that have become extremely popular and in things like NLP and other other areas. And then a little bit about graph neural nets, which I'm not going to talk about this a lot because there is another course that you can take by Joan Bruna where he spends a lot of time on graph neural nets.

[6:06] Then... then we'll talk about how we get those deep learning systems to work. And, so, various tricks to get them to work. Sort of understanding the type of optimization that takes place in neural nets. So... ...the type of... you know, we... we use, of course — learning is always about, almost always about, optimization. And deep learning is almost always about gradient-based optimization. And there are certain rules about optimization in the convex case that are well understood.

[6:40] But they're not well understood when the training is stochastic, which is the case for most deep learning systems. And they're not very well understood also in deep learning, because the the cost function is not ... is not convex. It has local minima, and saddle points, and things like this. So it's important to understand the geometry of the objective function. I say it's important to understand but the the big secret here is that nobody actually understands. So ... it's important to understand that nobody understands. Okay? But there are a few tricks that have come up through a combination of intuition and a little bit of theoretical analysis and empirical search. Things like initialization tricks, normalization tricks, and regularization tricks like drop out.

[7:29] (Grading clipping is more for optimization.) Things like momentum, average HDD, the various methods for parallelizing HDD. Many of which do not work. And then something a little exotic called target prop and the Lagrangian formulation of back prop. Then I'll switch to my favorite topic, which is energy-based models. So this is sort of a general formulation of a lot of different, sort of, approaches to learning — whether they are supervised, unsupervised, self-supervised. And whether they involve things like inference.

[8:04] Like, you know, searching for the value of variables that nobody tells you the value of, but that your process your system is supposed to infer. So that could be thought of as sort of a way of implementing reasoning with neural nets. So you could think of reasoning in neural nets as a process by which you have some energy function that's being optimized with respect to some variables. And the value you get as a result of this optimization is the value of those variables you were trying to find. And so, there is sort of the the common view that a neural net is just a function that computes its output as a function of its input. So you just run through the neural net, you get an output.

[8:43] But that's a fairly restrictive form of inference in the sense that you can only produce one output for a given input. But very often there are multiple possible answers to a given input. And so, how do you, kind of, represent problems of this type where there are multiple answers, multiple possible answers, to a given input? And one answer to this is: You make those answers the minima of some energy function, and your inference algorithm is going to find values of those variables that minimize this objective function. And there might be multiple minima. So that means your model might produce multiple outputs for a given input. Okay?

[9:21] So, energy-based models, it's kind of a way of doing this. A special case of those energy-based models are probabilistic models: like, you know Bayesian methods, graphical model, Bayesian nets and things like this. Energy methods are a little more general. So a little less specific. So special cases of this include things like what people used to call structure prediction. And then there is a lot of applications of this in what's called self-supervised learning. And that will be the topic of the next couple lectures. So self-supervised learning is a very very active topic of research today.

[9:57] And probably something that's going to become really dominant in the future. It's already ... ... in the space of a year, it's become dominant in natural language processing. And, in the last few months, just three months there's been a few papers that show that self-supervised learning methods actually work really well in things like computer vision as well. And so my guess, my guess is that ... self-supervised learning is going to take over the world in the next few years. So, I think it's useful to hear about it in this class. The things like — I'm not going to go through a laundry list of this — but there are things that you may have heard of: like variational auto-encoders, de-noising auto-encoders, BERT, which is, you know, those transformer architectures that are trained for natural language processing. They are trained with self-supervised learning and they are a special case of a de-noising auto-encoder.

[10:45] So a lot of those things you may have heard of without realizing they were all, kind of — it can be all understood in the context of this sort of energy-based approach. And that includes also generatative adversarial networks (GANs), which I'm sure many of you have heard of. And then there is self-supervised learning and beyond. So, you know, how do we get machines to really kind of become really intelligent? They're not superintelligent. They're not very intelligent right now. They can solve very narrow problems very well, sometimes with superhuman performance. But no machine has any kind of common sense. And, the most intelligent machines that we have probably have less common sense than a house cat. So, how do we get to cat-level intelligence first, and then maybe human-level intelligence?

[11:29] And, I don't pretend to have the answer, but I have, you know — a few ideas that are interesting to discuss in the context of self-supervised learning, there. I've had some applications. Any questions? So that's the plan of the course. Okay. it might change, dynamically But, at least, that's the intent. Any questions? ...Okay... [Student Question: Will we also be having assignments in the course?] Yeah, yeah, there are assignments.

[12:00] [...Inaudible...] Okay, so for those of you who didn't hear Alfredo, because he didn't speak very loudly: The final project is actually going to be a competition between the teams. So there is going to be a leaderboard and everything. And, in preparation for this, the assignments will be basically practice to get familiar with all the techniques that you would need for deep learning in general, but for the final project in particular.

[12:46] [Also for the midterm.] Right, also for midterm, obviously. Okay, so most of you probably know that — and this is gonna probably be boring for some of you who've already played with those things — but let's start from the basics. Deep learning is inspired by what people have observed about the brain, but the inspiration is just an inspiration. It's not, the attempt is not to copy the brain because there's a lot of details about the brain that are irrelevant, and that we don't know if they are relevant actually to human intelligence. So the inspiration is at kind of the conceptual level.

[13:18] And, it's a little bit the same as, you know, airplanes being inspired by birds. But the underlying principles of flight for birds and airplanes are essentially the same, but the details are extremely different. They both have wings. They both generate lift by propelling themselves through air, but, you know, airplanes don't have feathers and don't flap their wings. So it's a bit of the same idea. And the history of this goes back to a field that has kind of almost disappeared, or, at least changed names now, called Cybernetics. If you want a specialist about the history of cybernetics, he is sitting right there: Joe Lemelin Can you raise your hand?

[13:57] So, Joe is actually philosopher. And he is interested in the — he actually has a seminar on, kind of, the history of AI. In the what department is this? [Joe: Media, Culture, and Communication.] Media, Culture, and Communication. So, not CS. He knows everything about, you know, the history of cybernetics. So it started in the 40's with two gentlemen: McCulloch and Pitts. Their picture is on the top right here. And they came up with the idea that, you know, people at the time were interested in logic, but neuroscience was a very sort of nascent field.

[14:32] And, they got the idea that if neurons are basically threshold units that are on or off, then by connecting neurons with each other, you can build Boolean circuits and you can basically do logical inference with neurons. So they say, you know: The brain is basically a logical inference machine because the neurons are binary. And this idea — So the idea was that a neuron computes a weighted sum of its inputs and then compares the weighted sum to a threshold. It turns on if it's above the threshold, turns off if it's below.

[15:05] Which is sort of simplified view of how real neurons work — a very, very simplified view. That model kind of stuck with the field for decades. Almost four decades. Actually, a full four decades. Then there was, you know, quasi-simultaneously Donald Hebb, who had the idea that neurons in the brain — it's an old idea that the brain learns by modifying the strength of the connections between the neurons that are called the synapses. And you had the idea of what's now called Hebbian learning, which is that if two neurons fire together, then the connection that links them increases. And if they don't fire together, maybe it decreases.

[15:50] That's not an idea for learning algorithm, but it's sort of a first idea, perhaps. And then cybernetics was proposed by this guy Norbert Wiener, who is here. [Bottom Right] This is the whole idea that by having systems that, kind of, have sensors and have actuators, you can have feedback loops and you can have, you know, self-regulating systems. And, what's the theory behind this? You know, we sort of take that for granted now. But the idea that you know, you have things, like kind of, for example: You know, you drive your car, right? You turn the wheel and there's a so-called PID controller that actually turns the wheel in proportion to how you turn the steering wheel.

[16:36] And it's a feedback mechanism that basically measures the position of the steering wheel, measures the position of the wheel of the car. And, then, if there is a difference between the two, kind of corrects the wheels of the car so that they match the orientation steering wheel. That's a feedback mechanism. That, the stability of this, and the rules about this basically all come initially from this work. That led to a gentleman by the name of Frank Rosenblatt to basically imagine learning algorithms that modified the weights of very simple neural nets. And what you see here at the bottom the two pictures here [Bottom Left]: This is Frank Rosenblatt, and this is the Perceptron. This was a physical analog computer. It was not a three-line Python program, which is what it is now.

[17:24] It was a gigantic machine with, you know, wires and optical sensors so you could show it pictures. It was very low resolution. And then it had — it had neurons that could compute a weighted sum, and the weights could be adapted. And the weights were potentiometers. The potentiometers had motors on them so they could rotate for the learning algorithm. So it was electro-mechanical. And what he's holding here in his hand is a module of eight weights with (you can count them), with those potentiometers, motorized potentiometers on them.

[18:02] Okay, so that was a little bit of history of where neural nets come from. Another interesting piece of history is that this whole idea of, sort of, trying to build intelligent machines by basically simulating networks of neurons was born in the 40's, kind of took off a little bit in the late-50's, and completely died in the 1960's, in the late-1960s when people realized that with the kind of learning algorithms and architectures that people were proposing at the time you couldn't do much. You know, you could do some basic, very simple pattern recognition, but you couldn't do much.

[18:36] So between 1969, roughly, and — or 1968 — and 1984, I would say, basically, nobody in the world was working on neural nets except a few kind of isolated researchers mostly in Japan. Japan is its own, kind of, relatively isolated ecosystem for funding research. People don't listen to the same kind of ... ... fashions, if you want. And then the field took off again in 1985, roughly, with the emergence of backpropagation [backprop]. So backpropagation is an algorithm for training multi-layer neural nets, as many of you know.

[19:20] People were looking for something like this in the 60's and basically didn't find it. And the reason they didn't find it was because they had the wrong neurons. They were using McCulloch-Pitts neurons that are binary. The way to get backpropagation to work is to use an activation function that is continuous, differentiable, or at least, continuous. And people just didn't have ... you know, the idea of using continuous neurons. And so, they didn't think that you could train those systems with gradient descent, because things were not differentiable.

[19:56] Now there's another reason for this, which is that if you have a neural net with binary neurons, you never need to compute multiplications. You never need to multiply two numbers. You only need to add numbers, right. If your neuron is active, you just add the weight to the weighted sum. If it is inactive, you don't do anything. If you have continuous neurons, you need to multiply the activation of a neuron by a weight to get a contribution to the weighted sum. It turns out, before the 1980's, multiplying two numbers, particularly floating point numbers, on any sort of non-ridiculously expensive computer was extremely slow. And so there was an incentive to not use continuous neurons for that reason.

[20:34] So the reason why backprop didn't emerge earlier than the mid 80's is because that's when, you know, computers became fast enough to do floating point multiplications, pretty much. People didn't think of it this way, but that's, you know, kind of retrospectively, that's pretty much what happened. So, there was a wave of interest in neural nets between 1985 and 1995 — lasted about 10 years. In 1995, it died again. People in machine learning basically abandoned the idea of using neural nets.

[21:05] (For reasons that I'm not gonna go into right now.) And that lasted until the late 2000's, early 2010. So, when around 2009/2010 people realized that you could use multi-layer neural nets, training with backprop, and get an improvement for speech recognition. It didn't start with ImageNet. It started with speech recognition, around 2010. And within 18 months of the first papers being published on this, every major player in speech recognition had deployed commercial speech recognition systems that use neural nets. So, if you had an Android phone and you were using any other speech recognition features in an Android phone around 2012 that used neural nets. That was probably the first really, really wide deployment of, kind of, modern forms of deep learning, if you want.

[21:55] Then at the end of 2012 / early-2013, the same thing happened in computer vision, where the computer vision community realized deep learning, convolutional nets in particular, work much better than whatever it is that they were using before, and started to switch to using commercial nets, and basically abandoned all previous techniques. So that created a second revolution, now in computer vision. And then three years later, around 2016 or so, the same thing happened in natural language processing — in language translation, and things like this: 2015/16.

[22:28] And, now we're going to see — it's not happened yet — but we're going to see the same revolution occur in things like robotics, and control, and, you know, a whole bunch of application areas. But let me get to this: Okay. So, you all know what supervised learning is, I'm sure. And this is really what the vast majority — and not the vast majority — 90-some percent applications of deep learning use supervised learning as kind of the main thing. So supervised learning is the process by which you collect a bunch of pairs of inputs and outputs of examples of, let's say, images together with a category (if you want to do image recognition). Or a bunch of audio clips with their text transcription: a bunch of text in one language with the transcription in another language, etc.

[23:22] and you feed one example to the machine. It produces an output. If the output is correct you don't do anything, or you don't do much. If the output is incorrect then you tweak the parameters of the machine. (Think of it as a parametrized function of some kind.) And you tweak the parameters of that function in such a way that the output gets closer to the when you want. Okay. This is in non-technical terms what supervised learning is all about. Show a picture of a car, if the system doesn't say car, tweak the parameters. The parameters in the neural net are going to be the weights, you know, that compute weighted sums in those simulated neurons.

[24:03] tweak the knobs so that the output gets closer to the one you want. The trick in neural nets is: How do you figure out in which direction and by how much to tweak the knobs so that the output gets closer to the one you want? That's what gradient computation and backpropagation is about. But before we get to this, a little bit of history again. So there was a flurry of models, basic models for classification. You know, starting with the Perceptron, there was another competing model called the Adaline, which is on the top right here. They are based on the same kind of basic architectures: compute the weighted sum of inputs compared to a threshold. If it's above the threshold, turn on. if it's below the threshold, turn off.

[24:45] What you see, the Adaline here, the thing that Bernie Widrow is tweaking is actually a physical analog computer again. So it's like the Perceptron, it was much less, you know, much smaller, in many ways. The reason I tell you about this is that the the Perception actually was a two layer neural net, a two layer neural net in which the second layer was trainable with adaptive weights. But the first layer was fixed. In fact, most of the time with most experiments it was, It was determined randomly. You would, like, randomly connect input pixels of an image to neurons that would, you know, be threshold neurons with random weights, essentially.

[25:27] This is what they called the associative layer. And that basically became the basis for the sort of conceptual design of a pattern recognition system for the next four decades. I want to say four decades. Yeah, pretty much. So, that model is one by which you take an input, you run it through a feature extractor that is supposed to extract the relevant characteristics of the input that will be useful for the task.

[26:01] So, you want to recognize a face? Can you detect an eye? How do you detect an eye? Well, there is probably a dark circle somewhere. Things like that, right? You want to recognize a car, you know. Well, they are kind of dark, round things, etc. So, the problem here — and so, what this feature extractor produces is a vector of features, which are things that may be numbers, or they may be on or off. Okay, so it's just a list of numbers, a vector. And you're going to feed that vector to trainable classifier. In the case of Perceptron or a simple neural net, it's gonna be just the system that computes a weighted sum, compares it to a threshold.

[26:41] The problem is that you have to engineer the feature extractor. So the entire literature of pattern recognition (statistical pattern recognition at least) and a lot of computer vision (at least the part of computer vision that's interested in recognition) was focused on this part: the feature extractor. How do you design a feature extractor for a particular problem? You want to do, I don't know, Hangul character recognition. What are the relevant features for recognizing Hangul? And how can you extract them using all kinds of algorithmic tricks? How do you pre-process the images? You know, how do you normalize their size? You know, things like that.

[27:16] How do you skeletonize them? How do you segment them from their background? So the entire literature was devoted to this [Feature Extractor], very very little was devoted to that [Trainable Classifier]. And what deep learning brought to the table is this idea that instead of having this kind of two-stage process for pattern recognition, where one stage is built by hand, where the representation of the input is the result of, you know, some hand-engineered program, essentially.

[27:48] The idea of deep learning is that you learn the entire task end-to-end. Okay, so basically you build your pattern recognition system, or whatever it is that you want to do with it as a cascade or a sequence of modules. All of those modules have tunable parameters. All of them have some sort of nonlinearity in them. And then you stack them, you stack multiple layers of them, which is why it's called deep learning. So the only reason for the "deep" word in deep learning is the fact that there are multiple layers. There is nothing more to that.

[28:20] And then you train the entire thing end-to-end. So the complication here, of course, is the fact that the parameters that are in the first box: How do you know how to tune them so that the output does— you know, goes closer to the output you want? That's what backpropagation does for you. Okay, why do all those modules have to be nonlinear? It's because, if you have two successive modules, and they're both linear, you can collapse them into a single linear. Right, the product of two linear functions, or the composition of two linear functions is a linear function. Take a vector multiply by a matrix and then multiply it by a second matrix.

[28:59] It's as if you had pre-computed the product of those two matrices, and then multiplied the input vector by that composite matrix. So there's no point having multiple layers if those layers are linear. Okay, there's actually a point, but it's a minor point. So, since they have to be nonlinear, what is the simplest multi-layer architecture you can imagine that has arameters that you can tune — things like weights in the neural nets — and is non-linear?

[29:38] And you realize quickly that it has to look something like this: So ... Take an input. An input can be represented as a vector, right. An image is just a list of numbers. Think of it as a vector, ignore the fact that it's an image for now. Piece of audio, whatever it is that your sensors or your data set gives you, is a vector. Multiply this vector by a matrix. The coefficients in this matrix are the tunable parameters. And then take the resulting vector, right — when you multiply a matrix by a vector, you get a vector.

[30:15] Pass each component of this vector through a nonlinear function. And, if you want to have the simplest possible nonlinear function, use something like what's shown at the top here [ReLU(x) = max(x, 0)], which people in neural nets call the ReLU; people in engineering call this half wave rectification; people in math call this positive part. Whatever you want to call it, okay. So, apply this nonlinear function to every component of the vector that results from multiplying the input vector by the matrix.

[30:47] Okay. Now you get a new vector, which has lots of zeros in it, because whenever the weighted sum was less than zero, the output is zero, if you pass through the ReLU. And then repeat the process: Take that vector, multiply it by a weight matrix; pass the result through point wise non-linearity; take the result, pass it — multiplied by a matrix — pass the result through nonlinearities. That's a basic neural net, essentially. Okay now Why is that called a neural net at all? It's because when you take a vector and you multiply a vector by a matrix, to compute each component of the output, you actually compute a weighted sum of the components of the input by a corresponding row in the matrix, right. So this little symbol here — there's a bunch of components of the vector coming into this layer. And, you take a row of the matrix, compute a weighted sum of those values where the weights are the

[31:51] values in the row of that matrix, and that gives you a weighted sum. And you do this for every row that gives you the result, right. So, the number of units after the multiplication by a matrix is going to be equal to the number of rows of your matrix. And the number of columns of the matrix, of course has to be equal to the size of the input. Okay. So supervised learning — in slightly more formal terms than the one I showed earlier — is the idea by which you're going to compare the output that the system produces...

[32:26] So, right, you show an input, you run through the neural net, you get an output. You're going to compare this output with a target output. And you are going to have an objective function, a loss module, that computes a distance, a discrepancy, penalty — whatever you want to call it. Divergence — okay, there's various names for it. And then you're going to compute the average of that. So the output of this cost function is a scalar, right.

[32:56] It computes the distance, for example, Euclidean distance between a target vector and the vector that the neural net produces, the deep learning system system produces. And then you can compute the average of this cost function, which is just a scalar You're going to average it over a training set, right. So, a training set is composed of a bunch of pairs of inputs and outputs; compute the average of this over the training set. The function you want to minimize with respect to the parameters of the system (the tunable knobs) is that average. Okay. So, you want to find the value of the parameters that minimizes the average error between the output you want and the output you get, averaged over a training set of samples.

[33:47] So... I'm sure the vast majority of people here, sort of, have at least an intuitive understanding of what gradient descent is. So, basically, the way to minimize this is to compute the gradient, right. It's like you are in a mountain, you're lost in the mountain (and it's a very smooth mountain), but there is fog and it's night, and you want to go to the village in the valley. And so, the best thing you can do is you turn around and you see which way is down, and you take a step down in the direction of steepest descent.

[34:22] Okay. So, this search for the direction that goes down: that's called "computing a gradient" or, technically, a negative gradient. Okay, then you take a step down. That's taking a step down in the direction of negative gradient. And if you keep doing this and your steps are small enough — small enough so that when you take a step, you don't jump to the other side of the mountain — then eventually you're going to converge to the valley, if the valley is convex. Which means that if there is no, kind of, lake, no mountain lakes in the middle where, you know, there's kind of a minimum and you're going to get stuck in that minimum the valley might be lower, but you don't see it.

[35:03] Okay. So that's why convexity is important as a concept. But here is another concept, which is the concept of stochastic gradient, which I'm sure again a lot of you have heard [of]. I'll come back to that in more detail. The objective function you're computing is an average over many many samples. You can compute the objective function in its gradient over the entire training set by averaging the the value of the entire training set.

[35:37] But it turns out it is more efficient to just take one sample or a small group of samples, computing the error that this sample makes, then computing the gradient of that error with respect to the parameters and taking a step. A small step. Then a new sample comes in — you're going to get another value for the error and another value for the gradient, which may be in a different direction because it's a different sample. And take a step in that direction. And if you keep doing this, you're gonna go down the the cost surface but in kind of a noisy way — there's going to be a lot of fluctuations.

[36:16] So what is shown here is an example of this. This is stochastic gradient applied to a very simple problem with two dimensions where you only have two weights. And it looks kind of semi-periodic because the examples are always shown in the same order, which is not what you're supposed to do with stochastic gradient. But as you can see the path is really erratic. Why do people use this? There's various reasons. One reason is that, empirically it converges much, much faster, particularly if you have a very large training set. And the other reason is that you actually get better generalization in the end. So if you measure the performance of the system on a separate set that you — I assume you all know the concepts of "training set" and "test set" and "validation set" but — So if you test the performance of the system on a different set, you get generally better generalization if you use stochastic gradient than if you actually use the real, true gradient descent.

[37:05] The problem is... yes [inaudible student question] No. It's worse. So computing the entire gradient of the entire dataset — It is computationally feasible. I mean you can do it. It's not any more expensive than... ...you know... [inaudible student comment] It'll be less noisy but it will be slower. So let me tell you why: I mean, this is something we're gonna talk about again when we talk about optimization.

[37:37] But let me tell you: I give you a training set with a million training samples. It's actually 100 repetitions of the same training sample with 10,000 samples. Okay. So my actual sample is 10,000 training samples. I replicate it 100 times and I claim that, you know, I scrambled it. I tell you here is my training set with a million training samples. So if you do a full gradient, you're going to compute the same values a hundred times. You're gonna spend a hundred times more work than necessary.

[38:09] Without knowing it. Okay. So this only works because of repetition. But it also works in, kind of, more normal situations in machine learning where you have samples that are, have a lot of redundancy in them, like very many samples are very similar to each other, etc. So if there is any kind of coherence — if your system is capable of generalization, then that means stochastic gradient is going to be more efficient because if you don't stochastic gradient, you're not going to be able to take advantage of that redundancy. So that's one case where noise is good for you.

[38:46] Okay. Don't pay attention to the formula. Don't get scared because we're going to come back to this in more detail. But, why is backpropagation called backpropagation? Again, this is very informal. It's basically a practical application of Chain Rule. So you can think of a neural net of the type that I showed you earlier as a bunch of modules that are stacked on top of each other. And you can think of this as compositions of functions. And you all know the basic rule of calculus. You know, how do you compute the derivative of a function composed with another function?

[39:22] Well the derivative of, you know, F composed with G is the derivative of F at the point of G of X, multiplied by the derivative of G at the point X. Right. So you get the product of the two derivatives. So this is the same thing except that the functions, instead of being scalar functions, are vector functions. They get vectors as inputs and the previous vectors as outputs. More generally, actually, they take multi-dimensional arrays as input and multi-dimensional arrays as output, but that doesn't matter. Basically, what is the generalization of this chain rule in the case of functional modules that have multiple inputs, multiple outputs that you can view as functions? Right.

[40:06] And, basically, it's the same rule if you, kind of, blindly apply them — it's the same rule as you applied for, as you apply for regular derivatives. (Except here you have to use partial derivatives.) You know, what you see in the end is that if you want to compute the derivative of the difference between the output you want and the output you get, which is the value of your objective function, with respect to any variable inside of the network, then you have to kind of back, you know, propagate derivatives backwards and kind of multiply things on the way.

[40:37] All right. We'll be much more formal about this next week. For now, you just know why it's called backpropagation: because it applies to multiple layers. OK, so the the picture I showed earlier of this neural net is nice, but what if the input is actually an image? Right. So, an image, even sort of a relatively low resolution image, is typically like, you know, a few hundred pixels on the side.

[41:12] OK. So let's say 256 x 256, to take a random example. OK, a car image: 256 x 256. So it's got 65,536 pixels, times three, because you have R, G, and B components to it for, you know, you have three value for each pixels. And so that's, you know, roughly two hundred thousand values. OK, so your vector here is a vector with two hundred thousand components. If you have a matrix that is going to multiply this vector, this matrix is going to have to have two hundred thousand rows — Columns, I'm sorry.

[41:50] And depending on how many units you have here in the first layer, there's going to be a 200,000 x, you know, maybe a large number. That's a huge matrix. Right. Even if it's 200,000 x 100,000. So you have a compression in the first layer you know, that's already a lot of—very, very large matrix: billions. So it's not really practical to think of this as a full matrix. What you're going to have to do if you want to deal with things like images is make some hypothesis about the structure of this matrix so that it's not a completely full matrix that, you know, connects everything to everything.

[42:33] That would be impractical. At least for a lot of practical applications. So this is where inspiration from the brain comes back. There was some work, classic work, in neuroscience in the 1960s by the gentlemen at the top here: Hubel and Wiesel. They actually won a Nobel Prize for this in the in the 70s but their workforce from the late 50s—early 60s. And what they did was that they poked electrode in the visual cortex of various animals: you know, cats, monkeys, mice, you know, whatever.

[43:05] (I think they like cats a lot.) And they tried to figure out what the neurons in the visual cortex were doing. And what they discovered was that— so, first of all, well, this is a human brain. But, I mean, this chart is from much later. But all mammalian visual systems is organized in similar way. You have signals coming in to your eyes, striking your retina. You have a few layers of neurons in your retina in front of your photoreceptors that, kind of, pre-process the signal, if you want. They kind of compress it, because you can't have— you know the human eye is something like a hundred million pixels.

[43:49] So it's like a hundred million pixel camera, megapixel camera. But the problem is you cannot have a hundred million fibers coming out of your eyes, because otherwise your optical nerve would be this big. And you wouldn't be able to move your eyes. So those neurons in front of your retina do compression. They don't do JPEG compression, but they do compression. So that the signal can be compressed to one million fibers. Right. You have one million fibers coming out of each of your eyes. And that makes your, you know, optical nerve about this big, which means, you know, you can carry the signal and turn your eyes.

[44:26] This is actually a mistake that evolution made for vertebrates. Invertebrates are not like that. Invertebrates have actually—so, it's a big mistake because the wires collecting the information from your retina, because the neurons that process the signal in front of your retina, the wires have to kind of— it'll be in front of your retina, and so blocking part of the view, if you want. And then they have to punch a hole through your retina to get through your brain.

[44:59] So there's a blind spot in your visual field because that's where your optical nerve punches through your retina. So it's kind of ridiculous if you have a camera like this to have the wires coming out the front and then, you know, dig a hole in your sensor to get the wires back. It's much better if the wires come out the back, right? And vertebrates got that wrong. Invertebrates got it right. So, you know, like squid and octopus actually have wires coming out the back. They're much luckier. But anyway.

[45:33] So, the signal goes from your eyes to a little piece of brain called the lateral geniculate nucleus, which is under your brain actually—and like at the basis of it. It does a little bit of contrast normalization. We'll talk about this again in a few lectures. And, and, then that goes to the back of your brain where the the primary visual cortex area called v1 is. It's called V1 in humans. And there's something called the ventral hierarchy: V1, V2, V4 (IT), which is a bunch of brain areas going from the back to the side. And in the infero-temporal cortex right here, this is where object categories are represented.

[46:17] So, when you go around and you see your grandmother, you have a bunch of neurons firing that represent your grandmother in this area. And it doesn't matter what your grandmother is wearing, you know, what what position she is in, if there is occlusion or whatever—those neurons will fire if you see your grandmother. So the sort of category-level things. And those things have been discovered by experiments with patients that had to have their skull open for a few weeks, and where, you know, people poked electrode and had them watch movies and realize this is known that turns on if Jennifer Aniston is on the movie. And it only turns on for Jennifer Aniston.

[47:03] So with the idea that somehow the visual context, you know, can do pattern recognition and seems to have this sort of hierarchical structure, multi-layer structure, there's also the idea that the visual process is essentially a feed-forward process. So the process by which you recognize an everyday object is very fast. It takes about 100 milliseconds. There's barely enough time for the signal to go from your retina to the infero-temporal cortex. It takes about, it's a few millisecond delay per neuron that you have to go through.

[47:36] 100 milliseconds you barely have time to, for just you know, a few spikes to go through the entire system. So there's no time for like, you know, recurrent connections and like, you know, etc. Doesn't mean that there are no recurrent connections. There's tons of them but somehow fast recognition is done without them. So this is called the the feed-forward ventral pathway. And this gentleman here, Kunihiko Fukushima, had the idea of taking inspiration from Hubel and Wiesel in the 70s, and sort of built a neural net model on the computer that had this idea that, first there were layers, But also the idea that Hubel and Wiesel discovered, that individual neurons only react to a small part of the visual field.

[48:22] So they poked electrodes in neurons in V1 and they realized that this neuron in V1 only reacts to motifs that appear in a very small area in the visual field. And then the neuron next to it will react to another area that's next to the first one, right. So the neurons seem to be organized in what's called a retinotopic way, which means that neighboring neurons react to neighboring regions in the visual field. What they also realized is that the group of neurons that all react to the same area in the visual field, and they seem to turn on for edges at a particular orientation. So one neuron will turn on for, if it's receptive field has an edge, a vertical edge, and then the one next to it if the edge is a little slanted, and then the one next to it if the edge is a little rotated, etc.

[49:09] And so they had this picture of V1 basically as oriented, orientation selectivity, so neurons that look at a local field and then react to orientations. And those groups of neurons that react to multiple orientations are replicated over the entire visual field. So this guy Fukushima said, well, why don't I build a neural net that that does this? I'm not going to, you know, necessarily insist that my system extracts oriented features, but I'm going to use some sort of unsupervised learning algorithm to to train it. So he was not training his system end-to-end. He was training it layer by layer in some sort of unsupervised fashion, which I'm not going to go into the details of.

[49:48] And then he used another concept from, so he used the concept that those neurons were replicated across the visual field, and then he used another concept from Hubel and Wiesel called complex cells. So complex cells are units that pool the activities of a bunch of simple cells, which are those oriented orientation-selective units. And they pull them in such a way that if an orientation, if an oriented edge is moved a little bit it will activate different simple cells, but the complex cell, since it integrates the outputs from all those simple cells, will stay activated until the edge moves beyond its receptive field.

[50:32] So those complex cells build a little bit of shift invariance in the representation. You can shift an edge a little bit, and it will not change the activation the activity of one of those complex cells. So that's what we now call "convolution" and "pooling" in the context of convolutional nets. And that basically is what led me in the mid-80s or late-80s to come up with convolutional nets. So they are basically networks where the connections are local; they are replicated across the visual field; and you intersperse, sort of, feature detection layers that detect those local features with pooling operation. We'll talk about this at length in three weeks.

[51:21] So I'm not going to go to into every detail. But it has, it recycles this idea from Hubel and Wiesel and Fukushima that (...if I can can get my pointer...) that, basically, every neuron in one layer computes a weighted sum of a small area of the input, and the weighted sum uses those weights. But those weights are replicated across, so every neuron in a layer uses the same set of weights. OK, so this is the idea of weight tying or weight sharing.

[51:57] So using backprop we were able to train neural nets like this to recognize handwritten digits. This is back from the late-80s early-90s. And this is me when I was about your age, maybe a little older. I'm about thirty in this video. And this is my phone number when I was working at Bell Labs. Doesn't work anymore. It's a New Jersey number. And I hit a key, and there is this neural net running on the 386 PC with a special accelerator card recognizing those characters, running a neural net very similar to the one I just showed you the animation of.

[52:34] And the thing could, you know, recognize characters of any style, including very strange styles, including even stranger styles. And so this was kind of new at the time because this was back when character recognition, or pattern recognition in general, were still on the model of: we extract features and then we train a classifier on top. And this could basically train the entire, like, learn the entire task from end-to-end.

[53:08] You know, basically, the first few layers of that neural net would would play the role of a feature extractor, but it was trained from data. The reason why we used character recognition is because this was this was the only thing for which we had data. The only task for which there was enough data was either character recognition of speech recognition. Speech recognition experiments were somewhat successful, but not as much. Pretty quickly, we realized we could use those convolutional nets not just to recognize individual characters, but to recognize groups of characters, so multiple characters at a single time. And it's because of this convolutional nature of the network, which I'll come back to in three lectures, that basically allowed those systems to just, you know, be applied to a large image and then they will just turn on whenever they see in their field of view, whenever they see a shape that they can recognize.

[54:02] So, basically, if you have a large image, you train a convolutional net that it has a small input window, and you swipe it over the entire image, and whenever it turns on it means it's detected the object that you trained it to detect. So here the system, you know, is capable of doing simultaneous segmentation and recognition. You know, back in the—before that people in pattern recognition would have an explicit program that would separate individual objects from their background and from each other, and then send each individual object, character for example, to a recognizer. But with this you could, you can do both at the same time.

[54:35] You don't have to worry about it. You don't have to build any special program for it. So in particular this could be applied to natural images for things like facial detection, pedestrian detection, things like this. Right. Same thing, train a convolutional net to distinguish between an image where you have a face and an image where you don't have a face, train this with several thousand examples, and then take that window, swipe it over an image: whenever it turns on there is a face. Of course, the face could be bigger than the window so you sub-sample the image: you make it smaller, and you swipe your network again, and then make it smaller again, swipe your network again. So now you can detect faces regardless of size.

[55:15] OK. In particular you can use this to drive robots. So this is things that were done before deep running became popular, OK. So this is an example where the the network here is a convolutional net. It's applied to the image coming from a camera, from a you know, running robot. And it's trying to classify every window of a small window—like, 40 x 40 pixels or so, even less— as to whether the central pixel in that window is on the ground or is an obstacle, right.

[55:48] So whatever it classifies as being on the ground is green Whatever it classifies as being an obstacle is red or purple, if it's on a foot of the obstacle. And then you can sort of map this to a map, which you see at the top. And then do planning in this map to reach a particular goal, and then use this to navigate. And so these are two former PhD students. Raia Hadsell on the right, Pierre Sermanet on the Left, who are annoying this poor robot.

[56:20] Pretty confident the robot is not going to break their legs, since they actually wrote the code and trained it. Pierre Sermanet is a research scientist at Google Brain in California working on robotics. Raia Hadsell is head of robotics research— Director of Robotics research at DeepMind. They did pretty well. So a similar idea can be used for what's called semantic segmentation. So semantic segmentation is the idea that you can, again, with this kind of sliding window approach, you can train a convolutional net to classify the central pixel using a window as a context.

[56:58] But here it's not just trained to classify obstacles from non-obstacles. It's trained to classify something like 30 categories. This is— this is down Washington Place, I think. This is Washington Square Park. And, it you know, it knows about roads, and people, and plants, and trees, and whatever—but it finds, you know, desert in the middle of Washington Square Park, which is not... There's no beach that I'm aware of... So it's not perfect. At the time it was state of the art, though. That was the best system there was to do this kind of semantic segmentation.

[57:36] I was running around giving talks like trying to evangelize people about deep learning back then. This was around 2010. So this is before the, kind of, deep learning revolution, if you want. And one person, a professor from Israel was sitting in one of my talks. And he's a theoretician, but he was really kind of transfixed by the potential applications of this, and he was just about to take a sabbatical and work for a company called Mobileye, which was a start-up in Israel at the time— working on autonomous driving. And so, a couple of months after he heard my talk, he started working at Mobileye.

[58:15] He told the Mobileye people, you know—"You should try this convolutional net stuff. This works really well." And the engineers there said—Nah. No, we don't believe in that stuff. We have our own method. So he implemented it, and tried it himself, beat the hell out of all the benchmarks they had. And all of a sudden the whole company switched to using convolutional nets. And they were the first company to actually come up with a vision system for cars that, you know, can keep a car in a highway, and can break if there is a pedestrian or cyclist crossing. I'll come back to this in a minute. They were basically using this technique.

[58:54] Semantic segmentation, very similar to the one I showed for the robot before. This was a guy by the name of Shai Shalev-Schwartz. You have to be aware of the fact also that back in the 80s, people were really interested in using, in sort of implementing special types of hardware that could run neural nets really fast. And these are kind of a few examples of neural net chips that were actually implemented—I had to do with some of them— but they were implemented by people working in the same group as I was, as I was at Bell Labs in New Jersey.

[59:28] So this was kind of a hot topic in the 1980s, and then of course with the interest in neural nets dying in the mid-90s people weren't working on this anymore, until a few years ago. Now the hottest topic in in chip design in the chip industry is neural net accelerators. You go to any conference on computer architecture you know, chip, like ISSCC, which is the big kind of solid-state circuit conference—half the talks are about neural net accelerators.

[1:00:03] And I worked on a few of those things. OK, so then something happened, as I told you, around 2010, -13, -15 in speech recognition, image recognition, natural language processing, and it's continuing. We're in the middle of it now for other topics. And what happened, and I'm really sad to say it didn't happen in my lab, but but with our friends, we started, with Yoshua Bengio and Geoff Hinton back in the early 2000s—we knew, you know that deep learning was working really well and we knew that the whole community was making a mistake by dismissing neural nets and deep learning. And so— we didn't use the term deep learning yet. We invented it a few years later—so, around 2003 or so, 2004, we started kind of a conspiracy, if you want. We got together and we said we're just going to try to, kind of, beat some records, and some data sets, invent some new algorithms that will allow us to train very large neural nets.

[1:01:03] So that will, and will collect very large data sets, so that we will show the world that those things really work, because nobody really believed it. That really kind of succeeded beyond our wildest dreams. In particular, in 2012 Geoff Hinton had one student Alex Krizhevsky, who spent a lot of time implementing convolutional nets on GPUs, which were kind of new at the time—they were not entirely new but they were starting to become really high-performance. So he was very good at sort of hacking that and and then they were able to train much larger neural nets, convolutional nets, than anybody was able to do before.

[1:01:44] And so they used it to to train on the ImageNet dataset. The ImageNet dataset is a bunch of natural photos. And the system is supposed to recognize the main objects in the photo among 1,000 different categories. And the training set had 1.3 million samples. Which is kinda large. So what they did was build this really large, and very deep convolutional net, pretty much on the same model as what we had before, implemented on GPUs, and let it run for a couple weeks. And with that they beat the performance of best competing systems by a large margin. So this is the error rate on ImageNet going back to 2010. So 2010 it was about 28% error, top 5.

[1:02:35] So, basically you get an error if the correct category is not in the top 5 among 1,000. OK, so it's kind of a mild measure of error. 2011 it was 25.8%, the system that was able to do this was actually very, very large. It was sort of somewhat convolutional-net-like, but it wasn't trained. I mean only the last layer was trained. And then Geoff and his team got it down to 16.4%, and then that was a watershed moment for the computer vision community. A lot of people said, Okay, you know now we know that this thing works.

[1:03:18] And the whole community went from basically refusing every paper that had neural nets in them in 2011 and 2012 to refusing every paper that does not have a convolutional net in it in 2016. So now it's the new religion, right. You can't get a paper in a computer vision conference unless you use ConvNets somehow. And the error rate went down really quickly, you know people found all kinds of really cute architectural tricks that, sort of, made those things work better. And what you'd see in there is that there was an inflation of the number of layers.

[1:03:56] So my convolutional nets from the 90s had 7 layers or so, and from the early 2000s. And then AlexNet had, I don't know, 12. Then VGG the year afterward, after that had 19. GoogLeNet had I don't know how many, because it's hard to figure out how you count. And then the workhorse now of object recognition, the standard backbone, as people called them, has 50 layers. It's called ResNet-50. But some, you know, some networks have 100 layers or so.

[1:04:29] So Alfredo a few years ago put together this chart that shows where each of those blob is a particular network architecture. And the x-axis is the number of billions of operations you need to do to compute the output. Okay, those things are really big billions of connections. The y-axis is the top one accuracy on ImageNet. So it's not the same measure of performance as the one I showed you before. So the best systems are around 84, today.

[1:05:01] And the size of the of the blob is the memory occupancy, so the number of millions of floats that you need to store to store the weight, the weight values. Now people are very smart about compressing those things like you know quantizing them, and there's entire teams at Google, Facebook, and various other places that only work on optimizing those networks and compressing the things so they can run fast. Because, to give you just a rough idea, the number of times Facebook, for example, runs a convolutional net on its servers per day is in the tens of billions.

[1:05:44] Okay. So there's a huge incentive to optimizing the amount of computation necessary for this. So one... one reason why convolutional nets are being so successful is that they exploit a property of natural data, which is compositionality. So compositionality is the property by which a scene is composed of objects; objects are composed of parts; parts are composed of sub-parts; sub-parts are really combinations of motifs; and motifs are combinations of contours or edges, right, or textures.

[1:06:33] And those are just combinations of pixels. Okay, so there's this so-called compositional hierarchy that, you know, particular combinations of objects at one layer in the hierarchy form objects at the next layer. And so if you, kind of, mimic this compositional hierarchy in the architecture of the network, and you let it learn the appropriate combinations of features at one layer that, you know, form the the features of the next layer, that's really what deep learning is.

[1:07:06] Okay. Learning to represent the world and exploit the structure of the world—and the world, being the fact that there is organization in the world because the world is compositional. A statistician by the name of Stuart Geman, who is at Brown University, said— so he was kind of playing on the famous Einstein quote, Einstein said: The most incomprehensible thing about the world is that the world is comprehensible. Like, among all the complicated things that the world, you know, the world could be extremely complicated, so complicated that we have no way of understanding it.

[1:07:42] And it looks like a conspiracy that we are able to understand at least part of the world. And so Stuart Geman's version of this is that the world is compositional... or there is a God. (Because you need supernatural things to be able to understand it if the world is not compositional.) So this has led to incredible progress in things like computer vision, as you know, from you know, being able to unreliably identify, you know, detect people, to being able to generate masks for every object, accurate masks, and then even to figure out the pose, and then do this in real time on a mobile platform, you know.

[1:08:25] I mean the progress has been sort of nothing short of incredible, and most of those things are based on two basic families of architectures. This sort of so-called one-pass object detection/recognition architectures called RetinaNet, feature pyramid network. There's various names for it. Or U-Net. Then another type called Mark-RCNN, both of them actually originated from Facebook. Or, the people who originated them are now at Facebook—they sometimes came up with it before they came to Facebook.

[1:08:59] But, you know, those things work really well, you know, they can do things like that: detect objects that are partially occluded, and, you know, draw a mask of every object. So basically, this is a neural net, a convolutional net where the input is an image. But the output is also an image. In fact, the output is a whole bunch of images, one per category. And for each category outputs the mask of the object from that category. Those things can also do what's called "instant segmentation." So if you have a whole bunch of sheeps, it can tell you, you know, not just that this region is sheep, but actually pick out the individual sheeps and will tell them apart, and it will count the sheeps right, and fall asleep.

[1:09:40] That's what you're supposed to do right, to fall asleep you count sheeps, right? And the cool thing about deep learning is that a lot of the community has embraced the whole concept that research has to be done in the open. So a lot of the stuff that we're gonna be talking about, as you probably know, in the class is it's not just published, but it's you know, published with code. It's not just code, it's actually pre-trained models that you can just download and run.

[1:10:13] All open source. All free to use. So that's really new. I mean people didn't use to do research this way, particularly in industry. But even in academia people weren't used to kind of distributing their code. But deep learning has sort of, somehow the race has kind of driven people to kind of be more open about research. So there's a lot of applications of all this, as I said, you know self-driving cars. This is actually a video from Mobileye, and Mobileye was pretty early in this in using convolutional nets for autonomous driving.

[1:10:45] To the point that in 2015 they had managed to shoehorn a convolutional net on the chip that they had designed for some other purpose. And they sold the licensed the technology to Tesla. So the first self-driving Tesla's, I mean self-driving, not really self-driving, they have driving assistance, right. They can keep in lane on the highway and change lane—had this Mobileye system. And, and that's, that's pretty cool. So that's a convolutional net. It's a little chip that is, you know, just behind the, it looks out the window and it's behind the the rear-view mirror.

[1:11:18] Since then this—you know, four/five years ago—since then this kind of technology has been very widely deployed by a lot of different companies. Mobileye still now was bought by Intel, and they have like 70 or 80 percent of the market for those vision systems. But, but there is a lot of companies that—and car manufacturers— that use those things. So in fact in some European countries, every single car that comes out, even low-end cars, has convolutional-net-based vision systems. And they call this: emergency, emergency, sort of, advanced emergency braking system or automated emergency braking system.

[1:11:56] AEBS— is deployed in every car in France, for example. It reduces collisions by 40%. So not every car on the roads have them yet, because you know people keep their cars for a long time. But what that means is that it saves lives. So a very positive application of deep learning. Another big category of applications, of course, is medical imaging. So this is a, it's probably the hottest topic in radiology these days—is how to use AI (which means convolutional nets) for radiology. This [slide image] is lifted from a paper by some of our colleagues here at NYU, where they analyzed MRI images. So there's one big advantage to convolutional nets: it's that they don't need to look at the screen to look at an MRI. In particular to be able to look at an MRI, they don't have to slice it into 2D images.

[1:12:56] They can look at the entire 3D volume. This is one property that this thing uses. It's a 3D convolutional net that looks at the entire volume of an MRI image and then produces, you know, it uses the very similar technique for, as I was showing before, for semantic segmentation. And it produces, it basically turns on on the output image wherever there is some, you know, here a femur bone, but you know, it could be— so this is the kind of result it produces. It works better in 3D than in 2D slices. Or, it can turn on when it detects malignant tumor in mammograms. (This is to 2D, it's not 3D.)

[1:13:37] And there's, you know, various other projects in medical imaging that are going around. Okay. Lots of applications in science and physics, bioinformatics, you know, whatever, which we'll come back to so... Okay. So there's a bunch mysteries in deep learning. They're not complete mysteries, because people have some understanding of all this, but they are mysteries in the sense that we don't have, like, a nice theory for everything.

[1:14:11] Why do they work so well? So one big question that theoreticians were asking many years ago, when I was trying to convince the world that deep longing was a good idea, was that they would tell me: Well, you can approximate any function with just two layers, why do you need more? And I'll come back to this in a minute. What's so special about convolutional nets? I talked about the compositionality of natural images, or natural data, in general. This is true for speech also and values of the signals, natural signals. But it seems a little contrived.

[1:14:45] How is it that we can train the system, despite the fact that the objective function we're minimizing is very non-convex. We may have lots of local minima. This was a big criticism that people were throwing at neural nets, people who'd never played with neural nets were throwing out neural nets back in the old days. Say, like you know, you have no guarantee that your algorithm will converge—you know, it's too scary. I'm not gonna use it. And, the last one is: why is it that the way we train neural nets breaks everything that every textbook in statistics tell you?

[1:15:19] Every textbook in statistics tells you, if you have n data points, you shouldn't have more than n parameters, because you're going to overfit like crazy. You know, you might regularize. If you're a Bayesian, you might through a prior. But... (which is equivalent) But what guarantee do you have? And with neural nets, neural nets are wildly over parametrized. We train neural nets with hundreds of millions of parameters, routinely. They're used in production. And the number of training samples is nowhere near that. How does that work?

[1:15:53] But it works! OK, so things we can do with deep learning today: You know, we can have safer cars; we can have better medical analysis, medical image analysis systems; we can have pretty good language translation, far from perfect, but useful; stupid chatbots; you know, very good information search retrieval and filtering. Google and Facebook nowadays are completely built around deep learning. You take deep learning out of them and they crumble.

[1:16:27] And, you know, lots of applications in energy management and production, and all kinds of stuff; manufacturing, environmental protection. But we don't have really intelligent machines. We don't have machines with common sense. We don't have intelligent personal assistants. We don't have, you know, smart chatbots. We don't have household robots. You know, I mean, there's a lot of things we don't know how to do, right. Which is why we still do research. OK, so, deep learning is really about learning representations. But really we should know in advance what representations are. So I talked about the traditional model of pattern recognition.

[1:17:04] But... Representation is really about you know, you have your raw data, and you want to turn it into a form that is useful, somehow. Ideally, you'd like to turn it into a form that's useful regardless of what you want to do with it. Sort of "useful" in a general way. OK, and it's not entirely clear what that means. But, at least, you want to turn it into a representation that's useful for the task that you are envisioning. And there's been a lot of ideas over the decades on, sort of, general ways to pre-process natural data in such a way that you produce good representations of it.

[1:17:54] I'm not going to go through the details of this laundry list. But the things like tallying the space, doing random projection. So random projection is actually, kind of, you know, like a monster that rears its head periodically, like every five years. And you have to whack it on the head every time he pops up. That was the idea behind the Perceptron. So the first layer of a perceptron is a layer of random projections. What does that mean? A random projection is a random matrix, which you know, has a smaller output dimension than input dimension, with some sort of non-linearity at the end, right. So think about a single layer neural net with nonlinearities, but the weights are random.

[1:18:38] So you can think of this as random projections. And a lot of people are rediscovering that wheel periodically, claiming that it's great because you don't have to do multi-layer training. And so it started with the Perceptron, and then you know it came back in the 60s, and then it came back again in the 1980s, and then it came back again. And now it came back. There's a whole community, mostly in Asia. They call two layer neural nets, where the first layer is random, they call this "extreme learning machines," OK.

[1:19:12] It's like, it's ridiculous, but it exists. They're not "extreme," I mean they're extremely stupid, but—you know. Right, so I was mentioning the compositionality of the world. It's, you know, from pixels to edges to texton, motifs, parts, objects. In text you have characters, word, word groups, clauses, sentences, stories. In speech it's the same, you have individual samples. You have, you know, spectral band, sound, phone, phonemes, words, etc.

[1:19:49] You always have this kind of hierarchy. OK, so here are many attempts at dismissing the whole idea of deep learning. OK, first, first thing. And this is things that I've heard for decades, OK— from mostly theoreticians, but a lot of people, and you have to know about them because they're going to come back in five years when people say, "Oh, deep learning sucks." Why not use support-vector machines? OK, so, here is support-vector machines here on the top left. Support-vector machine is a, and I'm sure many of you have heard about kernel machines and support-vector machines.

[1:20:22] Who knows what this is? I mean, even if it's a rough idea what this is. OK, a few hands. Who has no idea what a support-vector machine is? Don't be shy. Yeah. Yeah, I mean it's okay if you don't. OK, like most people haven't raised their hands for either. [Alfredo: Hands up, please, who knows support-vector machines.] OK, come on all the way up. Cool, all right. Who has no idea what it is? Don't be shy, it's okay. [Alfredo: inaudible] All right, good.

[1:20:55] Right, so here's the support-vector machine. Support-vector machine is a two layer neural net. It's not really a neural net, people don't like when it's formulated this way, but really you can think of it this way. It's a two layer neural net, where the first layer, which is symbolized by this function K here, each unit in the first layer compares the input vector X to one of the training samples X^i's. OK, so you take your training samples, let's say you have a thousand of them— so you have a thousand X^i's, from i = 1 to 1,000, and you have some function K that is going to compare X and X^i.

[1:21:26] Good example of a function to compare the two is you take the dot product between X and X^i, and you pass the result through, like, exponential minus square or something. So you get a Gaussian response, as a function of the distance between X and X^i, OK. So it's a way of comparing to two vectors, doesn't matter what it is. And, then you take those scores coming out of this K function that compares the input to every sample and you compute a weighted sum of them. And what you're going to learn are the weights, the alphas.

[1:21:59] Okay, so it's a two-layer neural net in which the second layer is trainable and the first layer is fixed. But in a way you can think of the first layer as being trained in an unsupervised manner, because it uses the data from the training set, but it only uses the X's, doesn't use the Y's. It uses the data in the stupidest way you can imagine, which is you store every X and use every single X as the weight of a neuron, if you want. Okay. That's what support vector machine is. You can write a thousand page book about the cute mathematics behind that. But the bottom line is it's a two-layer neural net where the first layer is trainied a very stupid way unsupervised, and the second layer is just a linear classifier.

[1:22:44] So, it's basically glorified template matching, because it basically compares the input vector to all the all the training samples. And so, it doesn't work if you want to do like, you know, computer vision with raw images. If X is an image and the X^i's are a million images from ImageNet— first of all, for every image you're gonna have to compare it with a million images, or maybe a little less if you're smart, and how you train it. That's going to be very expensive, and the kind of comparison you're making is basically what solves the problem. The weighted sum you're gonna get at the end is really the cherry on the cake.

[1:23:24] I use that analogy too often, actually. So... You can approximate, you can have theorems that show that you can approximate any function you want, as close as you want, by tuning the K function and the alphas. And so, if you were to talk to a theoretician, they'll tell you: Why do you need deep learning? I can approximate any function I want with a kernel machine. The number of terms in that sum can be very large, and nobody tells you what kernel function you can use. And so, that doesn't solve the problem.

[1:24:01] You can use a two-layer neural net, OK. So this is the top right here. The first layer is a nonlinear function F applied to the product of a matrix W^0 by input vector; and then the second layer multiplied by the second matrix; and then passes it through another non-linearity. OK, so this is a composition of two linear and non-linear operations. Again, you can show that under some conditions you can approximate any function you want with something like this. Given that you have a large enough vector in the middle.

[1:24:31] OK, so the dimension of what comes out of the first layer, if it's high enough —potentially infinite—you can approximate any function you want as close as you want, by making this layer go to infinity. So again, you talk to theoreticians and they tell you: Why do you need layers? I can approximate anything I want with two layers. But there is an argument, which is it could be very, very expensive to do it in two layers. And...

[1:25:03] For some of you this may sound familiar. For most of you probably not. Let's say I want to design a logic circuit. OK, so, when you design logic circuits, right, you have AND-gates and OR-gates and... or NAND-gates, right. You can do everything with just NAND's, right, negative ANDs. And if you.. You can show that any Boolean function can be written as a bunch of ORs on a bunch of, a bunch... you know, a bunch of ANDs and then an OR on top of this. That's called disjointed normal form (DNF).

[1:25:36] So any function can be written in two layers. The problem is that for most functions, the number of terms you need in the middle is exponential in the size of the input. So, for example, if I give you N bits, and ask you to construct a circuit that tells me if the number of bits that are on in the input string is even or odd. OK, it's a simple Boolean function: 1 or 0 on the output. The number of gates that you need is essentially exponential, in the middle. If you do it in two layers.

[1:26:09] If you allow yourself to do it in log(N) layers, where N is number of input bits, then it's linear. OK. So you go from exponential complexity to linear complexity if you allow yourself to use multiple layers. It's as if, you know, when you write a program— I'll tell you write the program in such a way that there is only two sequential steps that are necessary to run your program. So basically your program has two sequential instructions. You can have, you can run as many instructions as you want in your program but they have to run in parallel, most of them. And you're only allowed two sequential steps.

[1:26:52] OK. And, the kind of instructions you have access to are things like, you know, linear combinations, nonlinearities— like simple things, right. Not like entire sub-programs. So for most, most problems, the number of intermediate values you're going to have to compute in the first step is going to be exponential in the size of the input. There's only a tiny number of problems for which you're going to be able to get away with a non-exponential number of minterms.

[1:27:25] But if you allow your program to run multiple steps sequentially then all of a sudden, you know, it can be much simpler. It will run slower, but it will take a lot less memory. It will take a lot less stuff— resources. So people who design computers circuits know this, right. You can design, for example, a circuit that adds two binary numbers. And there is a very simple way to do this, which is that you first you take the first two bits, you add them, and then you propagate the carry at the second bit, the second pair of bits, you know, taking the carry into account that gives you the second bit of result, and then carry, you know, propagate the carry, and then you do this sequentially, right.

[1:28:02] So problem with this is that it takes the time that's proportional to the size of the numbers that you're trying to add. So circuit designers have a way of, basically, pre-computing the carry, it's called carry lookahead, so that the number of steps necessary to do an addition is actually not N, it's much less than that. OK. But that, that's at the expense of a huge increase in the complexity of the circuit. The the number, like the area that it takes on the chip. So this exchange between time and space, or, between depth and and...

[1:28:42] and, kind of, time is is known. So what do we call deep models? So, you know, a two-layer neural net, one that has one hidden layer, I don't call that "deep," even though technically it uses backprop. But, eh, you know, it doesn't really learn complex representations. So there's this idea of hierarchy in deep learning. SVMs definitely aren't deep. Unless you learn complicated kernels, but then they're not SVM's anymore. So what are good features? What are good representations?

[1:29:20] So, here's an example I like. There is something called the manifold hypothesis, and it's the fact that natural data— So, if I take a picture of this room with, you know, a camera with a 1,000 x 1,000 pixel resolution. That's 1 million pixels at 3 million values. It leaves, you can think of it as a vector with 3 million components. Among all the possible vectors with 3 million components, how many of them correspond to what we would call natural images?

[1:29:54] We can tell when we see a picture whether it's a natural image or not. We have a model in our visual system that tells us this looks like a real, like a real image. And we can tell when it's not. So the number of combinations of pixels that actually are things that we think of as natural images is a tiny, tiny, tiny, tiny, tiny subset of the set of all possible images. There's way more ways of combining random pixels in nonsensical images than there are ways of combining pixels into things that look like natural images.

[1:30:27] So the manifold hypothesis is that the set of things that, you know, look natural to us live in a low-dimensional surface inside the high-dimensional ambient space. And a good example to convince yourself of this: Imagine I take lots of pictures of a person making faces, right. So the person is in front of a white background. Her hair not moving. And she, kind of, moves her head around and, you know, makes faces, etc. The set of all images of that person—so I take a long video of that person—the set of all images of that person lives in a low dimensional surface.

[1:31:07] So a question I have for you is, What's the dimension of that surface? Whatever magnitude, okay. Any, yes? [Inaudible student comment.] Yeah, you've probably heard my spiel before, but... [Speaker: What did the person say?] Huh? [Speaker: What did they say?] OK, so for whoever hasn't heard this, you have a shot, another shot at an answer. OK, any guess?

[1:31:41] No? Don't be shy. I want like multiple proposals. Anyone. You can look down your laptop, but, you know, I can point at you or something. OK, any idea? Yes.

[1:32:11] No idea? It's OK. You, any idea? Maybe you heard what he said. [Inaudible student comment.] Linear, what does that mean? [Inaudible student comment.] It's a 1D space. OK, a one-dimensional subspace. OK, any other proposal? Any idea? OK, the images I'm taking are a million pixels. OK, so the ambient space is 3 million dimensions.

[1:32:52] [Inaudible student comment] They don't change, no. And the person can move the head, you know, turn around, things like this. But not really move the whole body. I mean you only see the face, it's mostly centered. [Student: A thousand.] A thousand, OK. Why? [Inaudible student comment.]

[1:33:23] OK yeah, that's a good guess. At least the motivation. [Inaudible student comment.] Say again. [Student: The surface area of the person.] The surface area of the person. Right. So it's bounded by the number of pixels occupied by the person. That's for sure. That's a, that's an upper bound. Yes. Those pixels, of course, are not gonna take all possible values. So that's a wide upper ground. Any other idea? OK. So, basically the dimension of that, as you said, Is bounded by the number of muscles in the face of the person.

[1:34:03] Right. The number of degrees of freedom that you observe in that person is the number of muscles in their face. The number of independently movable muscles, right. So there's 3 degrees of freedom due to the fact that you can tilt your head this way, that way, or that way. That's 3, right there. Then there is translation, this way, that way. Maybe this way and that way, maybe up or down. That's 6. And then the number of muscles in your face, right. So you can smile. You can, you know, pout. You can do all kinds of stuff, right. And you can do this, you know, independently. You close one eye.

[1:34:46] You can smile in one direction, you know, I mean... So, whatever independent muscles, you have—not counting the tongue, because there's tons of muscles in the tongue. And that's about 50. Maybe a little more. So, regardless, it's less than 100. OK, so the surface, locally, if you want to parameterize the surface occupied by all those pictures—move from one picture to another— it's a surface with less than 100 parameters that determine the position of a point on that surface. Of course it's a highly nonlinear surface.

[1:35:21] It's not like this beautiful Calabi-Yau manifold here, but but it's a it is a surface nonetheless. Of course the answer was in the slide so, you know. So what you'd like is an ideal feature extractor to be able to disentangle the explanatory factors of variation of what you're observing. Right. So the different aspects of my face, you know, it's not just I move my muscles and I move my head around—each of those is an independent factor of variation. Again I can also remove my glasses.

[1:35:53] You know, the lighting could change. That's another set of, you know, variable— variables. And what you'd like is a representation that basically individually represents each of those factors of variations. So if there is a criterion to satisfy in learning good representations it's that: it's finding independent explanatory factors of variation of the data that you're looking at. And the bottom line is that nobody has any idea how to do this. OK. But that would be the ultimate goal of representation learning.

[1:36:32] And we basically are at the end. OK. I'll take two more questions, if there is any. Yes. [Inaudible student question.] OK, so the question is: Is there some sort of pre-processing like PCA that will find those vectors? Yeah, so PCA will find those if the manifold is linear. So if you assume that the surface occupied by all those examples or faces is a plane, then PCA will find the dimension of that plane—principal component analysis, right.

[1:37:18] But, no, it's not linear unfortunately, right. Let me... Yeah, let me give you an example. If you take me and my oldest son that looks like me, and you place us making the same face in the same position, the distance between our images will be relatively small even though we're not the same person. Now if you take my face and my face shifted by 20 pixels, there's more distance between me and myself shifted than there is between me and my son, OK.

[1:37:53] So... What that means is that, you know, the manifold of my face, you know, is some complicated manifold in that space. My son is a slight different manifold which does not intersect mine. Yet these two, those two manifolds are very close to each other, and they're closer to each other than any two samples from my manifold, and two samples from his manifold. So PCA is not going to tell you anything, basically. OK, here is another reason why that surface is not, is not a plane.

[1:38:26] You're looking at me right now. Now imagine the manifold, which is a linear manifold, one dimensional manifold, of me turning my head all the way 360. OK. That manifold is topologically identical to a circle. It's not flat. Can't be, it can't be aligned. So PCA is not going to find it. OK, I gotta blast off. Thanks! See you next week.

在 Vidleaf 工作台開啟

搜尋逐字稿、選取行、複製含時間戳的引文、翻譯。

姓名標示

「第 1 週 – 講座:深度學習的歷史、動機與演進」由 Alfredo Canziani(冷在)(https://www.youtube.com/@alfcnz)製作,以 CC BY 4.0(https://creativecommons.org/licenses/by/4.0/)授權。來源影片:https://www.youtube.com/watch?v=0bMe_vCZo30。本頁是該影片的文字轉錄稿,並加入了段落分隔與時間戳記;創作者與 Vidleaf 無關聯,也不為其背書。Vidleaf 加入了 AI 標點與 AI 生成的摘要;原始措辭仍可於本頁取得。

你是創作者或權利持有人嗎?申請更正或移除:copyright@vidleaf.app(請見關於這些頁面)。

最後更新於