A LMOST T IGHT L0- NORM C ERTIFIED R OBUSTNESS OF T OP - k P REDICTIONS AGAINST A DVERSARIAL P ERTURBATIONS
Cao
Neil Zhenqiang Gong neil.gong@duke.edu
A BSTRACT
Top-
k predictions are used in many real-world applications such as machine learning as a service, recommender systems, and web searches.
ℓ 0 -norm adversarial perturbation characterizes an attack that arbitrarily modifies some features of an input such that a classifier makes an incorrect prediction for the perturbed input.
ℓ 0 -norm adversarial perturbation is easy to interpret and can be implemented in the physical world.
Therefore, certifying robustness of top- k predictions against ℓ 0 -norm adversarial perturbation is important.
However, existing studies either focused on certifying ℓ 0 -norm robustness of top- 1 predictions or ℓ 2 -norm robustness of top- k predictions.
In this work, we aim to bridge the gap.
Our approach is based on randomized smoothing, which builds a provably robust classifier from an arbitrary classifier via randomizing an input.
Our major theoretical contribution is an almost tight ℓ 0 -norm certified robustness guarantee for top- k predictions.
We empirically evaluate our method on CIFAR10 and ImageNet.
For instance, our method can build a classifier that achieves a certified top-3 accuracy of 69.2% on
ImageNet when an attacker can arbitrarily perturb 5 pixels of a testing image.
I NTRODUCTION
Adversarial example is a well-known severe security vulnerability of classifiers.
Specifically, given a classifier f and a testing input x , an attacker can carefully craft a human-imperceptible perturbation δ such that f ( x ) ̸ = f ( x + δ ) .
The perturbation δ is called adversarial perturbation , while the input x + δ is called an adversarial example .
Many empirical defenses (Goodfellow et al., 2015; Na et al., 2018;
Metzen et al., 2017; Svoboda et al., 2019; Buckman et al., 2018; Ma et al., 2018; Guo et al., 2018; Dhillon et al., 2018;
Xie et al., 2018; Song et al., 2018) have been developed to defend against adversarial examples in the past several years.
However, these empirical defenses were often soon broken by strong adaptive adversaries (Carlini & Wagner, 2017; Athalye et al., 2018; Uesato et al., 2018; Athalye & Carlini, 2018).
To end this cat-and-mouse game, many certified defenses (Scheibler et al., 2015; Carlini et al., 2017; Ehlers, 2017; Katz et al., 2017; Cheng et al., 2017; Lomuscio &
Maganti, 2017; Fischetti & Jo, 2018; Bunel et al., 2018; Wong & Kolter, 2018; Wong et al., 2018;
Raghunathan et al., 2018a;b; Dvijotham et al., 2018a;b; Gehr et al., 2018; Mirman et al., 2018; Singh et al., 2018;
Weng et al., 2018; Zhang et al., 2018; Gowal et al., 2018; Wang et al., 2018; Lecuyer et al., 2019; Li et al., 2019;
Cohen et al., 2019; Lee et al., 2019;
Salman et al., 2019; Wang et al., 2020; Jia et al., 2020;
Zhai et al., 2020) have been proposed.
In particular, a classifier f is said to be certifiably robust for an input x if it provably predicts the same top-1 label (i.e., f ( x ) =
f
( x + δ ) )
when the adversarial perturbation δ is bounded, e.g., the ℓ p -norm of δ is smaller than a threshold.
The threshold is also called certified radius .
In this work, we focus on ℓ 0 -norm adversarial perturbation, which arbitrarily manipulates some features of a testing input and can be implemented in the physical world.
However, most existing certified defenses focus on top-1 predictions.
In many applications, top- k predictions that return the k most likely labels are more relevant.
For instance, when a classifier is deployed as a cloud service (also called machine learning as a service )
(Google Cloud Vision;
Microsoft; Amazon AWS; Clarifai), top- k labels for a testing input are often returned to a customer for more informed decisions; in recommender systems and web searches, top- k items/webpages are recommended to a user.
Despite the importance and relevance of top- k predictions, their certified robustness against adversarial perturbations is largely unexplored.
One exception is the recent work from Jia et al.
(2020), which derived a tight ℓ 2 -norm certified robustness for top- k predictions.
Such ℓ 2 -norm certified robustness can be transformed to ℓ 0 -norm certified robustness via employing the inequality between ℓ 0 -norm and ℓ 2 -norm.
However, the ℓ 0 -norm certified robustness derived from such transformations is suboptimal.
Our work: We aim to develop ℓ 0 -norm certified robustness of top- k predictions.
Our approach is based on randomized smoothing (Cao & Gong, 2017;
Liu et al., 2018; Lecuyer et al., 2019; Li et al., 2019; Cohen et al., 2019; Lee et al., 2019; Jia et al., 2020; Levine & Feizi, 2019), which can build a certifiably robust classifier from any base classifier via randomizing the input.
We adopt randomized smoothing because it is applicable to any classifier and scalable to large neural networks.
In particular, we use a randomized smoothing method called randomized ablation (Levine & Feizi, 2019), which achieves state-of-the-art ℓ 0 -norm certified robustness for top-1 predictions.
Unlike other randomized smoothing methods (Cao & Gong, 2017; Lecuyer et al., 2019; Li et al., 2019; Cohen et al., 2019) that randomize an input via adding additive noise (e.g., Gaussian, Laplacian, or discrete noise) to it, randomized ablation randomizes an input via subsampling its features.
Specifically, given an arbitrary classifier (called base classifier ) and a testing input x , randomized ablation creates an ablated input via retaining some randomly selected features in x and setting the remaining features to a special value, e.g., median of the feature value, mean of the feature value, or a special symbol.
When the testing input is an image, the features are the image’s pixels.
Then, we feed the ablated input to the base classifier.
Since the ablated input is random, the output of the base classifier is also random.
Specifically, we denote by p
j the probability that the base classifier outputs a label j for the random ablated input.
The original randomized ablation method builds a smoothed classifier that outputs the label with the largest label probability p j for a testing input x .
In our work, the smoothed classifier returns the k labels with the largest label probabilities for x .
Our major theoretical contribution is an almost tight ℓ 0 -norm certified robustness guarantee of top- k predictions for the smoothed classifier constructed by randomized ablation.
Specifically, we first derive an ℓ 0 -norm certified robustness guarantee of top- k predictions for the smoothed classifier.
Our results show that a label l is provably among the top- k labels predicted by the smoothed classifier for a testing input x when the attacker arbitrarily perturbs at most r l features of x , where r l is the ℓ 0 -norm certified radius.
Moreover, we prove that our certified radius is tight when k = 1 and is almost tight when k > 1 .
In particular, if no assumptions on the base classifier are made, it is impossible to derive a certified radius that is larger than r l + I
( k ̸ = 1) .
In other words, when an attacker manipulates at least r l +
+
I
k ̸ = 1) features of a testing input, there exists a base classifier from which the smoothed classifier’s top-
k predicted labels do not include l or there exist ties.
Our work has several technical differences with Levine & Feizi (2019).
First, we derive the ℓ 0 -norm certified radius of top- k predictions for randomized ablation, while Levine & Feizi (2019) only derived the certified radius of top-1 predictions.
Second, our certified radius is the same as or larger than that in Levine & Feizi (2019) for top-1 predictions, because we leverage the discrete property of the label probabilities to derive our certified radius.
Third, we prove the (almost) tightness of the certified radius, while Levine & Feizi (2019) didn’t.
Our work also has several technical differences with Jia et al.
(2020), which derived a tight ℓ 2 -norm certified radius of top- k predictions for randomized smoothing with Gaussian additive noise.
Since they add additive Gaussian noise to a testing input, the space of randomized inputs is continuous.
However, our space of ablated inputs is discrete, as we randomize a testing input via subsampling its features.
As a result, Jia et al.
and our work use substantially different techniques to derive the ℓ 2 / ℓ 0 -norm certified radiuses and prove their (almost) tightness.
In particular, when deriving the ℓ 2 / ℓ 0 -norm certified radiuses, our work needs to construct different regions in the discrete space of ablated inputs such that the Neyman-Pearson
Lemma (Neyman & Pearson, 1933) can be applied.
When proving the (almost) tightness, we use a completely different approach from Jia et al..
First, Jia et al.
relies on the Intermediate Value
Theorem, which is not applicable to our discrete data.
Second, since Gaussian noise is not uniform,
Jia et al.
need to prove the results via Mathematical Induction.
However, Mathematical Induction is unnecessary in our case because the ablated inputs that can be derived from an input are uniformly distributed in the space of ablated inputs.
We evaluate our method on CIFAR10 and ImageNet.
Our results show that our method substantially outperforms state-of-the-art for top- k predictions.
For instance, our method achieves a certified topaccuracy of 69.2% on ImageNet when an attacker arbitrarily perturbs 5 pixels of a testing image.
Under the same setting, Jia et al.
(2020) achieves a certified top-3 accuracy of only 9.0%, when transforming their ℓ 2 -norm certified robustness to ℓ 0 -norm certified robustness.
Our contributions can be summarized as follows:
• We derive an ℓ 0 -norm certified radius of top- k predictions for randomized ablation.
• We prove that our certified radius is tight when k
= 1 and almost tight when k > 1 .
• We empirically evaluate our method on CIFAR10 and ImageNet.
T HEORETICAL R ESULTS
In this section, we show our core theoretical contributions.
2. B UILDING A SMOOTHED CLASSIFIER VIA RANDOMIZED ABLATION
Suppose we have a base classifier f , which classifies a testing input x to one of c classes { 1 , 2 , · · · , c } deterministically.
For simplicity, we assume x is an image with d pixels.
Given an input x , randomized ablation (Levine & Feizi, 2019) creates an ablated input as follows: we first randomly subsample e pixels from x without replacement and keep their values.
Then, we set the remaining pixel values in the ablated input to a special value, e.g., median of the pixel value, mean of the pixel value, or a special symbol.
When the image is a color image, we set the values of the three channels of each pixel separately.
Note that an ablated input has the same size with x .
We use h ( x , e ) to denote the randomly ablated input for simplicity.
Given h ( x , e ) as input, the output of the base classifier f is also random.
We use p j to denote the probability that the base classifier f predicts class j when taking h ( x , e ) as input, i.e.,
p j = Pr ( f ( h ( x , e )) =
j ) .
Note that p j is an integer multiple of 1 ( de ) , which we will leverage to derive a tighter certified robustness guarantee.
We build a smoothed classifier g that outputs the k labels with the largest label probabilities p j ’s for x .
Moreover, we denote by g k ( x ) the set of k labels predicted for x .
2. D ERIVING THE CERTIFIED RADIUS FOR THE SMOOTHED CLASSIFIER
Defining two random variables: Suppose an attacker adds a perturbation δ to an input x , where ∥ δ ∥ 0 is the number of pixels perturbed by the attacker.
We define the following two random variables:
[Equation]
where the random variables U and V denote the ablated inputs derived from x and its perturbed version x + δ , respectively.
We use S to denote the joint space of U and V , i.e., S is the set of ablated inputs that can be derived from x or x + δ .
Given the definition of U and V , Pr ( f ( U ) =
j ) and
Pr ( f ( V ) =
j ) respectively represent the label probabilities of the input x and its perturbed version x + δ predicted by the smoothed classifier.
Derivation goal: Intuitively, an ablated input h ( x , e ) is very likely to not include any perturbed pixel if ∥ δ ∥ 0 is bounded and e is relatively small, and thus the predicted labels of the smoothed classifier are not influenced by the perturbation.
Formally, our goal is to show that a label l ∈ { 1 , 2 , · · · , c } is provably in the top- k labels predicted by the smoothed classifier for an input x when the number of perturbed pixels is no larger than a threshold.
In other words, we aim to show that l ∈ g k
( x + δ ) when ∥ δ ∥ 0 ≤ r l , where r l is the certified radius.
Our key idea to derive the certified radius is to guarantee that, when taking V as input, the label probability for label l is larger than the smallest one among the label probabilities of any k labels from all labels except l .
We let Γ = { 1 , 2 , · · · , c } \ { l } , i.e., Γ denotes the set of all labels except l .
We use Γ k to denote a set of k labels in Γ .
Then, we aim to find a maximum certified radius r l such that:
[Equation]
Roughly speaking, the above equation means that: to ensure l exists in the set of top- k labels,
Pr ( f ( V ) =
l ) should be larger than the minimum probability observed by taking any set of k labels Γ k excluding l .
To reach the goal, we derive a lower bound of Pr ( f ( V )
=
l ) and an upper bound of max Γ k ⊂ Γ min j ∈ Γ k Pr ( f ( V ) = j ) .
In particular, we derive a lower bound and an upper bound using the probabilities that V is in certain regions of the discrete space S , and such probabilities can be efficiently computed for ∀ ∥ δ ∥
= r .
Then, we can leverage binary search to find the maximum r such that the lower bound is larger than the upper bound and treat the maximum r as the certified radius r l .
Next, we respectively introduce how to derive lower and upper bounds and use them to compute certified radius.
Deriving a lower bound of Pr ( f ( V )
=
l ) and an upper bound of max Γ k ⊂ Γ min j ∈ Γ k Pr ( f ( V ) =
j ) : We show our intuition to derive the upper and lower bounds.
Our formal analysis is shown in the proof of Theorem 1.
Our idea to derive the bounds is to divide the discrete space S in an innovative way such that we can leverage the Neyman-Pearson Lemma (Neyman & Pearson, 1933).
Suppose for the random variable U , we have a lower bound of the label probability for l and an upper bound of the label probability for every other label.
Formally, we have p l , p 1 · · · p l − 1 , p l , · · · , p c that satisfy the following:
[Equation]
where p and p denote the lower and upper bounds of p , respectively.
Multiplying each term in
Equation (3) by (cid:0) de (cid:1) , we have p l · (cid:0) de (cid:1) ≤ Pr ( f ( U ) =
l ) · (cid:0) de (cid:1) , p j · (cid:0) de (cid:1) ≥ Pr ( f ( U ) =
j ) · (cid:0) de (cid:1) , ∀ j ̸ = l .
Since p l and p j ( ∀ j ̸ = l ) are integer multiples of 1 ( de ) , we have ⌈ p l · (cid:0) de (cid:1) ⌉ ≤ Pr ( f ( U ) = l ) · (cid:0) de (cid:1) ,
⌊ p j · (cid:0) de (cid:1) ⌋ ≥
Pr ( f ( U ) =
j ) · (cid:0) de (cid:1) , ∀ j ̸ = l .
Therefore, we have the following:
[Equation]
Let p a k ≥ p a k − 1 · · · ≥ p a 1 be the k largest ones among { p 1 , · · · , p l − 1 , p l +1 , · · · , p c } , where ties are broken uniformly at random.
We denote Υ t = { a 1 , a 2 , · · · , a t } as the set of t labels with the smallest label probability upper bounds in the k largest ones and denote by p ′ Υ t
= (cid:80) j ∈ Υ t p ′
j the sum of the t label probability bounds, where t = 1 , 2 , · · · , k .
We define regions A , B , and C in S as the sets of ablated inputs that can be derived only from x , only from x + δ , and from both x and x + δ , respectively.
In particular, the region A is a set of ablated inputs that can only be obtained via sampling e features (pixels) from x .
The region B is a set of ablated inputs that can only be obtained via sampling e features from the perturbed x + δ , and the region C is a set of ablated inputs that can be obtained via sampling e features from both x and x + δ .
Then, we can find a region A ′ ⊆
C such that Pr ( U ∈
A ′ ∪ A ) =
p ′ l .
Note that we assume we can find such a region A ′ since we aim to find sufficient condition.
Similarly, we can find H Υ t ∈ C such that we have Pr ( U ∈ H Υ t ) =
p ′ Υ t .
Then, we can apply the Neyman-Pearson
Lemma (Neyman & Pearson, 1933) to derive a lower bound of Pr ( f ( V ) =
l ) and an upper bound of max Γ k ⊂ Γ min j ∈ Γ k Pr ( f ( V ) =
j ) by leveraging the probabilities of V in regions A ′ ∪ A and
H Υ t ∪ B .
Formally, we have the following:
[Equation]
Computing certified radius: Given the lower and upper bounds, we can find the maximum r = ∥ δ ∥such that the lower bound Pr ( V ∈
A
′ ∪ A ) is larger than the upper bound min kt =1 Pr ( V ∈H Υ t ∪B ) t .
The maximum r is the certified radius.
Formally, we have the following theorem:
Theorem 1 ( ℓ 0 -norm Certified Radius for Top- k Predictions) .
Suppose we have an input x with d features, a deterministic base classifier f , an integer e , a smoothed classifier g where g k ( x ) is a set of k labels predicted for x , an arbitrary label l ∈ { 1 , 2 , · · · , c } , p l , p 1 , · · · , p l − 1 , p l +1 , · · · , p c that satisfy Equation (3), and p ′ l , p ′ j ( ∀ j ̸ = l ) that are defined in Equation (4).
If the following optimization problem has a solution r l :
[Equation]
Then, we have the following:
[Equation]
Proof.
Please refer to Appendix A.
Next, we show that our derived certified radius is (almost) tight.
In particular, when using randomized ablation and no further assumptions are made on the base classifier, it is impossible to certify an ℓ 0 -norm radius that is larger than r l + I
( k ̸ = 1) for top- k predictions.
Theorem 2 (Almost Tightness of our Certified Radius) .
Assuming we have (cid:0) d − r l − 2 e − 1 (cid:1) ≥ 1 , p ′ l + (cid:80) j ∈ Υ k p ′ j ≤ 1 , and
p ′ l + (cid:80)
j ̸ = l p ′
j ≥ 1 .
If no assumption on the base classifier is made, then, for any perturbation ∥ δ ∥ 0 > r l + I ( k ̸ = 1) , there exists a base classifier f ∗ consistent with Equation (3) but we have l / ∈
g k ( x + δ ) or there exist ties.
Proof.
Please refer to Appendix B.
Comparing with Levine & Feizi (2019)
when k = 1 : Our certified radius reduces to the maximum r that satisfies p ′
l − p ′ a 1 > 2 · (1 − ( d − re ) ( de ) )
when k = 1 .
In contrast, the certified radius in Levine & Feizi (2019) is the maximum r that satisfies p l − p a 1 > 2 · (1 − ( d − re ) ( de ) ) .
Since p ′ l ≥ p l and p ′ a k ≤ p a k , our certified radius is the same as or larger than that in Levine & Feizi (2019).
Note that the method by Levine & Feizi (2019) cannot be extended in a straightforward way to derive the certified robustness for top- k predictions.
The reason is that they consider each label independently in their derivation.
In particular, they use the probability that the base classifier predicts label i for an ablated clean input (i.e., Pr ( f ( U ) = i ) ) to bound the probability that the base classifier predicts label i for an ablated adversarial input (i.e., Pr ( f ( V ) = i ) ).
However, to derive the certified robustness for top- k predictions, we need to jointly derive the bounds for multiple label probabilities (i.e., Equation (5)).
Moreover, because of the difference in deriving label-probability bounds, our techniques are significantly different.
In particular, Levine & Feizi only need the law of total probability while we leverage Neyman-Pearson Lemma.
Moreover, Levine & Feizi (2019) did not analyze the tightness of the certified radius for top-1 predictions.
Comparing with Jia et al.
(2020): Jia et al.
(2020) proved the exact tightness of their ℓ 2 -norm certified radius for randomized smoothing with Gaussian noise.
We highlight that our techniques to prove our almost tightness are substantially different from those in Jia et al..
First, they proved the existence of a region via the Intermediate Value Theorem, which relies on the continuity of
Gaussian noise.
However, our space of ablated inputs is discrete.
Therefore, given a probability upper/lower bound, it is challenging to find a region whose probability measure exactly equals to the given value, since the Intermediate Value Theorem is not applicable.
As a result, we cannot prove the exact tightness of the ℓ 0 -norm certified radius when k > 1 .
To address the challenge, we find a region whose probability measure is slightly smaller than the given upper bound, which enables us to prove the almost tightness of our certified radius.
Second, since Gaussian noise is not uniform, they need to iteratively construct regions via leveraging Mathematical Induction.
However, Mathematical
Induction is unnecessary in our case because the ablated inputs that can be derived from an input are uniformly distributed in the space of ablated inputs.
Computing r l in practice: When applying our Theorem 1 to calculate the certified radius r l in practice, we need the probability bounds
p ′ l and p ′ Υ t and solve the optimization problem in
Equation (6).
We can leverage a Monte Carlo method developed by Jia et al.
(2020) to estimate the probability bounds ( p l and p j , ∀ j ̸ = l ) with probabilistic guarantees.
Then, we can use them to estimate p ′ l and p ′ Υ t .
Moreover, given the probability bounds p ′ l and p ′ Υ t , we can use binary search to solve Equation (6) to find the certified radius r l .
Specifically, the probabilities p 1 , p 2 , · · · , p c can be viewed as a multinomial distribution over the label set { 1 , 2 , · · · , c } .
Given h ( x , e ) as input, f ( h ( x , e )) can be viewed as a sample from the multinomial distribution.
Therefore, estimating p l and p i for i ̸ = l is essentially a one-sided simultaneous confidence interval estimation problem.
In particular, we leverage the simultaneous confidence interval estimation method called SimuEM (Jia et al., 2020) to estimate these bounds with a confidence level at least 1 − α .
Specifically, given an input x and parameter e , we randomly create n ablated inputs, i.e., ϵ 1 , ϵ 2 , · · · , ϵ n .
We denote by n j the frequency of the label j predicted by the base classifier for the n ablated inputs.
Formally, we have n j = (cid:80) ni
=
I ( f ( ϵ i ) = j ) , where j ∈ { 1 , 2 , · · · , c } and I is the indicator function.
According to Jia et al.
(2020), we have the following probability bounds with a confidence level at least 1 − α :
[Equation]
where B ( q ; ξ, ζ ) is the q th quantile of a beta distribution with shape parameters ξ and ζ .
Then, we can compute p ′ l and p ′
j , ∀ j ̸ = l based on Equation (4).
Finally, we estimate p ′ Υ t as p ′ Υ t =
min
( (cid:80) j ∈ Υ t p ′
j , 1 − p ′ l ) .
E VALUATION 3. E XPERIMENTAL S ETUP
Datasets and models: We use CIFAR10 (Krizhevsky et al., 2009) and ImageNet (Deng et al., 2009) for evaluation.
We normalize pixel values to be in the range [0,1].
We use the publicly available implementation 1 of randomized ablation to train our models.
In particular, we use ResNet-110 and
RestNet-50 as the base classifiers for CIFAR10 and ImageNet, respectively.
Moreover, as in Lee et al.
(2019), we use 500 testing examples for both CIFAR10 and ImageNet.
Parameter setting: Unless otherwise mentioned, we adopt the following default parameters.
We set e = 50 and e = 1 , 000 for CIFAR10 and ImageNet, respectively.
We set k = 3 , n = 100 , 000 , and α =
We will study the impact of each parameter while fixing the remaining ones to their default values.
Evaluation metric: We use the certified top- k accuracy as an evaluation metric.
Specifically, given a number of perturbed pixels, certified top-
k accuracy is the fraction of testing images, whose true labels have ℓ 0 -norm certified radiuses for top- k predictions that are no smaller than the given number of perturbed pixels.
Note that our ℓ 0 -norm certified radius corresponds to the maximum number of pixels that can be perturbed by an attacker.
Compared methods: We compare six randomized smoothing based methods.
The first four are only applicable for top-1 predictions, while the latter two are applicable for top- k predictions.
• Cohen et al.
This method adds Gaussian noise to a testing image and derives a tight ℓ 2 -norm certified radius for top-1 predictions.
In particular, considering the three color channels and each pixel value is normalized to be in the range [0,1], an ℓ 0 -norm certified number of perturbed pixels r l can be obtained from an ℓ 2 -norm certified radius √ 3 r l .
• Lee et al.
This method derives an ℓ 0 -norm certified radius for top-1 predictions.
This method is applicable to discrete features.
Like Lee et al.
(2019), we treat the pixel values as discrete in the domain { 0 , 1 / 256 , 2 / 256 , · · · , 255 / 256 } .
Since their ℓ 0 -norm certified radius is for pixel channels (each pixel has 3 color channels), a certified number of perturbed pixels r l can be obtained from their ℓ 0 -norm certified radius 3 r l . • Levine & Feizi (2019) .
This method derives an ℓ 0 -norm certified number of perturbed pixels for top-1 predictions in randomized ablation.
This method requires a lower bound of the largest label probability and an upper bound of the second largest label probability to calculate the certified number of perturbed pixels.
They estimated the lower bound using the Monte Carlo method in Cohen et al.
and the upper bound as 1 - the lower bound.
Note that our certified radius is theoretically no smaller than that in Levine & Feizi (2019)
when k = 1 .
Therefore, we use our derived certified radius when evaluating this method.
We also found that the top-1 certified accuracies based on our derived certified radius and their derived certified radius have negligible differences on CIFAR10 and ImageNet, and thus we do not show the differences for simplicity. [Table] [Table] Our method
[Table]
• Levine & Feizi (2019)
+ SimuEM (Jia et al., 2020) .
This is the Levine & Feizi (2019) method with the lower/upper bounds of label probabilities estimated using the simultaneous confidence interval estimation method called SimuEM.
Again, we use our derived certified radius for top-1 predictions in this method.
• Jia et al.
This work extends Cohen et al.
from top-1 predictions to top- k predictions.
In detail, they derive a tight ℓ 2 -norm certified radius of top- k predictions for randomized smoothing with Gaussian noise.
An ℓ 0 -norm certified number of perturbed pixels r l for top-
k predictions can be obtained from an ℓ 2 -norm certified radius √ 3 r l .
• Our method .
Our method produces an almost tight ℓ 0 -norm certified number of perturbed pixels of top- k predictions.
Note that we compare with Cohen et al.
and Jia et al.
(2020) because we aim to show that it is suboptimal to derive ℓ 0 -norm certified robustness for top- k predictions by leveraging the relationship between ℓ 2 -norm and ℓ 0 -norm.
3. E XPERIMENTAL R ESULTS
Comparison results: Table 1 and 2 respectively show the certified top- k accuracies of the compared methods on CIFAR10 and ImageNet when an attacker perturbs a certain number of pixels.
The
Gaussian noise in Cohen et al.
and Jia et al.
(2020) has mean 0 and standard deviation σ .
We obtain the certified top- k accuracies for different σ , i.e., we explored σ = 0 .
Lee et al.
(2019) has a noise parameter β .
We obtain the certified top-1 accuracies for different β .
In particular, we explored β = 0 .
5 , which were also used by Lee et al.
Then, we report the largest certified top- k accuracies of Cohen et al.
Lee et al.
(2019), and Jia et al.
(2020) for each given number of perturbed pixels.
We use the default values of e for Levine & Feizi (2019) and our method.
We have two observations from Table 1 and 2.
First, our method substantially outperforms Jia et al.
(2020) for top- k predictions, while Levine & Feizi (2019) substantially outperforms Cohen et al.
(2019) and Lee et al.
for top- 1 predictions.
Since our method and Levine & Feizi (2019) use randomized ablation, while the remaining methods use additive noise (Gaussian or discrete noise) to randomize a testing input, our results indicate that randomized ablation is superior to additive noise at certifying ℓ 0 -norm robustness.
Second, Levine & Feizi (2019)
+ SimuEM (Jia et al., 2020)
[Figure] [Figure]
[Figure] [Figure]
outperforms Levine & Feizi (2019).
This is because SimuEM can more accurately estimate the label probability bounds via simultaneous confidence interval estimations.
Impact of k , e , n , and α : Figure 1, 2, 3 and 4 show the certified top- k accuracy of our method vs. number of perturbed pixels for different k , e , n , and α , respectively.
Naturally, the certified top- k accuracy increases as k increases.
For instance, when 5 pixels are perturbed, the certified top-1 and top-3 accuracies are 63.6% and 78.0% on CIFAR10, respectively.
We observe that e provides a tradeoff between accuracy under no attacks and robustness.
Specifically, when e is larger, the accuracy under no attacks (i.e., certified accuracy with 0 perturbed pixels) is higher, while the certified accuracy decreases to 0 more quickly as the number of perturbed pixels increases.
As n becomes larger, the curve of the certified accuracy may become higher.
The reason is that a larger n makes the estimated label probability bounds p l and p Υ t tighter and thus the ℓ 0 -norm certified radius may be larger, which result in a larger certified accuracy.
Theoretically, as the confidence level 1 − α decreases, the curve of the certified accuracy may become higher.
This is because a smaller confidence level leads to tighter estimated label probability bounds p l and p Υ t , and thus the certified accuracy may be larger.
However, we observe the differences between different confidence levels are negligible when the confidence levels are high enough (i.e., α is small enough).
R ELATED W ORK
Many certified defenses have been proposed to defend against adversarial perturbations.
These defenses leverage various techniques including satisfiability modulo theories (Scheibler et al., 2015;
Carlini et al., 2017; Ehlers, 2017; Katz et al., 2017), interval analysis (Wang et al., 2018), linear programming (Cheng et al., 2017; Lomuscio & Maganti, 2017; Fischetti & Jo, 2018; Bunel et al., 2018; Wong & Kolter, 2018; Wong et al., 2018), semidefinite programming (Raghunathan et al., 2018a;b), dual optimization (Dvijotham et al., 2018a;b), abstract interpretation (Gehr et al., 2018;
Mirman et al., 2018; Singh et al., 2018), and layer-wise relaxation (Weng et al., 2018; Zhang et al., 2018; Gowal et al., 2018;
Chiang et al., 2020).
However, these defenses suffer from one or two limitations: 1) they are not scalable to large neural networks and/or 2) they are only applicable to specific neural network architectures.
Randomized smoothing addresses the two limitations.
Next, we review randomized smoothing based methods for certifying non- ℓ 0 -norm and ℓ 0 -norm robustness.
Randomized smoothing for non- ℓ 0 -norm robustness: Randomized smoothing was first proposed as an empirical defense (Cao & Gong, 2017; Liu et al., 2018).
In particular, Cao & Gong (2017) proposed to use uniform random noise from a hypercube centered at a testing example to smooth its predicted label.
Lee et al.
(2019) derived certified robustness for such uniform random noise.
Lecuyer et al.
(2019) was the first to derive formal ℓ 2 and ℓ ∞ -norm robustness guarantee of randomized smoothing with Gaussian or Laplacian noise via differential privacy techniques.
Subsequently, Li et al.
(2019) leveraged information theory to derive a tighter ℓ 2 -norm robustness guarantee.
Cohen et al.
(2019) leveraged the Neyman-Pearson Lemma (Neyman & Pearson, 1933) to obtain a tight ℓ 2 -norm certified robustness guarantee for randomized smoothing with Gaussian noise.
Other studies include Pinot et al.
; Carmon et al.
Salman et al.
; Zhai et al.
; Dvijotham et al.
; Blum et al.
; Levine & Feizi (2020); Kumar et al.
; Yang et al.
Zhang et al.
Salman et al.
; Zheng et al.
All these studies focused on toppredictions.
Jia et al.
(2020) derived the first ℓ 2 -norm certified robustness of top- k predictions against adversarial perturbations for randomized smoothing with Gaussian noise and proved its tightness.
Randomized smoothing for ℓ 0 -norm robustness: All the above randomized smoothing based provable defenses were not (specifically) designed to certify ℓ 0 -norm robustness.
They can be transformed to ℓ 0 -norm robustness via leveraging the relationship between ℓ p norms.
However, such transformations lead to suboptimal ℓ 0 -norm certified robustness.
In response, multiple studies (Lee et al., 2019; Levine & Feizi, 2019; Dvijotham et al., 2019; Bojchevski et al., 2020; Jia et al., 2020; Zhang et al., 2021; Wang et al., 2021; Liu et al., 2021) proposed new randomized smoothing schemes to certify ℓ 0 -norm robustness.
For instance, Lee et al.
(2019) derived an ℓ 0 -norm certified robustness for classifiers with discrete features using randomized smoothing.
In particular, for each feature, they keep its value with a certain probability and change it to a random value in the feature domain with an equal probability.
Levine & Feizi (2019) proposed randomized ablation, which achieves state-of-the-art ℓ 0 -norm certified robustness.
However, their work focused on top-1 predictions and they did not analyze the tightness of the certified robustness guarantee for top-1 predictions.
We derive an almost tight ℓ 0 -norm certified robustness guarantee of top- k predictions for randomized ablation.
C ONCLUSION
In this work, we derive an almost tight ℓ 0 -norm certified robustness guarantee of top- k predictions against adversarial perturbations for randomized ablation.
We show that a label l is provably among the top- k labels predicted by a classifier smoothed by randomized ablation for a testing input when an attacker arbitrarily modifies a bounded number of features of the testing input.
Moreover, we prove our derived bound is almost tight.
Our empirical results show that our ℓ 0 -norm certified robustness is substantially better than those transformed from ℓ 2 -norm certified robustness.
Interesting future works include exploring other noise to certify ℓ 0 -norm robustness for top-
k predictions and incorporating the information of the base classifier to derive larger certified radiuses.
A CKNOWLEDGMENTS
We thank the anonymous reviewers for insightful reviews.
This work was supported by the National
Science Foundation under Grants No. 1937786 and 2125977, as well as the Army Research Office under Grant No. W911NF2110182.
A P ROOF OF T HEOREM
We define the following two random variables:
[Equation]
where U and V denote the ablated inputs derived from x and its perturbed version x + δ with parameter e , respectively.
We use S to denote the domain space of U and V .
Our proof is based on the Neyman-Pearson Lemma (Neyman & Pearson, 1933), and we present it as follows:
Lemma 1 (Neyman-Pearson Lemma) .
Suppose U and V are two random variables in the space
S with probability distributions ρ u and ρ v , respectively.
Let F : S −→ { 0 , 1 } be a random or deterministic function.
Then, we have the following:
• If Z 1 = { s ∈ S : ρ u ( s ) > µ · ρ v ( s ) } and Z 2 = { s ∈ S :
ρ u ( s ) = µ · ρ v ( s ) } for some µ > 0 .
Let Z
=
Z 1 ∪ Z 3 , where Z 3 ⊆
Z 2 .
If we have Pr ( F ( U ) = 1) ≥ Pr ( U ∈ Z ) , then Pr ( F ( V ) = 1) ≥ Pr ( V ∈ Z ) .
• If Z 1 = { s ∈ S : ρ u ( s ) < µ · ρ v ( s ) } and Z 2 = { s ∈ S :
ρ u ( s ) = µ · ρ v ( s ) } for some µ > 0 .
Let Z
=
Z 1 ∪ Z 3 , where Z 3 ⊆
Z 2 .
If we have Pr ( F ( U ) = 1) ≤ Pr ( U ∈ Z ) , then Pr ( F ( V ) = 1) ≤ Pr ( V ∈ Z ) .
Proof.
We show the proof of the first part, and the second part can be proved similarly.
For simplicity, we use F (1 | s ) and F (0 | s ) to denote the conditional probabilities that F ( s ) = 0 and F ( s ) = 1 , respectively.
We use Z c to denote the complement of Z , i.e., Z c =
S \ Z .
We have the following:
[Equation]
We obtain (14) from (13) because ρ u ( s ) ≥ µ · ρ v ( s ) , ∀ s ∈ Z and ρ u ( s ) ≤ µ · ρ v ( s ) , ∀ s ∈ Z c .
We have the last inequality because Pr ( F ( U ) = 1) ≥ Pr ( U ∈ Z ) .
Next, we will derive our certified robustness guarantee.
For simplicity, we denote Γ = { 1 , 2 , · · · , c }\ { l } , i.e., Γ denotes the set of all labels except l .
We use Γ k to denote a set of k labels in Γ .
Calibrating the lower and upper bounds: Recall that p l and p j , ∀ j ̸ = l are integer multiple of 1 ( de ) .
Then, given the probability lower and upper bounds in Equation (3), we have the following:
[Equation]
Deriving a lower bound of Pr ( f ( V )
=
l ) : We will derive a lower bound of the probability
Pr ( f ( V ) = l ) .
For simplicity, we define the following regions:
[Equation]
where we say s ⪯ x if Pr ( h ( x , e ) = s ) > 0 , and we say s ̸⪯ x if Pr ( h ( x , e ) = s )
= 0 .
Intuitively, the notations ⪯ and ̸⪯ mean that an ablated input can or cannot be derived from an input, respectively.
For instance, region A contains ablated inputs that can be derived from x but cannot be derived from x + δ , region B contains ablated inputs that can be derived from x + δ but cannot be derived from x , and region C contains ablated inputs that can be derived from both x and x + δ .
Suppose we have r = ||
δ || 0 .
Then, the size of C would be (cid:0) d − re (cid:1) since d − r features are the same for x and x + δ .
Similarly, we know the size of A and B would be (cid:0) de (cid:1) − (cid:0)
d − re (cid:1) .
Since we keep e features randomly sampled from x or x + δ without replacement and set the remaining features to a special value, we have the following probability mass functions:
[Equation]
Since we know the size of A , B , and C , as well as the probability mass functions of the random variables U and V in these regions, we have the following probabilities:
[Equation]
We consider the case of p ′
l ≥ 1 − ( d − re ) ( de ) .
Note that we can do this because we aim to find a sufficient condition.
We let A ′
⊆
C such that it satisfies the following:
[Equation]
Given region A ′ , we construct the following region:
[Equation]
Then, we have the following probability based on Equation (25):
[Equation]
We define a binary function F ( s ) =
I ( f ( s ) =
l ) .
Then, we have the following:
[Equation]
The middle inequality is based on Equation (19) and the right-hand equality is from Equation (27).
Furthermore, we have Pr ( U = s ) > 1 · Pr ( V = s ) if and only if s ∈ A , and Pr ( U = s ) = 1 · Pr ( V = s ) if s ∈ A ′ .
Therefore, we can apply Lemma 1 and we have the following:
[Equation]
Therefore, we have the following lower bound for Pr ( f ( V ) =
l ) :
[Equation] [Equation]
[Equation] [Equation]
Note that we have Equation (34) from (33) based on Equation (25).
Deriving an upper bound of max Γ k ⊂ Γ min j ∈ Γ k Pr ( f ( V ) =
j ) : We use Λ to denote an arbitrary subset of Γ k , i.e., Λ ⊆ Γ k .
We denote p ′ Λ =
(cid:80) j ∈ Λ p ′ j , which is the sum of the upper bound of the probability for the labels in Λ .
We assume p ′ Λ ≤ Pr ( U ∈ C ) .
We can make this assumption because we aim to find a sufficient condition.
Given p ′ Λ , we can find a region H Λ ⊆ C such that we have the following:
[Equation]
Given the region H Λ , we construct the following region:
[Equation]
Then, we have the following probability:
[Equation]
Furthermore, for any given Λ , we define a binary function G ( s ) =
I ( f ( s ) ∈ Λ) .
Then, we have the following:
[Equation]
We have (cid:80) j ∈ Λ Pr ( f ( U ) = j ) ≤ p ′ Λ based on Equation (19) and we have rightmost equality from
Equation (37).
Then, we can apply Lemma 1 and we have the following:
[Equation]
The value of Pr ( V ∈ I Λ ) can be computed as follows:
[Equation]
where the last equality is from Equation (35).
Therefore, we have the following:
[Equation]
Moreover, we have the following:
[Equation]
We have the leftmost inequality because Λ ⊆ Γ k , and we have the middle inequality because the smallest value in a set is no larger than the average value of the set.
Taking all possible Λ into consideration and we have the following:
[Equation] [Equation]
where Υ t is the set of t labels in Γ k whose probability upper bounds are the smallest, where ties are broken uniformly at random.
The upper bound of Pr ( f ( V ) ∈ Υ t ) is increasing as p ′
Υ t increases.
Therefore, the upper bound of Pr (
f ( V ) ∈ Υ t ) t reaches the maximum value when Γ k = { a 1 , a 2 , · · · , a k } , i.e., Γ k is the set of labels in Γ with the largest probability upper bounds.
In other words, we have the following:
[Equation]
where Υ t = { a 1 , a 2 , · · · , a t } .
Deriving the certified radius: Our goal is to make Pr ( f ( V ) =
l ) >
[Equation]
Γ k
[Equation]
j ∈ Γ k Pr ( f ( V ) = j ) .
Therefore, it is sufficient to satisfy the following:
[Equation]
where Υ t = { a 1 , a 2 , · · · , a t } .
Therefore, we can find the maximum r that satisfies the above condition.
Formally, we can solve the following optimization problem to find r l :
[Equation]
[Equation]
[Equation]
where Υ t = { a 1 , a 2 , · · · , a t } .
Note that we make two assumptions in our derivation, i.e., p ′ l ≥ (1 − ( d − re ) ( de ) ) and p ′ Υ t ≤ ( d − re ) ( de ) .
In particular, when Equation (58) is satisfied, we must have p ′ l ≥ (1 − ( d − re ) ( de ) ) since the left-hand side of Equation (58) is non-negative.
In addition, we have p ′
l + p ′ Υ t ≤ 1 in practice.
Therefore, we have p ′ Υ t ≤ 1 − p ′
l ≤ ( d − re ) ( de ) .
Technical differences with Jia et al.
Our technical contribution in proving the theorem is the construction of new discrete regions such that the Neyman-Pearson Lemma can be used.
Our proof of Theorem 1 has the following differences with Jia et al.
First, the construct of the regions
A / B / C (Eq 18) are different from Jia et al.
due to the discrete space.
Second, deriving the lower bound of Pr ( f ( V ) =
l ) faces two new challenges in our case.
The first challenge is that we need to find two regions A and A ′ while Jia et al.
just need to find one region.
The second challenge is how to find these regions.
To address the challenge, we first take into consideration of whether A ′ exists or not.
If A ′ exists, we need to shrink region A ′ because our space is discrete.
These two challenges do not exist in the continuous case considered by Jia et al.
Third, similar to deriving the lower bound of Pr ( f ( V ) =
l ) , our work is also different from Jia et al.
at deriving the upper bound of max Γ k ∈ Γ min j ∈ Γ k Pr ( f ( V ) = j ) .
B P ROOF OF T HEOREM
We consider two scenarios: k = 1 and k ̸ = 1 .
In particular, we first consider the scenario where k = 1 .
We have Γ 1 = { a 1 } when k = 1 .
We consider two cases.
Case I:
In this case, we consider p ′
l < (1 − ( d − rl
[Equation]
We let A l ⊆
A be the region that satisfies the following:
[Equation]
We can find such region because p ′ l is an integer multiple of 1 ( de ) .
We let D l =
A l
and we have the following:
[Equation]
Then, we can divide the remaining region ( A ∪ C ) \ D l into c − 1 disjoint regions such that we have the following:
[Equation]
We can find these regions because we have p ′ l +
[Equation]
s
[Equation]
= l p ′
s ≥ 1 .
Moreover, we have the following:
[Equation]
Given these regions, we construct the following base classifier:
[Equation]
Note that f ∗ is well defined and is consistent with Equation (3).
It is easy to see that label l is not the predicted label by the corresponding smoothed classifier g ∗
when ∥ δ ∥ 0 > r l .
Case II: In this case, we consider p ′ l ≥ (1 − ( d − rl −
[Equation]
) ( de ) ) .
Since r l is the maximum value that satisfies
Equation (6), we have the following condition when ∥ δ ∥
= r l + 1 :
[Equation]
We let A l
=
A
and we can find C l ∈ C such that the following equation holds:
[Equation]
Then, we let D l = C l ∪ A l and we have the following:
[Equation]
[Equation]
Furthermore, we have the following:
[Equation]
where the last equality is from Equation (65).
Since we have p ′ l + p ′ a 1 ≤ 1 , we can find region
C a 1 ∈ C \ C l such that we have the following:
[Equation]
We define D a 1 = C a 1 ∪ B .
Then, we have Pr ( U ∈ D a 1 ) =
Pr ( U ∈ C a 1 ) =
p ′ a 1 .
Similarly, we have the following:
[Equation]
[Equation]
Finally, we can divide the remaining region A ∪ C \ ( D l ∪ C a 1 ) into c − 2 disjoint regions such that we have the following:
[Equation]
We can find these region because p ′ l + (cid:80) s ̸
= l p ′ s ≥ 1 .
Given these regions, we construct the following base classifier:
[Equation]
Note that f ∗ is well defined and is consistent with Equation (3).
Next, we show that label l is not in the top- 1 predicted labels by the smoothed classifier or there exist ties when the ℓ 0 perturbation is larger than r l .
In particular, we have the following:
[Equation]
We have Equation (80) from (79) based on Equation (64).
Therefore, the label l is not predicted by the corresponding smoothed classifier g ∗ or there exist ties.
Combining the two cases, we reach the conclusion.
Next, we will show our bound is almost tight when k ̸ = 1 .
In particular, we will show we can construct a classifier f ∗ such that the label l is not among the top- k predicted labels or there exist ties when the adversarial perturbation is larger than r l + 1 .
Similarly, we consider two cases.
Case I:
In this case, we consider p ′
l < (1 − ( d − rl
[Equation]
We let A l ⊆
A be the region that satisfies the following:
[Equation]
We can find such region because p ′ l is an integer multiply of ν = 1 ( de ) .
We let D l =
A l
and we have the following:
[Equation]
Then, we can divide the remaining region ( A ∪ C ) \ D l into c − 1 disjoint regions such that we have the following:
[Equation]
We can find these regions because we have p ′ l + [Equation] s ̸
= l p ′
s ≥ 1 .
Moreover, we have the following:
[Equation]
Given these regions, we construct the following base classifier:
[Equation]
Note that f ∗ is well defined and is consistent with Equation (3).
It is easy to see that label l is not among the top- k predicted labels or there exist ties when ∥ δ ∥ 0 > r l + 1 .
Case II: In this case, we consider p ′ l ≥ (1 − ( d − rl − 2 e ) ( de ) ) .
For simplicity, we denote the following quantity:
[Equation] [Equation]
Since r l is the maximum value that satisfies Equation (6), we have the following condition:
[Equation]
In other words, the left-hand side of Equation (6) is no larger than its right-hand side when r = r l + 1 .
Based on the recurrence relation of the binomial coefficient, we have the following:
[Equation]
Combining with the condition (cid:0) d − r l − 2 e − 1 (cid:1) ≥ 1 , we have the following:
[Equation]
[Equation]
Similarly, we have the following:
[Equation]
Then
[Equation]
based on Equation (89)
[Equation]
we have the following:
[Equation]
For simplicity
[Equation]
we denote the following:
[Equation]
where ties are broken uniformly at random.
Then, based on Equation (100)
[Equation]
we have the following:
[Equation]
Given Equation (101), we have the following if w < k :
[Equation]
where Υ w = { a [Equation] a 2 , · · · , a w } .
Similarly
[Equation]
we have the following if w > 1 :
[Equation]
Note that the Equation (111) also holds when w = 1 .
Next, we will show we can build a base classifier f ∗ such that the label l is not in the top- k predicted labels or there exist ties when the adversarial perturbation is larger than r l + 1 .
Our proof relies on constructing disjoint regions for label l , Υ k , and { 1 , 2 , · · · , c } \ ( { l } ∪ Υ k ) , respectively.
We let A l
=
A
and we can find C l ∈ C such that the following equation holds:
[Equation]
Then, we let D l = C l ∪ A l and we have the following:
[Equation]
Furthermore, we have the following:
[Equation] [Equation]
[Equation] [Equation]
[Equation]
where the last equality is from Equation (112).
For simplicity, we denote the following value:
[Equation]
Next, we will construct the region for ∀ j ∈ Υ w .
Based on Equation (112), we have the following:
[Equation]
For ∀ j ∈ Υ w , we can find disjoint region C j ⊆ C \ C l such that we have the following:
[Equation]
We can find these regions because the summation of the probability of U in these regions is less than the probability of U in C \ C l , i.e., we have the following:
[Equation]
where the middle inequality is from the condition
p ′ l + (cid:80) s ∈ Υ k p ′ s ≤ 1 , and the right equality is based on Equation (119) - (122).
Given these regions, we have the following:
[Equation]
Based on Equation (111), definition of τ in Equation (118), and ∀ j ∈ Υ w , p ′ j ≤ p ′ a w , we have the following:
[Equation]
Then, for ∀ j ∈ Υ w , we can find disjoint region B j ∈ B such that we have the following:
[Equation]
We can construct these regions for three reasons: 1) the value of τ − p ′
j is no smaller than 0 based on
Equation (126), 2) ∀ j ∈ Υ w , there exists a number in the range [ τ − ν − p ′
j , τ − p ′
j ] that is an integer multiple of 1 ( de ) , and 3) the summation of the probability of V in these regions is no larger than the probability of V in B , i.e., we have the following:
[Equation]
For ∀ j ∈ Υ w , we let D j = C j ∪ B j .
Then, we have the following:
[Equation]
where the Equation (135) from (134) is based on Equation (123) and (127).
Next, we will construct the regions for the labels in Υ k \ Υ w .
In particular, for ∀ j ∈ { a w +1 , a w +2 , · · · , a k } , we can find disjoint region D j ∈ C \ ( C l ∪ ( ∪ s ∈ Υ w C s ))
such that we have the following:
[Equation]
Note that we can find these regions because p ′ l + (cid:80) s
∈ Υ k p ′ s ≤ 1 .
Similarly, we have the following for ∀ j ∈ Υ k \ Υ w :
[Equation]
We have the left inequality because ∀ j ∈ Υ k \ Υ w , p ′
j ≥ τ based on Equation (107).
Finally, we can divide the remaining region D j ⊆ C ∪ A \ ( D l ∪ ( ∪ s ∈ Υ k C s )) into c − k − 1 disjoint regions such that we have the following:
[Equation]
We can find these region because p ′ l + (cid:80) s ̸
= l p ′ s ≥ 1 .
Given these regions, we construct the following base classifier:
[Equation]
Note that f ∗ is well defined and is consistent with Equation (3).
Next, we show that label l is not in the top- k predicted labels by the smoothed classifier when the ℓ 0 perturbation is larger than r l + 1 .
In particular, for ∀ j ∈ Υ k , we have the following:
[Equation]
We have Equation (145) from (144) based on Equation (102).
Therefore, the label l is not among the top- k predicted labels by the corresponding smoothed classifier g ∗ .
Combining the two cases, we reach the conclusion.
Takeaway:
The key challenge in proving the tightness of certified robustness guarantee is that we are not able to find regions in the discrete space that satisfy certain conditions.
The reason is that we cannot arbitrarily divide the discrete space into different regions.
To address the challenge, we propose to relax the conditions in finding the regions to prove that the certified robustness guarantee is almost tight.
The idea in our proof is very general and we hope our proof can inspire future research in proving the (almost) tightness for ℓ 0 -norm certified robustness guarantee.
C O THER APPLICATIONS
In this paper, we focus on image classification.
However, our method is also applicable for other applications such as graph neural networks and 3D deep learning.
For example, we conduct experiments for 3D deep learning.
In particular, we evaluate our methods on the ModelNet40 (Wu et al., 2015) benchmark dataset and use PointNet (Qi et al., 2017) as the base classifier.
We set e = 16 , n = 10 , 000 , and α = 0 .
When the number of modified points is 10, 20, 30, 40, and 50, the certified accuracies for top- 1 prediction are 0.779, 0.743, 0.700, 0.649, and 0.570; and the certified accuracies for top- 3 prediction are 0.901, 0.867, 0.829, 0.803, and 0.775.
D C OMPARING WITH C HIANG ET AL . (2020)
We also compare with our method with Chiang et al.
We note that the method in Chiang et al.
is only applicable for top- 1 prediction.
We compare with the method on the CIFAR10 dataset for top- 1 predictions using the publicly available code.
The results are as follows.
When the number of perturbed pixels is 1, 2, 3, 4, and 5, the certified accuracies for our method are respectively 0.746,