CS11-747 Neural Networks for NLP
Adversarial Methods
Graham Neubig
Site https://phontron.com/class/nn4nlp2017/
Adversarial Methods Graham Neubig Site - - PowerPoint PPT Presentation
CS11-747 Neural Networks for NLP Adversarial Methods Graham Neubig Site https://phontron.com/class/nn4nlp2017/ Generative Models Generate a sentence randomly from distribution P(X) Generate a sentence conditioned on some other
CS11-747 Neural Networks for NLP
Graham Neubig
Site https://phontron.com/class/nn4nlp2017/
P(X)
information using distribution P(X|Y)
maximum likelihood! Real MLE Adversarial Image Credit: Lotter et al. 2015
some aspect of the generated output
generated output
generated features to find some trait
whether it is real or not
the discriminator into answering “real”
xreal
sample minibatch sample latent vars.
z xfake
convert w/ generator
y discriminator loss (higher if fail predictions) generator loss (higher if make predictions)
predict w/ discriminator
`D(✓D, ✓G) = −1 2Ex∼Pdata log D(x) − 1 2Ez log(1 − D(G(z))) High prob for real data High prob for fake data
`G(✓D, ✓G) = −1 2Ez log D(G(z))
`G(✓D, ✓G) = −`D(✓D, ✓G)
a single x in the training data
as side information, making it easier to push similar examples apart (Salimans et al. 2016)
discriminator, causing it to be over-confident
confidence of the target
smoothing, which only smooths predictions over
et al. 2017)
xreal
sample minibatch sample latent vars.
z xfake
convert w/ generator
y
predict w/ discriminator
Discrete! Can’t backprop
(e.g. Yu et al. 2016)
Gumbel softmax (Gu et al. 2017)
Yu et al. 2017), or pairs of sentences (e.g. Wu et al. 2017)
Type of Discriminator Strength of Discriminator
Learning Rate for Generator Learning Rate for Discriminator
credit assignment problem
D(this) D(this is) D(this is a) D(this is a fake) D(this is a fake sentence)
is a problem
rollouts (Yu et al. 2016)
might be noisy data!
better than selecting data randomly.
x h
y x h y Adversary! Adversary!
data (Kim et al. 2017)
representations for text classification
2017)
across tasks, others separate
(Qin et al. 2017)
marked, but would like to detect them if they are
the same as text without!
x h y Adversary! (sampled or true
sentences)
style 1, fake style 2->1, and another for vice-versa