Title: CERTIFIED DEFENSES FOR ADVERSARIAL PATCHES *

Abstract: Adversarial patch attacks are among one of the most practical threat models against real-world computer vision systems. This paper studies certified and empirical defenses against patch attacks. We begin with a set of experiments showing that most existing defenses, which work by pre-processing input images to mitigate adversarial patches, are easily broken by simple white-box adversaries. Motivated by this finding, we propose the first certified defense against patch attacks, and propose faster methods for its training. Furthermore, we experiment with different patch shapes for testing, obtaining surprisingly good robustness transfer across shapes, and present preliminary results on certified defense against sparse attacks. Our complete implementation can be found on: https:

1. INTRODUCTION:

Despite the great success of neural networks for vision problems, they are easily fooled by adversarial attacks in which the input to a machine learning model is modified with the goal of manipulating its output. Research in this area is largely focused on norm-bounded attack (Madry et al., 2017; Tramèr & Boneh, 2019; Shafahi et al., 2019) , where the adversary is allowed to perturb all pixels in an image provided that the p -norm of the perturbation is within prescribed bounds. Other adversarial models were also proposed, such as functional (Laidlaw & Feizi, 2019) , rotation/translation (Engstrom et al., 2017) , and Wasserstein (Wong et al., 2019) , all of which allow modification to all pixels.

Whole-image perturbations are unrealistic for modeling "physical-world" attacks, in which a realworld object is modified to evade detection. A physical adversary usually modifies an object using stickers or paint. Because this object may only occupy a small portion of an image, the adversary can only manipulate a limited number of pixels. As such, the more practical patch attack model was proposed (Brown et al., 2017) . In a patch attack, the adversary may only change the pixels in a confined region, but is otherwise free to choose the values yielding the strongest attack. The threat to real-world computer vision systems is well-demonstrated in recent literature where carefully crafted patches can fool a classifier with high reliability (Brown et al., 2017; Karmon et al., 2018) , make objects invisible to an object detector (Wu et al., 2019; Lee & Kolter, 2019) , or fool a face recognition system (Sharif et al., 2017) . In light of such effective physical-world patch attacks, very few defenses are known to date.

In this paper, we study principled defenses against patch attacks. We begin by looking at existing defenses in the literature that claim to be effective against patch attacks, including Local Gradient Smoothing (LGS) (Naseer et al., 2019) and Digital Watermarking (DW) (Hayes, 2018) . Similar to what has been observed for whole-image attacks by (Athalye et al., 2018) , we show that these patch defenses are easily broken by stronger adversaries. Concretely, we demonstrate successful white-box attacks, where the adversary designs an attack against a known model, including any pre-processing steps. To cope with such potentially stronger adversaries, we train a robust model that produces a lower-bound on adversarial accuracy. In particular, we propose the first certifiable defense against patch attacks by extending interval bound propagation (IBP) defenses (Gowal et al., 2018; Mirman et al., 2018) . We also propose modifications to IBP training to make it faster in the patch setting. Furthermore, we study the generalization of certified patch defenses to patches of different shapes, and observe that robustness transfers well across different patch types. We also present preliminary results on certified defense against the stronger sparse attack model, where a fixed number of possibly non-adjacent pixels can be arbitrarily modified (Modas et al., 2019) .

2. PROBLEM SETUP:

We consider a white-box adversary that is allowed to choose the location of the patch (chosen from a set L of possible locations) and can modify pixels within the particular patch (chosen from the set P) similar to (Karmon et al., 2018 ). An attack is successful if the adversary changes the classification of the network to a wrong label. In this paper, we are primarily interested in the patch attack robust accuracy (adversarial accuracy for short) as defined by

EQUATION

where the operator A places the adversarial patch p on a given image x at location l, f is a neural network with parameter θ, X is a distribution of images, and X is a characteristic function that takes value 1 if its argument is true, and 0 otherwise.

In this model, the strength of the adversary can vary depending on the set of possible patches allowed, and the type of perturbation allowed within the patch. In what follows, we assume the standard setup in which the adversary is allowed any perturbation that maintains pixel intensities in the range [0, 1].

Unless otherwise noted, we also assume the patch is restricted to a square of prescribed size. We consider two different options for the set L of possible patch locations. First, we consider a weak adversary that can only place patches at the corner of an image. We find that even this weak model is enough to break existing patch defenses. Then, we consider a stronger adversary with no restrictions on patch location, and use this model to evaluate our proposed defenses. Note that an adversary, when restricted to modify only a square patch at location l in the image, has the freedom to modify any non-square subset of these pixels. In other words, a certified defense against square patch attacks also provably subverts any non-square patch attack that fits inside a small enough square.

In general, calculating the adversarial accuracy (1) is intractable due to non-convexity. Common approaches try to approximate it by solving the inner minimization using a gradient-based method. However, in Section 3, we show that depending on how the minimization is solved, the upper bound could be very loose: a model may appear to be very robust, but fail when faced with a stronger attack.

To side-step the arms race between attacks and defenses, in Section 4, we extend the work of (Gowal et al., 2018) and (Mirman et al., 2018) to train a network that produces a lower bound on adversarial accuracy. We will refer to approximations of the upper bound as empirical adversarial accuracy and the lower bound as certified accuracy.

3. VULNERABILITY OF EXISTING DEFENSES:

We start by examining existing defense strategies that claim to be effective against patch attacks.

Similar to what has been observed for whole-image attacks by Athalye et al. (2018) , we show that these patch defenses can easily be broken by white-box attacks, where the adversary optimizes against a given model including any pre-processing steps.

3.1. EXISTING DEFENSES:

Under our threat model, two defenses have been proposed that each use input transformations to detect and remove adversarial patches.

The first defense is based on the observation that the gradient of the loss with respect to the input image often exhibits large values near the perturbed pixels. In (Hayes, 2018) , the proposed digital watermarking (DW) approach exploits this behavior to detect unusually dense regions of large In other words, the image gradients tend to be large within these adversarial patches. Note that the image gradient here differs from the gradient in Hayes (2018) , the former is with respect the changes of adjacent pixel values and the later is with respect to the classification loss. Naseer et al. (2019) propose suppressing this adversarial noise by multiplying each pixel with one minus its image gradient as in (2). To make their methods more effective, Naseer et al. (2019) also pre-process the image gradient with a normalization and a thresholding step.

EQUATION

The λ here is a smoothing hyper-parameter. Naseer et al. (2019) claim the best adversarial accuracy on ImageNet with respect to patch attacks among all of the defenses we studied. They also claim that their defense is resilient to Backward Pass Differential Approximation (BPDA) from Athalye et al.

(2018), one of the most effective methods to attack models that include a non-differentiable operator as a pre-processing step.

3.2. BREAKING EXISTING DEFENSES:

Using a similar setup as in (Hayes, 2018; Naseer et al., 2019) , we are able to mostly replicate the reported empirical adversarial accuracy for Iterative Fast Gradient Sign Method (IFGSM), a common gradient based attack, but we show that when the pre-processing step is taken into account, the empirical adversarial accuracy on ImageNet quickly drops from ∼ 70%(∼ 50%) for LGS(DW) to levels around ∼ 10% as shown in Table 1 .

Specifically, we break DW (Hayes, 2018 ) by applying BPDA, in which the non-differentiable operator is approximated with an identity mapping during the backward pass. We break LGS (Naseer et al., 2019) by directly incorporating the smoothing step during backpropagation. Even though the windowing and thresholding steps are non-differentiable, the smoothing operator provides enough gradient information for the attack to be effective.

To make sure that our evaluation is fair, we used the exact same models as Hayes (2018) (VGG19) and Szegedy et al. (2016) (Inception V3) . We also consider a weaker set of attackers that can only attack the corners, the same as their setting. Further, we ensure that we were able to replicate their reported result under similar setting.

4.1. BACKGROUND ON CERTIFIED DEFENSES:

Certified defenses have been intensely studied with respect to norm-bounded attacks (Cohen et al., 2019; Wong & Kolter, 2017; Gowal et al., 2018; Mirman et al., 2018; Zhang et al., 2019b) . In all of these methods, in addition to the prediction model, there is also a verifier. Given a model and an input, the verifier outputs a certificate if it is guaranteed that the image can not be adversarially perturbed. This is done by checking whether there exists any nearby image (within a prescribed p distance) with a different label than the image being classified. While theoretical bounds exist on the size of this distance that hold for any classifier (Shafahi et al., 2018) , exactly computing bounds for a specific classifier and test image is hard. Alternatively, the verifier may output a lower bound on the distance to the nearest image of a different label. This latter distance is referred to as the certifiable radius. Most of these verifiers provide a rather loose bound on the certifiable radius. However, if the verifier is differentiable, then the network can be trained with a loss that promotes tightness of this bound. We use the term certificate training to refer to the process of training with a loss that promotes strong certificates. Interval bound propagation (IBP) (Mirman et al., 2018; Gowal et al., 2018 ) is a very simple verifier that uses layer-wise interval arithmetic to produce a certificate. Even though the IBP certificate is generally loose, after certificate training, it yields state-of-the-art certifiably-robust models for l ∞ -norm bounded attacks (Gowal et al., 2018; Zhang et al., 2019b) . In this paper, we extend IBP to train certifiably-robust networks resilient to patch attacks. We first introduce some notation and basic algorithms for IBP training.

Notation We represent a neural network with a series of transformations h (k) for each of its k layers. We use z (k) ∈ R n k to denote the output of layer k, where n k is the number of units in the k th layer and z (0) stands for the input. Specifically, the network computes

z (k) = h (k-1) (z (k-1) ) ∀k = 1, . . . , K.

Certification Problem To produce a certificate for an input x 0 , we want to verify that the following condition is true with respect to all possible labels y:

EQUATION

Here, e i is the i th basis vector, and m y is called the margin following Wong & Kolter (2017) . Note that m ytrue is always equal to 0. The vector m contains all margins corresponding to all labels. B(x 0 ) is the constraint set over which the adversarial input image may range. In a conventional setting, this is an ∞ ball around x 0 . In the case of patch attack, the constraint set contains all images formed by applying a patch to x 0 ;

EQUATION

The Basics of Interval Bound Propagation (IBP) We now describe how to produce certificates using interval bound propagation as in (Gowal et al., 2018) . Suppose that for each component in z (k-1) we have an interval containing all the values which this component reaches as z (0) ranges over the ball k) , then we can get an outer approximation of the reachable interval range of activations by the next layer z (k) using the formulas below

B(x 0 ). If z (k) = h (k) (z (k-1) ) is a linear (or convolutional) layer of the form z (k) = W (k) z (k-1) + b (

EQUATION

EQUATION

Here z (k-1) denotes the upper bound of each interval, z (k-1) the lower bound, and

|W (k) | the element-wise absolute value. Alternatively, if h (k) (z (k-1)

) is an element-wise monotonic activation (e.g., a ReLU), then we can calculate the outer approximation of the reachable interval range of the next layer using the formulas below.

EQUATION

When the feasible set B(x 0 ) represents a simple ∞ attack, the range of possible z (0) values is trivially characterized by an interval bound z (0) and z (0) . Then, by iteratively applying the above rules, we can propagate intervals through the network and eventually get z (K) and z (K) . A certificate can then be given if we can show that (3) is always true for outputs in the range z (K) and z (K) with respect to all possible labels. More specifically, we can check that the following holds for all y

EQUATION

)

Training for Interval Bound Propagation To train a network to produce accurate interval bounds, we simply replace standard logits with the -m vector in (3). Note that all elements of m need to be larger than zero to satisfy the conditions in (3), and m ytrue is always equal to zero. Put simply, we would like m ytrue = 0 to be the least of all margins. We can promote this condition by training with the loss function Certificate Loss = Cross Entropy Loss(-m, y).

(10)

Unlike regular neural network training, stochastic gradient descent for minimizing equation 10 is unstable, and a range of tricks are necessary to stabilize IBP training (Gowal et al., 2018) . The first trick is merging the last linear weight matrix with (e y -e ytrue ) before calculating -m y . This allows a tighter characterization of the interval bound that noticeably improves results. The second trick uses an "epsilon schedule" in which training begins with a perturbation radius of zero, and this radius is slowly increased over time until a sentinel value is reached. Finally, a mixed loss function containing both a standard natural loss and an IBP loss is used.

In all of our experiments, we use the merging technique and the epsilon schedule, but we do not use a mixed loss function containing a natural loss as it does not increase our certificate performance.

4.2. CERTIFYING AGAINST PATCH ATTACKS:

We can now describe the extension of IBP to patches. If we specify the patch location, one can represent the feasible set of images with a simple interval bound: for pixels within the patch, the upper and lower bound is equal to 1 and 0. For pixels outside of the patch, the upper and lower bounds are both equal to the original pixel value. By passing this bound through the network, we would be able to get m single location and verify that they satisfy the conditions in (3).

However, we have to consider not just a single location, but all possible locations L to give a certificate.

To adapt the bound to all possible location, we pass each of the possible patches through the network, and take the worst case margin. More specifically, 

m

Unfortunately, the cost of producing this naïve certificate increases quadratically with image size. Consider that a CIFAR-10 image is of size 32×32, requiring over a thousand interval bounds, one for each possible patch location. To alleviate this problem, we propose two certificate training methods: Random Patch and Guided Patch, so that the number of forward passes does not scale with the dimension of the inputs.

Random Patch Certificate Training:

In this method, we simply select a random set of patches out of the possible patches and pass them forward. A level of robustness is achieved even though a very small number of random patches are selected compared to the total number of possible patches

EQUATION

)

where S is a random subset of L. Similarly, the random patch certificate loss is calculated as below.

Random Patch Certificate Loss = Cross Entropy Loss(-m random patches (L), y)

Guided Patch Certificate Training In this method, we propose using a U-net (Ronneberger et al., 2015) to predict m single patch , and then randomly select a couple of locations based on the predicted m single patch so that fewer patches need to be passed forward.

Note that very few patches contribute to the worst case bound m es in (11). In fact, the number of patches that yield the worst case margins will be no more than the number of labels. If we know the worst-case patches beforehand, then we can simply select the few worst-case patches during training.

We propose to use U-net as the number of locations and margins is very large. For a square patch of size n × n and an image of size m × m, the total number of possible locations is (m -n + 1) 2 , and for each location the number of margins is equal to the number of possible labels.

EQUATION

)

Given the U-net prediction of m pred , we then randomly select a single patch for each label based on the softmax of the predicted m pred . The number of selected patches is equal to the number of labels. After these patches are passed forward, the U-net is then updated with a mean-squared-error loss between the predicted margins m pred and the actual margins m actual . Note that only a few patches are selected at a time, so that the mean-squared-error only passes through the selected patches.

EQUATION

)

The network is trained with the following loss:

Guided Patch Certificate Loss = Cross Entropy Loss(-m guided patches (L), y).

Certification Process In all our experiments, we check that equation ( 3) is satisfied by iterating over all possible patches and forward-passing the interval bounds generated for each patch; this overhead is tolerable at evaluation time.

4.3. CERTIFYING AGAINST SPARSE ATTACKS:

IBP can also be adapted to defend against sparse attack where the attacker is allowed to modify a fixed number (k) of pixels that may not be adjacent to each other (Modas et al., 2019) . The only modification is that we have to change the bound calculated from the first layer to

EQUATION

and apply equation ( 5) and ( 6) for the subsequent layers. Here, (.) top k is the sum of the largest k elements in the vector.

5. EXPERIMENTS:

In this section, we compare our certified defenses with exiting algorithms on two datasets and three model architectures of varying complexity. We consider a strong attack setting in which adversarial patches can appear anywhere in the image. Different training strategies for the certified defense are also compared, which shows a trade-off between performance and training efficiency. Furthermore, we evaluate the transferability of a model trained using square patches to other adversarial shapes, including shapes that do not fit in any certified square. The training and architectural details can be found in Appendix A.1. We also present preliminary results on certified defense against sparse attacks.

5.1. COMPARISON AGAINST EXISTING DEFENSES:

In this section, we study the effectiveness of our proposed IBP certified models against an adversary that is allowed to place patches anywhere in the image, even on top of the salient object. If the patch is sufficiently small, and does not cover a large portion of the salient object, then the model should still classify correctly, and defense against the perturbation should be possible.

In the best case, our IBP certified model is able to achieve 91.6% certified (Table 2 ) with respect to a 2×2 patch (∼ .5% of image pixels) adversary on MNIST. For more challenging cases, such as a 5

× 5 ( ∼ 2.5% of image pixels) patch adversary on CIFAR-10, the certified adversarial accuracy is only 24.9% (Table 2 ). Even though these existing defenses appear to achieve better or comparable adversarial accuracy as our IBP certified model when faced with a weak adversary, when faced with a stronger adversary their adversarial accuracy dropped to levels below our certified accuracy for all cases that we analyzed.

When evaluating existing defenses, we only report cases where non-trivial adversarial accuracy is achieved against a weaker adversary. We do not explore cases where LGS and DW perform so poorly that no meaningful comparison can be done.

LGS and DW are highly dependent on hyperparameters to work effectively against naive attacks, and yet neither Naseer et al. (2019) nor Hayes (2018) proposed a way to learn these hyperparameters. By trial and error, we were able to increase the adversarial accuracy against a weaker adversary for some settings, but not all. In addition, we also notice a peculiar feature of DW: when we increase the adversarial accuracy, the clean accuracy degrades, sometimes so much that it is even lower than the empirical adversarial accuracy. This happens because DW always removes a patch from the prediction. When an adversarial patch is detected, it is likely to be removed, enabling correct prediction. On the other hand, when there are no adversarial patches, DW removes actual salient information, resulting in lower clean accuracy.

Here we did not compare our results with adversarial training, because even though it produces some of the most adversarially robust models, it does not offer any guarantees on the empirical robust accuracy, and could still be decreased further with stronger attacks. For example, Wang et al. (2019) proposed a stronger attack that could find 47% more adversarial examples compared to gradient based method. Further, adversarial training on all possible patches would be even more expensive compared to certificate training, and is slightly beyond our computational budget.

Compared to state-of-the-art certified models for CIFAR with L ∞ -perturbation, where Zhang et al. (2019a) proposed a deterministic algorithm that achieves clean accuracy of 34.0%, our clean accuracy for our most robust CIFAR 5 × 5 model is 47.8% when using a large model (Table 2 ). On the other hand, given a limited computational budget, random-patch and guided-patch training significantly outperforms all-patch training. Due to the efficiency of random-patch and guided-patch training, they scale much better to large architectures. By switching to a large architecture (5 layer wide convolutional network), we are able to boost the certified accuracy by over 10% compared to the best performing all-patch small model (Table 2 ). Note that we are unable to all-patch train the same architecture as it will take almost 15 days to complete, and is out of our computational budget.

Guided-patch certificate training is slightly more expensive compared to random patch, due to overhead from the U-net architecture. However, given the 10 patches picked, guided-patch certificate training consistently outperforms random-patch certificate training, indicating that the U-net is learning how to predict the minimum margin m. 

5.3. EFFECTIVENESS AGAINST SPARSE ATTACK:

The IBP based method can also be used to defend against sparse attack, see Section 4.3. Its performance is reasonable compared to patch defense (e.g. 91.5% certified accuracy for 2×2 patch vs 90.8% for k=4), even though the sparse attack model is much stronger. For convolutional networks, we increase the size of the first convolutional layer (i.e. from 3 × 3 to 11 × 11) so the interval bounds calculated are tighter. However, despite the change, fully-connected network still performs much better. For example, the certified accuracy drops from 25.6% to 13.8% when we switch from fully-connected to convolutional network for CIFAR10 and drops from 90.8% to 75.9% for MNIST respectively. Detailed results are shown in the Appendix A.4 Table 7 .

Table 4 compares our approach with the state-of-the-art certified sparse defense (Random Ablation) Levine & Feizi (2019) . We use their best model with the largest medium radii to certify against various levels of sparsity. As shown in the table, our method achieves higher certified accuracy on the MNIST dataset over all the sparse radii, but lower on CIFAR-10. It is worth noting that we are using a much smaller and simpler model (a fully-connected network) compared to Random Ablation, which uses ResNet-50. Since real-world adversarial patches may not always be square, the robust transferability of the model to shapes other than the square is important.

Therefore, we evaluate the robustness of the square-patch-trained model to adversarial patches of different shapes while fixing the number of pixels. In all these experiments, we evaluate the certified accuracy for our largest model, on both MNIST and CIFAR datasets. We evaluate the transferability to various shapes including rectangle, line, parallelogram, and diamond. With the exception of rectangles, all the shapes have the exact same pixel count as the patches used for training. For rectangles, we use multiple choices of width and length, obtaining some combinations with slightly more pixels, and the worst accuracy is reported in Table 5 . The exact shapes used can be found in Appendix A.2.

The certified accuracy of our models generalize surprisingly well to other shapes, losing no more than than 5% in most cases for MNIST and no more than 6% for CIFAR-10 (Table 5 ). The largest degradation of accuracy happens for rectangles and lines, and it is mostly because the rectangle considered has more pixels compared to the square, and the line has less overlaps. However, it is still interesting that the certificate even generalizes to a straight line, even though the model was never trained to be robust to lines. In the case of MNIST with small patch size, the certified accuracy even improves when transferred to lines. 

EQUATION

Z (i) pool (P) = {min p∈Si z (i) (p) : i ∈ [n]}.

Depending on how P is partitioned, the bound pooling would work differently. In our experiments, we always select adjacent patches for each S i with the assumption that adjacent patches tend to generate similar bounds thus resulting in tighter certificate.

Bound pooling, similar to random-and guided-patch training, trades performance for efficiency compared to all-patch certificate training. However, the trade off is not as favorable compared to random-patch and guided-patch training. For example, in 

:

CERTIFIED DEFENSESGiven the ease with which these supposedly strong defenses are broken, it is natural to seek methods that can rigorously guarantee robustness of a given model to patch attacks. With such certifiable guarantees in hand, we need not worry about an adversary with a stronger optimizer, or a more clever algorithm for choosing patch locations.

CONCLUSION AND FUTURE WORKAfter establishing the weakness of known defenses to patch attacks, we proposed the first certified defense against this model. We demonstrated the effectiveness of our defense on two datasets, and proposed strategies to speed up robust training. Finally, we established the robust transferability of trained certified models to different shapes. In its current form, the proposed certified defense is unlikely to scale to ImageNet, and we hope the presented experiments will encourage further work along this direction.

Figures and Tables:

es (L) y = min l∈L m single patch (l) y ∀y. (11) Similar to regular IBP training, we simply use m es (L) to calculate the cross entropy loss for training and backpropagation, Certificate Loss = Cross Entropy Loss(-m es (L), y).

Empirical adversarial accuracy of ImageNet classifiers defended with Local GradientSmoothing and Digital Watermarking. We consider two types of adversaries, one that takes the defense into account during backpropagation and one that does not

Table content: <table><tr><td/><td/><td>Patch Size</td><td/><td/></tr><tr><td>Attack</td><td>Defense</td><td>42 × 42</td><td colspan="2">52 × 52 60 × 60</td></tr><tr><td>IFGSM</td><td>LGS</td><td>78%</td><td>75%</td><td>71%</td></tr><tr><td>IFGSM + LGS</td><td>LGS</td><td>14%</td><td>5%</td><td>3%</td></tr><tr><td>IFGSM</td><td>DW</td><td>56%</td><td>49%</td><td>45%</td></tr><tr><td>IFGSM + DW</td><td>DW</td><td>13%</td><td>8%</td><td>5%</td></tr><tr><td colspan="5">gradient entries using saliency maps, before masking them out in the image. Despite a 12% drop in</td></tr><tr><td colspan="5">accuracy on clean (non-adversarial) images, this defense method supposedly achieves an empirical</td></tr><tr><td colspan="5">adversarial accuracy of 63% for non-targeted patch attacks of size 42 × 42 (2% of the image pixels),</td></tr><tr><td colspan="5">using 400 randomly picked images from ImageNet (Deng et al., 2009) on VGG19 (Simonyan &amp;</td></tr><tr><td>Zisserman, 2014).</td><td/><td/><td/><td/></tr><tr><td colspan="5">The second defense, Local Gradient Smoothing (LGS) by Naseer et al. (2019) is based on the</td></tr><tr><td colspan="5">empirical observation that pixel values tend to change sharply within these adversarial patches.</td></tr></table>

Comparison of our IBP certified patch defense against existing defenses. Empirical adversarial accuracy is calculated for 400 random images in both datasets. All results are averaged over three different models.Published as a conference paper at ICLR 2020 certificate training by a slim margin, indicating that the U-net is learning how to predict the minimum margin m.In Table3, we see that given a fixed architecture all-patch certificate training significantly outperforms both random-patch certificate training and guided-patch certificate training in terms of certified accuracy, outperforming the second best certified defenses in each task by 2.

Table content: <table><tr><td>Dataset</td><td>Patch</td><td>Adversary</td><td>Defense</td><td>Clean</td><td>Empirical</td><td>Certified</td></tr><tr><td/><td>Size</td><td/><td/><td>Accuracy</td><td>Adversarial</td><td>Accuracy</td></tr><tr><td/><td/><td/><td/><td/><td>Accuracy</td><td/></tr><tr><td>MNIST</td><td>2 × 2</td><td>IFGSM</td><td>None</td><td>98.4%</td><td>80.1%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM</td><td>LGS</td><td>97.4%</td><td>90.0%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM + LGS</td><td>LGS</td><td>97.4%</td><td>60.7%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM</td><td>IBP</td><td>98.5%</td><td>93.9%</td><td>91.6%</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>None</td><td>98.5%</td><td>3.3%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>IBP</td><td>92.9%</td><td>66.1%</td><td>62.0%</td></tr><tr><td>CIFAR</td><td>2 × 2</td><td>IFGSM</td><td>None</td><td>66.3%</td><td>25.4%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM</td><td>LGS</td><td>64.9%</td><td>31.3%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM + LGS</td><td>LGS</td><td>64.9%</td><td>24.2%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM</td><td>DW</td><td>47.1%</td><td>43.3%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM + DW</td><td>DW</td><td>47.1%</td><td>20.2%</td><td>-</td></tr><tr><td/><td>2 × 2</td><td>IFGSM</td><td>IBP</td><td>48.6%</td><td>45.2%</td><td>41.6%</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>None</td><td>66.5%</td><td>0.4%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>LGS</td><td>51.2%</td><td>22.11%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM + LGS</td><td>LGS</td><td>51.2%</td><td>0.5%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>DW</td><td>45.3%</td><td>59.3%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM + DW</td><td>DW</td><td>45.3%</td><td>15.6%</td><td>-</td></tr><tr><td/><td>5 × 5</td><td>IFGSM</td><td>IBP</td><td>33.9%</td><td>29.1%</td><td>24.9%</td></tr><tr><td colspan="4">5.2 COMPARISON OF TRAINING STRATEGIES</td><td/><td/><td/></tr></table>

Trade-off between certified accuracy and training time for different strategies. The numbers next to training strategies indicate the number of patches used for estimating the lower bound during training. Most training times are measured on a single 2080Ti GPU, with the exception of all-patch training which is run on four 2080Ti GPUs. For that specific case, the training time is multiplied by 4 for fair comparison. See Appendix A.6 for more detailed statistics. *indicates the performance of the best performing large model trained with either random or guided patch. Detailed performance of the large models can be found in Appendix A.5

Table content: <table><tr><td/><td/><td/><td>2 × 2</td><td/><td/><td>5 × 5</td><td/></tr><tr><td colspan="2">Dataset Training</td><td>Clean</td><td>Certified</td><td>Training</td><td>Clean</td><td>Certified</td><td>Training</td></tr><tr><td/><td>Strategy</td><td>Accuracy</td><td>Accuracy</td><td>Time(h)</td><td>Accuracy</td><td>Accuracy</td><td>Time(h)</td></tr><tr><td>MNIST</td><td>All Patch</td><td>98.5%</td><td>91.5%</td><td>9.3</td><td>92.0%</td><td>60.4%</td><td>8.4</td></tr><tr><td/><td>Random(1)</td><td>98.5%</td><td>82.9%</td><td>0.2</td><td>96.9%</td><td>24.1%</td><td>0.4</td></tr><tr><td/><td>Random(5)</td><td>98.6%</td><td>86.6%</td><td>0.3</td><td>95.8%</td><td>42.1%</td><td>0.3</td></tr><tr><td/><td>Random(10)</td><td>98.6%</td><td>87.7%</td><td>0.3</td><td>95.6%</td><td>49.6%</td><td>0.3</td></tr><tr><td/><td>Guided(10)</td><td>98.6%</td><td>88.9%</td><td>2.2</td><td>95.0%</td><td>53.1%</td><td>2.6</td></tr><tr><td>CIFAR</td><td>All Patch</td><td>50.9%</td><td>39.9%</td><td>56.4</td><td>33.5%</td><td>22.0%</td><td>45.8</td></tr><tr><td/><td>Random(1)</td><td>53.6%</td><td>21.6%</td><td>0.6</td><td>43.6%</td><td>6.1%</td><td>0.6</td></tr><tr><td/><td>Random(5)</td><td>52.9%</td><td>32.3%</td><td>0.7</td><td>39.0%</td><td>14.6%</td><td>0.7</td></tr><tr><td/><td>Random(10)</td><td>51.9%</td><td>35.6%</td><td>0.8</td><td>38.8%</td><td>18.6%</td><td>0.8</td></tr><tr><td/><td>Guided(10)</td><td>52.4%</td><td>36.0%</td><td>3.7</td><td>37.9%</td><td>18.8%</td><td>3.7</td></tr><tr><td/><td>Large Model*</td><td>65.8%</td><td>51.9%</td><td>22.4</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr></table>

Certified accuracy for sparse defenses with IBP and Random Ablation.

Table content: <table><tr><td colspan="2">Dataset Sparsity (k)</td><td>Model</td><td colspan="2">Clean Accuracy Certified Accuracy</td></tr><tr><td>MNIST</td><td>1</td><td>IBP-sparse</td><td>98.4%</td><td>96.0%</td></tr><tr><td/><td>4</td><td>IBP-sparse</td><td>97.8%</td><td>90.8%</td></tr><tr><td/><td>10</td><td>IBP-sparse</td><td>95.2%</td><td>86.8%</td></tr><tr><td/><td>1</td><td>Random Ablation</td><td>96.7%</td><td>90.3%</td></tr><tr><td/><td>4</td><td>Random Ablation</td><td>96.7%</td><td>79.1%</td></tr><tr><td/><td>10</td><td>Random Ablation</td><td>96.7%</td><td>29.2%</td></tr><tr><td>CIFAR</td><td>1</td><td>IBP-sparse</td><td>48.4%</td><td>40.0%</td></tr><tr><td/><td>4</td><td>IBP-sparse</td><td>42.2%</td><td>31.2%</td></tr><tr><td/><td>10</td><td>IBP-sparse</td><td>37.0%</td><td>25.6%</td></tr><tr><td/><td>1</td><td>Random Ablation</td><td>78.3%</td><td>68.6%</td></tr><tr><td/><td>4</td><td>Random Ablation</td><td>78.3%</td><td>61.3%</td></tr><tr><td/><td>10</td><td>Random Ablation</td><td>78.3%</td><td>45.0%</td></tr><tr><td colspan="4">5.4 TRANSFERABILITY TO PATCHES OF DIFFERENT SHAPES</td><td/></tr></table>

Certified accuracy for square-patch trained model for different shapes Besides random-patch certificate training and guided-patch certificate training, we also experimented with the idea of bound pooling. All-patch training is very expensive as bounds generated by each potential patch has to be forward passed through the complete network. Bound pooling partially relieves the problem be pooling the interval bounds in intermediate layers thus reducing the forward pass in subsequent layers. Specifically, given a set of patches P, the interval bounds in the ith layer are Z(i) (P) = {z (i) (p) : p ∈ P} and Z (i) P = {z (i) (p) : p ∈ P}. We can reduce the number of interval bounds by partitioning P into n subsets {S 1 , ..., S n } and calculate a new set of bounds Z(i) pool

Table content: <table><tr><td colspan="4">Dataset Pixel Count Square Rectangle</td><td>Line</td><td colspan="2">Diamond Parallelogram</td></tr><tr><td>MNIST</td><td>4</td><td>91.6%</td><td>-</td><td>92.5%</td><td>91.6%</td><td>92.3%</td></tr></table>

Pooling 16 (4 × 4) patches in the first layer reduces training time by 35% while loosing 0.7% in performance (on MNIST 2 × 2), but a similar level of performance can be achieved with guided-patch training with almost 90% reduction in training time. The trade off becomes greater when the model becomes larger. Overall, bound pooling is still quite expensive, and cannot scale to larger models like random-patch or guided-patch training.

Table content: <table/>

Comparing bound pooling with the guided-patch and random-patch training. Pool 4 means that the adjacent 4 × 4 patches (16 patches) are pooled together in the first layer. Pool 2-2 means that the adjacent 2 × 2 bounds are pooled together in the first layer and then another 2 × 2 bound pooling happens at the second layer. This is similar to 4 × 4 pooling except the pooling operation is distributed between the first and second layer. All experiments are performed on a 4-layer convolutional network.Here we list the detailed certified accuracy for various sparsity levels and model architectures.

Table content: <table><tr><td/><td/><td/><td>2 × 2</td><td/><td/><td>5 × 5</td><td/></tr><tr><td colspan="2">Dataset Training</td><td>Clean</td><td>Certified</td><td>Training</td><td>Clean</td><td>Certified</td><td>Training</td></tr><tr><td/><td>Strategy</td><td>Accuracy</td><td>Accuracy</td><td>Time(h)</td><td>Accuracy</td><td>Accuracy</td><td>Time(h)</td></tr><tr><td>MNIST</td><td>All Patch</td><td>98.5%</td><td>91.6%</td><td>20.1</td><td>90.0%</td><td>59.7%</td><td>16.3</td></tr><tr><td/><td>Pool 2</td><td>98.0%</td><td>91.1%</td><td>15.8</td><td>85.2%</td><td>54.2%</td><td>11.6</td></tr><tr><td/><td>Pool 4</td><td>97.2%</td><td>89.9%</td><td>13.2</td><td>70.4%</td><td>38.3%</td><td>10.2</td></tr><tr><td/><td>Random(1)</td><td>98.5%</td><td>81.9%</td><td>0.3</td><td>96.8%</td><td>24.8%</td><td>0.4</td></tr><tr><td/><td>Random(5)</td><td>98.6%</td><td>86.5%</td><td>0.3</td><td>94.9%</td><td>42.0%</td><td>0.5</td></tr><tr><td/><td>Random(10)</td><td>98.6%</td><td>87.5%</td><td>0.5</td><td>94.7%</td><td>50.4%</td><td>0.6</td></tr><tr><td/><td>Guided(10)</td><td>98.7%</td><td>88.9%</td><td>2.2</td><td>94.0%</td><td>53.2%</td><td>3.4</td></tr><tr><td>CIFAR</td><td>All Patch</td><td>49.6%</td><td>41.6%</td><td>22.5</td><td>34.0%</td><td>25.0%</td><td>18.6</td></tr><tr><td/><td>Pool 2</td><td>48.1%</td><td>39.4%</td><td>17.3</td><td>32.4%</td><td>24.2%</td><td>14.5</td></tr><tr><td/><td>Pool 4</td><td>44.9%</td><td>37.1%</td><td>16.3</td><td>28.3%</td><td>20.6%</td><td>13.6</td></tr><tr><td/><td>Pool 2-2</td><td>45.0%</td><td>37.4%</td><td>16.5</td><td>25.3%</td><td>19.1%</td><td>13.8</td></tr><tr><td/><td>Random(1)</td><td>53.2%</td><td>32.4%</td><td>0.6</td><td>42.7%</td><td>11.0%</td><td>0.6</td></tr><tr><td/><td>Random(5)</td><td>52.2%</td><td>39.5%</td><td>0.9</td><td>37.8%</td><td>19.6%</td><td>0.9</td></tr><tr><td/><td>Random(10)</td><td>50.8%</td><td>38.6%</td><td>1.0</td><td>38.4%</td><td>21.9%</td><td>1.0</td></tr><tr><td/><td>Guided(10)</td><td>53.0%</td><td>39.8%</td><td>4.0</td><td>36.1%</td><td>23.0%</td><td>3.9</td></tr></table>

Certified accuracy for sparse defenses with varying sparsity k and models on both MNIST and CIFAR10, where "Conv c × c" represents for the convolutional network with first layer kernel size c. TRAINING WITH LARGER MODELS Recall that all-patch training considers all possible patches during training, which can be too expensive for larger models and/or images. The proposed random-and guided-patch training methods aim to reduce the training cost by considering only a subset of patches; please see Section 4.2 for more details.

Table content: <table><tr><td colspan="2">Dataset Sparsity (k)</td><td>Model</td><td colspan="2">Clean Accuracy Certified Accuracy</td></tr><tr><td>MNIST</td><td>1</td><td>mlp</td><td>98.4%</td><td>96.0%</td></tr><tr><td/><td>4</td><td>mlp</td><td>97.8%</td><td>90.8%</td></tr><tr><td/><td>10</td><td>mlp</td><td>95.2%</td><td>86.8%</td></tr><tr><td/><td>1</td><td>Conv3x3</td><td>97.0%</td><td>88.3%</td></tr><tr><td/><td>4</td><td>Conv3x3</td><td>92.7%</td><td>75.9%</td></tr><tr><td>CIFAR</td><td>1</td><td>mlp</td><td>48.4%</td><td>40.0%</td></tr><tr><td/><td>4</td><td>mlp</td><td>42.2%</td><td>31.2%</td></tr><tr><td/><td>10</td><td>mlp</td><td>37.0%</td><td>25.6%</td></tr><tr><td/><td>1</td><td>Conv11x11</td><td>34.8%</td><td>27.4%</td></tr><tr><td/><td>4</td><td>Conv11x11</td><td>25.1%</td><td>18.3%</td></tr><tr><td/><td>10</td><td>Conv11x11</td><td>17.2%</td><td>13.8%</td></tr><tr><td/><td>1</td><td>Conv13x13</td><td>38.6%</td><td>29.7%</td></tr><tr><td/><td>4</td><td>Conv13x13</td><td>28.1%</td><td>19.6%</td></tr><tr><td/><td>10</td><td>Conv13x13</td><td>22.4%</td><td>15.3%</td></tr><tr><td>A.5</td><td/><td/><td/><td/></tr></table>

The random and guided training strategy could yield significantly stronger model compared to all-patch training given a fixed computational budget. The random and guided training strategy allows us to train a larger model that would be infeasible to train otherwise. The guided-patch large model is able to boost the certified accuracy by over 10% compared to the best performing all-patch small model.

Table content: <table><tr><td>Dataset</td><td>Patch</td><td>Training</td><td>Model</td><td>Clean</td><td>Certified</td><td>Training</td></tr><tr><td/><td>Size</td><td>Strategy</td><td/><td>Accuracy</td><td>Accuracy</td><td>Time(h)</td></tr><tr><td>CIFAR</td><td>2× 2</td><td>All Patch</td><td>mlp</td><td>50.8%</td><td>35.5%</td><td>9.1</td></tr><tr><td/><td/><td/><td>2 layer conv</td><td>52.4%</td><td>42.6%</td><td>10.7</td></tr><tr><td/><td/><td/><td>4 layer conv</td><td>49.6%</td><td>41.6%</td><td>22.5</td></tr><tr><td/><td/><td/><td>5 layer conv (wide)</td><td>-</td><td>-</td><td>∼360.0</td></tr><tr><td/><td/><td colspan="2">Random(10) 5 layer conv (wide)</td><td>64.7%</td><td>49.0%</td><td>9.5</td></tr><tr><td/><td/><td colspan="2">Random(20) 5 layer conv (wide)</td><td>64.4%</td><td>50.8%</td><td>15.8</td></tr><tr><td/><td/><td colspan="2">Guided(10) 5 layer conv (wide)</td><td>66.5%</td><td>49.2%</td><td>12.2</td></tr><tr><td/><td/><td colspan="2">Guided(20) 5 layer conv (wide)</td><td>65.8%</td><td>51.9%</td><td>22.4</td></tr><tr><td>CIFAR</td><td>5× 5</td><td>All Patch</td><td>mlp</td><td>31.1%</td><td>18.8%</td><td>7.1</td></tr><tr><td/><td/><td/><td>2 layer conv</td><td>35.5%</td><td>22.3%</td><td>8.7</td></tr><tr><td/><td/><td/><td>4 layer conv</td><td>34.0%</td><td>25.0%</td><td>18.6</td></tr><tr><td/><td/><td/><td>5 layer conv (wide)</td><td>-</td><td>-</td><td>∼360.0</td></tr><tr><td/><td/><td colspan="2">Random(10) 5 layer conv (wide)</td><td>48.6%</td><td>29.9%</td><td>9.4</td></tr><tr><td/><td/><td colspan="2">Random(20) 5 layer conv (wide)</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr><tr><td/><td/><td colspan="2">Guided(10) 5 layer conv (wide)</td><td>48.4%</td><td>29.0%</td><td>12.4</td></tr><tr><td/><td/><td colspan="2">Guided(20) 5 layer conv (wide)</td><td>47.6%</td><td>29.6%</td><td>23.8</td></tr></table>

Detailed statistics for the comparison of training strategies -5×5

Table content: <table/>

Peer review (iclr2020):
This paper proposed a certified defense method for adversarial patches. The paper is motivated by the finding that several existing works on adversarial patch defenses are easily *breakable* by in the white-box setting. The idea of the proposed method is derived Interval Bound Propagation (IBP), which is originally proposed for certified defense against adversarial noise. To simplify the certificate training in the patch defense setting (which original scales quadratically with respect to the image size), two randomized training methods are proposed. Lastly, experimental results indeed verify the effectiveness of the proposed method. The paper is well-written and very well-organized. It is interesting to see supposedly strong adversarial patch defense methods *break down* in a very simple setting. And the contribution of the paper is significant to the field. I do have a question with regard to the randomized training method: Although random patches (or selected worse-case patches at random location) can be used for certificate training, in order to create a certificate during testing, does it mean that you do have to conduct many forward pass of the network with respect to all patches at all locations?