GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning...

51
GANs for Exploiting Unlabeled Data Improved Techniques for Training GANs Learning from Simulated and Unsupervised Images through Adversarial Training Presented by: Uriya Pesso Nimrod Gilboa Markevich

Transcript of GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning...

Page 1: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

GANs for Exploiting Unlabeled Data

Improved Techniques for Training GANs

Learning from Simulated and Unsupervised Images through Adversarial Training

Presented by:Uriya Pesso

Nimrod Gilboa Markevich

Page 2: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

“[…] you could not see an article in the press [about AI] without the picture being Terminator. It was always Terminator, 100 percent. And you see less of that now, and that’s a good thing “

Yann LeCun, Director, Facebook AI

Page 3: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

“Generative Adversarial Networks is the most interesting idea in the last ten years in machine learning.”Yann LeCun, Director, Facebook AI

Page 4: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Presentation Overviewo Motivation

o Intro to GANs

o Paper 1: Semi Supervised Learning

o Paper 2: Simulated and Unsupervised Learning

o Conclusion

Page 5: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Motivation –Compensating for Missing Datao Labeled data is expensive (time, money, effort)

o Unlabeled data is cheaper

o Unlabeled data still contains information

o How can we utilize unlabeled data?

o GANs!◦ We will present two methods from two papers

Page 6: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Generative Adversarial Networkso What does it do?

◦ Generate synthetic data that is indistinguishable from real data

o Uses◦ Super-Resolution

◦ Text-to-Speech

◦ Art

◦ Exploiting unlabeled data

(for training other networks)

Page 7: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Generative Adversarial Networkso Adversarial Networks – Opponent Networks

◦ Generator – Create realistic samples

◦ Discriminator – Distinguish generated from real

o Compete with each other

o The only labels are Real/Fake

o Gradient Descent, Train in turns

Train D

Train G

Page 8: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Loss Functions

o Cross-entropy loss function

o – probability of x being real

o – generated sample from noise z

o – network parameters

o – discriminator loss function

o – Generator loss function

data~ ~noise, log log 1

D D G

pL D D G x zx z

G DL L

D x

G z

,

D G

DL

GL

Page 9: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen

Improved Techniques for Training GANs

Page 10: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Semi-Supervised Learning - Ideao Objective: We want to train a classifier

o We have:◦ labeled data => supervised learning

◦ unlabeled data => unsupervised learning

o Combining labeled and unlabeled data => semi-supervised

Page 11: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Semi-Supervised Learning - Ideao Combine GAN and classifier networks.

o Add a label for the synthetic data - K+1

1,.., , 1y K K

DClassifier

x or x*

yG(z)G

Generatorz

1,..,y K

Classifierx y

Generated,Realy

DDiscriminator

x*

yG(z)G

Generatorz

Supervised

Unsupervised

Semi-Supervised

Page 12: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Semi-Supervised Loss Functiono Cross entropy loss over two distributions

data, ~ ( , ) modellog |y p yL p y x x x

datasupervised , ~ ( , ) modellog | , 1p yL p y y K x y x x

dataunsupervised ~ ( ) model ~ modellog 1 1| log 1|p GL p y K p y K x x xx x

◦ - is the probability distribution of the input data.

◦ - is the model probability distribution to predict label y from K labels given data X.

data ,p yx

modellog |p y x

~ modellog 1|G p y K x x supervised unsupervisedL L

Page 13: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Supervised Loss

o Where:◦ - is the probability distribution of the input data.

◦ - is the model probability distribution to predict label y from K labels given data X.

1,.., , 1y K K

Classifierx y

datap x

datasuprvised , ~ ( , ) modellog | , 1y p yL p y y K x x x

modellog |p y x

Page 14: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Supervised Loss

o - is the probability distribution of the input data.

o - is the model probability distribution to predict label y from K labels given data X.

1,..,y K

Classifierx y

datap x

datasuprvised , ~ ( , ) modellog |p yL p y x y x x

modellog |p y x

Page 15: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Unsupervised Loss

o – the probability distribution to predict that the data x is unreal.

dataunsuprvised ~ ( ) model ~ ( ) modellog(1 ( 1| )) log( ( 1| ))p GL p y K p y K x x x zx x

Generated,Realy

DDiscriminator

x

y

G(z)GGenerator

z

data~ ~noise, log log 1

D D G

pL D D G x zx z

model( ) 1 ( 1| )D p y K x x

model ( 1| )p y K x

Page 16: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Punchline

data

data

supervised unsupervised

supervised , ~ ( , ) model

unsupervised ~ ( ) model ~ model

log | , 1

log 1 1| log 1|

p y

p G

L L L

L p y y K

L p y K p y K

x y x

x x x

x

x x

Classifier

GAN

Page 17: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Semi-Supervised Learning – Intuitiono How does a classifier benefit from unlabeled data?

o From the unlabeled data, the classifier learns to focus on the right features, thus reducing generalization error

Number Not Number

Page 18: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results

Page 19: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results - MNIST

Generated Real

Page 20: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results - MNIST

(*) number of labeled samples per class the rest are unlabeledtrain size: 60,000test size: 10,000

(*)

Page 21: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results – CIFAR10

CIFAR10 Generated

Page 22: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results – Imagenet

DCGAN(Not “Ours”)

Page 23: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results – Imagenet

“Our”Method

Page 24: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Avish Shrivastava, Tomas Pfister, Oncel Tuzel, Josh Susskind, Wenda Wang, Russ WebbApple Inc

Learning from Simulated and Unsupervised Images through Adversarial Training

CVPR 2017 Best Paper Award

Page 25: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Motivationo Labeled data is expensive (time, money, effort)

o Simulated data is cheap

o Alternatively, we could learn using simulated data

Simulator

Data Set of

LabeledSyntheticImages

NN

Page 26: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Motivationo Drawback: Simulated data may have artifacts

o We want more realistic synthetic data

o We have unlabeled data

o Let’s build a refiner

Page 27: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Refiner Network / S+U Learning

Simulator

Data Set of

LabeledSyntheticImages

Page 28: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

SimGAN Architecture

Page 29: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

SimGAN Architecture

Page 30: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Loss Function – Discriminatoro Adversarial Loss

real simulated~ ~

, log log 1D D R

p pL D D R

x x x xx x

o – probability of x being real

o – refined simulated image

o – network parameters

o – discriminator loss function

D x

R x

,

D R

DL

o – pdf of real images

o – pdf of simulated images

realp x

simulatedp x

Page 31: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Loss Function – Refinero Refiner has two goals

◦ Generate realistic samples – Adversarial Loss

◦ Preserve the label – Self-regularization

simulatedreal reg~

,R D R

pL x x

real log D R x reg 1R x x

o – refined simulated image

o – network parameters

o – refiner loss function

R x o – pdf of simulated images simulatedp x

,

D R

RL o – weight

Page 32: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Minor Improvementso Are we done?

o Almost. There are two additional mechanisms:◦ Local Adversarial Loss

◦ Using a History of Refined Images

Page 33: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Local Adversarial Loss

o Discriminator outputs wxh probability map

o The adversarial loss is the sum of the loss over the local patches

o Localization restrains artifacts – the refined image should look real in every patch

Page 34: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Local Adversarial Loss

Page 35: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Using a History of Refined Imageso Problem

◦ Discriminator only focuses on the latest refined images

◦ Refiner might reintroduce artifacts that the discriminator has forgotten

o Solution◦ Buffer refined images

Page 36: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Using a History of Refined Images

Page 37: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Using a History of Refined Images

Page 38: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results

Page 39: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Stages for SimGAN Performance Evaluation

1) Train SimGAN

2) Generate Synthetic Refined Dataset => Qualitative Results

3) Train NN (Estimator) with the Dataset

4) Test NN (Estimator) => Quantitative Results

Page 40: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results - Performance Evaluation using Gaze Estimatioro Simulated images – UnityEyes, 1.2M

o Real Labeled Dataset – MPIIGaze Dataset, 214K

Gaze Estimator

Page 41: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Process – 1. Train SimGAN

UnityEyes

MPIIGaze (without labels)

Page 42: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Data Set of Labeled Synthetic Images

Process – 2. Trained Refiner Generates DB

SimGANRefiner

Data Set of Labeled RefinedSynthetic Images

Page 43: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Qualitative Results

Page 44: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Process – 3. Train Gaze Estimator

Data Set of Labeled SyntheticRefined Images

Gaze Estimator

Page 45: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Data Set of Real Images

Process – 4. Test Gaze Estimator

Gaze Estimator

CNN

Output

Page 46: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Quantitative Results

Page 47: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Results – Performance Evaluation using Hand Pose Estimatioro NYU hand pose dataset, 73,000 training, 8,000 testing

Hand Pose

Estimator

Selected Points CoordinatesDepth Image

Page 48: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Qualitative Result

Page 49: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Quantitative Results

Page 50: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Quantitative Results

Page 51: GANs for Exploiting Unlabeled Dataweb.eng.tau.ac.il/deep_learn/wp-content/uploads/... · Learning from Simulated and Unsupervised Images through Adversarial Training Presented by:

Conclusiono Generative Adversarial Networks are awesome

◦ Generator vs. Discriminator

o Unlabeled data can be used for supervised learning◦ Semi-Supervised Learning

◦ Classifier combined with Discriminator

◦ Train GAN with labeled and unlabeled data

◦ Simulated and Unsupervised Learning◦ Train Refiner

◦ Generate large synthetic refined dataset