Adversarial Robustness via Runtime Masking and Cleansing Yi-Hsuan - - PowerPoint PPT Presentation

adversarial robustness via runtime masking and cleansing
SMART_READER_LITE
LIVE PREVIEW

Adversarial Robustness via Runtime Masking and Cleansing Yi-Hsuan - - PowerPoint PPT Presentation

Adversarial Robustness via Runtime Masking and Cleansing Yi-Hsuan Wu Chia-Hung Yuan Shan-Hung Wu Department of Computer Science, National Tsing Hua University, Taiwan International Conference on Machine Learning, 2020 Y.H. Wu, C.H. Yuan,


slide-1
SLIDE 1

Adversarial Robustness via Runtime Masking and Cleansing

Yi-Hsuan Wu Chia-Hung Yuan Shan-Hung Wu

Department of Computer Science, National Tsing Hua University, Taiwan

International Conference on Machine Learning, 2020

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 1 / 34

slide-2
SLIDE 2

Why many adversarial defenses are broken?

Deep neural networks are shown to be vulnerable to adversarial attacks, which motivates robust learning techniques

https://www.tensorflow.org/tutorials/generative/images/adversarial_example.png

1Athalye, A., Carlini, N., and Wagner, D. Obfuscated gradients give a false sense of

security: Circumventing defenses to adversarial examples. ICML’ 2018

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 3 / 34

slide-3
SLIDE 3

Why many adversarial defenses are broken?

Deep neural networks are shown to be vulnerable to adversarial attacks, which motivates robust learning techniques

https://www.tensorflow.org/tutorials/generative/images/adversarial_example.png

A plethora of defenses have been proposed, however, many of these have been shown to fail1

1Athalye, A., Carlini, N., and Wagner, D. Obfuscated gradients give a false sense of

security: Circumventing defenses to adversarial examples. ICML’ 2018

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 3 / 34

slide-4
SLIDE 4

Why many adversarial defenses are broken?

Recent study2 shows the sample complexity of robust learning can be significantly larger than standard training

2Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially

robust generalization requires more data. NeurIPS, 2018

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34

slide-5
SLIDE 5

Why many adversarial defenses are broken?

Recent study2 shows the sample complexity of robust learning can be significantly larger than standard training A theoretically grounded way to increase the adversarial robustness is to acquire more data

2Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially

robust generalization requires more data. NeurIPS, 2018

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34

slide-6
SLIDE 6

Why many adversarial defenses are broken?

Recent study2 shows the sample complexity of robust learning can be significantly larger than standard training A theoretically grounded way to increase the adversarial robustness is to acquire more data This partially explains why the adversarial training, a data augmentation technique, is empirically strong

2Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially

robust generalization requires more data. NeurIPS, 2018

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34

slide-7
SLIDE 7

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 5 / 34

slide-8
SLIDE 8

WebNN3

Use a web-scale image database as a manifold and project a test image onto the manifold Make more robust prediction by taking only the projected image as inputs

3Dubey, A., Maaten, L. v. d., Yalniz, Z., Li, Y., and Mahajan, D. Defense against

adversarial images using web-scale nearest-neighbor search. CVPR, 2019

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 6 / 34

slide-9
SLIDE 9

Drawback: 50 Billion Images May be Too Large

Web-scale database may not be available in other domains Performance drops when using smaller datasets

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 7 / 34

slide-10
SLIDE 10

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 8 / 34

slide-11
SLIDE 11

Goal

Most existing defenses try to get more data at training time

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34

slide-12
SLIDE 12

Goal

Most existing defenses try to get more data at training time We propose a runtime defense

1

Adapts network weights θ for a test point ˆ x

2

Makes inferecne ˆ y = f(ˆ x;θ)

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34

slide-13
SLIDE 13

Goal

Most existing defenses try to get more data at training time We propose a runtime defense

1

Adapts network weights θ for a test point ˆ x

2

Makes inferecne ˆ y = f(ˆ x;θ)

Merits:

Uses potentially large test data to improve adversarial robustness Is compatible with existing train-time defenses

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34

slide-14
SLIDE 14

Challenge: Test Data are Unlabeled

How to adapt network weights θ for unlabeled ˆ x?

Online adversarial training is not applicable

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 10 / 34

slide-15
SLIDE 15

Challenge: Test Data are Unlabeled

How to adapt network weights θ for unlabeled ˆ x?

Online adversarial training is not applicable

Extension: KNN-based online adversarial training

1

For each ˆ x, find its KNN N(ˆ x;D) from the training set D

2

Augment N(ˆ x;D) with adversarial examples (cyan points) perturbed from N(ˆ x;D)

3

Fine-tune the networks weights θ based on N(ˆ x;D)

4

Inference ˆ y = f(ˆ x;θ)

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 10 / 34

slide-16
SLIDE 16

Unfortunately, It Does Not Work!

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34

slide-17
SLIDE 17

Unfortunately, It Does Not Work!

Figure (b) shows a histogram of N(ˆ x;D) w.r.t. different labels (x-axis)

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34

slide-18
SLIDE 18

Unfortunately, It Does Not Work!

Figure (b) shows a histogram of N(ˆ x;D) w.r.t. different labels (x-axis) N(ˆ x;D) contains examples of the same label

The adversarial point ˆ x can mislead KNN selection

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34

slide-19
SLIDE 19

Unfortunately, It Does Not Work!

Figure (b) shows a histogram of N(ˆ x;D) w.r.t. different labels (x-axis) N(ˆ x;D) contains examples of the same label

The adversarial point ˆ x can mislead KNN selection

Therefore, the fine-tuned θ ends up being less robust

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34

slide-20
SLIDE 20

Runtime Masking and Cleansing (RMC)

RMC precomputes adversarial examples

1

Augment D with adversarial examples to get D0

2

Given a test point ˆ x, find its KNN N(ˆ x;D)0 from D0

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 12 / 34

slide-21
SLIDE 21

Runtime Masking and Cleansing (RMC)

RMC precomputes adversarial examples

1

Augment D with adversarial examples to get D0

2

Given a test point ˆ x, find its KNN N(ˆ x;D)0 from D0

3

Adapt the networks weights θ based on N(ˆ x;D0)

4

Inference ˆ y = f(ˆ x;θ)

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 12 / 34

slide-22
SLIDE 22

Why Does It Work?

As Figure (c) shows, N(ˆ x;D0) is no longer misled by the adversarial ˆ x

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 13 / 34

slide-23
SLIDE 23

Why Does It Work?

As Figure (c) shows, N(ˆ x;D0) is no longer misled by the adversarial ˆ x Defense effects:

The diverse-labeled N(ˆ x;D0) cleanses the θ of the non-robust patterns Also, dynamically masks the network gradients

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 13 / 34

slide-24
SLIDE 24

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 14 / 34

slide-25
SLIDE 25

Datasets

MNIST CIFAR-10 ImageNet

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 15 / 34

slide-26
SLIDE 26

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 16 / 34

slide-27
SLIDE 27

MNIST & CIFAR-10

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 17 / 34

slide-28
SLIDE 28

ImageNet

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34

slide-29
SLIDE 29

ImageNet

For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34

slide-30
SLIDE 30

ImageNet

For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy

RMC does not enforce a smooth decision boundary

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34

slide-31
SLIDE 31

ImageNet

For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy

RMC does not enforce a smooth decision boundary

For gray- black-box attacks, please refer to our main paper

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34

slide-32
SLIDE 32

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 19 / 34

slide-33
SLIDE 33

Defense-Aware Attacks

At runtime, attackers may be aware of RMC and try to circumvent it

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 20 / 34

slide-34
SLIDE 34

Strong Attack: PGD-Skip

Assumes that all information is exposed, including

Test sequence D0 and adapted model weights θ’s

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 21 / 34

slide-35
SLIDE 35

Strong Attack: PGD-Skip

Assumes that all information is exposed, including

Test sequence D0 and adapted model weights θ’s

I.e., the attack point ˆ xatt can bypass all previous adaptations

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 21 / 34

slide-36
SLIDE 36

RMC Could be Broken by PGD-Skip

About 15% robustness

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 22 / 34

slide-37
SLIDE 37

However, PGD-Skip is Unrealistic

Two strong assumptions

1

Access to all data points at runtime

2

No delay to place an attack point ˆ xatt

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 23 / 34

slide-38
SLIDE 38

However, PGD-Skip is Unrealistic

Two strong assumptions

1

Access to all data points at runtime

When model is publicly deployed, it is unlikely to eavesdrop every user’s input ˆ x

2

No delay to place an attack point ˆ xatt

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 23 / 34

slide-39
SLIDE 39

However, PGD-Skip is Unrealistic

Two strong assumptions

1

Access to all data points at runtime

When model is publicly deployed, it is unlikely to eavesdrop every user’s input ˆ x

2

No delay to place an attack point ˆ xatt

It is hard to mute other users

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 23 / 34

slide-40
SLIDE 40

More Realistic Defense-Aware Attacks

PGD-Skip-Partial

Only partial points in the input sequence are known

PGD-Skip-Delayed

The adversary generates/places an attack point ˆ xattwith some delay

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 24 / 34

slide-41
SLIDE 41

PGD-Skip-Partial

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 25 / 34

slide-42
SLIDE 42

PGD-Skip-Partial

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 26 / 34

slide-43
SLIDE 43

PGD-Skip-Delayed

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 27 / 34

slide-44
SLIDE 44

PGD-Skip-Delayed

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 28 / 34

slide-45
SLIDE 45

PGD-Skip-Delayed

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 29 / 34

slide-46
SLIDE 46

PGD-Skip-Delayed

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 30 / 34

slide-47
SLIDE 47

The Revenge of RMC

With some minor tweaks, RMC can defend these two attacks

q: delay of PGD-Skip-Delayed “known:” portion of eavesdropped points by PGD-Skip-Partial

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 31 / 34

slide-48
SLIDE 48

How Long is the Delay Incurred by RMC at Runtime?

About 1 second on CIFAR-10 and a delay of 20-40 seconds on ImageNet

May be acceptable for non-realtime applications Can be accelerated by existing techniques

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 32 / 34

slide-49
SLIDE 49

Outline

1

Goal

2

Related Works

3

Runtime Masking and Cleansing (RMC)

4

Experiments Train-Time Attacks Defense-Aware Attacks

5

Implications & Conclusion

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 33 / 34

slide-50
SLIDE 50

Conclusions & Implications

We proposed RMC, the first runtime defense

Leverages potentially large test data to improve the robustness of a model after deployment

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 34 / 34

slide-51
SLIDE 51

Conclusions & Implications

We proposed RMC, the first runtime defense

Leverages potentially large test data to improve the robustness of a model after deployment

Implications:

Currently, new attacks trigger new deployments RMC could end this endless chasing game

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 34 / 34

slide-52
SLIDE 52

Conclusions & Implications

We proposed RMC, the first runtime defense

Leverages potentially large test data to improve the robustness of a model after deployment

Implications:

Currently, new attacks trigger new deployments RMC could end this endless chasing game

Questions? Chat with us at session time!

Or email to: chyuan@datalab.cs.nthu.edu.tw

Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 34 / 34