[dl輪読会] residual attention network for image classification

21
Residual Attention Network for Image Classification Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, Xiaoou Tang 2017-09-04 輪読@松尾研究室 M1 ⽥村浩⼀郎

Upload: deep-learning-jp

Post on 21-Jan-2018

741 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: [DL輪読会] Residual Attention Network for Image Classification

ResidualAttentionNetworkforImageClassificationFeiWang, MengqingJiang, ChenQian, ShuoYang, ChengLi, Honggang

Zhang, XiaogangWang, XiaoouTang2017-09-04

輪読@松尾研究室M1⽥村浩⼀郎

Page 2: [DL輪読会] Residual Attention Network for Image Classification

Agenda

0.Information1. Introduction2. Relatedwork&knowledges3. ProposedModel4. Experiment&Result5. Conclusion6. *Squeeze-and-ExcitationNetworks

Page 3: [DL輪読会] Residual Attention Network for Image Classification

0.Information

• Author- FeiWang, MengqingJiang, ChenQian, ShuoYang, ChengLi, HonggangZhang, XiaogangWang, XiaoouTang

• Submissiondate- Submittedon23Apr2017

• Society- acceptedtoCVPR2017- https://arxiv.org/abs/1704.06904

• About- Computervisionにおいて,ResNetだけでなくAttentionも取り⼊れたもの

- まだpaperは出ていないが,ILSVRC2017で優勝したSqueeze-and-Excitationnetworksの前⾝?のモデル

Page 4: [DL輪読会] Residual Attention Network for Image Classification

1.Introduction-背景• Attentionモデルは時系列のモデルに対してはよく使われているが,画像認識などのfeedforwardnetworkに対しては使われてこなかった

• 近年の画像認識の技術向上は,ResNetにより,層を深くすることが可能になったことが⼤きい

ResNetを利⽤した `深い`CNNに対して,attention機構を適⽤し,精度向上を図る

Page 5: [DL輪読会] Residual Attention Network for Image Classification

1.Introduction-モデル構造と成果

1. Stackednetworkstructure• 複数のAttentionModuleを積み⽴てたモデル構造.異なるAttentionModuleで異なる種類のAttentionを導⼊できる

2. AttentionResidualLearning• 単純にAttentionModuleを導⼊するだけでは精度が下がる.ResNetを⽤いて深い(hundredsoflayers)のネットワークを⽤いる

3. Bottom-uptop-downfeedforwardattention• Bottom-up(背景の違いなどから)attention(注⽬)するアプローチ• Top-down(事前知識などから)attention(注⽬)するアプローチ

1. 安定して層を増やし精度向上(state-of-the-art@2017-04-23)2. End-to-Endの深いネットワークに簡単に適⽤でき,効率的な計算を⾏うことができる

Page 6: [DL輪読会] Residual Attention Network for Image Classification

2.Relatedwork&knowledge- Attentionmodel

• Attention機構が適⽤されるのは,多くの場合RNNEffectiveApproachestoAttention-basedNeuralMachineTranslationの例1. RNNにより隠れ層ベクトルを計算

ℎ" = 𝑅𝑁𝑁(ℎ"'(, 𝑥)2. ⼊⼒系列のどこに注⽬するかの重み𝑎"(𝑠)をscore関数により計算

𝑎" 𝑠 = exp 𝑠𝑐𝑜𝑟𝑒(ℎ67, ℎ")∑ exp 𝑠𝑐𝑜𝑟𝑒(ℎ67, ℎ")��

3. 重み𝑎" 𝑠 を⽤いて重み付き平均ベクトル𝑐"を計算𝑐" = :𝑎"(𝑠)

ℎ67

4. 3.の平均ベクトルと1.の隠れ層ベクトルから新しい出⼒ベクトルを計算ℎ;" = tanh(𝑊Aℎ" +𝑊C𝑐" + 𝑏)

5. 各単語の出⼒確率を計算𝑦" = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥((𝑊IJ"ℎ;" +𝑏IJ")

• Computervisionにおいては,以下のような研究でsoftattention(みたいなもの)が使われている• SpatialTransformerNetwork[17]->(⾯⽩いdemo:

https://drive.google.com/file/d/0B1nQa_sA3W2iN3RQLXVFRkNXN0k/view)

• Attentiontoscale:Scale-awaresemanticimagesegmentation[3]

[引⽤:EffectiveApproachestoAttention-basedNeuralMachineTranslation]

Page 7: [DL輪読会] Residual Attention Network for Image Classification

2.Relatedwork&knowledge- ResNet

• CNNにおいて層を深さは精度おいて⼤きく寄与する• 層が深すぎると勾配消失などの問題があった=>ResNet

• ResNet• 出⼒を𝐻 𝑥 とすると,残差𝐹 𝑥 = 𝐻 𝑥 − 𝑥を学習(最⼩化)する• 層が深くなると⼊⼒𝑥と出⼒𝐻 𝑥 はほとんど同じ値になる.直接𝐻 𝑥 の値を𝑥に近づけることよりも,残差𝐹 𝑥 を0に近づける⽅が簡単である

Page 8: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel- ResidualAttentionNetwork

1. Attention residual learning

2. Soft mask branch 3. Special attention and channel attention

Page 9: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel3.1.AttentionResidualLearning

• 単純にAttention機構をCNNの出⼒に掛け合わせるだけでは,以下の問題から精度が下がる

1. 層が深くなるにつれて勾配が消失する2. CNNにおける重要な特徴量を弱めてしまう可能性がある

• AttentionResidualLearning

• Softmaskbranchの𝑀 𝑥 ∈ [0, 1]が以下の役割を果たしている1. 特徴量選択2. ノイズの抑制

Attentionmoduleの出⼒ SoftAttentionMask Convolutionの出⼒

**i:spatialposition,c:channel

Residual

Page 10: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel3.1.AttentionResidualLearning

• AttentionResidualLearningは良い特徴量を保持する⼀⽅で,maskbranchが特徴量を抽出する能⼒を弱めてしまう• StackedAttentionModulesがそのトレードオフを補い,特徴量mapを洗練していく

• AttentionModuleが異なる役割のattention機構を持ち,層が深くすることを可能にしている

複数のAttentionModule

Page 11: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel3.1.AttentionResidualLearning

異なるAttentionModuleで異なるattentionmaskを持つ.層が浅いattentionmoduleでは背景の空の⻘⾊を消し,層が深いattentionmoduleでは気球を強調している

Page 12: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel3.2.SoftMaskBranch

• SoftMaskBranch

• 以下の2つの機能を畳み込み構造に1. Fastfeed-forwardsweep->画像全体の情報を捉える2. Top-downfeedbackstep->元の特徴量mapと画像全体の情報を組み合わせる

Page 13: [DL輪読会] Residual Attention Network for Image Classification

3.Proposalmodel3.3.SpatialAttentionandChannelAttention

• 活性化関数を変えることによって,attentionの制約を加えることができる

1. Mixedattention=>シグモイド

2. Channelattention=>場所ごとに正規化

3. Spatialattention=>channelごとに正規化

Page 14: [DL輪読会] Residual Attention Network for Image Classification

4.Experiment&Result4.1.CIFARandAnalysis

1. AttentionResidualLearningの有効性を検証• AttentionResidualLearningを⾏わないナイーブなattention機構を⽤いたモデル(NAL:naive

attentionlearning)をベースラインにする

• AttentionModuleのstageごとに出⼒の平均を取ったもの.NALではstage2で勾配が消えていることがわかる

Page 15: [DL輪読会] Residual Attention Network for Image Classification

4.Experiment&Result4.1.CIFARandAnalysis

2. 他のmaskbranch構造との⽐較• ダウンサンプリングとアップサンプリングを⾏わない普通の畳み込みと精度を⽐較することで,maskbranchの構造の優位性を検証する

Page 16: [DL輪読会] Residual Attention Network for Image Classification

4.Experiment&Result4.1.CIFARandAnalysis

3. ラベルのノイズに対する耐性の検証• ダウンサンプリングとアップサンプリングを⾏わない普通の畳み込みと精度を⽐較することで,maskbranchの構造の優位性を検証する

• Trainingconvolutionalnetworkswithnoisylabels[31]に従って,以下のように確率を定義r=正しいlabelである確率,𝑞UV =本当のlabelがjで実際のノイズつきlabelがiである確率

Page 17: [DL輪読会] Residual Attention Network for Image Classification

4.Experiment&Result4.1.CIFARandAnalysis

4. 他のstate-of-the-artのモデルとの精度⽐較

Page 18: [DL輪読会] Residual Attention Network for Image Classification

4.Experiment&Result4.2.ImageNetClassification

1. 精度が良くなっているだけでなく,モデルの効率性が優れる1. より少ないパラメタで学習可能2. FLOPs(Floating-pointOperationsPerSecond)が優れている

2. ResNetユニットについて⽐較すると,1. 同程度の精度ならAttentionNeXt-56の⽅が効率的2. 同程度の効率性ならAttentionNeXt-56の⽅が⾼精度

3. State-of-the-artのアルゴリズムと⽐べても⾼性能

Page 19: [DL輪読会] Residual Attention Network for Image Classification

5.Conclusion

• ResNetにattention機構を追加• 異なるAttentionModuleで異なるattention機構を持つ• Attention機構にbottom-uptop-downfeedforwardconvolutionalstructureを⽤いる

• より安定して層を深くし,精度を向上• より洗練された特徴量の選択とノイズへの耐性• 既存のモデルに対して,要求されるモデルの複雑さ(パラメタ数や計算量)が少なくて済む

Page 20: [DL輪読会] Residual Attention Network for Image Classification

6.Squeeze-and-ExcitationNetworks

• ILSVRC2017で優勝したモデル(まだpaperでてない)

• ResidualAttentionNetworkforImageClassificationと⾮常に似ている• 違いはchannelごとにattentionを⾏なっていること

[引⽤:https://github.com/hujie-frank/SENet]

Page 21: [DL輪読会] Residual Attention Network for Image Classification

~資料参考⽂献~**論⽂内引⽤⽂献を除く

• Squeeze-and-Excitationnetworks(ILSVRC2017winner)atCVPR2017https://photos.google.com/share/AF1QipNRXiNDP9tw-B_kyKk4hnXL_N283IaWNxSYH7jtAN1N0m62Uydh3MnpWFPh2GQYUw?key=STNBSU5XRkpKLXBSbmE2Um9GbGRUSm9aME1naFF3

• ConvolutionalNeuralNetworksのトレンドhttps://www.slideshare.net/sheemap/convolutional-neural-networks-wbafl2

• Resnetと派⽣研究の紹介https://www.slideshare.net/masatakanishimori/res-net

• ResidualNetwork(ResNet)の理解とチューニングのベストプラクティスhttps://deepage.net/deep_learning/2016/11/30/resnet.html

• EffectiveApproachestoAttention-basedNeuralMachineTranslation,Minh-ThangLuong,Hieu Pham,ChristopherD.Manning

https://arxiv.org/abs/1508.04025