Deflecting Adversarial Attacks with Pixel Deflection
Aaditya Prakash Nick Moran Solomon Garber Antonella DiLillo James Storer
cs.CV cs.CR








Deflecting Adversarial Attacks with Pixel Deflection
    Aaditya Prakash, Nick Moran, Solomon Garber, Antonella DiLillo, James Storer

Brandeis University


{aprakash,nemtiax,solomongarber,dilant,storer}@brandeis.edu






    
=========================================================================================================================================================================





CNNs are poised to become integral parts of many critical systems.
Despite their robustness to natural variations, image pixel values can be manipulated, via small, carefully crafted, imperceptible perturbations, to cause a model to misclassify images.
We present an algorithm to process an image so that classification accuracy is significantly preserved in the presence of such adversarial manipulations.
Image classifiers tend to be robust to natural noise, and adversarial attacks tend to be agnostic to object location.
These observations motivate our strategy, which leverages model robustness to defend against adversarial perturbations by forcing the image to match natural image statistics.
Our algorithm locally corrupts the image by redistributing pixel values via a process we term pixel deflection.
A subsequent wavelet-based denoising operation softens this corruption, as well as some of the adversarial changes. 
We demonstrate experimentally that the combination of these techniques enables the effective recovery of the true class, against a variety of robust attacks.  
Our results compare favorably with current state-of-the-art defenses, without requiring retraining or modifying the CNN. 



Code: https://github.com/iamaaditya/pixel-deflectiongithub.com/iamaaditya/pixel-deflection

































§ INTRODUCTION



Image classification convolutional neural networks (CNNs) have become a part of many critical real-world systems.
For example, CNNs can be used by banks to read the dollar amount of a check <cit.>, or by self-driving cars to identify stop signs <cit.>.

The critical nature of these systems makes them targets for adversarial attacks.
Recent work has shown that classifiers can be tricked by small, carefully-crafted, imperceptible perturbations to a natural image.
These perturbations can cause a CNN to misclassify an image into a different class (a “1” into a “9” or a stop sign into a yield sign). 

Thus, defending against these vulnerabilities will be critical to the further adoption of advanced computer vision systems.
Here, we consider white-box attacks, in which an adversary can see the weights of the classification model.
Most of these attacks work by taking advantage of the differentiable nature of the classification model, taking the gradient of the output class probabilities with respect to a particular pixel. 
Several previous works propose defense mechanisms that are differentiable transformations applied to an image before classification.
These differentiable defenses appear to work well at first, but attackers can easily circumvent these defenses by “differentiating through them”, by taking the gradient of a class probability with respect to an input pixel through both the CNN and the transformation. 

In this work, we present a defense method which combines two novel techniques for defending against adversarial attacks, which together modify input images in such a way that is (1) non-differentiable, and (2) frequently restores the original classification.
The first component, pixel deflection, takes advantage of a CNN's resistance to the noise that occurs in natural images by randomly replacing some pixels with randomly selected pixels from a small neighborhood.
We show how to weight the initial random pixel selection using a robust activation map.
The second approach, adaptive soft-thresholding in the wavelet domain, which has been shown to effectively capture the distribution of natural images.
This thresholding process smooths adversarially-perturbed images in such a way so as to reduce the effects of the attacks.

Experimentally, we show that the combination of these approaches can effectively defend against state-of-the-art attacks <cit.>

Additionally, we show that these transformations do not significantly decrease the classifier's accuracy on non-adversarial images.

In Section <ref>, we discuss the various attack techniques against which we will test our defense.  In Sections <ref> and <ref> we discuss the established defense techniques against which we will compare our technique.  In Sections <ref>, <ref> and <ref> we lay out the components of our defense and provide the intuition behind them.  In Sections <ref> and <ref>, we provide experimental results on a subset of ImageNet.







































§ ADVERSARIAL ATTACKS


It has been established that most image classification models can easily be fooled <cit.>. 
Several techniques have been proposed which can generate an image that is perceptually indistinguishable from another image but is classified differently. 
This can be done robustly when model parameters are known, a paradigm called white-box attacks <cit.>.
In the scenario where access to the model is not available, called black-box attacks, a secondary model can be trained using the model to be attacked as a guide.
It has been shown that the adversarial examples generated using these substitute models are transferable to the original classifiers <cit.>.

Consider a given image x and a classifier F_θ(·) with parameters θ.

Then an adversarial example for F_θ(·) is an image x̂ which is close

to x (||x-x̂|| is small, where the norm used differs between attacks),  but the classifier's prediction for each of them is different, F(x) ≠ F(x̂). 

Untargeted attacks are  methods to produce such an image, given x and F_θ(·). 




Targeted attacks, however, seek a x̂ such that F(x̂) = ŷ for some specific choice of ŷ≠ F(x), i.e. targeted attacks try to induce a specific class label, whereas untargeted attacks simply try to destroy the original class label.


Next, we present a brief overview of several well-known attacks, which form the basis for our experiments.




  
Fast Gradient Sign Method (FGSM)<cit.> is a single step attack process.
It uses the sign of the gradient of the loss function,  ℓ,  to the image to find the adversarial perturbation. 
For a given value ϵ, FGSM is defined as:

    x̂ = x + ϵsign (∇ℓ (F(x),x))




  
Iterative Gradient Sign Method (IGSM) <cit.> is an iterative version of FGSM. After each iteration the generated image is clipped to be within a ϵ L_∞ neighborhood of the original and this process stops when an adversarial image has been discovered. 
Both FGSM and IGSM minimize the L_∞ norm to the original image. Let x_0' = x, then after m iterations, the adversarial image is obtained by:

    x_m+1' = Clip_x,ϵ{x_m' + α×sign(∇ℓ (F(x'_m),x'_m))  }




  
L-BFGS <cit.> tries to find the adversarial input as a box-constraint minimization problem.
L-BFGS optimization is used to minimize L_2 distance between the image and the adversarial example while keeping a constraint on the class label for the generated image.







  
Jacobian-based Saliency Map Attack (JSMA) <cit.> estimates the saliency of each image pixel to the classification output, and modifies those pixels which are most salient. This is a targeted attack, and saliency is designed to find the pixel which increases the classifier's output for the target class while tending to decrease the output for other classes.



  
Deep Fool (DFool) <cit.> is an untargeted iterative attack. 
This method approximates the classifier as a linear decision boundary and then finds the smallest perturbation needed to cross that boundary.
This attack minimizes L_2 norm to the original image. 



  
Carlini & Wagner (C&W) <cit.> is a recently proposed adversarial attack, and one of the strongest.

C&W updates the loss function, such that it jointly minimizes L_p and a custom differentiable loss function that uses the unnormalized outputs of the classifier (logits). 
Let Z_k denote the logits of a model for a given class k, and κ a margin parameter. Then C&W tries to minimize:

    || x - x̂ ||_p + c* max(Z(x̂_y) - max{Z(x̂)_k : k ≠ y},-κ)

For our experiments, we use L_2 for the first term, as this makes the entire loss function differentiable and therefore easier to train. 
Limited success has been observed with L_0 and L_∞ for images beyond CIFAR and MNIST.

We have not included recently proposed attacks like `Projected Gradient Descent' <cit.> and `One Pixel Attack' <cit.> because although they have been shown to be robust on datasets of small images like CIFAR10 and MNIST, they do not scale well to large images. 
Our method is targeted towards large natural images where object localization is meaningful, i.e. that there are many  pixels outside the region of the image where the object is located.





§ DEFENSES





Given a classification model F and an image x̃, which may either be an original image x, or an adversarial image x̂, the goal of a defense method is to either augment either F as F' such that F'(x̃) = F(x), or transform x̃ by a transformation 𝒯 such that F(𝒯(x̃))=F(x).

One method for augmenting F is called Ensemble Adversarial training <cit.>,  which augments the training of  deep convolutional networks to include various potential adversarial perturbations. 
This expands the decision boundaries around training examples to include some nearby adversarial examples, thereby making the task of finding an adversary within a certain ϵ harder than conventional models.
Another popular technique uses distillation from a larger network by learning to match the 

softmax <cit.>.
This provides smoother decision boundaries and thus makes is harder to find an adversarial example which is imperceptible.
There are methods that proposes to detect the adversarial images as it passes through the classifier model <cit.>.

Most transformation-based defense strategies suffer from accuracy loss with clean images  <cit.>, they produce F(𝒯(x)) ≠ F(x).
This is an undesirable side effect of the transformation process, and we propose a transformation which tries to minimize this loss while also recovering the classification of an adversarial image. 
Detailed discussion on various kinds of transformation based defenses is provided in section <ref>.






§ RELATED WORK 




Transformation-based defenses are a relatively recent and unexplored development in adversarial defense. 
The biggest obstacle facing most transformation-based defenses is that the transformation degrades the quality of non-adversarial images, leading to a loss of accuracy.


This has limited the success of transformations as a practical defense, as even those which are effective at removing adversarial transformations struggle to maintain the model's accuracy on clean images.

Our work is most similar to Guo 's <cit.> recently proposed transformation of image by quilting and Total Variance Minimization (TVM). 

Image quilting is performed by replacing patches of the input image with similar patches drawn from a bank of images.
They collect one million image patches from clean images and use a k-nearest neighbor algorithm to find the best match.
Image quilting in itself does not yield satisfactory results, so it is augmented with TVM.
In Total Variance Minimization, a substitute image is constructed by optimization such that total variance is minimized.
Total variation minimization has been widely used <cit.> as an image denoising technique. 

Our method uses semantic maps to obtain a better pixel to update and our update mechanism does not require any optimization and thus is significantly faster.

Another closely related work is from Luo  <cit.>. They propose a foveation-based mechanism.


Using ground-truth data about object coordinates, they crop the image around the object, and then scale it back to the original size.


Our model shares the hypothesis that not all regions of the image are equally important to a classifier.

Further, foveation-based methods can be fooled by finding an adversarial perturbation within the object bounding box.
Our model does not rely on a ground-truth bounding box, and the stochastic nature of our approach means that it is not restricted to only modifying a particular region of the input.

Yet another similar work is from Xie  <cit.>, in which they pad the image and take multiple random crops and evaluate ensemble classification. 
This method utilizes the randomness property that our model also exploits. 
However, our model tries to spatially define the probability of a presence of a perturbation and subsequently uses wavelet-based transform to denoise the perturbations.






§ PIXEL DEFLECTION 


Much has been written about the lack of robustness of deep convolutional networks in the presence of adversarial inputs <cit.>.
However, most deep classifiers are robust to the presence of natural noise, such as sensor noise <cit.>. 

We introduce a form of artificial noise and show that most models are similarly robust to this noise.
We randomly sample a pixel from an image, and replace it with another randomly selected pixel from within a small square neighborhood.  We also experimented with other neighborhood types, including sampling from a Gaussian centered on the pixel, but these alternatives were less effective.
 











We term this process pixel deflection, and give a formal definition in Algorithm <ref>.
Let R^r_p be a square neighborhood with apothem r centered at a pixel p.
Let 𝒰(R) be the uniform distribution over all pixels within R.
Let I_p indicate the value of pixel p in image I.











    





















As shown in Figure <ref>, even changing as much as 1% (10 times the amount changed in our experiments) of the original pixels does not alter the classification of a clean image.
However, application of pixel deflection enables the recovery of a significant portion of correct classifications.





 §.§ Distribution of Attacks


Most attacks search the entire image plane for adversarial perturbations, without regard for the location of the image content.

This is in contrast with the classification models, which show high activation in regions where an object is present <cit.>. 
This is especially true for attacks which aim to minimize the L_p norm of their changes for large values of p, as this gives little to no constraint on the total number of pixels perturbed.
In fact, Lou <cit.> use the object coordinates to mask out the background region and show that this defends against some of the known attacks. 
 





In Figure <ref> we show the average spatial distribution of perturbations for several attacks, as compared to the distribution of object locations (top left). 

Based on these ideas, we explore the possibility of updating the pixels in the image such that the probability of that pixel being updated is inversely proportional to the likelihood of that pixel containing an object.




§ TARGETED PIXEL DEFLECTION 


As we have shown in section <ref>, image classification is robust against the loss of a certain number of pixels. 


In natural images, many pixels do not correspond to a relevant semantic object and are therefore not salient to classification.

Classifiers should then be more robust to pixel deflection if more pixels corresponding to the background are dropped as compared to the salient objects.
Luo <cit.> used this idea to mask the regions which did not contain the object,

however, their method has two limitations which we will seek to overcome.

First, it requires ground-truth object coordinates and it is, therefore, difficult to apply to unlabeled inputs at inference time. 
We solve this by using a variant of class activation maps to obtain an approximate localization for salient objects.
Class activation maps <cit.>  are a weakly-supervised localization <cit.> technique in which
the last layer of a CNN, often a fully connected layer, is replaced with a global average pooling layer. 
This results in a heat map which lacks pixel-level precision but is able to approximately localize objects by their class.

We prefer to use weakly supervised localization over saliency maps <cit.>, as saliency maps are trained on human eye fixations 
and thus do not always capture object classes <cit.>. 
Other weakly supervised localization techniques, such as regions-of-interest <cit.>, capture more than a single object and thus are not suitable for improving single-class classification.

Second, completely masking out the background deteriorates classification of classes for which the model has come to rely on the co-occurrence of non-class objects.
For instance, airplanes are often accompanied by a sky-colored background, and most classifiers will have lower confidence when trying to classify an airplane outside of this context.

We take a Bayesian approach to this problem and use stochastic re-sampling of the background. 
This preserves enough of the background to protect classification and drops enough pixels to weaken the impact of adversarial input. 






 §.§ Robust Activation Map 


Class activation maps <cit.> are a valuable tool for approximate semantic object localization.

Consider a convolutional network with k output channels on the final convolution layer (f) with spatial dimensions of x and y, and let w be a vector of size k which is the result of applying a global max pool on each channel. 
This reduces channel to a single value, w_k.
The class activation map, M_c for a class c is given by:

    M_c(x,y) = ∑_k w_k^c   f_k(x,y)

Generally, one is interested in the map for the class for which the model assigns the highest probability.
However, in the presence of adversarial perturbations to the input, the highest-probability class is likely to be incorrect.
Fortunately, our experiments show that an adversary which successfully changes the most likely class tends to leave the rest of the top-k classes unchanged.
Our experiments show that 38% of the time the predicted class of adversarial images is the second highest class of the model for the clean image. 
Figure <ref> shows how the class of adversarial image relates to predictions on clean images.

ImageNet has one thousand classes, many of which are fine-grained. 
Frequently, the second most likely class is a synonym or close relative of the main class (“Indian Elephant” and “African Elephant”).
To obtain a map which is robust to fluctuations of the most likely class, we take an exponentially weighted average of the maps of the top-k classes. 

    M(x,y) = ∑_i^k M_c_i(x,y)/2^i


We normalize the map by diving it by its max so that values are in the range of [0,1]. 
Even if the top-1 class is incorrect, this averaging reduces the impact of mis-localization of the object in the image. 


The appropriate number of classes k to average over depends on the total number of classes.
For ImageNet-1000, we used a fixed k=5.

While each possible class has its own class activation map (CAM), only a single robust activation map is generated for a particular image, combining information about all classes.
ImageNet covers wide variety of object classes and most structures found in other datasets are represented in ImageNet even if class names are not bijectional.
Therefore, Robust Activation Map (R-CAM) is trained once on ImageNet but can also localize objects from Pascal-VOC or Traffic Signs. 




§ WAVELET DENOISING

Because both pixel deflection and adversarial attacks add noise to the image, it is desirable to apply a denoising transform to lessen these effects.
Since adversarial attacks do not take into account the frequency content of the perturbed image, they are likely to pull the input away from the class of likely natural images in a way which can be detected and corrected using a multi-resolution analysis. 


Works such as  <cit.> have shown that natural images exhibit regularities in their wavelet responses which can be learned from data and used to denoise images.
These regularities can also be exploited to achieve better lossy image compression, the basis of JPEG2000.
Many vision and neuroscience researchers  <cit.> have suggested that the visual systems of many animals take advantage of these priors, as the simple cells in the primary visual cortex have been shown to have Gabor-like receptive fields.

Swapping pixels within a window will tend to add noise with unlikely frequency content to the image, particularly if the window is large.

This kind of noise can be removed by image compression techniques like JPEG, however, the quantization process in JPEG uses fixed tables that are agnostic to image content, and it quantizes responses at all amplitudes while the important image features generally correspond to large frequency responses.
This quantization reduces noise but also gets rid of some of the signal. 

Therefore, it is unsurprising that JPEG compression recovers correct classification on some of the adversarial images but  also reduces the classification accuracy on clean images <cit.>. 
Dziugaite <cit.> reported loss of 8% accuracy on clean images after undergoing JPEG compression. 



We, therefore, seek filters with frequency response better suited to joint space-frequency analysis than the DCT blocks (and more closely matching representations in the early ventral stream, so that features which have a small filter response are less perceptible) and quantization techniques more suited to denoising. 


Wavelet denoising uses wavelet coefficients obtained using Discrete Wavelet Transform <cit.>.
The wavelet transform represents the signal as a linear combination of orthonormal wavelets.
These wavelets form a basis for the space of images and are separated in space, orientation, and scale.

The Discrete Wavelet Transform is widely used in image compression <cit.> and image denoising <cit.>.


While the noise introduced by dropping a pixel is mostly high-frequency, the same cannot be said about the adversarial perturbations.
Several attempts have been made to quantify distribution of adversarial perturbations <cit.> but recent work by Carlini and Wagner <cit.> has shown that most techniques fail to detect adversarial examples.
We have observed that for the perturbations added by well-known attacks, wavelet denoising yields superior results as compared to block DCT. 




 §.§ Hard & Soft Thresholding














The process of performing a wavelet transform and its inverse is lossless and thus does not provide any noise reduction.
In order to reduce adversarial noise, we need to apply thresholding to the wavelet coefficients before inverting the transform.
Most compression techniques use a hard thresholding process, in which all coefficients with magnitude below the threshold are set to zero: Q(X̂) = X̂ ∀  |X̂| > T_h, where X̂ is the wavelet transform of X, and T_h is the threshold value.
The alternative is soft thresholding, in which we additionally subtract the threshold from the magnitude of coefficients above the threshold: Q(X̂) = sign(X̂)×max(0,|X̂| - T_h).
Jansen <cit.> observed that hard thresholding results in over-blurring of the input image, while soft thresholding maintains better PSNR.
By reducing all coefficients, rather than just those below the threshold, soft thresholding avoids introducing extraneous noise.
This allows our method to preserve classification accuracy on non-adversarial images.





 §.§ Adaptive Thresholding 


Determining the proper threshold is very important, and the efficacy of our method relies on the ability to pick a threshold in an adaptive, image specific manner.
The standard technique for determining the threshold for wavelet denoising is to use a universal threshold formula called VisuShrink. 
For an image X with N pixels, this is given by σ√(2log N), where σ is the variance of the noise to be removed and is a hyper-parameter. 
However, we used BayesShrink <cit.>, which models the threshold for each wavelet coefficient as a Generalized Gaussian Distribution (GGD). 
The optimal threshold is then assumed to be the value which minimizes the expected mean square error 
    T_h*(σ_x, β) = _T_h E(X̂ - X)^2  ≈σ^2/σ_x

where σ_x and β are parameters of the GGD for each wavelet sub-band.
In practice, an approximation, as shown on right side of equation <ref>, is used. 
This ratio, also called T_Bayes, adapts to the amount of noise in the given image.
Within a certain range of β values, BayesShrink has been shown to effectively remove artificial noise while preserving the perceptual features of natural images <cit.>.
As our experiments are carried out with images from ImageNet, which is a collection of natural images, we believe this is an appropriate thresholding technique to use.

Yet another popular thresholding technique is Stein's Unbiased Risk Estimator (SUREShrink), which computes unbiased estimate of E(X̂ - X)^2. SUREShrink requires optimization to learn T_h for a given coefficient. We empirically evaluated results and SUREShrink did not perform as well as BayesShrink. Comparative results are  shown in Table <ref>.



§ METHOD


The first step of our method is to corrupt the adversarial noise by applying targeted pixel deflection as follows: 

(a) Generate a robust activation map M, as described in section <ref>.

(b) Uniformly sample a pixel location (x,y) from the image, and obtain the normalized activation map value for that location, v_x,y = M(x,y).

(c) Sample a random value from a uniform distribution 𝒰(0,1). If v_x,y is lower than the random value, we deflect the pixel using the algorithm shown in Algorithm  <ref>. 

(d) Iterate this process K times. 


The following steps are used to soften the impact of pixel deflection:

(a) Convert the image to YC_bC_r space to decorrelate the channels. YC_bC_r space is perceptually meaningful and thus has similar denoising advantages to the wavelets.  

(b) Project the image into the wavelet domain using the discrete wavelet transform. We use the db1 wavelet, but similar results were obtained with db2 and haar wavelets. 

(c) Soft threshold the wavelets using BayesShrink. 

(d) Compute the inverse wavelet transform on the shrunken wavelet coefficients.

(e) Convert the image back to RGB.



§ EXPERIMENTAL DESIGN


We tested our method on 1000 randomly selected images from the ImageNet <cit.> Validation set. 
We use ResNet-50 <cit.> as our classifier. 
We obtain the pre-trained weights from TensorFlow's GitHub repository.
These models achieved a Top-1 accuracy of 76% on our selected images. 
This is in agreement with the accuracy numbers reported in <cit.> for a single-model single-crop inference.

By the definition set by adversarial attacks, an attack is considered successful by default if the original image is already mis-classified. 
In this case, the adversary simply returns the original image unmodified. 
However, these cases are not useful for measuring the effectiveness of an attack or a defense as there is no pixel level difference between the images.
As such, we restrict our experiments to those images which are correctly classified in the absence of adversarial noise.
Our attack models are based on the Cleverhans <cit.> library[https://github.com/tensorflow/cleverhans] with model parameters that aim to achieve the highest possible misclassification score with a normalized RMSE (|L_2|) budget of 0.02-0.04.

We will publicly release  our implementation code.





 §.§ Training



Our defense model has three hyper-parameters, which is significantly fewer than the classification models it seeks to protect, making it preferable over defenses which require retraining of the classifier such as  <cit.>.
These three hyper-parameters are: σ, a coefficient for BayesShrink, r, the window size for pixel deflection, and K, the number of pixel deflections to perform.
Using a reduced set of 300 images from ImageNet Validation set, We perform a linear search over a small range of these hyper-parameters. 

These images are not part of the set used to show the results of our model.
A particular set of hyper-parameters may be optimal for one attack model, but not for another.  
This is primarily because attacks seek to minimize different L_p norms, and therefore generate different types of noise.


To demonstrate the robustness of our defense, we select a single setting of the hyper-parameters to be used against all attack models.
Figure <ref> shows a visual indication of the variations in performance of each model across various hyper-parameter settings. 
In general, as the K and r increase, the variance of the resulting classification accuracy increases.  
This is primarily due to the stochastic nature of pixel deflection - as more deflections are performed over a wider window, a greater variety of transformed images can result.






§ RESULTS & DISCUSSION 



In Table <ref> we present results obtained by applying our transformation against various untargeted white-box attacks. 
Our method is agnostic to classifier architecture, and thus shows similar results across various classifiers. 
For brevity, we report only results on ResNet-50. 
Results for other classifiers are provided in Table <ref>.
The accuracy on clean images without any defense is 100% because we didn't test our defense on images which were misclassified before any attack.
We do not report results for targeted attacks as they are harder to generate <cit.> and easier to defend. 
Due to the stochastic nature of our model, we benefit from taking the majority prediction over ten runs; this is reported in Table <ref> as Ens-10.



We randomly sampled 10K images from ILSVRC2012 validation set; this contained all 1000 classes with minimum of 3 images per class.






 §.§ Results on various classifiers

Original classification accuracy of each classifier on selected 1000 images is reported in the table.
However, we omit the images that were originally incorrectly classified, thus the accuracy of clean images without defense is always 100%.
Weights for each classifier were obtained from Tensorflow GitHub repository
[https://github.com/tensorflow/models/tree/master/research/slim#Pretrained]. 






 §.§ Comparison of results
 - 
There are two main challenges when seeking to compare defense models. 
First, many attack and defense techniques primarily work on smaller images, such as those from CIFAR and MNIST.
The few proposed transformation based defense techniques which work on larger-scale images are extremely recent, and currently under review <cit.>.


Second, because different authors target both different |L_P| norms and different perturbation magnitudes, it is difficult to balance the strength of various attacks.
We achieved 98% recovery on C&W with |L_2| of 0.04 on ResNet-50, where Xie  <cit.> reports 97.1% on ResNet-101 and 98.8% on ens-adv-Inception-ResNet-v2.
ResNet-101 is as stronger classifier than ResNet-50 and ens-adv-Inception-Resnet-v2 <cit.> is an ensemble of classifiers specifically trained with adversarial augmentation. 
They do not report the |L_2| norm of the adversarial perturbations, and predictions are made on an ensemble of 21 crops.
Guo  <cit.> have reported (normalized) accuracy of 92.1% on C&W with |L_2| of 0.06, and their predictions are on an ensemble of 10 crops.

To present a fair comparison across various defenses we only measure the fraction of images which are no longer misclassified after the transformation.  
This ratio is known as  Destruction Rate and was originally proposed in [24]. 
Value of 1 means all the misclassified images due to the adversary are correctly classified after the transformation.






As seen in Figure <ref>, the predicted class of the perturbed image is very frequently among the classifier's top-5 predictions for the original image.
In fact, nearly 40% of the time, the adversarial class was the second most-probable class of the original image.
Similarly, the original classification will often remain in the top-5 predictions for the adversarial image.
Unlike Kurakin  <cit.>, our results are in terms of top-1 accuracy, as this matches the objective of the attacker.
While top-1 accuracy is a more lenient metric for an attack method (due to the availability of nearly-synonymous alternatives to most classes in ImageNet-1000), it is a more difficult metric for a defense, as we must exactly recover the correct classification.
These facts render top-5 accuracy an unsuitable metric for measuring the efficacy of a defense.



Results reported for Carlini & Wagner <cit.> attacks are only for L_2 loss, even though they can be applied for L_0 and L_∞. 
Carlini & Wagner attack has been shown to be effective with MNIST and CIFAR but their efficacy against large images is limited due to expensive computation. 









 §.§ Ablation studies


Previous work <cit.> has demonstrated the efficacy of JPEG compression as a defense against adversarial attacks due to its denoising properties.
Das  <cit.> demonstrate that increasing the severity of JPEG compression defeats a larger percentage of attacks, but at the cost of accuracy on clean image.
As our method employs a conceptually similar method to reduce adversarial noise via thresholding in a wavelet domain, we use JPEG as a baseline for comparison.




In Table <ref>, we report accuracy with and without wavelet denoising with soft thresholding.
While JPEG alone is effective against only a few attacks, the combination of JPEG and pixel deflection performs better than pixel deflection alone.
The best results are obtained from pixel deflection and wavelet denoising.
Adding JPEG on top of these leads to a drop in performance. 




In Table <ref> we present a comparison of various shrinkage methods on wavelet coefficients after pixel deflection.

For the impact of coefficient thresholding in the absence of pixel deflection, see Table <ref>.
BayesShrink, which learns separate Gaussian parameters for each coefficient, does better than other soft-thresholding techniques.
A brief overview of these shrinkage techniques are provided in Section <ref>, for more thorough review on BayesShrink, VisuShrink and SUREShrink we refer the reader to <cit.>  <cit.> and  <cit.> respectively. 
VisuShrink is a faster technique as it uses a universal threshold but that limits its applicability on some images. 
SUREShrink has been shown to perform well with compression but as evident, in our results, it is less well suited to denoising.




































§ CONCLUSION



Motivated by the robustness of CNNs and the fragility of adversarial attacks, we have presented a technique which combines a computationally-efficient image transform, pixel deflection, with soft wavelet denoising. 
This combination provides an effective defense against state-of-the-art adversarial attacks. 
We show that most attacks are agnostic to semantic content, and using pixel deflection with probability inversely proportionate to robust activation maps (R-CAM) protects regions of interest.
In ongoing work, we seek to improve our technique by adapting hyperparameters based on the features of individual images. Additionally, we seek to integrate our robust activation maps with wavelet denoising.







§ ACKNOWLEDGEMENT

We would like to thank NVIDIA for donating the GPUs used for this research.
We would also like to thank Ryan Marcus, Brandeis University, for reviewing the paper.



















Full size figures of Figure 5 (Linear search for model parameters on training data)





ieee



