[DL Hacks 実装]A simple neural network module for relational reasoning

>100 Views

November 29, 17

スライド概要

2017/11/27
Deep Learning JP:
http://deeplearning.jp/hacks/

シェア

またはPlayer版

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

(ダウンロード不可)

関連スライド

各ページのテキスト
1.

A simple neural network module for relational reasoning 2017/11/20 Ken Maeda Yamaguchi Lab. The University of Tokyo

2.

F>1! 2

3.

0+3? • P@Vo A simple neural network module for relational reasoning (Relational Networks / RNs) • Ķâ Adam Santoro , David Raposo , David G.T. Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, Timothy Lillicrap • ¼Šő 2017/6/5 on arXiv (https://arxiv.org/pdf/1706.01427.pdf) 3

4.
[beta]
#B
• Relational Reasoning (”¨āƔ)

• IJŁÄň*ĵýŁƁĖ
• Neural Network$*‘çÉŐ%·<;#

• RN=ŀu#*Ÿĭ*ˆ®=Ā!

• DL>ETFRj(ė1Ç2”¨āƔƀiLko

• 4"*UPOSV$±õ

• CLEVR, Sort-of-CLEVR, bAbI, Dynamic physical systems

4

5.

Relational Reasoning • BsT?T?%*Ōą*”¨(" IJŁÄň*ĵý #āƔ:ŖƎ+zśŁ( • ÓÿgMTnóč*Śÿ=āƅä9õž=À čŋƎ* :ŧ»=ÂĴ: xŴ$ÃƉ# • Non-Relational Question: ŌĿ*C`LAFV*ģą(”:āƔ • Relational Question: C`LAFV“*”¨*ŷÜŁ'āƔ 5

6.

Relational Reasoning • ÿ¿IJŖ(%!#+ÉŐ • Symbol Grounding problemHs^kP+šÅ*xŴ=ƅˆ# *$šÅ*ĚÒ$+IJŖ+á¶$' ' • Ň­Ł‘ç'&*>aqR+ĉUP8޶=ÂĴ ħſ"[@N=–2ù°$zś‚:%ħ • U?amYsG$*>aqR*ħ+Ę*Âğĕ '”¨$ :% UPţĢ*Ÿĭ(¥Ɠ:%ħ • CNN5MLP'&*¡Ǝ'YkmoZSVrF>ETFRj$4 z³İî'”¨āƔĶÉŐ$ :%=áõ 6

7.

Relational Network • ”¨āƔ*3(íŞ;NNiLko • Ksao'amG>sWap@ŰÞÝňŁ( Ĺ • NN*˜ŖŁÂğ=ĄŹ”¨āƔ*Ž%':ŸľŌĸ=ġ: 7

8.

Relational Network • ”¨āƔ*3(íŞ;NNiLko • Ksao'amG>sWap@ŰÞÝňŁ( Ĺ • NN*˜ŖŁÂğ=ĄŹ”¨āƔ*Ž%':ŸľŌĸ=ġ: relation 2   MLP  end-to-end$şŨƒŖ 8

9.
[beta]
RN3<:
• ”¨āƔ=‘ç:(Learn to infer relations)

• Ĕ#*C`LAFVc>*”¨=‘ç
→RN+C`LAFV“*”¨*ĥÑ4*áÐ*xŴ4IJ8'
→RN+ĩ÷”¨*ĥÑ%|¢=āƔ:%=‘-ŠƁ

• UP½Ɔ

(Data efficient)

• İz*”ă!"$Œ”¨=­Õ

• !"ŌĿ*C`LAFV“*Ōĸ(C\_?SV'

• #2*”¨=zŅ(‘ç

= ř‚=Ġþ

• zƒ*C`LAFV(ĩ#Òƀ:(Operate on a set of objects)
• ŒƎŎ*C`LAFV*ïò(ĩ#ţū(summation ΣŮõ)
→ëƎ+C`LAFVèÆŎ*”¨*zśŁ'޶=–2

9

10.

(1/4) 1. CLEVR • 3DC`LAFV*QAUPOSV • querry attribute, compare attribute, … • 2]Ps$á´ 1) 2) pixel version 2D pixel form state description version 3DËšü©… CLEVR(̪) 10

11.

(2/4) 2. Sort-of-CLEVR • Ķâ8ÒĆUPOSVCLEVR794İî‚ • Œ†Ğ(msQh'©*6ü*C`LAFV=Řij • Œ†Ğ(ĩrelational/non-relationalàŸ=;;10Ÿƀx Sort-of-CLEVR ©+2åƏ8đĮ 11

12.

(3/4) 3. bAbI • TEMVbM*QAUPOSV • }ƕ™ŕ­ă'&ŌĿ*åƏ*āƔ (ĩ€:20DTIn*Ÿĭ • Ex: “Sandra picked up the football” and “Sandra went to the office” Q: “Where is the football?” A: “office” 12

13.

(4/4) 4. Dynamic physical systems • MuJoCoŧƅBsLs(7:,)KMThUPOSV(Ķâ8ÒĆ) • -":%ŧĨ*7 (Ļ)Ŭ: • "*do+³' \Z$ƒ¯ • Œdo*ƒĤړ(:Ëš8C`LAFV“*\ZČĤ* źŶ %KMTh(do=[W%#ČĤGm_)*ă=āƔ 13

14.

(1/4) CLEVRƀ*>ETFRj iLkoRN CLEVRƀ*iUo • RN(+CNN5LSTM'&=C`LAFV%#Ų3Ç3:êŏą  : • ŒƎ+C`LAFV›38;:*xŴ=×Ŀ:ŠƁ+' 14

15.

(2/4) • pixel(†Ğ)*ãt - CNN - • †Ğ+128 128 • 4"*û1Ç1Ę=‡#d d*k¹*ŌĸfSa(û1Ç2 • d d*kÛµ*ŒOo(*ĜĩŁ'¦“Łwij=Üœx*Ëš$ PGŤ4*=RN*C`LAFV%#t (ĒcLĀ) • C`LAFV(+ŗ«ŌĿ*ŧƅC`LAFVTFMRjŧƅŁC`LA FV*¯Æ'&=–2%$:*$‘çaqOM(Ĭ'êŏą=Ž: • úĪ*šì*ãt • úĪ=šìÄƐ=*00C`LAFV%#RN(ŒƎ$: 15

16.
[beta]
(3/4)
• àŸũ*Ų3Ç1(7:ù°ŤRN - LSTM • !àŸŎž(€#ðƅ=ūÁ$:7
• Ex.œ("

#àŸ;#

RN=ůĈ:

:%ƇŰĨ“*”¨ą+ŶxŴ

LSTM

• àŸŎ*Œİ»(ćă=’9ņ#oSF>SaT`o=ÒĆ

16

17.

(4/4) • Ýē·»ũ*ãt - LSTM - • ĩ÷*àŸ*ĽĒ*JeVOSV%#ÍĬ20OsTsM=×Ŀ ;8*OsTsM(JeVOSVŎ*ĜĩŁ'wij=Ümbo $PGŤŒOsTsM=LSTM=ōƇ(İ»%(ðƅ: • Ĕ#*àŸũ=Ôô' %$ÙĒIJß=Íó¸(Ƃ: • LSTM*ÍæúĪ=RN.*ŒƎC`LAFV%: iLkoRN bAbIƀ*iUo bAbIƀ*>ETFRj 17

18.
[beta]
5;2((CLEVR-from-pixels)
• Image: 4 CNNs (24 kernels each), ReLU, batch normalization
• Question: 128 unit LSTM, 32 unit look-up embeddings
• !: 4-layer MLP (256 units each), ReLU
• $: 3-layer MLP (256, 256[50% dropout], 29), ReLU
• final layer: softmax over the answer vocab

• Learning rate: 2.5e-4, Adam, cross-entropy
• Training: 64 mini-batches, 10 computers

éƃ*CLEVRƀ>ETFRj%Ŝ/#Ksao'Âğ
*Ħ*PMF*iUoöÎ+Ɣũ*Appendix(šÏ

18

19.

-&% (CLEVR-from-pixels) • 95.5%*ĈˆƆ=įĆÿ“=ĺ • †Ğ%àŸ*1$§Ƒ;ĎÄiUo%Ŝ/#4 27%ø‰: SA : Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In CVPR, 2016. 16 19

20.

-&% (CLEVR-from-pixels) • compare5count% !”¨āƔŠƁ'DTIn$éƃiU o79Ĭ ø‰: • ű²*iUo+ŜŁİî • Ő+·»5†Ğ*ðƅ$+'”¨āƔ( : %=ÜÊ 20

21.

=4"  A9E • C`LAFVŵ('!# • ÿ“$4Ő :(†ĞðƅŁ'ĄŹ) 21

22.

-&% ( ) • CLEVR(from state descriptions): 96.4% • RN*ťŭą • Sort-of-CLEVR: 94%ĺ(”¨ŝ”¨ƋŰ) • RN*<9(MLP=Ö %ĈˆƆ:(63%) • Ō(”closest-to”5”furthest-to”PMF(¥Đ(52.3%) →āƔŖƎ' õž RN$*iUoķ+”¨āƔ(ź½ 22

23.

-&% ( ) • bAbI: 18/20(Ɩı95%) • Dynamic physical systems 1) do“*\Z*źŶ: 93% 2) KMTh*ă: 95% • ťľ*MLP$+ƋŰ%4ĊŅ: 23

24.

')%F • RN=ė1Ç2%$”¨āƔPMF*ĆċĬŦ(¾ø • RNāƔ:%$CNN£ñ¦“Âğ*ðƅ(ďŔ$ • ResNet'&*¡Ǝ'iUo4ðƅ+ŋxāƔ+¥ä4 • RNøƈ*ðƅ=ŻŊ#źƀ'C`LAFV*޶=ŋ$ • ŝÂğ‚;ŒëƎ$4RN+Âğ‚;āƔƒŖ • RN(+C`LAFV“*ŌĿ*”¨(”:ÙĒIJß+ŠƁ' • ƄƀƒŖ'8,­Õ½Ɔ*¾ø("':4 • Ⱥ+RN=ſ'ƍy*Ÿĭ(łƀ#  24

25.

-8 https://github.com/whiteking64/Relational_Networks 25

26.

-8#B • Sort-of-CLEVR=̶iUoöÎƔũp.12 • DL_phrFPytorch • CNN_MLP%*Ŝ+ړ*ńÆøÄ'!# ' 26

27.

 • 10000ų*†Ğ 200ųTMVƀ • †ĞJ@N75x75 • Œ†Ğ(ĩRelational/Non-relationalŸĭ=;;10Ÿƀx • 3"*J`P@a • Relational Question©ĂŪwijĽwij • Non-relational QuestionÍ4~ /¤ ʼn©*Ā©*­ă • àŸbFVo+ļ11*\@XnbFVo      27

28.

(RN7/C) • †Ğ*ðƅ • CNN, 4Ę(DZo32, 64, 128, 256) • ReLU • Batch Normalization • àŸũ • RN(ĽČŒƎ(—(\@Xn('!# :3embedding%1':) 28

29.

(RN/C) • MLP -!- • 4Ę(Œ2000 units) • ReLU • MLP -$- • Íł‚ • • • • FqMBsVq^”ă Adam ‘çƆ: 1e-4 gY\SR: 64 • 4Ę(2000, 1000, 500, 100 units) • ReLU • ÍæĘ • 10 units(answer vector*Ûµ) • softmax”ă 29

30.

iPython notebook6@ https://github.com/whiteking64/Relational_Networks/tree/master/Python_ver 30

31.

$.% (1/2) • żę‹(‘ç(ړ9• 2epoch 6 ‰!#' …! • Ńĵ¬ ő!#420epochĵ *MFnsKlSV • ‘ç+# :{÷ • Epoch1æƊÚ48%, 50% • Epoch2æƊÚ63%, 63% 31

32.

$.% (2/2) • ī<9(CLEVRƀ*iUo$áĝ‘範(20 epochs) • Relation accuracy: 88% • Non-relation accuracy: 99% TMVUP$*accuracy • 79ě¯„³ '8ÔÃØƌ[1]3 • Relation accuracy: 88% • Non-relation accuracy: 99% 32

33.

*',D [1] áĝ(ņ!#+v*peLVn=Ĭ https://github.com/kimhc6028/relational-networks (ÔÃ( 33

34.

  34