SlowGuess/ACL_2020_OCR huggingface dataset:
Mao Ye*
Chengyue Gong*
my21@cs.utexas.edu cygong@cs.utexas.edu lqiang@cs.utexas.edu
State-of-the-art NLP models can often be fooled by human-unaware transformations such as synonymous word substitution. For security reasons, it is of critical importance to develop models with certified robustness that can provably guarantee that the prediction is can not be altered by any possible synonymous word substitution. In this work, we propose a certified robust method based on a new randomized smoothing technique, which constructs a stochastic ensemble by applying random word substitutions on the input sentences, and leverage the statistical properties of the ensemble to provably certify the robustness. Our method is simple and structure-free in that it only requires the black-box queries of the model outputs, and hence can be applied to any pre-trained models (such as BERT) and any types of models (world-level or subword-level). Our method significantly outperforms recent state-of-the-art methods for certified robustness on both IMDB and Amazon text classification tasks. To the best of our knowledge, we are the first work to achieve certified robustness on large systems such as BERT with practically meaningful certified accuracy.
Deep neural networks have achieved state-of-the-art results in many NLP tasks, but also have been shown to be brittle to carefully crafted adversarial perturbations, such as replacing words with similar words (Alzantot et al., 2018), adding extra text (Wallace et al., 2019), and replacing sentences with semantically similar sentences (Ribeiro et al., 2018). These adversarial perturbations are imperceptible to humans, but can fool deep neural networks and break their performance. Efficient methods for defending these attacks are of critical im
portance for deploying modern deep NLP models to practical automatic AI systems.
In this paper, we focus on defending the synonymous word substitution attacking (Alzantot et al., 2018), in which an attacker attempts to alter the output of the model by replacing words in the input sentence with their synonyms according to a synonym table, while keeping the meaning of this sentence unchanged. A model is said to be certified robust if such an attack is guaranteed to fail, no matter how the attacker manipulates the input sentences. Achieving and verifying certified robustness is highly challenging even if the synonym table used by the attacker is known during training (see Jia et al., 2019), because it requires to check every possible synonymous word substitution, whose number is exponentially large.
Various defense methods against synonymous word substitution attacks have been developed (e.g., Wallace et al., 2019; Ebrahimi et al., 2018), most of which, however, are not certified robust in that they may eventually be broken by stronger attackers. Recently, Jia et al. (2019); Huang et al. (2019) proposed the first certified robust methods against word substitution attacking. Their methods are based on the interval bound propagation (IBP) method (Dvijotham et al., 2018) which computes the range of the model output by propagating the interval constraints of the inputs layer by layer.
However, the IBP-based methods of Jia et al. (2019); Huang et al. (2019) are limited in several ways. First, because IBP only works for certifying neural networks with continuous inputs, the inputs in Jia et al. (2019) and Huang et al. (2019) are taken to be the word embedding vectors of the input sentences, instead of the discrete sentences. This makes it inapplicable to character-level (Zhang et al., 2015) and subword-level (Bojanowski et al., 2017) model, which are more widely used in practice (Wu et al., 2016).
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3465-3475 July 5 - 10, 2020. ©2020 Association for Computational Linguistics
In this paper, we propose a structure-free certified defense method that applies to arbitrary models that can be queried in a black-box fashion, without any requirement on the model structures. Our method is based on the idea of randomized smoothing, which smoothes the model with random word substitutions build on the synonymous network, and leverage the statistical properties of the randomized ensembles to construct provably certification bounds. Similar ideas of provably certification using randomized smoothing have been developed recently in deep learning (e.g., Cohen et al., 2019; Salman et al., 2019; Zhang et al., 2020; Lee et al., 2019), but mainly for computer vision tasks whose inputs (images) are in a continuous space (Cohen et al., 2019). Our method admits a substantial extension of the randomized smoothing technique to discrete and structured input spaces for NLP.
We test our method on various types of NLP models, including text CNN (Kim, 2014), CharCNN (Zhang et al., 2015), and BERT (Devlin et al., 2019). Our method significantly outperforms the recent IBP-based methods (Jia et al., 2019; Huang et al., 2019) on both IMDB and Amazon text classification. In particular, we achieve an  $87.35\%$  certified accuracy on IMDB by applying our method on the state-of-the-art BERT, on which previous certified robust methods are not applicable.
2 Adversarial Word Substitution
In a text classification task, a model  $f(\mathbf{X})$  maps an input sentence  $\mathbf{X} \in \mathcal{X}$  to a label  $c$  in a set  $\mathcal{Y}$  of discrete categories, where  $\mathbf{X} = x_1, \ldots, x_L$  is a sentence consisting of  $L$  words. In this paper, we focus on adversarial word substitution in which an attacker arbitrarily replaces the words in the sentence by their synonyms according to a synonym table to alert the prediction of the model. Specifically, for any word  $x$ , we consider a pre-defined synonym set  $S_x$  that contains the synonyms of  $x$  (including  $x$  itself). We assume the synonymous relation is symmetric, that is,  $x$  is in the synonym set of all its synonyms. The synonym set  $S_x$  can be built based on GLOVE (Pennington et al., 2014).
With a given input sentence  $\mathbf{X} = x_{1},\ldots ,x_{L}$  the attacker may construct an adversarial sentence  $\mathbf{X}' = x_1',\dots,x_L'$  by perturbing at most  $R\leq L$  words  $x_{i}$  in  $\mathbf{X}$  to any of their synonyms  $x_{i}^{\prime}\in S_{x_{i}}$
$$
S _ {\mathbf {X}} := \left\{\mathbf {X} ^ {\prime}: \left\| \mathbf {X} ^ {\prime} - \mathbf {X} \right\| _ {0} \leq R, x _ {i} ^ {\prime} \in S _ {x _ {i}}, \forall i \right\},
$$
where  $S_{\mathbf{X}}$  denotes the candidate set of adver
sarial sentences available to the attacker. Here  $\| \mathbf{X}' - \mathbf{X}\| _0\coloneqq \sum_{i = 1}^L\mathbb{I}\left\{x_i'\neq x_i\right\}$  is the Hamming distance, with  $\mathbb{I}\{\cdot \}$  the indicator function. It is expected that all  $\mathbf{X}'\in S_{\mathbf{X}}$  have the same semantic meaning as  $\mathbf{X}$  for human readers, but they may have different outputs from the model. The goal of the attacker is to find  $\mathbf{X}'\in S_{\mathbf{X}}$  such that  $f(\mathbf{X})\neq f(\mathbf{X}')$
Certified Robustness Formally, a model  $f$  is said to be certified robust against word substitution attacking on an input  $\mathbf{X}$  if it is able to give consistently correct predictions for all the possible word substitution perturbations, i.e,
$$
y = f (\mathbf {X}) = f \left(\mathbf {X} ^ {\prime}\right), \quad \text {f o r a l l} \mathbf {X} ^ {\prime} \in S _ {\mathbf {X}}, \tag {1}
$$
where  $y$  denotes the true label of sentence  $\mathbf{X}$ . Deciding if  $f$  is certified robust can be highly challenging, because, unless additional structural information is available, it requires to exam all the candidate sentences in  $S_{\mathbf{X}}$ , whose size grows exponentially with  $R$ . In this work, we mainly consider the case when  $R = L$ , which is the most challenging case.
3 Certifying Smoothed Classifiers
Our idea is to replace  $f$  with a more smoothed model that is easier to verify by averaging the outputs of a set of randomly perturbed inputs based on random word substitutions. The smoothed classifier  $f^{\mathrm{RS}}$  is constructed by introducing random perturbations on the input space,
$$
f ^ {\mathrm {R S}} (\mathbf {X}) = \underset {c \in \mathcal {Y}} {\arg \max} \mathbb {P} _ {\mathbf {Z} \sim \Pi_ {\mathbf {X}}} \left(f (\mathbf {Z}) = c\right),
$$
where  $\Pi_{\mathbf{X}}$  is a probability distribution on the input space that prescribes a random perturbation around  $\mathbf{X}$ . For notation, we define
$$
g ^ {\mathrm {R S}} (\mathbf {X}, c) := \mathbb {P} _ {\mathbf {Z} \sim \Pi_ {\mathbf {X}}} (f (\mathbf {Z}) = c),
$$
which is the "soft score" of class  $c$  under  $f^{\mathrm{RS}}$ .
The perturbation distribution  $\Pi_{\mathbf{X}}$  should be chosen properly so that  $f^{\mathrm{RS}}$  forms a close approximation to the original model  $f$  (i.e.,  $f^{\mathrm{RS}}(\mathbf{X})\approx f(\mathbf{X}))$  and is also sufficiently random to ensure that  $f^{\mathrm{RS}}$  is smooth enough to allow certified robustness (in the sense of Theorem 1 below).
In our work, we define  $\Pi_{\mathbf{X}}$  to be the uniform distribution on a set of random word substitutions. Specifically, let  $P_{x}$  be a perturbation set for word  $x$  in the vocabulary, which is different from the synonym set  $S_{x}$ . In this work, we construct  $P_{x}$  based on the top  $K$  nearest neighbors under the cosine
similarity of GLOVE vectors, where  $K$  is a hyperparameter that controls the size of the perturbation set; see Section 4 for more discussion on  $P_{x}$ .
For a sentence  $\mathbf{X} = x_{1},\ldots ,x_{L}$  , the sentencelevel perturbation distribution  $\Pi_{\mathbf{X}}$  is defined by randomly and independently perturbing each word  $x_{i}$  to a word in its perturbation set  $P_{x_i}$  with equal probability, that is,
$$
\Pi_ {\mathbf {X}} (\mathbf {Z}) = \prod_ {i = 1} ^ {L} \frac {\mathbb {I} \left\{z _ {i} \in P _ {x _ {i}} \right\}}{\left| P _ {x _ {i}} \right|},
$$
where  $\mathbf{Z} = z_{1},\ldots ,z_{L}$  is the perturbed sentence and  $|P_{x_i}|$  denotes the size of  $P_{x_i}$ . Note that the random perturbation  $\mathbf{Z}$  and the adversarial candidate  $\mathbf{X}'\in S_{\mathbf{X}}$  are different.
3.1 Certified Robustness
We now discuss how to certify the robustness of the smoothed model  $f^{\mathrm{RS}}$ . Recall that  $f^{\mathrm{RS}}$  is certified robust if  $y = f^{\mathrm{RS}}(\mathbf{X}^{\prime})$  for any  $\mathbf{X}^{\prime} \in S_{\mathbf{X}}$ , where  $y$  is the true label. A sufficient condition for this is
$$
\min  _ {\mathbf {X} ^ {\prime} \in S _ {\mathbf {X}}} g ^ {\mathrm {R S}} (\mathbf {X} ^ {\prime}, y) \geq \max  _ {\mathbf {X} ^ {\prime} \in S _ {\mathbf {X}}} g ^ {\mathrm {R S}} (\mathbf {X} ^ {\prime}, c) \quad \forall c \neq y,
$$
where the lower bound of  $g^{\mathrm{RS}}(\mathbf{X}',y)$  on  $\mathbf{X}'\in S_{\mathbf{X}}$  is larger than the upper bound of  $g^{\mathrm{RS}}(\mathbf{X}',c)$  on  $\mathbf{X}'\in S_{\mathbf{X}}$  for every  $c\neq y$ . The key step is hence to calculate the upper and low bounds of  $g^{\mathrm{RS}}(\mathbf{X}',c)$  for  $\forall c\in \mathcal{V}$  and  $\mathbf{X}'\in S_{\mathbf{X}}$ , which we address in Theorem 1 below. All proofs are in Appendix A.2.
Theorem 1. (Certified Lower/Upper Bounds) Assume the perturbation set  $P_x$  is constructed such that  $|P_x| = |P_{x'}|$  for every word  $x$  and its synonym  $x' \in S_x$ . Define
$$
q _ {x} = \min _ {x ^ {\prime} \in S _ {x}} | P _ {x} \cap P _ {x ^ {\prime}} | / | P _ {x} |,
$$
where  $q_{x}$  indicates the overlap between the two different perturbation sets. For a given sentence  $\pmb{X} = x_{1},\dots ,x_{L}$ , we sort the words according to  $q_{x}$ , such that  $q_{x_{i_1}}\leq q_{x_{i_2}}\leq \dots \leq q_{x_{i_L}}$ . Then
$$
\begin{array}{l} \min  _ {\boldsymbol {X} ^ {\prime} \in S _ {\boldsymbol {X}}} g ^ {R S} (\boldsymbol {X} ^ {\prime}, c) \geq \max  (g ^ {R S} (\boldsymbol {X}, c) - q _ {\boldsymbol {X}}, 0) \\ \max  _ {\boldsymbol {X} ^ {\prime} \in S _ {\boldsymbol {X}}} g ^ {R S} (\boldsymbol {X} ^ {\prime}, c) \leq \min  (g ^ {R S} (\boldsymbol {X}, c) + q _ {\boldsymbol {X}}, 1). \\ \end{array}
$$
where  $q_{X} \coloneqq 1 - \prod_{j=1}^{R} q_{x_{i_j}}$ . Equivalently, this says
$$
\left| g ^ {R S} \left(\boldsymbol {X} ^ {\prime}, c\right) - g ^ {R S} (\boldsymbol {X}, c) \right| \leq q _ {\boldsymbol {X}}, \quad \text {a n y l a b e l} c \in \mathcal {Y}.
$$
The idea is that, with the randomized smoothing, the difference between  $g^{\mathrm{RS}}(\mathbf{X}', c)$  and  $g^{\mathrm{RS}}(\mathbf{X}, c)$  is
at most  $q_{\mathbf{X}}$  for any adversarial candidate  $\mathbf{X}' \in S_{\mathbf{X}}$ . Therefore, we can give adversarial upper and lower bounds of  $g^{\mathrm{RS}}(\mathbf{X}', c)$  by  $g^{\mathrm{RS}}(\mathbf{X}, c) \pm q_{\mathbf{X}}$ , which, importantly, avoids the difficult adversarial optimization of  $g^{\mathrm{RS}}(\mathbf{X}', c)$  on  $\mathbf{X}' \in S_{\mathbf{X}}$ , and instead just needs to evaluate  $g^{\mathrm{RS}}(\mathbf{X}, c)$  at the original input  $\mathbf{X}$ .
We are ready to describe a practical criterion for checking the certified robustness.
Proposition 1. For a sentence  $X$  and its label  $y$ , we define
$$
y _ {B} = \arg \max  _ {c \in \mathcal {Y}, c \neq y} g ^ {R S} (\boldsymbol {X}, c).
$$
Then under the condition of Theorem 1, we can certify that  $f(\pmb{X}^{\prime}) = f(\pmb{X}) = y$  for any  $\pmb{X}^{\prime} \in S_{\pmb{X}}$  if
$$
\Delta_ {X} \stackrel {\text {d e f}} {=} g ^ {R S} (X, y) - g ^ {R S} (X, y _ {B}) - 2 q _ {X} > 0. \tag {2}
$$
Therefore, certifying whether the model gives consistently correct prediction reduces to checking if  $\Delta_{\mathbf{X}}$  is positive, which can be easily achieved with Monte Carlo estimation as we show in the sequel.
Estimating  $g^{\mathrm{RS}}(\mathbf{X},c)$  and  $\Delta_{\mathbf{X}}$  Recall that  $g^{\mathrm{RS}}(\mathbf{X},c) = \mathbb{P}_{\mathbf{Z}\sim \Pi_{\mathbf{X}}} (f(\mathbf{Z}) = c)$ . We can estimate  $g^{\mathrm{RS}}(\mathbf{X},c)$  with a Monte Carlo estimator  $\sum_{i=1}^{n} \mathbb{I}\{f(\mathbf{Z}^{(i)}) = c\}/n$ , where  $\mathbf{Z}^{(i)}$  are i.i.d. samples from  $\Pi_{\mathbf{X}}$ . And  $\Delta_{\mathbf{X}}$  can be approximated accordingly. Using concentration inequality, we can quantify the non-asymptotic approximation error. This allows us to construct rigorous statistical procedures to reject the null hypothesis that  $f^{\mathrm{RS}}$  is not certified robust at  $\mathbf{X}$  (i.e.,  $\Delta_{\mathbf{X}} \leq 0$ ) with a given significance level (e.g.,  $1\%$ ). See Appendix A.1 for the algorithmic details of the testing procedure.
We can see that our procedure is structure-free in that it only requires the black-box assessment of the output  $f(\mathbf{Z}^{(i)})$  of the random inputs, and does not require any other structural information of  $f$  and  $f^{\mathrm{RS}}$ , which makes our method widely applicable to various types of complex models.
Tightness A key question is if our bounds are sufficiently tight. The next theorem shows that the lower/upper bounds in Theorem 1 are tight and can not be further improved unless further information of the model  $f$  or  $f^{\mathrm{RS}}$  is acquired.
Theorem 2. (Tightness) Assume the conditions of Theorem 1 hold. For a model  $f$  that satisfies  $f^{RS}(\mathbf{X}) = y$  and  $y_B$  as defined in Proposition 1, there exists a model  $f_*$  such that its related smoothed classifier  $g_*^{RS}$  satisfies  $g_*^{RS}(\mathbf{X}, c) =$
Figure 1: A pipeline of the proposed robustness certification approach.
$g^{RS}(\pmb {X},c)$  for  $c = y$  and  $c = y_{B}$  ,and
$$
\min  _ {\boldsymbol {X} ^ {\prime} \in S _ {\boldsymbol {X}}} g _ {*} ^ {R S} (\boldsymbol {X} ^ {\prime}, y) = \max  (g _ {*} ^ {R S} (\boldsymbol {X}, y) - q _ {\boldsymbol {X}}, 0)
$$
$$
\max _ {\pmb {X} ^ {\prime} \in S _ {X}} g _ {*} ^ {R S} (\pmb {X} ^ {\prime}, y _ {B}) = \min (g _ {*} ^ {R S} (\pmb {X}, y _ {B}) + q _ {\pmb {X}}, 1),
$$
where  $q_{X}$  is defined in Theorem 1.
In other words, if we access  $g^{\mathrm{RS}}$  only through the evaluation of  $g^{\mathrm{RS}}(\mathbf{X},y)$  and  $g^{\mathrm{RS}}(\mathbf{X},y_B)$ , then the bounds in Theorem 1 are the tightest possible that we can achieve, because we can not distinguish between  $g^{\mathrm{RS}}$  and the  $g_*^{\mathrm{RS}}$  in Theorem 2 with the information available.
3.2 Practical Algorithm
Figure 1 visualizes the pipeline of the proposed approach. Given the synonym sets  $S_{\mathbf{X}}$ , we generate the perturbation sets  $P_{\mathbf{X}}$  from it. When an input sentence  $\mathbf{X}$  arrives, we draw perturbed sentences  $\{\mathbf{Z}^{(i)}\}$  from  $\Pi_{\mathbf{X}}$  and average their outputs to estimate  $\Delta_{\mathbf{X}}$ , which is used to decide if the model is certified robust for  $\mathbf{X}$ .
Training the Base Classifier  $f$  Our method needs to start with a base classifier  $f$ . Although it is possible to train  $f$  using standard learning techniques, the result can be improved by considering that the method uses the smoothed  $f^{\mathrm{RS}}$ , instead of  $f$ . To improve the accuracy of  $f^{\mathrm{RS}}$ , we introduce a data augmentation induced by the perturbation set. Specifically, at each training iteration, we first sample a mini-batch of data points (sentences) and randomly perturbing the sentences using the perturbation distribution  $\Pi_{\mathbf{X}}$ . We then apply gradient descent on the model based on the perturbed minibatch. Similar training procedures were also used for Gaussian-based random smoothing on continuous inputs (see e.g., Cohen et al., 2019).
Our method can easily leverage powerful pretrained models such as BERT. In this case, BERT is used to construct feature maps and only the top layer weights are finetuned using the data augmentation method.
We test our method on both IMDB (Maas et al., 2011) and Amazon (McAuley, 2013) text classification tasks, with various types of models, including text CNN (Kim, 2014), Char-CNN (Zhang et al., 2015) and BERT (Devlin et al., 2019). We compare with the recent IBP-based methods (Jia et al., 2019; Huang et al., 2019) as baselines. Text CNN (Kim, 2014) was used in Jia et al. (2019) and achieves the best result therein. All the baseline models are trained and tuned using the schedules recommended in the corresponding papers. We consider the case when  $R = L$  during attacking, which means all words in the sentence can be perturbed simultaneously by the attacker. Code for reproducing our results can be found in https://github.com/ lushleaf/Structure-free-certified-NLP.
Synonym Sets Similar to Jia et al. (2019); Alzantot et al. (2018), we construct the synonym set  $S_{x}$  of word  $x$  to be the set of words with  $\geq 0.8$  cosine similarity in the GLOVE vector space. The word vector space is constructed by post-processing the pretrained GLOVE vectors (Pennington et al., 2014) using the counter-fitted method (Mrksic et al., 2016) and the "all-but-the-top" method (Mu and Viswanath, 2018) to ensure that synonyms are near to each other while antonyms are far apart.
Perturbation Sets We say that two words  $x$  and  $x'$  are connected synonymously if there exists a path of words  $x = x_1, x_2, \ldots, x_\ell = x'$ , such that all the successive pairs are synonymous. Let  $B_x$  to be the set of words connected to  $x$  synonymously. Then we define the perturbation set  $P_x$  to consist of the top  $K$  words in  $B_x$  with the largest GLOVE cosine similarity if  $|B_x| \geq K$ , and set  $P_x = B_x$  if  $|B_x| < K$ . Here  $K$  is a hyper-parameter that controls the size of  $P_x$  and hence trades off the smoothness and accuracy of  $f^{\mathrm{RS}}$ . We use  $K = 100$  by default and investigate its effect in Section 4.2.
Method	IMDB	Amazon
Jia et al. (2019)	79.74	14.00
Huang et al. (2019)	78.74	12.36
Ours	81.16	24.92
Evaluation Metric We evaluate the certified robustness of a model  $f^{\mathrm{RS}}$  on a dataset with the certified accuracy (Cohen et al., 2019), which equals the percentage of data points on which  $f^{\mathrm{RS}}$  is certified robust, which, for our method, holds when  $\Delta_{\mathbf{X}} > 0$  can be verified.
We first demonstrate that adversarial word substitution is able to give strong attack in our experimental setting. Using IMDB dataset, we attack the vanilla BERT (Devlin et al., 2019) with the adversarial attacking method of Jin et al. (2020). The vanilla BERT achieves a  $91\%$  clean accuracy (the testing accuracy on clean data without attacking), but only a  $20.1\%$  adversarial accuracy (the testing accuracy under the particular attacking method by Jin et al. (2020)). We will show later that our method is able to achieve  $87.35\%$  certified accuracy and thus the corresponding adversarial accuracy must be higher or equal to  $87.35\%$ .
We compare our method with IBP (Jia et al., 2019; Huang et al., 2019). in Table 1. We can see that our method clearly outperforms the baselines. In particular, our approach significantly outperforms IBP on Amazon by improving the  $14.00\%$  baseline to  $24.92\%$ .
Thanks to its structure-free property, our algorithm can be easily applied to any pre-trained models and character-level models, which is not easily achievable with Jia et al. (2019) and Huang et al. (2019). Table 2 shows that our method can further improve the result using Char-CNN (a character-level model) and BERT (Devlin et al., 2019), achieving an  $87.35\%$  certified accuracy on IMDB. In comparison, the IBP baseline only achieves a  $79.74\%$  certified accuracy under the same setting.
4.2 Trade-Off between Clean Accuracy and Certified Accuracy
We investigate the trade-off between smoothness and accuracy while tuning  $K$  in Table 3. We can
Table 1: The certified accuracy of our method and the baselines on the IMDB and Amazon dataset.
Method	Model	Accuracy
Jia et al. (2019)	CNN	79.74
Huang et al. (2019)	CNN	78.74
Ours	CNN	81.16
Char-CNN	82.03
BERT	87.35
see that the clean accuracy decreases when  $K$  increases, while the gap between the clean accuracy and certified accuracy, which measures the smoothness, decreases when  $K$  increases. The best certified accuracy is achieved when  $K = 100$ .
Table 2: The certified accuracy of different models and methods on the IMDB dataset.
K	20	50	100	250	1000
Clean (%)	88.47	88.48	88.09	84.83	67.54
Certified (%)	65.58	77.32	81.16	79.98	65.13
Table 3: Results of the smoothed model  $f^{\mathrm{RS}}$  with different  $K$  on IMDB using text CNN. "Clean" represents the accuracy on the clean data without adversarial attacking and "Certified" the certified accuracy.
We proposed a robustness certification method, which provably guarantees that all the possible perturbations cannot break down the system. Compared with previous work such as Jia et al. (2019); Huang et al. (2019), our method is structure-free and thus can be easily applied to any pre-trained models (such as BERT) and character-level models (such as Char-CNN).
The construction of the perturbation set is of critical importance to our method. In this paper, we used a heuristic way based on the synonym network to construct the perturbation set, which may not be optimal. In further work, we will explore more efficient ways for constructing the perturbation set. We also plan to generalize our approach to achieve certified robustness against other types of adversarial attacks in NLP, such as the out-of-list attack. An naïve way is to add the "OOV" token into the synonyms set of every word, but potentially better procedures can be further explored.
This work is supported in part by NSF CRII 1830161 and NSF CAREER 1846421.