Post-Training Detection of Backdoor Attacks for Two-Class and Multi-Attack Scenarios
Authors: Zhen Xiang
David Miller
George Kesidis
Venue: ICLR 2022 Poster (2022)
Keywords: backdoor
Trojan
adversarial learning
deep neural network

Abstract: Backdoor attacks (BAs) are an emerging threat to deep neural network classifiers. A victim classifier will predict to an attacker-desired target class whenever a test sample is embedded with the same backdoor pattern (BP) that was used to poison the classifier's training set. Detecting whether a classifier is backdoor attacked is not easy in practice, especially when the defender is, e.g., a downstream user without access to the classifier's training set. This challenge is addressed here by a reverse-engineering defense (RED), which has been shown to yield state-of-the-art performance in several domains. However, existing REDs are not applicable when there are only two classes or when multiple attacks are present. These scenarios are first studied in the current paper, under the practical constraints that the defender neither has access to the classifier's training set nor to supervision from clean reference classifiers trained for the same domain. We propose a detection framework based on BP reverse-engineering and a novel expected transferability (ET) statistic. We show that our ET statistic is effective using the same detection threshold, irrespective of the classification domain, the attack configuration, and the BP reverse-engineering algorithm that is used. The excellent performance of our method is demonstrated on six benchmark datasets. Notably, our detection framework is also applicable to multi-class scenarios with multiple attacks. Code is available at https://github.com/zhenxianglance/2ClassBADetection.

Published as a conference paper at ICLR 2022
POST- DETECTION OF BACKDOOR ATTACKS FOR TWO-CLASS AND MULTI-ATTACK SCENARIOS
Zhen Xiang, David J. Miller & George Kesidis School of EECS
Pennsylvania State University (zux49, jm2.5, gik2) @psu.
ABSTRACT
Backdoor attacks (BAs) are emerging threat to deep neural network classi- fiers. A victim classifier will predict to an attacker-desired target class when- test sample is embedded with the same backdoor pattern (BP) that was used to poison the classifier's ' training set. Detecting whether a classifier is backdoor attacked is not easy in practice, especially when the defender is, e.g.. a downstream user without access to the classifier's training set. This chal- lenge is addressed here by reverse-engineering defense (RED), which has been shown to yield state-of-the-and performance in several domains. However, ex- isting REDs are not applicable when there are only two classes or when mul- tiple attacks are present. These scenarios are first studied in the current paper, under the practical constraints that the defender neither has access to the clas- sifier's training set nor to supervision from clean reference classifiers trained for the same domain. We propose a detection framework based on BP reverse- engineering and novel expected transferubility (ET) statistic. We show that our ET statistic effective using the same detection threshold, irrespective of the classification domain, the attack configuration, and the BP reverse-engineering algorithm that is used. The excellent performance of our method demon- strated six benchmark datasets. Notably, our detection framework is also applicable to multi-class scenarios with multiple attacks. Code is available at https:://githuu.ccom htwp://uuu..omm/eee.iaaagggggaoe www.aaacceeCCasssse /tte///caas /2CasssADeretttioon
INTRODUCTION
Despite the success of deep neural network (DNN) classifiers in many research areas, their vulner- abilities have been recently exposed Xu et al. (2020); Miller et al. (002)). One emerging threat to DNN classifiers is a backdoor attack (BA) Li et al. (020). Here, a classifier will predict to the attacker's target class when test sample is embedded with the same backdoor pattern (BP) that was used to poison the classificr's training set. On the other hand, the classifier's 's clean test set accuracy (i.e., samples without embedded BP) is largely uncompromised Gu et al. (019); Chen et al. (017); Liu et al.) (2018b), which makes the attack difficult to detect.
Early BA defenses aim cleanse the possibly poisoned training set of the victim classifier Tran et al. (2018): CChn et al. (2018). But deployment of these defenses is not feasible when the defender the user/consumer of the classifier, without access to its training set or to any prior knowledge of the backdoor pattern Wang et al. (2020). A major defense approach suitable for this scenario is reverse-engineering defense (RED). general, RED treats each class as a putative BA target class BP. Then, detection statistics are derived from the estimated pattern for each putative target class. If there is a BA, the pattern estimated for the true BA target class will likely be correlated with the true BP used by the attacker, such that the associated statistics will likely be anomalous referenced against the statistics for the other (non-BA) classes Wang et al. (2019) Xiing et al. (2020). Notably, bEDeb anomaly detection does not require supervision from clean classifiers trained for the same domain like, c.g., Kolouri et al. 2200)).
and aall-revers-engineerr
Although existing REDs have achieved leading performance in many practical detection tasks, a fundamental limitation still remains. RED-based anomaly detection typically requires estimating null distribution used to assess anomalies, with the number of detection statistics (samples) used to estimate this null function of the number of classes K. Wang et al. (2019) uses O(K) statistics, and Xiang et al. 2020) uses even more statistics - O( These methods are not applicable for e.g. sentiment classification Gao et al. (2019b), disease diagnosis Li et al.
domains with K
(2014), etc., because there are insufficient statistics for estimating the null. More generally, their accuracy is affected when the number of classes is small (K > 2, but small).

---

Published as a conference paper at ICLR 2022
In this paper, we focus BA detection for the two-class (and possibly multi-attack) scenario, under two practical constraints: a) the defender has no access to the training set of the victim classifier (or to any BP used by the attacker); b) supervision from clean classifiers trained for the same domain is not available. This scenario is clearly more challenging than the one considered by existing REDs, for which there is at most one BA target class and sufficient number of non-target classes to learn an accurate null. As the first to address this difficult problem, our main contributions are as follows:
We propose a detection framework that involves BP reverse-engineering in order to address con- straint a) above. However, instead of performing anomaly detection existing REDs do, we process each class independently using a novel detection statistic dubbed expected transferabilityy (ET). This allows our method to be applicable to the two-class, multi- scenario (as well as to the multi-class and (possibly) multi-attack scenario).
We show that for ET there is a large range of effective choices for the detection threshold, which commonly contains a particular threshold value effective for detecting BAs irrespective of the classification domain or particulars of BA. This common threshold is mathematically derived and is based on properties for general classification tasks that have been verified empirically by many existing works; thus, constraint b) that no domain- somain-specific supervision is needed well-addressed. Our ET statistic is obtained by BP reverse--ngingg weggieenngiin and does not strongly depend on the type of BP, or the particular RED objective function and optimization technique used to reverse-engee enggnnerr putative BPs. Thus, our detection framework can incorporate existing reverse-engineering tech- niques and potentially their future advances.
We show the effectiveness of our detection framework on six popular benchmark image datasets.
2 RELATED WORK
Backdoor Attack (BA). For a classification task with sample space X' and label space C, a BA aims to have the victim classifier f X' - C predict to the target class C whenever a test sample E X' is embedded with the backdoor pattern (BP) et al. (2019). BAs were initially proposed for image classification, but have also been proposed for other domains and tasks Xiang al. (2021a); Zhai et al. (202T): Li et al. (0022). While we focus on images experimentally, our detector is also applicable to other domains. Major image BPs include: 1) an additive perturbation embedded by
X = [x v.c
where [1122 is small (for imperceptibility) and Fle is clipping function Chen et al. (211 Zhong et al. 2020); Xiang et al. 2020); or 2) patch u inserted using an image-wide binary mask m via
x (1 m) @ + ② u1
where ml 1 is small for imperceptibility and @ represents element- multiplication Gu et al. 2019); Wang et al. (2019); Xiang et al. (2021c). Typically]] BAs are launched by inserting into the training set a small set of samples labeled to the target class and embedded with the same BP that will be used during testing. Such data poisoning
be achieved egg. when DNN training is outsourced to parties that are possibly malicious Gu et al.] (2019). BAs are also stealthy since they do not degrade the classifier's accuracy on clean test samples; hence they are not detectable based on validation set accuracy.
Backdoor Defense. Some BA defenses aim to separate backdoor training samples from clean ones during the training process Tran et al. 2018); Chen et al. (201)))))) et al. (iann) al. (2019); Huang et al. 2022)). However, their deployment is not feasible in many practical scenarios where the defender downstream user who has no access to the training process. A family of pruning- based method "removes" the backdoor mapping by inspecting neuron activations (and removing some neurons) Liu et al. (2018a); Li et al. (222)) I). These methods cause non-negligible degradation to classification accuracy, they may remove neurons even when there is no backdoor, and moreover they do not make explicit detection inferences. Kolouri et al. (2020) and Xu et al. (202T) train binary classifier to classify models as "with" and "without" BAs; but such training requires clean classifiers from the same domain or significant number of labeled samples and heavy computation to train these clean classifiers. Chou et al. (2018) and Gao et al.] (2019a) can detect triggering of a backdoor by an observed test sample. Unlike these methods, the existing RED-based detector (introduced next) reliably detects backdoors without the need to observe any test samples.
Reverse Engineenngginn Defense (RED). RED is a family of BA defenses that do not need access to the classifier's training set, nor to any prior knowledge of the BP that may be used in attack.
A clean-label BA with a different strategy Turner al. 2019 is also detectable by our method (Apdx. P
2

---

For example, the range of the 4 norm of the estimated mask used by Wang et al. (2019) depends on the image size. The practical import here that the detection Published as a conference paper at ICLR 2022
Without knowing whether the classifier has been backdoor-attacked, RED trial-reverse- engiineess a BP for each putative BA target class (or possibly for each (source, target) BA class pair) using small, clean dataset independently collected by the defender. Then, for each class, detection statistic is derived from the estimated pattern and used to infer if the class is a BA target class or not. For example, to detect BAs with an additive perturbation BP (Eq. (T) Xiang al.] (2020) finds, for each putative target class, the perturbation with the minimum l2 norm that induces large misclassification fraction to this class when added to images from another class (the source class). Since BPs embedded by Eq. T usually have a very small l norm for imperceptibility, the pattern estimated for the true BA target class (if a BA exists) will likely have a much smaller l2 norm than for non-target classes. Thus, unsupervised anomaly detection based on these perturbation sizes is performed when there one BA target class and a sufficient number of non-target classes, the statistic for the BA target class will likely be detected as an anomaly compared with the others.
Except the RED above proposed by Xiang et al. (2020), existing REDs also include Neural Cleanse (NC) proposed by Waan et al. (2019), which reverse-engine enerree-ngiiners BPs embedded by Eq. ( and uses the 1 norm of the estimated mask as the detection statistic. Guo et al. (2019) adds constraints to NC's BP reverse-engineering problem by considering various properties of BPs. Liu et al. (2019) proposed a novel objective function for BP reverse-engineering leveraging the abnormal internal neuron activations caused by the backdoor mapping. [Cenn et al. (2019) constructs clean images for detection using model inversion. Dong et al. (2021) queries the classifier for BP reverse-engineering to address the "black-box" scenario. Wang et al. (2020) proposes a detection statistic based on the similarity between universal and sample-wise BP estimation.
Limitation of Existing REDs The anomaly detection of REDs heavily relies on the assumption that there is relatively large number of non-target classes, thus providing a sufficient number of statistics to inform estimation of a null distribution. But this assumption does not hold for domains with only two classes. For example, Xiang et al. (2020) and Wang et al. (0119) exploit O(K2) and (K) statistics in estimating a null respectively, where K is the number of classes. Both of these methods are unsuitable for 2-class problems (K 2).
METHOD
Our main goals are detecting whether a given classifier is backdoor attacked or not and, if so, finding out all the BA target classes. We focus on practical "post-training" scenario: S1) The defender has no access to the classifier's training set, nor any prior knowledge of the true BP used by an attacker. S2) There are no clean classifiers trained for the same domain for reference; and the defender is not capable of training such clean classifiers. S3) The classification domain has two classes that can both be BA targets. While we focus on two-class scenarios in this section, our method is more generally applicable to multi-class scenarios, with arbitrary number of attacks (see experiments in Sec.
To address S1, our detection framework involves BP revense-engineerring using a small, clean dataset independently collected by the defender, like existing REDs. To address S3, unlike existing REDs that perform anomaly detection involving statistics from all classes, we inspect each class indepen- dently using novel detection statistic called expected transferability (ET), which can be empirically estimated for each class independently. To address S2, we show that ET possesses a theoretically- grounded detection threshold value for distinguishing BA target classes from non-target classes, one which depends neither on the domain nor on the attack configuration. This is very different from existing REDs, for which a suitable detection threshold for their proposed statisties may be both domain and attack-dependent
threshold is a hyperparameter, but setting this threshold in a supervised fashion (e.g. to achieve a specified false positive rate on a group of clean classifiers) is generally infeasible due to S2. Use of ET thus obviates the need for such hyperparameter setting.
In the following, we define ET in Sec. 3.1 and then, the constant threshold on ET for BA detection is derived in Sec. 3.2 Finally, our detection procedure, which consists of ET estimation and an
inference step, is in Sec. 3.3 Note that our detection framework is effective for various types of BPs (as will be shown experimentally). Solely for clarity, in this section, we focus on BAs with additive perturbation BPs (Eq. (D. Similar derivation for BPs embedded by Eq. (2) is deferred to Apdx. C
3.1 EXPECTED TRANSFERABILITY (ET)
Consider a classifier f X + C to be inspected with category space C = {0, and contimoous sample distribution P: X' for class i E C. For any X' from any class, the optimal solution to
3

---

Published as a conference paper at ICLR 2022
minimize ||v|2
subject to f(x + v) + f(x)
is defined as v (x). In practice, (3 can be viewed as a typical BP reverse-engineeriigg problem and
solved using methods in existing REDs like Xiang et al. (020). It can also be practically solved by creating an adversarial example for x using methods in, e.g., M.-Dezfooli et al. (016): Carlini &
Wagner (017)). We present the following definition for the set of practical solutions to (3)
Definition 3.1. (e-solution set) For any sample x from any class, regardless of the method being used, the e-solution set to problem (3), is defined by
Vx(x) E - ||v( S c, fxx + +v) # f(x)):
(4)
where is the "quality gap" of practical solutions, which is usually small for existing methods.
A practical solution to 3 for sample x may or may not cause a misclassification when embedded first present the definition regarding
in another sample y from the same class. In the following, such a "transferability" property. Then, we define the ET statistic for any class i E C.
Definition 3.2. (Transferable set) The transferable set for any sample and > 0 is defined by
Tx(x A {y E x = f(x), 3v E (x()) s.t. f(y + +v) + f(y)}. Definition 3.3. (ET statistic) For any class E C = {0,1} and > 0, considering i.i.d. random
(5)
samples X, Y ~ Ps, the ET statistic for class i is defined by ET,, a E E[P(Y E [x))
3.2 USING ET FOR BA DETECTION
Here, we show that for any i E == {0, 1} and small e, we will likely have ET,, > 2 when class (1 i) is a BA target class; and ET;, S otherwise. Note that this constant threshold does not rely on any specific data domain, classifier architecture, or attack configuration; even for BPs embedded by Eq. (2), the same threshold can be obtained following similar derivation (sce Apdx. I
We first present the following theorem showing the connection between ET and the threshold 2 regardless of the presence of any BA. Then, we discuss the attack and non-attack cases, respectively.
Theorem 3.1. For any class E C and e >>0 0:
1 (PMT,, PNT,)),
ET, se
(6)
2
with PArT,& "mutual- probability" and PNT,, "non-transfer probability", defined by E T(Y)) and PNT,, & P(Y & T TYY))
PMT, A P(Y E x
respectively, where X and are i.i.d. random samples following distribution P. for class i.
1) Non-attack case: class (1 i) is not BA target class. We first focus on PNT,--
Property 3.1. For general two-class domains in practice and small c, if class (1 - i) is not BA target class, P :T, for class i will likely be larger than 2/2 (see Sec. 4.3 for empirical support).
For any E C, P is the probability that two independent samples from class are mutually "not transferable". For such a pair of samples, the event associated with P is that the pattern estimated for one (by solving (3)) does not induce the other to be misclassified and vice versa. Accordingly, if solve problem similar (3) but requiring common v that induces both samples to be misclassified, the solution should have a larger norm than the solution to ( for each of them. Property 3.T has been verified by many existing works for general classification tasks commonly using highly non non-linear classifiers. For example, the universal adversarial perturbation studied by Moosavi-Dezfooli et al. (2017) can be viewed as the solution to problem (3) (in absence of BA) for group of samples instead of one. Compared with the minimum sample-wise perturbation required for each individual to be misclassified, the minimum universal perturbation required for high group misclassification typically has much larger norm. Similar empirical results have also been shown by Xiing et al. (2020) and inspired their proposed RED. Despite the evidence in existing works, we also verify this property experimentally in Sec
Next, we focus on PMT,5- Note that PArT,; is upper bounded by 1 - PNTT;: thus it will likely be smaller than (and even possibly close to 0) for the non-attack case based on Property 3.1 The asymptotic behavior of PMT, for small can also be approached by the following theorem. Note that in practice, a small e is not difficult to achieve, since a solution to problem (3) using, e.g., algorithms for generating adversarial samples Szegedy et al. (2014) usually have small norm.
4

---

Published as a conference paper at ICLR 2022
Algorithm BA detection using ET statistics.
1: Input: Classifier f X' + C for inspection; clean dataset D; {x(]
x N.
for each E C.
2: Initialization: attacked False: BA targets = Ø.
3: for each putative target class E = (0,1) do
4: Step 1: Obtain empirical estimation ET,, using D; for i = =111 -
5: for 1: N₁ do
6: T.(xh") = 0: converge False
7:
while not converge do
8:
Obtain an empirical solution vxxx") to problem (3) using random initialization.
(x (x(x U (xm Im E (1,..., N \ \n, nn [xm + v(xx))) + f(x))
9:
(xx, ( unchanged for iterations then
11:
converge t True
Ph
(
(x 1//(N
13:
ET., N. Σ 1= pr
14:
Step 2: Determine if class t a BA target class or not.
15:
if ET,,, >
then
allacked 2 True; BA largets t- BA targets {1}
16:
17:
Output: attacked; BA.targets
Theorem 3.2. For any class E C with continuous sample distribution P., PMT,: - 0 as - O.
In summary, for the non-attack case with small c, we will likely have PNT,; 2 2 PMT,s: and thus, ET,, < (based on Thm. 3.1 this will be shown by our experiments. Moreover, in Apdx. B for a simplified (yet still relatively general) domain and linear prototype classifier, we show that is a strict upper bound the ET statistic when there is no BA.
2) Attack case: class (1 i) is the target class of successful BAA. Suppose vo is the BP for this attack, such that for any X P., f(X) while f(X + vo) + f(X). Intuitively, PMT, will be large and possibly close 1 because, different from the non-attack case, there is special pattern the BP Vu that could likely be an element of V. V.(X) and Ve simultaneously. for X and Y i..dd following P, In this case, Y (X) and X E TY(Y) jointly hold (i.e. mutually transferable) by Definition 3.2 Accordingly, PNT,, which is upper bounded by 1 - PArт, will likely be small and possibly close to O; then, we will have PMT,; > PNT,; and consequently, ET,, > 1 by Thm. 3.1
2
Beyond the intuitive analysis above, the following theorem gives guaranteed large ET statistic (being exactly 1) in the attack case when the backdoor pattern has (sufficiently) small norm (which in fact desired in order have imperceptibility of the attack).
-) is the target class of successful BA with BP vo such that f(X+ (x+ * f(X) for all X ~ P., and if ||vol|2 < we will have P(V.(X) (Y) A 0) 1 for X and Y i..dd following P;; and furthermore, ET, = 1.
Theorem 3.3. If class (1-1)
3.3 DETECTION PROCEDURE
Our detection procedure is summarized Alg. [ Basically, for each putative target class E C (0, 1). we estimate the ET statistic ET,,, (with a "hat" representing empirical estimation) for class
i = 1-t, and claim detection if ET,, 1. In particular, the core to estimating ET,, s,e is to estimate P(Y E T(X))X = x!"')) for each clean sample
x!! E DD used for detection (line 6-12, Alg. To do so, we propose find, for each x!!) D,, the subset Tx(x()) which contains all samples in D. xa belonging to the transferable set Tx(x!() of sample x Then, P(Y E T.(X) X x
(line 12, Alg. I. However, by Def. 3.2 a sample y is in the transferable ser T_ Tx(x) ) of sample x as long as there exists a practical solution to problem (3)
can be estimated by pm
(t) [T (
(with some intrinsie quality gap e) that induces y to misclassified as well. Thus, is insufficient
to decide whether or not sample is in the transferable set of another sample according to merely one
solution realization problem 3 To address this, for each (9) we solve problem (3) repeatedly with random initialization. For each practical solution, we embed it to all elements in D, x
and find those that misclassified these samples are included into the subset f.(x!)) (line 9,
5

---

Published as a conference paper at ICLR 2022
(c) unicolor patch (1) noisy patch Figure I: Part of the BPs used in our experiments (others in Apdx. D.3 and images with these BPs embedded. (a)-(d) are additive perturbation BPs and (e)-(f) are patch replacement BPs. BP in (a) is amplified for visualization. Spatial locations for BPs in (b)-(f) are randomly selected for each attack.
(a) chessboard (b) "L"
(c) "X"
(d) pixel
iterations. This procedure is summarized as the "while" loop in Alg. which is guaranteed to converge in (N; - x iterations. Finally, obtain the estimated ET by averaging pn. the empirical estimation of over all samples in D,
Alg. 1. Such repetition stops when Tx(x))) (t) stays unchanged for
P(Y E Tx(X)X x!!") over
Our detection framework has the following generalization capabilities. 1) BP embedding mecha- nism. As mentioned before, our detection rule can be adapted to BPs embedded by Eq 22, with the same constant threshold 2 on ET and only little modification to the while loop Alg. 1 (see Apdx. C.3 2) BP reverse-engineering algorithm. We do not limit our detector to any specific algorithm
when solving problem (3) (line Alg. [ existing algorithms proposed by, e.g.. Xiang et al. 2020); Carlini & Wagner (017). and even future BP reverse-engineering algorithms can be used. 3) Adoption for multi-class scenario. When there are multiple classes, where each can possibly be BA target, Alg. can still be used for detection by, for each putative target class E C, treating all the classes other than as a super-class and estimating ET on U In our experiments (next), will evaluate detection framework considering variety of these extensions.
4 EXPERIMENTS
Our experiments involve six common benchmark image datasets with variety of image size and color scale: CIFAR-I0. 10, CIFAR- CIFAR-100 Krizhesskk (2012). STL-10[Coats al. (20TT), TinylmageNet. FMNIST Xiao et al. (2017), MNIST Lecun et al. (1998). Details of these datasets are in Apdx. D.I
4.1 MAIN EXPERIMENT: 2-CLASS, MULTI-ATTACE BA DETECTION USING ET STATISTIC
Generating 2-class domains. From CIFAR-10, generate 45 different 2-class domains (for all 45 unordered class pairs of CIFAR- 10). From each of the other five datasets, we generate 20 different random 2-class domains. More details provided in Apdx. D.2
Attack configuration. Like most related works, we mainly focus on classical BAs launched by poisoning the classifier's 's training set with small set of samples embedded with BP and labeled to some target class Gu et al. (2019). Effectiveness of our detector against another type of clban-label BA is shown in Apdx. E For each 2-class domain generated from CIFAR-10, CIFAR-100 STL-10, and TinylmageNet, we create two attack instances, one for BA with additive perturbation BP em- bedded by Eq. 1 and the other for BA with patch replacement BP embedded by Eq. ( For each 2-class domain generated from FMNIST and MNIST, we create one attack instance with additive perturbation BF For convenience, the six ensembles of attack instances with additive perturbation BP and for 2-class domains generated from CIFAR-10, CIFAR-100, STL-10, TinylmageNet, FM- NIST, and MNIST are denoted as A₁-A6 respectively. The four ensembles of attack instances with patch replacement BP and for 2-class domains generated from CIFAR- 10, CIFAR 100, STL-10, and TinylmageNet are denoted as A7-A respectively. The BPs used in our experiments include many popular ones in the BA literature examples of some BPs and images embedded with them are shown in Fig. (details for generating these BPs are deferred Apdx. D.3).
We consider 2-class scenarios where both classes can possibly be a BA target class. For each attack instance in ensembles A, A2, A3, A7, Ag, and A we create two attacks each with one of the two classes being the BA target class. For each instance in ensembles A4, As, A6. and A9, create one attack with the second class being the BA target class. For each of these attacks, the BP is
2 IImages from these two datasets commonly have large area of "black" background, Positively perturbing few background pixels, which is common practice to achieve successful BA 1ACC al. (018). is equivalent replacing these pixels with gray patch using Eq.

---

Published as a conference paper at ICLR 2022
Table 1: Detection accuracy for RE-AP and RE-PR on attack ensembles Ai-A and on clean ensembles C1-Co. using the common threshold 1/2 on ET statistic. "n/a" represents "not applicable".
A.
A2
Aa
A4
As
Ag
Ag
Ag
Ag
Aup
C2
C2
C3
C4
C2
C.
RE-AP
45H5
18/20
16/20
17/20
20/20
20/20
w/a
n/a
a/a
w/a 45/45 2020
20/0
20/20
20/20 20/0
RE-PR
n/a
n/a
a/a
I/a n/A
a/a
43/45
20/00
19/20
19/20
39/45
19/20
2020
16/20
18/20 19/20
randomly selected from the candidate BPs (part of which are shown in Fig. [T. with the specified BP type for the ensemble which the attack is associated with. However, to avoid confusion for learning the backdoor mapping during training. for all 2-attack instances with additive perturbation BPs, we ensure that the BPs for the two attacks have different shapes (e.g., two "X" BPs are not allowed). Similarly, for all 2-attack instances where the two attacks both choose use the unicolor patch BP (Fig. Te). we ensure that the colors for the two BPs are significantly different. Other attack configurations, including e-g., the poisoning rate for each attack are detailed in Apdx. [.4]
Training configurations. We train one classifier for each attack instance using the poisoned training set. For each 2-class domain, we also train a clean classifier to evaluate false detections. We denote the six ensembles of clean instances for datasets CIFAR-10, CIFAR-100, STL-10, TinylmageNet, FMNIST, and MNIST as C,-C, respectively. For classifier training, we consider variety of DNN architectures (with two output neurons, one for each of the two classes). For 2-class domains associ- ated with CIFAR- 10, CIFAR- 100, and 100 wc use 1essNet-18He et al. 2); for FMNIST, we use VGG-11 [Simonyan & Zisserman (2013); for TinyImageNet, we use ResNett34; and for MNIST, we use LeNet-5 Lecun et al. (1998). Other training configurations including the learning rate, the batch size, and the optimizer choice for each 2-class domain are detailed in Apdx. D.5 Moreover, all attacks for all the instances are successful with high attack success rate and negligible degrada- tion in clean test accuracy these two metrics are commonly used to evaluate the BA effectiveness
Wang et al. (2020). As a defense paper, we defer these attack details to Apdx. D.5]
Detense contigurations. As mentioned in Sec. 3.3 our detection framework can be easily gen- eralized to incorporate a variety of algorithms for BP reverse-engineering to detect various types of BP with different embedding mechanisms. Here, we consider the algorithm proposed by Xiang ctt al. (2020) for estimating Additive Perturbation BPs (by solving (3)), and the algorithm proposed by Wang et al. (2019) for estimating Patch Replacement BPs (by solving (46) in Apdx. C. For convenience, we denote detection configurations with these two algorithms as RE-AP and RE-PR, respectively, Details for these two algorithms are both introduced in the original papers and reviewed in Apdx. [.6 Irrespective of the BP reverse-engineering algorithm, we use only 20 clean images per class (similar to most existing REDs) for detection. Finally, we set the "patience" parameter for determination of convergence in Alg. to r=4 - this choice is independent of the presence of BA; a larger will not change the resulting ET much, but only increase the execution time.
Detection performance (using the common ET threshold 1/2). In practice, our detector with RE- AP and with RE-PR can be deployed in parallel to cover both additive perturbation BPs and patch replacement BPs. Here, for simplicity, we apply our detector with RE-AP to classifiers (with BAs using additive perturbation BP) in ensemble Ai-A6, and apply our detector with RE-PR to classifiers (with BAs using patch replacement BP) in ensemble A7-A10- For each classifier in clean ensembles C,-C, we apply our detector with both configurations. In Tab. [ for each ensemble of attack in- stances, we report the fraction of classifiers such that the attack and all BA target classes are both successfully detected; for each ensemble of clean instances, we report the fraction of classifiers that are inferred to be not attacked. Given the large variety of classification domains, attack configu- rations, DNN architectures, and defense generalizations mentioned above, using the common ET threshold 1/2, we successfully detect most attacks with only very few false detections (see Tab. I. More discussions regarding the detection performance are deferred to Apdx. K
4.2 COMPARE ET WITH OTHER STATISTICS
The results for existing REDs applying to the attacks we created are neglected for brevity, since these REDs cannot detect BAs for 2-class domains by their design. However, compare our ET statistic with some popular types of statistic used by existing REDs in terms of their potential for being used to distinguish BA target classes from non-target classes. The types of statistic for comparison include: 1) the le norm of the estimated additive perturbation used by Xiang et al. (0200 (denoted by L2): 2) the / norm of the estimated mask used by Wang et al. (2019) (denoted by L1): and 3) the (cosine) similarity between the BP estimated group-wise and the BP estimated for each sample in terms of classifier's internal layer representation Wang et al. 2020) (denoted by CS).
7

---

Published as a conference paper at ICLR 2022
ASSCS ASGCS M44C4 J3GCS AICC
common constant ET threshold 1/2 statistic for BA target classes statistic for non-target classes
11
0.00
0.25
0.50 0.75
1.00
8.0
0.25
0.50 0.75
1000
25
50
75
100
0.6
0.0
1.0
ET
(RE-A)))
ET (RE-PR)
Figure 2: Comparison between our ET statistic (for both RE-AP and RE-PR configurations) and statistic types used by existing REDs (L,, L2, and CS). Only for ET, there is common range for all 2-class domains for choosing a threshold to distinguish BA target classes (blue) from non-target classes (orange). Such common range also contains the constant threshold 1/2 (red dashed line).
For each type of statistic mentioned above and each benchmark dataset, we consider all classifiers (with and without BA) trained for all 2-class domains generated from the dataset, and plot a double histogram for statistics obtained for all BA target classes and all non-target classes across these classifiers respectively. For example, in the 1xt column of Fig. 2 for our detector with RE-AP, we plot a double histogram for ET statistics obtained for all BA target classes and all non-targer classes from all classifiers in each of A & A2&C2, A2&C3, A4& As&Cs, and A Ag&Co. Note that all classifiers in, e.g., &C& are trained for 2-class domains generated from CIFAR-10. Here, for simplicity, for ET (with RE-AP) and 2 (both designated for additive perturbation BP), we do not consider BA target classes with patch replacement BP (c.g. associated with classifiers in A1-A10); for ET (with RE-PR), L, and CS (designated for patch replacement BP), we do not consider BA target classes with additive perturbation BP (e.g. associated with classifiers in Aς-Ag).
Based on Fig. 2 for all types of statistics including our ET, statistics obtained for BA target classes generally separable from statistics obtained for non-target classes for classifiers (with and with- out BA) trained for 2-class domains generated from the same benchmark dataset (using same train- ing configurations including DNN architecture). But only for our ET (obtained by both RE-AP and RE-PR), there is a common range (irrespective of the classification domain, attack configurations, and training configurations) for choosing detection threshold to effectively distinguish BA target classes from non-target classes for all instances; and such common range clearly includes the con- stant threshold 1/2 (marked by red dashed lines Fig. 2 derived mathematically in Sec. 3 By contrast, for both I., and L2, proper choice of detection threshold for distinguishing BA target classes from non-target classes is domain dependent. For example, in the 4th column of Fig. 2 the l norm of masks estimated for both BA target classes and non-target classes for domains with larger image size (e.g. 96 x 96 for domains in Ag&C3 generated from STL--10 is commonly larger than for domains with smaller image size (e.g. 32 x 32 for domains in A,&C; generated from CIFAR-10), The CS statistic, on the other hand, not only relies on the domain, but also depends on the DNN architecture. More details regarding CS are deferred to Apdx. D.7
In summary, all the above mentioned types of statistics are suitable for BA detection if there is supervision from the same domain for choosing the best proper detection threshold. However, in most practical scenarios where such supervision is not available, only our ET statistic with the common detection threshold 1/2 can still be used to achieve a good detection performance. Finally, in Fig. 3 we show the receiver operating characteristic (ROC) curves associated with Fig. for each of ET, L,, 12, and SC our ET statistic has clearly larger area under the ROC curve (very close to 1) than the other types of statistics.
4.3 EXPERIMENTAL VERIFICATION OF PROPERTY
We verify Property 3.1 by showing that, if a class is not BA target class, for any two clean images from the other class (considering 2-class domains), the minimum additive perturbation required to induce both images to be misclassified has a larger norm than the minimum perturbation required for each of these two images to be misclassified. Here, we randomly choose one clean classifier from each of C,-Co For each classifier, we randomly choose 50 pairs of clean images from random class of the associated 2-class domain - these images are also used for detection in Sec. 4.] For each pair of images, we apply the same RE-AP algorithm (i.e. the BP reverse-engineering algorithm
8

---

Published as a conference paper at ICLR 2022
The Peae Read
0.9281
ROC 057741
RCC
RDC 0.8897)
Raise Roctive Rane
Patie Roctive Rate
Faice Rootive
False Rosttive Pare
(a) ET
(b) L2
(c) L1
(d) CS
Figure 3: ROC curves for ET, L1, L2, and SC in distinguishing BA target classes from non-target
classes for the large variety of classification domains and attack configurations considered in Fig.
Table 2:
Maximum ET statistic over all classes for classifiers with one, two, and three attacks respectively, and a clean classifier, for CIFAR-10, CIFAR-100, and STL-10.
I attack 2 attacks
attacks
clean
Figure 4: Histogram of l2 norm ratio between pair-wise additive perturbation and maximum of the two sample-wise perturbations for each ran- dom image pair for clean classifiers.
CIFAR 10
0.91
0.92
0.87
0
CIFAR-100
0.95
0.99
0.27
STL-10
0.65
0.83
0.77
4.3e
proposed by Xiang et al. (020) for additive perturbation BPs) on the two images both jointly (to get pair-wise common perturbation) and separately (to get two sample-wise perturbationsfor the two images respectively). Then, we divide the l2 norm of the pair-wise perturbation by the maximum norm of the two sasple-wise perturbations to get ratio (which is more scale-insensitive than taking absolute difference). In Fig. 4 we plot the histogram of such ratio for all image pairs for all six classifiers the ratio for most of the image pairs greater than (marked by the red dashed line in Fig. 4. For these pairs, very likely that the perturbation estimated for one sample cannot induce the other sample to be misclassified and vise versa (otherwise their expected ratio will likely be 1).
4.4 MULTI-CLASS, AUTAI- BA DETECTION USING ET STATISTIC
Since detector inspects each class independently, it also be used for BA detection for more general scenarios with more than two classes and arbitrary number of attacks (and BA tar- get classes). For demonstration, for each of CIFAR-IO. CIFAR-I00, and STL-10, create three attack instances with one, two, and three attacks, respectively (on the original domain). Additional experiments with aggregated results are deferred to Apdx. [ due to space limitations. Here, we consider BAs with additive perturbation BPs for simplicity. The target class and the shape of BP for each attack are randomly selected. We train one classifier for each attack instance (thus, nine classi- fiers being attacked in total). More details for these attacks and training configurations are in Apdx. D.8 For each domain, we also train a clean classifier (without BA) for evaluating false detections.
Following the description the end of Sec. we apply the generalized Alg. with RE-AP to these classifiers. For CIFAR-10 and STL-10, we use three clean images per class for detection; for only clean image per class for detection. Other detection configurations including the detection threshold 1/2 are the same as in Sec. [.1 Since a classifier is deemed to be attacked if ET obtained for any class is greater than the threshold 1/2, for each classifier, we show the maximum ET over all the classes in Tab. 2 Clearly, the maximum ET is greater than 1/2 for all classifiers being attacked and less than 1/2 for all clean classifiers. Thus, our detection framework (with the same constant threshold on ET) is also applicable to multi-class, multi-attack scenarios.
C0F,R-100,
CONCLUSIONS
We proposed the first BA detector for two-class, multi-attack scenarios without access the clas- sifier's training set or any supervision from clean reference classifiers trained for the same domain. Our detection framework is based on BP reverse-engineering and a novel ET statistic. Our ET statistic can be used to effectively distinguish BA target classes from non-target classes, with a par- ticular, hreouue threshold value 1/2, irrespective of the classification domain, the DNN grounded architecture, and the attack configurations. Our detection framework can also be generalized to incorporate a variety of BP reverse-engee eeeess-engineeiing algorithms address different BP types, and be applied to multi-class scenarios with arbitrary number of attacks.
9

---

Published as a conference paper at ICLR 2022
ETHICS STATEMENT
The main purpose of this research is to understand the behavior of deep learning systems fac- ing malicious activities, and enhance their safety level by unsupervised means. The backdoor attack considered this paper is well-known, with open-sourced implementation code. Thus, pub- lication of this paper (with code released at lhttt:: /tta:://gihhui com/ zhenxi anglangal ance/ 2C1 aassssseetcttion will be beneficial to the community in defending backdoor attacks.
REFERENCES
H. Pirsiavash A. Saha, Subramanya. Hidden trigger backdoor attacks. AAAI, 2020.
N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39-57, May 2017.
B. Chen, W. Carvalho, N. Baracaldo, H. Ludwig, B. Edwards, T. Lee, I. Molloy, and B. Sri- vastava. Detecting backdoor attacks on deep neural networks by activation clustering. http://arxivvorr/abs//// 1atph////11113.1777. 1811,03728, Nov 2018.
H. Chen, C. Fu, J. Zhao, and F. Koushanfar. Deepinspect: A black-box trojan detection and miti- gation framework for deep neural networks. In Proceedings of the Joint Conference on Artificial Intelligence, IJCAI-19, pp. 4658 4664,,66,7 7 2019.
International
X. Chen, Liu, B. Li, Lu, and D. Song. Targeted backdoor attacks on deep learning systems using data poisoning. http:://aaii.orr//b///1120003030
2017.
E. Chou, F. Tramèr, G. Pellegrino, and Bonch. Sentinet: Detecting physical attacks against deep learning systems, 2018. http::://////t..orrtt
00292
A. Coates, H. Lee, and A. Y. Ng. An analysis of single layer networks in unsupervised feature learning. In AISTATS, 2011.
J. Ba D. P. Kingma. Adam: A method for stochastic optimization. In ICLR, 2015.
Y. Dong, X. Yang. Deng, T. Pang, Xiao, H. Su, and Zhu. Black-box detection of back- door attacks with limited information and data. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021.
M. Du, R. Jia, and D. Song. Robust anomaly detection and backdoor attack detection via differential privacy. In Proc. ICLR, 2020.
M. Fredrikson, S. Jha, and T. Ristenpart. Model inversion attacks that exploit confidence information and basic countermeasures. CCS, 2015.
Y. Gao, C. Xu, D. Wang, S. Chen, D. C. Ranasinghe, and S. Nepal. STRIP: A defence against trojan attacks on deep neural networks. In Proc. ACSAC, 2019a.
Z. Gao, A. Feng. X. Song, and X. Wu. Target-dependent sentiment classification with bert. IEEE Access, 7:154290-154299, 2019b.
Gu, Liu, B. Dolan Gavitt, and S. Garg. Badnets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230-47244, 2019.
W. Guo, L. Wang, X. Xing, M. Du, and D. Song. TABOR: A highly accurate approach to inspecting and restoring Trojan backdoors in Al systems. http://arxivoorgaab//10000
2019.
K. He, X. Zhang, Ren, and J. Sun. Deep residual learning for image recognition. Proc. CVPR, 2016.
K. Huang, Y. Li, B. Wu, Qin, and K. Ren. Backdoor defense via decoupling the training process. In ICLR, 2022.
10

---

Published as a conference paper at ICLR 2022
S. Kolouri, A. Saha, H. Pirsiavash, and H. Hoffmann. Universal litmus patterns: Revealing backdoor attacks in cnns. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 298-307, 2020.
A. Krizhevsky. Learning multiple layers of features from tiny images. University of Toronto, 05 2012.
Y. Lecun, L.. Bottou, Y. Bengio, and P. Haffner. Gradient- based learning applied to document recog- nition. Proceedings of the IEEE, 86(11):2278-2324, 1998.
R. Li, W. Zhang, H.-I. Suk, L. Wang. J. Li, D. Shen, and S. Ji. Deep learning based imaging data completion for improved brain disease diagnosis. In Medical Image Computing and Computer- Assisted Intervention MICCAI 2014, pp. 305-312, 2014.
Y. Li, B. Wu, Y. Jiang, Z. Li, and S.-T. Xia. Backdoor learning: A survey, 2020. URL https: 7/arxiv.
/2004. .0....46666 04692. pdf
Y. Li, X. Lyu, N. Koren, L. Lyu, B. Li, and X. Ma. Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networks. In Proc. ICLR, 2021.
Li, H. Zhong, X. Ma, Y. Jiang, and S.-T. Xia. Few-shot backdoor attacks on visual object tracking. In ICLR, 2022.
K. Liu, B. Doan- Gavit,, and S. Garg. Fine-pruning: Defending against backdoor attacks on deep neural networks. In Proc. RAID, 2018a.
Y. Liu, S. Ma, Y. Aafer, W.-C. Lee, and Zhai. Trojaning attack on neural networks. In Proc. NDSS, San Diego, CA, 2018b.
Y. Liu, W.-C. Lee, G. Tao, S. Ma, Y. Aafer, and X. Zhang. Abs: Scanning neural networks for back-doors by artificial brain stimulation. CCS, 2019.
S.-M. M.-Dezfooli, A. Fawzi, and P. Frossard. DeepFool: simple and accurate method to fool deep neural networks. Proc. CVPR, 2016.
A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant adversarial attacks. In Proc. ICLR, 2018.
D. Miller, Z. Xiang, and G. Kesidis. Adversarial learning in statistical classification: compre- hensive review of defenses against attacks. Proceedings the the IEEE, 108:402-434 2020.
S.-M. Moosavi-Dezfooli, A. Fawzi, and Frossard. Universal adversarial perturbations. In Proc. CVPR, 2017.
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recogni- tion. In /CLR, 2015.
C. Szegedy, W. Zaremba, Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. In Proc. ICLR, 2014.
B. Tran, Li, and A. Madry. Spectral signatures in backdoor attacks. In Proc. NIPS, 2018.
A. Turner, D. Tsipras, and A. Madry. 2019.
Clean-label backdoor attacks.
www.:eessiall.i......... mit. mit.t./d//mmdyyllaacclllaallllld https:/ppoople.csat wwwp:eppppl.....l.llppeeee
B. Wang, Y. Yao, S. Shan, H. Li, B. Viswanath, H. Zheng, and B.Y. Zhao. Neural cleanse: Identi- fying and mitigating backdoor attacks in neural networks. In Proc. IEEE Symposium Security and Privacy, 2019.
R. Wang, G. Zhang, S. Liu, P.-Y. Chen. J. Xiong, and M. Wang. Practical detection of trojan neural networks: Data-limited and data-free cases. In Proc. ECCV, 2020.
Z. Xiang, D.J. Miller, and G. Kesidis. benchmark study of backdoor data poisoning defenses for deep neural network classifiers and novel defense. In Proc. IEEE MLSP, Pittsburgh, 2019.
11

---

Published as a conference paper at ICLR 2022
Z. Xiang, D. J. Miller, and G. Kesidis. Detection of backdoors in trained classifiers without access to the training set. IEEE Transactions on Neural Networks and Learning Systems, pp. 1-15, 2020.
Z. Xiang, D. Miller, S. Chen, X. Li, and G. Kesidis, A backdoor attack against 3d point cloud clas- sifiers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 7597-7607, October 2021a.
Z. Xiang, D. Miller, and G. Kesidis. Reverse engineering imperceptible backdoor attacks on deep neural networks for detection and training set cleansing. Computers and Security, 106, 2021b.
Z. Xiang, D. Miller, H. Wang, and G. Kesidis. Detecting Scene-Plausible Perceptible Backdoors in Trained DNNs Without Access to the Training Set. Neural Computation, 33(5):122-1137,, 2021c.
H. Xiao, K. Rasul, and R. Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017. URL http:::///xxiv..r//bbbbaoee
H. Xu, Y. Ma, H.-C. Liu, D. Deb, Liu, J.-L. Tang, A. K. Jain. Adversarial attacks and defenses in images, graphs and text: A review. International Journal of Automation and Computing, 17: 151-178, 2020.
X. Xu, Q. Wang. H. Li, N. Borisov, C. A. Gunter, and B. Li. Detecting Al Trojans Using Meta Neural Analysis. In Proc. IEEE Symposium Security and Privacy, 2021.
Zhai, Y. Li, Z. Zhang, B. Wu, Y. Jiang, and S.-T. Xia. Backdoor attack against speaker verification. In ICASSP, 2021.
H. Zhong, C. Liao, A. Squicciarini, S. Zhu, and D.J. Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. Proc. CODASPY, 2020.
12

---

Published as a conference paper at ICLR 2022
A PROOF OF THEOREMS IN THE MAIN PAPER
A.1 PROOF OF THEOREM 3.1
For random variables X and Y i.i.d. following distribution P, for any realization x of X, we have
P(Y (x))) P(Y E Tx(X) X x) E[[ TT(X)) = (8)
Thus, ET, the left hand side of Eq. ( can be written
E B[P T(())X) B[I(Y E T((XI] = P(Y TT())
(9)
Based on the inclusion-exclusion rule
P(Y E (X))) + P(X & T(()) = 1 PMT.f PNT,
(10)
Since, and are i.i.d. random variables, P(Y E T(())) = P(X E TY())); thus, we get Eq. (6
A.2 PROOF OF THEOREM 3.2
Step We show that for any C and X, Y i.i.d. following distribution P. X E T((Y) and (Y) Y E (X. if and ( $ D.
(a) (X). (V) + 0, there exists v such that (X()) and v E V:(Y). By Definition 3.1
v VX)) = f(X +v) # f(X)
(11)
v VEV.Y) = f(Y + v) + f(Y)
(12)
Then, by Definition 3.2 the existence of such v yields X E TY( and Y E Tx()).
(b) We prove the "only if" part by contradiction. Given X T and Y E Tx()), suppose
V. (X))), (Y) By Definition 3.2 Y E (X()), there exists E V. (X) such that J(Y +v) +
J(Y). Since V. (X) (X)nV. = 0. V. (Y): hence, by Definition 3.1
l|vl22 ||v*(())l2 >
(13)
Similarly, there exists v' E VY( such that /[X + v') * S(X) and v' (X(;;; hence
||v|||a [|]v(())] >
(14)
By Definition 3.1 for all u E VY ).
| (Y) < Thus, we have
|| ||v > ||u||2 - [|
(15)
and accordingly ||v||2 > ||u| l2 for all u E V. Similarly, for u' E VX(X), we have
||v 1lv (X) ||u'|l2 -|v|2=I
(16)
and thus, ||'l12 ||u'||2 for all u' (X). Clearly, there is contradiction since there cannot exist an element in one set having a larger norm than all elements in another set while vise versa; and therefore, V. (X) (Y) #
Step 2: We show that the upper bound for PMT,; goes to when c -> 0. Note that e is the "quality gap" between the practical solution and the optimal solution.
Note that by Definition 3.1 (X(X) n (Y) + 0 only if [|lv
(Y)) S e; also based
on Step 1:
PMT.: ((V.(X) (V 0) (X)2
< c).
(17)
For X following continuous distribution P., | (X) [l also follows some continuous distributior on (0, +oc). Since X and Y are i..dd., the right hand side of Eq. 17 goes to 0 as 0.
One can construct very extreme cases such that P(Ilv (X)Il2 = d) > 0 for some constant > 0. In other words, there is set of samples from class i with non negligible probability that are equal distant to the decision boundary. However, the probability for these cases is zero for practical domains and highly non-linear classifiers.
13

---

Published as a conference paper at ICLR 2022
A.3 PROOF OF THEOREM 3.3
For any X ~ P., since vo satisfies S(X vo) + f(X) and
||vol22
< 51voll2
(18)
Vo E (X( by Definition 3.1 Thus, Vo E (X) (Y) for and Y i.i.d. following P3 and
((V(() n V (Y) * 0) = 1.
(19)
Thus, based on Step 1 (and Eq. 6 can be written as
17 in Apdx A.2 have PMT 1. Since PMT PNT 1, Eq.
ET, 2 +
PMT + PMT)) = PMT 2 2
(20)
Then we have
ET. 1.
(21)
B ANALYSIS ON A SIMPLIFIED CLASSIFICATION PROBLEM
In this section, consider simplified analogue to practical 2-class classification problems. Al- though assumptions are imposed for simplicity, we still keep the problem relatively general by al- lowing freedom on, e.g., the sample distribution in their latent space. With the simplification, are able to analytically derive the condition for a sample belonging to the transferable set of another sample from the same class. Based this, show that is the supremam of the ET statistic for this problem when there is no attack. Note that we will abuse some notations that appeared in the main paper, the notations in this section are all self-contained.
B. PROBLEM SETTINGS
We consider sample space Rn with orthonormal basis {ar,,... Old: BI. Bn-aj. We assume that samples from the two classes are distributed on sub-spaces Vo = {Aclc E Rd) and Vi (Bele E [=-") respectively, with A [aa..... aaa) and B [B.... of Vo and V1, we have also defined the latent spaces, i.c. Rd and Rn-d, - for the two classes. Here, do not constrain the form parameters of the distributions for the two classes in both the sample space IR" and latent spaces, as long as the distributions are continuous. Such an analogue may be corresponding to some simple classification domains in practice. Moreover, the latent space may be corresponding to an internal layer space of some deep neural network (DNN) classifier. For example, for typical ReLU DNN classifier, it is possible that subset of nodes in the penultimate layer are mainly activated for one class, while another subset of nodes are mainly activated for the other class.
Bn-d). By the definition
For this simplified domain, we consider a nearest prototype classifier that is capable of classifying the two classes perfectly for any continuous sample distributions. To achieve this, any point R on the decision boundary of the classifier should have equal distance to Vo and V,, i.e.:
IAA x - x||2 [BBBxx x||2
(22)
By expanding both sides of Eq. 22 and rearranging terms (using the fact that ATA B'B = 1), we obtain the decision boundary the classifier, which is {x E R' [ BBT x 0}. In other words, the classifier R {0, 1} is defined by
I and
00 x(AAT BB*)x>0
f(x)
[1 x(AA" BB")x
(23)
Note that this classifier is not necessarily linear; and the region for each class may not be convex.
B.2 DERIVATION OF TRANSFER CONDITION
We derive the condition that one sample belongs to the transferable set of another sample from the same class. Since the two classes symmetric, focus class 0 for brevity. Moreover, in this section, we refer to samples by their latent space representation; i.c., instead of sample x e R from class 0", we use "a sample E RRd
14

---

Published as a conference paper at ICLR 2022
First, we present the following modified definition of the transferable set (compared with Def. 3.2 in the main paper) using latent space representation.
Definition B.I. (Transferable set latent space) The transferable set for any sample e Rd from class 0 is defined by
T(c) ( ((vc
(24)
where (c) is the optimal solution to
minimize ||v|22
subject to s(Ac+ vv # f(Ac).
(25)
vER"
Note that the above definition is in similar form Def. 3.2 in the main paper, though here, the quality to the solution to problem (25) is no longer considered. This is because, different with
problem (3) in the main paper (which is the prerequisite of Def. 3.2, s problem (25) here can be
solved analytically, yielding close form solution instead of a solution set with some intrinsic quality
bound Accordingly, we present the following theorem, which gives the condition for one sample belonging to the transferable set of another sample from the same class.
Theorem B.I. For any c, c' E R.d c' E T(()) if and only if ||c' - cc/21l2 S 11c/2112.
Note that E IR can be decomposed (using the orthonormal basis specified by and B) as Av. + Bv; with V. E gd and V, E g=-d We substitute this decomposition into the constraint of problem (25). In words, the constraint means that v induces Ac to be (mis)classified to class I; thus, according to the expression of the classifier in Eq. 23 the constraint can be written
Proof. First, derive the solution problem 25
(Ac + Ava + Bv:))(AAT BBC) Av. + Bvs) S 0.
(26)
Expanding the left hand side of the above inequality and using the fact that A AT' 0 for simplifi- cation, get a much simpler expression of the constraint:
|| + c||2 <
|/v]|22-
(27)
Thus, a lower bound of the (square of the) objective to be minimized in problem 25 can be derived as
|| = ||vv, + Bv, 1 llv.l2 2 + lv l|v Iv. cc
(28)
with equality holds if and only if l|vol12 l|v. + c|l, i.c. Ac on the decision boundary of the classifier. Note that the right hand side of the inequality above is minimized when 2. Then, the optimal solution v*(c)= (v) + Bvī(cc) to problem (25 satisfies:
va(c) = 2' |ella [|v[())l22
(29)
Next, for any c, Rd, we derive the condition for e' T(c). Since f(Ac) = fAA) is already satisfied, by Def. B.I c' E T(c) if and only if f(Ac' + (c)) # f(Ac), which is equivalent to (by Eq.
(Ac' (CA) BBT) vc(c) s
(30)
Using the decomposition of (c), expanding and rearranging terms on the left hand side of the above, obtain
cTT + vc (c( vi(()) (c vi + 2c 2cTTv s 0.
(31)
With the optimal solution in Eq. 229 substituted in, get
(c'c 50,
(32)
or, equivalently
||e' - cc/21/2 < ||c/2|12
(33)
n
15

---

Published as a conference paper at ICLR 2022
B.3 UPPER BOUND ON ET STATISTIC
In this section, we show that is the minimum upper bound on the ET statistic for this problem when there no BA. To do so, We first present definition of ET statistic modified from 3.3 in the main paper, merely in adaption to the latent space representation used here (see Def. [.2). Then. we show the tightness of the bound by giving a concrete example where ET equals 1 in Lem. B.1 Finally, we prove that the ET statistic cannot be greater than 1
Definition B.2. For i.id. random samples C and C' following some continuous distribution G' on RR the ET statistic is defined by
ET Ec-c |P(C' E T(C)CC)
(34)
Lemma B.1. For latent space Id with dimension and distribution G continuous on E, the ET statistic satisfies
S ET S 2'
(35)
where ET if and only if G(0) = 0 or ((0) =.
Proof. Based on Thm. B.1 for latent space dimension d = 1 and two scalar
f i.i.d. random samples
C' and C" with continuous distribution G. C' T(C) if and only if |C" C72| S |C/2]. Thus, by
Def. B. we have
C
C
C
c
ET (d-1) = EEwoll((
+
2 G
2
2
2
IG( c
+ 2
ld
-
ld|
)o(())dc
2
2
1 (G(c) - G(0]g(cdd
(G(0) ()())(((e
(36)
G(0)
[ (G(c) G(O))G((c)
(G(0) G(c))G(c)
G(0)² L G(0)²
, 11 11100=*+11-00000100
G(O)
1 G(0) +
2
where g() the density function of distribution G. Note that the last line of Eq. (36) strictly
in the interval [1 2] for G(.) in range [0. 1]. The upper bound of ET when d = 1 2. which is
achieved if and only if (0) = 0 or G(0) =
Theorem B.2. For arbitrary d 24 and continuous distribution G on Rd
1
sup 4,G
ET
(37)
2
Proof. By Lem. B.1 there exists d = and G(0) = 0 or G(0) = 1, such that ET = 3.. Here, we only need to show that ET < & for any d and G. Again, by the definition of ET (Def. B.2 and Thm. B. we can write ET as
ET Ec-o [PlJIc- - C -ll < 2
[
[b]]c]
C
(38)
for C and C' i.i.d. following distribution G. Similar to our proof of Thm. 3.1 in Sec. A.I
C ll2 s
C
P([[C' - 2
= Eowa [IlIC'
(12)
C
= c]
(39)
2
2
Thus, based on Eq. (38 and
39
ET can be written as
ET = Ec HI
[
C ll2 <
C [1 = P([IC' - 112 <
C
2 l12)
(40)
2
2
2
We do bald C. but instead, since is given as scalar random variable.
16

---

Published as a conference paper at ICLR 2022
Since C and C' are ii.d,
C
C'
C²
P(ICC - 2
122
S
2
(2)
= P(IIC
la
2 12)
(41)
2
2
2
Also note that for continuous distribution
C
C
C²
C'
P(IIC'
la
2
C
112
112)
2
2
2
C
C'
C
C'
P
12 +
||C
11
11
+
(42)
2
2
= =P[IC
c <
=0
Then, by the inclusion-exclusing rule
C
C 2
C²
C²
P(IIC'
$
(22) +
+(1IC-
P([IC
-
112)
2
(43)
C
C
C¹
C²
P(IIC'
112
2, ||C
2
(2) s 1,
2
Substituting Eq.
and (42) into Eq.
we have
C
C
1
P(ICC'
2
(22
(44)
2
2
thus, by Eq. (40p
ET
(45)
2
which finishes the proof.
C USING ET TO DETECT BA WITH PATCH REPLACEMENT BP
In the main paper, we have described our detection framework in details considering additive pertur- bation BPs embedded by Eq. (I) In fact, our detection framework is not specific any particular backdoor embedding mechanism. In this section, we repeat our derivation and analysis in Sec. 3 by considering patch replacement BPs embedded by Eq. (2). Basically, the definitions, theorems and algorithms presented in this section are matched with those in the main paper they are under the same framework which is generally independent of the backdoor pattern embedding mechanism.
Like the organization of Sec. 3 in this section, we first introduce several definitions related to ET but for patch replacement BPs these definitions are similar to those in the main paper and are customized to patch replacement BPs. Especially, the ET statistic is defined in the same f'ashion as Def. 3.3 of the main paper. Then, we show that the same constant detection threshold 1 on the ET statistic for detecting BAs with with additive perturbation BPs can be used for detecting BAs with patch replacement BPs as well. Finally, we present the detailed procedure of our detection for patch replacement BPs (as the counterpart of Alg. of the main paper). Again, this section be viewed as an independent section, where the notations are self-contained.
C.1 DEFINITION OF ET FOR PATCH REPLACEMENT BP
Consider the same classifier ʃ X + to be inspected (as in the main paper) with the same label space C = {0, 1} and continuous sample distribution P. on X' for class i E C. For any sample x from any class, the optimal solution
minimize ||m||
subject f(A (x: m. u)) # f(x)
(46)
s=(m,u}
defined as s" (x) = (mm(x) u² (x)). where ( m, u) = (1 1 m) O m u is an alternative expression to the patch replacement embedding formula in Eq. 2 (for notational convenience only). Again, m E M is the binary mask and u E X' is the patch for replacement.
Existing methods for solving problem (46) including the one proposed by Wang et al. (201)), where, again, the practical solutions are usually sub-optimal. Thus, similar to Def. [.1 in the main paper, present the following definition in adaption to patch replacement BPs.
17

---

Published as a conference paper at ICLR 2022
Definition C.I. (e-solution set for patch replacement BPs) For any sample x from any class, regardless of the method being used, the e-solution set to problem (46), is defined by
(x) A {(m, u) ||||||||| m (x)]I I c, f(A m, u)) * fxx).
(47)
where E >> 0 is the "quality" bound of the solutions, which is usually small for existing methods.
Similar to Def. 3.2 in the main paper, we present the following definition (with abused notation) for the transferable set for patch replacement BPs.
Definition C.2. (Transferable set for patch replacement BPs) The transferable set for any sample x and > 0 is defined by
(x) (y E x (xxx)({)))))) u) E S.(x) (( # f(y)).
(48)
Finally, we present the following definition of the ET statistic for patch replacement BPs, which looks exactly the same Def. 3.3 in the main paper. However, here, the definition of the trans- ferable set has been customized for patch replacement BPs. Even though, the similarity between these definitions and their counterparts in the main paper has already highlighted the generalization capability of our detection framework.
Definition C.3. (ET statistic for patch replacement BPs) For any class i E C = {0, 1} and considering i..d, random samples X, Y Pss the ET statistic for class is defined by ET,, A ([Y(Y E [x)
C.2 DETECTING BA WITH PATCH REPLACEMENT BP USING ET
For the ET statistic for patch replacement BPs defined above, the same constant detection threshold 2 can be used for distinguish BA target classes from non-target classes. The connection between the ET statistic for patch replacement BPs and the constant threshold is established by the same Thm. 3.T in Sec. 3.2 of the main paper with the same proof in Apdx. A Thus, these details are not included here for brevity. Note that PMT,, and PNT.; for class i are defined in the same way as Thm. 3.1 though the transferable set Te (x) is customized for patch replacement BPs in the current section this is the main reason why we abuse the notation for the transferable set for patch replacement BPs in Def.
In the following, like in Sec. 3.2 of the main paper, discuss the non-attack case and the attack case respectively. Readers should notice that the theorems (and the associated proofs) and discussions similar to those in the main paper. Such similarity further highlight the generalization capability of our detection framework.
Non-attack case. Property 3.1 from the main paper is also applicable here. That is, if class (1 i) where i E C = {0, 1} is not BA target class, PNT,, for class i will likely be larger than }
Similar to our verification of Property f.r for additive perturbation BPs in Sec. 4.3 of the main paper, we verify Property 33. for patch replacement BPs in Apdx. F Using similar protocol as in Sec. 4.3 of the main paper, we show that the common mask with the minimum-norm required for two sample to be misclassified usually has a larger norm than mask with the minimum-norn required for each of them.
As for PArT. again, Thm. 3.2 from the main paper is also applicable here, but with slightly differ- ent proof (shown below) adaption to the modifications to the definitions for the patch replacement BPs in Apdx. C.I
Proof. Step 1: Similar to the proof in Apdx. A.2 We show that for any E C and X, Y i.id following distribution P,, E TY(Y) and Y E T((X) if and only if
(a) If (X) + 0. there exists s such that E (X) and E SYY. By Def. C.1
S > ((A(X; m, u)) # S(X)
(49)
S S = f(A(Y; u)) 4 f(Y)
(50)
Then, by Definition
C.2 the existence of such yields X E TYYY) and Y T((X..
18

---

Published as a conference paper at ICLR 2022
(b) We prove the "only if" part also by contradiction. Given X E TY() and Y E Tx()), suppose S. (X) n = By Definition C.2 Y E Tx(X), there exists s = (m, u E ( such that
f(A u)) f(Y). Since S,
n S (Y) 0, such & S. (Y);; hence, by Definition C.1
m - m (Y) >
(51)
Similarly, there exists s' = {m', u'} S.Y) such that f( (X: + f(X) and s' & Sx())
(since it is assumed that S. (X) n (Y) = 0); hence
|m ||| -I]mm(X]]l
(52)
By Definition C.I for all $ = (m, i} E (Y)). ||lس|||
m (Y)ll < c. Thus, we have
|m||| m² (Y) || |mmm (Y)ll
(53)
and accordingly ||m]] 1 >
[m/p for all $ E S. (Y). Similarly, for all = {m', ú') E S.(X), we
have
m'1l1 ||m (x) 1 i |lmm(((]
(54)
and thus, ||m||| > ||m'| for all s' E (X).. Clearly, there a contradiction since there cannot exist an element in having larger norm than all elements in another set while vise versa; and therefore, (X) n (Y) + 0.
Step 2: We show that the upper bound for PMTR goes to 0 when e -
Note that by Definition C.1 8,(X) * 0 only if [|]||| ||m (Y)lhi S e; also based on Step 1:
PMT,
0) < P( [P|||mm (X)]|: || (Y)Il c).
(55)
For X following continuous distribution P., m (X) also follows some continuous distribution (0, to)). Since X and Y are iid., the right hand side of Eq. (55) goes to 0 as e -
Based on the above, we have reached the same conclusions for patch replacement BPs as in the main paper. That is, for the non-attack case, we will likely have PNT,A 2 PMIT, and consequently, ET, I 2 based on Thm. 3.1
Attack case. For class E c f0, 1}. we consider a successful BA with target class (1 -1-)). 1). The BP used by the attacker is specified by So {mo, uo} with mask ma and patch ug. Thus, for any X ~ P. due to the success of the BA, f(X) = i and f(A(X; mo Un)) ) # f(X). Similar to our discussion in the main paper, So will likely be common element in both S. SX( and (Y) for X, Y i.i.d. following P.. For the same reason, in this case, the ET statistic will likely be greater than 1
Similar to additive perturbation BPs, for patch replacement BPs, we also have a guarantee for large ET statistic (ET,,, = 1) when the mask size of the BP used by the attacker is sufficiently small. Such property is summarized in the theorem below.
Theorem C.1. If class (1 2) it the target class of BA with patch replacement BP so = (mo. un) such that |molll S c, we will have (X) n SY * () = 1 for X and Y i..d. following P;; and furthermore, ET,, 1.
Proof. For any X P,, since so = (mo, un} satisfies f(A(X; mo, uo)) # f(X), and also because
| |mmmmXX (X)Il < ||moll S,
(56)
by Definition P;; and
C.1 we have Sp E (X)... Thus, So E (X) nY. for x and i.d. following
(XS.(X) (Y) + 0) -
(57)
The rest of the proof (showing that ET,, = 1 for this attack scenario) is exactly the same as the proof of Thm. 3.3 shown in Apdx. A.3 thus is neglected here.
n
19

---

Published as a conference paper at ICLR 2022
Table 3: Details of CIFAR-IO, CIFAR-100, STL-10, TinylmageNet, FMNIST, MNIST datasets.
Color
Image size
# Classes
# Images/class
Training images/class
CIFAR-10
32 32
10
6000
5000
CIFAR-100
/
32 x 32
100
600
500
STL-10
/
96 x 96
10
1300
500
TinyImageNet
V
64 X 64
200
600
500
FMNIST
28 x
10
7000
6000
MNIST
X 28 x 28
10
7000
6000
C.3 DETECTION PROCEDURE PATCH REPLACEMENT BP
The procedure, i.e. Alg. i the main paper, be used for detecting BAs with patch replace- ment BP, with only the following two modifications. We only need to first replace line of Alg. by:
"Obtain an empirical solution s(x!.) (mx(x))) ú i(xx))) to problem (6) using random initial- ization."
and then change line 9 of Alg. to:
"Tx().))) (xx, (8) {xx f1, N n. ((((x) m mxxx") ú(x; (i) ())
f )).
Such a simple "module- based" modification allows our detection framework to be applicable to variety of BP embedding mechanisms, which again, shows the generalization capability of our detection framework.
D DETAILS OF EXPERIMENT SETTINGS
D.1 DETAILS OF DATASETS
Our experiments are conducted on six popular benchmark image datasets. They are CIFAR-10, CIFAR- 100 Krizhevsky (2012), STL-10 1TL-10Coottes
al. (201T), TinylmageNet, FMNIST Xiao et al. (217)) and MNIST Lecun et al. (998). All the datasets are associated with the torchvision pack- age, except for that STL- 10 downloaded from the official website https: c/s stanford. edu/-acoat st 1107 Though the details of these datasets can be easily found online, we summarize them in Tab. 3
D.2 DETAILS FOR GENERATING THE 2- 2-CLASS DOMAINS
In Sec. 4.1 we generate 45 2-class domains from CIFAR-10, and 20 2-class domains from each of CIFAR R- -000 STL-10, TinylmageNet, FMNIST, and MNIST. Here we provide more details about how these 2-class domains generated.
As mentioned in Sec. for CIFAR-IO, the 45 2-class domains are corresponding to the 45 un- ordered class pairs of CIFAR-10 respectively. For each of CIFAR-100, FMNIST, and MNIST, randomly sample 20 unordered class pairs, each forming a 2-class domain. For TinylmageNet, due high image resolution and data scareity, we generate 20 "super class" pairs for each pair, randomly sample 20 classes from the original category space and then evenly assign them to the two super classes (each getting 10 classes from the original category space). Similarly, for STL-10 with 10 classes, we generate 20 super class pairs by randomly and evenly dividing the 10 classes into two groups (of 5 classes from the original category space) for each pair. For each generated 2-class domain, we use the subset of data associated with these two (super) classes from the original dataset, with the original train-test split.
D.3 DETAILS BPS
In this paper, consider both additive perturbation BPs embedded by Eq. T and patch replace- ment BPs embedded by Eq. ( that are frequently used in existing backdoor papers. Despite the BPs (with images embedded with them) illustrated in Fig. Tin in the main paper, here, in Fig. 5 we show
20

---

Published as a conference paper at ICLR 2022
(a) "static" pattern
(b) chessboard patch
cross
(d) square
Figure 5: BPs used our experiments that are not shown in Fig, of of the main paper due to space limitations; and images with these BPs embedded. BPs in (a) and (b) are amplified for visualization.
the BPs used in experiments that not included in the main paper due to space limitations. In the following, we also provide details for each of these BPs (in both Fig. and Fig. 5
First, we provide the details for all the additive perturbation BPs. The "chessboard" pattern in Fig. la a "global" pattern that has been used by Xiang et al. (2020). Here, one and only one of two adjacent pixels are perturbed positively by 3/255 in all color channels. Another global pattern is the "static" pattern in Fig. 5a considered by both Zhhng et al. (2020); : Xiang et al. (2021b). For pixel indices starting from 0, a pixel (i,j) is perturbed positively if and only if and are both numbers. Again, the perturbation size is 3/255 for all pixels being perturbed.
Other additive perturbation BPs all "localized" patterns. The "L" pattern in Fig. lb and the "X" pattern in Fig. Ic have been used by both Tran et al. (2018) and Waag et al. (2020). For the "L" pattern, we perturb all the color channels by 50/235. For the "X" pattern, for each attack, we randomly choose a channel (for all images to be embedded in for this particular attack) and perturb associated pixels positively by 50/255. The "pixel" BP in Fig. [d has been used by Tran et al. (2018); Chen et al.) (2018). where a single pixel is perturbed in all channels by 50/255 for color images and 70/255 for gray-scale images. The "chessboard patch" pattern in Fig. [5b] the "cross" in Fig. 5c and the "square" in Fig. 5d have all been previously considered. For the cross and the chessboard patch, the perturbation sizes for each pixel being perturbed are 50/255 and 5/255, respectively; and perturbation is applied to all channels. For the square pattern, randomly selected for each attack and the perturbation size 50/255. The spatial location of all these localized patterns randomly selected over the entire image (and fixed for all images be embedded in) for each attack. Only for gray-scale images, the pixels being perturbed are restricted of the four corners, such that these pixels will likely be black (with pixel value close 0) originally.
channel is
Next, we provide the details for the two patch replacement BPs considered in our experiments. The BP in Fig. Tel is a small, monochromatic patch located near the margin of the images to be embedded in. Similar BPs have been considered by Gu al. (2019) and Wang et al. (2019). The color is randomly chosen and fixed for each attack. The BP in Fig. Lf is small noisy patch located near the margin the images be embedded in. Similar BPs have been considered by Turner al. (019) and A. Saha (2020). For both BPs, once the location is selected, the same location will be applicd to all images to be embedded for the same attack. Also, for both BPs, the size of the patch is 3 for the 2-class domains generated from CIFAR-10 and CIFAR-100; 4 x 4 for the 2-class domains generated from TinyImageNet; and 10 x 10 for the 2-class domains generated from STL-10.
D.4 OTHER ATTACK CONFIGURATIONS
In the main paper, we defined a "code" for each ensemble of attack instances based on both the type of BP being used and the dataset from which the associated 2-class domains are generated. Here, summarize these codes in Tab. 4 for reference. Also in the main paper, have described most of the attack configurations for the attacks instances in each ensemble. For some ensembles, each attack instance associated with two attacks, each with one of the two class being the target class. Also, the BPs used by the two attacks, though of the same type, are guarantced to sufficiently different in shapes (for additive perturbation BP) colors (for patch replacement BP). For other
21

---

Published as a conference paper at ICLR 2022
Table Short hand "code" for each ensemble of attack instances based on both the BP being used and the dataset where the associated 2-class domains are generated from. "n/a" represents "not applicable".
Additive perturbation BP
Patch replacement BP
CIFAR-10 CIFAR-100
A1
A7
A2
Ag
STL-10
Ag
A9
TinyImageNNi FMNIST
A4
Ajo
As
n/a
MNIST
A6
n/a
Table 5: Summary of attack configurations for instances in each of ensembles Ai-A1o- For each ensemble, we show the number of attacks for each instance in this ensemble. We also show, for each ensemble, the number of samples (embedded with BP and labeled to the target class) used for poison the training set for each attack associated with this ensemble, poisoning rate. Poisoning rate is defined as the number of samples inserted into the training set by the attacker divided by the total number of training samples from the target class after poisoning.
well as the corresponding
A
A2
A3
A4
As
A6
A
A8
A9
A1o
# Attacks
2
2
2
1
1
2
# Poison
500
150
1000
1500
1000
1000
500
50
750
500
samples
Poisoning rate
9.1%
23.0%
28.6%
23.0%
14.3%
14.3%
9.1%
9.1%
23.1%
9.1%
ensembles, there is only one attack for each attack instance. Here, we provide a summary for these configurations in Tab. [ Also, in Tab for attack instances in each ensemble, we summarize the number training samples embedded with the BP and labeled to the target class that are used for poisoning the classifier's 'ss training set for the associated attacks.
D.S TRAINING DETAILS
Here we provide the training details that are not included in the main paper due to space limita- tions. For each generated 2-class domain, we use the same training configuration irrespective of the existence of BA. In Tab. 66 we show the training details including learning rate, batch size, number of epochs, whether not using training data augmentation, choice of optimizer (Adam P. Kingmal (2015) or stochastic gradient descent (SGD)) for 2-class domains generated from CIFAR-10, 10, CIFAR-TOO, STL-110, Nmte FMNIST, and MNIST, respectively. Training data augmentations for 2-class domains generated from TinylmageNe include random cropping and ran- dom horizontal flipping these augmentations are helpful for the backdoor mapping be learned without compromising the classifier's accuracy on clean test samples. Otherwise, we may not easily produce an effective attack to evaluate the performance of our defense.
We also show the effectiveness of the attacks we created for evaluating our defense. Commonly, the effectiveness of BA is evaluated by attack success rate (ASR) and clean test accuracy (ACC) (iaag et al. (2020): Wang et al. (2020). ASR is defined (for each attack) as the probability that a test image from the source class (mis)classified is defined (for each classifier being attack regardless of the number of attacks) the classification accuracy on test samples with no BP. our experiments, we evaluate ASR and ACC using images from the test set associated with each 2-class domain these images are not used during training. For each attack instance, we evaluate ASR for each attack (since there can be either one attack or two attacks with different BA target class) separately. In Tab. 77, for each of ensembles Ai-A1o, show the average ACC for the classifier being attacked over all instances the ensemble; we also show the mean and minimum ASR over all attacks of all instances in the ensemble. As reference,
the target class of BA when the BP is embedded. ACC
22

---

Published as a conference paper at ICLR 2022
Table Training details, including learning rate, batch size, number of epochs, whether using training data augmentation, choice of optimizer (Adam D. P. Kingma (2055) or stochastic gradient descent (SGD)), for 2-class domains generated from CIFAR-IO, CIFAR-100, STL-10, Tinylma- geNet, FMNIST, and MNIST, respectively.
Learning rate
Batch size
# Epochs
Data augmentation
Optimizer
CIFAR-10
0.001
32
Adam
CIFAR-100
0,001
32
150
X
Adam
STL-10
0.001
128
150
X
Adam
TinyImageNet
0.001
128
150
V
Adam
FMNIST
0.01
256
100
X
SGD
MNIST
0.01
256
100
SGD
Table Average clean test accuracy (ACC, percentage) over all classifiers being attacked, average and minimum attack success rate (ASR, in percentage) over all attacks, for each of ensemble Ai-A10 of attack instances.
A
Aa
Aa
A4
As
As
A
A₃
Ag
Ajo
(werrage)
95.7.13.6
91.611455
98.8=1.0
93,91288
96.8133.3
99.8:10.4
99.2411.1
96.42:
97.9114
94.5144.6
82,3
95.9
87.6
98.4
92.5
82.0
83.2
(minimum)
ACC (average)
94.6:14.2
90.7:4.55
79.6=2.9
77.023.2
99.0111
99.810.1
96.742.5
93.224.1
78.7234
77.243.
in Tab. 8 for each of ensemble Cj-C, of clean instances, show the average ACC over all the clean classifiers for the ensemble. Based on the results in both Tab. and Tab. g the attacks we created successful with high ASR and almost no degradation in ACC.
D.6 BP EOVVERSE-ENGINEERIN ALGORITHMS
In the main paper, we evaluate our detection framework with two BP reverse-engineering algorithms, which are denoted RE-AP and RE-PR, respectively. RE-AP proposed by Xiang al. (2020) for reverse-engineering additive perturbation BPs. The general form of RE-AP estimates a common perturbation that induces group images be misclassified is single image in such a group, and when there are only two classes, the optimization problem solved by RE-AP reduced to (3). To solve this problem for some target class C and image X' from the class other than RE-AP minimizes the following surrogate objective function:
common target class. When there
Lar(v) - log p(ix v),
(58)
using gradient descent with initialized from O, until the constraint of (3) is satisfied. Here, p(ixx) denotes the classifier's posterior class give any input sample x E The step size for minimiza- tion is set small to ensure good "quality" for the solution; otherwise, the resulting perturbation may have a much larger norm than the minimum norm perturbation required inducing a misclassifi- cation. Moreover, for each domain and each classifier to be inspected, choosing proper step size can be done based on the norm the solution and without any knowledge of the presence BA.
Another BP wwerse-engineering algorithm, RE-PR is proposed by Wang et al. (2019) for patch replacement BPs. Similarly, RE-PR solves problem (46) in Apdx. C.I] which is the counterpart of problem (3) for patch replacement BPs. Formally, for some target class E C and image X from the class other than i, RE-PR minimizes the following surrogate objective function:
(PR u) = - log p A m, u)) + Al|m||i
(59)
using gradient descent, where À is the Lagrange multiplier and A (x; m, u) is the alternative expres- sion to Eq. 2 see the description below Eq. (46)) for patch replacement BP embedding.
23

---

Published as a conference paper at ICLR 2022
Table Average clean test accuracy (ACC, in percentage) over the classifiers for the clean instances in each of ensemble C₁-Cs.
C₁
C2
C3
C4
C5
Cs
ACC (average)
95.413.6
93.3+3.3
80.513.2
78.243.0
99.3+1.0
99.810.1
D.7 LIMITATIONS OF THE COSINE SIMILARITY STATISTIC IN BA DETECTION
In the main paper, we compared our ET statistic with other three types of detection statistics in- cluding a cosine similarity (CS) statistic proposed by Wang et al. (2020). As important work addressing unsupervised backdoor detection without access to the training set, this method can ef- fectively detect backdoor attacks when their are multiple classes with only few of them are backdoor target classes.
For general classification domains with arbitrary number of classes, the CS statistic is obtained for each putative target class E C as following. First, a common (patch replacement) BP is estimated to: a) induces group of images from classes other than to be misclassified in untargeted fashion (i.e., to any class other than their originally labeled classes); b) not induce any class images to be misclassified; and e) have small mask size (measured by 1 norm) possible. Accordingly, Wangg ct al. (2020) proposed to minimize the following loss:
LCsc(m,
Σ xECYEXED
Σ
max (x; u)) - max h2 ( (A(x; m. u)). -x}
344
(60)
Σ xED:
max hy (xx u)) h4 (A(x m. u)), -x} + A||mm|a, jft
where h.(-): :X IR is the logit (right before softmax) of class i Carlini & Wagner 2017). We denote the estimated (common) BP for class t as st = {m² j
Then, for each image not from class I, sample-wise BP is estimated to: a) induce the image be misclassified to class t; and b) have as small mask size (measured by l norm) as possible. Thus, the following loss minimized for each x D,,
LCss m, u) = max maxxmmxxie hy (A m, u)) - hh m, u)). -x} + X |||m//
(61)
We denote the sample-wist wise BP estimated for class and sample a (x {m; (x)) (x)) Finally, the cosine similarity statistic for class is computed by:
CS. = Uiecr D.
Σ
cos 2 (Z m ut)), z (A (x), ú((())))
(62)
xEULECe
where z(.): X - Rd is the mapping from input layer the penultimate layer with some dimension d. cos(-) _Rd x RR + 1-1, 1] is the cosine similarity between two real vectors.
Based on our results in Fig. - CS for BA target classes and non-target classes are separable for most domains. This is not surprising because when class t E C is a BA target class, the estimated common BP will likely be highly correlated with the sample-wise BPs estimated for images from classes other than I; thus, the resulting CS will be large and possibly close to 1. If class l. E C is not a BA target class, the estimated common BP may induce images from classes other than to be misclassified to some arbitrary classes (possibly the "semantically" closest class for each individual image). Thus, the common BP may be very different from sample-wise BP estimated to only induce misclassifications to class f. Consequently, the CS statistic will likely be small.
However, considering our 2-class problem with no sufficient number statistics to inform esti- mation of null distribution, and also our assumption that there is domain- domain-specific supervision (c.g. using clean classifiers trained for the same domain) for setting a proper detection threshold, CS statistic may not be effective since it is sensitive domains and DNN architectures.
24

---

Published as a conference paper at ICLR 2022
14
m7
13
Number classes
Figure 6: Average CS statistic versus the number of classes in the domain.
First, when there no BA, for ReLU networks, the penultimate layer features are always non- negative, such that the cosine similarity is guaranteed to be non-negative. However, for DNN with sigmoid or leaky ReLU activation functions, the penultimate layer features can be negative. Thus, the CS statistic may be distributed in the entire interval of [-1,1]. Such large difference in the null distribution of CS statistic makes the choice of detection threshold very difficult without domain- specific knowledge.
Second, CS also sensitive to the classification domain, especially the number of classes. Consid- ering some putative target class & E C, when there are a large number of classes in the domain, the common BP estimated for a group images from classes other than will likely be very different with the sample-wise BP estimated for each individual in the group. In particular, most images will likely be misclassified to some class other than when the common BP is embedded; but the sample-wise BP is estimated for each of these images to induce them to be misclassified to class t. Thus, the penultimate layer feature associated with the common BP and the sample-wise BP will likely be different for most images. However, when there are only two classes, i.e. C {0, 1] in our case, the images used for BP estimation for class are all from class (1 t). Moreover, both common BP and samples-wise BP estimated for these images will induce them be misclassified to class t. Thus, CS obtained for this case will likely be larger than for the cases where there are large number of classes when there no BA. We demonstrate this phenomenon in the following.
We construct five domains from CIFAR-10. 10. The first four domains contain 2, 4. 6, 8 classes ran- domly selected from the 10 classes of CIFAR- 10 respectively, and the the fifth domain is the original CIFAR-10 10 with 10 classes. We train classifier without BA for each domain using the same config- urations as in Sec. 4.1 For each classifier, we obtain CS statisties for all classes. Fig. (6] we show the average CS statistic over all classes for the five classifiers. In general, CS statistic decreases as the number of classes grows; thus, is highly domain-dependent.
D.8 DETAILS FOR MULTI-CLASS EXPERIMENTS
we evaluate the performance of our detection framework for multi-class scenarios with arbitrary number of attacks. In other words, the classifier has more than two classes, and each class can possibly be a BA target class.
In Sec. 4.4
For each of CIFAR-10, CIFAR-100, and STL-10, we create three attack instances with one, two, and three attacks, respectively. Like the attacks we created for the 2-class domains, the attacks here are created following the same data poisoning protocol that has been widely considered in existing works. That is, we create backdoor training images by embedding BP into small set of images from classes other than the target class. These backdoor training images are labeled to target class and inserted into the training set of the classifier Gu et al.) (2019). In our experiment here, for each attack of each instance, we randomly select a target class. For simplicity, we consider only additive perturbation BP here. We randomly select shape (and location for localized BP) for the BP to be used from our pool of candidate BPs. Note that for any two attacks of the same attack instance, the target classes and the BPs should both be different from each other. For attacks CIAFR-10 10, CIFAR- 100, and 10, the backdoor training images are created using 60, 10, and 100 clean images per class (not including the target class), respectively.
25

---

Published as a conference paper at ICLR 2022
Table Attack success rate (ASR) and clean test accuracy (ACC) for the classifiers being attacked (with one, two, and three attacks/target classes) for CIAFR-I0, CIFAR-100, and STL-100, respec- tively; and ACC for the clean classifiers trained for the three domains respectively.
CIFAR-10
CIFAR-100
STL-10
ASR: 97.0
ASR: 97.7
ASR: 95.1 ACC: 79.7
one attack
ACC: 93.7
ACC: 71.5
ASR=96.0, 93.7
ASR=89.6, 95.3
ASR=99.6, 96.0 ACC: 80.8
two attacks
ACC: 92.5
ACC: 71.9
ASR: 94.5, 80.2, 97.9
ASR: 95.7, 74.7, 97.4
ASR: 78.1, 99.0, 95.1
three attacks
ACC: 92.8
ACC: 70.5
ACC: 79.1
attack
ACC: 92.5
ACC: 70.4
ACC: 78.8
bird
(b) deer
(c) frog
(d) horse
ship
truck
Figure 7: Examples for backdoor training images for clean-label BAs. These images are origi- nally from the BA target class, perturbed (in ceman-imperoeptible fashion) be misclassified by surrogate classifier, embedded with the BP, and are still labeled to the target class.
For each domain, the three attack instances and the clean classifier use the same training configura- tion. For CIFAR-10 and STL-10,, we ResNet-18 the DNN architecture; for CIFAR-100, use ResNer-34 architecture. For all three domains, training data augmentations including random cropping and random horizontal flipping these domains are the same as for the 2-class domains generated from these original domains (shown in Tab. Tb. Using these training configurations, the resulting nine classifiers being attacked (three classifiers for the three attack instances respectively for each domain) all have high attack success rate (ASR). Compared with the three clean classifiers (without BA) trained for the three domains respectively, there is also significant degradation in clean test accuracy (ACC) for the classifiers being attacked. ASR and ACC for these classifiers are shown Tab.
adopted. Other configurations for classifier training for
E USING ET TO DETECT CLEAN-LABEL BAS
In this section, demonstrate the effectiveness of our detection framework against recent clean- label BA proposed by [urner et al.] (2019). Clcan-label BAs are motivated by the possible hu- man/machine inspection of the training set. For example, backdoor training samples labeled to some target class inserted by typical backdoor attacker are originally from classes other than the target class. Such "mislabeling" may be noticed by human expert who inspects the training set manually, or may be detected by shallow neural network trained on a small held-out validation that is guaranteed samples (that will be inserted into the classifier's 's training set) by embedding the BP only to target class samples. However, for target class samples embedded with the BP, there is no guarantee that it is the BP but not the features associated with the target class that will be learned by the classifier. Thus. Turner et al. (2019) proposed to "destroy" these target class features before embedding the when creating backdoor training samples. Then, the classifier will learn the BP and classify any test sample embedded with the BP to the target class.
be clean. Thus, Turner al. (019)) proposed create backdoor training
One simple effective approach proposed by Turner al. 2019 to destroy the features in the backdoor training samples associated with the target class is inspired by a method for creating ad- versarial examples. The backdoor attacker needs to first train surrogate classifier using inde- pendently collected clean dataset. Then, for each of small set samples from the target class used for creating backdoor training samples, the attacker independently launches projected gradi-
26

---

Published as a conference paper at ICLR 2022
attack
25
14
ol Expected transfer probability
Figure 8: Effectiveness of our defense, with the constant ET threshold 1/2, against the clean-label BA proposed by Turner et al. (2019). Classifiers being attacked have a maximum ET (over the two classes) greater than 1/2; clean classifiers have a maximum ET (over the two classes) less than 1/2.
ent descent (PGD) attack (Madry et al. (2018) to have the sample be predicted to any class other than its original class (i.e. the target class) by the surrogate classifier. These samples with the target class features destroyed are then embedded with the BP, are still labeled to the target class, and are inserted into the classifier's training set.
In our experiment here, we randomly generate ten 2-class domains from CIFAR-10 following its original train-test split. For each 2-class domain, we first train a surrogate classifier using subset of the training set (2000 training images per class). The remaining samples (3000 per class) are assumed to be possessed by the trainer for training the victim classifier. For each 2-class domain, we create one attack instance with one BA targeting on the second class and using an additive perturbation BP. The candidate BPs to be used the same in our experiments in the main paper. Here, for each BA, we use 1 1500 images from the target class (i.e. the second class of the associated 2-class domain) to create backdoor training images. These images images used for training the surrogate classifier. For each of these 1 1500 images, we independently generate an adversarial perturbation using the surrogate classifier following the standard protocol of PGD Madry et al. (2018). In particular, we set the maximum perturbation size as 8/255, the number of perturbation steps as 10, and the step size as 1/255. Most of the perturbed images are misclassified by the surrogate classifier. Then we embed the BP randomly selected from the candidates for each attack into these images with the adversarial perturbation and still label them to the target class, where they are originally from. The created backdoor training images are inserted into the training set of the victim classifier. They will be barely noticeable to human inspectors since they visually look like standard target class images and the embedded BP is almost imperceptible by humans. Some examples of backdoor training images are shown in Fig. i
randomly sampled from the
For each attack instance, use the same training configurations in Sec. of the main paper to train the victim classifier. We also train a clean classifier for each instance to evaluate false detections. Moreover, we apply our detection framework with the BP eeverse-engineeriin algorithm RE-AP and the same defense configurations as in the main paper to both the classifiers being attacked and the clean classifiers. In Fig. 8 we show the maximum ET (over the classes) for all these classifiers. Using ET and the constant detection threshold 1/2, we perfectly detect all clcan-label BAs with no false detections.
F EXPERIMENTAL VERIFICATION OF PROPERTY 3.1 FOR PATCH REPLACEMENT BPs
We verify Property 3.1 for patch replacement BPs embedded by Eq. 2b. Similar to Sec. 4.3 of
the main paper, here, we show that when class (1 - i) for E C = {0. is not a BA target class, for any two samples from class the minimum l norm for any common mask that induces both samples to be misclassified will likely be larger than the minimum 4 norm for the masks inducing each individual sample to be misclassified. The masks are obtained by solving problem
27

---

Published as a conference paper at ICLR 2022
3.0
2.5
2.0
1.5
0.0
1.00
1.25
1.50
1.75
2.00
2.50
2.75
norm ratio
Figure 9: Histogram of 1 norm ratio between pair-wise common mask and maximum of the two sample-wisc masks for each random image pair for clean classifiers.
10-
inference accuracy
accuracy
0.-
26-
0.8
0.4
0.4
02
00
Images
images detect
(a) attack instances (A1)
(b) clean instances (C1)
Figure 10: Accuracy of detection inference on the ensemble of attack instances A₁ and the ensemble of clean instances C₁, when the number of images used for detection varies in [2, 5, 10. 15].
We randomly choose one clean classifier from each of C1-C4- For each classifier, we randomly choose 10 pairs clean images from random class of the associated 2-class domain. For each pair of images, we apply the RE-PR algorithm (for reverse-engineering patch replacement BPs) on the two images jointly (to get a pair-wise common mask) well separately (to get two sample-wing wise masks for the two images respectively). Again, we divide the l norm of the pair-wise (common) mask by the maximum I norm the two sample-wise masks to get a ratio. In Fig. we plot histogram of such ratio for all image pairs for all four classifiers the ratio for most of the image pairs is greater than (marked by the red dashed line in Fig. 9
these pairs, that the BP (in particular, the mask) estimated for one sample cannot induce the other sample to be misclassified and vise versa. Note that for any image pair, the mask (and some associated pattern) estimated for one sample pattern) will be a common mask (and pattern) that induces both images to be misclassified. Then, would expect the ratio computed above be very close for such an image pair.
very likely
induce the other be misclassified, such mask (and the associated
G INFLUENCE OF THE NUMBER OF CLEAN IMAGES FOR DETECTION
The core of our detector is to estimate the ET statistic for each class. Note that the ET statistic is in fact an expectation. In principle, with fewer clean images per class for ET estimation, the variance of the estimated ET will be larger, though the execution time for ET estimation may be smaller. Thus, we would expect that, sometimes, the ET estimated using only a few clean images may be smaller than & for the attack case; larger than 1 for the clean case.
In Sec. 4.1
we used 20 images per class (40 images in total) for backdoor detection for all attack instances and all clean instances, and achieved good detection accuracy. Here, we show the influ-
28

---

Published as a conference paper at ICLR 2022
ence of the number of clean images per class detection accuracy. In particular, for all 45 attack instances and all 45 clean instances two-class domains generated from CIFAR-1O (i.e. A₁ and Ci). apply the same detector in Sec. 4.1 with detection threshold 1. but varying the number of clean images per class (in [2, 5, 10, 15]) used for detection (i.e. ET estimation). As shown in Fig. 10 with 5 clean images per class (10 images in total), our method achieves relatively good detection accuracy. Even with only 2 clean images per class (which is the minimum sample size for empirical ET estimation), our detector catches 80% of attacks with less than 10% false detection rate
H CHOICE OF THE PATIENCE PARAMETER T
In all experiments in the main paper, set the patience parameter in Alg. To 4 and claim that larger r will not induce much change to the estimated ET. Here, we provide some empirical evidence to support this claim.
We apply Alg. T with RE-AP to a classifier being attacked in A and a classifier being attacked in A2- We also apply Alg. [ with RE-PR to a classifier being attacked in A and a classifier being attacked in As. Moreover, Alg. [ with both RE-AP and RE-PR are applied to a clean classifier in C₁ and clean classifier in Cz. Note that classification domains associated with A1, A7, and C₁ are generated from CIFAR-10; while classification domains associated with A2, Ag, and C2 are generated from CIFAR-100.
For all experiments in this section, we set the patience parameter to used in the main paper. The purpose to get a better observation of the asymptotic behavior of Pn [T.(xh)) (1) (I(NN, 1) during ET estimation for each clean sample xa used for detection (see line 7-12 of Alg. for the definition of related quantities). The number of clean samples used for detection is 20.
instead of r 4
As shown in Fig. when applying our method to classifiers being attacked, Pr (for some class i) quickly grows to (in very few iterations) for most clean samples used for detection (see (a)())e)(f)
of Fig. 11.. For few clean samples, pa quickly grows a large value close and then slowly reaches (see (f) Fig. 11p. Only for very few samples, (f) stays at some value in between 0 and (see (b) of Fig. I.. Based these observations, which generally true for other domains we investigated,
is not a critical choices to our detection performance. The estimated ET, (+) for all clean samples used for detection, will likely be greater than 2.2 as
which is the average determined by the majority of clean samples used for detection.
On the other hand, when applying some small values close to 0) for all clean samples used for detection (see (c)(g) of Fig. II. When applying our method with RE-PR to the same classifiers, p% stays at 0 or some small values close to for most samples and shows trend of convergence (see (d)(h) of Fig. M Again, reducing from 8 to or further increasing will not change the estimated ET much the estimated ET for these clean instances will still be clearly less than
method clean classifiers, with RE-AP, pm stays at 0 (or
I USING SYNTHESIZED IMAGES FOR BACKDOOR DETECTION
For most REDs, the defender is assumed to possess a small, clean dataset (collected independently) for detection Wang al. (2019); Xiang et al. (2020); Guo et al. 9); Wang et al. (2020). Although this assumption relatively mild and feasible in most practical scenarios, it may be unnecessary the defender is able to synthesize the images used for detection.
The first trial was made by Chen et al. (2019), where on simple datasets like MNIST Lecun et al. (1998), ,, images for backdoor pattern reverse-engineering son et al. (2015). However, images generated in such a way are not guaranteed to be visually typical to their designated classes, especially for complicated domains like ImageNet. Thus we ask the following question:
synthesized by model inversion Fredrik- ErrersionFreerikkk.
'Here, we claim failure in detection if ET is exactly for both clean instances and attack instances. Thus, the actual detection accuracy should he higher than those in Fig. T0 if we either do do not trigger alarm when ET is exactly 4
29

---

Published as a conference paper at ICLR 2022
14
1.0
641
0.4
550
iteration count
iteration count
(a) an attack instance in A (RE-AP)
(b) an attack instance in An (RE-PR)
1.0
04
iteration
count
(c) clean instance in C₁ (RE-AP)
(d) clean instance in C (RE-PR)
04-
0.8
00
0.
2.5
30.0
17.6
iteration count
iteration count
(e) an attack instance Aa (RE-AP)
(1) an attack instance Aa (RE-PR)
0.-
0.8
02
0,2
35
iteration count
iteration count
(g) a clean instance in C: (RE-AP)
(h) clean instance in C2 (RE-PR)
Figure 11: Example growing curves of pm (with patience 7 8). In each figure, there are 20 curves, each corresponding to a clean sample used for detection. ET the average final (( over these 20 samples.
30

---

Published as a conference paper at ICLR 2022
(a) "1"
(b) "3"
"4"
(d) "5"
Figure 12: Images synthesized using a simpler version of the model inversion method used by Chen
al. 2019).
attack clean
0.4
ET statistic
Figure 13: Histogram ET statistics for classifiers in A6 and Cs, when the images for backdoor pattern reverse-engineeng are synthesized.
Can our ET framework be generalized to involve backdoor pattern reverse-engineering using syn- thesized images?
Here, we consider the 20 two-class domains generated from MNIST due to this domain's 's simplic- ity. We apply RE-AP to the 20 classifiers being attacked in As and the 20 clean classifiers in Cg, respectively. The clean images used for detection are generated using a simpler version of the model inversion method used by [Cen al. 2019). To synthesize an image for detection, we first initial- ize an all-zero image added with some small random positive noise. Then, we maximize (over the image values) the posterior of the designated class of the image using the classifier be inspected. until the posterior is greater than 0.9. Examples for our synthesized images are shown in Fig. 12 Note that without the "auxiliary constraints" on images during their generation process (Chen et al. 2019)). ) the generated images are usually atypical to their designated classes.
In Fig. 13 we show the ET statistic for the 80 classes associated with the 40 binary classifiers (20 classifiers being attacked and 20 clean classifiers). Among these 80 classes, there are 60 backdoor target classes and 20 non-target classes (please see the settings in Sec. 4.1.. Despite one backdoor target class evading
detection and one ET for backdoor target class lying close to the threshold z. the separation of ET for backdoor target classes and non-target classes is even better than that in the bottom left figure in Fig. (where backdoor pattern reverse-engineering is performed typical MNIST images). The possible reasons maybe:
For non-attack cases, two independently synthesized samples predicted to the same class will likely be both atypical their predicted class. They will likely share fewer features associated with their predicted class than two independent typical samples from this class. They can also be located anywhere in the input space. Thus, they will be more likely to be "mutually not transferable".
The synthesized samples are also far from the data manifold of classes other than the class they predicted to. So the minimum perturbation size required to induce them to be
31

---

Published as a conference paper at ICLR 2022
800
average execution time (second)
600
400
200
100
20
No. clean images for detection
Figure 14: Execution time versus the number of samples for detection.
misclassified will have large norm possibly larger than the norm of the backdoor pattern when there is an attack. If this is the case, the ET statistic will be exactly based on Thm.
3.
Future works along this research line include further investigation of the phenomenon observed, and also improvement to the model inversion techniques, such that more complicated domains can be handled.
J COMPUTATIONAL COMPLEEXITY
Here, we discuss the computational complexity of Alg. More generally, we consider Alg. for multi-elass scenarios. Let K be the number of classes, N be the number of samples per class for detection, and T' be the maximum number of forward/backward propagations for backdoor pattern reverse-engineering (i.e. "solving problem (3) in line of Alg. DT. For each of the classes, we compute the (+) quantity (line 12 of Alg. for each of the KN samples used for detection. To compute each (1) the transferable set (line 9 of Alg. is updated most (KN - 1) times; and each updating involves at most T forward/backwart propagations. Thus, the theoretical upper bound of the number of forward/backward propagations for Alg. of the order O(K3 O(33N2TT) where T is the patience parameter.
However, the actual complexity of method in practice is much lower than the theoretical bound. First, the purpose of using a sufficiently large number samples for detection to reduce the variance of the estimated ET (see Apdx. G for more discussion and empirical results). Thus, for sufficiently large K, we can set N 1 and use only K samples for detection; or even use fewer samples randomly selected from these K samples.
Second, the actual number of iterations for updating the transferable set is much smaller than (KN 1) in practice. In Apdx. H we discussed the influence of the choice of on the estimated ET statistic and provided empirical results. For attack cases, (4) reaches 1 (and thus terminates the updating of the transferable set) very quickly (even in one or two iterations) for most samples (see (f) of Fig. TT). For non-attack cases, convergence is also reached quickly for most samples (see (c)
Fig. TT.. In these examples, images are used for estimating the ET statistic with patience 8. Thus the theoretical maximum number of iterations for the transferable set updating for an image is (20- 1) x 8 152, which is several times larger than the actual maximum number of iterations (<25).
In Fig. 14 we show the curve of the execution time growing with the number of samples used for detection. Specifically, apply our detector to the clean binary classifiers in C₁ and record the average execution time, with the number of images for detection varying in [2. 5, 10, 15, 20]. Execution time is measured dual card RTX2080-Ti (11GB) GPU. Comparing with Fig. TO
32

---

Published as a conference paper at ICLR 2022
(a) failed BP reverse-enginees reverse-engineering
(b) successful BP reverse- eeverse-nggineering
Figure 15: Example of (a) failed BP reverse-engineering: and (b) a successful BP reverse- engineering. For both examples, the estimated BP is on the top, while the true BP used by the attacker at the bottom.
where show the effectiveness of our detector with only few samples for detection, the actual time required for our detector to achieve good performance is only a few minutes. Moreover, for attack cases, the total number of iterations (for all samples used for detection) required for ET estimation is generally much smaller than for clean cases (as shown in Fig. 11]. Thus, the actual execution time when there is an attack should be much smaller than the time shown in Fig. 14
K INFLUENCE OF BACKDOOR PATTERN REVERSE-ENGINEENE ENGINEERING ON DETECTION PERFORMANCE
Like most existing REDs, method cannot achieve 100% detection accuracy in practice. As shown in both Tab. [ and Fig. 2 out method, though achieving generally good detection accuracy, suffers from few false negatives and false positives.
One main reason for the false negatives is that the existing BP enverse-nngineering techniques used in our detection framework cannot not always recover the key features of the true BP used by the attacke 5 In such cases, the "non-transfer probability" for a backdoor target class will be large, as if there were no attacks; and ET will likely be less than 3- In Fig. 15a we show example of such failure of BP reverse-engin cewerrseenngiieiingg.. We consider classifier being attacked associated with two-class domain generated from CIFAR-100 that evaded our detection (from blue bar less than J in the second figure of the left row in Fig. D.. For a random sample, we observed that the estimated BP visually uncorrelated with the true BP used by the attacker. For comparison, we also show an example for successful BP reverse-engineede some key features of the true BP used by the attacker; the ET statistic for this class larger than and the attack is successfully detected.
in Fig. [5b] where the estimated pattern contains
We notice that most false positives happen when applying RE-PR (i.e. the reverse-engineering method in Wang et al. 2019) for patch replacement BPs) clean classifiers. As introduced in Sec. D.6 RE-PR searches for a small image patch that induces high group misclassification to putative target class. But it is possible for some domains and some classes, there are common key features associated with the class that is easy to be everse-engineered on a small spatial support/mask. sample, will likely also induce another sample to be
Such features, if eeverse-engineered misclassified. Although this hypothesis requires further validation in the future, we have shown empirically that the false detections have low frequency, given that our experiments performed on a large number of different two-class domains generated from six benchmark datasets.
Posssible reasons can be related to the design of the BP reverse-engineerrig algorithm, the attack configu- rations (which, e.g., cause a low attack success rate), etc.
33

---

Published as a conference paper at ICLR 2022
Detection accuracy ET with RE-AP on the 10 five-class domains with I attack, attacks, and no attack, compared with RED-AP (original) and RED-AP (MAD).
Table 10:
I attack
attacks
clean
ET (RE-AP)
10/10
10/10
10/10
RED-AP (original)
10/10
0/10
9/10
RED-AP (MAD)
6/10
2/10
7/10
2.30
200
7.00
175
1.75
150
1.50
125
129
122
132
100
1.00
0.79
0.0
0.00
0.5
0.0
ET staticic
statistic
statistic
(a) 1 attack
(b) 2 attacks
(c) clean
Figure 16: Histogram of the maximum ET over the five classes for classifier ensembles with (a)
attack, (b) 2 attacks, and (c) no attack.
L
ADDITIONAL EXPERIMENTS FOR MULTI-CLASS SCENARIOS WITH ARBITRARY NUMBER OF ATTACKS
In Sec. 4.4 we showed the performance of our ET framework against BAs for multi-class scenarios with arbitrary number of attacks. We considered the original domains of CIFAR- 10, CIFAR-100 100, and STI.110. For each domain, we showed that the maximum ET statistic over all classes is larger than 1 if there an attack, and less than 2 if there is no attack.
2
Here, we further investigate the capability of our ET framework on more multi-class domains. In particular, we generate 10 five-class domains from CIFAR-10, with the five classes for each domain randomly selected from the original ten classes of CIFAR-10. For each domain, we create attack instance with one attack, an attack instance with two attacks, and a clean instance. The protocols for attack creation, classifier training, and defense configurations we compare our ET (with RE-AP) with the existing RED proposed by Xiang et al. 2020) (with its original protocol including confidence threshold 0.05 (indicating confidence 0.95)). well as the same RED proposed by Xiang et al. (2020) but with the anomaly detection method changed to the one based median absolute deviation (MAD) proposed by Wang et (2019) (with the same threshold 2 (also indicating a confidence 0.95) used by Wang et al. (2019)). For simplicity, we name these two methods as "RED-AP (original)" and "RED-AP (MAD) respectively. All three methods use 3 clean images per class for detection.
the same in Sec. 4.4 Moreover,
In Tab. [0, we show the detection accuracy of our ET compared with RED-AP (original) and RED- AP (MAD). Our ET detects all attacks with no false detections. For each of the three ensembles with ten classifiers, the histogram of the maximum ET statistic over all the five classes is shown in Fig. [6] On the other hand, RED-AP (original) achieved good accuracy to detect classifiers with attack, with very low false detection rate, but it fails to detect any classifiers with attacks. This is because the anomaly detection setting of RED-AP (original) relies on the 1-attack assumption to estimate a null distribution for non-backdoor class pairs. For RED-AP (MAD), there is also a clear gap in performance compared with our ET. This is because the median of the five statistics is largely biased by statistics associated with backdoor target classes
34


Reviews:
[{"review_id": "gU1Cy_1ryKp", "reviewer": "Reviewer_Xbfh", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "This paper proposed a novel and working solution to a tough problem of backdoor attacks detection with binary or multiple labels. \n\nStrengths: \n* A novel notion of detection statistics called 'expected transferability' (ET) is proposed to help in detecting the target labels.\n* A domain/attack/network agnostic threshold (1/2) is used which is principled and has theoretical implications.\n* This approach is extendable to address more challenging scenarios, with a potential computation cost. \n\nConcerns:\n* One argued contribution of the work is that it does not need 'the training set of the classifier to be inspected'. However, the approach still requires collecting an individual set of clean samples. I think it would be better to remove this claim.\n* My major concern for this problem is that it seems very slow for the proposed algorithm to converge, as $ET$ is estimated by iterating each class $i$ and each of its samples $x_n^{(i)}$, until transferable set remain unchanged. Since the same procedure needs to be done for each class label, this issue might propagate with more class labels or clean samples. \n\nMinor comments:\nPage 4, definition 3.3 , the expectation $E$ should be over $X, Y \\sim P_i$ instead of  $X \\sim P_i$?", "summary_of_the_paper": "This paper proposed a post-training BA detection approach for two-class classification problems, which can also be extended to scenarios with multiple attacks. The approach is derived based on a proposed notion of 'expected transferability', which works with a principled threshold that is irrespective of the domain nor the network or attack configurations. Empirical experiments verified the effectiveness of their approach.", "summary_of_the_review": "This paper proposed a novel and working solution to a tough problem of backdoor attacks detection with binary or multiple labels. The solution is well motivated and theoretically justified. Although the convergence rate might be a potential drawback of this approach, it still makes solid contributions to the community.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "HxKSr9kaY6v", "reviewer": "Reviewer_BBKY", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "* Related work and novelty claims\n\nIt appears to me that the paper does not include discussions on recent work. Its\nkey selling point is that the proposed method works under three conditions: no\naccess to training data, reference model, and binary classifier. \n\nMany existing work also work under these constraints, such as ABS proposed by\nLiu et al. in CCS 2019. More broadly, the IARPA TrojAI competition include not\nonly these constraints but more, such as constrained time to finish scanning one\nmodel etc. It involves using a private dataset for training backdoor models\n(a.k.a., detectors cannot leverage training data or train their reference\nmodels), and also many tasks are binary classifiers, e.g., sentiment analysis.\nMany submitted solutions are based on reverse-engineering. Also, as a\nrequirement of this competition, all solutions are open sourced.\n\nThus, to me, I think many claims in this paper should be altered. Moreover, I\nthink the paper should compare with some of these solutions. I would suggest\nusing the TrojAI dataset (also open sourced on NIST web page) as their benchmark\nand compare with the leaderboard results (also open to access on NIST web page)\nso that we can better understand the effectiveness of proposed solution.\n\n* Design of ET and analysis\n\nDespite the formal representation of the method and discussion (which is\nappreciated), the design of this method is based on empirical observations on\nthe transferability of input samples. As such, there is no guarantee that the\nproposed method will work and the threshold value 1/2 is general.In fact, as\nshown in Figure 2, the proposed method also suffers some FP/FN, namely, some ETs\nfor benign classes are larger 0.5 and ET of backdoor target classes can be\nsmaller than 0.5.\n\nTo me, it is important to understand the applicable scenarios of the proposed\nmethod. Namely, why these cases fail? I personally suspect it is because of the\ntransferability assumption. Is it? I would strongly suggest putting such\nassumptions upfront so that we can understand the pros and cons of this method.\n\nAnother concern I have is that, many existing method does require tuning. But if\nwe can tune them to get better results, what is the advantage of the proposed\nmethod? More importantly, are there backup plans when the method fails? Or can\nwe know that when it will work or not? Otherwise, I do not see the fundamental\nbenefits of using this method.\n\n* Evaluation for multi-class, multi-attack scenario is not sufficient.\n\nIn Section 4.4, this paper provides the evaluation results on multi-class,\nmulti-attack scenarios. However, it only trains one model for each attack\nsettings and a single clean model for each dataset. There is no baseline method,\nand I am not sure if the proposed method can truly generalize to other datasets\nand models.\n\n* Countermeasures and ethical statement\n\nThere is no countermeasures discussed and no ethical statement.\n\n* CIFAR-10\n\nWhy the maximum ET for CIFAR-100 is much larger than that of other datasets? As\nshown in Table. 2, an interesting phenomenon is that the maximum ET statistic\nfor CIFAE-100 is much larger than that of other datasets (i.e., CIFAR-10,\nSTL-10). It would be better if this paper could provide some discussion about\nthis phenomenon.\n\n* Code and data\n\nWill the code and data be released?\n", "summary_of_the_paper": "This paper proposes a new engineered reverse-engine based backdoor model\ndetection method. It has stronger assumptions including: 1) no access to\ntraining data; 2) no access to benign reference model; 3) 2 or multi-class\nmodels. To detect backdoors in such scenarios, it leverages a new statistical\nmetric known as the expected transferability, which can derive a fixed threshold\nfor backdoored models detection. Results on six datasets show that the proposed\nmethod is effective for detecting backdoored models.", "summary_of_the_review": "My main concern is the it lacks discussion and comparison with works that works\nunder the same setting. Its analysis is not sufficient to understand the\napplicable scenarios and its key benefit.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "CkQ5yMh_ZZR", "reviewer": "Reviewer_xYbV", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "What I liked:\n- The paper is well organized.\n- The use of a class-specific metric to figure out if a classifier is prone to backdoors, given existing works focus on inter-class metrics, is a novel idea. (Although, I have not been proactive in following work on these lines.)\n- I liked the idea of theoretically motivating the value for a metric and then empirically demonstrating its usefulness.\n- The authors conduct several empirical studies.\n\nWeakness/Clarification:\n- Some parts of the theoretical analysis to determine the value of ET seem to be hand-wavy. First, while it is intuitively understandable why Property 3.1 might hold in the context of non-backdoor-attack scenarios, it is not clear whether it will always hold. Second, there is no good definition of how small $\\epsilon$ has to be for the reasoning to hold.\n- The authors argue that existing approaches cannot work for 2-class classification problems (as their sample complexity is $O(K^2)$, $O(K)$ where $K$ is the number of classes). While I get that a method that needs fewer examples is better, how many samples are too few or too many? The author's approach uses 20 samples (why 20?), is that constant or is it ~$O(K^3)/O(K^4)$ for the 2-class classification task. Is there a theoretical bound here? \n- In the empirical section, there are several cases where a backdoor-poisoned classifier is determined to be benign as per the ET metric (16/20 for $A_3$ in Table 1) or vice-versa (16/20 for $C_4$). Is there any particular reason as to why this happens? Also, is there a confidence value associated with the metric (for example, would values far away from 1/2 strongly indicate that it is benign or backdoor-poisoned, or does no such correlation hold)? Looking at Fig 2, Col 3, I notice a few oranges close to 1, which signals that there are no guarantees of any kind.\n- How important is it to have a constant threshold (for ET-based methods) vs. estimate the boundary with a few samples (for other baselines)? Also, from Fig 2, it seems L2, when an optimal threshold value is used, might have better separability than E2. Yet, the ROC curve tells ET is much better than L2; what was the threshold used for L2 and how was is calculated?\n- Why do the authors simply show the max ET values in Table 2? I would be more interested to see aggregate statistics (similar to Table 1). The latter would give a better idea of how the ET-based approach performs on average (as opposed to in the best case, that too if values furthest from 1/2 imply best).", "summary_of_the_paper": "The paper proposes a class-specific metric called Expected Transferability (ET) that can determine if a classifier is targeted by a backdoor attack (or not). The threat model assumes no access to the model's training data. By the virtue of being class-specific, the metric allows one to examine classifiers regardless of the number of output classes. The author reason theoretical what values of ET indicates the presence (or absence) of backdoor attacks. Then they empirically demonstrate how this value can be estimated and leveraged.\n", "summary_of_the_review": "See above.\n\n*[Update]* Having read the rebuttal (and looking at the additions to the revised paper), I would like to thank the authors for showcasing an honest effort to answer/address many of the comments/clarifications I initially had. I have updated my score to reflect the same.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "0hmGic0dpUc", "reviewer": "Reviewer_FJ6Z", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Pros:\n1. The math derivation of ET and detection threshold is convincing. With a constant threshold, ET can be used to detect different backdoor attacks in different domains.\n2. The proposed BA detection algorithm using empirical estimate of ET can be applied to classifiers with arbitrary number of classes including two-class cases. \n3. Authors conducted comprehensive experiments on six benchmark databases using different backdoor patterns to demonstrate the performance of proposed algorithm.\n\nCons:\n\nThe technical part of proposed BA detection algorithm is interesting and convincing for me. I am curious about the patience parameter to determine convergence. Does the choice of 4 hold true for ensembles A1 to A10, C1 to C6 in the experiment? Does the number of clean images used during detection affect the detection accuracy? Is the a minimum number of clean images required for an effective detection?", "summary_of_the_paper": "This paper proposes a novel post-training backdoor attack detection algorithm using reverse-engineering defense. The authors design a new statistic called expected transferability (ET) for detection. The advantage of ET is that the detection threshold is a constant (1/2) and is independent of classifier domain and attack algorithms, so the proposed detection algorithm can be applied to a wide range of backdoor attacks on different databases.", "summary_of_the_review": "I will vote for accepting this paper. The proposed ET statistic is novel and technically convincing. Extensive experiments have been conducted to evaluate proposed BA detection algorithm.\n", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}]

Author rebuttal:

Meta-review: The paper presents a new method for detection of backdoor attacks under strong limitations such as the lack of access to training data and the reference benign model. Its main idea is to utilize a new expected transferability statistic that can be used for detection in broad range of application domains. The effectiveness of the proposed approach is demonstrated experimentally.
Decision: Accept (Poster)