Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Variational Auto Encoder入門

Variational Auto Encoder入門

https://twitter.com/0hnishi
https://dena.ai/work7/

Variational Auto Encoder入門+ 教師なし学習∩deep learning∩生成モデルで特徴量作成

VAEなんとなく聞いたことあるけどよくは知らないくらいの人向け

Katsunori Ohnishi

March 15, 2019
Tweet

More Decks by Katsunori Ohnishi

Other Decks in Technology

Transcript

  1. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Copyright (C)

    2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto Encoder +  ∩deep learning∩    March 15, 2019 Katsunori Ohnishi DeNA Co., Ltd. 1
  2. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

     n Unsupervised feature learning with deep generative model  Variational Auto-Encoder  Adversarial feature learning n  2
  3. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    +> TS ( ) U Twitter: @0hnishi , speakerdeck: https://speakerdeck.com/katsunoriohnishi n 6P U 2014,4/-2017,9/: B4~M2.509+7Computer VisionGH KAM • 3L (8QC@): CVPR16 (spotlight oral), ACMMM16, AAAI18 (oral) U RN: http://katsunoriohnishi.github.io/ U 2017,10/-<B: DeNA AI!%)1 • DEDeNA(!#"$):4Computer Vision/Data Science?5 '* & 2.= U → https://dena.ai/work7/ U JI-;OF  3
  4. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    26 +7∩deep learning∩&.# $3951.!" 4 (-4%,*() 26 1. 395: >< Kaggle8)%  VAE/'0   0
  5. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    8<0=∩deep learning∩+3'$(9?;73%"!#& 5 ( 2:*1/-) 8<$ 73  9?; @>< Kaggle>.*  VAE5,6  6 9)4 
  6. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Auto-encoder n

     encoder-decoder &"  6 $' loss ! Mean Squared Error(MSE) Self-supervised learning % #  https://hackernoon.com/a-deep-convolutional-denoising-autoencoder-for-image-classification-26c777d3b88e
  7. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Auto-encoder 

    7 Output!mask   segmentation “Auto” encoder-decoder'%)MNA> Segmentation Auto-encoder.48O encoder!=:K *G(&) %$→CG(&) "#3  Pre-training MSE<P6BV!1; 8O  NoiseF BV!2 noiseE R27H?I/noise0 Noise & +5T27%$!LDJ@?QU   Bottleneck layer!9, -S6   [V. Badrinarayanan+, CVPR15] https://towardsdatascience.com/applied-deep-learning-part-3-autoencoders-1c083af4d798 [X. Zhan+, AAAI18]
  8. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Auto-encoder n

    Pre-training: C 7%59 C Test $∩ train  … 5> n Noise=; 0  n Anomaly detection18.?*6 n &(A<3)/',)!+/ C MSE 4B#8. "@&-2!  8
  9. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    9 Auto-encoder Variational Auto-encoder       
  10. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    $("!#.*"!#- 2  1)encoder-decoder$("!# +0 $(   %,&.*"!# '/"!#  10 https://stanford.edu/~shervine/teaching/cs-229/cheatsheet-supervised-learning
  11. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    VAE ( #$'!   (  &   z  %" 11
  12. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n     12  https://qiita.com/kenmatsu4/i tems/b029d697e9995d93aa24 
  13. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n      13      https://qiita.com/kenmatsu4/i tems/b029d697e9995d93aa24
  14. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n 5,-#"3  14 /+45,0.   *! +4&!1' 5,0( +4 2 $%)1' https://hackernoon.com/latent-space-visualization-deep-learning-bits-2-bd09a46920df
  15. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n Q:VAE#!=-0$2":6  ? A: ' 15 ()/":) &4":713.5>+":     VAE#!=-.*→output;*9,"713.5  8%< )/":( Tutorial on Variational Autoencoders [C. Doersch, arxiv15]
  16. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n Forward"  !  17 ! " Σ " z Input X output Y Sample $ from % ! " , Σ "  z  #  backward
  17. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n    18 ! " Σ " z Input X output Y Sample $ from % Ο, Ι ∗ + Forward Backward
  18. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n Loss 19 ! " Σ " z Input X output Y Sample $ from % Ο, Ι ∗ + + − " - ./ %(!("), 2("))||% Ο, Ι KL !* q(z|X) &X $,6'logp(X|z) +/0 − (%&, *KL ! -.#2 1'4  *5') "30
  19. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n 7459JG;? L Q: -/'.$+'!# … L A: MSE=E!  20 DF,/0'> H3<9β"  KL)$,&%0' q(z|X) 5 *(X 29K6logp(X|z) 8@C − 7459 KL)$,&%0' A:IB (e.g. MSE) c β # − $ % A:*(:*( 6 →1 1: *( 8@
  20. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n      ! /    • https://arxiv.org/pdf/1606.05908.pdf • https://qiita.com/kenmatsu4/items/b029d697e9995d93aa24 21 − 
  21. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n   22   https://qiita.com/kenmatsu4/i tems/b029d697e9995d93aa24
  22. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n :       23 ! " Σ " z Input X output Y Sample $ from % Ο, Ι ∗ +  c
  23. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n  +36 AEVAE'. 7 5,-)$1/%  24 AE!4 5,-)$1  #0*2&( " VAE https://qiita.com/kenmatsu4/i tems/b029d697e9995d93aa24
  24. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n :>4   B */DL&%&'15example- • Chainer: https://github.com/chainer/chainer/tree/master/examples/vae • Pytorch: https://github.com/pytorch/examples/tree/master/vae • Keras: https://github.com/keras-team/keras/blob/master/examples/variational_autoencoder.py B Tips • " !)+,=3< • A67.(0?  #$&2 • 0?@9  8; 25
  25. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Variational Auto-encoder

    n $,(+#&2018%*"&(*%)"'%A! … K −"#$ −β    26 pytorch [Kingma+, ICLR14]     J=?/ 7>-G: 9;H@ :;H .6    CB< F https://github.com/pytorch/examples/blob/master/vae/main.py e.g.) D9IE 543 
  26. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. GAN n

    VAE     MSE Loss    GAN     27 https://skymind.ai/wiki/generative-adversarial-network-gan
  27. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. GAN n

    Discriminator#+1,3/ )- 5 "$( %'  28  real/fake0*  discriminator !24,3/& . ,3/ UCF101 Chance 0.9 unsupervised VGAN [C. Vondrick+, NIPS16] 36.7 FTGAN [K. Ohnishi+, AAAI18] 60.9 supervised Two-stream [K. Simonyan+, NIPS14] 88.0 I3D [J. Carreira+ CVPR17] 98.0 CIFAR10 Chance 10.0 unsupervised DCGAN [A. Radford+, ICLR16] 82.8 supervised Alexnet [A. Krizhevsky+, NIPS12] 89.0 Resnet110 [K. He+, CVPR16] 93.6 Accuracy
  28. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n GeneratorEncoderadversarial training     G: z (uniform distribution)   G(z)   E:  x E(x)  29 BiGAN
  29. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n GeneratorEncoderadversarial training     G: z (uniform distribution)   G(z)   E:  x E(x)  30 generated data e.g.) uniform distribution BiGAN
  30. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n GeneratorEncoderadversarial training     G: z (uniform distribution)   G(z)   E:  x E(x)  31 real data generated data e.g.) uniform distribution BiGAN
  31. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n GeneratorEncoderadversarial training     G: z (uniform distribution)   G(z)   E:  x E(x)  32 real data generated data e.g.) uniform distribution generated feature BiGAN
  32. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n  33 GAN BiGAN xG(z) Dreal fake  • x: real data • G(z):  {x, E(x)}{G(z), z} D • x: real data • E(x): real data   • z: random noise • G(z) : 
  33. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n  35   
  34. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. Adversarial feature

    learning [J. Donahue+ ICLR17] n   : https://github.com/jeffdonahue/bigan   pytorch( ): https://github.com/9310gaurav/ali-pytorch 36
  35. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. VAEBiGAN 

    37 n VAE > -:7<+0*  > #'(23 61 > Encoder, Decoder$! "%7<+#  > )89  n BiGAN > -:.0* > #'(23 61 > Encoder, Generator, Discriminator$! "%/61 > 5;=&,+GAN 4
  36. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved.  n

    VAE;M<C N 2:/=  =*7 n GANBKD?5+ELF ↑AI0J∩deep learning∩.5'%(BKD?5>E LF n -13HEnd2End$#"64,9!&8G ) @   38
  37. Copyright (C) 2019 DeNA Co.,Ltd. All Rights Reserved. FAQ n

    $#LGDO93;31Ca!S"'*)_W9 3;' b _W * IFXK_W93;E @`F_WUH? b IFYVC >B n Kaggle 0=8VAEVNU? J^) b \ #AENU? )'VAEV &(NU? )T+*) n VAE! A -  b !524</Z] >B31#,PQ!% b AE,VAE)&( R b 6.7:#! M[!% 39