humanevaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 conclusion •deep...

50
Human Evaluation The previous RL model only perform better on multi-turn conversations 1

Upload: others

Post on 14-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Human Evaluation

The previous RL model only perform

better on multi-turn conversations

1

Page 2: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Results: Adversarial Learning Improves ResponseGeneration

Human Evaluator

2

vs a vanilla generation model

Adversari

al Win

Adversari

al Lose

Tie

62% 18% 20%

Page 3: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Sample response

Tell me ... how long have you had this falling sickness?

System

3

Response

Page 4: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

4

Sample response

Tell me ... how long have you had this falling sickness?

System Response

Vanilla-Seq2Seq I don’t know what youare

talking about.

Page 5: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

5

Sample response

Tell me ... how long have you had this falling sickness?

System Response

Vanilla-Seq2Seq I don’t know what youare

talking about.

Mutual Information I’m not adoctor.

Page 6: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

6

Sample response

Tell me ... how long have you had this falling sickness?

System Response

Vanilla-Seq2Seq I don’t know what youare

talking about.

Mutual Information I’m not adoctor.

Adversarial Learning A few months, I guess.

Page 7: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Self-Supervised Learning meets Adversarial Learning

• Self-Supervised Dialog Learning (Wu et al., ACL 2019)

• Use of SSL to learn dialogue structure (sequence ordering).

7

Page 8: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Self-Supervised Learning meets Adversarial Learning

• Self-Supervised Dialog Learning (Wu et al., ACL 2019)

• Use of SSN to learn dialogue structure (sequence ordering).

• REGS: Li et al., (2017) AEL: Xu et al., (2017)

8

Page 9: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

9

Conclusion

• Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it is highly related to many subareas in NLP.

• GANs have obtained particular strong results in Vision, but yet there are both challenges and opportunities in GANs for NLP.

• In a case study, we show that adversarial learning for dialogue has obtained promising results.

• There are plenty of opportunities ahead of us with the current advances of representation learning, reinforcement learning, and self-supervised learning techniques in NLP.

Page 10: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

UCSB Postdoctoral Scientist Opportunities

• Please talk to me at NAACL, or email [email protected]

Page 11: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Thank you!

• Now we will take an 30 mins break.

11

Page 12: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Adversarial Examples in NLP

Sameer [email protected]

@sameer_

sameersingh.org

Slides: http://tiny.cc/adversarial

Page 13: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

What are AdversarialExamples?

“panda”

57.7% confidence

“gibbon”

99.3% confidence

[Goodfellow et al, ICLR 2015] Sameer Singh, NAACL 2019Tutorial 2

Page 14: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

What’s going on?

Fast Gradient SignMethod

[Goodfellow et al, ICLR 2015] Sameer Singh, NAACL 2019Tutorial 3

Page 15: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Sameer Singh, NAACL 2019Tutorial 4

Applications of AdversarialAttacks

• Security of MLModels• Should I deploy or not? What’s the worst that can happen?

• Evaluation of MLModels• Held-out test error is not enough

• Finding Bugs in MLModels• What kinds of “adversaries” might happen naturally?

• (Even without any badactors)

• Interpretability ofML Models?• What does the model care about, and what does it ignore?

Page 16: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Challenges in NLP Change

L2 is not really defined for text

What is imperceivable? What is a small vs big change?

What is the right way to measure this?

Sameer Singh, NAACL 2019Tutorial 5

Effect

Classification tasks fit in well, but …

What about structured prediction? e.g. sequence labeling

Language generation? e.g. MT orsummarization

Search

Text is discrete,

cannot use continuous optimization

How do we search over sequences?

Page 17: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversariesDifferent ways to address the challenges

Sameer Singh, NAACL 2019Tutorial 6

Page 18: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

What is a smallchange?

Sameer Singh, NAACL 2019Tutorial 7

What does it mean to misbehave?

How do we find the attack?

Page 19: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

What is a smallchange?

Sameer Singh, NAACL 2019Tutorial 8

Page 20: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Change: What is a smallchange?

CharactersPros:

Sameer Singh, NAACL 2019Tutorial 9

Often easy to miss

Easier to search over

Cons:

• Gibberish, nonsensicalwords

• No useful for interpretability

WordsPros:

Always from vocabulary

Often easy to miss

Cons:

• Ungrammatical changes

• Meaning alsochanges

Phrase/SentencePros:

• Most natural/human-like

• Test long-distance effects

Cons:

• Difficult toguarantee quality

• Larger space to search

Main Challenge: Defining the distance between x and x’

Page 21: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Change: A Character (or few)

Sameer Singh, NAACL 2019Tutorial 10[ Ebrahimi et al,ACL 2018, COLING 2018 ]

‘v’ …

x' = [ ‘I’ ‘ ’ ‘l’ ‘i’ ‘v’ …

Edit Distance: Flip, Insert,Delete

x = [ “I love movies” ]

x = [ ‘I’ ‘ ’ ‘l’ ‘o’

Page 22: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Change: Word-level Changes

Sameer Singh, NAACL 2019Tutorial 11

‘movie’ ‘ .’ ]

Random word? x' = [ ‘I ’ ‘lamp’ ‘this’ ‘movie’ ‘ .’ ]

Word Embedding? x' = [ ‘I ’ ‘really’ ‘this’ ‘movie’ ‘ .’ ]

Part of Speech? x' = [ ‘I ’ ‘eat’ ‘this’ ‘movie’ ‘ .’ ]

Language Model? x' = [ ‘I ’ ‘hate’ ‘this’ ‘movie’ ‘ .’ ]

x = [ ‘I ’ ‘like’ ‘this’

Let’s replace thisword

[Jia and Liang, EMNLP 2017]

[Alzantot et. al. EMNLP 2018 ]

Page 23: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Change: Paraphrasing viaBacktranslation

Sameer Singh, NAACL 2019Tutorial 12

This is a good movie

x

Este é um bom filme

c’est un bon film

Translate into multiple languages Use back-translators to scorecandidates

S(x, x’)∝0.5 * P(x’ | Este éum bom filme) +

0.5 * P(x’ | c’est un bon film)

This is a good movie This is a good movieS( , ) =1

This is a good movie That is a good movieS( , ) =0.95

S( , ) =0This is a good movie Dogs like cats

x, x’ should mean the same thing (semantically-equivalentadversaries)

[Ribeiro et alACL 2018]

Page 24: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Change: Sentence Embeddings

• Deep representations are supposed to encode meaning in vectors• If (x-x’) is difficult to compute, maybe we can do (z-z’)?

Sameer Singh, NAACL 2019Tutorial 13

D

Decoder

(GAN)

z

Encoder

z'

E x f y

x' f y'

[Zhao et alICLR 2018]

Page 25: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

What is a smallchange?

Sameer Singh, NAACL 2019Tutorial 14

Page 26: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

How do we find the attack?

Sameer Singh, NAACL 2019Tutorial 15

Page 27: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Search: How do we find the attack?

Only access predictions

(usually unlimited queries)

Full access to the model

(compute gradients)

Accessprobabilities

Create x’ and testwhether

the modelmisbehaves

Create x’ and test whether

general direction iscorrectUse the gradient to craft x’

Even this isoften

unrealistic

Sameer Singh, NAACL 2019Tutorial 16

Page 28: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Search: Gradient-based

Sameer Singh, NAACL 2019Tutorial 17

𝛻𝐽

𝐽𝑥 Or whatever themisbehavior is

1. Compute the gradient

2. Step in thatdirection (continuous)

3. Find the nearestneighbor

4. Repeat if necessary

Beam search over the above…

[ Ebrahimi et al,ACL 2018, COLING 2018 ]

Page 29: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Search: Sampling

1. Generate local perturbations

2. Select ones that looksgood

3. Repeat step 1with these new ones

4. Optional: beam search, geneticalgo

[Jia and Liang, EMNLP 2017]

[Zhao et al, ICLR 2018]

[Alzantot et. al. EMNLP 2018 ]

Sameer Singh, NAACL 2019Tutorial 18

Page 30: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Search: Enumeration (Trial/Error)

1. Make someperturbations

2. See if they work

3. Optional: pick the best one

[Iyyer et al,NAACL 2018 ]

[Ribeiro et al,ACL 2018 ]

[Belinkov, Bisk, ICLR 2018 ]

Sameer Singh, NAACL 2019Tutorial 19

Page 31: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

How do we find the attack?

Sameer Singh, NAACL 2019Tutorial 20

Page 32: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Choices in CraftingAdversaries

What does it mean to misbehave?

Sameer Singh, NAACL 2019Tutorial 21

Page 33: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Effect: What does it mean to misbehave?

ClassificationUntargeted: any other class

Targeted: specific otherclass

Other TasksLoss-based:Maximize the loss on the example

e.g. perplexity/log-loss of the prediction

Property-based: Test whether a propertyholds

e.g. MT:Acertain word is not generated

NER: No PERSON appears in the output

¡No meataques!MT: Don't attackme!

NER:

Sameer Singh, NAACL 2019Tutorial 22

Page 34: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Sameer Singh, NAACL 2019Tutorial 23

Evaluation: Are the attacks“good”?

• Are they Effective?• Attack/Success rate

• Are the Changes Perceivable? (HumanEvaluation)• Would ithave the same label?

• Does it looknatural?

• Does itmean the same thing?

• Do they help improve the model?• Accuracy after dataaugmentation

• Look at someexamples!

Page 35: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Review of theChoices

• Change• Character level• Word level• Phrase/Sentence level

• Effect• Targeted or Untargeted• Choose based on thetask

• Search• Gradient-based• Sampling• Enumeration

• Evaluation

Sameer Singh, NAACL 2019Tutorial 24

Page 36: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Research HighlightsIn terms of the choices that were made

Sameer Singh, NAACL 2019Tutorial 25

Page 37: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Noise Breaks Machine Translation!

Change Search Tasks

Random Character Based Passive; add and test Machine Translation

[Belinkov, Bisk, ICLR 2018 ] Sameer Singh, NAACL 2019Tutorial 26

Page 38: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

HotflipChange Search Tasks

Character-based

(extension to words)

Gradient-based; beam-search Machine Translation,

Classification, Sentiment

News Classification

Machine Translation

[ Ebrahimi et al,ACL 2018, COLING 2018 ] Sameer Singh, NAACL 2019Tutorial 27

Page 39: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Search Using GeneticAlgorithms

Change Search Tasks

Word-based,

language model score

Genetic Algorithm Textual Entailment,

Sentiment Analysis

[Alzantot et. al. EMNLP 2018 ] Sameer Singh, NAACL 2019Tutorial 28

Black-box, population-based

search of naturaladversary

Page 40: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Natural AdversariesChange Search Tasks

Sentence,

GANembedding

Stochastic search Images, Entailment,

Machine Translation

Textual Entailment

[Zhao et al, ICLR 2018] Sameer Singh, NAACL 2019Tutorial 29

Page 41: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Semantic Adversaries

Semantically-Equivalent Adversary

(SEA)

Semantically-Equivalent Adversarial Rules

(SEARs)

color →colour

xBacktranslation

+Enumerationx’ (x, x’)

Patterns

in “diffs”Rules

Change Search Tasks

Sentence via

Backtranslatio

n

Enumeration VQA, SQuAD,

Sentiment Analysis

[Ribeiro et al, ACL 2018] Sameer Singh, NAACL 2019Tutorial 30

Page 42: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Transformation Rules:VisualQA

[Ribeiro et al, ACL 2018] Sameer Singh, NAACL 2019Tutorial 31

Page 43: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Transformation Rules:SQuAD

[Ribeiro et al, ACL 2018] Sameer Singh, NAACL 2019Tutorial 32

Page 44: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Transformation Rules: SentimentAnalysis

[Ribeiro et al, ACL 2018] Sameer Singh, NAACL 2019Tutorial 33

Page 45: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Adding aSentenceChange Search Tasks

Add aSentence Domain knowledge,

stochastic search

Question Answering

[Jia, Liang, EMNLP 2017] Sameer Singh, NAACL 2019Tutorial 34

Page 46: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Some Loosely Related WorkUse a broader notions ofadversaries

Sameer Singh, NAACL 2019Tutorial 35

Page 47: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

CRIAGE: Adversaries for GraphEmbeddings

[ Pezeshkpour et.al. NAACL 2019 ] Sameer Singh, NAACL 2019Tutorial 36

Which link should weadd/remove,

out of million possible links?

Page 48: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

“Should Not Change” / “Should Change”

Should Not Change

• like AdversarialAttacks

• Random Swap

• Stopword Dropout

• Paraphrasing

• Grammatical Mistakes

Should Change

• Overstability Test

• Add Negation

• Antonyms

• Randomize Inputs

• Change Entities

Sameer Singh, NAACL 2019Tutorial 37[Niu, Bansal, CONLL 2018]

How do dialogue systems behave when the inputs are

perturbed in specificways?

Page 49: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Overstability: Anchors

Sameer Singh, NAACL 2019Tutorial 38

Anchor

Identify the conditions under which the

classifier has the sameprediction

[Ribeiro etal, AAAI 2018 ]

Page 50: HumanEvaluationstatic.tongtianta.site/paper_pdf/0150ca88-97c4-11e9-a5bb...9 Conclusion •Deep adversarial learning is a new, diverse, and inter-disciplinary research area, and it

Overstability: Input Reduction

Sameer Singh, NAACL 2019Tutorial 39[Feng et al, EMNLP 2018]

Remove as much of the input as you can

without changing the prediction!