文字起こし · 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生成の要約

この入門的な深層学習の講義では、コースの運営に関する説明と、この分野の高レベルな全体像を組み合わせて扱います。コースはTAのAlfredo CanzianiとMark Goldsteinが運営し、月曜日の講義が九回あり、講師が担当します。火曜日の実践セッションはさらにMarkが進め、実践的な質問、数学の復習、PyTorchのチュートリアルを扱います。ゲスト講義が三回あり、中間試験はおそらく三月頃が予定され、最終プロジェクトはリーダーボード付きのコンペティションで、おそらく二人一組で、自己教師あり学習と自動運転を組み合わせたものになるでしょう。この講義では教師あり学習、ニューラルネット、深層学習を概観し、その後、誤差逆伝播やアーキテクチャの構成要素、畳み込みネットと再帰ネット、ゲーティングと乗算的相互作用(GRU、LSTM)、メモリネットワーク、トランスフォーマーとアダプター、グラフニューラルネットは簡単にのみ、そして最適化の工夫といった今後のトピックを扱います。深層学習はほとんど常に勾配に基づく最適化ですが、非凸目的関数の幾何学的性質は理解されていません。エネルギーベースモデルは、教師あり、教師なし、自己教師あり学習の一般的な定式化として提示され、確率モデルはその特殊ケースとされます。また自己教師あり学習は非常に活発で、おそらく支配的になりつつあると説明されます。歴史の節では、McCullochとPittsの閾値ユニットニューロンやHebbのシナプス強度の考え方から、WienerのサイバネティクスとRosenblattのパーセプトロン、1960年代後半の衰退、1980年代半ばの誤差逆伝播の復活、2010年以降の音声、視覚、自然言語処理における復活へとルーツをたどり、機械は依然として狭く常識を欠いていると指摘します。続いて、二段階のパターン認識とエンドツーエンドの深層学習を対比し、全結合行列が画像には非現実的である理由を説明して、畳み込みとプーリングの動機づけを行います。

文字起こしから生成されました。リンクされた箇所は元の動画と照らし合わせて確認してください。

タイムスタンプ付きの章の要約

コースの運営と構成

教員スタッフと連絡先

  • [0:01] この授業は実際にはTAの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] 乗算的相互作用に基づくアーキテクチャとして、メモリネットワーク、トランスフォーマー、アダプターなど、NLPやその他の分野で最近人気のあるものを議論します。
  • [5:51] グラフニューラルネットは、Joan Brunaの別コースが多くの時間を割いているため、簡単にのみ扱います。

最適化の課題と実践的な訓練のコツ

  • [6:08] このコースでは、深層学習システムを動作させるためのコツと、ニューラルネットで行われる最適化の種類を理解することを扱います。
  • [6:26] 深層学習はほとんど常に勾配ベースの最適化に関するものであり、凸の場合の規則はよく理解されていますが、確率的訓練や局所最小値や鞍点を持つ非凸のコスト関数はよく理解されていません。
  • [7:02] 大きな秘密は、目的関数の幾何学を実際には誰も理解しておらず、誰も理解していないことを理解することが重要だということです。
  • [7:12] 実践的なコツは直感、いくつかの理論的解析、経験的探索から生まれました。初期化、正規化、ドロップアウトなどの正則化、最適化のための勾配クリッピング、モメンタム、平均HDD、HDDを並列化する方法などがあり、その多くは機能しません。
  • [7:40] より風変わりなアプローチには、ターゲットプロップや誤差逆伝播のラグランジュ定式化があります。

エネルギーベースモデルと推論としての推論

  • [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が挙げられます。BERTは、自己教師あり学習をデノイジングオートエンコーダの特殊なケースとして自然言語処理のために訓練されたトランスフォーマーアーキテクチャです。
  • [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] この類推は、飛行機が鳥に着想を得たのと似ています。飛行の基本原理は本質的に同じですが、細部は大きく異なります。

マカロックとピッツの閾値ニューロンモデル

  • [14:17] 歴史は1940年代にマカロックとピッツから始まり、彼らはニューロンが基本的にはオンかオフの閾値ユニットであると提唱しました。
  • [14:39] そのようなニューロンをつなぐことでブール回路を構築し、ニューロンで論理推論を行うことができ、脳は基本的に論理推論マシンであることが示唆されました。
  • [14:56] ニューロンは入力の重み付き和を計算し、閾値を超えればオン、下回ればオフになります。これは実際のニューロンの非常に単純化された見方です。
  • [15:09] そのモデルはほぼ四十年間、実にまる四十年間、この分野に定着しました。

ヘブ学習とウィーナーのサイバネティクス

  • [15:22] ドナルド・ヘブは、脳はシナプスの強さを変更することで学習し、二つのニューロンが同時に発火すると結合が強まり、発火しなければ弱まる可能性があると提唱しました。
  • [15:50] ヘブ学習は学習アルゴリズムではなく、おそらく最初のアイデアです。
  • [15:55] ノーバート・ウィーナーはサイバネティクスを提唱しました。センサーとアクチュエーターを備えたシステムはフィードバックループを持ち、自己調整できるというものです。
  • [16:23] 車のステアリングは、ハンドルと車輪の位置を測定し、車輪を一致するように補正するフィードバック機構としてPIDコントローラーを使用しています。
  • [16:49] そのようなフィードバック機構の安定性と規則は、基本的にすべて最初はこの研究に由来しています。

ローゼンブラットのパーセプトロン・ハードウェア

  • [16:57] フランク・ローゼンブラットは、非常に単純なニューラルネットの重みを変更する学習アルゴリズムを思い描きました。
  • [17:11] パーセプトロンは物理的なアナログコンピューターであり、三行のPythonプログラムではなく、配線と画像を見せるための低解像度の光学センサーを備えた巨大な機械でした。
  • [17:35] そのニューロンは重み付き和を計算し、適応可能な重みはモーター付きのポテンショメーターで、学習アルゴリズムのために回転でき、電気機械式でした。
  • [17:45] ローゼンブラットが、モーター付きポテンショメーターを備えた八つの重みのモジュールを持っている写真が示されています。

ニューラルネットワーク研究の年表

  • [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] 以前の失敗は誤ったニューロン、すなわち二値のマカロック・ピッツニューロンを使ったことに由来します。
  • [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] 復活はImageNetではなく、2010頃の音声認識から始まった。
  • [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] ニューラルネットの鍵となる仕組みは、調整つまみをどの方向にどれだけ微調整するかを決めることであり、これが勾配計算と誤差逆伝播で扱われます。

パーセプトロン、アダライン、そして特徴抽出器のボトルネック

しきい値モデルとしてのパーセプトロンとアダライン

  • [24:22] 基本的な分類モデルの続々たる登場は、パーセプトロンと、それに対抗するモデルであるアダラインから始まりました。
  • [24:33] どちらも同じアーキテクチャに基づいています。入力の重み付き和を計算し、それをしきい値と比較して、しきい値を超えればオン、下回ればオフにします。
  • [24:45] バーニー・ウィドローが調整しているアダラインは物理的なアナログ計算機であり、多くの点でパーセプトロンよりはるかに小型です。

パーセプトロンの固定された連想層

  • [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] 誤差逆伝播は、 informal には連鎖律の実用的な応用です。ニューラルネットはモジュールの積み重ね、すなわち関数の合成と見なせます。
  • [39:22] F と G の合成の導関数は、X における G での F の導関数に、X における G の導関数を掛けたものであり、二つの導関数の積になります。
  • [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] ここで脳からの着想が再び登場します。

視覚系の階層構造と高速な物体認識

ヒューベルとウィーゼルの視覚皮質記録

  • [42:43] 古典的な1960の神経科学研究では、ヒューベルとウィーゼルが猫、猿、マウスなどの動物の視覚皮質に電極を挿入し、視覚皮質のニューロンが何をするのかを調べました。この業績は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] 高速な認識には再帰結合の時間はありませんが、講演者はそのような結合が大量に存在することにも言及しています。

ヒューベルとウィーゼルから畳み込みネットへ

福島の層ごとの教師なしモデル

  • [47:58] 福島邦彦は1970年代にヒューベルとウィーゼルから着想を得て、層を持つニューラルネットモデルを構築した。
  • [49:25] 福島は方位選択性のある特徴の抽出にこだわらず、教師なし学習アルゴリズムを用いた。
  • [49:39] 彼はシステムをエンドツーエンドではなく、層ごとに教師なしの方法で訓練した。
  • [49:51] 彼は視野全体にわたるニューロンの複製と、ヒューベルとウィーゼルの複雑細胞の概念を採用した。

V1における網膜トピックな組織化と方位選択性

  • [48:14] ヒューベルとウィーゼルは、個々の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 PC上でのベル研究所の手書き数字デモ

  • [52:02] 話者は1980年代後半か1990年代初頭の手書き数字デモを、三十歳頃の自身の写真や、もはや通じないニュージャージー州ベル研究所時代の古い電話番号とともに示している。
  • [52:21] キーを押すと、先ほど示したアニメーションのネットワークに似た、特殊なアクセラレータカードを搭載した386 PC上でニューラルネットが実行され、非常に奇妙なものを含むあらゆるスタイルの文字を認識します。
  • [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上で畳み込みネットを実装するのに多くの時間を費やしました。
  • [1:01:36] これにより、彼らはこれまで誰もできなかったほど大規模な畳み込みネットを訓練できるようになりました。
  • [1:01:48] 彼らは自然写真のImageNetデータセットで訓練しました。そこではシステムは1,000カテゴリの中から主要なオブジェクトを認識する必要があり、1.3百万の訓練サンプルがありました。
  • [1:02:09] 彼らは主に以前と同じモデルに基づいて非常に大規模で非常に深い畳み込みネットを構築し、GPU上で数週間実行し、競合する最高のシステムを大差で打ち負かしました。

ImageNetのエラー率の推移と画期的な瞬間

  • [1:02:27] トップ5エラー指標では、2010年のImageNetエラーは約28%で、2011年は25.8%でした。2011年のシステムは非常に大規模で、最後の層のみが訓練されました。
  • [1:03:04] Hintonのチームはエラーを16.4%まで下げ、これはコンピュータビジョンコミュニティにとって画期的な瞬間でした。
  • [1:03:18] コミュニティは、2011–2012年にはニューラルネットを含むほとんどすべての論文を拒否する立場から、2016年には畳み込みネットを含まない論文を拒否する立場へと移行しました。

successiveアーキテクチャ間での層の膨張

  • [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] x軸は、出力を計算するのに必要な数十億回の演算数を示しています。
  • [1:04:50] 縦軸はImageNetにおけるトップ一正解率であり、先ほど示したものとは異なる性能指標です。
  • [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] 深層学習とは、世界を表現しその構造、すなわち世界が合成的であるがゆえに存在する組織化を活用することを学習することです。

スチュアート・ジェマンによるアインシュタインの引用の翻案

  • [1:07:19] ブラウン大学のスチュアート・ジェマンは、世界について最も理解不能なことはそれが理解可能であることだというアインシュタインの言葉をもじりました。
  • [1:07:35] アインシュタインの主張は、世界はあまりに複雑で我々には理解する術がないかもしれず、少なくともその一部を理解できるのは陰謀のように見えるということです。
  • [1:07:47] ジェマンの翻案は、世界は合成的である、さもなければ神が存在するというものです。なぜなら世界が合成的でなければ、それを理解するには超自然的なものが必要になるからです。

コンピュータビジョンにおける深層学習の進歩

深層学習によって実現したコンピュータビジョンの能力

  • [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解析のための3次元畳み込みネット

  • [1:12:21] 医用画像は深層学習応用のもう一つの主要な分野であり、今日の放射線医学でおそらく最も注目されている話題と言われています。
  • [1:12:34] NYUの同僚による論文のスライドは、AI、つまり畳み込みネットを用いたMRI画像の解析を示しています。
  • [1:12:41] 畳み込みネットの重要な利点は、MRIを調べるために画面を見る必要がないことです。
  • [1:12:53] MRIを2次元画像にスライスする必要がなく、代わりに3次元のボリューム全体を見ることができます。
  • [1:13:01] 3次元畳み込みネットはMRIボリューム全体を見て、大腿骨などの構造が存在する場所で出力画像をオンにする、セマンティックセグメンテーションに似た手法を用います。
  • [1:13:25] このアプローチは2次元スライスよりも3次元でよりうまく機能します。

マンモグラムにおける腫瘍検出とその他のプロジェクト

  • [1:13:31] このネットは、3次元ではなく2次元であるマンモグラムにおいて悪性腫瘍を検出するとオンになります。
  • [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] 第一層では、各ユニットが入力ベクトルXを関数Kを用いて訓練サンプルX^iの一つと比較します。
  • [1:21:26] 典型的なKはXとX^iの内積を取り、それをマイナス二乗の指数関数に通すことで、距離の関数としてガウス応答を与えます。
  • [1:21:54] Kからのスコアは重み付き和で結合され、学習されるパラメータは重み、すなわちアルファです。
  • [1:21:59] 第二層は訓練可能で第一層は固定されていますが、第一層はYではなくXのみを使うため、教師なしで訓練されたと見なすこともできます。

美化されたテンプレートマッチングとそのコスト

  • [1:22:14] 第一層はデータを考えうる最も単純な方法で使います。つまり、すべてのXを保存し、それぞれをニューロンの重みとして使うのです。
  • [1:22:44] この手法は入力ベクトルをすべての訓練サンプルと比較するため、基本的には美化されたテンプレートマッチングです。
  • [1:22:54] 生の画像を用いたコンピュータビジョンではうまく機能しません。百万枚のImageNet画像があると、各画像を百万枚の画像と比較しなければならず、非常に高コストです。
  • [1:23:19] 比較自体が本質的に問題を解いており、最後の重み付き和はまさに仕上げの飾りにすぎません。

万能近似と理論家の反論

  • [1:23:29] 定理は、K関数とアルファを調整することで任意の関数を望むだけ近く近似できることを示しています。
  • [1:23:39] したがって理論家は、カーネルマシンが任意の関数を近似できるのに、なぜ深層学習が必要なのかと問うかもしれません。
  • [1:23:50] しかし、和の項数は非常に大きくなりうるうえ、どのカーネル関数を使うべきかを誰も指定しないため、これでは問題は解決しません。

二層ニューラルネットと深さのコスト

  • [1:24:01] 二層ニューラルネットでは、第一層が行列W^0と入力ベクトルの積に非線形性Fを適用し、第二層が第二の行列を掛けてその結果を別の非線形性に通します。
  • [1:24:16] いくつかの条件下では、このような二つの線形操作と非線形操作の合成によって、中間ベクトルが十分大きければ任意の関数を近似できます。
  • [1:24:31] 最初の層から出てくる次元が十分に高ければ、場合によっては無限に高ければ、この層を無限大にすることで任意の関数を望むだけ正確に近似できる。
  • [1:24:43] 理論家は、二層で何でも近似できるのになぜ層が必要なのかと問うかもしれないが、反論としては、二層で行うと非常に非常に高コストになり得るということがある。

論理回路と二層のブール関数

  • [1:25:09] 論理回路設計では、すべてを NAND ゲートだけで行うことができる。
  • [1:25:25] 任意のブール関数は、一連の AND の上に OR を重ねた形で書くことができ、これを選言標準形(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×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]

さて、まず最初に、とても言いにくい告白をしなければなりません。このクラスを実際に運営しているのは私ではなく、この二人、アルフレド・カンツィアーニとマーク・ゴールドスタインです。彼らの名前はここにあります[スライドを指さす]。彼らは TA であり、あなた方が私と話すよりもずっと頻繁に彼らと話すことになるでしょう。それが第一点です。もう一つの告白は、このクラスについて質問があるなら、このコースの最後に聞かないでください。というのも、私はクラスの後すぐに飛行機に乗るために走らなければならないからです。でもそれは来週まで待てます。では、早速始めましょう。

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をウェブサイトに掲載するよう、できる限り努めます。おそらく講義の直前に、通常は講義のほんの数分前に掲載されるでしょう。しかし、皆さんが授業に来るまでには、少なくとも私が授業に来るまでには掲載されているはずです。私が担当する講義は月曜の夜に九回あります。また、毎週火曜の夜には、さらにマークが担当する実習セッションがあります。そこで実践的な問題をいくつか扱います。このために必要な数学や基本概念の復習もいくつかあります。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] さて、まず最初に、とても言いにくい告白をしなければなりません。このクラスを実際に運営しているのは私ではなく、この二人、アルフレド・カンツィアーニとマーク・ゴールドスタインです。彼らの名前はここにあります[スライドを指さす]。彼らは TA であり、あなた方が私と話すよりもずっと頻繁に彼らと話すことになるでしょう。それが第一点です。もう一つの告白は、このクラスについて質問があるなら、このコースの最後に聞かないでください。というのも、私はクラスの後すぐに飛行機に乗るために走らなければならないからです。でもそれは来週まで待てます。では、早速始めましょう。

[0:35] ごく基本的なコース情報です。ご覧のとおりウェブサイトがあります。スライドのPDFをウェブサイトに掲載するよう、できる限り努めます。おそらく講義の直前に、通常は講義のほんの数分前に掲載されるでしょう。しかし、皆さんが授業に来るまでには、少なくとも私が授業に来るまでには掲載されているはずです。私が担当する講義は月曜の夜に九回あります。また、毎週火曜の夜には、さらにマークが担当する実習セッションがあります。そこで実践的な問題をいくつか扱います。このために必要な数学や基本概念の復習もいくつかあります。PyTorchやその他のさまざまなソフトウェアツールの使い方に関するチュートリアルもあります。

[1:24] また、ゲスト講義が三回あります。ゲスト講義の名前はまだ確定していません。しかし、自然言語処理、コンピュータビジョン、自己教師あり学習といったトピックになる予定です。中間試験があり、少なくともあると考えています。それはいずれかのセッションを使い、三月頃に行われます。評価は中間試験と最終プロジェクトで行われます。

[1:58] そして、二人組でグループを組むことができます。二人か三人か、それとも二人だけか言いましたか?まだ決めていませんが、様子を見ましょう。プロジェクトはおそらく自己教師あり学習と自動運転の組み合わせに関係するでしょう。データなどについてさまざまな人と話し合っています。では、少しお話ししましょう。この最初の講義は、ディープラーニングとは本当は何か、何ができて何ができないかについての広範な導入になります。

[2:33] ですので、全体の導入として機能します。授業全体の流れを、かなり表面的な形でたどりますので、話すすべてのトピックについて大まかな高レベルのイメージがつかめるでしょう。特定のトピックについて話すときはいつでも、それがこの全体像のどこに位置するかがわかります。しかしその前に…この授業には前提条件があり、それは機械学習、少なくとも機械学習の基本概念に精通している必要があるということです。

[3:04] ここでPyTorchやTensorFlowを触ったことがある人、ニューラルネットを訓練したことがある人はいますか?はい。では、やったことがない人は?恥ずかしがらないでくださいね。はい?では、大多数の人が経験済みですね。それは良いことです。ただ、皆さんがこのことについてすべてを知っているとは仮定しません。特に、深い根底にあるテクニックの多くをご存じだとは仮定しません。はい、ではこれがコースの計画です。皆さんの話を聞いて調整できますし、以前に触れたことがあって自明すぎると思うセクションは速く進めたり、他のこともできます。

[3:52] では、教師あり学習、ニューラルネット、深層学習の入門です。今日はそれについて話します。深層学習にできること、できないこと、良い特徴とは何か。深層学習とは表現を学習することです。それが今日話すことです。来週は誤差逆伝播と基本的なアーキテクチャの構成要素についてです。つまり、ニューラルネットを互いに接続したモジュールから構築するという事実などです。そして勾配を計算し、自動微分を得ます。さらに、さまざまな種類のアーキテクチャ、損失関数、活性化関数——さまざまなモジュールです。重み共有や重みの結び付け、乗法的相互作用、アテンションゲーティング——こういったことです。

[4:33] そして特定のマクロアーキテクチャ、例えば混合エキスパート、シャムネット、ハイパーネットワークなどです。かなり早く踏み込みますが、そういったものをすでに触ったことがあるなら適切でしょう。次に、畳み込みネットとその応用について、一回か二回の講義があります——まだ完全には決めていません。そのうち一つはゲスト講義になるかもしれません。そして、より具体的には、特別な場合に有用な深層学習アーキテクチャについてです。

[5:06] 例えば、時間方向の誤差逆伝播を伴うリカレントニューラルネット、これがリカレントニューラルネットを訓練する方法です。そして……そして……リカレントニューラルネットの制御や時系列生成などへの応用です。次に、リカレントとゲーティングと乗法的相互作用を組み合わせたもの、例えばゲート付きリカレントユニットやLSTMです。そして、乗法的相互作用をアーキテクチャの基盤として本当に活用するもの、例えばメモリネットワーク、トランスフォーマー、アダプターなどで、これらはごく最近のアーキテクチャで、NLPや他の分野で非常に人気になっています。そして、グラフニューラルネットについて少しだけです。これはあまり多く話しません。なぜなら、Joan Brunaによる別のコースがあり、そこでグラフニューラルネットに多くの時間を費やしているからです。

[6:06] 次に…次に、それらの深層学習システムをどうやって機能させるかについてお話しします。そして、それらを機能させるためのさまざまな工夫についてです。ニューラルネットで行われる最適化の種類をある程度理解することですね。ですから… …その種類の…ご存知の通り、私たちはもちろん…学習とは常に、ほとんど常に、最適化に関するものです。そして深層学習はほとんど常に勾配ベースの最適化に関するものです。そして凸の場合の最適化については、よく理解されている一定の規則があります。

[6:40] しかし、訓練が確率的である場合、つまりほとんどの深層学習システムの場合には、それらはよく理解されていません。また、深層学習ではあまりよく理解されていません。なぜなら、コスト関数が…凸ではないからです。局所最小値や鞍点などがあるのです。ですから、目的関数の幾何学的構造を理解することが重要です。理解することが重要だと言いましたが、ここでの大きな秘密は、実際には誰も理解していないということです。ですから…誰も理解していないということを理解することが重要です。いいですか?しかし、直感と少しの理論的解析、そして経験的探索の組み合わせによって生まれてきたいくつかの工夫があります。初期化の工夫、正規化の工夫、そしてドロップアウトのような正則化の工夫などです。

[7:29] (勾配クリッピングはどちらかというと最適化向けです。)モメンタム、平均H D D、H D Dを並列化するさまざまな方法などです。その多くは機能しません。そして、ターゲットプロップやバックプロップのラグランジュ定式化と呼ばれる、少し風変わりなものもあります。次に、私の好きな話題であるエネルギーベースモデルに移ります。これは、教師あり、教師なし、自己教師ありを問わず、さまざまな学習アプローチの一種の一般的な定式化です。そして、推論のようなものを含むかどうかもです。

[8:04] たとえば、誰も値が教えてくれないけれど、あなたのプロセス、あなたのシステムが推論することになっている変数の値を探索することなどです。ですから、これはニューラルネットで推論を実装する一つの方法と考えることができます。つまり、ニューラルネットにおける推論とは、あるエネルギー関数がいくつかの変数に関して最適化されるプロセスと考えることができます。そして、この最適化の結果として得られる値が、見つけようとしていたそれらの変数の値なのです。そして、ニューラルネットは単に入力を関数として出力を計算する関数にすぎないという一般的な見方があります。ですから、ニューラルネットを通して実行すれば、出力が得られます。

[8:43] しかし、これは与えられた入力に対して一つの出力しか生成できないという意味で、かなり制限された推論の形式です。しかし、多くの場合、与えられた入力に対して複数の可能な答えが存在します。では、複数の答え、複数の可能な答えが存在するこの種の問題をどのように表現するのでしょうか?これに対する一つの答えは、それらの答えをあるエネルギー関数の極小値にし、推論アルゴリズムがこの目的関数を最小化する変数の値を見つけるというものです。そして、複数の極小値が存在するかもしれません。つまり、モデルが与えられた入力に対して複数の出力を生成する可能性があるということです。よろしいですか?

[9:21] そこで、エネルギーベースモデルは、これを実現する一つの方法です。エネルギーベースモデルの特殊なケースが確率モデルです。例えば、ベイズ手法、グラフィカルモデル、ベイジアンネットワークなどです。エネルギー手法はもう少し一般的です。つまり、少しだけ抽象的でないということです。この特殊なケースには、かつて構造予測と呼ばれていたものが含まれます。そして、これはいわゆる自己教師あり学習において多くの応用があります。そして、それが次の数回の講義のトピックになります。自己教師あり学習は、今日非常に活発な研究トピックです。

[9:57] そしておそらく、将来本当に支配的になるものです。すでに……一年の間に、自然言語処理の分野で支配的になりました。そして、ここ数か月、わずか三か月の間に、自己教師あり学習の手法がコンピュータビジョンなどでも実際に非常にうまく機能することを示すいくつかの論文が出ました。ですから、私の推測では、自己教師あり学習は世界を席巻するでしょう。今後数年のうちに。ですから、このクラスでそれについて聞くのは有益だと思います。例えば——。これのリストを全部見ていくつもりはありませんが——あります。皆さんが聞いたことがあるかもしれないもの、例えば変分オートエンコーダ、ノイズ除去オートエンコーダ、BERT、つまり自然言語処理のために訓練されたトランスフォーマーアーキテクチャなどです。これらは自己教師あり学習で訓練されており、ノイズ除去オートエンコーダの特殊なケースです。

[10:45] ですから、そうしたものの多くは、それらがすべてある種の…そういうものだったと気づかないうちに耳にしたことがあるかもしれません。それらはすべて、この種のエネルギーに基づくアプローチという文脈で理解できます。それには、多くの方が聞いたことがあるであろう生成的敵対ネットワーク(GAN)も含まれます。さらに自己教師あり学習などもあります。では、どうすれば機械を本当に知能の高いものにできるのでしょうか。彼らは超知能ではありません。現時点ではあまり知能が高くありません。非常に狭い問題を非常にうまく解くことができ、時には人間を超える性能を発揮します。しかし、常識を持っている機械はありません。そして、私たちが持つ最も知能の高い機械でさえ、おそらく家猫よりも常識が少ないのです。では、まず猫レベルの知能に到達し、それからおそらく人間レベルの知能に到達するにはどうすればよいのでしょうか。

[11:29] そして、私が答えを持っているふりをするつもりはありませんが、私は…自己教師あり学習の文脈で議論するのが興味深いいくつかのアイデアを持っています。いくつか応用例もあります。質問はありますか。これがコースの計画です。はい。動的に変わるかもしれません。しかし、少なくともそれが意図です。質問はありますか。…はい…[学生からの質問:コースでも課題はありますか?]はい、はい、課題があります。

[12:00] […聞き取れず…]はい、ではアルフレドの声が小さかったので聞こえなかった方のために:最終プロジェクトは実際にはチーム間の競争になります。ですから、リーダーボードなども用意されます。そして、その準備として、課題は基本的に、深層学習全般に必要となるすべての技術に慣れるための練習となりますが、特に最終プロジェクトのための練習でもあります。

[12:46] [中間試験のためでもあります。]そうです、もちろん中間試験のためでもあります。はい、ではおそらくほとんどの方はご存じでしょうが、すでにそうしたものを触ったことがある方には退屈かもしれませんが、基本から始めましょう。深層学習は、人々が脳について観察したことから着想を得ていますが、その着想はあくまで着想にすぎません。脳をコピーしようとする試みではありません。なぜなら、脳には無関係な細部がたくさんあり、それらが実際に人間の知能に関係するかどうかはわからないからです。ですから、着想は概念的なレベルでのものなのです。

[13:18] そして、これは鳥に触発された飛行機と少し似ています。しかし、鳥と飛行機の飛行の基本原理は本質的に同じですが、細部は大きく異なります。どちらも翼を持っています。どちらも空気中を進むことで揚力を生み出しますが、飛行機には羽毛がなく、翼を羽ばたかせません。ですから、少し同じ考え方です。この歴史は、ほとんど消えかけた、あるいは少なくとも今は名前が変わったサイバネティクスと呼ばれる分野にさかのぼります。サイバネティクスの歴史の専門家が必要なら、彼がそこに座っています。ジョー・レメリンです。手を挙げてもらえますか?

[13:57] つまり、ジョーは実は哲学者です。そして彼は関心があり――実際にAIの歴史についてのゼミを持っています。これは何学部ですか?[ジョー:メディア・文化・コミュニケーション。] メディア・文化・コミュニケーション。つまり、コンピュータサイエンスではありません。彼はサイバネティクスの歴史についてすべて知っています。それは40年代に二人の紳士、マカロックとピッツから始まりました。彼らの写真はここ右上にあります。そして彼らは、当時の人々は論理学に関心を持っていたが、神経科学は非常に初期段階の分野だったという考えに至りました。

[14:32] そして彼らは、ニューロンが基本的にオンかオフの閾値単位であるなら、ニューロン同士を接続することでブール回路を構築でき、基本的にニューロンで論理的推論ができるという考えを得ました。そこで彼らは言います:脳は基本的に論理的推論マシンである、なぜならニューロンは二値だからです。そしてこの考え――つまり、ニューロンは入力の重み付き和を計算し、その重み付き和を閾値と比較するという考えです。閾値を上回ればオンになり、下回ればオフになります。

[15:05] これは実際のニューロンの働きを簡略化した見方です――非常に、非常に簡略化した見方です。そのモデルは何十年もの間、この分野に定着しました。ほぼ四十年です。実際、まるまる四十年です。それから、ほぼ同時期にドナルド・ヘッブが、脳内のニューロン――脳はシナプスと呼ばれるニューロン間の接続の強さを変えることで学習するという古い考えです。そして、今ではヘッブ学習と呼ばれる考え、つまり二つのニューロンが同時に発火すればそれらを結ぶ接続が強まり、同時に発火しなければ弱まるかもしれないという考えを持っていました。

[15:50] それは学習アルゴリズムのアイデアではありませんが、おそらく最初のアイデアのようなものです。そして、サイバネティックスはこのノーバート・ウィーナーという人物によって提唱されました。彼はここにいます。[右下] これは、センサーとアクチュエーターを持つシステムによって、フィードバックループを持ち、自己調整システムを持つことができるという全体のアイデアです。そして、その背後にある理論は何でしょうか? 今ではそれを当然のことと考えていますが。しかし、例えばこういうことです:車を運転しますよね? ハンドルを切ると、いわゆるPIDコントローラーが、ステアリングホイールを切った量に比例して実際に車輪を動かします。

[16:36] そしてそれは基本的にステアリングホイールの位置を測定し、車の車輪の位置を測定するフィードバック機構です。そして、両者に差があれば、車の車輪を修正してステアリングホイールの向きに合わせます。それがフィードバック機構です。その安定性と、これに関する規則は、基本的にすべてこの研究に最初に由来します。それがフランク・ローゼンブラットという人物が、非常に単純なニューラルネットの重みを変更する学習アルゴリズムを思い描くことにつながりました。そしてここ下の二枚の写真[左下]に見えるのは:これがフランク・ローゼンブラットで、これがパーセプトロンです。これは物理的なアナログコンピューターでした。今のように三行の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]、出力が望むものに近づくようにつまみを調整します。ニューラルネットの秘訣は、出力が望むものに近づくように、どの方向にどれだけつまみを調整すればよいかをどう見つけるか、という点にあります。それが勾配計算と誤差逆伝播法の役割です。しかしそこに進む前に、もう少し歴史を振り返りましょう。分類のための基本的なモデルが次々と登場しました。ご存じのとおり、パーセプトロンから始まり、ここ右上にあるアダラインと呼ばれる競合モデルもありました。それらは同じ種類の基本アーキテクチャに基づいています。入力の重み付き和を計算し、しきい値と比較します。しきい値を上回ればオン、下回ればオフになります。

[24:45] ここでご覧になっているアダラインで、バーニー・ウィドローが調整しているのは、実は物理的なアナログコンピュータです。ですからパーセプトロンのようなもので、多くの点でずっと小さなものでした。この話をする理由は、パーセプトロンが実は二層のニューラルネットだったからです。二層のニューラルネットで、第二層は適応重みを持つ学習可能な層でした。しかし第一層は固定でした。実際、ほとんどの実験では、ランダムに決められていました。たとえば、画像の入力ピクセルを、本質的にランダムな重みを持つしきい値ニューロンにランダムに接続する、といった具合です。

[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] しかし説明しましょう。百万個の訓練サンプルからなる訓練セットを渡すとします。それは実際には10,000個のサンプルの同じ訓練サンプルの100回の繰り返しです。いいですか。つまり、実際のサンプルは10,000個の訓練サンプルです。それを100回繰り返して、それをシャッフルしたと主張します。これが百万個の訓練サンプルからなる私の訓練セットだと言います。すると、完全な勾配を計算すると、同じ値を百回計算することになります。必要以上の百倍の計算を費やすことになります。

[38:09] それを知らずに。いいですか。つまり、これは繰り返しがあるからこそ機能します。しかし、機械学習のより通常の状況でも機能します。サンプルに多くの冗長性がある場合、たとえば非常に多くのサンプルが互いに非常によく似ている場合などです。つまり、何らかの一貫性があれば——システムが汎化できるのであれば——確率的勾配の方が効率的になるということです。確率的勾配を使わなければ、その冗長性を活用できないからです。これがノイズが有利に働く一つのケースです。

[38:46] はい。数式には気を取られないでください。怖がらないでください。これについては後でもっと詳しく戻ってきますから。でも、なぜ誤差逆伝播法は誤差逆伝播法と呼ばれるのでしょうか?繰り返しますが、これはとても非公式な説明です。基本的には連鎖律の実用的な応用です。ですから、先ほどお見せしたタイプのニューラルネットは、互いに積み重ねられたたくさんのモジュールとして考えることができます。そしてこれは関数の合成と考えることができます。皆さんは微積分の基本ルールをご存じですよね。ある関数を別の関数と合成したものの導関数はどう計算するか、ということです。

[39:22] そう、FをGと合成したものの導関数は、GのXにおける点でのFの導関数に、Xにおける点でのGの導関数を掛けたものです。そうです。つまり二つの導関数の積が得られます。これは同じことですが、関数がスカラー関数ではなくベクトル関数である点が異なります。入力としてベクトルを受け取り、出力としてベクトルを返します。もっと一般的には、実は多次元配列を入力として受け取り、多次元配列を出力として返しますが、それは重要ではありません。基本的に、複数の入力と複数の出力を持ち、関数として見なせる関数的モジュールの場合における、この連鎖律の一般化とは何でしょうか?そうです。

[40:06] そして基本的には、盲目的に適用すれば同じルールです — 通常の導関数に適用するのと同じルールです。(ただしここでは偏導関数を使う必要があります。)最終的に目にするのは、こういうことです。望む出力と得られる出力の差、つまり目的関数の値を、ネットワーク内の任意の変数に関して微分したいなら、導関数を後ろ向きに伝播させ、途中で掛け合わせていく必要があります。

[40:37] わかりました。来週はこれについてもっと正式に扱います。今のところは、なぜ誤差逆伝播法と呼ばれるのかだけ分かっていれば十分です。複数の層に適用されるからです。さて、先ほどお見せしたこのニューラルネットの図は素敵ですが、入力が実際に画像だったらどうでしょうか?そうです。画像は、比較的低解像度のものでも、通常は一辺が数百ピクセルあります。

[41:12] はい。では、256×256だとしましょう。適当な例として。はい、車の画像:256×256。つまり65,536ピクセルあり、それに三つを掛けます。なぜならR、G、Bの成分があり、各ピクセルに三つの値があるからです。ですから、およそ二十万の値になります。はい、ここでのベクトルは二十万の成分を持つベクトルです。このベクトルを掛ける行列があるなら、その行列は二十万行を持たなければなりません——。列です、失礼。

[41:50] そして最初の層にいくつのユニットがあるかによって、200,000×、ええと、おそらく大きな数になります。それは巨大な行列です。そうです。たとえ200,000×100,000であっても。ですから最初の層で圧縮があるわけですが、それはすでに非常に多くの——非常に大きな行列です:数十億。ですからこれを完全な行列として考えるのは実際的ではありません。画像のようなものを扱いたいなら、この行列の構造について何らかの仮説を立て、すべてをすべてに接続する完全な行列ではないようにする必要があります。

[42:33] それは非現実的でしょう。少なくとも多くの実用的な応用では。ここで脳からのインスピレーションが再び登場します。1960年代に、ここの上部の紳士たち、ヒューベルとウィーゼルによる神経科学の古典的な研究がありました。彼らは実際に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年代のヒューベルとウィーゼルから着想を得て、コンピュータ上にニューラルネットモデルを構築しました。そこには層があるという考えに加え、ヒューベルとウィーゼルが発見した、個々のニューロンは視野のごく一部にしか反応しないという考えも取り入れられています。

[48:22] そこで彼らはV1のニューロンに電極を刺し、このV1のニューロンは視野のごく狭い領域に現れるモチーフにのみ反応することに気づきました。そして隣のニューロンは、最初の領域に隣接する別の領域に反応します。つまりニューロンは網膜トピックと呼ばれる方法で組織されており、隣接するニューロンは視野の隣接する領域に反応するのです。さらに彼らが気づいたのは、視野の同じ領域に反応するニューロンの集団が、特定の方向のエッジに対してオンになることです。あるニューロンは受容野に垂直なエッジがあればオンになり、隣のニューロンはエッジが少し傾いていればオンになり、その隣はエッジが少し回転していればオンになる、といった具合です。

[49:09] そして、V1に関するこの描像、つまり基本的に方向選択性であり、局所視野を見てから方向に反応するニューロンという描像がありました。そして、複数の方向に反応するそれらのニューロンのグループは、視野全体にわたって複製されています。そこで福島氏はこう言いました。「ならば、これを行うニューラルネットを構築してみようではないか。必ずしも自分のシステムが方向性特徴を抽出することを主張するつもりはないが、何らかの教師なし学習アルゴリズムを使って訓練しよう」と。つまり、彼は自分のシステムをエンドツーエンドで訓練していたのではありません。何らかの教師なしの方法で、層ごとに訓練していたのです。その詳細には立ち入りません。

[49:48] そして彼は別の概念を使いました。つまり、それらのニューロンが視野全体にわたって複製されているという概念を使い、さらにヒューベルとウィーゼルから別の概念を使いました。複雑細胞と呼ばれるものです。複雑細胞とは、多数の単純細胞、すなわち方向選択性を持つ単位の活動をプールするユニットです。そして、方向付けられたエッジが少し移動すると異なる単純細胞が活性化しますが、複雑細胞はそれらすべての単純細胞からの出力を統合するため、エッジがその受容野を越えて移動するまで活性化したままになります。

[50:32] つまり、それらの複雑細胞は表現に少しのシフト不変性をもたらします。エッジを少しシフトしても、それらの複雑細胞の一つの活性は変化しません。これが、今でいう畳み込みネットワークにおける「畳み込み」と「プーリング」です。そして、それが基本的に、80年代半ばあるいは80年代後半に私が畳み込みネットワークを考案するきっかけとなりました。つまり、それらは基本的に、接続が局所的であり、視野全体にわたって複製され、それらの局所特徴を検出する特徴検出層とプーリング操作を交互に配置したネットワークです。これについては三週間後に詳しく話します。

[51:21] ですから、すべての詳細に立ち入るつもりはありません。しかし、これはヒューベル、ウィーゼル、福島のこのアイデアを再利用しています(ポインタを動かせればいいのですが)。基本的に、一つの層の各ニューロンは入力の小さな領域の重み付き和を計算し、その重み付き和はそれらの重みを使います。しかし、それらの重みは複製されており、層の各ニューロンは同じ重みのセットを使います。これが重みの結び付け、すなわち重み共有のアイデアです。

[51:57] そこで誤差逆伝播を使って、このようなニューラルネットを訓練し、手書き数字を認識できるようにしました。これは80年代後半から90年代初頭の話です。そしてこれは私が皆さんと同じくらいの年齢、少し上かもしれません。この動画では私は三十歳くらいです。そしてこれはベル研究所で働いていた頃の私の電話番号です。もう使えません。ニュージャージーの番号です。キーを押すと、386のPC上で特別なアクセラレータカードで動くこのニューラルネットが、先ほどアニメーションでお見せしたものと非常によく似たニューラルネットを動かして、それらの文字を認識します。

[52:34] そしてこのシステムは、どんなスタイルの文字でも、非常に奇妙なスタイルでも、さらに奇妙なスタイルでも認識できました。当時これはある意味新しいことでした。なぜなら、文字認識、あるいは一般にパターン認識はまだ「特徴を抽出し、その上で分類器を訓練する」というモデルに基づいていたからです。そしてこれは基本的に、タスク全体をエンドツーエンドで学習できました。

[53:08] つまり基本的に、そのニューラルネットの最初の数層が特徴抽出器の役割を果たすのですが、それはデータから訓練されました。文字認識を使った理由は、データがあったのがこれだけだったからです。十分なデータがあった唯一のタスクは、文字認識か音声認識でした。音声認識の実験はある程度成功しましたが、それほどでもありませんでした。すぐに、これらの畳み込みネットを個々の文字の認識だけでなく、複数の文字を一度に認識するのにも使えることに気づきました。そして、このネットワークの畳み込み的な性質のおかげで——これについては三回目の講義でまた戻ります——基本的にそうしたシステムを大きな画像に適用でき、視野の中に認識できる形を見つけるたびに反応するようになりました。

[54:02] つまり基本的に、大きな画像があるとき、小さな入力窓を持つ畳み込みネットを訓練し、それを画像全体の上でスライドさせます。そして反応したときには、訓練した対象を検出したということです。ここではこのシステムは、同時にセグメンテーションと認識を行うことができます。それ以前は、パターン認識の研究者たちは、個々の対象を背景から、また互いから分離し、それぞれの対象、たとえば文字を認識器に送る明示的なプログラムを持っていました。しかしこれを使えば、両方を同時に行えます。

[54:35] 心配する必要はありません。そのための特別なプログラムを作る必要もありません。特にこれは、顔検出や歩行者検出などの自然画像に応用できます。そう、同じことです。顔がある画像と顔がない画像を区別するように畳み込みネットを訓練し、これを数千の例で訓練してから、そのウィンドウを画像上でスライドさせます。オンになったところに顔があります。もちろん、顔がウィンドウより大きいこともあるので、画像をサブサンプリングします。画像を小さくして、ネットワークをもう一度スライドさせ、さらに小さくして、またネットワークをスライドさせます。これで、サイズに関係なく顔を検出できます。

[55:15] なるほど。特にこれを使ってロボットを動かすことができます。これはディープラーニングが普及する前に行われていたことです。ここでのネットワークは畳み込みネットです。これは、走行中のロボットのカメラから来る画像に適用されます。そして、小さなウィンドウ、例えば40×40ピクセル程度、あるいはそれ以下の各ウィンドウについて、そのウィンドウの中心ピクセルが地面にあるか障害物であるかを分類しようとします。

[55:48] 地面にあると分類されたものは緑です。障害物と分類されたものは赤か紫で、障害物の足元にある場合は紫です。そしてこれを、上部に見える地図にマッピングできます。次に、特定の目標に到達するためにこの地図で計画を立て、これを使ってナビゲートします。こちらは二人の元博士課程の学生です。右がラヤ・ハドセル、左がピエール・セルマネで、この可哀想なロボットを困らせています。

[56:20] 実際にコードを書いて訓練したので、ロボットが彼らの脚を折ることはないとかなり確信しています。ピエール・セルマネはカリフォルニアのGoogle Brainの研究科学者で、ロボティクスに取り組んでいます。ラヤ・ハドセルは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上で畳み込みネットを実装するのに多くの時間を費やしました。完全に新しかったわけではありませんが、非常に高性能になり始めていました。彼はそうしたハッキングがとても得意で、それによって誰よりもはるかに大規模なニューラルネット、畳み込みネットを訓練できるようになりました。

[1:01:44] そして彼らはそれを使ってImageNetデータセットで訓練しました。ImageNetデータセットは自然写真の集まりです。システムは写真の中の主要な物体を1,000の異なるカテゴリの中から認識することになっています。訓練セットには1.3万のサンプルがありました。かなり大規模です。そこで彼らがやったのは、以前と同じモデルにほぼ基づいた、非常に大規模で非常に深い畳み込みネットをGPU上に実装して構築し、数週間動かすことでした。それによって、彼らは最高の競合システムの性能を大差で上回りました。これは2010年にさかのぼるImageNetでのエラー率です。2010年にはトップ5で約28%のエラーでした。

[1:02:35] つまり、基本的には正しいカテゴリが1,000の中の上位5に入っていないとエラーになるわけです。はい、ですからこれは一種の緩やかな誤差指標ですね。2011 それが25.8%だった頃、これを実現できたシステムは実に非常に大規模でした。ある種の畳み込みネットに似ていましたが、学習されていませんでした。つまり最後の層だけが学習されたのです。そしてジェフと彼のチームがそれを16.4%まで下げ、それがコンピュータビジョン界にとっての転換点となりました。多くの人が、これでこの仕組みが機能することが分かったと言いました。

[1:03:18] そして界隈全体が、2011や2012ではニューラルネットを含む論文をすべて拒否するという状態から、2016では畳み込みネットを含まない論文をすべて拒否するという状態へと変わりました。つまり今やそれが新しい宗教なんです。コンブネットを何らかの形で使わない限り、コンピュータビジョンの会議で論文を通せません。そして誤差率は本当に急速に下がり、人々はそういったものをより良く機能させる様々な可愛らしいアーキテクチャ上の工夫を発見しました。そこで見られたのは、層の数の膨張でした。

[1:03:56] ですから私の90年代の畳み込みネットは7層ほどで、2000年代初頭のものでした。そしてAlexNetは、そうですね、12でした。その翌年のVGGは19でした。GoogLeNetは数え方が難しいので何層か分かりません。そして現在の物体認識の主力、人々がバックボーンと呼ぶ標準的なものは50層です。ResNet-50と呼ばれています。しかし中には、そうですね、100層ほどのネットワークもあります。

[1:04:29] それでアルフレドが数年前に作ったこのチャートは、それぞれの塊が特定のネットワークアーキテクチャであることを示しています。横軸は出力を計算するのに必要な数十億回の演算数です。はい、それらは本当に巨大です。数十億の接続です。縦軸はImageNetでのトップ一の精度です。ですから先ほどお見せしたものとは異なる性能指標です。今日の最高のシステムは84あたりです。

[1:05:01] そして塊の大きさはメモリ占有量、つまり重みの値を保存するために必要な数百万単位の浮動小数点数です。今では人々はそういったものを圧縮するのがとても上手で、例えば量子化したりしています。そしてGoogleやFacebookなどには、そういったネットワークの最適化と圧縮だけを専門に行い、高速に動作できるようにするチームが丸ごと存在します。というのも、ざっくりした目安として、例えばFacebookがサーバー上で一日に畳み込みネットを実行する回数は数百億回に達します。

[1:05:44] なるほど。つまり、これに必要な計算量を最適化する大きな動機があるわけです。その理由の一つは… 畳み込みネットワークがこれほど成功している理由の一つは、自然データの性質である合成性を活用しているからです。合成性とは、場面が物体から構成され、物体が部品から構成され、部品がさらに小さな部品から構成され、小さな部品は実にモチーフの組み合わせであり、モチーフは輪郭やエッジ、あるいはテクスチャの組み合わせである、という性質のことです。

[1:06:33] そしてそれらは単なるピクセルの組み合わせです。つまり、いわゆる合成的な階層構造があり、階層のある層における物体の特定の組み合わせが、次の層の物体を形成するのです。ですから、この合成的な階層構造をネットワークのアーキテクチャで模倣し、ある層の特徴の適切な組み合わせを学習させて、次の層の特徴を形成するようにする、それがまさに深層学習なのです。

[1:07:06] なるほど。世界を表現し、世界の構造を活用することを学ぶこと、そしてその世界とは、世界には組織化が存在するという事実、つまり世界が合成的であるということです。ブラウン大学のスチュアート・ジェマンという統計学者がこう言いました。彼はアインシュタインの有名な言葉をもじったのですが、アインシュタインは「世界について最も理解しがたいことは、世界が理解可能であるということだ」と言いました。つまり、世界が取り得る複雑な事柄の中で、世界は極めて複雑であり得て、私たちにはそれを理解する方法がないほど複雑かもしれないのです。

[1:07:42] そして、少なくとも世界の一部を理解できるというのは、陰謀のように見えます。そこでスチュアート・ジェマン版の言葉は、世界は合成的である… さもなければ神が存在する、というものです。(なぜなら、世界が合成的でなければ、それを理解するには超自然的なものが必要だからです。)ですから、これがコンピュータビジョンなどの分野で信じられないほどの進歩をもたらしました。ご存じのとおり、人々を信頼性の低い形で識別することから、検出できるようになり、あらゆる物体のマスクを正確に生成し、さらにはポーズを把握し、それをモバイルプラットフォーム上でリアルタイムに行うことまでできるようになったのです。

[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を見るために、それを2次元画像にスライスする必要がありません。

[1:12:56] 彼らは3次元のボリューム全体を見ることができます。これはこのものが使用する一つの特性です。MRI画像のボリューム全体を見て、その後生成する3次元畳み込みネットで、以前にお見せしたのと非常によく似た技術を意味的セグメンテーションに使用します。そして出力画像上で、何かがあるところ、ここでは大腿骨ですが、どこでもオンにします。これはそれが生成する種類の結果です。2次元スライスよりも3次元でより良く機能します。または、マンモグラムで悪性腫瘍を検出したときにオンにすることもできます。(これは2次元で、3次元ではありません。)

[1:13:37] そして、医用画像には他にもさまざまなプロジェクトが進行中です。はい。科学や物理学、バイオインフォマティクスなど、さまざまな応用があり、それについてはまた戻ってきますので… はい。というわけで、深層学習には多くの謎があります。完全な謎ではありません。なぜなら人々はこれらすべてについてある程度の理解を持っているからです。しかし、すべてに対して良い理論があるわけではないという意味で謎なのです。

[1:14:11] なぜそれらはそんなにうまく機能するのでしょうか?私が深層学習が良いアイデアだと世界を説得しようとしていた何年も前、理論家たちが尋ねていた大きな疑問の一つは、こうでした:たった二層でどんな関数でも近似できるのに、なぜそれ以上必要なんですか?と彼らは私に言いました。これについてはすぐ後で戻ります。畳み込みネットの何がそんなに特別なのでしょうか?私は自然画像、あるいは一般に自然データの合成性について話しました。これは音声や信号の値、自然信号にも当てはまります。しかし、少し作為的に思えます。

[1:14:45] 最小化している目的関数が非常に非凸であるにもかかわらず、どうやってシステムを訓練できるのでしょうか。多くの局所最小値があるかもしれません。これは昔、ニューラルネットを触ったこともない人々がニューラルネットに対して投げかけていた大きな批判でした。例えば、アルゴリズムが収束する保証はない、怖すぎる、使わない、といった具合です。そして最後の疑問は、なぜ私たちのニューラルネットの訓練方法は、統計学の教科書が教えるすべてを破壊するのか、ということです。

[1:15:19] 統計学の教科書はすべてこう教えています:n個のデータ点があるなら、パラメータはn個を超えるべきではない、さもないと猛烈に過学習する、と。正則化するかもしれません。ベイズ主義者なら事前分布を導入するかもしれません。しかし…(それは等価ですが)どんな保証があるのでしょうか?そしてニューラルネットでは、ニューラルネットは極端に過剰パラメータ化されています。私たちは日常的に数億のパラメータを持つニューラルネットを訓練しています。それらは実運用で使われています。そして訓練サンプルの数はそれには全く及びません。どうしてそれが機能するのでしょうか?

[1:15:53] しかし機能します!では、今日ディープラーニングでできること:より安全な車、より良い医療分析、医療画像分析システム、かなり良い言語翻訳(完璧には程遠いが有用)、馬鹿げたチャットボット、非常に優れた情報検索・取得・フィルタリングなどが可能です。今日のGoogleやFacebookは完全にディープラーニングを中心に構築されています。そこからディープラーニングを取り除けば、それらは崩壊します。

[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と比較します。つまり、訓練サンプルを取ります。例えば千個あるとしましょう。すると千個のX^iがあり、i = 1 から 1,000 までで、XとX^iを比較する関数Kがあります。

[1:21:26] 二つを比較する関数の良い例は、XとX^iの内積を取り、その結果を例えば指数関数のマイナス二乗などに通すことです。すると、XとX^iの間の距離の関数としてガウス応答が得られます。つまり、二つのベクトルを比較する方法であり、それが何であっても構いません。そして、入力とすべてのサンプルを比較するこのK関数から出てくるスコアを取り、それらの重み付き和を計算します。そして学習するのは重み、つまりアルファです。

[1:21:59] はい、つまりこれは二層のニューラルネットで、二層目が学習可能で一層目が固定されています。しかし、ある意味で一層目は教師なしで学習されていると考えることもできます。なぜなら、訓練セットのデータを使いますが、Xだけを使い、Yは使わないからです。想像できる最も愚かな方法でデータを使います。つまり、すべてのXを保存し、望むならすべてのXをニューロンの重みとして使うのです。はい。それがサポートベクターマシンです。その背後にある可愛らしい数学について千ページの本を書くこともできます。しかし要点は、一層目が非常に愚かな教師なしの方法で学習され、二層目が単なる線形分類器である二層のニューラルネットだということです。

[1:22:44] つまり、基本的には美化されたテンプレートマッチングです。なぜなら、入力ベクトルをすべての訓練サンプルと比較するからです。ですから、生の画像でコンピュータビジョンをやりたい場合にはうまくいきません。Xが画像で、X^iがImageNetからの百万枚の画像だとしたら、まず第一に、すべての画像を百万枚の画像と比較しなければなりません。賢くやればもう少し少なくできるかもしれませんが、学習の仕方によります。それは非常に高コストになりますし、行っている比較の種類が基本的に問題を解いています。最終的に得られる重み付き和は、本当にケーキの上のチェリーのようなものです。

[1:23:24] 実はその例えをよく使いすぎます。それで… 近似できます。カーネル関数とアルファを調整することで、望む任意の関数を望むだけ近くに近似できるという定理があります。ですから、理論家と話すと、彼らはこう言うでしょう。なぜディープラーニングが必要なのか。カーネルマシンで望む任意の関数を近似できるではないか、と。その和の項数は非常に大きくなる可能性があり、どのカーネル関数を使えるかは誰も教えてくれません。ですから、それでは問題は解決しません。

[1:24:01] 二層のニューラルネットを使えます。はい。これが右上です。一層目は、行列W^0と入力ベクトルの積に非線形関数Fを適用したものです。そして二層目は二番目の行列を掛け、さらに別の非線形性を通します。はい、つまりこれは二つの線形操作と非線形操作の合成です。繰り返しますが、いくつかの条件下では、このようなもので望む任意の関数を近似できることを示せます。中間に十分大きなベクトルがあれば。

[1:24:31] はい、それでは最初の層から出てくるものの次元が、もし十分に高ければ——潜在的に無限であれば——この層を無限に大きくすることで、望むどんな関数でも望むだけ正確に近似できます。ですから、ここでも理論家に話を聞くと、こう言われます。「なぜ層が必要なのか?二層でどんなものでも近似できる」と。しかし、二層で行うのは非常に非常に高コストになりうるという反論があります。そして……

[1:25:03] 一部の方にはおなじみかもしれません。ほとんどの方にはおそらくそうではないでしょう。例えば、論理回路を設計したいとします。論理回路を設計するとき、ANDゲートやORゲート、あるいはNANDゲートがありますよね。NAND、つまり否定ANDだけで何でもできます。そして……どんなブール関数も、たくさんのANDの上にORを重ねた形で書けることを示せます。これは選言標準形(DNF)と呼ばれます。

[1:25:36] つまり、どんな関数も二層で書けます。問題は、ほとんどの関数では、中間層に必要な項の数が入力サイズに対して指数関数的になることです。例えば、Nビットが与えられ、入力文字列の中でオンのビットの数が偶数か奇数かを教える回路を構成するよう求められたとします。これは単純なブール関数で、出力は1か0です。二層で行う場合、中間層に必要なゲートの数は本質的に指数関数的です。

[1:26:09] もしlog(N)層で行うことを許せば、Nは入力ビット数ですが、線形になります。つまり、複数層を使うことを許せば、指数関数的な複雑さから線形の複雑さになります。これはまるで、プログラムを書くときに——こう言いましょう。プログラムを、実行に必要な逐次ステップがたった二つだけになるように書くようなものです。つまり、プログラムには逐次命令が二つしかありません。プログラム内では好きなだけ命令を実行できますが、そのほとんどは並列に実行しなければなりません。そして逐次ステップは二つだけしか許されないのです。

[1:26:52] そして、使える命令の種類は、線形結合や非線形性といった——単純なものです。プログラム全体のようなものではありません。ですからほとんどの問題では、最初のステップで計算しなければならない中間値の数は、入力サイズに対して指数関数的になります。非指数関数的な数の最小項で済む問題はごくわずかです。

[1:27:25] しかし、プログラムを複数のステップで順次実行することを許せば、突然、はるかに単純になるのです。実行は遅くなりますが、メモリはずっと少なくて済みます。必要なもの、つまりリソースはずっと少なくて済みます。ですから、コンピュータ回路を設計する人たちはこれを知っています。例えば、二つの二進数を加算する回路を設計できます。これを行う非常に単純な方法があり、まず最初の二つのビットを取り、それらを加算し、次にキャリーを伝播させます。二番目のビット、二番目のビットの組では、キャリーを考慮に入れることで結果の二番目のビットが得られ、次にキャリーを伝播させ、これを順次行うのです。

[1:28:02] この問題は、加算しようとしている数の大きさに比例した時間がかかることです。そこで回路設計者たちは、基本的にキャリーを事前計算する方法を持っており、それはキャリー先読みと呼ばれ、加算に必要なステップ数は実際にはNではなく、それよりはるかに少なくなります。しかし、それは回路の複雑さ、つまりチップ上で占める面積が大幅に増加するという犠牲を伴います。ですから、この時間と空間の、あるいは深さと…の間の交換なのです。

[1:28:42] そして、一種の、時間は知られています。では、何を深いモデルと呼ぶのでしょうか。例えば、二層のニューラルネット、つまり隠れ層が一つのものは、技術的には誤差逆伝播を使っていても、私は「深い」とは呼びません。しかし、複雑な表現を実際には学習しません。ですから、深層学習にはこの階層という考え方があります。SVMは間違いなく深くありません。複雑なカーネルを学習しない限りは、しかしそうなるともはやSVMではありません。では、良い特徴とは何でしょうか。良い表現とは何でしょうか。

[1:29:20] ここで、私が好きな例を挙げます。多様体仮説と呼ばれるものがあり、それは自然なデータが… 例えば、1,000×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を推奨するものでもありません。VidleafはAIによる句読点とAI生成の要約を追加しました。元の文言はこのページで引き続きご覧いただけます。

あなたは制作者または権利者ですか?訂正や削除をご希望の場合はこちら:copyright@vidleaf.app(このページについてをご覧ください)。

最終更新