ニューラルネットワークの歴史と手法3

2.4K Views

June 01, 22

スライド概要

大学院で使っているニューラルネットワークの資料です.深層ニューラルネットワークを取り扱っています.

この資料はあまり掘り下げていません.最新の知見に追いついて行けていないので内容に古い部分があるかもしれません.

profile-image

コンピュータを使って色々計算しています.個人的な技術に関するメモと講義資料が置いてあります.気が向いた時に資料を修正しています. 公立小松大学臨床工学科准教授 https://researchmap.jp/read0128699

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

ニューラルネットワークの 歴史と⼿法3 深層ニューラルネットワーク 公⽴⼩松⼤学 藤⽥ ⼀寿 Ver.20230329 畳み込みニューラルネットワークしか作っていません. 深層ニューラルネットワークは⽇進⽉歩です. ⽇々新たな知⾒が出てきます.これを含めたネットの資 料を鵜呑みにしないようにしましょう. 必ず元論⽂をチェックしましょう!!

2.

ニューラルネットワークの深層化と⾃由 なアーキテクチャの創造

3.

多層パーセプトロンの限界 • 多層化しても性能は上がらなかった. • その結果,ニューラルネットワーク研究は下⽕になっていく. • 下⽕にはなったが,地道な研究はなされていた.

4.

深層ニューラルネットワーク の登場

5.

深層ニューラルネットワークとは • 深層ニューラルネットワークは深いニューラルネットワークのことで ある. • ニューラルネットワークが深いとはニューラルネットワークを構成す る層が多いことを⾔う. 今まで ⼊⼒ 深層ニューラルネットワーク 出⼒ shallow network 出⼒ ⼊⼒ deep network

6.
[beta]
softmax1

Conv
5x5+1(S)

Conv
1x1+1(S)

Conv
1x1+1(S)

MaxPool
3x3+1(S)

Plain Networks. We first evaluate 18-layer and 34-layer
plain nets. The 34-layer plain net is in Fig. 3 (middle). The
18-layer plain net is of a similar form. See Table 1 for detailed architectures.
The results in Table 2 show that the deeper 34-layer plain
net has higher validation error than the shallower 18-layer
plain net. To reveal the reasons, in Fig. 4 (left) we compare their training/validation errors during the training procedure. We have observed the degradation problem - the

softmax2

SoftmaxActivation

FC

AveragePool
7x7+1(V)

DepthConcat

Conv
3x3+1(S)

Conv
1x1+1(S)

We evaluate our method on the ImageNet 2012 classification dataset [36] that consists of 1000 classes. The models
are trained on the 1.28 million training images, and evaluated on the 50k validation images. We also obtain a final
result on the 100k test images, reported by the test server.
We evaluate both top-1 and top-5 error rates.
Conv
1x1+1(S)

4

Conv
1x1+1(S)

4.1. ImageNet Classification

Gaussian connections
Full connection
Subsampling
Full connection

for ImageNet. Left: the
s) as a reference. Midyers (3.6 billion FLOPs).
meter layers (3.6 billion
mensions. Table 1 shows

Conv
5x5+1(S)

DepthConcat

Conv
3x3+1(S)

4. Experiments

Conv
1x1+1(S)

fc 1000

FC

SoftmaxActivation

avg pool

Conv
1x1+1(S)

3x3 conv, 512

AveragePool
5x5+3(V)

3x3 conv, 512

Conv
1x1+1(S)

3x3 conv, 512

MaxPool
3x3+1(S)

MaxPool
3x3+1(S)

Conv
5x5+1(S)
FC

Conv
1x1+1(S)

Conv
1x1+1(S)

MaxPool
3x3+2(S)

DepthConcat

Conv
3x3+1(S)

3x3 conv, 512

Conv
1x1+1(S)

3x3 conv, 512

MaxPool
3x3+1(S)

3x3 conv, 256

Conv
5x5+1(S)

3x3 conv, 512, /2

Conv
1x1+1(S)

DepthConcat

Conv
3x3+1(S)

Conv
1x1+1(S)

Conv
1x1+1(S)

3x3 conv, 256

C5: layer F6: layer
120
84

3x3 conv, 256

FC
SoftmaxActivation

3x3 conv, 256

Conv
1x1+1(S)

3x3 conv, 256

Conv
5x5+1(S)

MaxPool
3x3+1(S)

softmax0

Conv
3x3+1(S)

Conv
1x1+1(S)

DepthConcat

Conv
1x1+1(S)

3x3 conv, 256

Conv
1x1+1(S)

3x3 conv, 256

AveragePool
5x5+3(V)

3x3 conv, 256

Conv
1x1+1(S)

3x3 conv, 256

MaxPool
3x3+1(S)

3x3 conv, 256

Conv
5x5+1(S)

3x3 conv, 256

Conv
1x1+1(S)

FC

Conv
3x3+1(S)

DepthConcat

Conv
1x1+1(S)

3x3 conv, 128

Conv
1x1+1(S)

3x3 conv, 256, /2

MaxPool
3x3+1(S)

3x3 conv, 128

Conv
5x5+1(S)

3x3 conv, 128

Conv
1x1+1(S)

DepthConcat

Conv
3x3+1(S)

MaxPool
3x3+2(S)

Conv
1x1+1(S)

3x3 conv, 128

Convolutions

Conv
1x1+1(S)

Conv
1x1+1(S)

3x3 conv, 128

S2: f. maps
6@14x14

Conv
1x1+1(S)

MaxPool
3x3+1(S)

3x3 conv, 128

Subsampling

Conv
1x1+1(S)

Conv
5x5+1(S)

Our implementation for ImageNet follows the practice
in [21, 41]. The image is resized with its shorter side randomly sampled in [256, 480] for scale augmentation [41].
A 224⇥224 crop is randomly sampled from an image or its
horizontal flip, with the per-pixel mean subtracted [21]. The
standard color augmentation in [21] is used. We adopt batch
normalization (BN) [16] right after each convolution and
before activation, following [16]. We initialize the weights
as in [13] and train all plain/residual nets from scratch. We
use SGD with a mini-batch size of 256. The learning rate
starts from 0.1 and is divided by 10 when the error plateaus,
and the models are trained for up to 60 ⇥ 104 iterations. We
use a weight decay of 0.0001 and a momentum of 0.9. We
do not use dropout [14], following the practice in [16].
In testing, for comparison studies we adopt the standard
10-crop testing [21]. For best results, we adopt the fullyconvolutional form as in [41, 13], and average the scores
at multiple scales (images are resized such that the shorter
side is in {224, 256, 384, 480, 640}).

Convolutions

Conv
1x1+1(S)

Conv
1x1+1(S)

3x3 conv, 128

3.4. Implementation

C1: feature maps
6@28x28

Conv
1x1+1(S)

Conv
3x3+1(S)

DepthConcat

Conv
1x1+1(S)

3x3 conv, 64

INPUT
32x32

Conv
1x1+1(S)

Conv
1x1+1(S)

3x3 conv, 128, /2

Conv
1x1+1(S)
DepthConcat

3x3 conv, 64

MaxPool
3x3+1(S)

3x3 conv, 64

Conv
5x5+1(S)

3x3 conv, 64
Conv
1x1+1(S)

3x3 conv, 64

Conv
3x3+1(S)

pool, /2

Conv
1x1+1(S)

MaxPool
3x3+2(S)

LocalRespNorm

Conv
3x3+1(S)

Conv
1x1+1(V)

3x3 conv, 64

Conv
1x1+1(S)

MaxPool
3x3+2(S)

neurons in a kernel map). The second convolutional layer takes as input the (response-normalized
and pooled) output of the first convolutional layer and filters it with 256 kernels of size 5 ⇥ 5 ⇥ 48.
The third, fourth, and fifth convolutional layers are connected to one another without any intervening
pooling or normalization layers. The third convolutional layer has 384 kernels of size 3 ⇥ 3 ⇥
256 connected to the (normalized, pooled) outputs of the second convolutional layer. The fourth
convolutional layer has 384 kernels of size 3 ⇥ 3 ⇥ 192 , and the fifth convolutional layer has 256
kernels of size 3 ⇥ 3 ⇥ 192. The fully-connected layers have 4096 neurons each.
7x7 conv, 64, /2

Residual Network. Based on the above plain network, we
insert shortcut connections (Fig. 3, right) which turn the
network into its counterpart residual version. The identity
shortcuts (Eqn.(1)) can be directly used when the input and
output are of the same dimensions (solid line shortcuts in
Fig. 3). When the dimensions increase (dotted line shortcuts
in Fig. 3), we consider two options: (A) The shortcut still
performs identity mapping, with extra zero entries padded
for increasing dimensions. This option introduces no extra
parameter; (B) The projection shortcut in Eqn.(2) is used to
match dimensions (done by 1⇥1 convolutions). For both
options, when the shortcuts go across feature maps of two
sizes, they are performed with a stride of 2.

Figure 2: An illustration of the architecture of our CNN, explicitly showing the delineation of responsibilities

between the two GPUs. One GPU runs the layer-parts at the top of the figure while the other runs the layer-parts
at the bottom. The GPUs communicate only at certain layers. The network’s input is 150,528-dimensional, and
the number of neurons in the network’s remaining layers is given by 253,440–186,624–64,896–64,896–43,264–
4096–4096–1000.
LocalRespNorm

image

Conv
7x7+2(S)

input

Figure 3: GoogLeNet network with all the bells and whistles

7

34-layer residual

例
Sharrow network

C3: f. maps 16@10x10
S4: f. maps 16@5x5
OUTPUT
10

LeNet-5 (1998)

AlexNet (2012)

GoogleNet (2014)
ResNet34 (2015)

152層で画像認識コンテストで優勝

7.

深層ニューラルネットワークで出来ること • 画像識別 • 国際的な画像識別⼤会で他の⼿法を圧倒 • ⼈間よりも⾼性能 • 画像⽣成 • イラストや絵画を⾃動⽣成 • 画像から⽂章の作成 • 画像の領域分割 • 画像から駐⾞場所を検出 • ロボット制御 • ゲームAI • 囲碁AI AlphaGoが柯潔⽒に勝利 (Jin et al. 2017)

8.

⼈間を超えた?画像識別能⼒ Classification Results (CLS) 画像識別⼤会で優勝した⼿法のスコア 深層ニューラルネットワーク 0.3 Classification Error 0.25 0.28 0.26 0.2 AlexNet 0.15 GoogLeNet 0.16 ResNet 0.12 0.1 16.7% ↓ 23.3% ↓ 0.051 0.07 0.05 0 2010 2011 2012 2013 2014 Karpathy 0.036 0.03 0.023 2015 2016 2017 (http://image-net.org/challenges/talks_2017/ILSVRC2017_overview.pdf) http://karpathy.github.io/2014/09/02/what-i-learned-from-competing-against-a-convnet-on-imagenet/

9.

深層ニューラルネットワークの衝撃 • 数々のコンペティションで圧倒的な成績で優勝 • Imagenet Large Scale Visual Recognition Challenge 2012でConvolution networkが優勝 • IJCNN 2011 Traffic Sign Recognition優勝 • ICPR2012 Contest on “Mitosis Detection in Breast Cancer Histological Images”優勝 • ISBI 2012 challenge on segmentation of neural structures優勝 • など

10.

畳み込みニューラルネットワ ーク

11.

深層ニューラルネットワークはうまく動くのか • 多層パーセプトロンで説明したとおり,層の数を増やしたからと⾔っ て性能が上がるわけではない. • しかし,なぜ性能が上がったのか.

12.

畳み込みニューラルネットワークの構造 ⼊⼒ 畳み込み層 プーリング層 畳み込み層 プーリング層 畳み込み層で画像の局所特徴を捉える. プーリング層でズレの吸収を⾏う. 畳み込み層とプーリング層で捉えた画像の特徴を全結合層で識別する. 全結合層

13.

画像の特徴 • ⽂字Aの特徴はなにか? • Aはとんがり,T字,斜め線などでできている. • これらがAの特徴と⾔える. • 逆に,⽂字画像に上記の特徴があれば⽂字画像はAであるといえるの ではないか. 分解 ⽂字A ⽂字Aを構成する特徴

14.

画像の特徴を捉える 数値化 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 画像 0 0 0 0 1 0 1 0 1 特徴 数値化 フィルタ 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0

15.

画像の特徴を捉える 抜き出す 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 画像の⼀部 * 0 0 0 0 1 0 1 0 1 = 0×0 + 0×0 + 0×0 + 0×0 + 0×1 + 0×0 + 0×1 + 0×0 + 0×1=0 フィルタ 画像 抜き出した画像とフィルタの各要素をかけて⾜す(フ ロベニウス内積: Frobenius inner product). その結果を特徴マップに⼊れる. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 特徴マップ 0 0 0 0 0 0 0

16.

画像の特徴を捉える 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 画像 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 * 0 0 0 0 1 0 1 0 1 = 0×0 + 0×0 + 0×0 + 0×0 + 0×1 + 0×0 + 0×1 + 0×0 + 1×1=1 * 0 0 0 0 1 0 1 0 1 = 0×0 + 0×0 + 0×0 + 0×0 + 0×1 + 1×0 + 0×1 + 1×0 + 0×1=0 * 0 0 0 0 1 0 1 0 1 = 0×0 + 0×0 + 0×0 + 0×0 + 1×1 + 0×0 + 1×1 + 0×0 + 1×1=3 画像の⼀部 フィルタ フィルタ適⽤する場所をずらし先と同じ計算を⾏ っていく.この計算を畳み込みという. 特徴マップはフィルタが表す画像の特徴を,画像 がどれほど含んでいるかを表す. 左の特徴マップを⾒ると,Aのとんがりの部分の 値が最も⾼い事がわかる. 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 特徴マップ 0 0 1 1 1 0 1

17.

特徴マップの⽐較 フィルタ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 画像 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 1 1 1 0 2 1 2 1 0 0 1 1 1 0 1 0 0 0 1 1 2 2 0 1 2 2 4 2 1 2 2 2 2 2 1 0 1 2 1 1 2 1 0 1 2 2 3 2 2 0 0 0 1 2 3 2 2 0 0 0 0 0 1 2 0 0 0 0 1 2 3 0 0 2 3 2 2 0 1 3 1 1 1 1 0 1 0 1 2 1 1 0 1 2 1 1 2 1 1 0 0 1 2 2 1 0 特徴マップ 特徴マップの値が⼤きい場所は,フィルタが表す画像特徴がある場所のと⼀致する. 0 0 0 0 0 1 2

18.

畳み込みの役割 • 畳み込みは画像の局所特徴を捉える.

19.

プーリング 抜き出す 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 0 0 1 1 1 0 1 0 1 0 0 1 1 1 0 2 最⼤値を取る 2 特徴マップに⼊れる 2 0 1 1 1 1 1 0 2 1 0 1 2 2 2 3 2 0 2 1 1 1 2 2 2 特徴マップ 特徴マップ 特徴マップをあるサイズで切り取り,その中で最⼤の値を抽出し,その値を新たな特徴マップ に⼊れる.

20.

プーリング 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 特徴マップ 0 0 1 1 1 0 1 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 特徴マップ 場所をずらし最⼤値を⾏っていく.この計算をプ ーリング,特に最⼤値を取るのでマックスプーリ ングという.

21.

プーリングにより作成した特徴マップの⽐較 0 0 0 0 1 0 1 0 1 フィルタ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 畳み込み 画像 プーリング 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 0 0 1 1 1 0 1 0 0 0 1 1 2 2 0 1 2 2 4 2 1 2 2 4 4 4 2 2 2 2 2 1 0 2 2 4 4 4 1 2 1 1 2 1 0 2 3 3 3 2 0 0 1 0 1 0 0 1 0 1 2 2 3 2 2 0 2 3 3 3 3 0 0 1 2 3 2 2 2 3 3 3 3 0 0 0 0 0 1 2 0 0 0 0 1 2 3 0 0 2 3 2 2 0 1 3 1 1 1 1 0 1 0 1 2 1 1 0 1 2 1 1 2 1 1 0 0 1 2 2 1 0 3 3 3 3 3 3 3 3 3 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 プーリングにより,どのあたりに特徴があるかが分かる. 0 0 0 0 0 1 2

22.

プーリングの役割 • 畳み込みで,任意の特徴がある場所が分かる. • プーリングにより作成した特徴マップは,畳み込みで作成した特徴マ ップに⽐べ最⼤値を取る場所が広く,特徴がある場所が特定できない のではないか? 画像 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 フィルタ 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 プーリング 畳み込み 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 0 0 1 1 1 0 1 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 畳み込みによりとんがりがある場所がピンポイントに求まる. しかし,プーリングによりとんがりがある場所がぼやけているのではないか?

23.

プーリングの役割 画像 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 フィルタ 0 0 0 0 1 0 1 0 1 プーリング 畳み込み 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 0 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 2 1 2 1 0 1 2 2 2 0 0 3 2 0 2 1 0 0 0 1 2 2 2 0 0 1 1 0 2 1 2 1 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 横にずれた画像 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 2 2 2 2 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 画像が横にずれると畳み込みによる特徴マップの最⼤値の場所も横にずれる. しかし,プーリングで作成した特徴マップの最⼤値の場所は2つ同じままである.

24.

プーリングの役割 • プーリングは画像の位置ズレを吸収してくれる. • 畳み込みニューラルネットワークによる識別の位置普遍性をさせてい るかもしれない.

25.

全結合層 特徴マップ 画像 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 2 2 2 2 2 3 2 2 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 4 4 4 2 2 4 4 4 2 3 3 3 2 2 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 特徴マップを⼊⼒ 全結合層 識別結果が出⼒ 全結合層は単なる多層パーセプトロンだと 思えば良い. 全結合層には特徴マップが⼊⼒される. 全結合層は特徴マップとラベルの関係を学 習する. つまり,全結合層は特徴マップをクラス分 けする識別問題を解いている.

26.

畳み込みニューラルネットワークの学習 • 予め画像の特徴が分かり,効果的なフィルタを⽤意できればよいがそ うではない. • 深層ニューラルネットワークでは,学習によりフィルタを獲得する.

27.

Visualizing Understanding Convolutional Networks Visualizing and and Understanding Convolutional Networks Visualizing and Understanding Convolutional Networks 畳み込みニューラルネットワーク 出⼒ ⼊⼒ Figure 3. Architecture our 8 layer convnet model. Aby 224 by 224 crop an image 3 color planes) isaspresented Figure Figure 3. Architecture of our 8oflayer model. A 224 by 224 crop ofcrop an image (with 3(with color(with is presented 3. Architecture ourof8convnet layer convnet model. A 224 224 of an of image 3planes) color planes) is presented as as the input. This iswith convolved with 96 1st (red), layer (red), each of7using size 7 aby 7, using of 2 in y. both the input. This is This convolved 96with di↵erent 1stdi↵erent layer each size of 7 by 7, stride 2ainstride both x both and the input. is convolved 96 di↵erent 1stfilters layer filtersfilters (red),of each size by 7, using a of stride of 2 in x andxy.and y. The resulting feature maps are then: (i) passed through a rectified function (not (ii) pooled within The resulting feature maps are then: passed through a rectified linear function (not shown), (ii) shown), pooled (max within The resulting feature maps are (i) then: (i) passed through a rectified linearlinear function (not shown), (ii) pooled (max(max within 3x3 regions, using stride 2) and (iii) contrast normalized across feature maps to give 96 di↵erent 55 by 55 element feature 3x3 regions, using stride 2) and (iii) contrast normalized across feature maps to give 96 di↵erent 55 by 55 element feature 3x3 regions, using stride 2) and (iii) contrast normalized across feature maps to give 96 di↵erent 55 by 55 element feature maps. Similar operations are in layers The last are twofully layers are fully connected, taking features maps. maps. Similar operations are repeated in repeated layers The2,3,4,5. last two layers taking features from Similar operations are repeated in 2,3,4,5. layers 2,3,4,5. The last two layers areconnected, fully connected, taking features from from theconvolutional top convolutional layer as input in vector · 6 ·=256 = 9216 dimensions). Theisfinal layer is a C-way softmax the topthe convolutional layer aslayer input vector form (6form · 6 ·form =· 256 9216 dimensions). The final a C-way softmax top as in input in vector (6256 · 6(6 9216 dimensions). Thelayer final layer is a C-way softmax Cnumber being the number of classes. Allfeature filters and maps square in shape. function, C function, being of classes. All filters mapsfeature are square inare shape. function, C the being the number of classes. All and filters and feature maps are square in shape. Layer 1 Layer 1 Layer 1 Layer 2 Layer 2 Layer 2 Layer 3 Layer 3 Layer 3 Layer 4 Layer 4 Layer 4 Layer 5 Layer 5 Layer 5 (Zeiler and Fergus 2013) Figure 4.ofEvolution of achosen randomly chosen subset of model features through training. layer’s features are displayed Figure Figure 4. Evolution a randomly subset of model features through training. Each layer’s features are displayed 4. Evolution of a randomly chosen subset of model features through training. Each Each layer’s features are displayed in block. a di↵erent block. block, we show achosen randomly chosen subset of epochs features at epochs [1,2,5,10,20,30,40,64]. in a di↵erent Within eachWithin block, we show randomly subset of features at [1,2,5,10,20,30,40,64]. in a di↵erent block. Within each each block, weashow a randomly chosen subset of features at epochs [1,2,5,10,20,30,40,64]. The visualization shows the strongest activation (across all training examples) for a given projected The visualization shows the strongest activation (across all training examples) for a given map,feature projected down to The visualization shows the strongest activation (across all training examples) for afeature given feature map, map, projected downdown to to pixel space deconvnet Color contrast is artificially and theand figure isfigure bestfigure viewed in electronic pixel space using ourapproach. deconvnet approach. contrast isenhanced artificially enhanced and the is viewed best viewed in electronic pixelusing spaceour using our deconvnet approach. ColorColor contrast is artificially enhanced the is best in electronic form. form.form. ⼊⼒に近い層では画像を形作る線分の特徴が抽出され,上位層に⾏くに 従い下位層で抽出された情報を組み合わせた抽象的な情報になっていく.

28.

畳み込みニューラルネットワーク Convolutional Deep Belief Networks for Scalable Unsupervised Le Table 2. Test error for MNIST data Labeled training samples 1,000 2,000 CDBN 2.62±0.12% 2.13±0.10% 1 3.21% 2.53% Ranzato et al. (2007) Hinton and (2006) Convolutional Deep Belief Networks for Salakhutdinov Scalable Unsupervised Learning of Hierarchical Weston et al. (2008) 2.73% Table 2. Test error for MNIST dataset Labeled training samples 1,000 2,000 3,000 5,000 CDBN 2.62±0.12% 2.13±0.10% 1.91±0.09% 1.59±0.11% 3.21% 2.53% 1.52% Ranzato et al. (2007) Hinton and Salakhutdinov (2006) Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hierarchical Representations Weston et al. (2008) 2.73% 1.83% - 出⼒ ⼊⼒ are not conditionally independent of one another given the layers above and below. In contrast, our treatment using undirected edges enables combining bottom-up and top-down information more efficiently, as shown in Section 4.5. faces le Unsupervised Learning of Hierarchical Representations ven ment -up own s to ers; the ayer ght- In our approach, probabilistic max-pooling helps to address scalability by shrinking the higher layers; weight-sharing (convolutions) further speeds up the algorithm. For example, inference in a three-layer network (with 200x200 input images) using weightsharing but without max-pooling was about 10 times slower. Without weight-sharing, it was more than 100 times slower. In work that was contemporary to and done independently of ours, Desjardins and Bengio (2008) also applied convolutional weight-sharing to RBMs and experimented on small image patches. Our work, however, develops more sophisticated elements such as probabilistic max-pooling to make the algorithm more scalable. Figure 2. The first layer bases (top) and the second layer bases (bottom) learned from natural images. Each second layer basis (filter) was visualized as a weighted linear combination of the first layer bases. (Lee etthe al.third 2009) Figure 3. Columns 1-4: the second layer bases (top) and layer b categories. Column 5: the second layer bases (top) and the third layer bas object categories (faces, cars, airplanes, motorbikes). ⼊⼒に近い層では画像を形作る線分の特徴が抽出され,上位層に⾏くに 従い下位層で抽出された情報を組み合わせた抽象的な情報になっていく. 4. Experimental results 4.1. Learning hierarchical representations from natural images We first tested our model’s ability to learn hierarchical representations of natural images. Specifically, we unlabeled data do not share the same class labels, or the same generative distribution, as the labeled data. This framework, where generic unlabeled data improve performance on a supervised learning task, isFigure known 3. Columns 1-4: the second layer bases (top) and the third layer bases (bottom) learned f as self-taught learning. In their experiments, they used categories. Column 5: the second layer bases (top) and the third layer bases (bottom) learned from sparse coding to train a single-layer representation, and then used the learned representation to construct object categories (faces, cars, airplanes, motorbikes). features for supervised learning tasks. We used a similar procedure to evaluate our two-layer 注:画像はconvolutional deep belief networkのもの

29.

⼈間の視覚処理 第⼀次視覚野:V1 ITの構造 (Tanaka, 2003) (Kandel) 下側頭葉:IT (inferior temporal cortex) Figure 25-12 Possible functions mediated by the two pathways connecting visual processing centers in the cerebral cortex. The icons represent salient physiological properties of cells in these areas. On the top is the pathway extending to the posterior parietal cortex, which is thought to be particularly involved in processing motion, depth, and spatial information. On the bottom is the pathway to the inferior temporal cortex, which is more concerned with form and color. Feeding into those two cortical pathways are the P and M 腹側経路 pathways from the retina. (MT = middle temporal; LGN = lateral geniculate nucleus.) (Adapted from Van Essen and Gallant 1994.) V1の構造 (Carlson) V2 V4 網膜 V1 IT LGN 組み合わ 組み合わ センサ 基本画像 features—movement, depth, form, and color. To ⾓度 express the specific combination of properties in the visual field at any given moment, せ せ independent groups of cells with different functions must temporarily be brought into association. As a result, there must be a mechanism Instead, as we have seen in this chapter, visual images typically are built up from the inputs of parallel pathways that process different by which the brain momentarily associates the information being processed independently by different cell populations in different cortical regions. This mechanism, as yet unspecified, is called the binding mechanism.

30.

単純型細胞と複雑型細胞 複雑型細胞 単純型細胞 CNNのプーリングに対応 メキシカンハット型フィルタ ON中⼼OFF周辺型受容野 (Kandel) CNNのフィルタに対応 ガボールフィルタ メキシカンハット型受容野を持つ細胞を束ねることで,線分をとらえる. 第1次視覚野の受容野はガボールフィルタに似ている. 深層ニューラルネットワークにおいても,下層でガボールフィルタに 似たフィルタが形成されることが確認されている. (Kandel) 線分に対し横断的に応答 する.

31.

Neocognitron(Biolcybern1980) • HubelとWieselの視覚の研究がベースとなる • 単純型細胞に対応したS-cellsで構成されるUs層と複雑型細胞 に対応したC-cellsで構成されるUc層がある. • Us層は畳み込み層,Uc層はプーリング層に対応する. 198 S-layer f I "/i" P "-- ~ j S-plane ~ S-column ^ Us2 ネオコグニトロンの仕組 ki=I み(Fukushima, 1980) UsI Ucl Fig. 4. Relation between S-planes and S-columnswithin an S-layer ネオコグニトロンの構造 only one candidate appears (福島, case 2017) in an S-plane, the なぜNeocognitronと⾔うのか? Cognitronのニューバージョンだから.

32.

下側頭葉での情報表現 (Inferior temporal cortex: IT) • ITでは視覚情報が単純な図形で表現される. • 脳でも上位の層では抽象化が起こる. cells, which represent different features contained in the object image, is necessary. This image reduction method has limitations. The initial sur vey of effective stimuli cannot cover the entire variety of objects existing in the world, so we may miss some very effective features. In addition, the tested methods of reducing the complexity of effective object images are limited by the available time of continuous recording from a single cell and also by the imagination of the experimenter. Because of these limitations, the objectivity of this method for determining optimal features has sometimes been questioned. However, alternative methods also have limitations. For example, some studies have used 細胞ごとに異なる図形特徴に反応する of complex shapes, sufficiently complex for the activation of most TE cells. Faces and Other Extensively Learned Objects Although the critical features for the activation of TE cells are only moderately complex in general, there are cells that respond to faces and critically require nearly all the essential features of the face. Such cells were originally found deep in the superior temporal sulcus (Bruce et al., 1981; Perrett et al., 1982), but they have also been found in TE (Baylis et al., 1987). Thus, there is more convergence of information to single cells for Downloaded from https://academic.oup.com/cercor/article-abstract/13/1/90/354662 by guest on (⽥中,認識と⾏動の科学) (Tanaka, 2003) Figure 1. Examples of reductive determination of optimal features for 12 TE cells. The images to the left of the arrows represent the original images of the most effective object stimulus and those to the right of the arrows, the critical features determined by the reduction. カラム構造をしている. (Tanaka, 2003)

33.

畳み込みニューラルネットワークの終焉 • 画像認識において畳み込みニューラルネットワークよりも⾼性能な Vision transformerというアーキテクチャが提案されている. • 今後画像認識においてvision transformerベースのアーキテクチャが主 流になる可能性がある ViT https://paperswithcode.com/sota/image-classification-on-imagenet?p=deepvit-towards-deeper-vision-transformer

34.

dropout

35.

Dropout • 任意の確率でニューロンの出⼒を0にすることをDropboutという. • 学習時に⽤いられる.テストデータに使うと性能は落ちるだろう. • 過学習を抑えるために⽤いられる. • 過学習とは,訓練データを過剰に学習してしまい訓練データの識別は正確 に⾏えるが,テストデータに対する識別能⼒が低くなる現象のこと. 出⼒ 0 0.4 0 出⼒ 1 0.4 0.2 0.8 0.8 Dropout (Srivastava et al., 2014) Dropoutにより点線の 出⼒は0となった.

36.

Dropoutって役に⽴つの? • ⼊⼒層に近いところにdropoutを⼊れても意味がないのでは? • Dropoutはごま塩ノイズと⼀緒である. • つまり,CNNでは受容野により⽋損が吸収される. • Random erasingは画像の⼀部分を切り取るのでdropoutより有効だろう. • 出⼒層に近いところにdropoutは意味がないのでは? • DNNの出⼒層付近は抽象化されており,スパースな表現になっているだろう. • ⼗分出⼒がスパースなら,dropoutは効果がないかもしれない. • 出⼒層に近いところでのdropoutは学習を悪化させるのでは? • DNNの出⼒層付近は抽象化されており,スパースな表現になっているだろう. • 運悪く,⼊⼒の特徴を反映したニューロンが無効化されると,間違ったニューロンと学習が進ん でしまうのではないか? • そもそもDNNは過学習が起きにくい? • パラメタが多いと表現⼒が⾼く過学習が起こると⾔われている.しかし,実際はパラメタが多け れば多いほど性能が上がる(double decent). • Dropoutを使うと学習の収束に時間がかかる. 実際使わないと効果があるかどうかは分からないので,考えなしに⼊れないこと.

37.

まとめ

38.

なぜ今更ニューラルネットワーク • 現在のディープラーニングの原型である福島やLeCunのモデルは1980年代にはす でに発表されていた.なぜ2010年前後から急にディープラーニングが発展・普及 したのか? • データの充実 • インターネット,ビッグデータ • コンピュータの⾼速化 • 膨⼤なデータを巨⼤なニューラルネットワークで学習するために必要な計算が実⽤的な時 間でできるようになった(GPGPUの発展により). • 簡単に使える • 開発環境が充実し開発が⽤意になった. • ⼿法の改善 • 他の⼿法の⼿詰まり感

39.

深層ニューラルネットワークの何が良い • ⾼性能 • データの特徴を解析しなくて良い? • 畳み込みニューラルネットワークではコンピュータが勝⼿に特徴を抽出する. • とはいえ,そうはうまく⾏かない. • 導⼊が簡単 • 有名なモデルは開発環境に元々⼊っている. • 開発環境に⼊っていないものもオープンソースで公開されていることが多い. • 専⾨家でなくても使える. • 学習済みモデルが公開されており,すぐに⾼性能なモデルを使うことができる.

40.

深層ニューラルネットワークは使えるのか • 使うためには • プログラミング⾔語であるPythonが使える. • 多少のニューラルネットワーク⽤語を知っている. • 技術内容の雰囲気を掴んでいる. • ゲーム⽤GPUを搭載したPCを持っている. • つまり,やる気さえあれば誰でも使える. • 浅い理解をするためには • 線形代数,微分積分,確率,統計が必要. • いずれも⾼校レベルの数学を理解していれば何とかなる(と思う).

41.

ディープラーニングの注意 • これなら間違いないという技術は無いと思おう • まだ発展途上の技術. • 今⽇習ったことが明⽇古いということがあるかもしれない. • ディープラーニングに詳しくあろうとするためには⽇々勉強が必要. • つぎのものがあれば誰にでもチャンスは有る • やる気,思いつき,スピード,暇,ゲーミングPC

42.

ディープラーニングの技術的問題 • 軽量,⾼速,⾼性能なディープラーニングの技術の要望 • IoT機器,エッジで処理したい. • ラベル付きデータが不⾜した場合の対応 • 動物はデータが少なくても学習できる?(on-shot, few-shot leanring) • モデルが⼤きすぎて問題が起きた時に原因を特定しにくい. • GoogleのAIは⼈をゴリラと何故間違えたのか? • ⼊⼒を少し変えるだけで,別物と識別される. • 転移学習 • ある問題を解決する機械を他の問題に転⽤できるか? • 抽象的な命令を理解できるか? 古い情報 Surveyの必要あり!!

43.

脳と深層ニューラルネットワークは違う • 深層ニューラルネットワークのニューロンは動的な応答をしない. • そんなに脳は深いのか? • ⼀つの判断に500msかかるとする (遅めに設定) .1スパイクを送るため に必要な時間が10msだとすると判断に使えるネットワークの層の上限は 50ということになる. • 脳はReLUを使っているのか? • Sigmoid関数の⽅が神経細胞の性質と合っているのでは. • 脳はバックプロパゲーションを使っているのか? • 脳の学習はHebbian learningが基本ではないのか.