![Page 1: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/1.jpg)
論文紹介
Xception: Deep Learning with Depthwise Separable Convolutions
東京大学大学院理学系研究科物理学専攻 藤堂研究室
中西 健
![Page 2: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/2.jpg)
論文名: Xception: Deep Learning with Depthwise
Separable Convolutions
著者: François Chollet (Google, Inc.)
公開日: 4 Apr 2017
※スライド中の図表は特に記述のない限り上記の論文から引用
Paper information
![Page 3: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/3.jpg)
• ネットワークの軽量化に興味があった
• 畳み込み層を工夫してパラメータ数と計算量を減らす
方法の1つが今から紹介するXception
この論文を選んだ動機
![Page 4: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/4.jpg)
Inception Model 中の Inception Modules をDepthwise
Separable Convolutions に置換すると精度が向上した
概要
![Page 5: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/5.jpg)
• Inception module とは
• これを積み重ねたものが Inception model
• e.g. GoogLeNet
Inception model
simple ver. Inception V3 ver.
![Page 6: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/6.jpg)
• simple ver. の Inception module の書き換え
Inception model
=厳密
![Page 7: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/7.jpg)
• The Inception hypothesis
• 空間方向の相関とチャネル方向の相関は十分に分離でき
るという仮説
→ このとき、すべてのチャネルを混ぜて畳み込み演算す
るのは好ましくない → 分割する
Inception model
![Page 8: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/8.jpg)
• 1x1Convの後のチャネルの分割
• 分割数最小の極限 (分割なし) → 普通のConv層
• 分割数最大の極限 (分割数 = チャネル数) をとると?
→ 各チャネルごとの畳み込みとなる
Inception model
![Page 9: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/9.jpg)
Inception model
分割最小
(分割なし)最大
(分割数=チャネル数)
パラメータ数
図
多 少
計算量 大 小
分割すればするほどパラメータ数が減らせる & 計算が軽くなる
![Page 10: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/10.jpg)
Depthwise Separable Convolution
• 分割数最大の Inception module と似た方法
• 畳み込みを空間方向とチャネル方向に分けて実行
• 画像処理界隈では"separable convolution"と呼ばれている
Depthwise Separable Convolution
L. Sifre. Rigid-motion scattering for image classification, 2014. Ph.D. thesis.
各チャネルでそれぞれ畳み込み
チャネル方向のみで畳み込み
![Page 11: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/11.jpg)
dw: 各チャネルでそれぞれ畳み込み(depthwise convolution)
pw: チャネル方向にのみ畳み込み(pointwise convolution)
2つのmoduleの比較
分割数最大のInception module
Depthwise SeparableConvolution
pw → dw → dw → pw →
ReLU ReLU ReLU ReLU
![Page 12: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/12.jpg)
• The Inception hypothesis
• 空間方向の相関とチャネル方向の相関は十分に分離できると
いう仮説
• 本論文
• 空間方向の相関とチャネル方向の相関は完全に分離できると
いう仮説
→ "Extreme Inception"
→ "Xception"
• この仮説のもとでは、Conv層を空間方向のConvとチャネル方
向のConvの2つに完全に分離することが正当化される
Xception
![Page 13: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/13.jpg)
Xception の層設計
• 36個のConv層
• 最初と最後以外は residual connection する
Xception の層設計
![Page 14: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/14.jpg)
Xception vs Inception V3
• パラメータ数はほぼ同じ
→ 精度の差はnetworkのcapacityに依らない
→ 精度からどれだけ"効率の良い"パラメータを使えて
いるかがわかる
実験
![Page 15: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/15.jpg)
2つの分類タスク
• ImageNet
• 約1400万枚の画像, 1000クラス
• 単一ラベル
• JFT
• googleの社内専用大規模画像分類データセット
• 3.5億枚以上の画像, 17000クラス
• マルチラベル (1つの画像に複数のラベル)
• 評価は JFT内のFastEval14kで行った
• 14000枚の画像, 6000クラス
• 1ラベルあたり平均36.5枚
• 評価方法: MAP@100
• 予想したラベル上位100個のうち当たったラベル数の平均
取り組むタスク
![Page 16: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/16.jpg)
Xception と Inception V3 で同じoptimizationの構成を用いた
※ optimizationの構成は Inception V3 でチューニングした
2つのタスクでそれぞれ異なるoptimizationの構成を用いた
• ImageNet
• Optimizer: SGD
• Momentum: 0.9
• Initial learning rate: 0.045
• Learning rate decay: 2epoch毎に0.94倍
• JFT
• Optimizer: RMSprop
• Momentum: 0.9
• Initial learning rate: 0.001
• Learning rate decay: 300万サンプル毎に0.9倍
optimizationの構成
![Page 17: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/17.jpg)
• Weight decay
• L2正則化
• 2つのタスクで同じWeight decay rateを用いた
• Inception V3: 4e-5 (ImageNetで慎重にチューニング)
• Xception: 1e-5 (大雑把にチューニング)
• Dropout
• Xception も Inception V3 も同じ割合
• ImageNet: 0.5
• JFT: 0 (常識的な実験時間範囲内ではoverfittingさせられない程
の大きさのデータセットだから)
正則化項の構成
![Page 18: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/18.jpg)
どの実験も NVIDIA K80 GPU を60台使った
• ImageNet
• 1つの実験にそれぞれ3日
• JFT
• 1つの実験にそれぞれ1ヶ月以上
• 完全には収束していない
• 収束させるには3ヶ月以上かかるらしい
実験設備
![Page 19: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/19.jpg)
Xception の方が Inception V3 より僅かに良い結果
結果 (ImageNet)
![Page 20: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/20.jpg)
全結合層なしと全結合層2層(1層あたり4096units)の両方
を試した
→ Xceptionのほうが 4.3% 良い結果
結果 (JFT)
全結合層なし 全結合層2層
![Page 21: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/21.jpg)
• JFTのほうはImageNetのときと比べて大差でXception
が勝っている
• Inception V3 は ImageNetの分類タスクに最適化された
modelだから?
結果
ImageNet JFT
![Page 22: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/22.jpg)
• Xception に residual connections は必要か
• ImageNetで実験
→ 入れたほうが良い
追加実験1
![Page 23: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/23.jpg)
• Xceptionの空間方向畳み込みとチャネル方向畳み込みの
間に活性化関数は不要か
• ImageNetで実験
→ 空間方向畳み込みとチャネル方向畳み込みの間には活
性化関数は不要 (これはInception V3と真逆の結果)
追加実験2
dw → pw →
ReLU ReLU
?
![Page 24: [DL輪読会]Xception: Deep Learning with Depthwise Separable Convolutions](https://reader034.vdocuments.site/reader034/viewer/2022052116/5a6479887f8b9a63568b4635/html5/thumbnails/24.jpg)
• 今回扱った2つの分類タスクでは、Xception は
Inception V3 より優れた結果となった
• 既存のInception modulesは簡単にXceptionに置き換
えることができる
→ 今後のCNNの層設計の基礎になると期待
• 普通の畳み込み層と Xception の間くらいのものを試
していないので今後実験する
結論と展望