SlideShare a Scribd company logo
1 of 18
Download to read offline
Dynamic Routing Between
Capsules (NIPS 2017)
東京大学電子情報工学科
2017/11/12 B4 金子 真也
1
概要
• Back Propagation, Auto Encoderなどを生み出したHinton先生を
含むGoogle Brainによる論文.
• 画像の意味解釈の文脈で最も用いられている, CNNよりも位置不変
性などの面で優れたCapsule Networkを提案.
– Capsuleというニューロンの集合パーツを用いた
• 実際にMNISTでState-of-the-artの精度を達成.
2
Capsule
• 人間の視覚が得た光学的情報から物体を解釈する際に, 構文木のよ
うな構造を作成するという仮定から発想を得た.
– 細部を無視して動的に構造を変えられるような仕組み
• Capsuleという小さなニューロンの集合によってこれを実現
– 構文木の各ノードに相当する
– 反復ルーティングを利用して, 各Capsuleは一つ上層のCapsule
(Parent)を選択し, 木構造を構築(routing)
• Capsule内のニューロンの状態はベクトルでParentへ出力される
– ベクトルの長さによって内容の存在確率を表現
– ベクトルの向きによって性質を表現
3
ベクトルの出力
• Squash関数として非線形関数を利用
– 𝐬𝑗は𝑗番目のCapsuleへのトータルの入力
– 𝐯𝑗は𝑗番目のCapsuleからの出力
• 非線形関数によってベクトルの長さを1に圧縮
4
ベクトルの入力
• 先ほどの𝐬𝑗は一つ前のCapsuleから出力された複数のベクトルに対
して重み付けを行った結果である
– 𝐮𝑖は一つ前の𝑖番目のCapsuleから出力されたベクトル
– 𝐖𝑖𝑗は𝑖番目のCapsuleと𝑗番目のCapsuleとの間の重み付け
– 重み付けの結果に対してさらに, 反復ルーティングシステムに
よって構造木そのものの結合度合い𝑐𝑖𝑗で重み付けが行われる
5
ルートの結合度合い
• 𝑖番目のCapsuleが全体の構造木のルートの中でどのように結合され
ているかを表すため結合度合い𝑐𝑖𝑗が計算される.
• そのために, ロジット𝑏𝑖𝑗(0から1の間の値を持つ変数)が定義され,
以下のようにsoftmax関数で結合度合いが計算される.
• このロジットの値を最適化する方法が反復ルーティングであり,
これにより動的に構造木を変化させることができる.
6
反復ルーティング
• アルゴリズムとしては今まで解説した式を用いた形となる.
– 反復して𝑏𝑖𝑗の値を更新していく形となっている.
Softmax関数(Eq.3) Squash関数(Eq.1)
7
反復ルーティング
• どの程度反復を行えばよいのかを調査した結果が以下.
– MNISTに対して反復の回数を変えて, 最終的な誤り率を出力.
– 回数をこなせばこなすほど最終的な誤差率は下がる.
– ただ, 同時に過学習もしやすくなってしまう.
8
Lossの定義
• 結局出力されたベクトルの長さによってCapsuleの存在確率を表現
していた.
• 最終的なclassification結果をラベルに近づけるために以下のLossを
最適化する
– 𝑘番目のclassが目標のラベルであれば, 𝑇𝑘 = 1. 異なれば𝑇𝑘 = 0.
– Marginとして𝑚+ = 0.9, 𝑚− = 0.1を用いる
– 重みを軽減する項として, 𝜆 = 0.5
– 最終的にこれらの和がLossとなる.
9
ネットワークの構造1
• 単純なCapsNetの構造が以下.(3層)
– Deep Conv(Chang and Chen[2015])に相当する性能を持つ
• PrimaryCapsでは32channel
– 各PrimaryCapは長さ8のベクトルを出力 (9 × 9 kernel, stride 2)
• DigitCapsへの入力は𝐮𝑖(長さ8)(𝑖 ∈ (1,32 × 6 × 6))に対して,𝐖𝑖𝑗 = [
8 × 16]をしたため, 𝐯𝑗は長さ16のベクトルとなる(𝑗 ∈ (1,10))
今回はこの間のみ反復ルーティングが存在 (bij)
10
ネットワークの構造2
• 最終的にDigitCapsでのベクトルに対してDecoderを用い, 元の画像
を復元するように学習を行った
– 例えば以下の図ではMNISTに対して数字の「5」に当たるベク
トルのみを利用して, 元の画像をdecodeする.
11
再構成の結果
• 最小化するのは再構成した画像と元画像とのピクセル毎の二乗和
• 結果は以下のようになる
– 𝑙:正解ラベル
– 𝑝:予測されたラベル
– 𝑟:再構成する目標のラベル
• 右の2つは認識に失敗したものを復元した結果. 5と3をどのように
間違えたかがわかる.
12
MNISTでの結果
• Classificationの結果が以下.
• 表の説明としては,
– Routingが反復ルーティングの回数
– Reconstructionが再構成での正規化Lossも用いたか?
• 結果としてBaseline(Wan et al.[2013])に比べて勝っている.
13
Capsuleベクトルの表現
• Capsuleベクトルのうち, 適当なある桁の値を範囲[-0.25,0.25]で
0.05の間隔で微調整した結果が以下.
• 16次元で表現されたCapsuleベクトルの中身は, ストロークの長さ,
スキュー, 幅などの情報を含むことが分かる.
14
CapsNetの頑強性
• アフィン変換に対する頑強性をテストするため以下の実験
– MNISTデータでまず訓練
– affNIST4データでモデルのテスト
• 従来のCNN(MaxPooling+Dropout)とCapsNetでこれを行い比較
– CapsNetの方が精度が良く, 頑強性を持つといえる.
dataset CNN CapsNet
MNIST 99.22% 99.23%
affNIST4 66% 79%
15
MultiMNISTでの結果
• 異なるクラスのMNISTの数字が重なっているデータセット
MultiMNISTを作成し, これで実験を行った.(1K dataset)
– Training:60M, Test:10M
• 同じくCapsNetの精度が高かった. また, decodeを用いて重複する
数字を復元した結果が以下.
– スタイルと位置を認識できることが分かる
16
他のdatasetでの結果
• CIFAR10では10.6%の誤差精度
– 反復ルーティングを24 × 24のパッチで3回+7つのアンサンブル
– MNISTと同様の単純な構造
– 従来のネットワークですぐに達成できる精度
– 背景が多彩過ぎて, MNISTに適用したような単純なモデルでは
困難
• smallNORBでは2.7%の誤差精度(state-of-the-art)
• SVHNでは4.3%の誤差精度
17
参考文献
• Dynamic Routing Between Capsules (NIPS2017) https://arxiv.
org/pdf/1710.09829.pdf
• What is a CapsNet or Capsule Network? https://hackernoon.c
om/what-is-a-capsnet-or-capsule-network-2bfbe48769cc

More Related Content

What's hot

2020 08 05_dl_DETR
2020 08 05_dl_DETR2020 08 05_dl_DETR
2020 08 05_dl_DETRharmonylab
 
Deeply-Recursive Convolutional Network for Image Super-Resolution
Deeply-Recursive Convolutional Network for Image Super-ResolutionDeeply-Recursive Convolutional Network for Image Super-Resolution
Deeply-Recursive Convolutional Network for Image Super-Resolutionharmonylab
 
0から理解するニューラルネットアーキテクチャサーチ(NAS)
0から理解するニューラルネットアーキテクチャサーチ(NAS)0から理解するニューラルネットアーキテクチャサーチ(NAS)
0から理解するニューラルネットアーキテクチャサーチ(NAS)MasanoriSuganuma
 
Kazumasa Sakiyama Bachelor Thesis
Kazumasa Sakiyama Bachelor ThesisKazumasa Sakiyama Bachelor Thesis
Kazumasa Sakiyama Bachelor Thesispflab
 
2018 07 02_dense_pose
2018 07 02_dense_pose2018 07 02_dense_pose
2018 07 02_dense_poseharmonylab
 
論文 Solo Advent Calendar
論文 Solo Advent Calendar論文 Solo Advent Calendar
論文 Solo Advent Calendar諒介 荒木
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional Networksharmonylab
 
Yosuke Hoshi U-Net
Yosuke Hoshi U-NetYosuke Hoshi U-Net
Yosuke Hoshi U-NetYosukeHoshi1
 
When NAS Meets Robustness: In Search of Robust Architectures against Adversar...
When NAS Meets Robustness:In Search of Robust Architectures againstAdversar...When NAS Meets Robustness:In Search of Robust Architectures againstAdversar...
When NAS Meets Robustness: In Search of Robust Architectures against Adversar...MasanoriSuganuma
 
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networkscvpaper. challenge
 
20140925 multilayernetworks
20140925 multilayernetworks20140925 multilayernetworks
20140925 multilayernetworkstm1966
 
輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions
輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions
輪読資料 Xception: Deep Learning with Depthwise Separable ConvolutionsKotaro Asami
 
効率的学習 / Efficient Training(メタサーベイ)
効率的学習 / Efficient Training(メタサーベイ)効率的学習 / Efficient Training(メタサーベイ)
効率的学習 / Efficient Training(メタサーベイ)cvpaper. challenge
 
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable ConvolutionsDeep Learning JP
 
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...Daiki Tanaka
 
PyTorch, PixyzによるGenerative Query Networkの実装
PyTorch, PixyzによるGenerative Query Networkの実装PyTorch, PixyzによるGenerative Query Networkの実装
PyTorch, PixyzによるGenerative Query Networkの実装Shohei Taniguchi
 
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...KCS Keio Computer Society
 
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOM
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOMDeep Learningを超える技術 大脳皮質のアルゴリズム BESOM
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOMkenji oda
 
[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networksDeep Learning JP
 
[DL輪読会]Objects as Points
[DL輪読会]Objects as Points[DL輪読会]Objects as Points
[DL輪読会]Objects as PointsDeep Learning JP
 

What's hot (20)

2020 08 05_dl_DETR
2020 08 05_dl_DETR2020 08 05_dl_DETR
2020 08 05_dl_DETR
 
Deeply-Recursive Convolutional Network for Image Super-Resolution
Deeply-Recursive Convolutional Network for Image Super-ResolutionDeeply-Recursive Convolutional Network for Image Super-Resolution
Deeply-Recursive Convolutional Network for Image Super-Resolution
 
0から理解するニューラルネットアーキテクチャサーチ(NAS)
0から理解するニューラルネットアーキテクチャサーチ(NAS)0から理解するニューラルネットアーキテクチャサーチ(NAS)
0から理解するニューラルネットアーキテクチャサーチ(NAS)
 
Kazumasa Sakiyama Bachelor Thesis
Kazumasa Sakiyama Bachelor ThesisKazumasa Sakiyama Bachelor Thesis
Kazumasa Sakiyama Bachelor Thesis
 
2018 07 02_dense_pose
2018 07 02_dense_pose2018 07 02_dense_pose
2018 07 02_dense_pose
 
論文 Solo Advent Calendar
論文 Solo Advent Calendar論文 Solo Advent Calendar
論文 Solo Advent Calendar
 
Densely Connected Convolutional Networks
Densely Connected Convolutional NetworksDensely Connected Convolutional Networks
Densely Connected Convolutional Networks
 
Yosuke Hoshi U-Net
Yosuke Hoshi U-NetYosuke Hoshi U-Net
Yosuke Hoshi U-Net
 
When NAS Meets Robustness: In Search of Robust Architectures against Adversar...
When NAS Meets Robustness:In Search of Robust Architectures againstAdversar...When NAS Meets Robustness:In Search of Robust Architectures againstAdversar...
When NAS Meets Robustness: In Search of Robust Architectures against Adversar...
 
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks
【CVPR 2020 メタサーベイ】Efficient Training and Inference Methods for Networks
 
20140925 multilayernetworks
20140925 multilayernetworks20140925 multilayernetworks
20140925 multilayernetworks
 
輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions
輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions
輪読資料 Xception: Deep Learning with Depthwise Separable Convolutions
 
効率的学習 / Efficient Training(メタサーベイ)
効率的学習 / Efficient Training(メタサーベイ)効率的学習 / Efficient Training(メタサーベイ)
効率的学習 / Efficient Training(メタサーベイ)
 
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
[DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions
 
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...
[Paper Reading] Theoretical Analysis of Self-Training with Deep Networks on U...
 
PyTorch, PixyzによるGenerative Query Networkの実装
PyTorch, PixyzによるGenerative Query Networkの実装PyTorch, PixyzによるGenerative Query Networkの実装
PyTorch, PixyzによるGenerative Query Networkの実装
 
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...
Outrageously Large Neural Networks:The Sparsely-Gated Mixture-of-Experts Laye...
 
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOM
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOMDeep Learningを超える技術 大脳皮質のアルゴリズム BESOM
Deep Learningを超える技術 大脳皮質のアルゴリズム BESOM
 
[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks
 
[DL輪読会]Objects as Points
[DL輪読会]Objects as Points[DL輪読会]Objects as Points
[DL輪読会]Objects as Points
 

Viewers also liked

コンピュータ先端ガイド2巻3章勉強会(SVM)
コンピュータ先端ガイド2巻3章勉強会(SVM)コンピュータ先端ガイド2巻3章勉強会(SVM)
コンピュータ先端ガイド2巻3章勉強会(SVM)Masaya Kaneko
 
論文読み会(DeMoN;CVPR2017)
論文読み会(DeMoN;CVPR2017)論文読み会(DeMoN;CVPR2017)
論文読み会(DeMoN;CVPR2017)Masaya Kaneko
 

Viewers also liked (6)

SLAM勉強会(PTAM)
SLAM勉強会(PTAM)SLAM勉強会(PTAM)
SLAM勉強会(PTAM)
 
コンピュータ先端ガイド2巻3章勉強会(SVM)
コンピュータ先端ガイド2巻3章勉強会(SVM)コンピュータ先端ガイド2巻3章勉強会(SVM)
コンピュータ先端ガイド2巻3章勉強会(SVM)
 
論文読み会(DeMoN;CVPR2017)
論文読み会(DeMoN;CVPR2017)論文読み会(DeMoN;CVPR2017)
論文読み会(DeMoN;CVPR2017)
 
Deep SimNets
Deep SimNetsDeep SimNets
Deep SimNets
 
G2o
G2oG2o
G2o
 
2008-12-07_PTAM_Kansai.AR
2008-12-07_PTAM_Kansai.AR2008-12-07_PTAM_Kansai.AR
2008-12-07_PTAM_Kansai.AR
 

More from Masaya Kaneko

Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...
Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...
Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...Masaya Kaneko
 
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説Masaya Kaneko
 
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)Masaya Kaneko
 
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])Masaya Kaneko
 
Neural scene representation and rendering の解説(第3回3D勉強会@関東)
Neural scene representation and rendering の解説(第3回3D勉強会@関東)Neural scene representation and rendering の解説(第3回3D勉強会@関東)
Neural scene representation and rendering の解説(第3回3D勉強会@関東)Masaya Kaneko
 
論文読み会2018 (CodeSLAM)
論文読み会2018 (CodeSLAM)論文読み会2018 (CodeSLAM)
論文読み会2018 (CodeSLAM)Masaya Kaneko
 
SLAMチュートリアル大会資料(ORB-SLAM)
SLAMチュートリアル大会資料(ORB-SLAM)SLAMチュートリアル大会資料(ORB-SLAM)
SLAMチュートリアル大会資料(ORB-SLAM)Masaya Kaneko
 
Direct Sparse Odometryの解説
Direct Sparse Odometryの解説Direct Sparse Odometryの解説
Direct Sparse Odometryの解説Masaya Kaneko
 
ORB-SLAMの手法解説
ORB-SLAMの手法解説ORB-SLAMの手法解説
ORB-SLAMの手法解説Masaya Kaneko
 

More from Masaya Kaneko (9)

Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...
Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...
Unsupervised Collaborative Learning of Keyframe Detection and Visual Odometry...
 
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
 
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)
Visual SLAM: Why Bundle Adjust?の解説(第4回3D勉強会@関東)
 
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])
論文読み会@AIST (Deep Virtual Stereo Odometry [ECCV2018])
 
Neural scene representation and rendering の解説(第3回3D勉強会@関東)
Neural scene representation and rendering の解説(第3回3D勉強会@関東)Neural scene representation and rendering の解説(第3回3D勉強会@関東)
Neural scene representation and rendering の解説(第3回3D勉強会@関東)
 
論文読み会2018 (CodeSLAM)
論文読み会2018 (CodeSLAM)論文読み会2018 (CodeSLAM)
論文読み会2018 (CodeSLAM)
 
SLAMチュートリアル大会資料(ORB-SLAM)
SLAMチュートリアル大会資料(ORB-SLAM)SLAMチュートリアル大会資料(ORB-SLAM)
SLAMチュートリアル大会資料(ORB-SLAM)
 
Direct Sparse Odometryの解説
Direct Sparse Odometryの解説Direct Sparse Odometryの解説
Direct Sparse Odometryの解説
 
ORB-SLAMの手法解説
ORB-SLAMの手法解説ORB-SLAMの手法解説
ORB-SLAMの手法解説
 

Dynamic Routing Between Capsules