Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/BklIxyHKDr/BklIxyHKDr.md +466 -0
- parse/train/BklIxyHKDr/BklIxyHKDr_content_list.json +0 -0
- parse/train/BklIxyHKDr/BklIxyHKDr_middle.json +0 -0
- parse/train/BklIxyHKDr/BklIxyHKDr_model.json +0 -0
- parse/train/HyEtjoCqFX/HyEtjoCqFX.md +499 -0
- parse/train/HyEtjoCqFX/HyEtjoCqFX_middle.json +0 -0
- parse/train/HyEtjoCqFX/HyEtjoCqFX_model.json +0 -0
- parse/train/LVWcGZr-8h/LVWcGZr-8h.md +322 -0
- parse/train/LVWcGZr-8h/LVWcGZr-8h_content_list.json +1401 -0
- parse/train/LVWcGZr-8h/LVWcGZr-8h_middle.json +0 -0
- parse/train/LVWcGZr-8h/LVWcGZr-8h_model.json +0 -0
- parse/train/SJlbyCNtPr/SJlbyCNtPr.md +466 -0
- parse/train/SJlbyCNtPr/SJlbyCNtPr_content_list.json +0 -0
- parse/train/SJlbyCNtPr/SJlbyCNtPr_middle.json +0 -0
- parse/train/SJlbyCNtPr/SJlbyCNtPr_model.json +0 -0
- parse/train/r1xMH1BtvB/r1xMH1BtvB.md +354 -0
- parse/train/r1xMH1BtvB/r1xMH1BtvB_content_list.json +0 -0
- parse/train/r1xMH1BtvB/r1xMH1BtvB_middle.json +0 -0
- parse/train/r1xMH1BtvB/r1xMH1BtvB_model.json +0 -0
- parse/train/rkgKBhA5Y7/rkgKBhA5Y7_content_list.json +0 -0
parse/train/BklIxyHKDr/BklIxyHKDr.md
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DEEP K-NN FOR NOISY LABELS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Modern machine learning models are often trained on examples with noisy labels that hurt performance and are hard to identify. In this paper, we provide an empirical study showing that a simple $k$ -nearest neighbor-based filtering approach on the logit layer of a preliminary model can remove mislabeled training data and produce more accurate models than some recently proposed methods. We also provide new statistical guarantees into its efficacy.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Machine learned models can only be as good as the data they were used to train on. With increasingly large modern datasets and automated and indirect labels like clicks, it is becoming ever more important to investigate and provide effective techniques to handle noisy labels.
|
| 12 |
+
|
| 13 |
+
We revisit the classical method of filtering out suspicious training examples using $k$ -nearest neighbors ( $k$ -NN) (Wilson, 1972). Like Papernot & McDaniel (2018), we apply $k$ -NN on the learned intermediate representation of a preliminary model, which adds robustness. In fact, the $k$ -nearest neighbor approach has recently been receiving attention for its robustness properties (Wang et al., 2018; Reeve & Kaban, 2019) and as an auxiliary strategy for modern machine learning (Jiang et al., 2018).
|
| 14 |
+
|
| 15 |
+
The main contributions of this paper are:
|
| 16 |
+
|
| 17 |
+
• Experimentally showing that identifying mislabeled examples by $k$ -NN executed on an intermediate layer of a preliminary deep model works well compared to state-of-art methods for handling noisy labels across noise levels, and is robust to the choice of $k$ . • Theoretically showing that $k$ -NN’s predictions will only identify a training example as clean if its label is the Bayes-optimal label. We also provide finite-sample analysis in terms of the margin and how spread out the corrupted labels are (Theorem 1), rates of convergence for the margin (Theorem 2) and rates under Tsybakov’s noise condition (Theorem 3) with all rates matching minimax-optimal rates in the noiseless setting.
|
| 18 |
+
|
| 19 |
+
Our work shows that even though the preliminary neural network is trained with corrupted labels, it still yields intermediate representations that are useful for $k$ -nearest neighbor filtering. Given labels which are in high disagreement, one can either automatically remove them and retrain on the remaining, or send to a human operator for further review. This strategy is also be useful in human-in-the-loop systems where one can warn the human annotator that a label is suspicious, and automatically propose new labels based on its nearest neighbors’ labels.
|
| 20 |
+
|
| 21 |
+
In addition to strong empirical performance, deep $k$ -NN filtering has a couple of advantages. Firstly, many methods require a clean set of samples whose labels can be trusted. Here we show that the $k$ -NN based method is robust and does not require such a clean set of samples. Second, while $k$ -NN does introduce the hyperparameter $k$ , we will show that deep $k$ -NN filtering is stable to the choice of $k$ : such robustness to hyperparameters is highly desirable as optimal tuning for this problem is often not available in practice (i.e. when no clean validation set is available).
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
We review relevant prior work in training on noisy labels and related $k$ -NN theory.
|
| 26 |
+
|
| 27 |
+
# 2.1 TRAINING WITH NOISY LABELS
|
| 28 |
+
|
| 29 |
+
Methods to handle label noise can be classified into two main strategies: (i) explicitly identify and remove the noisy examples, and (ii) indirectly handle the noise with robust training methods.
|
| 30 |
+
|
| 31 |
+
Data Cleaning This proposal fits into the broad family of data cleaning methods, in that our proposal detects and filters dirty data (see Chu et al. (2016) for a recent survey). The use of $k$ -NN to “edit” training data has been popular since Wilson (1972) used it to throw away training examples that were not consistent with their $k = 3$ nearest neighbors. The idea of using a preliminary model to help identify mislabeled examples dates to at least Guyon et al. (1994), who proposed using the model to compute an information gain for each example and then suspecting ones with high gain. Other early work used a cross-validation set-up to train a classifier on part of the data, then use it to make a prediction on held-out training examples, and remove any examples if the prediction disagrees with the label; ensembles of models can also be used for the predictions. (Brodley & Freidl, 1999).
|
| 32 |
+
|
| 33 |
+
Noise Corruption Estimation For multi-class problems, a popular approach is to account for noisy labels by applying a confusion matrix after the model’s softmax layer (Sukhbaatar et al., 2014). Such methods rely on a confusion matrix which is often unknown and must be estimated. Patrini et al. (2017) suggest deriving it from the softmax distribution of the model trained on noisy data while Goldberger & Ben-Reuven (2016); Jindal et al. (2016); Han et al. (2018) give alternatives. Accurate estimates are generally hard to attain when only untrusted data is available. Hendrycks et al. (2018) achieves more accurate estimates in the setting where some amount of known clean, trusted data is available. Xiao et al. (2015); Khetan et al. (2017); Vahdat (2017) use EM-type algorithms to estimate the clean label distribution.
|
| 34 |
+
|
| 35 |
+
Noise-Robust Training Natarajan et al. (2013) propose a method to make any surrogate loss function noise-robust given knowledge of the corruption rates. Ghosh et al. (2017) proves that losses like mean absolute error (MAE) are inherently robust under symmetric or uniform label noise while Zhang & Sabuncu (2018) shows that training with MAE results in poor convergence and accuracy. They propose a new loss function based on the negative Box-Cox transformation that trades off the noise-robustness of MAE with the training efficiency of cross-entropy. Lastly, the ramp, unhinged, and savage losses have been proposed and theoretically justified to be noise-robust for support vector machines (Brooks, 2011; Van Rooyen et al., 2015; Masnadi-Shirazi & Vasconcelos, 2009). Rolnick et al. (2017) empirically shows that deep learning models are robust to noise when there are enough correctly labeled examples and when the model capacity and training batch size are sufficiently large.
|
| 36 |
+
|
| 37 |
+
Auxiliary Models Veit et al. (2017) propose learning a label cleaning network on trusted data by predicting the differences between clean and noisy labels. Li et al. (2017) suggests training on a weighted average between noisy labels and distilled predictions of an auxiliary model trained on trusted data.
|
| 38 |
+
|
| 39 |
+
Example Weighting Here we make a hard decision about whether to keep a training example, but one can also adapt the weights on training examples based on the confidence in their labels. Liu & Tao (2015) provides an importance-weighting scheme for binary classification. Ren et al. (2018) suggests upweighting examples whose loss gradient is aligned with those of trusted examples at every step in training. Jiang et al. (2017) investigates a recurrent network that learns a sample weighting scheme to give to the base model.
|
| 40 |
+
|
| 41 |
+
# 2.2 $k$ -NEAREST NEIGHBOR THEORY
|
| 42 |
+
|
| 43 |
+
The theory of $k$ -nearest neighbor classification has a long history, for example: Fix & Hodges Jr (1951); Cover (1968); Stone (1977); Devroye et al. (1994); Chaudhuri & Dasgupta (2014). Much of the prior work focuses on $k$ -NN’s statistical consistency properties. However, with the growing interest in adversarial examples and learning with noisy labels, there have recently been analyses of $k$ -nearest neighbor methods in these settings. Wang et al. (2018) analyze the robustness of $k$ -NN classification and provide a robust variant of 1-NN classification where their notion of robustness is that predictions of nearby points should be similar. Gao et al. (2016) provides an analysis of the $k$ -NN classifier under noisy labels and like us, show that $k$ -NN can attain similar rates in the noisy setting as in the noiseless setting. Gao et al. (2016) assumes a noise model where labels are corrupted uniformly at random, while we assume an arbitrary corruption pattern and provide results based on a notion of how spread out the corrupted points are. Moreover, we provide finite-sample bounds borrowing recent advances in $k$ -NN convergence theory in the noiseless setting (Jiang, 2019) while the guarantees of Gao et al. (2016) are asymptotic. Reeve & Kaban (2019) provide stronger guarantees on a robust modification of $k$ -NN proposed by Gao et al. (2016). To the best of our knowledge, we provide the first finite-sample rates of consistency for the classical $k$ -NN method in the noisy setting with very little assumptions on the label noise.
|
| 44 |
+
|
| 45 |
+
# 3 ALGORITHM
|
| 46 |
+
|
| 47 |
+
We first define the $k$ -nearest neighbor classifier:
|
| 48 |
+
|
| 49 |
+
Definition 1 ( $k$ -NN). Let the $k$ -NN radius of $x \in \mathcal { X }$ be $r _ { k } ( x ) : = \operatorname* { i n f } \{ r : | B ( x , r ) \cap X | \geq k \}$ where $B ( x , r ) : = \{ x ^ { \prime } \in \mathcal { X } : | x - x ^ { \prime } | \leq r \}$ and the $k$ -NN set of $x \in \mathcal { X }$ be $N _ { k } ( x ) : = B ( x , r _ { k } ( x ) ) \cap X$ . Then for all $x \in \mathcal { X }$ , the $k$ -NN classifier function w.r.t. $X$ has discriminant function
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\eta _ { k } ( y ; x ) : = \frac { 1 } { \vert N _ { k } ( x ) \vert } \sum _ { i = 1 } ^ { n } 1 \left[ y _ { i } = y , x _ { i } \in N _ { k } ( x ) \right] ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
with prediction $\eta _ { k } ( x ) : = \arg \operatorname* { m a x } _ { y } \eta _ { k } ( y ; x )$ .
|
| 56 |
+
|
| 57 |
+
Our method Algorithm 1 assumes a dataset $\mathcal { D } _ { \mathrm { n o i s y } }$ with potentially noisy labels, along with a dataset $\mathcal { D } _ { \mathrm { c l e a n } }$ consisting of clean or trusted labels. Note that we allow $\mathcal { D } _ { \mathrm { c l e a n } }$ to be empty (i.e. in instances where no such trusted data is available). We have found that having $\mathcal { D } _ { \mathrm { c l e a n } }$ becomes important when $\mathcal { D } _ { \mathrm { n o i s y } }$ has a high corruption rate; otherwise the representations learned by training on $\mathcal { D } _ { \mathrm { n o i s y } }$ alone are often reasonable enough. The procedure begins by training on either $\mathcal { D } _ { \mathrm { n o i s y } } \cup \mathcal { D } _ { \mathrm { c l e a n } }$ or $\mathcal { D } _ { \mathrm { c l e a n } }$ . For our experiments, we partition $\mathcal { D } _ { \mathrm { c l e a n } }$ into a training set $\mathcal { D } _ { c t }$ and validation set $\mathcal { D } _ { c v }$ and train models on $\mathcal { D } _ { c t }$ and $\mathcal { D } _ { \mathrm { n o i s y } } \cup \mathcal { D } _ { c t }$ and choose the one that performs better on $\mathcal { D } _ { c v }$ .
|
| 58 |
+
|
| 59 |
+
We then filter examples that disagree with the $k$ -NN classifier prediction, where the $k$ -NN is computed on the final logit layer of the trained model (i.e. the layer right before softmax).
|
| 60 |
+
|
| 61 |
+
# Algorithm 1 Filtering datapoints via deep $k$ -NN.
|
| 62 |
+
|
| 63 |
+
<table><tr><td>Inputs: Dnoisy, Dclean, k</td></tr><tr><td>Train model M on either Dnoisy U Dclean Or Dclean·</td></tr><tr><td>Let N be the activations of Dnoisy U Dclean on the logit layer of M.</td></tr><tr><td>Dfiltered := {(x,y) ∈ N : nk(x) = y},where nk is computed w.r.t. N. Train final model on Dfiltered UDc.</td></tr></table>
|
| 64 |
+
|
| 65 |
+
# 4 THEORETICAL ANALYSIS
|
| 66 |
+
|
| 67 |
+
For the theoretical analysis, we assume the binary classification problem with the features defined on compact set $\mathcal { X } \subseteq \mathbb { R } ^ { D }$ . We assume that points are drawn according to distribution $\mathcal { F }$ as follows: the features come from distribution $\mathbb { P } _ { \mathcal { X } }$ on $\mathcal { X }$ and the labels are distributed according to the measurable conditional probability function $\eta : \mathcal { X } [ 0 , 1 ]$ . That is, a sample $( X , Y )$ is drawn from $\mathcal { F }$ as follows: $X$ is drawn according to $\mathbb { P } _ { \mathcal { X } }$ and $Y$ is chosen according to $\mathbb { P } ( Y = 1 | X = x ) = \eta ( x )$ .
|
| 68 |
+
|
| 69 |
+
The goal will be to show that given corrupted examples, the $k$ -NN disagreement method is still able to identify the examples whose labels do not match that of the Bayes-optimal label.
|
| 70 |
+
|
| 71 |
+
We will make a few regularity assumptions for our analysis to hold. The first regularity assumption ensures that the support $\mathcal { X }$ does not become arbitrarily thin anywhere. This is a standard nonparametric assumption (e.g. Singh et al. (2009); Jiang (2019)).
|
| 72 |
+
|
| 73 |
+
Assumption 1 (Support Regularity). There exists $\omega > 0$ and $r _ { 0 } > 0$ such that ${ V o l } ( \mathcal { X } \cap B ( x , r ) ) \geq$ $\boldsymbol { \omega } \cdot V o l ( B ( x , r ) )$ for all $x \in \mathcal { X }$ and $0 < r < r _ { 0 }$ , where $B ( x , r ) : = \{ x ^ { \prime } \in \mathcal { X } : | x - x ^ { \prime } | \leq r \}$ .
|
| 74 |
+
|
| 75 |
+
Let $p _ { \mathcal { X } }$ be the density function corresponding to $\mathbb { P } _ { \mathcal { X } }$ . The next assumption ensures that with a sufficiently large sample, we will obtain a good covering of the input space.
|
| 76 |
+
|
| 77 |
+
Assumption 2 $\overset { \cdot } { p } _ { \mathcal { X } }$ bounded from below). $p _ { X , 0 } : = \operatorname* { i n f } _ { x \in \mathcal { X } } p _ { X } ( x ) > 0 .$ .
|
| 78 |
+
|
| 79 |
+
Finally, we make a smoothness assumption on $\eta$ , as done in other analyses of $k$ -NN classification (e.g. Chaudhuri & Dasgupta (2014); Reeve & Kaban (2019))
|
| 80 |
+
|
| 81 |
+
Assumption 3 $\overline { { \eta } }$ Holder continuous) ¨ . There exists $0 \textless \alpha \leq 1$ and $C _ { \alpha } \ > \ 0$ such that $| \eta ( x ) -$ $\eta ( x ^ { \prime } ) \vert \leq C _ { \alpha } \vert x - x ^ { \prime } \vert ^ { \alpha }$ for all $x , x ^ { \prime } \in { \mathcal { X } }$ .
|
| 82 |
+
|
| 83 |
+
We propose a notion of how spread out a set of points is based on the minimum pairwise distance between the points. This will be a quantity in the finite-sample bounds we will present. Intuitively, the more spread out a contaminated set of points is, the less clean samples we will be needed to overcome the contamination of that set.
|
| 84 |
+
|
| 85 |
+
Definition 2 (Minimum pairwise distance).
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
S _ { 2 } ( C ) : = \operatorname* { m i n } _ { \substack { x , x ^ { \prime } \in C , x \neq x ^ { \prime } } } | x - x ^ { \prime } | .
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Also define the $\Delta$ -interior region of $\mathcal { X }$ where there is at least $\Delta$ margin in the probabilistic label:
|
| 92 |
+
|
| 93 |
+
Definition 3. Let $\Delta \geq 0$ . Define $\begin{array} { r } { \mathcal { X } ^ { \Delta } : = \{ x \in \mathcal { X } : \left| \frac { 1 } { 2 } - \eta ( x ) \right| \geq \Delta \} . } \end{array}$
|
| 94 |
+
|
| 95 |
+
We now state the result, which says that with high probability uniformly on $\chi ^ { \Delta }$ when $\Delta > 0$ is known, we have that the label disagrees with the $k$ -NN classifier if and only if the label is not the Bayes-optimal prediction. Due to space, all of the proofs have been deferred to the Appendix.
|
| 96 |
+
|
| 97 |
+
Theorem 1 (Fixed $\Delta$ ). Let $\Delta , \delta \ > \ 0$ and suppose Assumptions 1, 2, and $^ 3$ hold. There exists constants $K _ { l } , K _ { u } > 0$ depending only on $\mathcal { F }$ such that the following holds with probability at least $1 - \delta$ . Let $X _ { [ n ] }$ be $n$ (uncorrupted) examples drawn from the $\mathcal { F }$ and $C$ be a set of points with corrupted labels and denote our sample $X : = X _ { [ n ] } \cup C$ . Suppose $k$ lies in the following range
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
K _ { l } \cdot \frac { 1 } { \Delta ^ { 2 } } \cdot \log ^ { 2 } ( 1 / \delta ) \cdot \log n \leq k \leq K _ { u } \cdot \operatorname* { m i n } \{ S _ { 2 } ( C ) ^ { D } , \Delta ^ { D / \alpha } \} \cdot n ,
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
then the following holds uniformly over $x \in \mathcal { X } ^ { \Delta }$ : the $k$ -NN prediction computed w.r.t. $X$ agrees with the label if and only if the label is the Bayes-optimal label $\eta ^ { * } ( x ) : = 1 [ \eta ( x ) \geq \frac { 1 } { 2 } ]$ .
|
| 104 |
+
|
| 105 |
+
In the last result, we assumed that $\Delta$ was fixed. We next show how we can make a similar guarantee but show that we can take $\Delta 0$ as we choose $k , n \infty$ appropriately and provide rates of convergence.
|
| 106 |
+
|
| 107 |
+
Theorem 2 (Rates of convergence for $\Delta$ ). Let $\delta > 0$ and suppose Assumptions 1, 2, and 3 hold. There exist constants $K _ { l } , K _ { u } , K ~ > ~ 0$ depending only on $\mathcal { F }$ such that the following holds with probability at least $1 - \delta$ . Let $X _ { [ n ] }$ be $n$ (uncorrupted) examples drawn from $\mathcal { F }$ , and $C$ be a set of points with corrupted labels and denote our sample $X : = X _ { [ n ] } \cup C$ . Suppose $k$ lies in the following range
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
K _ { l } \cdot \log ^ { 2 } ( 1 / \delta ) \cdot n ^ { \frac { \alpha } { \alpha + D } } \leq k \leq K _ { u } \cdot S _ { 2 } ( C ) ^ { D } \cdot n ,
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
then the following holds uniformly over $x \in \mathcal { X } ^ { \Delta }$ : the $k$ -NN prediction computed w.r.t. $X$ agrees with the label if and only if the label is the Bayes-optimal label $\eta ^ { * } ( x ) : = 1 [ \eta ( x ) \geq \frac { 1 } { 2 } ]$ where
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\Delta = K \cdot \left( \sqrt { \frac { \log n + \log ( 1 / \delta ) } { k } } + \left( \frac { k } { n } \right) ^ { \alpha / D } \right) .
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
Remark 1. Choosing $k = { \cal { O } } ( n ^ { 2 \alpha / ( 2 \alpha + D ) } )$ in the above result gives us $\Delta = \widetilde { \cal O } ( n ^ { - \alpha / ( 2 \alpha + D ) } )$ . This rate for $\Delta$ is the minimax-optimal rate for $k$ -nearest neighbor classification on $\chi ^ { \Delta }$ given a sample of size $n$ (Chaudhuri $\&$ Dasgupta, 2014) in the uncorrupted setting. Thus, our analysis is tight up to logarithmic factors.
|
| 120 |
+
|
| 121 |
+
We next give results with an additional margin assumption, also known as Tsybakov’s noise condition (Mammen et al., 1999; Tsybakov et al., 2004):
|
| 122 |
+
|
| 123 |
+
Assumption 4 (Tsybakov Noise Condition). The following holds for some $C _ { \beta }$ and $\beta$ and all $\Delta > 0$
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\mathbb { P } _ { \mathcal { X } } ( x \notin \mathcal { X } ^ { \Delta } ) \le C _ { \beta } \cdot \Delta ^ { \beta } .
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+

|
| 130 |
+
Figure 1: Left: training samples. We observe that test accuracy improves as $S _ { 2 } ( C )$ increases (middle) and that fewer clean training samples are needed to achieve an accuracy of $90 \%$ (right).
|
| 131 |
+
|
| 132 |
+
Theorem 3 (Rates under Tsybakov Noise Condition). Let $\delta > 0$ and suppose Assumptions 1, 2, 3 and 4 hold. There exists constants $K _ { l } , K _ { u } , K , K ^ { \prime } > 0$ depending only on $\mathcal { F }$ such that the following holds with probability at least $1 - \delta$ . Let $X _ { [ n ] }$ be $n$ (uncorrupted) examples drawn from the $\mathcal { F }$ and $C$ be a set of points with corrupted labels and denote our sample $X : = X _ { [ n ] } \cup C$ . Suppose $k$ lies in the following range
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
K _ { l } \cdot \log ^ { 2 } ( 1 / \delta ) \cdot n ^ { \frac { \alpha } { \alpha + D } } \leq k \leq K _ { u } \cdot S _ { 2 } ( C ) ^ { D } \cdot n ,
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
and define $\eta _ { k } ( x ) : = \arg \operatorname* { m a x } _ { y } \eta _ { k } ( y ; x )$ . Then,
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\begin{array} { r } { \mathbb { P } \left( \eta _ { k } ( x ) \neq \eta ^ { * } ( x ) \right) \leq K \cdot \left( \sqrt { \frac { \log n + \log ( 1 / \delta ) } { k } } + \left( \frac { k } { n } \right) ^ { \alpha / D } \right) ^ { \beta } , } \\ { \quad R _ { X } - R ^ { * } \leq K ^ { \prime } \cdot \left( \sqrt { \frac { \log n + \log ( 1 / \delta ) } { k } } + \left( \frac { k } { n } \right) ^ { \alpha / D } \right) ^ { \beta + 1 } } \end{array}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
where $R _ { X } : = \mathbb { E } _ { \mathcal { F } } [ g _ { k } ( x ) \neq y ]$ and $R ^ { * } : = \mathbb { E } _ { \mathcal { F } } [ g ^ { * } ( x ) \neq y ]$ denote the risk of the $k$ -NN method and Bayes optimal classifier, respectively.
|
| 145 |
+
|
| 146 |
+
Remark 2. Choosing $k = { \cal { O } } ( n ^ { 2 \alpha / ( 2 \alpha + D ) } )$ in the above gives us a rate of $\widetilde { O } ( n ^ { - \alpha ( \beta + 1 ) / ( 2 \alpha + D ) } ) f o r$ the excess risk. This matches the lower bounds of Audibert et al. (2007) up to logarithmic factors.
|
| 147 |
+
|
| 148 |
+
# 4.1 IMPACT OF MINIMUM PAIRWISE DISTANCE
|
| 149 |
+
|
| 150 |
+
The minimum pairwise distance across corrupted samples, $S _ { 2 } ( C )$ , is a key quantity in the theory presented in the previous section. We now empirically study its significance in a simulated binary classification task in 2 dimensions. Clean samples with label $L$ are generated by sampling i.i.d from $\mathcal { N } ( \mu _ { L } , I _ { 2 \times 2 } )$ , where $\mu _ { 0 } = ( 0 , - 2 )$ and $\mu _ { 1 } = ( 0 , 2 )$ . The decision boundary is the line $y = 0$ . We take 100 samples uniformly spaced on a square grid centered about $( 0 , 0 )$ and corrupt them by flipping their true label. With this construction, $S _ { 2 } ( C )$ is precisely the grid width, which we let vary. The training set is a union of 100 clean samples and the 100 corrupted samples. Using 1000 clean samples as a test set we study the classification performance of a majority vote $k$ -NN classifier, where $k = 1 0$ . Results are shown in Figure 1. As expected, we see that as $S _ { 2 } ( C )$ decreases, so does test accuracy and we need more clean training samples to compensate.
|
| 151 |
+
|
| 152 |
+
# 5 EXPERIMENTS
|
| 153 |
+
|
| 154 |
+
We evaluate the effectiveness of our algorithm as follows. We split each dataset’s training set into two parts, $\mathcal { D } _ { \mathrm { c l e a n } }$ and $\mathcal { D } _ { \mathrm { n o i s y } }$ . We then corrupt the labels of some fraction of examples in $\mathcal { D } _ { \mathrm { n o i s y } }$ by applying a corruption matrix prescribed by one of the following methods.
|
| 155 |
+
|
| 156 |
+
• Uniform: The label is flipped to any one of the labels (including itself) with equal probability.
|
| 157 |
+
• Flip: The label is flipped to any other label with equal probability.
|
| 158 |
+
• Hard Flip: With probability $\begin{array} { l } { { \frac { 1 } { 2 } } } \end{array}$ , we flip the label $m$ to $\pi ( m )$ where $\pi$ is some predefined permutation of the labels.
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 2: UCI Results. Error plots against amount of noise applied to the labels of $\mathcal { D } _ { \mathrm { n o i s y } }$ . $\mathcal { D } _ { \mathrm { c l e a n } }$ contains $5 \%$ of the data. Each column is a different corruption and each row is for a different dataset. We see that the $k$ -NN method consistently chooses the best datapoints to filter leading to lower error. More results are in the Appendix.
|
| 162 |
+
|
| 163 |
+
We compare against the following baselines:
|
| 164 |
+
|
| 165 |
+
• Gold Loss Correction (GLC) (Hendrycks et al., 2018) estimates the corruption matrix by averaging the softmax outputs of the clean examples on a model trained on noisy data.
|
| 166 |
+
• Distill (Li et al., 2017) assigns each example in the combined dataset a “soft” label that is a convex combination of its label and its softmax output from a model trained solely on clean data.
|
| 167 |
+
• Forward (Patrini et al., 2017), similar in spirit to GLC, estimates the corruption matrix by training a model on noisy data and using the softmax output for prototype examples for each class. It does not require a clean dataset like other methods.
|
| 168 |
+
• Clean. We define this as training on the clean data only.
|
| 169 |
+
• Full. We define this as training on the full (clean and noisy) data.
|
| 170 |
+
• $k$ -NN Classify is like “Full” except we use $k$ -NN majority voting on the logits layer for classification at test time.
|
| 171 |
+
|
| 172 |
+
We report test errors and show the average across multiple runs with standard error bands shaded. Errors are computed on 11 uniformly distributed noise rates between 0 and 1 inclusive. For the results shown in the main text, we have that $\mathcal { D } _ { \mathrm { c l e a n } }$ is randomly selected and is $5 \%$ of the data. In the Appendix, we show results over different sizes of $\mathcal { D } _ { \mathrm { c l e a n } }$ . We implement all methods using the Tensorflow 2.0 Keras API and Scikit-Learn. We use the Adam optimizer with default learning rate 0.001 and a batch size of 128 across all experiments. For the UCI datasets, we set $k = 5 0$ and set $k = 5 0 0$ for all other datasets. We chose $k = 5 0$ for the UCI datasets because some of the datasets were of small size. However, we found that the $k$ -NN method’s performance was quite stable to the choice of $k$ , which we show in Section 5.4. We describe the permutations used for hard flipping in the Appendix.
|
| 173 |
+
|
| 174 |
+
# 5.1 UCI AND MNIST RESULTS
|
| 175 |
+
|
| 176 |
+
We show the results for one of the UCI datasets in Figure 2 and Fashion MNIST in Figure 3. Due to space, results for MNIST and the remaining UCI datasets are in the Appendix. For UCI, we use a fully-connected neural network with a single hidden layer of dimension 100 with ReLU activations and train for 100 epochs. For both MNIST datasets, we use is a two hidden-layer fully-connected neural network where each layer has 256 hidden units with ReLU activations. We train the model for 20 epochs. We see that the $k$ -NN approach attains models with a low error rate across noise rates and either outperforms or is competitive with the next best method, GLC.
|
| 177 |
+
|
| 178 |
+
# 5.2 CIFAR RESULTS
|
| 179 |
+
|
| 180 |
+
For CIFAR10/100 we use ResNet-20, which we train from scratch on single NVIDIA P100 GPUs. We train CIFAR10 for 100 epochs and CIFAR100 for 150 epochs. We show results for CIFAR10 in Figure 4 and results for CIFAR100 in the Appendix, due to space. We see that the $k$ -NN method performs competitively. It generally outperforms on the uniform and flip noise types but performs worse for the hard flip noise type. It is not too surprising that $k$ -NN would be weaker in the presence of hard flip noise (i.e. where labels are mapped based on a pre-determined mapping between labels) as the noise is much more structured in that case making it more difficult to be filtered out by majority vote among the neighbors. In other words, unlike the uniform and flip noise types, we are no longer dealing with white label noise in the hard flip noise type.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 3: Fashion MNIST. Each column is a different corruption method. We see that the $k$ -NN approach performs competitively. More results are in the Appendix.
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
Figure 4: CIFAR10. Each column is a different corruption method. We see that our $k$ -NN method performs competitively or outperforms on the uniform and flip noise types but performs worse for the hard flip noise type. More results are in the Appendix.
|
| 187 |
+
|
| 188 |
+
# 5.3 SVHN RESULTS
|
| 189 |
+
|
| 190 |
+
We show the results in Figure 5. We train ResNet-20 from scratch on NVIDIA P100 GPUs for 100 epochs. As in the CIFAR experiments, we see that the $k$ -NN method tends to be competitive in the uniform and flip noise types but does slightly worse in the hard flip.
|
| 191 |
+
|
| 192 |
+
# 5.4 ROBUSTNESS TO $k$
|
| 193 |
+
|
| 194 |
+
In this section, we show that our procedure is stable in its hyperparameter $k$ . The theoretical results suggest that a wide range of $k$ can give us statistical consistency guarantees and we show that in practice a wide range of $k$ gives us similar results for Algorithm 1 (Figure 6). Such robustness in
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 5: SVHN. We see that the $k$ -NN method performs competitively on the uniform and flip noise types but performs worse for the hard flip noise type. More results in the Appendix.
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan=1 colspan=1>Letters</td><td rowspan=1 colspan=1>1020</td><td rowspan=1 colspan=1>4.554.283.77</td><td rowspan=1 colspan=1>22.06</td><td rowspan=1 colspan=1>2.482.051.76</td><td rowspan=1 colspan=1>2.331.911.57</td><td rowspan=1 colspan=1>2.051.781.56</td><td rowspan=1 colspan=1>2.191.791.34</td><td rowspan=1 colspan=1>21.85</td><td rowspan=1 colspan=1>4.834.453.85</td><td rowspan=1 colspan=1>3.162.522.07</td><td rowspan=1 colspan=1>2.962.121.78</td><td rowspan=1 colspan=1>2.351.921.56</td><td rowspan=1 colspan=1>2.11.81.58</td><td rowspan=1 colspan=1>2.522.061.42</td><td rowspan=1 colspan=1>21.93</td><td rowspan=1 colspan=1>3.63.35</td><td rowspan=1 colspan=1>3.172.522.05</td><td rowspan=1 colspan=1>2.11.851.62</td><td rowspan=1 colspan=1>1.831.61.38</td><td rowspan=1 colspan=1>1.821.61.41</td><td rowspan=1 colspan=1>1.821.641.42</td><td rowspan=1 colspan=1>2.522.362.04</td></tr><tr><td rowspan=1 colspan=1>Phonemes</td><td rowspan=1 colspan=1>51020</td><td rowspan=1 colspan=1>7.897.867.72</td><td rowspan=1 colspan=1>1.911.541.34</td><td rowspan=1 colspan=1>1.791.531.33</td><td rowspan=1 colspan=1>2.121.671.35</td><td rowspan=1 colspan=1>1.261.161.13</td><td rowspan=1 colspan=1>2.582.281.76</td><td rowspan=1 colspan=1>32.852.24</td><td rowspan=1 colspan=1>7.917.957.89</td><td rowspan=1 colspan=1>1.931.541.34</td><td rowspan=1 colspan=1>3.212.751.97</td><td rowspan=1 colspan=1>2.161.691.35</td><td rowspan=1 colspan=1>1.341.221.16</td><td rowspan=1 colspan=1>3.973.642.87</td><td rowspan=1 colspan=1>4.313.963.28</td><td rowspan=1 colspan=1>6.66.736.36</td><td rowspan=1 colspan=1>1.921.551.33</td><td rowspan=1 colspan=1>1.771.611.45</td><td rowspan=1 colspan=1>1.961.61.3</td><td rowspan=1 colspan=1>1.21.151.14</td><td rowspan=1 colspan=1>1.781.621.38</td><td rowspan=1 colspan=1>2.72.582.28</td></tr><tr><td rowspan=1 colspan=1>Wilt</td><td rowspan=1 colspan=1>1020</td><td rowspan=1 colspan=1>5.184.684.31</td><td rowspan=1 colspan=1>0.560.430.36</td><td rowspan=1 colspan=1>0.850.750.86</td><td rowspan=1 colspan=1>0.540.450.35</td><td rowspan=1 colspan=1>0.390.320.32</td><td rowspan=1 colspan=1>0.930.770.57</td><td rowspan=1 colspan=1>1.861.771.5</td><td rowspan=1 colspan=1>5.275.635.18</td><td rowspan=1 colspan=1>0.560.440.34</td><td rowspan=1 colspan=1>3.893.142.67</td><td rowspan=1 colspan=1>0.530.430.35</td><td rowspan=1 colspan=1>0.520.410.34</td><td rowspan=1 colspan=1>5.154.864.23</td><td rowspan=1 colspan=1>4.954.844.32</td><td rowspan=1 colspan=1>4.64.785.63</td><td rowspan=1 colspan=1>0.550.430.34</td><td rowspan=1 colspan=1>0.730.660.61</td><td rowspan=1 colspan=1>0.580.430.36</td><td rowspan=1 colspan=1>0.390.310.3</td><td rowspan=1 colspan=1>0.980.780.57</td><td rowspan=1 colspan=1>1.91.811.49</td></tr><tr><td rowspan=1 colspan=1>Seeds</td><td rowspan=1 colspan=1>1020</td><td rowspan=1 colspan=1>3.293.432.99</td><td rowspan=1 colspan=1>4.223.042.69</td><td rowspan=1 colspan=1>3.712.842.27</td><td rowspan=1 colspan=1>4.22.992.74</td><td rowspan=1 colspan=1>3.082.141.72</td><td rowspan=1 colspan=1>2.872.742.44</td><td rowspan=1 colspan=1>新2.2</td><td rowspan=1 colspan=1>5.135.024.41</td><td rowspan=1 colspan=1>4.333.382.56</td><td rowspan=1 colspan=1>5.564.583.57</td><td rowspan=1 colspan=1>4.393.192.65</td><td rowspan=1 colspan=1>3.642.652.09</td><td rowspan=1 colspan=1>5.114.94.23</td><td rowspan=1 colspan=1>4.884.733.86</td><td rowspan=1 colspan=1>2.942.752.85</td><td rowspan=1 colspan=1>4.063.422.53</td><td rowspan=1 colspan=1>3.632.962.25</td><td rowspan=1 colspan=1>3.913.142.57</td><td rowspan=1 colspan=1>2.992.251.62</td><td rowspan=1 colspan=1>2.842.692.43</td><td rowspan=1 colspan=1>3.012.862.49</td></tr><tr><td rowspan=1 colspan=1>Iris</td><td rowspan=1 colspan=1>1020</td><td rowspan=1 colspan=1>292.46</td><td rowspan=1 colspan=1>3.232.481.85</td><td rowspan=1 colspan=1>3.482.591.97</td><td rowspan=1 colspan=1>3.972.251.52</td><td rowspan=1 colspan=1>2.461.320.6</td><td rowspan=1 colspan=1>1.721.260.96</td><td rowspan=1 colspan=1>2.051.551.32</td><td rowspan=1 colspan=1>5.255.064.46</td><td rowspan=1 colspan=1>3.382.531.51</td><td rowspan=1 colspan=1>5.154.583.45</td><td rowspan=1 colspan=1>4.032.241.38</td><td rowspan=1 colspan=1>3.022.171.46</td><td rowspan=1 colspan=1>4.323.983.36</td><td rowspan=1 colspan=1>4.434.083.53</td><td rowspan=1 colspan=1>2.92.62.51</td><td rowspan=1 colspan=1>3.292.341.84</td><td rowspan=1 colspan=1>3.132.021.48</td><td rowspan=1 colspan=1>4.11.861.34</td><td rowspan=1 colspan=1>2.321.150.58</td><td rowspan=1 colspan=1>1.140.910.65</td><td rowspan=1 colspan=1>1.351.161</td></tr><tr><td rowspan=1 colspan=1>Parkinsons</td><td rowspan=1 colspan=1>51020</td><td rowspan=1 colspan=1>55.354.88</td><td rowspan=1 colspan=1>3.463.263.01</td><td rowspan=1 colspan=1>3.263.223.08</td><td rowspan=1 colspan=1>4.223.453.1</td><td rowspan=1 colspan=1>3.43.212.98</td><td rowspan=1 colspan=1>3.263.222.97</td><td rowspan=1 colspan=1>3.763.823.52</td><td rowspan=1 colspan=1>5.175.435.19</td><td rowspan=1 colspan=1>3.553.383.02</td><td rowspan=1 colspan=1>4.494.253.94</td><td rowspan=1 colspan=1>4.13.443.05</td><td rowspan=1 colspan=1>3.363.322.95</td><td rowspan=1 colspan=1>5.345.274.99</td><td rowspan=1 colspan=1>5.355.135.06</td><td rowspan=1 colspan=1>4.985.245.1</td><td rowspan=1 colspan=1>362.98</td><td rowspan=1 colspan=1>3.563.13.01</td><td rowspan=1 colspan=1>4.593.372.98</td><td rowspan=1 colspan=1>3.683.112.96</td><td rowspan=1 colspan=1>3.283.122.91</td><td rowspan=1 colspan=1>3.633.823.47</td></tr><tr><td rowspan=1 colspan=1>MNIST</td><td rowspan=1 colspan=1>51020</td><td rowspan=1 colspan=1>22.07</td><td rowspan=1 colspan=1>0.690.50.35</td><td rowspan=1 colspan=1>1.030.850.69</td><td rowspan=1 colspan=1>0.50.410.34</td><td rowspan=1 colspan=1>0.40.330.27</td><td rowspan=1 colspan=1>2.722.421.97</td><td rowspan=1 colspan=1>2.752.452.03</td><td rowspan=1 colspan=1>32.48</td><td rowspan=1 colspan=1>0.690.50.35</td><td rowspan=1 colspan=1>1.911.50.86</td><td rowspan=1 colspan=1>0.50.420.34</td><td rowspan=1 colspan=1>0.440.350.27</td><td rowspan=1 colspan=1>3.463.12.36</td><td rowspan=1 colspan=1>3.493.142.41</td><td rowspan=1 colspan=1>2.031.861.54</td><td rowspan=1 colspan=1>0.690.50.35</td><td rowspan=1 colspan=1>0.780.670.53</td><td rowspan=1 colspan=1>0.220.210.2</td><td rowspan=1 colspan=1>0.290.260.22</td><td rowspan=1 colspan=1>0.650.480.36</td><td rowspan=1 colspan=1>2.141.981.67</td></tr><tr><td rowspan=1 colspan=1>Fashion MNIST</td><td rowspan=1 colspan=1>51020</td><td rowspan=1 colspan=1>22.07</td><td rowspan=1 colspan=1>1.881.711.56</td><td rowspan=1 colspan=1>1.731.61.48</td><td rowspan=1 colspan=1>1.591.521.45</td><td rowspan=1 colspan=1>1.561.521.44</td><td rowspan=1 colspan=1>2.532.211.95</td><td rowspan=1 colspan=1>2.542.32.05</td><td rowspan=1 colspan=1>3.553.142.38</td><td rowspan=1 colspan=1>1.871.711.56</td><td rowspan=1 colspan=1>2.552.131.54</td><td rowspan=1 colspan=1>1.591.531.46</td><td rowspan=1 colspan=1>1.61.541.46</td><td rowspan=1 colspan=1>3.32.922.17</td><td rowspan=1 colspan=1>3.312.992.27</td><td rowspan=1 colspan=1>21.92</td><td rowspan=1 colspan=1>1.871.711.56</td><td rowspan=1 colspan=1>1.621.521.43</td><td rowspan=1 colspan=1>1.441.411.38</td><td rowspan=1 colspan=1>1.481.461.41</td><td rowspan=1 colspan=1>2.312.192.04</td><td rowspan=1 colspan=1>2.42.221.97</td></tr><tr><td rowspan=1 colspan=1>CIFAR10</td><td rowspan=1 colspan=1>5200</td><td rowspan=1 colspan=1>6.746.586.4</td><td rowspan=1 colspan=1>76.585.52</td><td rowspan=1 colspan=1>6.866.325.66</td><td rowspan=1 colspan=1>5.435.395.11</td><td rowspan=1 colspan=1>5.035.274.57</td><td rowspan=1 colspan=1>6.346.115.93</td><td rowspan=1 colspan=1>6.746.556.36</td><td rowspan=1 colspan=1>7.146.826.62</td><td rowspan=1 colspan=1>7.26.565.59</td><td rowspan=1 colspan=1>7.126.725.9</td><td rowspan=1 colspan=1>5.525.625.16</td><td rowspan=1 colspan=1>5.355.324.85</td><td rowspan=1 colspan=1>6.716.486.1</td><td rowspan=1 colspan=1>7.126.836.56</td><td rowspan=1 colspan=1>5.084.894.77</td><td rowspan=1 colspan=1>7.136.535.45</td><td rowspan=1 colspan=1>5.855.34.68</td><td rowspan=1 colspan=1>3.763.913.51</td><td rowspan=1 colspan=1>4.274.43.82</td><td rowspan=1 colspan=1>4.334.214.03</td><td rowspan=1 colspan=1>4.964.894.75</td></tr><tr><td rowspan=1 colspan=1>CIFAR100</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>10.810.7910.78</td><td rowspan=1 colspan=1>10.229.949.38</td><td rowspan=1 colspan=1>9.989.79.15</td><td rowspan=1 colspan=1>9.599.42</td><td rowspan=1 colspan=1>9.579.63</td><td rowspan=1 colspan=1>9.179.098.92</td><td rowspan=1 colspan=1>9.299.259.07</td><td rowspan=1 colspan=1>10.7910.8110.8</td><td rowspan=1 colspan=1>10.249.899.44</td><td rowspan=1 colspan=1>10.039.689.13</td><td rowspan=1 colspan=1>9.649.468.97</td><td rowspan=1 colspan=1>9.669.639.17</td><td rowspan=1 colspan=1>9.29.18.92</td><td rowspan=1 colspan=1>9.299.259.09</td><td rowspan=1 colspan=1>10.6410.6510.66</td><td rowspan=1 colspan=1>10.239.899.41</td><td rowspan=1 colspan=1>9.889.388.65</td><td rowspan=1 colspan=1>8.588.568.07</td><td rowspan=1 colspan=1>8.989.198.81</td><td rowspan=1 colspan=1>7.487.447.33</td><td rowspan=1 colspan=1>8.047.997.9</td></tr><tr><td rowspan=1 colspan=1>SVHN</td><td rowspan=1 colspan=1>1020</td><td rowspan=1 colspan=1>5.044.984.32</td><td rowspan=1 colspan=1>3.522.21.83</td><td rowspan=1 colspan=1>3.563.22.67</td><td rowspan=1 colspan=1>1.992.272.14</td><td rowspan=1 colspan=1>1.621.341.2</td><td rowspan=1 colspan=1>4.644.513.96</td><td rowspan=1 colspan=1>4.954.824.41</td><td rowspan=1 colspan=1>34.85</td><td rowspan=1 colspan=1>281.83</td><td rowspan=1 colspan=1>4.093.723.09</td><td rowspan=1 colspan=1>2.172.291.9</td><td rowspan=1 colspan=1>2.051.481.19</td><td rowspan=1 colspan=1>5.234.964.34</td><td rowspan=1 colspan=1>5.525.294.82</td><td rowspan=1 colspan=1>82.7</td><td rowspan=1 colspan=1>4.172.411.85</td><td rowspan=1 colspan=1>2.162.011.54</td><td rowspan=1 colspan=1>0.890.880.98</td><td rowspan=1 colspan=1>1.351.040.98</td><td rowspan=1 colspan=1>2.322.161.83</td><td rowspan=1 colspan=1>3.042.982.74</td></tr></table>
|
| 200 |
+
|
| 201 |
+
hyperparameter is highly desirable because optimal tuning is often not available, especially when no sufficient clean validation set is available.
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Table 1: Area under the test error vs noise rate curve. Each row corresponds to a dataset and size of clean dataset $\mathcal { D } _ { \mathrm { c l e a n } }$ pair, where the size is a percentage of the total training set $5 \%$ , $10 \%$ , $20 \%$ ). Each column shows the area under the error curve across noise rates for a particular method and noise type (Uniform, Flip, Hard Flip). We see that the $k$ -NN method consistently outperforms the other methods for Uniform and Flip and outperforms the other methods on Hard Flip on the smaller datasets.
|
| 205 |
+
Figure 6: Performance across different values of $k$ . Here we show that on a UCI dataset, the performance of Algorithm 1 is stable when varying its hyperparameter $k$ . Note that the $y$ -axis has been zoomed in to better see the differences between the curves.
|
| 206 |
+
|
| 207 |
+
# 5.5 AREA UNDER ERROR VS NOISE LEVEL CURVE ACROSS DATASETS
|
| 208 |
+
|
| 209 |
+
In the figures shown so far, it may be difficult to compare the curves in some cases so we report an area under the curve metric in Table 1.
|
| 210 |
+
|
| 211 |
+
Conclusions and Open Questions We conclude from our experiments and theory that the $k$ -NN based method (Algorithm 1) is a relatively safe method to remove problematic training examples before training. While $k$ -NN methods can be sensitive to the choice of $k$ when used with small datasets (Garcia et al., 2009), we hypothesize that with today’s large datasets one can blithely set $k$ to a fixed practically medium-sized value (e.g. $k = 5 0 0$ ) as done here and expect reasonable performance. Theoretically we provided some new results for how well $k$ -NN can identify clean versus corrupted labels. Open theoretical questions are whether there are alternate notions of how to characterize the difficulty of a particular configuration of corrupted examples and whether we can provide both upper and lower learning bounds under these noise conditions.
|
| 212 |
+
|
| 213 |
+
# REFERENCES
|
| 214 |
+
|
| 215 |
+
Jean-Yves Audibert, Alexandre B Tsybakov, et al. Fast learning rates for plug-in classifiers. The Annals of Statistics, 35(2):608–633, 2007.
|
| 216 |
+
|
| 217 |
+
Carla E. Brodley and Mark A. Freidl. Identifying mislabeled training data. Journal Artificial Intelligence Research, 1999.
|
| 218 |
+
|
| 219 |
+
J Paul Brooks. Support vector machines with the ramp loss and the hard margin loss. Operations Research, 59(2):467–479, 2011.
|
| 220 |
+
|
| 221 |
+
Kamalika Chaudhuri and Sanjoy Dasgupta. Rates of convergence for nearest neighbor classification. In Advances in Neural Information Processing Systems, pp. 3437–3445, 2014.
|
| 222 |
+
|
| 223 |
+
Xu Chu, Ilhab F. Ilyas, Sanjay Krishnan, and Jiannan Wan. Data cleaning: Overview and emerging challenges. In SIGMOD, 2016.
|
| 224 |
+
|
| 225 |
+
Thomas M Cover. Rates of convergence for nearest neighbor procedures. In Proceedings of the Hawaii International Conference on Systems Sciences, pp. 413–415, 1968.
|
| 226 |
+
|
| 227 |
+
Luc Devroye, Laszlo Gyorfi, Adam Krzyzak, Gabor Lugosi, et al. On the strong universal consis- ´ tency of nearest neighbor regression function estimates. The Annals of Statistics, 22(3):1371– 1385, 1994.
|
| 228 |
+
|
| 229 |
+
Evelyn Fix and Joseph L Hodges Jr. Discriminatory analysis-nonparametric discrimination: consistency properties. Technical report, California Univ Berkeley, 1951.
|
| 230 |
+
|
| 231 |
+
Wei Gao, Xin-Yi Niu, and Zhi-Hua Zhou. On the consistency of exact and approximate nearest neighbor with noisy data. arXiv preprint arXiv:1607.07526, 2016.
|
| 232 |
+
|
| 233 |
+
E. K. Garcia, S. Feldman, M. R. Gupta, and S. Srivastava. Completely lazy learning. IEEE Trans. on Knowledge and DataEngineering, 2009.
|
| 234 |
+
|
| 235 |
+
Aritra Ghosh, Himanshu Kumar, and PS Sastry. Robust loss functions under label noise for deep neural networks. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 236 |
+
|
| 237 |
+
Jacob Goldberger and Ehud Ben-Reuven. Training deep neural-networks using a noise adaptation layer. 2016.
|
| 238 |
+
|
| 239 |
+
I. Guyon, N. Matic, and V. Vapnik. Discovering informative patterns and data cleaning. In AAAI Workshop on Knowledge Discovery in Databases, 1994.
|
| 240 |
+
|
| 241 |
+
Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor Tsang, Ya Zhang, and Masashi Sugiyama. Masking: A new perspective of noisy supervision. In Advances in Neural Information Processing Systems, pp. 5836–5846, 2018.
|
| 242 |
+
|
| 243 |
+
Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. In Advances in neural information processing systems, pp. 10456–10465, 2018.
|
| 244 |
+
|
| 245 |
+
H. Jiang, B. Kim, M. Y. Guan, and M. R. Gupta. To trust or not to trust a classifier. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
|
| 246 |
+
|
| 247 |
+
Heinrich Jiang. Non-asymptotic uniform rates of consistency for k-nn regression. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 3999–4006, 2019.
|
| 248 |
+
|
| 249 |
+
Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Regularizing very deep neural networks on corrupted labels. arXiv preprint arXiv:1712.05055, 4, 2017.
|
| 250 |
+
|
| 251 |
+
Ishan Jindal, Matthew Nokleby, and Xuewen Chen. Learning deep networks from noisy labels with dropout regularization. In 2016 IEEE 16th International Conference on Data Mining (ICDM), pp. 967–972. IEEE, 2016.
|
| 252 |
+
|
| 253 |
+
Ashish Khetan, Zachary C Lipton, and Anima Anandkumar. Learning from noisy singly-labeled data. arXiv preprint arXiv:1712.04577, 2017.
|
| 254 |
+
|
| 255 |
+
Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1910–1918, 2017.
|
| 256 |
+
Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(3):447–461, 2015.
|
| 257 |
+
Enno Mammen, Alexandre B Tsybakov, et al. Smooth discrimination analysis. The Annals of Statistics, 27(6):1808–1829, 1999.
|
| 258 |
+
Hamed Masnadi-Shirazi and Nuno Vasconcelos. On the design of loss functions for classification: theory, robustness to outliers, and savageboost. In Advances in Neural Information Processing Systems, pp. 1049–1056, 2009.
|
| 259 |
+
Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In Advances in Neural Information Processing Systems, pp. 1196–1204, 2013.
|
| 260 |
+
Nicolas Papernot and Patrick McDaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. arXiv preprint arXiv:1803.04765, 2018.
|
| 261 |
+
Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1944–1952, 2017.
|
| 262 |
+
Henry WJ Reeve and Ata Kaban. Fast rates for a kNN classifier robust to unknown asymmetric label noise. arXiv preprint arXiv:1906.04542, 2019.
|
| 263 |
+
Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. arXiv preprint arXiv:1803.09050, 2018.
|
| 264 |
+
David Rolnick, Andreas Veit, Serge Belongie, and Nir Shavit. Deep learning is robust to massive label noise. arXiv preprint arXiv:1705.10694, 2017.
|
| 265 |
+
Aarti Singh, Clayton Scott, Robert Nowak, et al. Adaptive Hausdorff estimation of density level sets. The Annals of Statistics, 37(5B):2760–2782, 2009.
|
| 266 |
+
Charles J Stone. Consistent nonparametric regression. The Annals of Statistics, pp. 595–620, 1977.
|
| 267 |
+
Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014.
|
| 268 |
+
Alexander B Tsybakov et al. Optimal aggregation of classifiers in statistical learning. The Annals of Statistics, 32(1):135–166, 2004.
|
| 269 |
+
Arash Vahdat. Toward robustness against label noise in training deep discriminative neural networks. In Advances in Neural Information Processing Systems, pp. 5596–5605, 2017.
|
| 270 |
+
Brendan Van Rooyen, Aditya Menon, and Robert C Williamson. Learning with symmetric label noise: The importance of being unhinged. In Advances in Neural Information Processing Systems, pp. 10–18, 2015.
|
| 271 |
+
Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 839–847, 2017.
|
| 272 |
+
Yizhen Wang, Somesh Jha, and Kamalika Chaudhuri. Analyzing the robustness of nearest neighbors to adversarial examples. In International Conference on Machine Learning, pp. 5120–5129, 2018.
|
| 273 |
+
D. Wilson. Asymptotic properties of nearest neighbor rules using edited data. IEEE Trans. on Systems, Man and Cybernetics, 1972.
|
| 274 |
+
Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2691–2699, 2015.
|
| 275 |
+
Zhilu Zhang and Mert Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In Advances in Neural Information Processing Systems, pp. 8778–8788, 2018.
|
| 276 |
+
|
| 277 |
+
# A PROOFS
|
| 278 |
+
|
| 279 |
+
A.1 SUPPORTING THEORETICAL RESULTS
|
| 280 |
+
|
| 281 |
+
The following bounds $r _ { k } ( x )$ uniformly in $x \in \mathcal { X }$ . Lemma 1 (Lemma 2 of Jiang (2019)). The following holds with probability at least $1 - \delta / 2$ . If
|
| 282 |
+
|
| 283 |
+
$$
|
| 284 |
+
2 ^ { 8 } \cdot D \log ^ { 2 } ( 4 / \delta ) \cdot \log n \leq k \leq { \frac { 1 } { 2 } } \cdot \omega \cdot p _ { X , 0 } \cdot v _ { D } \cdot r _ { 0 } ^ { D } \cdot n ,
|
| 285 |
+
$$
|
| 286 |
+
|
| 287 |
+
then $\begin{array} { r } { \operatorname* { s u p } _ { x \in \mathcal { X } } r _ { k } ( x ) \leq \left( \frac { 2 k } { \omega \cdot v _ { D } \cdot n \cdot p _ { X , 0 } } \right) ^ { 1 / D } } \end{array}$ , where $v _ { D }$ is the volume of the unit ball in $\mathbb { R } ^ { D }$ .
|
| 288 |
+
|
| 289 |
+
The next result bounds the number of distinct $k$ -NN sets over $\mathcal { X }$ .
|
| 290 |
+
|
| 291 |
+
Lemma 2 (Lemma 3 of Jiang (2019)). Let $M$ be the number of distinct $k$ -NN sets over $\mathcal { X }$ , that is, $M : = | \{ N _ { k } ( x ) : x \in \mathcal { X } \} |$ . Then $M \leq D \cdot n ^ { D }$ .
|
| 292 |
+
|
| 293 |
+
# A.2 MINIMUM $k$ -NN SPREAD
|
| 294 |
+
|
| 295 |
+
We propose a more notion of how spread out a set of points is than $S _ { 2 }$ which will be used in the theoretical analysis. This will allow us to more precisely characterize how difficult a configuration of incorrectly labeled examples will be to work with in the $k$ -NN context. For example, if such examples are spread out far apart, then there will be many correctly labeled examples nearby for the $k$ -NN approach to identify the incorrectly labeled examples. On the other hand, if the corrupted examples are all close together, then it will be more difficult to identify them without many uncorrected examples in that region. To this end, we define the minimum $k$ -NN spread:
|
| 296 |
+
|
| 297 |
+
Definition 4 (minimum $k$ -NN spread).
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
S _ { k } ( C ) : = \operatorname* { m i n } _ { x \in C } r _ { k } ( x , C ) ,
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
where $r _ { k } ( x , C )$ denotes the distance from $x$ to the $k$ -th closest neighbor in $C$ .
|
| 304 |
+
|
| 305 |
+
Note that this definition is consistent with the earlier definition of $S _ { 2 }$ .
|
| 306 |
+
|
| 307 |
+
# A.3 PROOF OF THEOREM 1
|
| 308 |
+
|
| 309 |
+
Proof of Theorem $^ { l }$ . Let $\tau , \gamma , \epsilon > 0$ be quantities that will be determined later. Suppose that for some $\dot { x } \in \mathcal { X } ^ { \Delta }$ , we have $r _ { k } ( x ) \ \leq \ \tau$ and $S _ { \mathrm { \lfloor ( \frac { 1 } { 2 } - \gamma ) \cdot k \rfloor } } ( C ) \geq \tau$ . Then, at least $\textstyle { \frac { 1 } { 2 } } + \gamma$ fraction of the points within $x$ ’s $k$ -nearest neighbors are not in the corrupted set $C$ . Let $A _ { x } : = N _ { k } ( x ) \backslash C$ , that is, the $k$ -nearest neighbors of $x$ that are not in $C$ . Then it is clear that $A _ { x }$ is a $k _ { 0 }$ -nearest neighbor set of $x$ relative to $X \backslash C$ for some $k _ { 0 } \geq \lceil ( \frac { 1 } { 2 } + \gamma ) \cdot k \rceil$ . We have that $A _ { x } \subseteq \mathcal { X } ^ { \Delta } \oplus \tau$ where $\begin{array} { r } { A _ { \mathbf { \lambda } } \oplus { } r : = \{ x \in \mathcal { X } : \operatorname* { i n f } _ { a \in A } | x - a | \leq r \} . } \end{array}$ . Let us consider without loss of generality that $\eta ( x ) \ge \frac { 1 } { 2 } + \Delta$ (call this set $\chi \Delta , +$ ). The case $\begin{array} { r } { \mathring { \mathcal { X } } ^ { \Delta , - } : = \{ { x } \in \mathcal { X } ^ { \Delta } : \eta ( { x } ) \leq \frac { 1 } { 2 } - \breve { \Delta } \} } \end{array}$ follows by symmetry. Thus, we have $\eta ( x ^ { \prime } ) \geq \frac { 1 } { 2 } + \Delta - C _ { \alpha } \tau ^ { \alpha }$ for all $x ^ { \prime } \in A _ { x }$ . By Hoeffing’s inequality, we have
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\mathbb { P } \left( \frac { 1 } { \lvert A _ { x } \rvert } \sum _ { x ^ { \prime } \in A _ { x } } y ( x ^ { \prime } ) < \frac { 1 } { 2 } + \Delta - C _ { \alpha } \tau ^ { \alpha } - \epsilon \right) \le \exp ( - 2 \epsilon ^ { 2 } \cdot k _ { 0 } ) ,
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
where $y ( x )$ is the label corresponding to sample $x$ . By Lemma 2, we have that there are at most $\boldsymbol { D } \cdot \boldsymbol { n } ^ { D }$ such $k _ { 0 }$ -nearest neighbor sets across all $k _ { 0 }$ in $X \backslash C$ . That is, this is also a bound on the number of distinct $A _ { x }$ for $x \in \mathcal { X }$ . Therefore, if we set
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\epsilon = \sqrt { \frac { D \log n + \log ( 4 D / \delta ) } { ( 1 + 2 \gamma ) \cdot k } } ,
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
then by union bound, we have that
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\mathbb { P } \left( \operatorname* { i n f } _ { x \in \mathcal { X } ^ { \Delta , + } } \frac { 1 } { \left| A _ { x } \right| } \sum _ { x ^ { \prime } \in A _ { x } } y ( x ^ { \prime } ) < \frac { 1 } { 2 } + \Delta - C _ { \alpha } \tau ^ { \alpha } - \epsilon \right) \leq \frac { \delta } { 4 } .
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
and thus, with probability at least $1 - \delta / 4$ , we have that $\begin{array} { r } { \frac { 1 } { | A _ { x } | } \sum _ { x ^ { \prime } \in A _ { x } } y ( x ^ { \prime } ) \ \geq \ \frac { 1 } { 2 } + \Delta - } \end{array}$ $C _ { \alpha } \tau ^ { \alpha } - \epsilon$ uniformly over $x \in \mathcal { X } ^ { \Delta , + }$ . Similarly, with probability at least $1 - \delta / 4$ we have that 1|A | Px0∈A y(x0) ≤ 12 − ∆ + Cατ α + uniformly over x ∈ X ∆,−.
|
| 328 |
+
|
| 329 |
+
Hence, in order for $k$ -nearest neighbor prediction to predict the Bayes-optimal label on $\chi ^ { \Delta }$ , it suffices that
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
k _ { 0 } \left( \frac { 1 } { 2 } + \Delta - C _ { \alpha } { \tau } ^ { \alpha } - \epsilon \right) \geq \frac { k } { 2 } .
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
Since $k _ { 0 } \geq ( \frac { 1 } { 2 } + \gamma ) \cdot k$ , we have that the above holds if
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\Delta \ge C _ { \alpha } \tau ^ { \alpha } + \epsilon + \frac { 1 - 2 \gamma } { 2 ( 1 + 2 \gamma ) } .
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
We now choose the values of $\tau , \gamma , \epsilon$ to upper bound each of the terms on the R.H.S. by $\Delta / 3$ so that the above holds.
|
| 342 |
+
|
| 343 |
+
We can bound the last term by $\Delta / 3$ by setting:
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\gamma = \frac { 1 } { 2 } \cdot \frac { 3 - 2 \Delta } { 3 + 2 \Delta } .
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
Next, taking
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\displaystyle { k \geq \frac { 3 ( 3 + 2 \Delta ) } { 2 \Delta ^ { 2 } } \left( D \log n + \log ( 4 D / \delta ) \right) , }
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
we have that $\epsilon \leq \Delta / 3$ . Now, by Lemma 1, we have that setting
|
| 356 |
+
|
| 357 |
+
$$
|
| 358 |
+
\tau = \left( \frac { 2 k } { \omega \cdot v _ { D } \cdot n \cdot p _ { X , 0 } } \right) ^ { 1 / D }
|
| 359 |
+
$$
|
| 360 |
+
|
| 361 |
+
gives us that $r _ { k } ( x ) \leq \tau$ for all $x \in \mathcal { X }$ with probability at least $1 - \delta / 2$ . It thus suffices to take
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
k \leq { \frac { 1 } { 2 } } \left( { \frac { \Delta } { 3 \cdot C _ { \alpha } } } \right) ^ { D / \alpha } \cdot \omega \cdot v _ { D } \cdot p _ { X , 0 } \cdot n
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
so that $C _ { \alpha } \tau ^ { \alpha } \leq \Delta / 3$ . Now in order for $S _ { \left\lfloor \left( { \frac { 1 } { 2 } } - \gamma \right) \cdot k \right\rfloor } ( C ) \geq \tau$ , it suffices to have $S _ { 2 } ( C ) \geq \tau$ . This can be accomplished by having the following hold:
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
k \leq \frac 1 2 \cdot S _ { 2 } ( C ) ^ { D } \cdot \omega \cdot v _ { D } \cdot p _ { X , 0 } \cdot n .
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
Thus, there exists positive constants $K _ { l }$ and $K _ { u }$ depending only on $\mathcal { F }$ such that if
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
K _ { u } \cdot \frac { 1 } { \Delta ^ { 2 } } \cdot ( \log ^ { 2 } ( 1 / \delta ) \cdot \log n ) \le k \le K _ { u } \cdot \operatorname* { m i n } \{ S _ { 2 } ( C ) ^ { D } , \Delta ^ { D / \alpha } \} \cdot n ,
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
then the desired conditions hold.
|
| 380 |
+
|
| 381 |
+
# A.4 PROOF OF THEOREM 2
|
| 382 |
+
|
| 383 |
+
Proof of Theorem 2. The proof begins in the same way as the proof of Theorem 1. As before, let $\tau , \gamma , \epsilon > 0$ be quantities that will be determined later. Like before, we are reduced to showing
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\Delta \ge C _ { \alpha } \tau ^ { \alpha } + \epsilon + \frac { 1 - 2 \gamma } { 2 ( 1 + 2 \gamma ) } ,
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
as long as the conditions for Lemma 1 and 2 hold and $S _ { 2 } ( x ) \geq \tau$ and $r _ { k } ( x ) \leq \tau$ where we choose
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\epsilon = \sqrt { \frac { D \log n + \log ( 4 D / \delta ) } { ( 1 + 2 \gamma ) \cdot k } } , \quad \gamma = \frac { 1 } { 2 } \cdot \frac { 3 - 2 \Delta } { 3 + 2 \Delta } , \quad \tau = \left( \frac { 2 k } { \omega \cdot v _ { D } \cdot n \cdot p _ { X , 0 } } \right) ^ { 1 / D } .
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
These conditions hold for some $K _ { u }$ and $K _ { l }$ depending on $\mathcal { F }$ . Then we are reduced to having
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\frac 2 3 \Delta \geq \sqrt { \frac { D \log n + \log ( 4 D / \delta ) } { ( 1 + 2 \gamma ) \cdot k } } + C _ { \alpha } \left( \frac { 2 k } { \omega \cdot v _ { D } \cdot n \cdot p _ { X , 0 } } \right) ^ { \alpha / D } .
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Since $\gamma \geq 0$ , it suffices to have
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\frac 2 3 \Delta \geq \sqrt { \frac { D \log n + \log ( 4 D / \delta ) } { k } } + C _ { \alpha } \left( \frac { 2 k } { \omega \cdot v _ { D } \cdot n \cdot p _ { X , 0 } } \right) ^ { \alpha / D } .
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
The desired form for $\Delta$ clearly follows for some choice of $K$ depending only on $D , \omega , p _ { X , 0 } , C _ { \alpha }$ , all of which depend only on $\mathcal { F }$ .
|
| 408 |
+
|
| 409 |
+
Finally, we must ensure that $\begin{array} { r } { \lfloor \left( \frac { 1 } { 2 } - \gamma \right) \cdot k \rfloor \ge 2 } \end{array}$ so that $S _ { \lfloor ( \frac { 1 } { 2 } - \gamma ) \cdot k \rfloor } ( C ) \geq S _ { 2 } ( x )$ . Given the expression for $\gamma$ , it is equivalent to have $\begin{array} { r } { \lfloor \left( \frac { 2 \Delta } { 3 + 2 \Delta } \right) \cdot k \rfloor \ge 2 } \end{array}$ . It suffices to show that $k \geq \frac { 3 ( 3 + 2 \Delta ) } { 2 \Delta }$ . Given the form of $\Delta$ in terms of $n$ and $k$ , we see that it suffices to have that
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
k \geq \frac { 9 } { 2 } \cdot K \cdot \left( \left( \sqrt { \frac { \log n + \log ( 1 / \delta ) } { k } } + \left( \frac { k } { n } \right) ^ { \alpha / D } \right) \right) ^ { - 1 } + 3 ,
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
which holds when $k \geq K _ { 0 } \cdot n ^ { 2 \alpha / ( 2 \alpha + D ) }$ for some $K _ { 0 }$ depending only on $\mathcal { F }$ , as desired.
|
| 416 |
+
|
| 417 |
+
# A.5 PROOF OF THEOREM 3
|
| 418 |
+
|
| 419 |
+
Proof of Theorem 3. The first part follows from Theorem 2. For the second part, we have by Theorem 2 that if $x \in \mathcal { X } ^ { \Delta }$ , then the $k$ -NN classifier and the Bayes-optimal classifier match with probability $1 - \delta$ uniformly. Thus, we have
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\begin{array} { r l } & { { R _ { X } } - { R ^ { * } } \leq \mathbb { P } ( x \notin \mathcal { X } ^ { \Delta } ) \left( \mathbb { E } _ { \mathcal { F } } [ g _ { k } ( x ) \neq y | x \notin \mathcal { X } ^ { \Delta } ] - \mathbb { E } _ { \mathcal { F } } [ g ^ { * } ( x ) \neq y | x \notin \mathcal { X } ^ { \Delta } ] \right) } \\ & { \qquad \leq { C _ { \beta } } \cdot \Delta ^ { \beta } \cdot \left( \mathbb { E } _ { \mathcal { F } } [ g _ { k } ( x ) \neq y | x \notin \mathcal { X } ^ { \Delta } ] - \mathbb { E } _ { \mathcal { F } } [ g ^ { * } ( x ) \neq y | x \notin \mathcal { X } ^ { \Delta } ] \right) \leq { C _ { \beta } } \cdot \Delta ^ { \beta } \cdot 2 \Delta . } \end{array}
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
The result follows immediately from Theorem 2.
|
| 426 |
+
|
| 427 |
+
# B HARD FLIP PERMUTATIONS
|
| 428 |
+
|
| 429 |
+
For Fashion MNIST we hard flip by swapping the following classes: TSHIRT $\mathbf { \Gamma } \mathbf { S } \mathbf { H }$ IRT, TROUSER DRESS, PULLOVER $ { \mathrm { C O A T } }$ , SANDAL BAG, SNEAKER ANKLEBOOT. For CIFAR10 we swap the pairs: TRUCK AUTOMOBILE, BIRD AIRPLANE, DEER HORSE, $\mathrm { \Delta ^ { \circ } A T D O G , F R O G S H I P } .$ For CIFAR100, we hard flip circularly (i.e. $\pi ( i ) = ( i + 1 )$ mod $K$ ) within each of the 20 superclasses. For all other datasets, we hard flip circularly.
|
| 430 |
+
|
| 431 |
+
# C ADDITIONAL PLOTS
|
| 432 |
+
|
| 433 |
+
We provide the plots that were ommitted from the main text due to space constraints.
|
| 434 |
+
|
| 435 |
+

|
| 436 |
+
Figure 7: Plots for UCI Phonemes dataset at 10, $20 \%$ clean data and all corruption types.
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 8: Plots for UCI Letters dataset at 5, 10, $20 \%$ clean data and all corruption types.
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
Figure 9: Plots for UCI Wilt dataset at 5, 10, $20 \%$ clean data and all corruption types.
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
Figure 10: Plots for UCI Parkinsons dataset at 5, 10, $20 \%$ clean data and all corruption types.
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 11: Plots for UCI Seeds dataset at 5, 10, $20 \%$ clean data and all corruption types.
|
| 449 |
+
|
| 450 |
+

|
| 451 |
+
Figure 12: Plots for UCI Iris dataset at 5, 10, $20 \%$ clean data and all corruption types.
|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
Figure 13: Plots for MNIST at 5, 10, $20 \%$ clean data and all corruption types.
|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
Figure 14: Plots for Fashion MNIST at 10, $20 \%$ clean data and all corruption types.
|
| 458 |
+
|
| 459 |
+

|
| 460 |
+
Figure 15: Plots for CIFAR10 at 10, $20 \%$ clean data and all corruption types.
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
Figure 16: Plots for CIFAR100 at 5, 10, $20 \%$ clean data and all corruption types.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 17: Plots for SVHN at 10, $20 \%$ clean data and all corruption types.
|
parse/train/BklIxyHKDr/BklIxyHKDr_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BklIxyHKDr/BklIxyHKDr_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BklIxyHKDr/BklIxyHKDr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HyEtjoCqFX/HyEtjoCqFX.md
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SOFT Q-LEARNING WITH MUTUAL-INFORMATION REGULARIZATION
|
| 2 |
+
|
| 3 |
+
Jordi Grau-Moya, Felix Leibfried and Peter Vrancx
|
| 4 |
+
PROWLER.io
|
| 5 |
+
Cambridge, United Kingdom
|
| 6 |
+
{jordi}@prowler.io
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
We propose a reinforcement learning (RL) algorithm that uses mutual-information regularization to optimize a prior action distribution for better performance and exploration. Entropy-based regularization has previously been shown to improve both exploration and robustness in challenging sequential decision-making tasks. It does so by encouraging policies to put probability mass on all actions. However, entropy regularization might be undesirable when actions have significantly different importance. In this paper, we propose a theoretically motivated framework that dynamically weights the importance of actions by using the mutualinformation. In particular, we express the RL problem as an inference problem where the prior probability distribution over actions is subject to optimization. We show that the prior optimization introduces a mutual-information regularizer in the RL objective. This regularizer encourages the policy to be close to a nonuniform distribution that assigns higher probability mass to more important actions. We empirically demonstrate that our method significantly improves over entropy regularization methods and unregularized methods.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Reinforcement Learning (RL) (Sutton & Barto, 1998) is a framework for solving sequential decision-making problems under uncertainty. Contemporary state-of-the-art RL methods often use an objective that includes an entropy regularization term (Haarnoja et al., 2018c; 2017; Teh et al., 2017). Entropy regularized RL has been shown to capture multi-modal behaviour, as well as exhibiting superior exploration (Haarnoja et al., 2017). Additionally, the learned policies are more robust, as the entropy bonus accounts for future action stochasticity (Grau-Moya et al., 2016) and reduces value overestimation (Fox et al., 2016).
|
| 15 |
+
|
| 16 |
+
While encouraging high-entropy policies can provide several benefits, it is possible to devise examples where entropy regularization actually impedes exploration. Since high-entropy policies tend to spread the probability mass across all actions equally, they can perform poorly when the RL problem contains actions that are rarely useful. In this paper, we propose to overcome the previous limitation by designing a reinforcement learning algorithm that dynamically adjusts the importance of actions while learning. We motivate our algorithm by phrasing RL as an inference problem with an adaptive prior action distribution. Where previous work assumes a uniform prior distribution over the actions (Rawlik et al., 2012; Levine, 2018), we generalize the formulation by optimizing the prior. We show that this optimization process leads to an RL objective function with a regularizer based on the mutual information between states and actions.
|
| 17 |
+
|
| 18 |
+
Additionally, we develop a novel algorithm that uses such mutual-information regularization to obtain an optimal action-prior for better performance and exploration in high-dimensional state spaces. This novel regularizer for RL encourages policies to be close to the marginal distribution over actions. This results in assigning higher probability to actions frequently used by the optimal policy, while actions that are used infrequently have lower probability under the prior. We demonstrate significant improvements on 19 Atari games over a deep Q-network (Mnih et al., 2015) (DQN) baseline without any regularization and over soft Q-learning (Schulman et al., 2017; Leibfried et al., 2018) (SQL) that employs standard entropy regularization without prior adaptation.
|
| 19 |
+
|
| 20 |
+
# 2 BACKGROUND
|
| 21 |
+
|
| 22 |
+
# 2.1 REINFORCEMENT LEARNING
|
| 23 |
+
|
| 24 |
+
We consider the standard Markov decision process (MDP) setting. Formally, an MDP is defined as the tuple $\langle S , A , P , R , \gamma \rangle$ where $s$ is the state space, $\mathcal { A }$ the action space, and $P : \mathcal { S } \times \mathcal { A } \times \mathcal { S }$ $s [ 0 , 1 ]$ denotes the state transition function. Upon taking action $a _ { t } \in \mathcal A$ in state $s _ { t } \in S$ , the agent transitions to $s _ { t + 1 }$ with probability $\textstyle P ( s _ { t + 1 } | s _ { t } , a _ { t } )$ . The reward function $\mathcal { R } : \mathcal { S } \times \mathcal { A } \mathbb { R }$ i.e. quantifies the agent’s performance. The goal is to find a policy that maximizes the value function, $\pi ^ { * } ( a | s ) = \arg \operatorname* { m a x } _ { \pi } V ^ { \pi } ( s )$ , where $\begin{array} { r } { V ^ { \pi } ( s ) = \mathbb { E } \Big [ \sum _ { t = 0 } ^ { T } \gamma ^ { t } r ( s _ { t } , a _ { t } ) | s _ { 0 } = s \Big ] } \end{array}$ . Here, $\gamma$ is a discount factor ( $0 < \gamma < 1$ ) that allows to account for the future in different ways.
|
| 25 |
+
|
| 26 |
+
The policy-dependent state transition probabilities are defined as $\begin{array} { r } { P _ { \pi } ( s ^ { \prime } | s ) : = \sum _ { a } P ( s ^ { \prime } | a , s ) \pi ( a | s ) } \end{array}$ which can be written in matrix notation as $P _ { \pi } \in \mathbb { R } ^ { | S | } \times \mathbb { R } ^ { | S | }$ where the rows are indexed by $s$ and the columns by $s ^ { \prime }$ . This allows us to conveniently define the agent’s stationary distribution over states $\mu _ { \pi } ( s )$ and actions $\rho _ { \pi } ( a )$ as follows:
|
| 27 |
+
|
| 28 |
+
Definition 1 (Stationary distribution over states). The stationary distribution over states (assumed to exist and to be unique) is defined in vector form as $\begin{array} { r } { \mu _ { \pi } ^ { \top } : = \operatorname* { l i m } _ { t \infty } \nu _ { 0 } ^ { \top } P _ { \pi } ^ { t } } \end{array}$ with $\nu _ { 0 }$ being an arbitrary vector of probabilities over states at time $t ~ = ~ 0$ . The stationary distribution satisfies $\begin{array} { r } { \mu _ { \pi } ( s ^ { \prime } ) = \sum _ { s } P _ { \pi } ( s ^ { \prime } | s ) \mu _ { \pi } ( s ) } \end{array}$ and therefore is a fixed point under the state transition probabilities $\pmb { \mu } _ { \pi } ^ { \top } = \pmb { \mu } _ { \pi } ^ { \top } \pmb { P } _ { \pi }$ .
|
| 29 |
+
|
| 30 |
+
Definition 2 (Stationary distribution over actions). Let $\mu _ { \pi } ( s )$ be the stationary distribution over states induced by the policy $\pi$ . Then the stationary distribution over actions under the policy $\pi$ is defined as $\begin{array} { r } { \rho _ { \pi } ( a ) : = \sum _ { s \in { \cal S } } \mu _ { \pi } ( s ) \pi ( a | s ) } \end{array}$ .
|
| 31 |
+
|
| 32 |
+
# 2.2 MAXIMUM ENTROPY REINFORCEMENT LEARNING
|
| 33 |
+
|
| 34 |
+
Maximum entropy reinforcement learning augments the standard RL reward objective with an additional policy entropy term. The optimal value function under entropy regularization (Haarnoja et al., 2017) is defined as:
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\mathcal V ^ { * } ( s ) = \operatorname* { m a x } _ { \pi } \mathbb E \Bigg [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \bigg ( r ( s _ { t } , a _ { t } ) - \frac { 1 } { \beta } \log \pi ( a _ { t } | s _ { t } ) \bigg ) \Bigg | s _ { 0 } = s \Bigg ] ,
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where $\frac { 1 } { \beta }$ trades off between reward and entropy maximization, and the expectation operation is over state-action trajectories. The optimal policy that solves (1) can be written in closed form as: $\begin{array} { r } { \pi ^ { * } ( a | s ) = \frac { e ^ { \beta Q ^ { * } \tilde { ( s , a ) } } } { \sum _ { a \in \mathcal { A } } e ^ { \beta Q ^ { * } ( s , a ) } } } \end{array}$ eβQ (s,a)Pa∈A eβQ∗(s,a) , where Q∗(s, a) := r(s, a) + Ps0∈S P (s0|s, a)V ∗(s0). Note that the above represents a generalization of standard RL settings, where $\beta \to \infty$ corresponds to a standard RL valuation $( \mathrm { l i m } _ { \beta \infty } \mathcal { V } ^ { * } ( s ) = \mathrm { m a x } _ { \pi } V ^ { \pi } ( s ) )$ , while for $\beta 0$ we recover the valuation under a random uniform policy. For intermediate values of $\beta$ , we can trade off between reward maximization and entropy maximization.
|
| 41 |
+
|
| 42 |
+
Interestingly, one can formulate the maximum entropy RL objective as an inference problem (Levine, 2018) by specifying a prior distribution over trajectories that assumes a fixed uniform distribution over actions. Precisely this assumption is what encourages the policies to maximize entropy. As outlined in the introduction, encouraging policies to be close to a uniform distribution might be undesirable when some actions are simply non-useful or not frequently used.
|
| 43 |
+
|
| 44 |
+
In Section 3, we show that when relaxing the previous assumption, i.e. allowing for prior optimization, we obtain a novel variational inference formulation of the RL problem that constrains the policy’s mutual-information between states and actions. We show that such policies must be close to the marginal distribution over actions which automatically assigns high probability mass to overall useful actions and low probability to infrequently used actions.
|
| 45 |
+
|
| 46 |
+
Before proceeding, however, it is insightful to show how prior optimization bridges the gap between entropy regularization and mutual-information regularization in a non-sequential decision-making scenario that considers one time step only.
|
| 47 |
+
|
| 48 |
+
2.3 MUTUAL-INFORMATION REGULARIZATION FOR ONE-STEP DECISION-MAKING
|
| 49 |
+
|
| 50 |
+
In a one-step decision-making scenario, entropy regularization assumes the following form
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\operatorname* { m a x } _ { \pi } \sum _ { s , a } p ( s ) \pi ( a | s ) \left( r ( s , a ) - \frac { 1 } { \beta } \log \pi ( a | s ) \right) ,
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
where $p ( s )$ is some arbitrary distribution over states and the optimal policy balances expected reward maximization versus expected entropy maximization.
|
| 57 |
+
|
| 58 |
+
Entropy regularization discourages deviations from a uniform prior policy. In a more general setting, when discouraging deviations from an arbitrary prior $\rho ( a )$ , a similar objective can be written as
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { r l } & { \underset { \pi } { \mathop { \operatorname* { m a x } } } \displaystyle \sum _ { s , a } p ( s ) \pi ( a | s ) \left( r ( s , a ) - \frac { 1 } { \beta } \log \frac { \pi ( a | s ) } { \rho ( a ) } \right) = } \\ & { \underset { \pi } { \mathop { \operatorname* { m a x } } } \displaystyle \sum _ { s , a } p ( s ) \pi ( a | s ) r ( s , a ) - \frac { 1 } { \beta } \displaystyle \sum _ { s } p ( s ) \mathrm { K L } ( \pi ( \cdot | s ) | | \rho ( \cdot ) ) , } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where KL refers to the Kullback-Leiber (KL) divergence. This framework has been proposed before in the literature under the name information-theory for decision-making (Ortega & Braun, 2013).
|
| 65 |
+
|
| 66 |
+
Going one step further, one can also optimize for $\rho$ in addition to $\pi$ , which essentially means that policies are discouraged to deviate from an optimal prior distribution, leading to the following optimization problem
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\operatorname* { m a x } _ { \pi } \sum _ { s , a } p ( s ) \pi ( a | s ) r ( s , a ) - \frac { 1 } { \beta } \operatorname* { m i n } _ { \rho } \sum _ { s } p ( s ) \mathrm { K L } ( \pi ( \cdot | s ) | | \rho ( \cdot ) ) ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where we utilize the fact that only the expected $\mathrm { K L }$ penalty depends on $\rho$
|
| 73 |
+
|
| 74 |
+
The minimum expected $\mathrm { K L }$ relates to the mutual information as follows:
|
| 75 |
+
|
| 76 |
+
Proposition 1 (Mutual Information). Let $I _ { f }$ be a functional, in particular: $I _ { f } ( p _ { X } , p _ { Y | X } , q _ { Y } ) : =$ $\begin{array} { r } { \sum _ { x } p _ { X } ( x ) \mathrm { K L } ( p _ { Y | X } ( \cdot | x ) | | q _ { Y } ( \cdot ) ) } \end{array}$ , where $p _ { X } ( x )$ is the distribution of the input, $p _ { Y \mid X } ( y | x )$ is the conditional distribution of the output conditioned on the input, and $q _ { Y } ( y )$ a variational distribution of the output. Then, the mutual information 1 is recovered with
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
I [ X , Y ] = \operatorname* { m i n } _ { q _ { Y } } I _ { f } \big ( p _ { X } , p _ { Y | X } , q _ { Y } \big ) ,
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where the optimal variational distribution is $\begin{array} { r } { q _ { Y } ^ { \star } ( y ) = \sum _ { x } p _ { X } ( x ) p _ { Y | X } ( y | x ) , } \end{array}$ , i.e. the true marginal distribution. See e.g. (Cover & Thomas, 2006, Lemma 10.8.1) for details.
|
| 83 |
+
|
| 84 |
+
This allows us to rewrite the problem from Equation (3) as
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\operatorname* { m a x } _ { \pi } \sum _ { s , a } p ( s ) \pi ( a | s ) r ( s , a ) - \frac { 1 } { \beta } I [ S ; A ] ,
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
yielding a penalty on the mutual information between states and actions.
|
| 91 |
+
|
| 92 |
+
Notice that this problem is mathematically equivalent to rate-distortion theory from informationtheory (Shannon, 1959) which formulates how to efficiently send information over an informationtheoretic channel with limited transmission rate. This framework has also been used to describe decision-making problems with limited information budgets (Sims, 2011; Genewein et al., 2015; Leibfried & Braun, 2015; 2016; Peng et al., 2017; Hihn et al., 2018). In a decision-making context, the agent is considered as information-theoretic channel $\pi ( a | s )$ where $s$ is the channel input and $a$ the channel output. The agent aims at maximizing expected reward under the constraint that the information transmission rate is limited, where the transmission rate is given by the mutual-information between states and actions (Cover & Thomas, 2006). Intuitively, this means that the agent has to discard reward-irrelevant information in $s$ to not exceed the limits in information transmission.
|
| 93 |
+
|
| 94 |
+
In the following section, we generalize the rate-distortion formulation for decision-making to be applicable to a sequential decision-making scenario, i.e. the RL setting. We propose an inferencebased formulation where the mutual information arises as a consequence of allowing for optimizing the action-prior distribution.
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\begin{array} { r } { ^ { 1 } I ( X ; Y ) : = \sum _ { x , y } p ( x , y ) \log \frac { p ( x , y ) } { p _ { Y } ( y ) p _ { X } ( x ) } = \sum _ { x } p _ { X } ( x ) \mathrm { K L } \big ( p _ { Y | X } ( \cdot | x ) | | p _ { Y } ( \cdot ) \big ) } \end{array}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
# 3 MUTUAL-INFORMATION REGULARIZATION IN RL
|
| 101 |
+
|
| 102 |
+
In this section, we first derive mutual-information regularization for the RL setting from a variational inference perspective. Subsequently, we derive expressions for the optimal policy and the optimal prior that are useful for constructing a practical algorithm.
|
| 103 |
+
|
| 104 |
+
# 3.1 VARIATIONAL INFERENCE RL FORMULATION WITH OPTIMAL ACTION-PRIORS
|
| 105 |
+
|
| 106 |
+
The RL problem can be expressed as an inference problem by introducing a binary random variable $R$ that denotes whether the trajectory $\tau : = ( s _ { 0 } , a _ { 0 } , \dots s _ { T } , a _ { T } )$ is optimal $R = 1$ ) or not $( R = 0$ ). The likelihood of an optimal trajectory can then be expressed as $\begin{array} { r } { p ( R = 1 | \tau ) \propto \exp ( \sum _ { t = 0 } ^ { T } r ( s _ { t } , a _ { t } ) ) } \end{array}$ (Levine, 2018). We additionally introduce a scaling factor $\beta > 0$ into the exponential, i.e. $p ( R =$ $\begin{array} { r } { 1 | \tau ) \propto \exp ( \beta \sum _ { t = 0 } ^ { T } r ( s _ { t } , a _ { t } ) ) } \end{array}$ . This will allow us to trade off reward and entropy maximization 2. Next, we can define the posterior trajectory probability assuming optimality, i.e. $p ( \tau | R = 1 )$ . Here we treat $\tau$ as a latent variable with prior probability $p ( \tau )$ , and we specify the log-evidence as $\begin{array} { r } { \log p ( R = 1 ) = \log \int p ( R = 1 | \tau ) p ( \tau ) \dot { d } \tau } \end{array}$ . We now introduce a variational distribution $q ( \tau )$ to approximate the posterior $p ( \tau | R = 1 )$ . This leads to an Evidence Lower BOund (ELBO) of the previous expression (scaled by $\textstyle { \frac { 1 } { \beta } } ) ^ { 3 }$ :
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { r l } & { \displaystyle \frac { 1 } { \beta } \log p ( R = 1 ) = \frac { 1 } { \beta } \log \int p ( R = 1 | \tau ) p ( \tau ) d \tau } \\ & { \quad \quad \quad \geq \displaystyle \frac { 1 } { \beta } \mathbb { E } _ { \tau \sim q ( \tau ) } \left[ \log \frac { p ( R = 1 | \tau ) p ( \tau ) } { q ( \tau ) } \right] } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
The generative model is written as $\begin{array} { r } { p ( \tau ) \ = \ p ( s _ { 0 } ) \prod _ { t = 0 } ^ { T - 1 } \rho ( a _ { t } ) P ( s _ { t + 1 } | s _ { t } , a _ { t } ) } \end{array}$ and the variational
|
| 113 |
+
distribution as maximization $\begin{array} { r } { q ( \tau ) = p ( s _ { 0 } ) \prod _ { t = 0 } ^ { T - 1 } \pi ( a _ { t } | s _ { t } ) P ( s _ { t + 1 } | s _ { t } , a _ { t } ) } \end{array}$ . The RL problem can now be stated as aRL objective is recovered when assuming $\pi$
|
| 114 |
+
a fixed uniform prior distribution over actions, i.e. $\begin{array} { r } { \rho ( a _ { t } ) = \frac { 1 } { | \mathcal { A } | } } \end{array}$ for all $t$ .
|
| 115 |
+
|
| 116 |
+
We obtain a novel variational RL formulation by introducing an adaptive prior over actions $\rho$ . Contrary to maximum entropy RL, where the prior of the generative model is fixed and uniform, here the prior over actions is subject to optimization. Starting from Equation (5) and substituting $p ( \tau )$ and $q ( \tau )$ we obtain the following ELBO: $\begin{array} { r l } & { \operatorname* { m a x } _ { \pi , \rho } \mathbb { E } _ { q } \left[ \sum _ { t = 0 } ^ { T } \left( r ( s _ { t } , a _ { t } ) - \frac { 1 } { \beta } \log \frac { \pi ( a _ { t } | s _ { t } ) } { \rho ( a _ { t } ) } \right) \right] . } \end{array}$ . Since we are interested in infinite horizon problems, we introduce a discount factor and take the limit $\operatorname* { l i m } _ { T \to \infty }$ (Haarnoja et al., 2017). This leads to the optimization objective that we use in our experiments:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\operatorname* { m a x } _ { \pi , \rho } \mathbb { E } _ { q } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \left( r ( s _ { t } , a _ { t } ) - \frac { 1 } { \beta } \log \frac { \pi ( a _ { t } | s _ { t } ) } { \rho ( a _ { t } ) } \right) \right] ,
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $0 < \gamma < 1$ is the discount factor. In the following, we show that the the solution for the prior and the policy can be expressed in a concise form giving rise to a novel RL regularization scheme.
|
| 123 |
+
|
| 124 |
+
# 3.2 RECURSION, OPTIMAL POLICIES AND OPTIMAL PRIORS
|
| 125 |
+
|
| 126 |
+
Crucial for the construction of a practical algorithm are concise expressions for the optimal policy and the prior. More concretely, the optimal policy takes the form of a Boltzmann distribution weighted by the prior $\rho$ . When fixing the policy, the optimal prior is the marginal distribution over actions under the discounted stationary distribution over states. This finding is important to devise a method for efficiently learning an optimal prior in practice.
|
| 127 |
+
|
| 128 |
+
Optimal policy for a fixed prior $\rho$ : We start by defining the value function with the information cost as $\begin{array} { r } { \mathcal { V } _ { \pi , \rho } ( s ) : = \mathbb { E } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \left( r ( s _ { t } , a _ { t } ) - \frac { 1 } { \beta } \log \frac { \pi ( a _ { t } | s _ { t } ) } { \rho ( a _ { t } ) } \right) | s _ { 0 } = s \right] } \end{array}$ where one can show that $\nu _ { \pi , \rho }$ satisfies a recursion similar to the Bellman equation:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\boldsymbol { \mathcal { V } } _ { \pi , \rho } ( s ) = \mathbb { E } _ { \pi } \left[ r ( s , a ) - \frac { 1 } { \beta } \log \frac { \pi ( a | s ) } { \rho ( a ) } + \gamma \mathbb { E } _ { s ^ { \prime } } [ \boldsymbol { \mathcal { V } } _ { \pi , \rho } ( s ^ { \prime } ) ] \right] .
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
When considering a fixed $\rho$ , the problem of maximizing Equation (7) over the policy can be solved analytically by standard variational calculus (Rubin et al., 2012; Genewein et al., 2015). The optimal policy is then given by
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\pi ^ { * } ( a | s ) : = \frac { 1 } { Z } \rho ( a ) \exp ( \beta Q _ { \pi ^ { * } , \rho } ( s , a ) )
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
with $\begin{array} { r } { Z = \sum _ { a } \rho ( a ) \exp ( \beta Q _ { \pi ^ { * } , \rho } ( s , a ) ) } \end{array}$ , and the the soft Q-function is defined as
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
Q _ { \pi , \rho } ( s , a ) : = r ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } } [ \mathcal { V } _ { \pi , \rho } ( s ^ { \prime } ) ] .
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
Being able to write the optimal policy in this way as a function of Q-values is needed in order to estimate the optimal prior as we show next.
|
| 147 |
+
|
| 148 |
+
Optimal prior for a fixed policy: In order to solve for the optimal prior, we rewrite the problem in Equation (6) as
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\operatorname* { m a x } _ { \pi , \rho } \sum _ { t = 0 } ^ { \infty } \sum _ { s } \gamma ^ { t } \nu _ { t } ( s ) \sum _ { a } \pi ( a | s ) \left( r ( s , a ) - \frac { 1 } { \beta } \log \frac { \pi ( a | s ) } { \rho ( a ) } \right) ,
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
where we have defined the marginal distribution over states at time $t$ as
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\nu _ { t } ( s ) : = \sum _ { s _ { 0 } , a _ { 0 } , \ldots , s _ { t - 1 } , a _ { t - 1 } } p ( s _ { 0 } ) \left( \prod _ { t ^ { \prime } = 0 } ^ { t - 2 } \pi ( a _ { t ^ { \prime } } | s _ { t ^ { \prime } } ) P ( s _ { t ^ { \prime } + 1 } | s _ { t ^ { \prime } } , a _ { t ^ { \prime } } ) \right) \pi ( a _ { t - 1 } | s _ { t - 1 } ) P ( s | s _ { t - 1 } , a _ { t - 1 } ) .
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
For fixed $\pi$ , we eliminate the max operator for $\pi$ and all components that do not depend on $\rho$
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\operatorname* { m a x } _ { \rho } - \frac { 1 } { \beta } \sum _ { t = 0 } ^ { \infty } \sum _ { s } \gamma ^ { t } \nu _ { t } ( s ) \mathbf { K L } ( \pi ( \cdot | s ) | | \rho ( \cdot ) ) .
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
Swapping the sums and letting $\begin{array} { r } { p ( s ) : = \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \nu _ { t } ( s ) } \end{array}$ be the unnormalized discounted marginal distribution over states, we obtain $\begin{array} { r } { \operatorname* { m a x } _ { \rho } - \frac { 1 } { \beta } \sum _ { s } p ( s ) \mathbf { K L } ( \pi ( \cdot | s ) | | \rho ( \cdot ) ) } \end{array}$ . The solution to the latter, $\begin{array} { r } { \rho ^ { \star } ( a ) = \frac { \sum _ { s } p ( s ) \pi ( a \mid s ) } { \sum _ { s , a } p ( s ) \pi ( a \mid s ) } } \end{array}$ , can easily be obtained by adding the constraint that the action-prior is a valid distribution (i.e., $\textstyle \sum _ { a } \rho ( a ) \ = \ 1$ and $\rho ( a ) \ > \ 0 \ \forall a )$ , and using the method of Lagrange multipliers and standard variational calculus. The connection to the mutual information becomes clear when plugging $\rho ^ { \star }$ back into the objective yielding $- k \cdot { \textstyle \frac { 1 } { \beta } } I ( S , A )$ scaled by a positive constant $k$ (because $p ( s )$ is not normalized) that can be absorbed into $\beta$ . Additionally, we also formalize the connection to the stationary mutual-information for the limit case of $\gamma 1$ in the Appendix.
|
| 167 |
+
|
| 168 |
+
With the form of the optimal prior for a fixed policy at hand, one can easily devise a stochastic approximation method (e.g. $\bar { \rho _ { i + 1 } } ( a ) = ( 1 - \bar { \alpha _ { \rho } } ) \rho _ { i } ( \bar { a } ) + \alpha _ { \rho } \pi ( a | s )$ with $\alpha _ { \rho } \in [ 0 , 1 ]$ and $s \sim p ( \cdot )$ to estimate the optimal $\rho$ using the current estimate of the optimal policy from Equation (8). We note that here we sample from the undiscounted distribution over states instead, rather than the true discounted state-distribution in the equation above. This is a common practice used in actor-critic RL that results in a biased estimator of the objective (Thomas, 2014).
|
| 169 |
+
|
| 170 |
+
# 4 MIRL: A PRACTICAL MUTUAL INFORMATION RL ALGORITHM
|
| 171 |
+
|
| 172 |
+
In this section, we present the MIRL agent. We focus on the tabular setting first and then port our algorithm to high-dimensional state spaces that require parametric function approximators.
|
| 173 |
+
|
| 174 |
+
# 4.1 MIRL FOR TABULAR Q-LEARNING
|
| 175 |
+
|
| 176 |
+
Our tabular MIRL agent is a modification of an ordinary Q-learning agent with a different update scheme for Q-values. In parallel to updating Q-values, the MIRL agent needs to update the prior $\rho$ as well as the parameter $\beta$ . The behavioral policy $\pi$ is also different and utilizes soft Q-values. This is outline in more detail below.
|
| 177 |
+
|
| 178 |
+
Prior Updates: We approximate the optimal prior by employing the following update equation,
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\rho _ { i + 1 } ( a ) = ( 1 - \alpha _ { \rho } ) \rho _ { i } ( a ) + \alpha _ { \rho } \pi _ { i } ( a | s _ { i } )
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
where $s _ { i } \sim \nu _ { i } ( \cdot )$ and $\alpha _ { \rho }$ is a learning rate. Assuming a fixed policy, it is easy to show that this iterative update converges to $\begin{array} { r } { \rho _ { \pi } ( a ) = \bar { \sum } _ { s } \mu _ { \pi } ( s ) \pi ( a | s ) } \end{array}$ , thus estimating correctly the optimal prior.
|
| 185 |
+
|
| 186 |
+
-function Updates: Concurrently to learning the prior, MIRL updates the tabular Q-function as
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
Q ( s , a ) Q ( s , a ) + \alpha _ { Q } ( ( T _ { \mathrm { s o f t } } ^ { \rho } Q _ { \bar { \theta } } ) ( s , a , s ^ { \prime } ) - Q ( s , a ) )
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
where $\alpha _ { Q }$ is a learning rate and $T _ { \mathrm { s o f t } } ^ { \rho } Q$ is the empirical soft-operator defined as $( T _ { \mathrm { s o f t } } ^ { \rho } Q ) ( s , a , s ^ { \prime } ) : =$ $\begin{array} { r l } { r ( s , a ) + \gamma \frac { 1 } { \beta } \log \sum _ { a ^ { \prime } } \rho ( a ^ { \prime } ) \exp \left( \beta Q ( s ^ { \prime } , a ^ { \prime } ) \right) } & { { } } \end{array}$ . Importantly, this operator differs from other soft operators arising when employing entropy regularization. Entropy regularization assumes a fixed uniform prior, whereas in our case, the optimal prior is estimated in the course of learning.
|
| 193 |
+
|
| 194 |
+
Behavioural policy: Since the Q-function can be learned off-policy, the experience samples can conveniently be drawn from a behavioural policy $\pi _ { b }$ different from the current estimate of the optimal policy. As such, the behavioural policy used in our experiments is similar in spirit to an $\epsilon$ -greedy policy but it better exploits the existence of the estimated optimal prior when both exploring and exploiting. When exploring, MIRL’s behavioural policy samples from the current estimate of the optimal prior $\rho _ { i }$ which has adjusted probabilities, in contrast to vanilla $\epsilon$ -greedy that samples all actions with equal frequency. Additionally, when exploiting, MIRL selects the maximum probability action that depends not only on the Q-values but also on the current estimate of the optimal action-prior, instead of selecting the action with highest Q-value as in traditional $\epsilon$ -greedy. More formally, given a random sample $u \sim$ Uniform[0,1] and epsilon $\epsilon$ , the action $a _ { i }$ is obtained by
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
a _ { i } = { \displaystyle \left\{ \begin{array} { l l } { \arg \operatorname* { m a x } _ { a } \pi _ { i } ( a | s _ { i } ) , } & { { \mathrm { i f ~ } } u > \epsilon } \\ { a \sim \rho _ { i } ( \cdot ) } & { { \mathrm { i f ~ } } u \leq \epsilon , } \end{array} \right. }
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
where $\begin{array} { r } { \pi _ { i } ( a | s ) = \frac { 1 } { Z } \rho _ { i } ( a ) \exp ( \beta _ { i } Q _ { i } ( s , a ) ) } \end{array}$ , see Equation (8).
|
| 201 |
+
|
| 202 |
+
Parameter $\beta$ Updates: The parameter $\beta$ can be seen as a Lagrange multiplier that quantifies the magnitude of penalization for deviating from the prior. As such, a small fixed value of $\beta$ would restrict the class of available policies and evidently constrain the asymptotic performance of MIRL. In order to remedy this problem and obtain better asymptotic performance, we use the same adaptive $\beta$ -scheduling over rounds $i$ from (Fox et al., 2016) in which $\beta _ { i }$ is updated linearly according to $\beta _ { i + 1 } = c \cdot i$ with some positive constant $c$ . This update favours small values of $\beta$ at the beginning of training and large values towards the end of training when the error over Q-values is small. Therefore, towards the end of training when $\beta$ is large, MIRL recovers ordinary Q-learning without a constraint. This ensures that the asymptotic performance of MIRL is not hindered.
|
| 203 |
+
|
| 204 |
+
# 4.2 MIRL WITH PARAMETRIC FUNCTION APPROXIMATORS
|
| 205 |
+
|
| 206 |
+
For parametric function approximators, the scheme for updating the prior and the behavioural policy is the same as in the tabular setting but Q-function updates and $\beta$ -scheduling need to be adjusted for high-dimensional state spaces. The pseudocode of our proposed algorithm is outlined in Algorithm 1 and follows standard literature for parametric value learning, see e.g. Mnih et al. (2015).
|
| 207 |
+
|
| 208 |
+
Q-function Updates: Q-function parameters are obtained by minimizing the following loss
|
| 209 |
+
|
| 210 |
+
$$
|
| 211 |
+
L ( \theta , \rho ) : = \mathbb { E } _ { s , a , r , s ^ { \prime } \sim \mathcal { M } } \left[ \Big ( ( T _ { \mathrm { s o f t } } ^ { \rho } Q _ { \bar { \theta } } ) ( s , a , s ^ { \prime } ) - Q _ { \theta } ( s , a ) \Big ) ^ { 2 } \right]
|
| 212 |
+
$$
|
| 213 |
+
|
| 214 |
+
where $\mathcal { M }$ is a replay memory (Mnih et al., 2015), $Q _ { \bar { \theta } }$ is a target network that is updated after a certain number of training iterations and $T _ { \mathrm { s o f t } } ^ { \rho } Q$ is the empirical soft-operator from the tabular setting, here repeated for convenience $\begin{array} { r } { ( T _ { \mathrm { s o f f } } ^ { \rho } Q ) ( \vec { s , a } , s ^ { \prime } ) : = r ( s , a ) + \gamma \frac { 1 } { \beta } \log \sum _ { a ^ { \prime } } \rho ( a ^ { \prime } ) \exp { ( \beta Q ( s ^ { \prime } , a ^ { \prime } ) ) } . } \end{array}$ .
|
| 215 |
+
|
| 216 |
+
Parameter $\beta$ Updates: We use the same adaptive $\beta$ -scheduling from Leibfried et al. (2018) in which $\beta _ { i }$ is updated according to the inverse of the empirical loss of the Q-function, i.e. $\beta _ { i + 1 } =$ $\begin{array} { r } { ( 1 - \alpha _ { \beta } ) \beta _ { i } + \dot { \alpha } _ { \beta } \big ( \frac { 1 } { L ( \theta _ { i } , \rho _ { i + 1 } ) } \big ) } \end{array}$ . This provides more flexibility than the linear scheduling scheme from the tabular setting, more suitable for high-dimensional state spaces where it is impossible to visit all state-action pairs.
|
| 217 |
+
|
| 218 |
+
# Algorithm 1 MIRL
|
| 219 |
+
|
| 220 |
+
1: Input: the learning rates $\alpha _ { \rho }$ , $\alpha _ { Q }$ and $\alpha _ { \beta }$ , a $\mathrm { Q }$ -network $Q _ { \theta } ( s , a )$ , a target network $Q _ { \bar { \theta } } ( s , a )$ , a
|
| 221 |
+
behavioural policy $\pi _ { b }$ , an initial prior $\rho _ { 0 }$ and parameters $\theta _ { 0 }$ at $t = 0$ .
|
| 222 |
+
2: for $i = 1$ to $N$ iterations do
|
| 223 |
+
3: Get environment state $s _ { i }$ and apply action $a _ { i } \sim \pi _ { b } ( \cdot | s _ { i } )$
|
| 224 |
+
4: Get $r _ { i }$ , $s _ { i + 1 }$ and store $\left( { { s _ { i } } , { a _ { i } } , { r _ { i } } , { s _ { i + 1 } } } \right)$ in replay memory $\mathcal { M }$
|
| 225 |
+
5: Update prior $\rho _ { i + 1 } ( \cdot ) = \rho _ { i } ( \cdot ) ( 1 - \alpha _ { \rho } ) + \alpha _ { \rho } \pi _ { i } ( \cdot | s _ { i } )$
|
| 226 |
+
6: if $i$ mod update frequency $= = 0$ then
|
| 227 |
+
7: Update Q-function $\theta _ { i + 1 } = \theta _ { i } - \alpha _ { Q } \nabla _ { \theta } L ( \theta , \rho _ { i + 1 } ) | _ { \theta _ { i } }$ according to Equation (13)
|
| 228 |
+
8: Update parameter βi+1 = (1 − αβ)βi + αβ 1L(θi,ρi+1)
|
| 229 |
+
9: end if
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
Figure 1: Grid world experiments. Left column: The top shows a corridor grid world with $3 \times 2 0$ cells where the goal is on the right. The bottom shows an $8 \times 8$ grid world where an important action (left) has to be made exactly once to arrive at the goal. Middle column: Evaluation of Qlearning (QL), SQL with standard uniform exploration and with marginal exploration ${ ( \mathrm { S Q L } } . \mathrm { m } )$ , and MIRL. We clearly see that MIRL outperforms the baselines on the corridor, and is comparable to the baselines on the $8 \times 8$ world. Right column: We see that MIRL is able to identify the correct action (go right) faster than the baselines in the corrider (top). The bottom reports how having infrequent but important actions does not affect the performance of MIRL.
|
| 233 |
+
|
| 234 |
+
# 5 EXPERIMENTS
|
| 235 |
+
|
| 236 |
+
We evaluate our MIRL agent both in the tabular setting using a grid world domain, and in the parametric function approximator setting using the Atari domain.
|
| 237 |
+
|
| 238 |
+
# 5.1 GRID WORLD
|
| 239 |
+
|
| 240 |
+
As an intuitive example, we evaluate our method in a grid world domain where the agent has to reach a goal. Reaching the goal gives a reward of 9 but each step yields a reward of $- 1$ . After the end of an episode (when reaching the goal), the agent’s location is randomly re-sampled uniformly over the state space. We compare against two baselines, Q-learning without any regularization, and SQL (Fox et al., 2016) which employs entropy regularization with the dynamic $\beta$ -scheduling scheme outlined earlier. We train the agents for $2 . 5 \cdot 1 0 ^ { \overline { { 5 } } }$ environment steps following the procedure outlined in Fox et al. (2016). Both SQL and MIRL update the Lagrange multiplier $\beta$ over time by using a linear scheduling scheme with a constant $c = \mathrm { i } 0 ^ { - 3 }$ . MIRL additionally updates the estimate of the optimal prior by using a learning rate $\alpha _ { \rho } = 2 \cdot 1 0 ^ { - 3 }$ . In all experiments, we use an adaptive learning rate for Q-values $\alpha _ { Q } = n ( s , a ) ^ { - \omega }$ that depends on the state-action-visitation frequencies $n ( s , a )$ (Fox et al., 2016). See Appendix for further details.
|
| 241 |
+
|
| 242 |
+

|
| 243 |
+
Figure 2: Left panel: Median normalized score across 19 Atari games. Comparison between our method mutual information RL (MIRL), SQL and DQN, demonstrating MIRL’s superior performance. Right panels: Top figures show the raw score for 2 example games reporting MIRL’s superior performance on RoadRunner and Seaquest. The bottom plots show the evolution of the estimated prior over actions. For RoadRunner the prior converges to stable values during training. In Seaquest, the algorithm seems not to have converged yet after 50 million environment steps which is why the prior probabilities have not converged yet either (however, the formation of separate trajectory clusters towards the end of training indicates the ongoing process of convergence). See Appendix for details and plots for all environments. The curves are smoothed with an exponential moving average with effective window size of $1 0 ^ { 6 }$ environment steps.
|
| 244 |
+
|
| 245 |
+
During the training of each algorithm, snapshots of the Q-tables (and the estimate of the prior in the case of MIRL) are stored every 100 environment steps for evaluation. The evaluation for a single snapshot is conducted by running the policy for 30 episodes lasting at most 100 environment steps. The epsilon value when in evaluation mode is set to $\epsilon = 0 . 0 5$ (same as in training). Every individual experiment is repeated with 10 different initial random seeds and results are averaged across seeds.
|
| 246 |
+
|
| 247 |
+
Figure 1 summarizes our grid world experiments on two instances: a corridor where the goal is to the right, and a square world where one important action has to be executed exactly once. In the corridor, MIRL clearly outperforms competing approaches (Q-learning and SQL), whereas in the square world, MIRL attains comparable performance as the baselines. Note that these results remain valid when equipping SQL with the same marginal exploration scheme as MIRL.
|
| 248 |
+
|
| 249 |
+
# 5.2 ATARI
|
| 250 |
+
|
| 251 |
+
We conduct experiments on 19 Atari games (Brockman et al., 2016) with Algorithm 1 (MIRL), and compare against DQN (Mnih et al., 2015) and SQL (Haarnoja et al., 2018c) with a dynamic $\beta$ -scheduling scheme based on loss evolution that leads to improved performance over vanilla SQL with fixed $\beta$ (Leibfried et al., 2018). The three algorithms use a neural network for the estimation of Q-values as in (Mnih et al., 2015). The network receives as an input the state $s$ which is composed of the last four frames of the game with some extra pre-processing (see Appendix), and it outputs a vector of Q-values, i.e. one value for each valid action. We train the network for $5 \cdot 1 0 ^ { 7 }$ environment steps, where a training iteration is performed every four steps. The target network $Q _ { \bar { \theta } }$ is updated every $1 0 ^ { 4 }$ training iterations. Both SQL and MIRL update the Lagrange multiplier $\beta$ over time by using an exponential moving average of the inverse loss 4 (Leibfried et al., 2018) with $\alpha _ { \beta } = 3 { \cdot } 1 0 ^ { - 5 }$ . In addition, MIRL updates the estimate of the optimal prior by using a learning rate $\alpha _ { \rho } = 5 \cdot 1 0 ^ { - 5 }$ . Additional details can be found in the Appendix.
|
| 252 |
+
|
| 253 |
+
For evaluation, we create snapshots of the network agents every $1 0 ^ { 5 }$ environment steps. Evaluating a single snapshot offline is done by running the policy for 30 episodes that last at most $4 . 5 \cdot 1 0 ^ { 5 }$ environment steps but terminate earlier in case of a terminal event. When evaluating the agents, the epsilon value is $\epsilon = 0 . 0 5$ , whereas in training $\epsilon$ is linearly annealed over the first $1 0 ^ { 6 }$ steps (Mnih et al., 2015) from 1.0 to 0.1.
|
| 254 |
+
|
| 255 |
+
To summarize the results across all games, we normalize the episodic rewards obtained in the evaluation. The normalized episodic rewards are computed as follows $\begin{array} { r l r } { z _ { \mathrm { n o r m a l i z e d } } } & { = } & { \frac { z - z _ { \mathrm { r a n d o m } } } { z _ { \mathrm { h u m a n } } - z _ { \mathrm { r a n d o m } } } \cdot 1 0 0 \% , } \end{array}$ where $z$ stands for the score obtained from our agent at test time, $\tilde { z } _ { \mathrm { r a n d o m } }$ stands for the score that a random agent obtains and $z _ { \mathrm { h u m a n } }$ for the score a human obtains. Random and human scores are taken from Mnih et al. (2015) and Van Hasselt et al. (2016). As seen in Figure 2, our algorithm significantly outperforms the baselines in terms of the median normalized score. In particular, after 50 million interactions we obtain about $3 0 \%$ higher median normalized score compared to SQL and $5 0 \%$ higher score compared to DQN. MIRL attains the final performance of SQL in about half the amount of interactions with the environment and, similarly, it attains DQN’s final performance in about five times less interactions.
|
| 256 |
+
|
| 257 |
+
In Table 1 we show the comparison between best-performing agents for all the
|
| 258 |
+
|
| 259 |
+
Table 1: Mean Normalized score in 19 Atari games for DQN, SQL and our approach MIRL.
|
| 260 |
+
|
| 261 |
+
<table><tr><td rowspan=1 colspan=1>Game</td><td rowspan=1 colspan=1>DQN (%)</td><td rowspan=1 colspan=1>SQL (%)</td><td rowspan=1 colspan=1>MIRL (%)</td></tr><tr><td rowspan=1 colspan=1>Alien</td><td rowspan=1 colspan=1>101.58</td><td rowspan=1 colspan=1>51.02</td><td rowspan=4 colspan=1>40.23357.40330.197.80</td></tr><tr><td rowspan=18 colspan=1>AssaultAsterixAsteroidsBankHeistBeamRiderBoxingChopperCommandDemonAttackGopherKangarooKrullKungFuMasterRiverraidRoadRunnerSeaquestSpaceInvadersStarGunnerUpNDown</td><td rowspan=1 colspan=1>250.61</td><td rowspan=1 colspan=1>283.62</td></tr><tr><td rowspan=1 colspan=1>166.32</td><td rowspan=1 colspan=1>242.73</td></tr><tr><td rowspan=1 colspan=1>9.74</td><td rowspan=1 colspan=1>8.57</td></tr><tr><td rowspan=1 colspan=1>97.12</td><td rowspan=1 colspan=1>94.62</td><td rowspan=3 colspan=1>166.26117.212338.89</td></tr><tr><td rowspan=1 colspan=1>99.16</td><td rowspan=1 colspan=1>113.64</td></tr><tr><td rowspan=1 colspan=1>2178.57</td><td rowspan=1 colspan=1>2283.33</td></tr><tr><td rowspan=1 colspan=1>72.71</td><td rowspan=1 colspan=1>26.37</td><td rowspan=2 colspan=1>65.03469.30</td></tr><tr><td rowspan=1 colspan=1>350.95</td><td rowspan=1 colspan=1>451.78</td></tr><tr><td rowspan=1 colspan=1>474.18</td><td rowspan=1 colspan=1>538.87</td><td rowspan=1 colspan=1>429.44</td></tr><tr><td rowspan=1 colspan=1>351.48</td><td rowspan=1 colspan=1>393.16</td><td rowspan=1 colspan=1>405.9</td></tr><tr><td rowspan=1 colspan=1>843.16</td><td rowspan=1 colspan=1>886.68</td><td rowspan=1 colspan=1>1036.04</td></tr><tr><td rowspan=1 colspan=1>122.14</td><td rowspan=1 colspan=1>142.04</td><td rowspan=1 colspan=1>121.41</td></tr><tr><td rowspan=1 colspan=1>77.21</td><td rowspan=1 colspan=1>109.37</td><td rowspan=1 colspan=1>76.02</td></tr><tr><td rowspan=1 colspan=1>548.90</td><td rowspan=1 colspan=1>613.62</td><td rowspan=1 colspan=1>695.88</td></tr><tr><td rowspan=1 colspan=1>21.95</td><td rowspan=1 colspan=1>36.00</td><td rowspan=1 colspan=1>64.86</td></tr><tr><td rowspan=1 colspan=1>166.62</td><td rowspan=1 colspan=1>200.38</td><td rowspan=2 colspan=1>164.79574.89</td></tr><tr><td rowspan=1 colspan=1>653.44</td><td rowspan=1 colspan=1>681.12</td><td rowspan=1 colspan=1>574.89</td></tr><tr><td rowspan=1 colspan=1>183.19</td><td rowspan=1 colspan=1>230.82</td><td rowspan=1 colspan=1>394.21</td></tr><tr><td rowspan=1 colspan=1>Mean</td><td rowspan=1 colspan=1>356.26</td><td rowspan=1 colspan=1>388.83</td><td rowspan=1 colspan=1>413.46</td></tr></table>
|
| 262 |
+
|
| 263 |
+
environments, where the best-performing agent is the agent that achieves the best score in evaluation mode considering all snapshots. Although this measure is not very robust, we include it since it is a commonly reported measure of performance in the field. MIRL outperforms the other baselines in 11 out of 19 games compared to SQL and DQN that are best on 5 and 3 games respectively.
|
| 264 |
+
|
| 265 |
+
In Figure 3, we conduct additional experiments on a subset of eight Atari games comparing MIRL and DQN with two different ablations of SQL: one ablation using uniform exploration and another ablation using the same marginal exploration scheme as MIRL (denoted SQL m). These experiments confirm the importance of the difference in values between MIRL and SQL rather than the difference in the exploration protocol.
|
| 266 |
+
|
| 267 |
+
# 6 RELATED WORK
|
| 268 |
+
|
| 269 |
+
The connection between reinforcement learning and inference is well established (Dayan & Hinton, 1997; Levine, 2018). Several authors have proposed RL algorithms based on optimizing the ELBO in Equation (5). In policy search, a popular approach is to optimize the lower bound using an iterative procedure similar to expectation maximization (Deisenroth et al., 2013). Different approximations can then be used for the trajectory distributions, resulting in different algorithms (Kober & Peters, 2009; Peters et al., 2010; Hachiya et al., 2011). The recent maximum a posteriori policy optimisation (MPO) (Abdolmaleki et al., 2018) framework uses a similar approach and combines an expectation maximization style update with off-policy estimation of a regularized Q-function. A key difference between MPO and our method is that MPO treats the approximate distribution $q ( \tau )$ as an auxiliary distribution used to optimize the policy that generates $p ( \tau )$ . In our method, as well as in the maximum entropy based methods discussed below, we optimize the policy used to generate $q ( \tau )$ , while using the distribution $p ( \tau )$ generated by the prior as an auxiliary distribution. While both approaches can be related to optimizing the ELBO, they can be shown to optimize different versions of the KL constraint on the target policy (Levine, 2018).
|
| 270 |
+
|
| 271 |
+
Maximum entropy reinforcement learning represents another family of inference-based RL methods. This formulation can be derived from the same evidence lower bound in Equation (5), by fixing the generative policy for $p ( \tau )$ to be a uniform prior. Maximum entropy RL has been derived under different conditions in many different settings. Ziebart et al. (2008) proposed maximum entropy learning for inverse reinforcement learning problems. Several authors have applied the same principles for trajectory optimization (Kappen, 2005; Todorov, 2008; Levine & Koltun, 2013). These maximum entropy methods typically assume the availability of some sort of transition model. More recently, maximum entropy learning has also been studied in model-free settings by introducing alternative soft-operators (Asadi & Littman, 2017) or soft Q-learning approaches (Rawlik et al., 2012; Fox et al., 2016; Haarnoja et al., 2017). Soft Q-learning learns a softened value function by replacing the hard maximum operator in the Q-learning update with a softmax operator. Several authors have discussed the benefits of this approach and provided generalizations under linear programming formulations (Neu et al., 2017). In particular, Fox et al. (2016) and Haarnoja et al. (2017) show that maximum entropy learning improves exploration and robustness. Furthermore, Haarnoja et al. (2018b) show that the resulting policies are composable and can be used to directly build solutions to unseen problems. Additionally, entropy-regularization has shown to be crucial to prove convergence guarantees on value learning with non-linear function approximators (Dai et al., 2018). The soft Qlearning framework has also been used in actor-critic settings (Haarnoja et al., 2018c) and to show a connection between value-based and policy gradient methods (Schulman et al., 2017; Nachum et al., 2017). The method has also been extended to hierarchical settings (Florensa et al., 2017; Haarnoja et al., 2018a). In the multi-task setting, the Distral framework (Teh et al., 2017) combines entropy regularization with an additional KL regularization used to transfer knowledge between tasks.
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
Figure 3: Normalized score for eight games comparing MIRL against standard SQL and a modified version of SQL that explores with the marginal distribution over actions (SQL m). The exploration method slightly improves SQL but not sufficiently enough to achieve MIRL’s performance. See individual plots and games in the Appendix.
|
| 275 |
+
|
| 276 |
+
The mutual information, central to our approach, is a basic quantity in information theory to measure the statistical dependence between two random variables. Machine learning applications that use the mutual information are numerous including the information-bottleneck method (Tishby et al., 1999), rate-distortion theory (Cover & Thomas, 2006; Tishby & Polani, 2011), clustering (Still & Bialek, 2004) and curiosity driven exploration (Still & Precup, 2012).
|
| 277 |
+
|
| 278 |
+
# 7 DISCUSSION AND CONCLUSION
|
| 279 |
+
|
| 280 |
+
Using a variational inference perspective, we derived a novel RL objective that allows optimization of the prior over actions. This generalizes previous methods in the literature that assume fixed uniform priors. We show that our formulation is equivalent to applying a mutual-information regularization and derive a novel algorithm (MIRL) that learns the prior over actions. We demonstrate that MIRL significantly improves performance over SQL and DQN.
|
| 281 |
+
|
| 282 |
+
We recognize that our approach might fail under certain conditions. For example, in the case when there is an action that is useful only once (similar to our
|
| 283 |
+
|
| 284 |
+
$8 \times 8$ grid world example) but is most of the times penalized with a negative reward. When the negative reward is too strong, MIRL might assign very low probability to that action and never explore it. However, this problem might be alleviated by a weighted mixing of our exploration policy with a uniform distribution.
|
| 285 |
+
|
| 286 |
+
An interesting direction for future work is to investigate the convergence properties of the alternating optimization problem presented here. We believe that, at least in the tabular case, the framework of stochastic approximation for two timescales (Borkar, 2009) is sufficient to prove convergence. On the experimental side, one could also investigate how our approach can be combined with the Rainbow framework (Hessel et al., 2017) which is the current state of the art in performance.
|
| 287 |
+
|
| 288 |
+
# REFERENCES
|
| 289 |
+
|
| 290 |
+
Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a posteriori policy optimisation. arXiv preprint arXiv:1806.06920, 2018.
|
| 291 |
+
|
| 292 |
+
Kavosh Asadi and Michael L Littman. An alternative softmax operator for reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 243– 252. JMLR. org, 2017.
|
| 293 |
+
|
| 294 |
+
Dimitri P Bertsekas. Dynamic Programming and Optimal Control: Volume 2. Athena Scientific, 1995.
|
| 295 |
+
|
| 296 |
+
Vivek S Borkar. Stochastic approximation: a dynamical systems viewpoint, volume 48. Springer, 2009.
|
| 297 |
+
|
| 298 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 299 |
+
|
| 300 |
+
Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, second edition, 2006.
|
| 301 |
+
|
| 302 |
+
Bo Dai, Albert Shaw, Lihong Li, Lin Xiao, Niao He, Zhen Liu, Jianshu Chen, and Le Song. Sbeed: Convergent reinforcement learning with nonlinear function approximation. In International Conference on Machine Learning, pp. 1133–1142, 2018.
|
| 303 |
+
|
| 304 |
+
Peter Dayan and Geoffrey E Hinton. Using expectation-maximization for reinforcement learning. Neural Computation, 9(2):271–278, 1997.
|
| 305 |
+
|
| 306 |
+
Marc Peter Deisenroth, Gerhard Neumann, Jan Peters, et al. A survey on policy search for robotics. Foundations and Trends $\textsuperscript { \textregistered }$ in Robotics, 2(1–2):1–142, 2013.
|
| 307 |
+
|
| 308 |
+
Carlos Florensa, Yan Duan, and Pieter Abbeel. Stochastic neural networks for hierarchical reinforcement learning. arXiv preprint arXiv:1704.03012, 2017.
|
| 309 |
+
|
| 310 |
+
Roy Fox, Ari Pakman, and Naftali Tishby. Taming the noise in reinforcement learning via soft updates. In Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, pp. 202–211. AUAI Press, 2016.
|
| 311 |
+
|
| 312 |
+
Tim Genewein, Felix Leibfried, Jordi Grau-Moya, and Daniel Alexander Braun. Bounded rationality, abstraction, and hierarchical decision-making: An information-theoretic optimality principle. Frontiers in Robotics and AI, 2:27, 2015.
|
| 313 |
+
|
| 314 |
+
Jordi Grau-Moya, Felix Leibfried, Tim Genewein, and Daniel A Braun. Planning with informationprocessing constraints and model uncertainty in markov decision processes. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 475–491. Springer, 2016.
|
| 315 |
+
|
| 316 |
+
Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. In International Conference on Machine Learning, pp. 1352–1361, 2017.
|
| 317 |
+
|
| 318 |
+
Tuomas Haarnoja, Kristian Hartikainen, Pieter Abbeel, and Sergey Levine. Latent space policies for hierarchical reinforcement learning. In International Conference on Machine Learning, 2018a.
|
| 319 |
+
|
| 320 |
+
Tuomas Haarnoja, Vitchyr Pong, Aurick Zhou, Murtaza Dalal, Pieter Abbeel, and Sergey Levine. Composable deep reinforcement learning for robotic manipulation. arXiv preprint arXiv:1803.06773, 2018b.
|
| 321 |
+
|
| 322 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018c.
|
| 323 |
+
|
| 324 |
+
Hirotaka Hachiya, Jan Peters, and Masashi Sugiyama. Reward-weighted regression with sample reuse for direct policy search in reinforcement learning. Neural Computation, 23(11):2798–2832, 2011.
|
| 325 |
+
|
| 326 |
+
Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. arXiv preprint arXiv:1710.02298, 2017.
|
| 327 |
+
|
| 328 |
+
Heinke Hihn, Sebastian Gottwald, and Daniel Alexander Braun. Bounded rational decision-making with adaptive neural network priors. In IAPR Workshop on Artificial Neural Networks in Pattern Recognition, 2018.
|
| 329 |
+
|
| 330 |
+
Hilbert J Kappen. Path integrals and symmetry breaking for optimal control theory. Journal of statistical mechanics: theory and experiment, 2005(11):P11011, 2005.
|
| 331 |
+
|
| 332 |
+
Jens Kober and Jan R Peters. Policy search for motor primitives in robotics. In Advances in neural information processing systems, pp. 849–856, 2009.
|
| 333 |
+
|
| 334 |
+
Felix Leibfried and Daniel Alexander Braun. A reward-maximizing spiking neuron as a bounded rational decision maker. Neural Computation, 27:1682–1720, 2015.
|
| 335 |
+
|
| 336 |
+
Felix Leibfried and Daniel Alexander Braun. Bounded rational decision-making in feedforward neural networks. In Conference on Uncertainty in Artificial Intelligence, 2016.
|
| 337 |
+
|
| 338 |
+
Felix Leibfried, Jordi Grau-Moya, and Haitham B Ammar. An information-theoretic optimality principle for deep reinforcement learning. arXiv preprint arXiv:1708.01867, 2018.
|
| 339 |
+
|
| 340 |
+
Sergey Levine. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018.
|
| 341 |
+
|
| 342 |
+
Sergey Levine and Vladlen Koltun. Variational policy search via trajectory optimization. In Advances in Neural Information Processing Systems, pp. 207–215, 2013.
|
| 343 |
+
|
| 344 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
|
| 345 |
+
|
| 346 |
+
Ofir Nachum, Mohammad Norouzi, Kelvin Xu, and Dale Schuurmans. Bridging the gap between value and policy based reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2775–2785, 2017.
|
| 347 |
+
|
| 348 |
+
Gergely Neu, Anders Jonsson, and Vicenc¸ Gomez. A unified view of entropy-regularized markov ´ decision processes. arXiv preprint arXiv:1705.07798, 2017.
|
| 349 |
+
|
| 350 |
+
Pedro Ortega and Daniel Alexander Braun. Thermodynamics as a theory of decision-making with information-processing costs. Proceedings of the Royal Society A, 469(2153):20120683, 2013.
|
| 351 |
+
|
| 352 |
+
Zhen Peng, Tim Genewein, Felix Leibfried, and Daniel Alexander Braun. An information-theoretic on-line update principle for perception-action coupling. In IEEE/RSJ International Conference on Intelligent Robots and Systems, 2017.
|
| 353 |
+
|
| 354 |
+
Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In ¨ AAAI, pp. 1607–1612. Atlanta, 2010.
|
| 355 |
+
|
| 356 |
+
Martin Puterman. Markov decision processes: Discrete stochastic dynamic programming. 1994.
|
| 357 |
+
|
| 358 |
+
Konrad Rawlik, Marc Toussaint, and Sethu Vijayakumar. On stochastic optimal control and reinforcement learning by approximate inference. In Robotics: science and systems, volume 13, pp. 3052–3056, 2012.
|
| 359 |
+
|
| 360 |
+
Jonathan Rubin, Ohad Shamir, and Naftali Tishby. Trading value and information in mdps. In Decision Making with Imperfect Decision Makers, pp. 57–74. Springer, 2012.
|
| 361 |
+
|
| 362 |
+
John Schulman, Xi Chen, and Pieter Abbeel. Equivalence between policy gradients and soft qlearning. arXiv preprint arXiv:1704.06440, 2017.
|
| 363 |
+
|
| 364 |
+
Claude Shannon. Coding theorems for a discrete source with a fidelity criterion. Institute of Radio Engineers, International Convention Record, 7:142–163, 1959.
|
| 365 |
+
|
| 366 |
+
Christopher Sims. Rational inattention and monetary economics. Handbook of Monetary Economics, 3, 2011.
|
| 367 |
+
|
| 368 |
+
Susanne Still and William Bialek. How many clusters? an information-theoretic perspective. Neural computation, 16(12):2483–2506, 2004.
|
| 369 |
+
|
| 370 |
+
Susanne Still and Doina Precup. An information-theoretic approach to curiosity-driven reinforcement learning. Theory in Biosciences, 131(3):139–148, 2012.
|
| 371 |
+
|
| 372 |
+
R Sutton and A Barto. Reinforcement learning. MIT Press, Cambridge, 1998.
|
| 373 |
+
|
| 374 |
+
Yee Teh, Victor Bapst, Wojciech M Czarnecki, John Quan, James Kirkpatrick, Raia Hadsell, Nicolas Heess, and Razvan Pascanu. Distral: Robust multitask reinforcement learning. In Advances in Neural Information Processing Systems, pp. 4496–4506, 2017.
|
| 375 |
+
|
| 376 |
+
Philip Thomas. Bias in natural actor-critic algorithms. In International Conference on Machine Learning, pp. 441–448, 2014.
|
| 377 |
+
|
| 378 |
+
Naftali Tishby and Daniel Polani. Information theory of decisions and actions. In Perception-Action Cycle. Springer, 2011.
|
| 379 |
+
|
| 380 |
+
Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. The 37th Annual Allerton Conference on Communication, Control, and Computing., 1999.
|
| 381 |
+
|
| 382 |
+
Emanuel Todorov. General duality between optimal control and estimation. In Decision and Control, 2008. CDC 2008. 47th IEEE Conference on, pp. 4286–4292. IEEE, 2008.
|
| 383 |
+
|
| 384 |
+
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. 2016.
|
| 385 |
+
|
| 386 |
+
Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
|
| 387 |
+
|
| 388 |
+
# A APPENDIX
|
| 389 |
+
|
| 390 |
+
# A.1 CONNECTION TO MUTUAL INFORMATION FOR $\gamma 1$
|
| 391 |
+
|
| 392 |
+
The goal of this section is to show that when $\gamma 1$ , Equation (6) can be expressed as the following average-reward formulation (Puterman, 1994) with a constraint on the stationary mutual information
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
\operatorname* { m a x } _ { \pi } \mathbb { E } _ { s \sim \mu _ { \pi } } \left[ \sum _ { a } \pi ( a | s ) r ( s , a ) \right] \quad { \mathrm { s . t . ~ } } I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } ) \leq C ,
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
where $\mu _ { \pi }$ and $\rho _ { \pi }$ are the stationary distributions induced by the policy $\pi$ over states and actions, respectively, and thus $I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } )$ is defined as the stationary mutual-information. Note that for a fixed stationary distribution over states, this problem coincides exactly with the well-known ratedistortion problem (Cover & Thomas, 2006).
|
| 399 |
+
|
| 400 |
+
We start by expressing (6) as a constrained problem
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\operatorname* { m a x } _ { \pi } \mathbb { E } _ { q } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , a _ { t } ) \right] \mathrm { ~ s . t . ~ } \operatorname* { m i n } _ { \rho } \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) \leq K ( \gamma ) ,
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
where $\begin{array} { r } { K ( \gamma ) : = \frac { C } { 1 - \gamma } } \end{array}$ (although we have set $K ( \cdot )$ as a function of $\gamma$ , it is without loss of generality since we can always obtain a desired $K ( \cdot )$ by choosing an appropriate $C$ for a given $\gamma$ ) and the marginal probability of state $s _ { t }$ at time $t$ following the Markovian dynamics is written as in Equation (10).
|
| 407 |
+
|
| 408 |
+
A standard result in the MDP literature (Bertsekas, 1995) is that
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\arg \operatorname* { m a x } _ { \pi } \operatorname* { l i m } _ { \gamma 1 } ( 1 - \gamma ) \mathbb { E } _ { q } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , a _ { t } ) ] \iff \arg \operatorname* { m a x } _ { \pi } \mathbb { E } _ { s \sim \mu _ { \pi } } [ \sum _ { a } \pi ( a | s ) r ( s , a ) ]
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
which basically says that the optimal policy for the limit $\gamma 1$ of an infinite horizon problem is equivalent to the average reward formulation. Now it only remains to make explicit a similar equivalence on the constraint.
|
| 415 |
+
|
| 416 |
+
We rewrite the constraint by multiplying on both sides by $( 1 - \gamma )$ assuming $\gamma \in ( 0 , 1 )$
|
| 417 |
+
|
| 418 |
+
$$
|
| 419 |
+
\operatorname* { m i n } _ { \rho } \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) \leq K ( \gamma ) \iff \operatorname* { m i n } _ { \rho } ( 1 - \gamma ) \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) \leq C .
|
| 420 |
+
$$
|
| 421 |
+
|
| 422 |
+
Taking the limit $\gamma 1$ in the last inequality and interchanging the limit and the min operators 5, we obtain the constraint $\begin{array} { r } { \operatorname* { m i n } _ { \rho } \operatorname* { l i m } _ { \gamma \to 1 } ( 1 - \gamma ) \dot { \sum } _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \mathbf { \bar { \pi } } , \mathbf { \bar { \rho } } ) \leq C } \end{array}$ . Then, we see the connection between the last inequality and the constraint on Equation (14) using the following Proposition 2.
|
| 423 |
+
|
| 424 |
+
Proposition 2. Let $\mu _ { \pi } ( s )$ and $\rho _ { \pi } ( a )$ be the stationary distribution over states and actions under policy $\pi$ according to Definitions (1) and (2). Then the stationary mutual information defined as $\begin{array} { r } { I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } ) : = \operatorname* { m i n } _ { \rho } I _ { f } ( \mu _ { \pi } \pi , \rho ) } \end{array}$ can also be written as
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } ) = \operatorname* { m i n } _ { \rho } \operatorname* { l i m } _ { \gamma 1 } ( 1 - \gamma ) \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho )
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
where $\nu _ { t } ( s )$ is defined as in (10).
|
| 431 |
+
|
| 432 |
+
Proof. Following similar steps as in (Bertsekas, 1995, p.186) we have
|
| 433 |
+
|
| 434 |
+
$$
|
| 435 |
+
\begin{array} { r l r } { { I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } ) = \operatorname* { m i n } _ { \rho } \operatorname* { l i m } _ { N \to \infty } \frac { 1 } { N } \sum _ { t = 0 } ^ { N - 1 } I _ { f } ( \nu _ { t } , \pi , \rho ) } } \\ & { } & { = \underset { \rho } { \operatorname* { m i n } } \underset { N \to \infty } { \operatorname* { l i m } } \operatorname* { l i m } _ { \rho \to 1 } \frac { \sum _ { t = 0 } ^ { N - 1 } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) } { \sum _ { t = 0 } ^ { N } \gamma ^ { t } } } \\ & { } & { = \underset { \rho \ \gamma \to 1 } { \operatorname* { m i n } } \underset { N \to \infty } { \operatorname* { l i m } } \ \frac { \sum _ { t = 0 } ^ { N } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) } { \sum _ { t = 0 } ^ { N } \gamma ^ { t } } } \\ & { } & { = \underset { \rho \ \gamma \to 1 } { \operatorname* { m i n } } ( 1 - \gamma ) \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } I _ { f } ( \nu _ { t } , \pi , \rho ) , } \end{array}
|
| 436 |
+
$$
|
| 437 |
+
|
| 438 |
+
where we used Proposition 3 (shown next) in the first equality and where the limits in the third equality can be interchanged due to the monotone convergence theorem. □
|
| 439 |
+
|
| 440 |
+
Proposition 3. Let $\mu _ { \pi } ( s )$ and $\rho _ { \pi } ( a )$ be the stationary distribution over states and actions under policy $\pi$ according to Definitions (1) and (2). Then the stationary mutual information defined as $I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } )$ can also be written as
|
| 441 |
+
|
| 442 |
+
$$
|
| 443 |
+
I _ { f } ( \mu _ { \pi } , \pi , \rho _ { \pi } ) = \operatorname* { m i n } _ { \rho } \operatorname* { l i m } _ { N \to \infty } \frac { 1 } { N } \sum _ { t = 0 } ^ { N - 1 } \sum _ { s _ { t } } \nu _ { t } ( s _ { t } ) K L ( \pi ( \cdot | s _ { t } ) | | \rho ( \cdot ) ) ,
|
| 444 |
+
$$
|
| 445 |
+
|
| 446 |
+
where $\nu _ { t } ( s )$ is defined as in (10).
|
| 447 |
+
|
| 448 |
+
Proof. Let ${ \mathcal { T } } _ { \rho } ( s ) : = \mathrm { K L } ( \pi ( \cdot | s ) | | \rho ( \cdot ) )$ and $\begin{array} { r } { \mathcal { T } _ { \rho _ { \pi } } ( s ) : = \mathrm { K L } ( \pi ( \cdot | s ) | | \rho _ { \pi } ( \cdot ) ) } \end{array}$ . Note that both previous quantities are bounded for all $t$ . Then
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
\begin{array} { r l } & { \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) - \sum _ { \theta \to \pi } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) - \sum _ { \theta \to \pi } \rho _ { i } \rangle } \\ & { \quad - \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) - \sum _ { \theta \to \pi } \rho _ { i } \rangle \displaystyle \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) \rangle } \\ & { \quad = \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) } \\ & { \quad = \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) } \\ & { \quad = \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) , \mathcal { D } _ { \theta } ( \theta ) } \\ & { \quad = \operatorname* { m i n } _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { i = \theta \to \pi } ^ { N } \sum _ { \theta \to \theta \to \pi } \frac { 1 } { N } \displaystyle \sum _ { \theta \to \pi } \frac { 1 } { N } \sum _ { \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) \rangle } \\ & \quad = \sum _ { \theta \to \theta \to \pi } \rho _ { i } \langle \mathcal { D } _ { \theta } ( \theta ) \rangle \operatorname* { m a x } \frac { 1 } { N } \displaystyle \sum _ { \theta \to \pi } \ \end{array}
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
where we assumed that $\nu _ { t } ( s ) = \mu _ { \pi } ( s )$ for all $t > K$ and finite but large enough $K$
|
| 455 |
+
|
| 456 |
+
Since in practice we use a discount factor $\gamma \lessapprox 1$ , our original problem formulation in (6) can be seen as an approximation to the problem with stationary mutual-information constraints in (14).
|
| 457 |
+
|
| 458 |
+
The conclusion of this section is that we have established a clear link between the ELBO with optimizable priors and the average reward formulation with stationary mutual-information constraints.
|
| 459 |
+
|
| 460 |
+
# A.2 HYPERPARAMETERS
|
| 461 |
+
|
| 462 |
+
Here we describe the hyperparameters used for both the Grid World experiments (see Table 2) and the Atari experiments (see Table 3).
|
| 463 |
+
|
| 464 |
+
Table 2: Hyperparameters for tabular experiments.
|
| 465 |
+
|
| 466 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Y αp</td><td>0.99 2·10-3</td></tr></table>
|
| 467 |
+
|
| 468 |
+
Table 3: Hyperparameters for Atari experiments.
|
| 469 |
+
|
| 470 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Frame size Frame skip</td><td>[84,84] 4</td></tr><tr><td>History frames (in s)</td><td>4</td></tr><tr><td>Reward clipping</td><td>{-1,0,+1}</td></tr><tr><td>Max environment steps</td><td>27000</td></tr><tr><td>Target update frequency (train. steps)</td><td>10000</td></tr><tr><td>Training update frequency (env. steps)</td><td>4</td></tr><tr><td>Batch size</td><td>32</td></tr><tr><td>Memory capacity</td><td>106</td></tr><tr><td>Y</td><td>0.99</td></tr><tr><td></td><td></td></tr><tr><td>αp</td><td>2.10-6</td></tr><tr><td>αQ</td><td>2.10-5</td></tr><tr><td>αβ β</td><td>3.3 ·10-6 0.01</td></tr></table>
|
| 471 |
+
|
| 472 |
+
# A.3 SPECIFIC PLOTS FOR INDIVIDUAL GAMES
|
| 473 |
+
|
| 474 |
+

|
| 475 |
+
Figure 4: Prior Evolution for all games. We can see that MIRL’s prior has fully converged for some games whereas for other games it is still about to converge.
|
| 476 |
+
|
| 477 |
+

|
| 478 |
+
Figure 5: Scores for all games on the evaluation snapshots.
|
| 479 |
+
|
| 480 |
+
# A.4 ABLATION STUDY
|
| 481 |
+
|
| 482 |
+
In the ablation study summarized in Figure 3, we show how marginal exploration affects SQL. In Figure 6, we show the same plot for individual games. We clearly see that the marginal exploration improves performance, but is not the defining factor for all the improvements obtained by MIRL.
|
| 483 |
+
|
| 484 |
+

|
| 485 |
+
Figure 6: Comparison between standard SQL $( \mathbf { S } \mathbf { Q } \mathbf { L } \mathbf { - } \mathbf { u } )$ , SQL with marginal exploration $( \mathrm { S Q L } \mathrm { . m } )$ , and MIRL.
|
| 486 |
+
|
| 487 |
+
# A.5 EVOLUTION OF THE LAGRANGE MULTIPLIER
|
| 488 |
+
|
| 489 |
+
In Figure 7, we show the evolution of $\beta$ over time (environment steps) for the MIRL agent. As we can see, the $\beta$ -values usually start at a high value (not shown for visual reasons) and typically go down and stabilize at some value. At first sight, this might be seen as a negative side effect since lower $\beta$ values imply a stronger constraint. However, we note that the constraint is highly dependent on the scale of the reward (or its sparsity), and therefore, the $\beta$ value is not meaningful without a proper specification of this reward scaling.
|
| 490 |
+
|
| 491 |
+

|
| 492 |
+
Figure 7: Beta evolution over time.
|
| 493 |
+
|
| 494 |
+
Consequently, given that $\beta$ -values are not meaningful here, we propose to instead show the multiplication of $\beta$ times the current maximum Q-value estimates denoted as $\beta \times \operatorname* { m a x } Q$ . Note that $\bar { \beta Q } ( s , a )$ appears on the exponential term of the policy, i.e. $\begin{array} { r } { \pi ( a | s ) = \frac { 1 } { Z } \rho ( a ) \exp ( \beta Q ( s , a ) ) } \end{array}$ , and therefore, is the term that shapes the deviation from the action-prior distribution. Additionally, the Q-values serve us as proper scaling for each game and account also for the learning of the agent. In particular, while the agent is learning and increasing its reward acquisition, the Q-values are going to be higher, thus, effectively needing a smaller $\beta$ to shape the policy probabilities.
|
| 495 |
+
|
| 496 |
+
On Figure 8, we show the evolution of the term $\beta \times \operatorname* { m a x } Q$ for all the games. As we can see for the majority of games, $\beta \times \operatorname* { m a x } Q$ increases over time or has high value. This is important since a high value denotes that the policy is highly affected by this term.
|
| 497 |
+
|
| 498 |
+

|
| 499 |
+
Figure 8: Evolution of $\beta \times \operatorname* { m a x } Q$ over time while training. Specifically, for an environment step $i$ , we compute the $\beta _ { i } \operatorname* { m a x } _ { a } Q _ { \theta _ { i } } ( s _ { i } , a )$ , where $\beta _ { i }$ is the current $\beta$ -value, $Q _ { \theta _ { i } }$ the current approximation of $\mathrm { Q }$ and $s _ { i }$ is the state at the step $i$ .
|
parse/train/HyEtjoCqFX/HyEtjoCqFX_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HyEtjoCqFX/HyEtjoCqFX_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/LVWcGZr-8h/LVWcGZr-8h.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On Success and Simplicity: A Second Look at Transferable Targeted Attacks
|
| 2 |
+
|
| 3 |
+
Zhengyu Zhao, Zhuoran Liu, Martha Larson Radboud University {z.zhao,z.liu,m.larson}@cs.ru.nl
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Achieving transferability of targeted attacks is reputed to be remarkably difficult. The current state of the art has resorted to resource-intensive solutions that necessitate training model(s) for each target class with additional data. In our investigation, we find, however, that simple transferable attacks which require neither model training nor additional data can achieve surprisingly strong targeted transferability. This insight has been overlooked until now, mainly because the widespread practice of attacking with only few iterations has largely limited the attack convergence to optimal targeted transferability. In particular, we, for the first time, identify that a very simple logit loss can largely surpass the commonly adopted crossentropy loss, and yield even better results than the resource-intensive state of the art. Our analysis spans a variety of transfer scenarios, especially including three new, realistic scenarios: an ensemble transfer scenario with little model similarity, a worse-case scenario with low-ranked target classes, and also a real-world attack on the Google Cloud Vision API. Results in these new transfer scenarios demonstrate that the commonly adopted, easy scenarios cannot fully reveal the actual strength of different attacks and may cause misleading comparative results. We also show the usefulness of the simple logit loss for generating targeted universal adversarial perturbations in a data-free manner. Overall, the aim of our analysis is to inspire a more meaningful evaluation on targeted transferability. Code is available at https://github.com/ZhengyuZhao/Targeted-Tansfer.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Deep neural networks have achieved remarkable performance in various machine learning tasks, but are known to be vulnerable to adversarial attacks [1]. A key property of adversarial attacks that makes them critical in realistic, black-box scenarios is their transferability [2, 3]. Current work on adversarial transferability has achieved great success for non-targeted attacks [4–12], while several initial attempts [3, 4, 13] at targeted transferability have shown its extreme difficulty. Targeted transferability is known to be much more challenging and worth exploring since it can raise more critical concerns by fooling models into predicting a chosen, highly dangerous target class.
|
| 12 |
+
|
| 13 |
+
However, so far state-of-the-art results can only be secured by resource-intensive transferable attacks [14–16]. Specifically, the FDA approach [14, 15] is based on modeling layer-wise feature distributions by training target-class-specific auxiliary classifiers on large-scale labeled data, and then optimizing adversarial perturbations using these auxiliary classifiers from across the deep feature space. The TTP approach [16] is based on training target-class-specific Generative Adversarial Networks (GANs) through global and local distribution matching, and then using the trained generator to directly generate perturbations on any given input image.
|
| 14 |
+
|
| 15 |
+
In this paper, we take a second, thorough look at current research on targeted transferability. Our main contribution is the finding that simple transferable attacks [4, 6, 8] that require neither model training nor additional data can actually achieve surprisingly strong targeted transferability. We argue that this insight has been overlooked mainly because current research has unreasonably restricted the attack convergence by only using a small number of iterations (see detailed discussion in Section 3). Another key contribution of our work is, for the first time, demonstrating the general superiority of a very simple logit loss, which even outperforms the resource-intensive state of the art.
|
| 16 |
+
|
| 17 |
+
In order to validate the general effectiveness of simple transferable attacks, in Section 4.1, we conduct extensive experiments in a wide range of transfer scenarios. We test the commonly adopted single-model and ensemble transfer scenarios, but also introduce three new scenarios that are more challenging and realistic: an ensemble transfer scenario with little model similarity, a worse-case scenario with low-ranked target classes, and also a real-world attack on the Google Cloud Vision API. Experimental results in these new scenarios suggest that evaluation in only the commonly adopted, easy scenarios cannot reveal the actual strength of different attacks, and may cause misleading comparative results. Additional experiments in Section 4.2 have shown the better performance of the simple transferable attacks than the state-of-the-art resource-intensive approaches. Finally, in Section 4.3, inspired by the observation that the generated perturbations themselves reflect specific target semantics, we use the simple Logit attack to generate targeted Universal Adversarial Perturbations (UAPs) in a data-free manner. In contrast, recent advances in targeted UAPs [16–19] have inevitably relied on large-scale optimization over additional data.
|
| 18 |
+
|
| 19 |
+
Overall, we hope our analysis of the weakness of commonly adopted attack settings and transfer scenarios will inspire a more meaningful evaluation on targeted transferability.
|
| 20 |
+
|
| 21 |
+
# 2 Related Work
|
| 22 |
+
|
| 23 |
+
In this section, we review existing simple transferable attacks (Section 2.1), and also recent resourceintensive transferable attacks (Section 2.2). Finally, we discuss related work on generating universal adversarial perturbations.
|
| 24 |
+
|
| 25 |
+
# 2.1 Simple Transferable Attacks
|
| 26 |
+
|
| 27 |
+
We refer to transferable attacks that require neither model training nor additional data, but only use iterative optimization on a single (original) image as simple transferable attacks. Simple transferable attacks have been extensively studied in the non-targeted case [4–12], and also attempted in the targeted case [3, 4, 20]. These attacks are commonly built up on the well-known Iterative-Fast Gradient Sign Method (I-FGSM) [21, 22], which can be formulated as:
|
| 28 |
+
|
| 29 |
+
$$
|
| 30 |
+
\begin{array} { r } { \pmb { x } _ { 0 } ^ { \prime } = \pmb { x } , \pmb { x } _ { i + 1 } ^ { \prime } = \pmb { x } _ { i } ^ { \prime } - \alpha \cdot \mathrm { s i g n } ( \nabla _ { \pmb { x } } J ( \pmb { x } _ { i } ^ { \prime } , y _ { t } ) ) , } \end{array}
|
| 31 |
+
$$
|
| 32 |
+
|
| 33 |
+
where $\pmb { x } _ { i } ^ { \prime }$ denotes the perturbed image in the $i$ -th iteration, and $y _ { t }$ is the target class label. In order to ensure the imperceptibility, the added perturbations are restricted with respect to some $L _ { p }$ distance, i.e., satisfying $\| { \pmb x } ^ { \prime } - { \pmb x } \| _ { p } \overset { \cdot } { \le } \epsilon$ . Current transferable attack methods have commonly adopted the $L _ { \infty }$ distance, but can also be easily adapted to the $L _ { 2 }$ distance based on an $L _ { 2 }$ normalization [23].
|
| 34 |
+
|
| 35 |
+
For the loss function $J ( \cdot , \cdot )$ , most simple transferable attacks have adopted the Cross-Entropy (CE) loss. However, the CE loss has been recently shown to be insufficient in the targeted case due to its decreasing gradient problem [20]. To address this problem, the authors in [20] have proposed the $\mathbf { P 0 + T r i p }$ loss, in which the Poincare distance was used to adapt the gradients’ magnitude: ´
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
L _ { P o } = d ( { \pmb u } , { \pmb v } ) = \mathrm { a r c c o s h } ( 1 + \delta ( { \pmb u } , { \pmb v } ) ) ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\delta ( \pmb { u } , \pmb { v } ) = \frac { 2 \cdot \| \pmb { u } - \pmb { v } \| _ { 2 } ^ { 2 } } { ( 1 - \| \pmb { u } \| _ { 2 } ^ { 2 } ) ( 1 - \| \pmb { v } \| _ { 2 } ^ { 2 } ) } , \pmb { u } = \frac { l ( \pmb { x } ^ { \prime } ) } { \| l ( \pmb { x } ^ { \prime } ) \| } , \pmb { v } = \operatorname* { m a x } \{ \pmb { v } - \pmb { \xi } , 0 \} ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $\textbf { \em u }$ is the normalized logit vector and $\pmb { v }$ is the one-hot vector with respect to the target class. $\xi = 1 0 ^ { - 5 }$ is a small constant to ensure numerical stability. The following triplet loss is also integrated for pushing the image away from the original class while pulling it into the target class:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
L _ { T r i p } = [ D ( l ( \pmb { x } ^ { \prime } ) , y _ { t } ) - D ( l ( \pmb { x } ^ { \prime } ) , y _ { o } ) + \gamma ] _ { + } , D ( l ( \pmb { x } ^ { \prime } ) , y ) = 1 - \frac { \| l ( \pmb { x } ^ { \prime } ) \cdot \pmb { y } \| _ { 1 } } { \| l ( \pmb { x } ^ { \prime } ) \| _ { 2 } \| y \| _ { 2 } } .
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
The overall loss function is then formulated as $L _ { P o + T r i p } = L _ { P o } + \lambda L _ { T r i p }$ . Note that in the original work, ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ was evaluated in the commonly adopted, easy ensemble transfer scenario, which only involves models with similar architectures.
|
| 52 |
+
|
| 53 |
+
In addition to devising new loss functions, there are other transfer methods [4, 6, 8, 9] developed based on the assumption that preventing the attack optimization from overfitting to the specific source model can improve transferability. Such transfer methods can be easily plugged into different attacks without modifications, in contrast to the above methods that need to apply new attack loss functions. In this paper, we consider three [4, 6, 8] of such transfer methods that have been widely used in the literature, as described in the following text.
|
| 54 |
+
|
| 55 |
+
Momentum Iterative-FGSM (MI-FGSM) [4] integrates a momentum term, which accumulates previous gradients in order to achieve more stable update directions. It can be expressed as:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
{ \bf \mathcal { G } } _ { i + 1 } = \mu \cdot { \bf g } _ { i } + \frac { \nabla _ { x } J ( { \pmb x } _ { i } ^ { \prime } , y _ { t } ) } { \| \nabla _ { \pmb x } J ( { \pmb x } _ { i } ^ { \prime } , y _ { t } ) \| _ { 1 } } , ~ { \pmb x } _ { i + 1 } ^ { \prime } = { \pmb x } _ { i } ^ { \prime } - \alpha \cdot \mathrm { ~ \mathrm { s i g n } } ( { \pmb g } _ { i } ) ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\mathbf { \pmb { g } } _ { i }$ is the accumulated gradients at the $i$ -th iteration, and $\mu$ is a decay factor. Another similar technique that instead uses the Nesterov accelerated gradient was explored in [9].
|
| 62 |
+
|
| 63 |
+
Translation Invariant-FGSM (TI-FGSM) [6] randomly translates the input image during attack optimization in order to prevent the attack from overfitting to the specific source model. This approach is inspired by the data augmentation techniques used for preventing overfitting in normal model training. Instead of calculating gradients for multiple translated images separately, the authors have proposed an approximate solution to accelerate the implementation. It is achieved by directly computing locally smoothed gradients on the original image via convolution with a kernel:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\pmb { x } _ { i + 1 } ^ { \prime } = \pmb { x } _ { i } ^ { \prime } - \alpha \cdot \mathrm { s i g n } ( W * \nabla _ { \pmb { x } } J ( \pmb { x } _ { i } ^ { \prime } , y _ { t } ) ) ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $W$ is the convolution kernel used for smoothing. TI-FGSM was originally designed for boosting transferability with adversarially-trained models as target models and has been recently shown that a smaller kernel size should be used when transferring to normally-trained models [12].
|
| 70 |
+
|
| 71 |
+
Diverse Input-FGSM (DI-FGSM) [8] follows a similar idea to TI-FGSM, but applies random resizing and padding for data augmentation. Another important difference is that DI-FGSM randomizes augmentation parameters over iterations rather than fixing them as in TI-FGSM. The attack optimization of DI-FGSM can be formulated as:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\pmb { x } _ { i + 1 } ^ { \prime } = \pmb { x } _ { i } ^ { \prime } - \alpha \cdot \mathrm { s i g n } \big ( \nabla _ { \pmb { x } } J ( T ( \pmb { x } _ { i } ^ { \prime } , p ) , y _ { t } ) \big ) ,
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where the stochastic transformation $T ( \pmb { x } _ { i } ^ { \prime } , p )$ is implemented with probability $p$ at each iteration. In Section 4.1, we demonstrate that simple transfer attacks with these three transfer methods can actually achieve surprisingly strong targeted transferability in a wide range of transfer scenarios.
|
| 78 |
+
|
| 79 |
+
# 2.2 Resource-Intensive Transferable Attacks
|
| 80 |
+
|
| 81 |
+
Due to the broad consensus that achieving targeted transferability is extremely difficult, recent researchers have resorted to resource-intensive approaches that require training target-class-specific models on large-scale additional data. Specifically, the Feature Distribution Attack (FDA) [14] follows the same attack pipeline as the above simple transferable attacks, but requires auxiliary classifiers that have been trained on additional labeled data as part of the source model. Each auxiliary classifier is a small, binary, one-versus-all classifier trained for a specific target class at a specific layer. That is to say, the number of auxiliary classifiers is the number of layers that are probed multiplied by the number of target classes that are required to model [14]. The attack loss function of FDA can be formulated as:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
L _ { F D A } = J ( \mathcal { F } _ { l } ( \pmb { x } ^ { \prime } ) , y _ { t } ) - \eta \frac { \| \mathcal { F } _ { l } ( \pmb { x } ^ { \prime } ) - \mathcal { F } _ { l } ( \pmb { x } ) \| _ { 2 } } { \| \mathcal { F } _ { l } ( \pmb { x } ) \| _ { 2 } } ,
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
where each auxiliary classifiers $F _ { l } ( \cdot )$ can model the probability that a feature map at layer $l$ is from a specific target class $y _ { t }$ . $\mathbf { F D A } ^ { ( N ) } \mathbf { + x e n t }$ [15] extends FDA by aggregating features from $L$ layers and also incorporating the cross-entropy loss $H ( \cdot , \cdot )$ of the original network $\mathcal F ( \cdot )$ . The loss function of $\mathrm { F D A } ^ { ( N ) } -$ +xent can be expressed as:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
L _ { F D A ^ { ( N ) } + x e n t } = \sum _ { l \in L } \lambda _ { l } ( L _ { F D A } + \gamma H ( \mathcal { F } ( \pmb { x } ^ { \prime } ) , y _ { t } ) ) , \mathrm { ~ w h e r e ~ } \sum _ { l \in L } \lambda _ { l } = 1 .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
Very recently, TTP [16] has achieved state-of-the-art targeted transferability by directly generating perturbations using target-class-specific GANs that have been trained via matching the distributions of perturbations and a specific target class both globally and locally. Specifically, the global distribution matching is achieved by minimizing the Kullback Leibler (KL) divergence, and the local distribution matching is by enforcing the neighbourhood similarity. In order to further boost the performance, data augmentation techniques, such as image rotation, crop resize, horizontal flip, color jittering and gray-scale transformation, have been applied during model training. We refer the readers to [16] for more technical details of TTP.
|
| 94 |
+
|
| 95 |
+
These two transferable attacks, $\mathrm { F D A } ^ { ( N ) } +$ xent and TTP, are resource intensive due to the use of largescale model training and additional data. However, in Section 4.2, we show that simple transferable attacks, which require neither model training nor additional data, can actually achieve even better performance than them.
|
| 96 |
+
|
| 97 |
+
# 2.3 Universal Adversarial Perturbations
|
| 98 |
+
|
| 99 |
+
Previous research has shown the existence of Universal Adversarial Perturbations (UAPs), i.e., a single image perturbation vector that fools a classifier on multiple images [24]. UAPs have been extensively studied for non-targeted attacks [24–28], but also explored in the more challenging, targeted case [17–19]. Although recent studies have shown comparable performance of using reconstructed class impressions [25] or proxy datasets [18] to original training data, large-scale optimization over image data is still necessary for most existing methods. Differently, a data-free approach [26] has been proposed for non-targeted UAPs by iteratively optimizing randomly-initialized perturbations with an objective of disrupting the intermediate features of the model at multiple layers. However, this approach cannot be applied to targeted UAPs because targeted perturbations aim at a specific direction but not random disruption as in the non-targeted case. To bridge this gap, in Section 4.3, we demonstrate how the simple Logit attack can be used to generate targeted UAPs in a data-free manner.
|
| 100 |
+
|
| 101 |
+
# 3 New Insights into Simple Transferable Attacks
|
| 102 |
+
|
| 103 |
+
In this section, we revisit simple transferable targeted attacks, and provide new insights into them. Specifically, we demonstrate that simple transferable attacks that are based on existing transfer methods (TI-, MI-, and DI-FGSM) need more iterations to converge, and attacking with a simple logit loss can yield much better results than the commonly adopted Cross-Entropy (CE) loss.
|
| 104 |
+
|
| 105 |
+
# 3.1 Existing Transfer Methods with More Iterations Yield Good Results
|
| 106 |
+
|
| 107 |
+
Existing attempts have concluded that using simple transferable attacks to achieve targeted transferability is extremely difficult [3, 4, 13–15]. However, these attempts have been limited to the MI transfer method. Here, we tested all the three transfer methods. As can be seen form Figure 1, integrating all the three transfer methods leads to the best performance. In particular, we find that using only DI can actually yield substantial targeted transferability, while using only TI or MI makes little difference to the original poor targeted transferability. The fact that DI outperforms TI may be explained by the fact that DI randomizes the image augmentation parameters over iterations rather than fixing them as in TI. In this way, the gradients towards the target class become more generic and so avoid overfitting to the white-box source model. MI is essentially different from DI and TI because it can only stabilize update directions but not serve to achieve more accurate gradient directions towards a specific (target) class.
|
| 108 |
+
|
| 109 |
+
As we have pointed out in Section 1, common practice of generating transferable targeted perturbations [13–15, 20] has limited the attack optimization to few iterations (typically $\leq 2 0$ ). This is somewhat understandable given that extensive research on non-targeted transferability has done the same. However, as can be seen from Figure 1, targeted attacks actually require much more iterations to converge to optimal transferability, in contrast to the fast convergence of non-targeted attacks. This implies that evaluating the targeted transferability under only few iterations is problematic. On the one hand, comparing different optimization processes that have not converged is not meaningful and may cause misleading comparisons (see evidence in Section 4.1). This observation is consistent with the evaluation suggestion in [29] that restricting the number of iterations without verifying the attack convergence is one of the common pitfalls in evaluating adversarial robustness. Several advanced defenses have been defeated by simply increasing the number of iterations [30]. On the other hand, considering the realistic threat model, it is not meaningful to artificially restrict the computational power of a practical attack (e.g., to fewer than several thousand attack iterations) [31].
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 1: Transfer success rates of simple transferable attacks using CE or logit loss in the non-targeted and targeted scenarios.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 2: White-box (wb) and black-box (bb) attack performance in terms of the predicted confidence (left, higher is better) and ranking (right, lower is better) of the target class.
|
| 116 |
+
|
| 117 |
+
# 3.2 A Simple yet Strong Logit Attack
|
| 118 |
+
|
| 119 |
+
Existing simple transferable attacks have commonly adopted the Cross-Entropy (CE) loss. However, as pointed out in [20], during the attack optimization, the CE loss will cause the gradient to decrease and tend to vanish as the number of iterations is increased. To address this problem, the ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ loss [20] takes a very aggressive strategy by arbitrarily reversing the decrease of the gradient, i.e., gradually increasing the magnitude of the gradients over iterations. However, we argue that this operation has led to too large step size, and as a result cause the attack optimization to overshoot the minima. Our results in Section 4.1 support this argument by showing that $\mathrm { P o + }$ Trip even yielded worse results than CE in the ensemble transfer scenario with diverse model architectures, since the loss surface is relatively non-smooth.
|
| 120 |
+
|
| 121 |
+
Here, for the loss function, we eliminate the final softmax function used in the CE loss and just backpropagate the gradients from the logit output:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
L _ { L o g i t } = - l _ { t } ( { \bf r } ^ { \prime } ) ,
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $l _ { t } ( \cdot )$ denotes the logit output with respect to the target class. Although the idea of attacking logits is not new, its superior performance in targeted transferability has not been recognized so far. We also find that using the well-known logit-based loss, C&W [32], yields consistently worse results (see detailed comparisons in Appendix A). Another logit loss that is similar to the C&W loss has also been adopted by [18], but in the task of generating UAPs with large-scale data.
|
| 128 |
+
|
| 129 |
+
Below, we show that this logit loss leads to stronger gradients than the CE loss. As can be observed from Equation 10, the gradient of the CE loss with respect to the target logit input, $z _ { t }$ , will monotonically decrease as the probability of the target class, $p _ { t }$ , increases during attack optimization. In addition, due to the use of the softmax function, $p _ { t }$ will quickly reach 1, and as a result the gradient tends to vanish. This phenomenon makes the attack hard to improve even with more iterations applied. Differently, as shown by Equation 11, the gradient of the logit loss equals a constant. In this way, the attack can keep improving as the number of iterations is increased. In Appendix B, we provide further comparisons on the trends of loss/gradient magnitude and the target logit value over iterations, which show that the logit loss leads to better results than both CE and ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ .
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { c } { { { \cal L } _ { C E } = - 1 \cdot \log ( p _ { t } ) = - \log ( { \displaystyle \frac { e ^ { z _ { t } } } { \sum e ^ { z _ { j } } } } ) = - z _ { t } + \log ( \sum _ { } e ^ { z _ { j } } ) , } } \\ { { { \cal \frac { \partial L _ { C E } } { \partial z _ { t } } } = - 1 + { \displaystyle \frac { \partial \log ( \sum e ^ { z _ { j } } ) } { \partial e ^ { z _ { t } } } } \cdot { \displaystyle \frac { \partial e ^ { z _ { t } } } { \partial z _ { t } } } = - 1 + { \displaystyle \frac { e ^ { z _ { t } } } { \sum e ^ { z _ { j } } } } = - 1 + p _ { t } . } } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
L _ { L o g i t } = - z _ { t } , \frac { \partial L _ { L o g i t } } { \partial z _ { t } } = - 1 .
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
Table 1: Targeted transfer success rates $( \% )$ in the single-model transfer scenario. We consider three attacks with different loss functions: cross-entropy (CE), Poincare distance with Triplet loss ´ $( { \mathrm { P o } } + { \mathrm { T r i p } } )$ [20], and the logit loss. Results with 20/100/300 iterations are reported.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan="2">Attack</td><td colspan="3">Source Model: Res50</td><td colspan="3">Source Model: Dense121</td></tr><tr><td>→Dense121</td><td>→VGG16</td><td>→Inc-v3</td><td>→Res50</td><td>→VGG16</td><td>→Inc-v3</td></tr><tr><td>CE</td><td>26.9/39.4/42.6</td><td>17.3/27.3/30.4</td><td>2.4/3.8/4.1</td><td>13.1/17.3/19.4</td><td>7.7/10.8/10.9</td><td>1.9/3.3/3.5</td></tr><tr><td>Po+Trip</td><td>26.7/53.0/54.7</td><td>18.8/34.2/34.4</td><td>2.9/6.0/5.9</td><td>10.1/14.7/14.7</td><td>6.7/8.3/7.7</td><td>2.1/3.0/2.7</td></tr><tr><td>Logit</td><td>29.3/63.3/72.5</td><td>24.0/55.7/62.7</td><td>3.0/7.2/9.4</td><td>17.2/39.7/43.7</td><td>13.5/35.3/38.7</td><td>2.7/6.9/7.6</td></tr><tr><td rowspan="2">Attack</td><td colspan="3">Source Model: VGG16</td><td colspan="3">Source Model: Inc-v3</td></tr><tr><td>→Res50</td><td>→Dense121</td><td>→Inc-v3</td><td>→Res50</td><td>→Dense121</td><td>→VGG16</td></tr><tr><td>CE</td><td>0.7/0.4/0.6</td><td>0.5/0.3/0.1</td><td>0/0.1/0</td><td>0.6/2.1/2.4</td><td>0.8/2.5/2.9</td><td>0.7/1.6/2.0</td></tr><tr><td>Po+Trip</td><td>0.6/0.8/0.5</td><td>0.6/0.6/0.7</td><td>0.2/0.1/0.1</td><td>0.6/2.0/2.5</td><td>0.8/3.1/3.3</td><td>0.5/2.1/2.0</td></tr><tr><td>Logit</td><td>3.3/8.7/11.2</td><td>3.6/11.7/13.2</td><td>0.2/0.7/0.9</td><td>0.8/1.6/2.9</td><td>1.2/2.8/5.3</td><td>0.7/2.2/3.7</td></tr></table>
|
| 142 |
+
|
| 143 |
+
# 4 Experimental Evidence on Simple Transferable Attacks
|
| 144 |
+
|
| 145 |
+
In this section, we provide experimental evidence to show the general effectiveness of simple transferable attacks. Firstly, in Section 4.1, we evaluate the simple transferable attacks in a variety of transfer scenarios, including single-model transfer, ensemble transfer (easy and challenging scenarios), a worse-case scenario with low-ranked target classes, and a real-world attack on the Google Cloud Vision API. Then, in Section 4.2, we compare the simple transferable attacks with two state-of-the-art resource-intensive transferable attacks, $\mathrm { F D A } ^ { ( N ) } { + } \mathrm { x e n i }$ [15] and TTP [16]. Finally, in Section 4.3, we apply the Logit attack to achieving targeted UAPs in a data-free manner.
|
| 146 |
+
|
| 147 |
+
Following recent work [14–16, 20], we focus on targeted transferability of ImageNet-like images, which is known to be much more difficult than other data sets (e.g, MNIST and CIFAR-10) with smaller-size images and fewer classes. Specifically, we used the 1000 images from the development set of the ImageNet-Compatible Dataset1, which was introduced along with the NIPS 2017 Competition on Adversarial Attacks and Defenses. All these images are associated with 1000 ImageNet class labels and cropped to $2 9 9 \times 2 9 9$ before use. Our experiments were run on an NVIDIA Tesla P100 GPU with 12GB of memory.
|
| 148 |
+
|
| 149 |
+
# 4.1 Simple Transferable Attacks in Various Transfer Scenarios
|
| 150 |
+
|
| 151 |
+
We tested three different attack losses: CE, ${ \mathrm { P o + T r i p } }$ [20] and Logit. All attacks used TI, MI, and DI with optimal hyperparameters provided in their original work. Specifically, $\| \mathbf { W } \| _ { 1 } = 5$ was used for ‘TI’ as suggested by [12]. For each image, we used the target label that was officially specified in the dataset. If not mentioned specifically, all attacks were run with 300 iterations to ensure convergence. When being executed with a batch size of 20, the optimization process took about three seconds per image. A moderate step size of 2 was used for all attacks, and the results were shown to be not sensitive to the setting of step size (see evidence in Appendix C). We considered four diverse classifier architectures: ResNet [33], DenseNet [34], VGGNet [35], and Inception [36]. Following the common practice, the perturbations were restricted by $L _ { \infty }$ norm with $\epsilon = 1 6$ .
|
| 152 |
+
|
| 153 |
+
Single-model transfer. Table 1 reports the targeted transferability when transferring between each pair of different model architectures. As can be seen, the logit loss outperformed CE and ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ by a large margin in almost all cases. When comparing different model architectures, we can find that the attacks achieved lower performance when transferring from the VGGNet16 or Inception-v3 than from ResNet50 or DenseNet121. This is consistent with the observations in [14, 15] and may be explained by the fact that skip connections in ResNet50 and DenseNet121 boosts transferability [37]. Another finding is that when using Inception-v3 as the target model, the transfer success rates were always low. This might be explained by the heavily engineered nature of the Inception architecture, i.e., the Inception architecture has multiple-size convolution and two auxiliary classifiers.
|
| 154 |
+
|
| 155 |
+
Table 2: Targeted transfer success rates $( \% )$ in the commonly adopted, easy ensemble transfer scenario, where the hold-out target model (denoted by $\cdot \underline { { \cdot } }$ ) and the ensemble models share similar architectures. Results with 20/100 iterations are reported.
|
| 156 |
+
|
| 157 |
+
<table><tr><td>Attack</td><td>-Inc-v3</td><td>-Inc-v4</td><td>-IncRes-v2</td><td>-Res50</td><td>-Res101</td><td>-Res152</td><td>Average</td></tr><tr><td>CE</td><td>48.8/85.3</td><td>47.2/83.3</td><td>47.5/83.9</td><td>50.9/89.8</td><td>58.5/93.2</td><td>56.7/90.7</td><td>51.6/87.7</td></tr><tr><td>Po+Trip</td><td>59.3/84.4</td><td>55.0/82.4</td><td>51.4/80.8</td><td>56.9/85.0</td><td>60.5/87.9</td><td>57.6/85.7</td><td>56.8/84.4</td></tr><tr><td>Logit</td><td>56.4/85.5</td><td>52.9/85.8</td><td>54.4/85.1</td><td>57.5/90.0</td><td>64.4/91.4</td><td>61.3/90.8</td><td>57.8/88.1</td></tr></table>
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 3: Targeted transfer success rates $( \% )$ in our challenging ensemble transfer scenario, where each hold-out target model shares no similar architecture with the source models used for ensemble.
|
| 161 |
+
|
| 162 |
+
Ensemble transfer in both easy and challenging scenarios. A common approach to further boosting transferability is to generate perturbations on an ensemble of white-box source models. Following the common practice, we simply assigned equal weights to all the source models. We first look at the commonly adopted ensemble transfer scenario [4, 6, 20, 38] in which each hold-out target model shares a similar architecture with some of the white-box ensemble models. As can be seen from Table 2, the transfer success rates of all three attacks have got saturated when given enough iterations to converge. As a result, this transfer scenario could not fully reveal the actual strength of different attacks. We can also observe that ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ performed better than the CE loss only when the attack optimization is unreasonably restricted to 20 iterations, but became even worse with enough iterations. This finding suggests that evaluating different attacks under only few iterations may cause misleading comparative results.
|
| 163 |
+
|
| 164 |
+
We next considered a more challenging transfer scenario with no architectural overlap between the source ensemble models and the target model, in order to fully reveal the potential of different attacks. This scenario is also more realistic since it is hard for an attacker to know the specific architecture of a real-world target mode. Figure 3 shows that in this scenario, the Logit largely outperformed CE and ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ . In addition, the results of both CE and Logit were substantially improved over the single-model transfer results reported in Table 1. However, ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ performed even worst in some cases maybe because its use of arbitrarily increasing the gradient magnitude has caused the optimization to overshoot the minima in this ensemble transfer scenario where the loss surface is relatively non-smooth due to the model diversity. Note that as in the single transfer scenario, transferring to Inception-v3 is still the most difficult.
|
| 165 |
+
|
| 166 |
+
Table 3: Targeted transfer success rates $( \% )$ when varying the target from the high-ranked class to low.
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Attack</td><td>2nd</td><td>10th</td><td>200th</td><td>500th</td><td>800th</td><td>1000th</td></tr><tr><td>CE</td><td>89.9</td><td>76.7</td><td>49.7</td><td>43.1</td><td>37.0</td><td>25.1</td></tr><tr><td>Po+Trip</td><td>82.6</td><td>77.6</td><td>58.4</td><td>53.6</td><td>49.1</td><td>38.2</td></tr><tr><td>Logit</td><td>83.8</td><td>81.3</td><td>75.0</td><td>71.0</td><td>65.1</td><td>52.8</td></tr></table>
|
| 169 |
+
|
| 170 |
+
A worse-case transfer scenario with lowranked target classes. In conventional security studies, a comprehensive evaluation commonly involves a range of attack scenarios with varied difficulty. Existing work on white-box adversarial attacks [32, 21, 23, 38] has also looked at different cases with varied difficulty regarding the ranking position of the target class in the prediction list of the original image.
|
| 171 |
+
|
| 172 |
+
Specifically, in the best case, the targeted success is basically equal to non-targeted success, i.e., an attack is regarded to be successful as long as it can succeed on any arbitrary target other than the original class. In the average case, the target class is randomly specified, while in the worst case, the target is specified as the lowest-ranked/least-likely class.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 4: Successful targeted adversarial images on Google Cloud Vision generated by the Logit attack with ensemble transfer. More examples can be found in Appendix D.
|
| 176 |
+
|
| 177 |
+
Table 4: Non-targeted and targeted transfer success rates $( \% )$ of different attacks on Google Cloud Vision.
|
| 178 |
+
|
| 179 |
+
<table><tr><td></td><td>CE</td><td>Po+Trip</td><td>Logit</td></tr><tr><td>Targeted</td><td>7</td><td>8</td><td>18</td></tr><tr><td>Non-targeted</td><td>51</td><td>44</td><td>51</td></tr></table>
|
| 180 |
+
|
| 181 |
+
However, to the best of our knowledge, current evaluation of transfer-based attacks has been limited to the best and average cases. To address this limitation, we consider a worse-case transfer scenario by varying the target from the highest-ranked class gradually to the lowest one. As can be seen from Table 3, there exists a non-negligible correlation between the ranking position of the target class and the targeted transferability. More specifically, it becomes increasingly difficult as the target moves down the prediction list. We can also observe that the results with higher-ranked targets might not reveal the actual strength of different attacks as in the more realistic, worse cases with lower-ranked targets. In particular, only looking the best case with the highest-ranked target may lead to a misleading conclusion that CE leads to the most effective attack. This finding suggests that a more meaningful evaluation on targeted transferability should further increase difficulty beyond the current best and average cases.
|
| 182 |
+
|
| 183 |
+
Transfer-based attacks on Google Cloud Vision. Most existing work on fooling real-world computer vision systems has been focused on the query-based attacks, where a large number of queries are required [39–41]. Although several recent studies have also explored real-world transfer-based attacks, they were limited to face recognition and the non-targeted attacks [42–44]. In contrast, we applied the simple transferable attacks in the more challenging, targeted case on a more generallyused image recognition system, the Google Cloud Vision API. Specifically, we used the targeted adversarial images generated on the ensemble of all four diverse source models with 300 iterations.
|
| 184 |
+
|
| 185 |
+
The API predicts a list of semantic labels along with confidence scores. Specifically, only the top classes with confidence no lower than $5 0 \%$ are returned, and at most 10 classes are shown. Note that the confidence score here is not a probability (which would sum to one). We measured both the targeted and non-targeted transferability. Since all returned labels are with relatively high confidence $( \geq 5 0 \% )$ ), we do not limit our measure of success rates to only top-1 class. Instead, for non-targeted success, we measured whether or not the ground-truth class appeared in the returned list, while for targeted success, whether or not the target class appeared. Due to the fact that the semantic label set predicted by the API does not exactly correspond to the 1000 ImageNet classes, we treated semantically similar classes as the same class.
|
| 186 |
+
|
| 187 |
+
Table 4 reports the results averaged over 100 images that originally yield correct predictions. As can be seen, in general, achieving targeted transfer success is much more difficult than non-targeted success. In particular, the Logit attack achieved the best targeted transferability, with quasi-imperceptible perturbations shown in Figure 4. Our results reveal the potential vulnerability of Google Cloud Vision against simple transfer-based attacks, which require no query interaction.
|
| 188 |
+
|
| 189 |
+
# 4.2 Simple vs. Resource-Intensive Transferable Attacks
|
| 190 |
+
|
| 191 |
+
In this subsection, we compared simple transferable attacks with state-of-the-art resource-intensive approaches, TTP [16] and FDA(N)+xent [15], which necessitate training target-class-specific models on additional data.
|
| 192 |
+
|
| 193 |
+
Compared with TTP. We compared the Logit attack with the state-of-the-art TTP, which is based on training target-class-specific GANs on additional data. We tested both Logit and TTP on our dataset following the “10-Targets (all-source)” setting in [16]. We chose ResNet50 as the white-box model in the single-model transfer scenario and an ensemble of $\mathrm { R e s N e t } \{ 1 8 , 5 0 , 1 0 1 , 1 5 2 \}$ in the ensemble transfer scenario. DenseNet121 and VGG16 bn are tested as the target models. Note that the same knowledge of the white-box model is available to both attacks but it is leveraged in different ways.
|
| 194 |
+
|
| 195 |
+
Specifically, for the Logit attack, the white-box model is used as a source model for iterative attack optimization, while for TTP, it is used as a discriminator during training the GANs.
|
| 196 |
+
|
| 197 |
+
As shown in Table 5, under the commonly adopted $\epsilon = 1 6$ , the Logit attack can achieve comparable results to TTP in all cases. Specifically, we can observe that the model ensemble is more helpful to Logit than for TTP. This might be because even with the single model as the discriminator, TTP can learn good enough features of target semantics by training with the objective of matching the perturbation and target class distributions with large-scale data. The clearer target semantics learned by TTP can be confirmed by comparing the unbounded perturbations achieved by TTP (e.g., Figure 3 in [16]) with those by the Logit shown in Figure 5.
|
| 198 |
+
|
| 199 |
+
Table 5: Targeted transfer success rates $( \% )$ of Logit vs. TTP in single-model and ensemble transfer scenarios under two norm bounds.
|
| 200 |
+
|
| 201 |
+
<table><tr><td>Bound</td><td>Attack</td><td>D121</td><td>V16</td><td>D121-ens</td><td>V16-ens</td></tr><tr><td rowspan="2">e= 16</td><td>TTP</td><td>79.6</td><td>78.6</td><td>92.9</td><td>89.6</td></tr><tr><td>Logit</td><td>75.9</td><td>72.5</td><td>99.4</td><td>97.7</td></tr><tr><td rowspan="2">e=8</td><td>TTP</td><td>37.5</td><td>46.7</td><td>63.2</td><td>66.2</td></tr><tr><td>Logit</td><td>44.5</td><td>46.8</td><td>92.6</td><td>87.0</td></tr></table>
|
| 202 |
+
|
| 203 |
+
This fact that TTP perturbations heavily rely on semantic patterns of the target class might cause TTP to degrade under lower norm bounds. To validate this assumption, we further compared Logit and TTP under $\epsilon = 8$ . As expected, the Logit attack consistently surpassed TTP, especially with a very large margin in the ensemble transfer scenario. The different comparing results for the two perturbation sizes also suggest that comparing attacks only under a single perturbation size may not reveal their characteristics.
|
| 204 |
+
|
| 205 |
+
Table 6: Targeted transfer success rates $( \% )$ of unbounded adversarial images by different attacks with the same iteration budget.
|
| 206 |
+
|
| 207 |
+
<table><tr><td></td><td>FDA(4) +xent</td><td>CE</td><td>Po+Trip</td><td>Logit</td></tr><tr><td>Res50-→Dense121</td><td>65.8</td><td>69.3</td><td>88.1</td><td>84.1</td></tr><tr><td>Res50→VGG16</td><td>48.1</td><td>54.1</td><td>67.8</td><td>74.2</td></tr></table>
|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
Figure 5: Unbounded adversarial examples that reflect target semantics. More examples can be found in Appendix E.
|
| 211 |
+
|
| 212 |
+
Compared with FDA(N)+xent. We compared the three simple transferable attacks (CE, ${ \mathrm { P o } } { + } { \mathrm { T r i p } }$ and Logit) with $\mathrm { F D A } ^ { ( N ) }$ +xent on generating unbounded adversarial images, in consistence with “distal transfer” in $[ 1 5 ] ^ { 2 }$ . Specifically, the adversarial perturbations were initialized as random Gaussian noise and allowed to be as large as possible. Although such unbounded adversarial images may not be practically compelling, they can provide better isolated indication on transferability by eliminating the dependency on the source images and the bound restrictions. The results were averaged over 4000 image examples, each of which was optimized towards a random target class. As suggested by [15], the MI transfer method was removed since it empirically harms the performance in this unbounded case.
|
| 213 |
+
|
| 214 |
+
Table 6 shows that all the three simple transferable attacks achieved stronger targeted transferability than $\mathrm { F D A } ^ { ( N ) } \mathrm { + x e n t }$ . As can be seen from Figure 5, the unbounded adversarial perturbations can somehow reflect the target semantics. This finding suggests that achieving targeted transferability relies on robust, semantic features [45] that are expected to be learned by various models and also understood by humans. In this way, achieving targeted transferability is fundamentally different from non-targeted transferability, for which attacking non-robust features is known to be sufficient [45]. It is also worth noting that in practical scenarios with small norm bounds, the semantically-aligned perturbations would not be expected to change human judgements.
|
| 215 |
+
|
| 216 |
+
# 4.3 Simple Logit Attack for Targeted UAPs in a Data-Free Manner
|
| 217 |
+
|
| 218 |
+
The above observation that the perturbations can reflect certain target semantics motivates us to apply the Logit attack to achieving targeted Universal Adversarial Perturbations (UAPs), which can drive multiple original images into a specific target class. Existing attempts at achieving targeted UAPs have mainly relied on large-scale optimization over additional data [17–19]. However, the simple Logit attack can be easily extended to generate targeted UAPs in a data-free manner. The only difference from the above transferable Logit attack is that here a mean image (all pixel values set as 0.5 out of [0,1]) is used as the original image.
|
| 219 |
+
|
| 220 |
+
Table 7: Success rates $( \% )$ of targeted UAPs generated by CE and Logit attacks for different models.
|
| 221 |
+
|
| 222 |
+
<table><tr><td>Attack</td><td>Inc-v3</td><td>Res50</td><td>Dense121</td><td>VGG16</td></tr><tr><td>CE</td><td>2.6</td><td>9.2</td><td>8.7</td><td>20.1</td></tr><tr><td>Logit</td><td>4.7</td><td>22.8</td><td>21.8</td><td>65.9</td></tr></table>
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 6: UAPs $\epsilon = 1 6$ , VGG16) with different classes using CE and Logit. More examples can be found in Appendix F.
|
| 226 |
+
|
| 227 |
+
In our experiment, for each target class, we generated a single targeted UAP vector $\epsilon = 1 6$ ) with 300 iterations and applied it to all 1000 images in our dataset. Table 7 reports the results averaged over all the 1000 ImageNet classes. As can be seen, the logit loss can yield substantial success, remarkably outperforming the CE loss. This can be confirmed by Figure 6, which shows the Logit attack can yield more semantically-aligned perturbations than CE. This observation also supports the claim from [18] that universal perturbations contain dominant features, and images act like noise with respect to perturbations.
|
| 228 |
+
|
| 229 |
+
# 5 Conclusion and Outlook
|
| 230 |
+
|
| 231 |
+
In this paper, we have demonstrated that achieving targeted transferability is not as difficult as current work concludes. Specifically, we find that simple transferable attacks can actually achieve surprisingly strong targeted transferability when given enough iterations for convergence. We have validated the effectiveness of simple transferable attacks in a wide range of transfer scenarios, including three newly-introduced challenging scenarios. These challenging scenarios have better revealed the actual strength of different attacks. In particular, we demonstrate that a very simple Logit attack is superior in all transfer scenarios, achieving even better results than the state-of-the-art resource-intensive approaches. We also show the potential usefulness of the Logit attack for generating targeted universal adversarial perturbations in a data-free manner. Overall, we hope our findings will inspire future research to conduct a more meaningful evaluation on targeted transferability. Our future work will focus on studying why different model architectures yield different transferability. In particular, the very low success rates when targeting Inception-v3 should be explored. Moving forward, there needs to be a more comprehensive discussion on the resource consumption of different attacks from multiple aspects, such as training and inference time, hardware resources, and data size.
|
| 232 |
+
|
| 233 |
+
Strong transferability can obviously benefit black-box applications of adversarial images for social good, such as protecting user privacy [42, 43, 46–48]. In addition, it will also motivate the community to design stronger defenses given our finding that even simple attacks can generate highly transferable adversarial images. It remains a possibility that our methodology may be misused by malicious actors to break legitimate systems. However, we firmly believe that the help that our paper can provide to researchers significantly outweighs the help that it may provide an actual malicious actor.
|
| 234 |
+
|
| 235 |
+
# Acknowledgments
|
| 236 |
+
|
| 237 |
+
This work was carried out on the Dutch national e-infrastructure with the support of SURF Cooperative.
|
| 238 |
+
|
| 239 |
+
# References
|
| 240 |
+
|
| 241 |
+
[1] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 242 |
+
[2] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
|
| 243 |
+
[3] Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. In ICLR, 2017.
|
| 244 |
+
[4] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In CVPR, 2018.
|
| 245 |
+
[5] Wen Zhou, Xin Hou, Yongjun Chen, Mengyun Tang, Xiangqi Huang, Xiang Gan, and Yong Yang. Transferable adversarial perturbations. In ECCV, 2018.
|
| 246 |
+
[6] Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Evading defenses to transferable adversarial examples by translation-invariant attacks. In CVPR, 2019.
|
| 247 |
+
[7] Qian Huang, Isay Katsman, Horace He, Zeqi Gu, Serge Belongie, and Ser-Nam Lim. Enhancing adversarial example transferability with an intermediate level attack. In ICCV, 2019.
|
| 248 |
+
[8] Cihang Xie, Zhishuai Zhang, Yuyin Zhou, Song Bai, Jianyu Wang, Zhou Ren, and Alan L Yuille. Improving transferability of adversarial examples with input diversity. In CVPR, 2019.
|
| 249 |
+
[9] Jiadong Lin, Chuanbiao Song, Kun He, Liwei Wang, and John E Hopcroft. Nesterov accelerated gradient and scale invariance for adversarial attacks. In ICLR, 2020.
|
| 250 |
+
[10] Yingwei Li, Song Bai, Yuyin Zhou, Cihang Xie, Zhishuai Zhang, and Alan L Yuille. Learning transferable adversarial examples via ghost networks. In AAAI, 2020.
|
| 251 |
+
[11] Weibin Wu, Yuxin Su, Xixian Chen, Shenglin Zhao, Irwin King, Michael R Lyu, and Yu-Wing Tai. Boosting the transferability of adversarial samples via attention. In CVPR, 2020.
|
| 252 |
+
[12] Lianli Gao, Qilong Zhang, Jingkuan Song, Xianglong Liu, and Heng Tao Shen. Patch-wise attack for fooling deep neural network. In ECCV, 2020.
|
| 253 |
+
[13] Nathan Inkawhich, Wei Wen, Hai Helen Li, and Yiran Chen. Feature space perturbations yield more transferable adversarial examples. In CVPR, 2019.
|
| 254 |
+
[14] Nathan Inkawhich, Kevin Liang, Lawrence Carin, and Yiran Chen. Transferable perturbations of deep feature distributions. In ICLR, 2020.
|
| 255 |
+
[15] Nathan Inkawhich, Kevin J Liang, Binghui Wang, Matthew Inkawhich, Lawrence Carin, and Yiran Chen. Perturbing across the feature hierarchy to improve standard and strict blackbox attack transferability. In NeurIPS, 2020.
|
| 256 |
+
[16] Muzammal Naseer, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Fatih Porikli. On generating transferable targeted perturbations. In ICCV, 2021.
|
| 257 |
+
[17] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. Generative adversarial perturbations. In CVPR, 2018.
|
| 258 |
+
[18] Chaoning Zhang, Philipp Benz, Tooba Imtiaz, and In So Kweon. Understanding adversarial examples from the mutual influence of images and perturbations. In CVPR, 2020.
|
| 259 |
+
[19] Philipp Benz, Chaoning Zhang, Tooba Imtiaz, and In So Kweon. Double targeted universal adversarial perturbations. In ACCV, 2020.
|
| 260 |
+
[20] Maosen Li, Cheng Deng, Tengjiao Li, Junchi Yan, Xinbo Gao, and Heng Huang. Towards transferable targeted attack. In CVPR, 2020.
|
| 261 |
+
[21] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In ICLR, 2017.
|
| 262 |
+
[22] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018.
|
| 263 |
+
[23] Jer´ ome Rony, Luiz G. Hafemann, Luiz S. Oliveira, Ismail Ben Ayed, Robert Sabourin, and Eric ˆ Granger. Decoupling direction and norm for efficient gradient-based $L _ { 2 }$ adversarial attacks and defenses. In CVPR, 2019.
|
| 264 |
+
[24] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In CVPR, 2017.
|
| 265 |
+
[25] Konda Reddy Mopuri, Phani Krishna Uppala, and R Venkatesh Babu. Ask, acquire, and attack: Data-free UAP generation using class impressions. In ECCV, 2018.
|
| 266 |
+
[26] Konda Reddy Mopuri, Aditya Ganeshan, and R Venkatesh Babu. Generalizable data-free objective for crafting universal adversarial perturbations. IEEE TPAMI, 41(10):2452–2465, 2018.
|
| 267 |
+
[27] Muzammal Naseer, Salman H Khan, Harris Khan, Fahad Shahbaz Khan, and Fatih Porikli. Cross-domain transferability of adversarial perturbations. In NeurIPS, 2019.
|
| 268 |
+
[28] Yingwei Li, Song Bai, Cihang Xie, Zhenyu Liao, Xiaohui Shen, and Alan L Yuille. Regional homogeneity: Towards learning transferable universal adversarial perturbations against defenses. In ECCV, 2020.
|
| 269 |
+
[29] Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, Aleksander Madry, and Alexey Kurakin. On evaluating adversarial robustness. In arXiv preprint arXiv:1902.06705, 2019.
|
| 270 |
+
[30] Florian Tramer, Nicholas Carlini, Wieland Brendel, and Aleksander Madry. On adaptive attacks to adversarial example defenses. In NeurIPS, 2020.
|
| 271 |
+
[31] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In ICML, 2018.
|
| 272 |
+
[32] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE S&P, 2017.
|
| 273 |
+
[33] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 274 |
+
[34] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017.
|
| 275 |
+
[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 276 |
+
[36] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016.
|
| 277 |
+
[37] Dongxian Wu, Yisen Wang, Shu-Tao Xia, James Bailey, and Xingjun Ma. Skip connections matter: On the transferability of adversarial examples generated with resnets. In ICLR, 2020.
|
| 278 |
+
[38] Florian Tramer, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick \` McDaniel. Ensemble adversarial training: Attacks and defenses. In ICLR, 2018.
|
| 279 |
+
[39] Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In AISec, 2017.
|
| 280 |
+
[40] Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. In ICLR, 2018.
|
| 281 |
+
[41] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In ICML, 2018.
|
| 282 |
+
[42] Valeriia Cherepanova, Micah Goldblum, Harrison Foley, Shiyuan Duan, John Dickerson, Gavin Taylor, and Tom Goldstein. LowKey: Leveraging adversarial attacks to protect social media users from facial recognition. In ICLR, 2021.
|
| 283 |
+
[43] Arezoo Rajabi, Rakesh B Bobba, Mike Rosulek, Charles Wright, and Wu-chi Feng. On the (im) practicality of adversarial perturbation for image privacy. PoPETs, 2021.
|
| 284 |
+
[44] Shawn Shan, Emily Wenger, Jiayun Zhang, Huiying Li, Haitao Zheng, and Ben Y Zhao. Fawkes: Protecting privacy against unauthorized deep learning models. In USENIX Security, 2020.
|
| 285 |
+
[45] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. In NeurIPS, 2019.
|
| 286 |
+
[46] Martha Larson, Zhuoran Liu, Simon Brugman, and Zhengyu Zhao. Pixel privacy: Increasing image appeal while blocking automatic inference of sensitive scene information. In MediaEval Multimedia Benchmark Workshop, 2018.
|
| 287 |
+
[47] Zhuoran Liu, Zhengyu Zhao, and Martha Larson. Who’s afraid of adversarial queries? the impact of image modifications on content-based image retrieval. In ICMR, 2019.
|
| 288 |
+
[48] Seong Joon Oh, Mario Fritz, and Bernt Schiele. Adversarial image perturbation for privacy protection a game theory perspective. In ICCV, 2017.
|
| 289 |
+
|
| 290 |
+
# Checklist
|
| 291 |
+
|
| 292 |
+
1. For all authors...
|
| 293 |
+
|
| 294 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 295 |
+
(b) Did you describe the limitations of your work? [Yes] We described the limitation in the first sentence of the final section.
|
| 296 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discuss them at the end of the final section.
|
| 297 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 298 |
+
|
| 299 |
+
2. If you are including theoretical results...
|
| 300 |
+
|
| 301 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 302 |
+
|
| 303 |
+
3. If you ran experiments...
|
| 304 |
+
|
| 305 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] The code (including instructions and a link to data we have used) has been submitted as the supplemental material.
|
| 306 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Our experiments did not involve any model training, but all the algorithm details were specified.
|
| 307 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] We fixed the random seed for all the experiments. Now the main randomness comes from the $p$ in the existing method, DI (see Eq. 6). We confirm that it has little impact on the results.
|
| 308 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] We mentioned the run time of the attacks and our hardware settings in Section 4.
|
| 309 |
+
|
| 310 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 311 |
+
|
| 312 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] In Section 4.
|
| 313 |
+
(b) Did you mention the license of the assets? [Yes] In a footnote of Section 4.
|
| 314 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] We did not use any new assets.
|
| 315 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] In the same footnote as above.
|
| 316 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] In the same footnote as above.
|
| 317 |
+
|
| 318 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 319 |
+
|
| 320 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 321 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 322 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
parse/train/LVWcGZr-8h/LVWcGZr-8h_content_list.json
ADDED
|
@@ -0,0 +1,1401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "On Success and Simplicity: A Second Look at Transferable Targeted Attacks ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
204,
|
| 8 |
+
122,
|
| 9 |
+
795,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Zhengyu Zhao, Zhuoran Liu, Martha Larson Radboud University {z.zhao,z.liu,m.larson}@cs.ru.nl ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
339,
|
| 19 |
+
226,
|
| 20 |
+
656,
|
| 21 |
+
268
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
303,
|
| 32 |
+
535,
|
| 33 |
+
320
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Achieving transferability of targeted attacks is reputed to be remarkably difficult. The current state of the art has resorted to resource-intensive solutions that necessitate training model(s) for each target class with additional data. In our investigation, we find, however, that simple transferable attacks which require neither model training nor additional data can achieve surprisingly strong targeted transferability. This insight has been overlooked until now, mainly because the widespread practice of attacking with only few iterations has largely limited the attack convergence to optimal targeted transferability. In particular, we, for the first time, identify that a very simple logit loss can largely surpass the commonly adopted crossentropy loss, and yield even better results than the resource-intensive state of the art. Our analysis spans a variety of transfer scenarios, especially including three new, realistic scenarios: an ensemble transfer scenario with little model similarity, a worse-case scenario with low-ranked target classes, and also a real-world attack on the Google Cloud Vision API. Results in these new transfer scenarios demonstrate that the commonly adopted, easy scenarios cannot fully reveal the actual strength of different attacks and may cause misleading comparative results. We also show the usefulness of the simple logit loss for generating targeted universal adversarial perturbations in a data-free manner. Overall, the aim of our analysis is to inspire a more meaningful evaluation on targeted transferability. Code is available at https://github.com/ZhengyuZhao/Targeted-Tansfer. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
232,
|
| 42 |
+
334,
|
| 43 |
+
766,
|
| 44 |
+
611
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
174,
|
| 54 |
+
635,
|
| 55 |
+
310,
|
| 56 |
+
652
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Deep neural networks have achieved remarkable performance in various machine learning tasks, but are known to be vulnerable to adversarial attacks [1]. A key property of adversarial attacks that makes them critical in realistic, black-box scenarios is their transferability [2, 3]. Current work on adversarial transferability has achieved great success for non-targeted attacks [4–12], while several initial attempts [3, 4, 13] at targeted transferability have shown its extreme difficulty. Targeted transferability is known to be much more challenging and worth exploring since it can raise more critical concerns by fooling models into predicting a chosen, highly dangerous target class. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
666,
|
| 66 |
+
825,
|
| 67 |
+
763
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "However, so far state-of-the-art results can only be secured by resource-intensive transferable attacks [14–16]. Specifically, the FDA approach [14, 15] is based on modeling layer-wise feature distributions by training target-class-specific auxiliary classifiers on large-scale labeled data, and then optimizing adversarial perturbations using these auxiliary classifiers from across the deep feature space. The TTP approach [16] is based on training target-class-specific Generative Adversarial Networks (GANs) through global and local distribution matching, and then using the trained generator to directly generate perturbations on any given input image. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
770,
|
| 77 |
+
825,
|
| 78 |
+
867
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "In this paper, we take a second, thorough look at current research on targeted transferability. Our main contribution is the finding that simple transferable attacks [4, 6, 8] that require neither model training nor additional data can actually achieve surprisingly strong targeted transferability. We argue that this insight has been overlooked mainly because current research has unreasonably restricted the attack convergence by only using a small number of iterations (see detailed discussion in Section 3). Another key contribution of our work is, for the first time, demonstrating the general superiority of a very simple logit loss, which even outperforms the resource-intensive state of the art. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
873,
|
| 88 |
+
823,
|
| 89 |
+
901
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
90,
|
| 99 |
+
825,
|
| 100 |
+
160
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "In order to validate the general effectiveness of simple transferable attacks, in Section 4.1, we conduct extensive experiments in a wide range of transfer scenarios. We test the commonly adopted single-model and ensemble transfer scenarios, but also introduce three new scenarios that are more challenging and realistic: an ensemble transfer scenario with little model similarity, a worse-case scenario with low-ranked target classes, and also a real-world attack on the Google Cloud Vision API. Experimental results in these new scenarios suggest that evaluation in only the commonly adopted, easy scenarios cannot reveal the actual strength of different attacks, and may cause misleading comparative results. Additional experiments in Section 4.2 have shown the better performance of the simple transferable attacks than the state-of-the-art resource-intensive approaches. Finally, in Section 4.3, inspired by the observation that the generated perturbations themselves reflect specific target semantics, we use the simple Logit attack to generate targeted Universal Adversarial Perturbations (UAPs) in a data-free manner. In contrast, recent advances in targeted UAPs [16–19] have inevitably relied on large-scale optimization over additional data. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
173,
|
| 109 |
+
166,
|
| 110 |
+
826,
|
| 111 |
+
347
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Overall, we hope our analysis of the weakness of commonly adopted attack settings and transfer scenarios will inspire a more meaningful evaluation on targeted transferability. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
173,
|
| 120 |
+
353,
|
| 121 |
+
823,
|
| 122 |
+
381
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 Related Work ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
174,
|
| 132 |
+
400,
|
| 133 |
+
323,
|
| 134 |
+
417
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "In this section, we review existing simple transferable attacks (Section 2.1), and also recent resourceintensive transferable attacks (Section 2.2). Finally, we discuss related work on generating universal adversarial perturbations. ",
|
| 141 |
+
"bbox": [
|
| 142 |
+
174,
|
| 143 |
+
430,
|
| 144 |
+
825,
|
| 145 |
+
473
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "2.1 Simple Transferable Attacks ",
|
| 152 |
+
"text_level": 1,
|
| 153 |
+
"bbox": [
|
| 154 |
+
176,
|
| 155 |
+
488,
|
| 156 |
+
411,
|
| 157 |
+
503
|
| 158 |
+
],
|
| 159 |
+
"page_idx": 1
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "text",
|
| 163 |
+
"text": "We refer to transferable attacks that require neither model training nor additional data, but only use iterative optimization on a single (original) image as simple transferable attacks. Simple transferable attacks have been extensively studied in the non-targeted case [4–12], and also attempted in the targeted case [3, 4, 20]. These attacks are commonly built up on the well-known Iterative-Fast Gradient Sign Method (I-FGSM) [21, 22], which can be formulated as: ",
|
| 164 |
+
"bbox": [
|
| 165 |
+
173,
|
| 166 |
+
513,
|
| 167 |
+
825,
|
| 168 |
+
583
|
| 169 |
+
],
|
| 170 |
+
"page_idx": 1
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"type": "equation",
|
| 174 |
+
"img_path": "images/be31c403a64489b9e2a812ef51e3f62dd12d1bfb1450f1a815d587025f69605f.jpg",
|
| 175 |
+
"text": "$$\n\\begin{array} { r } { \\pmb { x } _ { 0 } ^ { \\prime } = \\pmb { x } , \\pmb { x } _ { i + 1 } ^ { \\prime } = \\pmb { x } _ { i } ^ { \\prime } - \\alpha \\cdot \\mathrm { s i g n } ( \\nabla _ { \\pmb { x } } J ( \\pmb { x } _ { i } ^ { \\prime } , y _ { t } ) ) , } \\end{array}\n$$",
|
| 176 |
+
"text_format": "latex",
|
| 177 |
+
"bbox": [
|
| 178 |
+
341,
|
| 179 |
+
587,
|
| 180 |
+
655,
|
| 181 |
+
606
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "where $\\pmb { x } _ { i } ^ { \\prime }$ denotes the perturbed image in the $i$ -th iteration, and $y _ { t }$ is the target class label. In order to ensure the imperceptibility, the added perturbations are restricted with respect to some $L _ { p }$ distance, i.e., satisfying $\\| { \\pmb x } ^ { \\prime } - { \\pmb x } \\| _ { p } \\overset { \\cdot } { \\le } \\epsilon$ . Current transferable attack methods have commonly adopted the $L _ { \\infty }$ distance, but can also be easily adapted to the $L _ { 2 }$ distance based on an $L _ { 2 }$ normalization [23]. ",
|
| 188 |
+
"bbox": [
|
| 189 |
+
173,
|
| 190 |
+
608,
|
| 191 |
+
825,
|
| 192 |
+
664
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 1
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "For the loss function $J ( \\cdot , \\cdot )$ , most simple transferable attacks have adopted the Cross-Entropy (CE) loss. However, the CE loss has been recently shown to be insufficient in the targeted case due to its decreasing gradient problem [20]. To address this problem, the authors in [20] have proposed the $\\mathbf { P 0 + T r i p }$ loss, in which the Poincare distance was used to adapt the gradients’ magnitude: ´ ",
|
| 199 |
+
"bbox": [
|
| 200 |
+
174,
|
| 201 |
+
670,
|
| 202 |
+
825,
|
| 203 |
+
726
|
| 204 |
+
],
|
| 205 |
+
"page_idx": 1
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "equation",
|
| 209 |
+
"img_path": "images/1a63edf3047001234b651c2fd749e5e711eb6782c4000d4850d9642be953b52b.jpg",
|
| 210 |
+
"text": "$$\nL _ { P o } = d ( { \\pmb u } , { \\pmb v } ) = \\mathrm { a r c c o s h } ( 1 + \\delta ( { \\pmb u } , { \\pmb v } ) ) ,\n$$",
|
| 211 |
+
"text_format": "latex",
|
| 212 |
+
"bbox": [
|
| 213 |
+
362,
|
| 214 |
+
729,
|
| 215 |
+
632,
|
| 216 |
+
747
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 1
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "equation",
|
| 222 |
+
"img_path": "images/750e5f32e76c5d7e618d3436108f46c447a57e6e3d930cced8f706ceb19faeae.jpg",
|
| 223 |
+
"text": "$$\n\\delta ( \\pmb { u } , \\pmb { v } ) = \\frac { 2 \\cdot \\| \\pmb { u } - \\pmb { v } \\| _ { 2 } ^ { 2 } } { ( 1 - \\| \\pmb { u } \\| _ { 2 } ^ { 2 } ) ( 1 - \\| \\pmb { v } \\| _ { 2 } ^ { 2 } ) } , \\pmb { u } = \\frac { l ( \\pmb { x } ^ { \\prime } ) } { \\| l ( \\pmb { x } ^ { \\prime } ) \\| } , \\pmb { v } = \\operatorname* { m a x } \\{ \\pmb { v } - \\pmb { \\xi } , 0 \\} ,\n$$",
|
| 224 |
+
"text_format": "latex",
|
| 225 |
+
"bbox": [
|
| 226 |
+
263,
|
| 227 |
+
750,
|
| 228 |
+
733,
|
| 229 |
+
784
|
| 230 |
+
],
|
| 231 |
+
"page_idx": 1
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"type": "text",
|
| 235 |
+
"text": "where $\\textbf { \\em u }$ is the normalized logit vector and $\\pmb { v }$ is the one-hot vector with respect to the target class. $\\xi = 1 0 ^ { - 5 }$ is a small constant to ensure numerical stability. The following triplet loss is also integrated for pushing the image away from the original class while pulling it into the target class: ",
|
| 236 |
+
"bbox": [
|
| 237 |
+
174,
|
| 238 |
+
786,
|
| 239 |
+
823,
|
| 240 |
+
829
|
| 241 |
+
],
|
| 242 |
+
"page_idx": 1
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"type": "equation",
|
| 246 |
+
"img_path": "images/4cbfad03931f33334e8e905bcae743a5427a8248ecbf8fc3466c644e23d25fbf.jpg",
|
| 247 |
+
"text": "$$\nL _ { T r i p } = [ D ( l ( \\pmb { x } ^ { \\prime } ) , y _ { t } ) - D ( l ( \\pmb { x } ^ { \\prime } ) , y _ { o } ) + \\gamma ] _ { + } , D ( l ( \\pmb { x } ^ { \\prime } ) , y ) = 1 - \\frac { \\| l ( \\pmb { x } ^ { \\prime } ) \\cdot \\pmb { y } \\| _ { 1 } } { \\| l ( \\pmb { x } ^ { \\prime } ) \\| _ { 2 } \\| y \\| _ { 2 } } .\n$$",
|
| 248 |
+
"text_format": "latex",
|
| 249 |
+
"bbox": [
|
| 250 |
+
233,
|
| 251 |
+
832,
|
| 252 |
+
764,
|
| 253 |
+
866
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 1
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "The overall loss function is then formulated as $L _ { P o + T r i p } = L _ { P o } + \\lambda L _ { T r i p }$ . Note that in the original work, ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ was evaluated in the commonly adopted, easy ensemble transfer scenario, which only involves models with similar architectures. ",
|
| 260 |
+
"bbox": [
|
| 261 |
+
174,
|
| 262 |
+
869,
|
| 263 |
+
823,
|
| 264 |
+
911
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 1
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "text",
|
| 270 |
+
"text": "In addition to devising new loss functions, there are other transfer methods [4, 6, 8, 9] developed based on the assumption that preventing the attack optimization from overfitting to the specific source model can improve transferability. Such transfer methods can be easily plugged into different attacks without modifications, in contrast to the above methods that need to apply new attack loss functions. In this paper, we consider three [4, 6, 8] of such transfer methods that have been widely used in the literature, as described in the following text. ",
|
| 271 |
+
"bbox": [
|
| 272 |
+
173,
|
| 273 |
+
90,
|
| 274 |
+
826,
|
| 275 |
+
175
|
| 276 |
+
],
|
| 277 |
+
"page_idx": 2
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "text",
|
| 281 |
+
"text": "Momentum Iterative-FGSM (MI-FGSM) [4] integrates a momentum term, which accumulates previous gradients in order to achieve more stable update directions. It can be expressed as: ",
|
| 282 |
+
"bbox": [
|
| 283 |
+
173,
|
| 284 |
+
180,
|
| 285 |
+
823,
|
| 286 |
+
209
|
| 287 |
+
],
|
| 288 |
+
"page_idx": 2
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "equation",
|
| 292 |
+
"img_path": "images/c9f3d54775f55c28cd3b312babeefa1fd943313ea9b1b16aaf40260f8fbf98f3.jpg",
|
| 293 |
+
"text": "$$\n{ \\bf \\mathcal { G } } _ { i + 1 } = \\mu \\cdot { \\bf g } _ { i } + \\frac { \\nabla _ { x } J ( { \\pmb x } _ { i } ^ { \\prime } , y _ { t } ) } { \\| \\nabla _ { \\pmb x } J ( { \\pmb x } _ { i } ^ { \\prime } , y _ { t } ) \\| _ { 1 } } , ~ { \\pmb x } _ { i + 1 } ^ { \\prime } = { \\pmb x } _ { i } ^ { \\prime } - \\alpha \\cdot \\mathrm { ~ \\mathrm { s i g n } } ( { \\pmb g } _ { i } ) ,\n$$",
|
| 294 |
+
"text_format": "latex",
|
| 295 |
+
"bbox": [
|
| 296 |
+
292,
|
| 297 |
+
214,
|
| 298 |
+
704,
|
| 299 |
+
250
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 2
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "where $\\mathbf { \\pmb { g } } _ { i }$ is the accumulated gradients at the $i$ -th iteration, and $\\mu$ is a decay factor. Another similar technique that instead uses the Nesterov accelerated gradient was explored in [9]. ",
|
| 306 |
+
"bbox": [
|
| 307 |
+
173,
|
| 308 |
+
253,
|
| 309 |
+
823,
|
| 310 |
+
282
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 2
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "text",
|
| 316 |
+
"text": "Translation Invariant-FGSM (TI-FGSM) [6] randomly translates the input image during attack optimization in order to prevent the attack from overfitting to the specific source model. This approach is inspired by the data augmentation techniques used for preventing overfitting in normal model training. Instead of calculating gradients for multiple translated images separately, the authors have proposed an approximate solution to accelerate the implementation. It is achieved by directly computing locally smoothed gradients on the original image via convolution with a kernel: ",
|
| 317 |
+
"bbox": [
|
| 318 |
+
173,
|
| 319 |
+
287,
|
| 320 |
+
825,
|
| 321 |
+
372
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 2
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "equation",
|
| 327 |
+
"img_path": "images/7d6c6d01d0d89cb2bab15cba4916abac3106ced39d1ce1b36b6af7ab0294e130.jpg",
|
| 328 |
+
"text": "$$\n\\pmb { x } _ { i + 1 } ^ { \\prime } = \\pmb { x } _ { i } ^ { \\prime } - \\alpha \\cdot \\mathrm { s i g n } ( W * \\nabla _ { \\pmb { x } } J ( \\pmb { x } _ { i } ^ { \\prime } , y _ { t } ) ) ,\n$$",
|
| 329 |
+
"text_format": "latex",
|
| 330 |
+
"bbox": [
|
| 331 |
+
356,
|
| 332 |
+
377,
|
| 333 |
+
640,
|
| 334 |
+
395
|
| 335 |
+
],
|
| 336 |
+
"page_idx": 2
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"type": "text",
|
| 340 |
+
"text": "where $W$ is the convolution kernel used for smoothing. TI-FGSM was originally designed for boosting transferability with adversarially-trained models as target models and has been recently shown that a smaller kernel size should be used when transferring to normally-trained models [12]. ",
|
| 341 |
+
"bbox": [
|
| 342 |
+
173,
|
| 343 |
+
400,
|
| 344 |
+
826,
|
| 345 |
+
443
|
| 346 |
+
],
|
| 347 |
+
"page_idx": 2
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"type": "text",
|
| 351 |
+
"text": "Diverse Input-FGSM (DI-FGSM) [8] follows a similar idea to TI-FGSM, but applies random resizing and padding for data augmentation. Another important difference is that DI-FGSM randomizes augmentation parameters over iterations rather than fixing them as in TI-FGSM. The attack optimization of DI-FGSM can be formulated as: ",
|
| 352 |
+
"bbox": [
|
| 353 |
+
173,
|
| 354 |
+
446,
|
| 355 |
+
825,
|
| 356 |
+
503
|
| 357 |
+
],
|
| 358 |
+
"page_idx": 2
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "equation",
|
| 362 |
+
"img_path": "images/77e09dab4aa6d52e63ab767f46b1b432ffadd71bf73b2a23ecd3ca3806aa3162.jpg",
|
| 363 |
+
"text": "$$\n\\pmb { x } _ { i + 1 } ^ { \\prime } = \\pmb { x } _ { i } ^ { \\prime } - \\alpha \\cdot \\mathrm { s i g n } \\big ( \\nabla _ { \\pmb { x } } J ( T ( \\pmb { x } _ { i } ^ { \\prime } , p ) , y _ { t } ) \\big ) ,\n$$",
|
| 364 |
+
"text_format": "latex",
|
| 365 |
+
"bbox": [
|
| 366 |
+
354,
|
| 367 |
+
508,
|
| 368 |
+
642,
|
| 369 |
+
527
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "where the stochastic transformation $T ( \\pmb { x } _ { i } ^ { \\prime } , p )$ is implemented with probability $p$ at each iteration. In Section 4.1, we demonstrate that simple transfer attacks with these three transfer methods can actually achieve surprisingly strong targeted transferability in a wide range of transfer scenarios. ",
|
| 376 |
+
"bbox": [
|
| 377 |
+
174,
|
| 378 |
+
531,
|
| 379 |
+
825,
|
| 380 |
+
575
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 2
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "2.2 Resource-Intensive Transferable Attacks ",
|
| 387 |
+
"text_level": 1,
|
| 388 |
+
"bbox": [
|
| 389 |
+
174,
|
| 390 |
+
589,
|
| 391 |
+
496,
|
| 392 |
+
606
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Due to the broad consensus that achieving targeted transferability is extremely difficult, recent researchers have resorted to resource-intensive approaches that require training target-class-specific models on large-scale additional data. Specifically, the Feature Distribution Attack (FDA) [14] follows the same attack pipeline as the above simple transferable attacks, but requires auxiliary classifiers that have been trained on additional labeled data as part of the source model. Each auxiliary classifier is a small, binary, one-versus-all classifier trained for a specific target class at a specific layer. That is to say, the number of auxiliary classifiers is the number of layers that are probed multiplied by the number of target classes that are required to model [14]. The attack loss function of FDA can be formulated as: ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
173,
|
| 401 |
+
614,
|
| 402 |
+
826,
|
| 403 |
+
739
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 2
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "equation",
|
| 409 |
+
"img_path": "images/f4923c7f8e58b2b0b9c480dbd21e10f0319e9edb4ee14496f9a47698bf5c20de.jpg",
|
| 410 |
+
"text": "$$\nL _ { F D A } = J ( \\mathcal { F } _ { l } ( \\pmb { x } ^ { \\prime } ) , y _ { t } ) - \\eta \\frac { \\| \\mathcal { F } _ { l } ( \\pmb { x } ^ { \\prime } ) - \\mathcal { F } _ { l } ( \\pmb { x } ) \\| _ { 2 } } { \\| \\mathcal { F } _ { l } ( \\pmb { x } ) \\| _ { 2 } } ,\n$$",
|
| 411 |
+
"text_format": "latex",
|
| 412 |
+
"bbox": [
|
| 413 |
+
338,
|
| 414 |
+
736,
|
| 415 |
+
660,
|
| 416 |
+
770
|
| 417 |
+
],
|
| 418 |
+
"page_idx": 2
|
| 419 |
+
},
|
| 420 |
+
{
|
| 421 |
+
"type": "text",
|
| 422 |
+
"text": "where each auxiliary classifiers $F _ { l } ( \\cdot )$ can model the probability that a feature map at layer $l$ is from a specific target class $y _ { t }$ . $\\mathbf { F D A } ^ { ( N ) } \\mathbf { + x e n t }$ [15] extends FDA by aggregating features from $L$ layers and also incorporating the cross-entropy loss $H ( \\cdot , \\cdot )$ of the original network $\\mathcal F ( \\cdot )$ . The loss function of $\\mathrm { F D A } ^ { ( N ) } -$ +xent can be expressed as: ",
|
| 423 |
+
"bbox": [
|
| 424 |
+
173,
|
| 425 |
+
772,
|
| 426 |
+
825,
|
| 427 |
+
832
|
| 428 |
+
],
|
| 429 |
+
"page_idx": 2
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"type": "equation",
|
| 433 |
+
"img_path": "images/56188fac2b1edf6e52c58ef3002fbb7eab3150b14eb0cffad847eec9e5b7c9cf.jpg",
|
| 434 |
+
"text": "$$\nL _ { F D A ^ { ( N ) } + x e n t } = \\sum _ { l \\in L } \\lambda _ { l } ( L _ { F D A } + \\gamma H ( \\mathcal { F } ( \\pmb { x } ^ { \\prime } ) , y _ { t } ) ) , \\mathrm { ~ w h e r e ~ } \\sum _ { l \\in L } \\lambda _ { l } = 1 .\n$$",
|
| 435 |
+
"text_format": "latex",
|
| 436 |
+
"bbox": [
|
| 437 |
+
261,
|
| 438 |
+
837,
|
| 439 |
+
735,
|
| 440 |
+
871
|
| 441 |
+
],
|
| 442 |
+
"page_idx": 2
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"type": "text",
|
| 446 |
+
"text": "Very recently, TTP [16] has achieved state-of-the-art targeted transferability by directly generating perturbations using target-class-specific GANs that have been trained via matching the distributions of perturbations and a specific target class both globally and locally. Specifically, the global distribution matching is achieved by minimizing the Kullback Leibler (KL) divergence, and the local distribution matching is by enforcing the neighbourhood similarity. In order to further boost the performance, data augmentation techniques, such as image rotation, crop resize, horizontal flip, color jittering and gray-scale transformation, have been applied during model training. We refer the readers to [16] for more technical details of TTP. ",
|
| 447 |
+
"bbox": [
|
| 448 |
+
174,
|
| 449 |
+
882,
|
| 450 |
+
823,
|
| 451 |
+
912
|
| 452 |
+
],
|
| 453 |
+
"page_idx": 2
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"type": "text",
|
| 457 |
+
"text": "",
|
| 458 |
+
"bbox": [
|
| 459 |
+
174,
|
| 460 |
+
90,
|
| 461 |
+
825,
|
| 462 |
+
174
|
| 463 |
+
],
|
| 464 |
+
"page_idx": 3
|
| 465 |
+
},
|
| 466 |
+
{
|
| 467 |
+
"type": "text",
|
| 468 |
+
"text": "These two transferable attacks, $\\mathrm { F D A } ^ { ( N ) } +$ xent and TTP, are resource intensive due to the use of largescale model training and additional data. However, in Section 4.2, we show that simple transferable attacks, which require neither model training nor additional data, can actually achieve even better performance than them. ",
|
| 469 |
+
"bbox": [
|
| 470 |
+
176,
|
| 471 |
+
180,
|
| 472 |
+
825,
|
| 473 |
+
236
|
| 474 |
+
],
|
| 475 |
+
"page_idx": 3
|
| 476 |
+
},
|
| 477 |
+
{
|
| 478 |
+
"type": "text",
|
| 479 |
+
"text": "2.3 Universal Adversarial Perturbations ",
|
| 480 |
+
"text_level": 1,
|
| 481 |
+
"bbox": [
|
| 482 |
+
176,
|
| 483 |
+
255,
|
| 484 |
+
465,
|
| 485 |
+
270
|
| 486 |
+
],
|
| 487 |
+
"page_idx": 3
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"type": "text",
|
| 491 |
+
"text": "Previous research has shown the existence of Universal Adversarial Perturbations (UAPs), i.e., a single image perturbation vector that fools a classifier on multiple images [24]. UAPs have been extensively studied for non-targeted attacks [24–28], but also explored in the more challenging, targeted case [17–19]. Although recent studies have shown comparable performance of using reconstructed class impressions [25] or proxy datasets [18] to original training data, large-scale optimization over image data is still necessary for most existing methods. Differently, a data-free approach [26] has been proposed for non-targeted UAPs by iteratively optimizing randomly-initialized perturbations with an objective of disrupting the intermediate features of the model at multiple layers. However, this approach cannot be applied to targeted UAPs because targeted perturbations aim at a specific direction but not random disruption as in the non-targeted case. To bridge this gap, in Section 4.3, we demonstrate how the simple Logit attack can be used to generate targeted UAPs in a data-free manner. ",
|
| 492 |
+
"bbox": [
|
| 493 |
+
174,
|
| 494 |
+
281,
|
| 495 |
+
825,
|
| 496 |
+
446
|
| 497 |
+
],
|
| 498 |
+
"page_idx": 3
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"type": "text",
|
| 502 |
+
"text": "3 New Insights into Simple Transferable Attacks ",
|
| 503 |
+
"text_level": 1,
|
| 504 |
+
"bbox": [
|
| 505 |
+
174,
|
| 506 |
+
468,
|
| 507 |
+
594,
|
| 508 |
+
486
|
| 509 |
+
],
|
| 510 |
+
"page_idx": 3
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"type": "text",
|
| 514 |
+
"text": "In this section, we revisit simple transferable targeted attacks, and provide new insights into them. Specifically, we demonstrate that simple transferable attacks that are based on existing transfer methods (TI-, MI-, and DI-FGSM) need more iterations to converge, and attacking with a simple logit loss can yield much better results than the commonly adopted Cross-Entropy (CE) loss. ",
|
| 515 |
+
"bbox": [
|
| 516 |
+
174,
|
| 517 |
+
501,
|
| 518 |
+
825,
|
| 519 |
+
556
|
| 520 |
+
],
|
| 521 |
+
"page_idx": 3
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"type": "text",
|
| 525 |
+
"text": "3.1 Existing Transfer Methods with More Iterations Yield Good Results ",
|
| 526 |
+
"text_level": 1,
|
| 527 |
+
"bbox": [
|
| 528 |
+
174,
|
| 529 |
+
574,
|
| 530 |
+
684,
|
| 531 |
+
589
|
| 532 |
+
],
|
| 533 |
+
"page_idx": 3
|
| 534 |
+
},
|
| 535 |
+
{
|
| 536 |
+
"type": "text",
|
| 537 |
+
"text": "Existing attempts have concluded that using simple transferable attacks to achieve targeted transferability is extremely difficult [3, 4, 13–15]. However, these attempts have been limited to the MI transfer method. Here, we tested all the three transfer methods. As can be seen form Figure 1, integrating all the three transfer methods leads to the best performance. In particular, we find that using only DI can actually yield substantial targeted transferability, while using only TI or MI makes little difference to the original poor targeted transferability. The fact that DI outperforms TI may be explained by the fact that DI randomizes the image augmentation parameters over iterations rather than fixing them as in TI. In this way, the gradients towards the target class become more generic and so avoid overfitting to the white-box source model. MI is essentially different from DI and TI because it can only stabilize update directions but not serve to achieve more accurate gradient directions towards a specific (target) class. ",
|
| 538 |
+
"bbox": [
|
| 539 |
+
174,
|
| 540 |
+
599,
|
| 541 |
+
825,
|
| 542 |
+
752
|
| 543 |
+
],
|
| 544 |
+
"page_idx": 3
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "text",
|
| 548 |
+
"text": "As we have pointed out in Section 1, common practice of generating transferable targeted perturbations [13–15, 20] has limited the attack optimization to few iterations (typically $\\leq 2 0$ ). This is somewhat understandable given that extensive research on non-targeted transferability has done the same. However, as can be seen from Figure 1, targeted attacks actually require much more iterations to converge to optimal transferability, in contrast to the fast convergence of non-targeted attacks. This implies that evaluating the targeted transferability under only few iterations is problematic. On the one hand, comparing different optimization processes that have not converged is not meaningful and may cause misleading comparisons (see evidence in Section 4.1). This observation is consistent with the evaluation suggestion in [29] that restricting the number of iterations without verifying the attack convergence is one of the common pitfalls in evaluating adversarial robustness. Several advanced defenses have been defeated by simply increasing the number of iterations [30]. On the other hand, considering the realistic threat model, it is not meaningful to artificially restrict the computational power of a practical attack (e.g., to fewer than several thousand attack iterations) [31]. ",
|
| 549 |
+
"bbox": [
|
| 550 |
+
174,
|
| 551 |
+
760,
|
| 552 |
+
825,
|
| 553 |
+
911
|
| 554 |
+
],
|
| 555 |
+
"page_idx": 3
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "image",
|
| 559 |
+
"img_path": "images/fca3998a05bc361aeb1a80acdda333e959d92ecde001d361628249fa2a53dc0c.jpg",
|
| 560 |
+
"image_caption": [
|
| 561 |
+
"Figure 1: Transfer success rates of simple transferable attacks using CE or logit loss in the non-targeted and targeted scenarios. "
|
| 562 |
+
],
|
| 563 |
+
"image_footnote": [],
|
| 564 |
+
"bbox": [
|
| 565 |
+
179,
|
| 566 |
+
104,
|
| 567 |
+
429,
|
| 568 |
+
252
|
| 569 |
+
],
|
| 570 |
+
"page_idx": 4
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"type": "image",
|
| 574 |
+
"img_path": "images/e2c049957a94f6a754c65e1915a056f2b2266017247f535e6e9e8ad04ee22485.jpg",
|
| 575 |
+
"image_caption": [
|
| 576 |
+
"Figure 2: White-box (wb) and black-box (bb) attack performance in terms of the predicted confidence (left, higher is better) and ranking (right, lower is better) of the target class. "
|
| 577 |
+
],
|
| 578 |
+
"image_footnote": [],
|
| 579 |
+
"bbox": [
|
| 580 |
+
464,
|
| 581 |
+
107,
|
| 582 |
+
805,
|
| 583 |
+
222
|
| 584 |
+
],
|
| 585 |
+
"page_idx": 4
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "text",
|
| 589 |
+
"text": "",
|
| 590 |
+
"bbox": [
|
| 591 |
+
174,
|
| 592 |
+
311,
|
| 593 |
+
823,
|
| 594 |
+
339
|
| 595 |
+
],
|
| 596 |
+
"page_idx": 4
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"type": "text",
|
| 600 |
+
"text": "3.2 A Simple yet Strong Logit Attack ",
|
| 601 |
+
"text_level": 1,
|
| 602 |
+
"bbox": [
|
| 603 |
+
176,
|
| 604 |
+
358,
|
| 605 |
+
444,
|
| 606 |
+
373
|
| 607 |
+
],
|
| 608 |
+
"page_idx": 4
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "text",
|
| 612 |
+
"text": "Existing simple transferable attacks have commonly adopted the Cross-Entropy (CE) loss. However, as pointed out in [20], during the attack optimization, the CE loss will cause the gradient to decrease and tend to vanish as the number of iterations is increased. To address this problem, the ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ loss [20] takes a very aggressive strategy by arbitrarily reversing the decrease of the gradient, i.e., gradually increasing the magnitude of the gradients over iterations. However, we argue that this operation has led to too large step size, and as a result cause the attack optimization to overshoot the minima. Our results in Section 4.1 support this argument by showing that $\\mathrm { P o + }$ Trip even yielded worse results than CE in the ensemble transfer scenario with diverse model architectures, since the loss surface is relatively non-smooth. ",
|
| 613 |
+
"bbox": [
|
| 614 |
+
173,
|
| 615 |
+
383,
|
| 616 |
+
825,
|
| 617 |
+
510
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 4
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "text",
|
| 623 |
+
"text": "Here, for the loss function, we eliminate the final softmax function used in the CE loss and just backpropagate the gradients from the logit output: ",
|
| 624 |
+
"bbox": [
|
| 625 |
+
173,
|
| 626 |
+
515,
|
| 627 |
+
823,
|
| 628 |
+
545
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 4
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "equation",
|
| 634 |
+
"img_path": "images/33897c3e9b788b67c3c21c812c403cd8d3917f0a4a85d72585f0464eb553e382.jpg",
|
| 635 |
+
"text": "$$\nL _ { L o g i t } = - l _ { t } ( { \\bf r } ^ { \\prime } ) ,\n$$",
|
| 636 |
+
"text_format": "latex",
|
| 637 |
+
"bbox": [
|
| 638 |
+
436,
|
| 639 |
+
553,
|
| 640 |
+
560,
|
| 641 |
+
570
|
| 642 |
+
],
|
| 643 |
+
"page_idx": 4
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "text",
|
| 647 |
+
"text": "where $l _ { t } ( \\cdot )$ denotes the logit output with respect to the target class. Although the idea of attacking logits is not new, its superior performance in targeted transferability has not been recognized so far. We also find that using the well-known logit-based loss, C&W [32], yields consistently worse results (see detailed comparisons in Appendix A). Another logit loss that is similar to the C&W loss has also been adopted by [18], but in the task of generating UAPs with large-scale data. ",
|
| 648 |
+
"bbox": [
|
| 649 |
+
173,
|
| 650 |
+
579,
|
| 651 |
+
825,
|
| 652 |
+
650
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 4
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "Below, we show that this logit loss leads to stronger gradients than the CE loss. As can be observed from Equation 10, the gradient of the CE loss with respect to the target logit input, $z _ { t }$ , will monotonically decrease as the probability of the target class, $p _ { t }$ , increases during attack optimization. In addition, due to the use of the softmax function, $p _ { t }$ will quickly reach 1, and as a result the gradient tends to vanish. This phenomenon makes the attack hard to improve even with more iterations applied. Differently, as shown by Equation 11, the gradient of the logit loss equals a constant. In this way, the attack can keep improving as the number of iterations is increased. In Appendix B, we provide further comparisons on the trends of loss/gradient magnitude and the target logit value over iterations, which show that the logit loss leads to better results than both CE and ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ . ",
|
| 659 |
+
"bbox": [
|
| 660 |
+
173,
|
| 661 |
+
655,
|
| 662 |
+
826,
|
| 663 |
+
780
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 4
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "equation",
|
| 669 |
+
"img_path": "images/e2f52929761654b615d40bfbb9a7265e3cfe8acfdc5a926404ecd2f3fa360022.jpg",
|
| 670 |
+
"text": "$$\n\\begin{array} { c } { { { \\cal L } _ { C E } = - 1 \\cdot \\log ( p _ { t } ) = - \\log ( { \\displaystyle \\frac { e ^ { z _ { t } } } { \\sum e ^ { z _ { j } } } } ) = - z _ { t } + \\log ( \\sum _ { } e ^ { z _ { j } } ) , } } \\\\ { { { \\cal \\frac { \\partial L _ { C E } } { \\partial z _ { t } } } = - 1 + { \\displaystyle \\frac { \\partial \\log ( \\sum e ^ { z _ { j } } ) } { \\partial e ^ { z _ { t } } } } \\cdot { \\displaystyle \\frac { \\partial e ^ { z _ { t } } } { \\partial z _ { t } } } = - 1 + { \\displaystyle \\frac { e ^ { z _ { t } } } { \\sum e ^ { z _ { j } } } } = - 1 + p _ { t } . } } \\end{array}\n$$",
|
| 671 |
+
"text_format": "latex",
|
| 672 |
+
"bbox": [
|
| 673 |
+
281,
|
| 674 |
+
799,
|
| 675 |
+
717,
|
| 676 |
+
869
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 4
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "equation",
|
| 682 |
+
"img_path": "images/144ea0a28bc0d891cb0a7747bd387f6c935a23d1861053ca4178afeba89782cf.jpg",
|
| 683 |
+
"text": "$$\nL _ { L o g i t } = - z _ { t } , \\frac { \\partial L _ { L o g i t } } { \\partial z _ { t } } = - 1 .\n$$",
|
| 684 |
+
"text_format": "latex",
|
| 685 |
+
"bbox": [
|
| 686 |
+
393,
|
| 687 |
+
883,
|
| 688 |
+
604,
|
| 689 |
+
915
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 4
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "table",
|
| 695 |
+
"img_path": "images/9608ea412586a4f98a57cb476ebf0dc47ef6bfda71601d95752fceef5a0bda36.jpg",
|
| 696 |
+
"table_caption": [
|
| 697 |
+
"Table 1: Targeted transfer success rates $( \\% )$ in the single-model transfer scenario. We consider three attacks with different loss functions: cross-entropy (CE), Poincare distance with Triplet loss ´ $( { \\mathrm { P o } } + { \\mathrm { T r i p } } )$ [20], and the logit loss. Results with 20/100/300 iterations are reported. "
|
| 698 |
+
],
|
| 699 |
+
"table_footnote": [],
|
| 700 |
+
"table_body": "<table><tr><td rowspan=\"2\">Attack</td><td colspan=\"3\">Source Model: Res50</td><td colspan=\"3\">Source Model: Dense121</td></tr><tr><td>→Dense121</td><td>→VGG16</td><td>→Inc-v3</td><td>→Res50</td><td>→VGG16</td><td>→Inc-v3</td></tr><tr><td>CE</td><td>26.9/39.4/42.6</td><td>17.3/27.3/30.4</td><td>2.4/3.8/4.1</td><td>13.1/17.3/19.4</td><td>7.7/10.8/10.9</td><td>1.9/3.3/3.5</td></tr><tr><td>Po+Trip</td><td>26.7/53.0/54.7</td><td>18.8/34.2/34.4</td><td>2.9/6.0/5.9</td><td>10.1/14.7/14.7</td><td>6.7/8.3/7.7</td><td>2.1/3.0/2.7</td></tr><tr><td>Logit</td><td>29.3/63.3/72.5</td><td>24.0/55.7/62.7</td><td>3.0/7.2/9.4</td><td>17.2/39.7/43.7</td><td>13.5/35.3/38.7</td><td>2.7/6.9/7.6</td></tr><tr><td rowspan=\"2\">Attack</td><td colspan=\"3\">Source Model: VGG16</td><td colspan=\"3\">Source Model: Inc-v3</td></tr><tr><td>→Res50</td><td>→Dense121</td><td>→Inc-v3</td><td>→Res50</td><td>→Dense121</td><td>→VGG16</td></tr><tr><td>CE</td><td>0.7/0.4/0.6</td><td>0.5/0.3/0.1</td><td>0/0.1/0</td><td>0.6/2.1/2.4</td><td>0.8/2.5/2.9</td><td>0.7/1.6/2.0</td></tr><tr><td>Po+Trip</td><td>0.6/0.8/0.5</td><td>0.6/0.6/0.7</td><td>0.2/0.1/0.1</td><td>0.6/2.0/2.5</td><td>0.8/3.1/3.3</td><td>0.5/2.1/2.0</td></tr><tr><td>Logit</td><td>3.3/8.7/11.2</td><td>3.6/11.7/13.2</td><td>0.2/0.7/0.9</td><td>0.8/1.6/2.9</td><td>1.2/2.8/5.3</td><td>0.7/2.2/3.7</td></tr></table>",
|
| 701 |
+
"bbox": [
|
| 702 |
+
176,
|
| 703 |
+
145,
|
| 704 |
+
823,
|
| 705 |
+
297
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 5
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "text",
|
| 711 |
+
"text": "4 Experimental Evidence on Simple Transferable Attacks ",
|
| 712 |
+
"text_level": 1,
|
| 713 |
+
"bbox": [
|
| 714 |
+
176,
|
| 715 |
+
330,
|
| 716 |
+
669,
|
| 717 |
+
348
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 5
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "In this section, we provide experimental evidence to show the general effectiveness of simple transferable attacks. Firstly, in Section 4.1, we evaluate the simple transferable attacks in a variety of transfer scenarios, including single-model transfer, ensemble transfer (easy and challenging scenarios), a worse-case scenario with low-ranked target classes, and a real-world attack on the Google Cloud Vision API. Then, in Section 4.2, we compare the simple transferable attacks with two state-of-the-art resource-intensive transferable attacks, $\\mathrm { F D A } ^ { ( N ) } { + } \\mathrm { x e n i }$ [15] and TTP [16]. Finally, in Section 4.3, we apply the Logit attack to achieving targeted UAPs in a data-free manner. ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
174,
|
| 726 |
+
364,
|
| 727 |
+
825,
|
| 728 |
+
463
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 5
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "Following recent work [14–16, 20], we focus on targeted transferability of ImageNet-like images, which is known to be much more difficult than other data sets (e.g, MNIST and CIFAR-10) with smaller-size images and fewer classes. Specifically, we used the 1000 images from the development set of the ImageNet-Compatible Dataset1, which was introduced along with the NIPS 2017 Competition on Adversarial Attacks and Defenses. All these images are associated with 1000 ImageNet class labels and cropped to $2 9 9 \\times 2 9 9$ before use. Our experiments were run on an NVIDIA Tesla P100 GPU with 12GB of memory. ",
|
| 735 |
+
"bbox": [
|
| 736 |
+
174,
|
| 737 |
+
469,
|
| 738 |
+
825,
|
| 739 |
+
566
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 5
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "4.1 Simple Transferable Attacks in Various Transfer Scenarios ",
|
| 746 |
+
"text_level": 1,
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
585,
|
| 750 |
+
622,
|
| 751 |
+
601
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 5
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "We tested three different attack losses: CE, ${ \\mathrm { P o + T r i p } }$ [20] and Logit. All attacks used TI, MI, and DI with optimal hyperparameters provided in their original work. Specifically, $\\| \\mathbf { W } \\| _ { 1 } = 5$ was used for ‘TI’ as suggested by [12]. For each image, we used the target label that was officially specified in the dataset. If not mentioned specifically, all attacks were run with 300 iterations to ensure convergence. When being executed with a batch size of 20, the optimization process took about three seconds per image. A moderate step size of 2 was used for all attacks, and the results were shown to be not sensitive to the setting of step size (see evidence in Appendix C). We considered four diverse classifier architectures: ResNet [33], DenseNet [34], VGGNet [35], and Inception [36]. Following the common practice, the perturbations were restricted by $L _ { \\infty }$ norm with $\\epsilon = 1 6$ . ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
173,
|
| 760 |
+
612,
|
| 761 |
+
825,
|
| 762 |
+
738
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 5
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "text",
|
| 768 |
+
"text": "Single-model transfer. Table 1 reports the targeted transferability when transferring between each pair of different model architectures. As can be seen, the logit loss outperformed CE and ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ by a large margin in almost all cases. When comparing different model architectures, we can find that the attacks achieved lower performance when transferring from the VGGNet16 or Inception-v3 than from ResNet50 or DenseNet121. This is consistent with the observations in [14, 15] and may be explained by the fact that skip connections in ResNet50 and DenseNet121 boosts transferability [37]. Another finding is that when using Inception-v3 as the target model, the transfer success rates were always low. This might be explained by the heavily engineered nature of the Inception architecture, i.e., the Inception architecture has multiple-size convolution and two auxiliary classifiers. ",
|
| 769 |
+
"bbox": [
|
| 770 |
+
173,
|
| 771 |
+
743,
|
| 772 |
+
825,
|
| 773 |
+
868
|
| 774 |
+
],
|
| 775 |
+
"page_idx": 5
|
| 776 |
+
},
|
| 777 |
+
{
|
| 778 |
+
"type": "table",
|
| 779 |
+
"img_path": "images/10d3892245a3347e4e01b2873ff7b232614f9afa3ad38c44c108d5af850625b1.jpg",
|
| 780 |
+
"table_caption": [
|
| 781 |
+
"Table 2: Targeted transfer success rates $( \\% )$ in the commonly adopted, easy ensemble transfer scenario, where the hold-out target model (denoted by $\\cdot \\underline { { \\cdot } }$ ) and the ensemble models share similar architectures. Results with 20/100 iterations are reported. "
|
| 782 |
+
],
|
| 783 |
+
"table_footnote": [],
|
| 784 |
+
"table_body": "<table><tr><td>Attack</td><td>-Inc-v3</td><td>-Inc-v4</td><td>-IncRes-v2</td><td>-Res50</td><td>-Res101</td><td>-Res152</td><td>Average</td></tr><tr><td>CE</td><td>48.8/85.3</td><td>47.2/83.3</td><td>47.5/83.9</td><td>50.9/89.8</td><td>58.5/93.2</td><td>56.7/90.7</td><td>51.6/87.7</td></tr><tr><td>Po+Trip</td><td>59.3/84.4</td><td>55.0/82.4</td><td>51.4/80.8</td><td>56.9/85.0</td><td>60.5/87.9</td><td>57.6/85.7</td><td>56.8/84.4</td></tr><tr><td>Logit</td><td>56.4/85.5</td><td>52.9/85.8</td><td>54.4/85.1</td><td>57.5/90.0</td><td>64.4/91.4</td><td>61.3/90.8</td><td>57.8/88.1</td></tr></table>",
|
| 785 |
+
"bbox": [
|
| 786 |
+
176,
|
| 787 |
+
145,
|
| 788 |
+
820,
|
| 789 |
+
217
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 6
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "image",
|
| 795 |
+
"img_path": "images/fdd5ac90f4750155748fa1b30949e95ff900d67c18e964d24e5a9e0a6a8ee7a4.jpg",
|
| 796 |
+
"image_caption": [
|
| 797 |
+
"Figure 3: Targeted transfer success rates $( \\% )$ in our challenging ensemble transfer scenario, where each hold-out target model shares no similar architecture with the source models used for ensemble. "
|
| 798 |
+
],
|
| 799 |
+
"image_footnote": [],
|
| 800 |
+
"bbox": [
|
| 801 |
+
178,
|
| 802 |
+
239,
|
| 803 |
+
820,
|
| 804 |
+
348
|
| 805 |
+
],
|
| 806 |
+
"page_idx": 6
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"type": "text",
|
| 810 |
+
"text": "Ensemble transfer in both easy and challenging scenarios. A common approach to further boosting transferability is to generate perturbations on an ensemble of white-box source models. Following the common practice, we simply assigned equal weights to all the source models. We first look at the commonly adopted ensemble transfer scenario [4, 6, 20, 38] in which each hold-out target model shares a similar architecture with some of the white-box ensemble models. As can be seen from Table 2, the transfer success rates of all three attacks have got saturated when given enough iterations to converge. As a result, this transfer scenario could not fully reveal the actual strength of different attacks. We can also observe that ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ performed better than the CE loss only when the attack optimization is unreasonably restricted to 20 iterations, but became even worse with enough iterations. This finding suggests that evaluating different attacks under only few iterations may cause misleading comparative results. ",
|
| 811 |
+
"bbox": [
|
| 812 |
+
174,
|
| 813 |
+
414,
|
| 814 |
+
825,
|
| 815 |
+
565
|
| 816 |
+
],
|
| 817 |
+
"page_idx": 6
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
"type": "text",
|
| 821 |
+
"text": "We next considered a more challenging transfer scenario with no architectural overlap between the source ensemble models and the target model, in order to fully reveal the potential of different attacks. This scenario is also more realistic since it is hard for an attacker to know the specific architecture of a real-world target mode. Figure 3 shows that in this scenario, the Logit largely outperformed CE and ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ . In addition, the results of both CE and Logit were substantially improved over the single-model transfer results reported in Table 1. However, ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ performed even worst in some cases maybe because its use of arbitrarily increasing the gradient magnitude has caused the optimization to overshoot the minima in this ensemble transfer scenario where the loss surface is relatively non-smooth due to the model diversity. Note that as in the single transfer scenario, transferring to Inception-v3 is still the most difficult. ",
|
| 822 |
+
"bbox": [
|
| 823 |
+
173,
|
| 824 |
+
573,
|
| 825 |
+
825,
|
| 826 |
+
712
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 6
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "table",
|
| 832 |
+
"img_path": "images/721353a77d0bfde3286cebeecd1ce4b30bd8994f1b50321bc89a3b554b566c56.jpg",
|
| 833 |
+
"table_caption": [
|
| 834 |
+
"Table 3: Targeted transfer success rates $( \\% )$ when varying the target from the high-ranked class to low. "
|
| 835 |
+
],
|
| 836 |
+
"table_footnote": [],
|
| 837 |
+
"table_body": "<table><tr><td>Attack</td><td>2nd</td><td>10th</td><td>200th</td><td>500th</td><td>800th</td><td>1000th</td></tr><tr><td>CE</td><td>89.9</td><td>76.7</td><td>49.7</td><td>43.1</td><td>37.0</td><td>25.1</td></tr><tr><td>Po+Trip</td><td>82.6</td><td>77.6</td><td>58.4</td><td>53.6</td><td>49.1</td><td>38.2</td></tr><tr><td>Logit</td><td>83.8</td><td>81.3</td><td>75.0</td><td>71.0</td><td>65.1</td><td>52.8</td></tr></table>",
|
| 838 |
+
"bbox": [
|
| 839 |
+
467,
|
| 840 |
+
771,
|
| 841 |
+
821,
|
| 842 |
+
833
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 6
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "A worse-case transfer scenario with lowranked target classes. In conventional security studies, a comprehensive evaluation commonly involves a range of attack scenarios with varied difficulty. Existing work on white-box adversarial attacks [32, 21, 23, 38] has also looked at different cases with varied difficulty regarding the ranking position of the target class in the prediction list of the original image. ",
|
| 849 |
+
"bbox": [
|
| 850 |
+
173,
|
| 851 |
+
718,
|
| 852 |
+
454,
|
| 853 |
+
856
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 6
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "Specifically, in the best case, the targeted success is basically equal to non-targeted success, i.e., an attack is regarded to be successful as long as it can succeed on any arbitrary target other than the original class. In the average case, the target class is randomly specified, while in the worst case, the target is specified as the lowest-ranked/least-likely class. ",
|
| 860 |
+
"bbox": [
|
| 861 |
+
176,
|
| 862 |
+
857,
|
| 863 |
+
825,
|
| 864 |
+
911
|
| 865 |
+
],
|
| 866 |
+
"page_idx": 6
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"type": "image",
|
| 870 |
+
"img_path": "images/38b602e565fc865a9d8cfba5c4abadd7750ba6e392a528b19f1cb12a999c026c.jpg",
|
| 871 |
+
"image_caption": [
|
| 872 |
+
"Figure 4: Successful targeted adversarial images on Google Cloud Vision generated by the Logit attack with ensemble transfer. More examples can be found in Appendix D. "
|
| 873 |
+
],
|
| 874 |
+
"image_footnote": [],
|
| 875 |
+
"bbox": [
|
| 876 |
+
173,
|
| 877 |
+
87,
|
| 878 |
+
563,
|
| 879 |
+
175
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 7
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "table",
|
| 885 |
+
"img_path": "images/2b5ee2edb9bfaf454baed1249a625ce0099fbb06d0510bec79b55f40990489ef.jpg",
|
| 886 |
+
"table_caption": [
|
| 887 |
+
"Table 4: Non-targeted and targeted transfer success rates $( \\% )$ of different attacks on Google Cloud Vision. "
|
| 888 |
+
],
|
| 889 |
+
"table_footnote": [],
|
| 890 |
+
"table_body": "<table><tr><td></td><td>CE</td><td>Po+Trip</td><td>Logit</td></tr><tr><td>Targeted</td><td>7</td><td>8</td><td>18</td></tr><tr><td>Non-targeted</td><td>51</td><td>44</td><td>51</td></tr></table>",
|
| 891 |
+
"bbox": [
|
| 892 |
+
583,
|
| 893 |
+
156,
|
| 894 |
+
821,
|
| 895 |
+
207
|
| 896 |
+
],
|
| 897 |
+
"page_idx": 7
|
| 898 |
+
},
|
| 899 |
+
{
|
| 900 |
+
"type": "text",
|
| 901 |
+
"text": "However, to the best of our knowledge, current evaluation of transfer-based attacks has been limited to the best and average cases. To address this limitation, we consider a worse-case transfer scenario by varying the target from the highest-ranked class gradually to the lowest one. As can be seen from Table 3, there exists a non-negligible correlation between the ranking position of the target class and the targeted transferability. More specifically, it becomes increasingly difficult as the target moves down the prediction list. We can also observe that the results with higher-ranked targets might not reveal the actual strength of different attacks as in the more realistic, worse cases with lower-ranked targets. In particular, only looking the best case with the highest-ranked target may lead to a misleading conclusion that CE leads to the most effective attack. This finding suggests that a more meaningful evaluation on targeted transferability should further increase difficulty beyond the current best and average cases. ",
|
| 902 |
+
"bbox": [
|
| 903 |
+
174,
|
| 904 |
+
260,
|
| 905 |
+
825,
|
| 906 |
+
412
|
| 907 |
+
],
|
| 908 |
+
"page_idx": 7
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"type": "text",
|
| 912 |
+
"text": "Transfer-based attacks on Google Cloud Vision. Most existing work on fooling real-world computer vision systems has been focused on the query-based attacks, where a large number of queries are required [39–41]. Although several recent studies have also explored real-world transfer-based attacks, they were limited to face recognition and the non-targeted attacks [42–44]. In contrast, we applied the simple transferable attacks in the more challenging, targeted case on a more generallyused image recognition system, the Google Cloud Vision API. Specifically, we used the targeted adversarial images generated on the ensemble of all four diverse source models with 300 iterations. ",
|
| 913 |
+
"bbox": [
|
| 914 |
+
174,
|
| 915 |
+
419,
|
| 916 |
+
825,
|
| 917 |
+
516
|
| 918 |
+
],
|
| 919 |
+
"page_idx": 7
|
| 920 |
+
},
|
| 921 |
+
{
|
| 922 |
+
"type": "text",
|
| 923 |
+
"text": "The API predicts a list of semantic labels along with confidence scores. Specifically, only the top classes with confidence no lower than $5 0 \\%$ are returned, and at most 10 classes are shown. Note that the confidence score here is not a probability (which would sum to one). We measured both the targeted and non-targeted transferability. Since all returned labels are with relatively high confidence $( \\geq 5 0 \\% )$ ), we do not limit our measure of success rates to only top-1 class. Instead, for non-targeted success, we measured whether or not the ground-truth class appeared in the returned list, while for targeted success, whether or not the target class appeared. Due to the fact that the semantic label set predicted by the API does not exactly correspond to the 1000 ImageNet classes, we treated semantically similar classes as the same class. ",
|
| 924 |
+
"bbox": [
|
| 925 |
+
173,
|
| 926 |
+
522,
|
| 927 |
+
825,
|
| 928 |
+
647
|
| 929 |
+
],
|
| 930 |
+
"page_idx": 7
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"type": "text",
|
| 934 |
+
"text": "Table 4 reports the results averaged over 100 images that originally yield correct predictions. As can be seen, in general, achieving targeted transfer success is much more difficult than non-targeted success. In particular, the Logit attack achieved the best targeted transferability, with quasi-imperceptible perturbations shown in Figure 4. Our results reveal the potential vulnerability of Google Cloud Vision against simple transfer-based attacks, which require no query interaction. ",
|
| 935 |
+
"bbox": [
|
| 936 |
+
174,
|
| 937 |
+
654,
|
| 938 |
+
825,
|
| 939 |
+
723
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 7
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "text",
|
| 945 |
+
"text": "4.2 Simple vs. Resource-Intensive Transferable Attacks ",
|
| 946 |
+
"text_level": 1,
|
| 947 |
+
"bbox": [
|
| 948 |
+
173,
|
| 949 |
+
748,
|
| 950 |
+
571,
|
| 951 |
+
763
|
| 952 |
+
],
|
| 953 |
+
"page_idx": 7
|
| 954 |
+
},
|
| 955 |
+
{
|
| 956 |
+
"type": "text",
|
| 957 |
+
"text": "In this subsection, we compared simple transferable attacks with state-of-the-art resource-intensive approaches, TTP [16] and FDA(N)+xent [15], which necessitate training target-class-specific models on additional data. ",
|
| 958 |
+
"bbox": [
|
| 959 |
+
176,
|
| 960 |
+
777,
|
| 961 |
+
821,
|
| 962 |
+
821
|
| 963 |
+
],
|
| 964 |
+
"page_idx": 7
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"type": "text",
|
| 968 |
+
"text": "Compared with TTP. We compared the Logit attack with the state-of-the-art TTP, which is based on training target-class-specific GANs on additional data. We tested both Logit and TTP on our dataset following the “10-Targets (all-source)” setting in [16]. We chose ResNet50 as the white-box model in the single-model transfer scenario and an ensemble of $\\mathrm { R e s N e t } \\{ 1 8 , 5 0 , 1 0 1 , 1 5 2 \\}$ in the ensemble transfer scenario. DenseNet121 and VGG16 bn are tested as the target models. Note that the same knowledge of the white-box model is available to both attacks but it is leveraged in different ways. ",
|
| 969 |
+
"bbox": [
|
| 970 |
+
174,
|
| 971 |
+
828,
|
| 972 |
+
825,
|
| 973 |
+
911
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 7
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "Specifically, for the Logit attack, the white-box model is used as a source model for iterative attack optimization, while for TTP, it is used as a discriminator during training the GANs. ",
|
| 980 |
+
"bbox": [
|
| 981 |
+
171,
|
| 982 |
+
92,
|
| 983 |
+
823,
|
| 984 |
+
119
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 8
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "text",
|
| 990 |
+
"text": "As shown in Table 5, under the commonly adopted $\\epsilon = 1 6$ , the Logit attack can achieve comparable results to TTP in all cases. Specifically, we can observe that the model ensemble is more helpful to Logit than for TTP. This might be because even with the single model as the discriminator, TTP can learn good enough features of target semantics by training with the objective of matching the perturbation and target class distributions with large-scale data. The clearer target semantics learned by TTP can be confirmed by comparing the unbounded perturbations achieved by TTP (e.g., Figure 3 in [16]) with those by the Logit shown in Figure 5. ",
|
| 991 |
+
"bbox": [
|
| 992 |
+
174,
|
| 993 |
+
126,
|
| 994 |
+
485,
|
| 995 |
+
291
|
| 996 |
+
],
|
| 997 |
+
"page_idx": 8
|
| 998 |
+
},
|
| 999 |
+
{
|
| 1000 |
+
"type": "table",
|
| 1001 |
+
"img_path": "images/0c3b7293737e512839ffa02751933ba8cf4619297a516d2d25ac0cf2064aff82.jpg",
|
| 1002 |
+
"table_caption": [
|
| 1003 |
+
"Table 5: Targeted transfer success rates $( \\% )$ of Logit vs. TTP in single-model and ensemble transfer scenarios under two norm bounds. "
|
| 1004 |
+
],
|
| 1005 |
+
"table_footnote": [],
|
| 1006 |
+
"table_body": "<table><tr><td>Bound</td><td>Attack</td><td>D121</td><td>V16</td><td>D121-ens</td><td>V16-ens</td></tr><tr><td rowspan=\"2\">e= 16</td><td>TTP</td><td>79.6</td><td>78.6</td><td>92.9</td><td>89.6</td></tr><tr><td>Logit</td><td>75.9</td><td>72.5</td><td>99.4</td><td>97.7</td></tr><tr><td rowspan=\"2\">e=8</td><td>TTP</td><td>37.5</td><td>46.7</td><td>63.2</td><td>66.2</td></tr><tr><td>Logit</td><td>44.5</td><td>46.8</td><td>92.6</td><td>87.0</td></tr></table>",
|
| 1007 |
+
"bbox": [
|
| 1008 |
+
500,
|
| 1009 |
+
193,
|
| 1010 |
+
821,
|
| 1011 |
+
270
|
| 1012 |
+
],
|
| 1013 |
+
"page_idx": 8
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"type": "text",
|
| 1017 |
+
"text": "",
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
169,
|
| 1020 |
+
291,
|
| 1021 |
+
772,
|
| 1022 |
+
306
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 8
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "This fact that TTP perturbations heavily rely on semantic patterns of the target class might cause TTP to degrade under lower norm bounds. To validate this assumption, we further compared Logit and TTP under $\\epsilon = 8$ . As expected, the Logit attack consistently surpassed TTP, especially with a very large margin in the ensemble transfer scenario. The different comparing results for the two perturbation sizes also suggest that comparing attacks only under a single perturbation size may not reveal their characteristics. ",
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
174,
|
| 1031 |
+
311,
|
| 1032 |
+
825,
|
| 1033 |
+
395
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 8
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "table",
|
| 1039 |
+
"img_path": "images/1e59a2e2c59015f4dbfbfc7da463c3388bb2665a393071bf30a79aa45ee7c0f4.jpg",
|
| 1040 |
+
"table_caption": [
|
| 1041 |
+
"Table 6: Targeted transfer success rates $( \\% )$ of unbounded adversarial images by different attacks with the same iteration budget. "
|
| 1042 |
+
],
|
| 1043 |
+
"table_footnote": [],
|
| 1044 |
+
"table_body": "<table><tr><td></td><td>FDA(4) +xent</td><td>CE</td><td>Po+Trip</td><td>Logit</td></tr><tr><td>Res50-→Dense121</td><td>65.8</td><td>69.3</td><td>88.1</td><td>84.1</td></tr><tr><td>Res50→VGG16</td><td>48.1</td><td>54.1</td><td>67.8</td><td>74.2</td></tr></table>",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
176,
|
| 1047 |
+
467,
|
| 1048 |
+
496,
|
| 1049 |
+
529
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 8
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "image",
|
| 1055 |
+
"img_path": "images/d0c0f928a7bbb988714c9d633bdb653be7f458932d6324a2cba9b55e81b07fd1.jpg",
|
| 1056 |
+
"image_caption": [
|
| 1057 |
+
"Figure 5: Unbounded adversarial examples that reflect target semantics. More examples can be found in Appendix E. "
|
| 1058 |
+
],
|
| 1059 |
+
"image_footnote": [],
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
529,
|
| 1062 |
+
404,
|
| 1063 |
+
821,
|
| 1064 |
+
489
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 8
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "Compared with FDA(N)+xent. We compared the three simple transferable attacks (CE, ${ \\mathrm { P o } } { + } { \\mathrm { T r i p } }$ and Logit) with $\\mathrm { F D A } ^ { ( N ) }$ +xent on generating unbounded adversarial images, in consistence with “distal transfer” in $[ 1 5 ] ^ { 2 }$ . Specifically, the adversarial perturbations were initialized as random Gaussian noise and allowed to be as large as possible. Although such unbounded adversarial images may not be practically compelling, they can provide better isolated indication on transferability by eliminating the dependency on the source images and the bound restrictions. The results were averaged over 4000 image examples, each of which was optimized towards a random target class. As suggested by [15], the MI transfer method was removed since it empirically harms the performance in this unbounded case. ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
173,
|
| 1073 |
+
545,
|
| 1074 |
+
825,
|
| 1075 |
+
671
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 8
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "Table 6 shows that all the three simple transferable attacks achieved stronger targeted transferability than $\\mathrm { F D A } ^ { ( N ) } \\mathrm { + x e n t }$ . As can be seen from Figure 5, the unbounded adversarial perturbations can somehow reflect the target semantics. This finding suggests that achieving targeted transferability relies on robust, semantic features [45] that are expected to be learned by various models and also understood by humans. In this way, achieving targeted transferability is fundamentally different from non-targeted transferability, for which attacking non-robust features is known to be sufficient [45]. It is also worth noting that in practical scenarios with small norm bounds, the semantically-aligned perturbations would not be expected to change human judgements. ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
173,
|
| 1084 |
+
678,
|
| 1085 |
+
825,
|
| 1086 |
+
791
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 8
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "4.3 Simple Logit Attack for Targeted UAPs in a Data-Free Manner ",
|
| 1093 |
+
"text_level": 1,
|
| 1094 |
+
"bbox": [
|
| 1095 |
+
176,
|
| 1096 |
+
806,
|
| 1097 |
+
650,
|
| 1098 |
+
821
|
| 1099 |
+
],
|
| 1100 |
+
"page_idx": 8
|
| 1101 |
+
},
|
| 1102 |
+
{
|
| 1103 |
+
"type": "text",
|
| 1104 |
+
"text": "The above observation that the perturbations can reflect certain target semantics motivates us to apply the Logit attack to achieving targeted Universal Adversarial Perturbations (UAPs), which can drive multiple original images into a specific target class. Existing attempts at achieving targeted UAPs have mainly relied on large-scale optimization over additional data [17–19]. However, the simple Logit attack can be easily extended to generate targeted UAPs in a data-free manner. The only difference from the above transferable Logit attack is that here a mean image (all pixel values set as 0.5 out of [0,1]) is used as the original image. ",
|
| 1105 |
+
"bbox": [
|
| 1106 |
+
174,
|
| 1107 |
+
832,
|
| 1108 |
+
823,
|
| 1109 |
+
887
|
| 1110 |
+
],
|
| 1111 |
+
"page_idx": 8
|
| 1112 |
+
},
|
| 1113 |
+
{
|
| 1114 |
+
"type": "table",
|
| 1115 |
+
"img_path": "images/45114acf407a882ce07a2bb8bf4c51f360dfb27de75f9d833520195ae23a0216.jpg",
|
| 1116 |
+
"table_caption": [
|
| 1117 |
+
"Table 7: Success rates $( \\% )$ of targeted UAPs generated by CE and Logit attacks for different models. "
|
| 1118 |
+
],
|
| 1119 |
+
"table_footnote": [],
|
| 1120 |
+
"table_body": "<table><tr><td>Attack</td><td>Inc-v3</td><td>Res50</td><td>Dense121</td><td>VGG16</td></tr><tr><td>CE</td><td>2.6</td><td>9.2</td><td>8.7</td><td>20.1</td></tr><tr><td>Logit</td><td>4.7</td><td>22.8</td><td>21.8</td><td>65.9</td></tr></table>",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
176,
|
| 1123 |
+
190,
|
| 1124 |
+
465,
|
| 1125 |
+
239
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 9
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "image",
|
| 1131 |
+
"img_path": "images/a965d24ae8b97cf0eca96389dc830cba0f3a40618f1425879de5ff1b25bee39a.jpg",
|
| 1132 |
+
"image_caption": [
|
| 1133 |
+
"Figure 6: UAPs $\\epsilon = 1 6$ , VGG16) with different classes using CE and Logit. More examples can be found in Appendix F. "
|
| 1134 |
+
],
|
| 1135 |
+
"image_footnote": [],
|
| 1136 |
+
"bbox": [
|
| 1137 |
+
529,
|
| 1138 |
+
88,
|
| 1139 |
+
821,
|
| 1140 |
+
241
|
| 1141 |
+
],
|
| 1142 |
+
"page_idx": 9
|
| 1143 |
+
},
|
| 1144 |
+
{
|
| 1145 |
+
"type": "text",
|
| 1146 |
+
"text": "",
|
| 1147 |
+
"bbox": [
|
| 1148 |
+
174,
|
| 1149 |
+
318,
|
| 1150 |
+
825,
|
| 1151 |
+
361
|
| 1152 |
+
],
|
| 1153 |
+
"page_idx": 9
|
| 1154 |
+
},
|
| 1155 |
+
{
|
| 1156 |
+
"type": "text",
|
| 1157 |
+
"text": "In our experiment, for each target class, we generated a single targeted UAP vector $\\epsilon = 1 6$ ) with 300 iterations and applied it to all 1000 images in our dataset. Table 7 reports the results averaged over all the 1000 ImageNet classes. As can be seen, the logit loss can yield substantial success, remarkably outperforming the CE loss. This can be confirmed by Figure 6, which shows the Logit attack can yield more semantically-aligned perturbations than CE. This observation also supports the claim from [18] that universal perturbations contain dominant features, and images act like noise with respect to perturbations. ",
|
| 1158 |
+
"bbox": [
|
| 1159 |
+
174,
|
| 1160 |
+
366,
|
| 1161 |
+
825,
|
| 1162 |
+
463
|
| 1163 |
+
],
|
| 1164 |
+
"page_idx": 9
|
| 1165 |
+
},
|
| 1166 |
+
{
|
| 1167 |
+
"type": "text",
|
| 1168 |
+
"text": "5 Conclusion and Outlook ",
|
| 1169 |
+
"text_level": 1,
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
176,
|
| 1172 |
+
483,
|
| 1173 |
+
408,
|
| 1174 |
+
500
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 9
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "In this paper, we have demonstrated that achieving targeted transferability is not as difficult as current work concludes. Specifically, we find that simple transferable attacks can actually achieve surprisingly strong targeted transferability when given enough iterations for convergence. We have validated the effectiveness of simple transferable attacks in a wide range of transfer scenarios, including three newly-introduced challenging scenarios. These challenging scenarios have better revealed the actual strength of different attacks. In particular, we demonstrate that a very simple Logit attack is superior in all transfer scenarios, achieving even better results than the state-of-the-art resource-intensive approaches. We also show the potential usefulness of the Logit attack for generating targeted universal adversarial perturbations in a data-free manner. Overall, we hope our findings will inspire future research to conduct a more meaningful evaluation on targeted transferability. Our future work will focus on studying why different model architectures yield different transferability. In particular, the very low success rates when targeting Inception-v3 should be explored. Moving forward, there needs to be a more comprehensive discussion on the resource consumption of different attacks from multiple aspects, such as training and inference time, hardware resources, and data size. ",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
174,
|
| 1183 |
+
513,
|
| 1184 |
+
825,
|
| 1185 |
+
707
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 9
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "Strong transferability can obviously benefit black-box applications of adversarial images for social good, such as protecting user privacy [42, 43, 46–48]. In addition, it will also motivate the community to design stronger defenses given our finding that even simple attacks can generate highly transferable adversarial images. It remains a possibility that our methodology may be misused by malicious actors to break legitimate systems. However, we firmly believe that the help that our paper can provide to researchers significantly outweighs the help that it may provide an actual malicious actor. ",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
174,
|
| 1194 |
+
713,
|
| 1195 |
+
825,
|
| 1196 |
+
797
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 9
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "Acknowledgments ",
|
| 1203 |
+
"text_level": 1,
|
| 1204 |
+
"bbox": [
|
| 1205 |
+
176,
|
| 1206 |
+
816,
|
| 1207 |
+
328,
|
| 1208 |
+
833
|
| 1209 |
+
],
|
| 1210 |
+
"page_idx": 9
|
| 1211 |
+
},
|
| 1212 |
+
{
|
| 1213 |
+
"type": "text",
|
| 1214 |
+
"text": "This work was carried out on the Dutch national e-infrastructure with the support of SURF Cooperative. ",
|
| 1215 |
+
"bbox": [
|
| 1216 |
+
173,
|
| 1217 |
+
848,
|
| 1218 |
+
825,
|
| 1219 |
+
876
|
| 1220 |
+
],
|
| 1221 |
+
"page_idx": 9
|
| 1222 |
+
},
|
| 1223 |
+
{
|
| 1224 |
+
"type": "text",
|
| 1225 |
+
"text": "References ",
|
| 1226 |
+
"text_level": 1,
|
| 1227 |
+
"bbox": [
|
| 1228 |
+
174,
|
| 1229 |
+
90,
|
| 1230 |
+
267,
|
| 1231 |
+
106
|
| 1232 |
+
],
|
| 1233 |
+
"page_idx": 10
|
| 1234 |
+
},
|
| 1235 |
+
{
|
| 1236 |
+
"type": "text",
|
| 1237 |
+
"text": "[1] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. \n[2] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. \n[3] Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. In ICLR, 2017. \n[4] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In CVPR, 2018. \n[5] Wen Zhou, Xin Hou, Yongjun Chen, Mengyun Tang, Xiangqi Huang, Xiang Gan, and Yong Yang. Transferable adversarial perturbations. In ECCV, 2018. \n[6] Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Evading defenses to transferable adversarial examples by translation-invariant attacks. In CVPR, 2019. \n[7] Qian Huang, Isay Katsman, Horace He, Zeqi Gu, Serge Belongie, and Ser-Nam Lim. Enhancing adversarial example transferability with an intermediate level attack. In ICCV, 2019. \n[8] Cihang Xie, Zhishuai Zhang, Yuyin Zhou, Song Bai, Jianyu Wang, Zhou Ren, and Alan L Yuille. Improving transferability of adversarial examples with input diversity. In CVPR, 2019. \n[9] Jiadong Lin, Chuanbiao Song, Kun He, Liwei Wang, and John E Hopcroft. Nesterov accelerated gradient and scale invariance for adversarial attacks. In ICLR, 2020. \n[10] Yingwei Li, Song Bai, Yuyin Zhou, Cihang Xie, Zhishuai Zhang, and Alan L Yuille. Learning transferable adversarial examples via ghost networks. In AAAI, 2020. \n[11] Weibin Wu, Yuxin Su, Xixian Chen, Shenglin Zhao, Irwin King, Michael R Lyu, and Yu-Wing Tai. Boosting the transferability of adversarial samples via attention. In CVPR, 2020. \n[12] Lianli Gao, Qilong Zhang, Jingkuan Song, Xianglong Liu, and Heng Tao Shen. Patch-wise attack for fooling deep neural network. In ECCV, 2020. \n[13] Nathan Inkawhich, Wei Wen, Hai Helen Li, and Yiran Chen. Feature space perturbations yield more transferable adversarial examples. In CVPR, 2019. \n[14] Nathan Inkawhich, Kevin Liang, Lawrence Carin, and Yiran Chen. Transferable perturbations of deep feature distributions. In ICLR, 2020. \n[15] Nathan Inkawhich, Kevin J Liang, Binghui Wang, Matthew Inkawhich, Lawrence Carin, and Yiran Chen. Perturbing across the feature hierarchy to improve standard and strict blackbox attack transferability. In NeurIPS, 2020. \n[16] Muzammal Naseer, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Fatih Porikli. On generating transferable targeted perturbations. In ICCV, 2021. \n[17] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. Generative adversarial perturbations. In CVPR, 2018. \n[18] Chaoning Zhang, Philipp Benz, Tooba Imtiaz, and In So Kweon. Understanding adversarial examples from the mutual influence of images and perturbations. In CVPR, 2020. \n[19] Philipp Benz, Chaoning Zhang, Tooba Imtiaz, and In So Kweon. Double targeted universal adversarial perturbations. In ACCV, 2020. \n[20] Maosen Li, Cheng Deng, Tengjiao Li, Junchi Yan, Xinbo Gao, and Heng Huang. Towards transferable targeted attack. In CVPR, 2020. \n[21] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In ICLR, 2017. \n[22] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018. \n[23] Jer´ ome Rony, Luiz G. Hafemann, Luiz S. Oliveira, Ismail Ben Ayed, Robert Sabourin, and Eric ˆ Granger. Decoupling direction and norm for efficient gradient-based $L _ { 2 }$ adversarial attacks and defenses. In CVPR, 2019. \n[24] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In CVPR, 2017. \n[25] Konda Reddy Mopuri, Phani Krishna Uppala, and R Venkatesh Babu. Ask, acquire, and attack: Data-free UAP generation using class impressions. In ECCV, 2018. \n[26] Konda Reddy Mopuri, Aditya Ganeshan, and R Venkatesh Babu. Generalizable data-free objective for crafting universal adversarial perturbations. IEEE TPAMI, 41(10):2452–2465, 2018. \n[27] Muzammal Naseer, Salman H Khan, Harris Khan, Fahad Shahbaz Khan, and Fatih Porikli. Cross-domain transferability of adversarial perturbations. In NeurIPS, 2019. \n[28] Yingwei Li, Song Bai, Cihang Xie, Zhenyu Liao, Xiaohui Shen, and Alan L Yuille. Regional homogeneity: Towards learning transferable universal adversarial perturbations against defenses. In ECCV, 2020. \n[29] Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, Aleksander Madry, and Alexey Kurakin. On evaluating adversarial robustness. In arXiv preprint arXiv:1902.06705, 2019. \n[30] Florian Tramer, Nicholas Carlini, Wieland Brendel, and Aleksander Madry. On adaptive attacks to adversarial example defenses. In NeurIPS, 2020. \n[31] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In ICML, 2018. \n[32] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE S&P, 2017. \n[33] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. \n[34] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017. \n[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. \n[36] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. \n[37] Dongxian Wu, Yisen Wang, Shu-Tao Xia, James Bailey, and Xingjun Ma. Skip connections matter: On the transferability of adversarial examples generated with resnets. In ICLR, 2020. \n[38] Florian Tramer, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick \\` McDaniel. Ensemble adversarial training: Attacks and defenses. In ICLR, 2018. \n[39] Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In AISec, 2017. \n[40] Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. In ICLR, 2018. \n[41] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In ICML, 2018. \n[42] Valeriia Cherepanova, Micah Goldblum, Harrison Foley, Shiyuan Duan, John Dickerson, Gavin Taylor, and Tom Goldstein. LowKey: Leveraging adversarial attacks to protect social media users from facial recognition. In ICLR, 2021. \n[43] Arezoo Rajabi, Rakesh B Bobba, Mike Rosulek, Charles Wright, and Wu-chi Feng. On the (im) practicality of adversarial perturbation for image privacy. PoPETs, 2021. \n[44] Shawn Shan, Emily Wenger, Jiayun Zhang, Huiying Li, Haitao Zheng, and Ben Y Zhao. Fawkes: Protecting privacy against unauthorized deep learning models. In USENIX Security, 2020. \n[45] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. In NeurIPS, 2019. \n[46] Martha Larson, Zhuoran Liu, Simon Brugman, and Zhengyu Zhao. Pixel privacy: Increasing image appeal while blocking automatic inference of sensitive scene information. In MediaEval Multimedia Benchmark Workshop, 2018. \n[47] Zhuoran Liu, Zhengyu Zhao, and Martha Larson. Who’s afraid of adversarial queries? the impact of image modifications on content-based image retrieval. In ICMR, 2019. \n[48] Seong Joon Oh, Mario Fritz, and Bernt Schiele. Adversarial image perturbation for privacy protection a game theory perspective. In ICCV, 2017. ",
|
| 1238 |
+
"bbox": [
|
| 1239 |
+
171,
|
| 1240 |
+
95,
|
| 1241 |
+
828,
|
| 1242 |
+
916
|
| 1243 |
+
],
|
| 1244 |
+
"page_idx": 10
|
| 1245 |
+
},
|
| 1246 |
+
{
|
| 1247 |
+
"type": "text",
|
| 1248 |
+
"text": "",
|
| 1249 |
+
"bbox": [
|
| 1250 |
+
171,
|
| 1251 |
+
61,
|
| 1252 |
+
828,
|
| 1253 |
+
917
|
| 1254 |
+
],
|
| 1255 |
+
"page_idx": 11
|
| 1256 |
+
},
|
| 1257 |
+
{
|
| 1258 |
+
"type": "text",
|
| 1259 |
+
"text": "",
|
| 1260 |
+
"bbox": [
|
| 1261 |
+
171,
|
| 1262 |
+
90,
|
| 1263 |
+
828,
|
| 1264 |
+
381
|
| 1265 |
+
],
|
| 1266 |
+
"page_idx": 12
|
| 1267 |
+
},
|
| 1268 |
+
{
|
| 1269 |
+
"type": "text",
|
| 1270 |
+
"text": "Checklist ",
|
| 1271 |
+
"text_level": 1,
|
| 1272 |
+
"bbox": [
|
| 1273 |
+
174,
|
| 1274 |
+
407,
|
| 1275 |
+
254,
|
| 1276 |
+
424
|
| 1277 |
+
],
|
| 1278 |
+
"page_idx": 12
|
| 1279 |
+
},
|
| 1280 |
+
{
|
| 1281 |
+
"type": "text",
|
| 1282 |
+
"text": "1. For all authors... ",
|
| 1283 |
+
"bbox": [
|
| 1284 |
+
214,
|
| 1285 |
+
435,
|
| 1286 |
+
339,
|
| 1287 |
+
449
|
| 1288 |
+
],
|
| 1289 |
+
"page_idx": 12
|
| 1290 |
+
},
|
| 1291 |
+
{
|
| 1292 |
+
"type": "text",
|
| 1293 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] We described the limitation in the first sentence of the final section. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discuss them at the end of the final section. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 1294 |
+
"bbox": [
|
| 1295 |
+
238,
|
| 1296 |
+
455,
|
| 1297 |
+
825,
|
| 1298 |
+
574
|
| 1299 |
+
],
|
| 1300 |
+
"page_idx": 12
|
| 1301 |
+
},
|
| 1302 |
+
{
|
| 1303 |
+
"type": "text",
|
| 1304 |
+
"text": "2. If you are including theoretical results... ",
|
| 1305 |
+
"bbox": [
|
| 1306 |
+
214,
|
| 1307 |
+
579,
|
| 1308 |
+
493,
|
| 1309 |
+
593
|
| 1310 |
+
],
|
| 1311 |
+
"page_idx": 12
|
| 1312 |
+
},
|
| 1313 |
+
{
|
| 1314 |
+
"type": "text",
|
| 1315 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
|
| 1316 |
+
"bbox": [
|
| 1317 |
+
238,
|
| 1318 |
+
598,
|
| 1319 |
+
738,
|
| 1320 |
+
630
|
| 1321 |
+
],
|
| 1322 |
+
"page_idx": 12
|
| 1323 |
+
},
|
| 1324 |
+
{
|
| 1325 |
+
"type": "text",
|
| 1326 |
+
"text": "3. If you ran experiments... ",
|
| 1327 |
+
"bbox": [
|
| 1328 |
+
212,
|
| 1329 |
+
635,
|
| 1330 |
+
393,
|
| 1331 |
+
648
|
| 1332 |
+
],
|
| 1333 |
+
"page_idx": 12
|
| 1334 |
+
},
|
| 1335 |
+
{
|
| 1336 |
+
"type": "text",
|
| 1337 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] The code (including instructions and a link to data we have used) has been submitted as the supplemental material. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Our experiments did not involve any model training, but all the algorithm details were specified. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] We fixed the random seed for all the experiments. Now the main randomness comes from the $p$ in the existing method, DI (see Eq. 6). We confirm that it has little impact on the results. \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] We mentioned the run time of the attacks and our hardware settings in Section 4. ",
|
| 1338 |
+
"bbox": [
|
| 1339 |
+
238,
|
| 1340 |
+
655,
|
| 1341 |
+
825,
|
| 1342 |
+
856
|
| 1343 |
+
],
|
| 1344 |
+
"page_idx": 12
|
| 1345 |
+
},
|
| 1346 |
+
{
|
| 1347 |
+
"type": "text",
|
| 1348 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 1349 |
+
"bbox": [
|
| 1350 |
+
209,
|
| 1351 |
+
861,
|
| 1352 |
+
823,
|
| 1353 |
+
876
|
| 1354 |
+
],
|
| 1355 |
+
"page_idx": 12
|
| 1356 |
+
},
|
| 1357 |
+
{
|
| 1358 |
+
"type": "text",
|
| 1359 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] In Section 4. \n(b) Did you mention the license of the assets? [Yes] In a footnote of Section 4. \n(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] We did not use any new assets. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] In the same footnote as above. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] In the same footnote as above. ",
|
| 1360 |
+
"bbox": [
|
| 1361 |
+
236,
|
| 1362 |
+
881,
|
| 1363 |
+
779,
|
| 1364 |
+
911
|
| 1365 |
+
],
|
| 1366 |
+
"page_idx": 12
|
| 1367 |
+
},
|
| 1368 |
+
{
|
| 1369 |
+
"type": "text",
|
| 1370 |
+
"text": "",
|
| 1371 |
+
"bbox": [
|
| 1372 |
+
238,
|
| 1373 |
+
92,
|
| 1374 |
+
825,
|
| 1375 |
+
179
|
| 1376 |
+
],
|
| 1377 |
+
"page_idx": 13
|
| 1378 |
+
},
|
| 1379 |
+
{
|
| 1380 |
+
"type": "text",
|
| 1381 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1382 |
+
"bbox": [
|
| 1383 |
+
214,
|
| 1384 |
+
184,
|
| 1385 |
+
705,
|
| 1386 |
+
199
|
| 1387 |
+
],
|
| 1388 |
+
"page_idx": 13
|
| 1389 |
+
},
|
| 1390 |
+
{
|
| 1391 |
+
"type": "text",
|
| 1392 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
|
| 1393 |
+
"bbox": [
|
| 1394 |
+
238,
|
| 1395 |
+
203,
|
| 1396 |
+
825,
|
| 1397 |
+
292
|
| 1398 |
+
],
|
| 1399 |
+
"page_idx": 13
|
| 1400 |
+
}
|
| 1401 |
+
]
|
parse/train/LVWcGZr-8h/LVWcGZr-8h_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/LVWcGZr-8h/LVWcGZr-8h_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJlbyCNtPr/SJlbyCNtPr.md
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LONG-TERM PLANNING, SHORT-TERM ADJUSTMENTS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Deep reinforcement learning (RL) algorithms can learn complex policies to optimize agent operation over time. RL algorithms have shown promising results in solving complicated problems in recent years. However, their application on real-world physical systems remains limited. Despite the advancements in RL algorithms, the industries often prefer traditional control strategies. Traditional methods are simple, computationally efficient and easy to adjust. In this paper, we propose a new Q-learning algorithm for continuous action space, which can bridge the control and RL algorithms and bring us the best of both worlds. Our method can learn complex policies to achieve long-term goals and at the same time it can be easily adjusted to address short-term requirements without retraining. We achieve this by modeling both short-term and long-term prediction models. The short-term prediction model represents the estimation of the system dynamic while the long-term prediction model represents the Q-value. The case studies demonstrate that our proposed method can achieve short-term and long-term goals without complex reward functions.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Optimal control methodologies use system dynamic equations to design actions that minimize desired cost functions. A cost function can be designed to track a trajectory, reach a goal, or avoid obstacles. It is also possible to design a cost function to achieve a combination of goals. Model Predictive Control (MPC) is a common optimal control technique and has been applied to many industrial applications such as pressure control and temperature control in chemical processes (Garcia et al., 1989). The traditional control solutions are not adequate to address the challenges raised with the evolution of industrial systems. Recently, deep reinforcement learning (RL) has shown promising results in solving complex problems. For example, it has generated superhuman performance in chess and shogi (Silver et al., 2017). The following advantages make deep RL a strong candidate to overcome traditional control limitations. First, deep RL has an advantage in solving complex problems, especially when the consequences of an action are not immediately obvious. Moreover, it can learn an optimal solution without requiring detailed knowledge of the systems or their engineering designs. Finally, deep RL is not limited to time-series sensors and can use new sensors such as vision for a better control.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: Crane system. The long-term goal is to move the payload to the target location, $( x _ { d } , y _ { d } )$ as soon as possible. The short-term goal is to have zero sway at the destination, $\omega _ { p } = 0$ .
|
| 15 |
+
|
| 16 |
+
However, deep RL has not been applied to address industrial problems in a meaningful way. There are several key issues that limit the application of deep RL to real-world problems. Deep RL algorithms typically require many samples during training (sample complexity). Sample complexity leads to high computational costs. A high computational cost can be justified for industries as a onetime charge. However, oftentimes small changes in the system goal, such as changing the desired temperature in a chemical reactor, or a new constraint such as a maximum allowable temperature in the reactor, require retraining the model. Moreover, industrial systems often have several short-term and long-term objectives. For example, consider the crane system shown in Figure 1. The long-term goal is to convey the payload to the target location as soon as possible. However, when the payload gets close to the target, it must have minimum sway for the safety of the operators. Designing a reward function that can capture these short-term and long-term goals concurrently can be challenging or even infeasible.
|
| 17 |
+
|
| 18 |
+
A class of short-term objectives related to safe exploration during RL training have been studied recently. Gu et al. (2017) presented an application of deep RL for robotic manipulation control. To ensure safe exploration, they set maximum limits for the joint positions, and joint velocities. Moreover, they set a sphere boundary for the end-effector position and when the boundaries were about to be violated, they used correction velocity to force the end-effector position back to the center of the sphere. Dalal et al. (2018) formulated the safe exploration as an optimization problem. They proposed to add a safety layer that modifies the action at each time step. Toward this end, they learn the constraint function using a linear model and use this model to find the minimal change to the action such that the safety constraints are met at each time step. To the best of our knowledge, there is no study addressing short-term objectives during application.
|
| 19 |
+
|
| 20 |
+
In this paper, we present a Locally Linear Q-Learning (LLQL) algorithm for continuous action space. The LLQL includes a short-term prediction model, a long-term prediction model, and a controller. The short-term prediction model represents a locally linear model of the dynamic system, while the long-term prediction model represents the value function $^ +$ a locally linear advantage function. The controller uses the short-term prediction model and the long-term prediction model to generate actions that achieve short-term and long-term goals simultaneously. It adopts a policy that maximizes Q-value while achieving short-term goals. The LLQL algorithm has the following advantages:
|
| 21 |
+
|
| 22 |
+
• It does not require designing sensitive reward functions for achieving short-term and longterm goals concurrently.
|
| 23 |
+
• It shows better performance in achieving short-term and long-term goals compared to the traditional reward modification methods.
|
| 24 |
+
• It is possible to modify the short-term goals without time-consuming retraining.
|
| 25 |
+
|
| 26 |
+
The remainder of this paper is organized as follows. Section 2 represents the background in dynamic systems and RL. Section 3 represents the LLQL algorithm. Section 4 presents our methodology to achieve short-term and long-term goals using LLQL. Section 5 presents our experimental results. Section 6 presents the conclusions of the paper. Section A discusses the related work. Section B presents additional experiments for those interested.
|
| 27 |
+
|
| 28 |
+
# 2 BACKGROUND AND DEFINITIONS
|
| 29 |
+
|
| 30 |
+
In this section, we review the backgrounds in dynamic systems and reinforcement learning.
|
| 31 |
+
|
| 32 |
+
# 2.1 DYNAMIC SYSTEMS
|
| 33 |
+
|
| 34 |
+
A continuous-time dynamic system can be represented as:
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\frac { d x ( t ) } { d t } = f ( x ( t ) , u ( t ) , t ; p ) ,
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where given the system parameters, $p , f$ maps the state variables, $x \in X$ , and actions, $u \in U$ , to the state derivative, $\frac { d \bar { x } } { d t }$ at time $t$ . In state space control, the goal is to design a control policy, $\pi _ { c o n t r o l } ( u ( t ) | x ( t ) )$ , that generates proper actions so as the state variables follow the given desired trajectory, $x _ { d } ( t )$ . It is challenging to design a control policy for a nonlinear complex system represented in equation (1).
|
| 41 |
+
|
| 42 |
+
The control problem becomes much easier to address when this system is linear with respect to the input (Chen et al., 2003). We can present these systems as:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\frac { d x ( t ) } { d t } = f ( x ( t ) ) + g ( x ( t ) ) u ( t ) .
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
Since measurements are typically sampled in discrete times, we derive a discrete time version of linear system (2). Using a first-order approximation:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\frac { d x ( t _ { k } ) } { d t } = \frac { x ( t _ { k + 1 } ) - x ( t _ { k } ) } { t _ { k + 1 } - t _ { k } } ,
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $t _ { k }$ represents time at sample point $k$ . In this paper, we assume the sampling rate is constant; $\Delta = t _ { k + 1 } - t _ { k }$ . Using (2) and (3), we have:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
x ( t _ { k + 1 } ) - x ( t _ { k } ) = \Delta ( f ( x ( t _ { k } ) ) + g ( x ( t _ { k } ) ) u ( t _ { k } ) ) .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
For brevity, we present $t _ { k }$ by $k$ , $f ( x ( t _ { k } ) )$ by $f ( x _ { k } )$ , and $g ( x ( t _ { k } ) )$ by $g ( x _ { k } )$ in the remainder of the paper. Therefore, we can represent a dynamic system as:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
x _ { k + 1 } = x _ { k } + \Delta ( f ( x _ { k } ) + g ( x _ { k } ) u _ { k } ) .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
# 2.2 REINFORCEMENT LEARNING
|
| 67 |
+
|
| 68 |
+
The goal of RL is to learn a policy, $\pi _ { R L } ( u _ { k } | x _ { k } )$ , that generates a set of actions, $u \in U$ , that maximize the expected sum of rewards in the environment, $E _ { n }$ . Consider:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
R _ { k } = \sum _ { i = k } ^ { T } \gamma ^ { i - k } r ( x _ { i } , u _ { i } ) ,
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\gamma < 1$ is the discount factor, $r$ is the reward function and $T$ represents the end time and can be set to $T = \infty$ . The goal is to learn $\pi _ { R L }$ for environment, $E _ { n }$ , such that:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\operatorname* { m a x } ( R = \mathbb { E } _ { r _ { i \ge 1 } , x _ { i \ge 1 } \sim E _ { n } , u _ { i \ge 1 } \sim \pi _ { R L } } [ R _ { 1 } ] ) .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Unlike control algorithms, model-free reinforcement learning algorithms assume the system dynamic is unknown. Q-function, $Q ^ { \pi } ( x _ { k } , u _ { k } )$ is defined as the expected return at state $x _ { k }$ when we take action $u _ { k }$ and adopt policy $\pi$ afterward:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
Q ^ { \pi } ( x _ { k } , u _ { k } ) = \mathbb { E } _ { r _ { i \geq k } , x _ { i \geq k } \sim E _ { n } , u _ { i \geq k } \sim \pi } [ R _ { k } | x _ { k } , u _ { k } ] ) .
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Q-learning algorithms (Watkins & Dayan, 1992) are among the most common model-free RL methods for discrete action space problems. These algorithms use the Bellman recursive equation to model Q-function:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array} { r l } & { Q ^ { \mu } ( x _ { k } , u _ { k } ) = } \\ & { \mathbb { E } _ { r _ { i \geq k } , x _ { i > k } \sim E _ { n } } [ r ( x _ { k } , u _ { k } ) + \gamma Q ^ { \mu } ( x _ { k + 1 } , \mu ( x _ { k + 1 } ) ) ] ) , } \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\mu$ represents a greedy deterministic policy that selects the action which maximizes $\mathrm { Q }$ -value at each step:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mu ( x _ { k } ) = \operatorname { a r g m a x } _ { u } Q ( x _ { k } , u _ { k } ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Q-learning algorithms learn the parameters of the function approximator, $\theta ^ { Q }$ , by minimizing the Bellman error:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array} { r l } & { \operatorname* { m i n } ( L ( \theta ^ { Q } ) = \mathbb { E } _ { r _ { k } , x _ { k } \sim E _ { n } , u _ { k } \sim \beta } [ ( Q ( x _ { k } , u _ { k } | \theta ^ { Q } ) - y _ { k } ) ^ { 2 } ] ) , } \\ & { y _ { k } = r ( x _ { k } , u _ { k } ) + \gamma Q ( x _ { k + 1 } , \mu ( x _ { k + 1 } ) ) , } \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $y _ { k }$ is the fixed target Q-function, and $\beta$ represents the exploration policy.
|
| 105 |
+
|
| 106 |
+
For continuous action domain problems, it is not trivial to solve equation (10) at each time step. Finding an action to maximize $Q$ which can be a complex nonlinear function is computationally expensive or even infeasible. To address this problem, Lillicrap et al. (2015) proposed the Deep Deterministic Policy Gradient (DDPG) algorithm, which learns two networks simultaneously. The critic network learns Q-function by minimizing the Bellman error, and the actor network learns parameters of the policy to maximize the estimated value of Q-function. Gu et al. (2016) proposed
|
| 107 |
+
|
| 108 |
+
Normalized Advantage Function (NAF) Q-learning which formulates the Q-function as the sum of the value function, $V ( x )$ , and the advantage function, $A ( x , u )$ .
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
Q ( x , u | \theta ^ { Q } ) = V ( x | \theta ^ { V } ) + A ( x , u | \theta ^ { A } ) ,
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
A ( x , u | \theta ^ { A } ) = - \frac { 1 } { 2 } ( u - \mu ( x | \theta ^ { u } ) ) ^ { T } P ( x | \theta ^ { P } ) ( u - \mu ( x | \theta ^ { u } ) ) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
$P ( x | \theta ^ { P } ) = L ( x | \theta ^ { P } ) L ( x | \theta ^ { P } ) ^ { T }$ , where $L ( x | \theta ^ { P } )$ is a lower-triangular matrix. The value function is not a function of action, $u$ . Therefore, the action which maximizes advantage function, $A$ , maximizes the $Q$ function. $P ( x | \theta ^ { P } )$ is a positive-definite matrix, and therefore, the action that maximizes the advantage function and the $Q$ -function is given by $\mu ( x | \theta ^ { u } )$ .
|
| 121 |
+
|
| 122 |
+
# 3 LOCALLY LINEAR Q-LEARNING
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 2: Learning the LLQL Network Parameters.
|
| 126 |
+
|
| 127 |
+
In this section, we propose the LLQL algorithm, which like (Lillicrap et al., 2015) and (Gu et al., 2016) can handle continuous action space. Our approach learns short-term and long-term prediction models. Using the long-term and short-term models, a controller generates actions that guide the system toward its short-term and long-term goals. Figure 2 shows our proposed structure to learn the parameters of the short-term and long-term prediction models.
|
| 128 |
+
|
| 129 |
+
Short-term prediction: consider the nonlinear system presented in equation (5). In this work, we use deep neural networks to estimate system functions, $f ( x _ { k } )$ , and $g ( x _ { k } )$ at each operating point. Substituting the network estimations for these functions in equation (5), we can predict the next state as:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\hat { x } _ { k + 1 } = x _ { k } + \Delta ( f ( x _ { k } | \theta ^ { f } ) + g ( x _ { k } | \theta ^ { g } ) u _ { k } ) ,
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
where $\hat { x } _ { k + 1 }$ represents our estimation of the next step, and $\theta ^ { f }$ and $\theta ^ { g }$ are the network parameters. $\Delta$ is a constant hyper parameter. In dynamic systems, the difference between two consecutive states, $x _ { k + 1 } - x _ { k }$ , is typically very small. Considering a small $\Delta$ leads to reasonable $f$ and $g$ values and, therefore, improves learning time and accuracy.
|
| 136 |
+
|
| 137 |
+
We call this dynamic system model short-term prediction model. The controller uses this model to generate actions, which lead the system toward its short-term goals. Note that previous work have used the system short-term dynamic model for generating additional samples in imagination rollout (for example, see (Gu et al., 2016), and (Racaniere et al., 2017)). In this paper, we show that this \` model can also be used to design actions to achieve short-term goals. To learn the parameters of our short-term prediction model, $\theta ^ { f }$ and $\theta ^ { g }$ , we minimize the short-term loss function, $L _ { 1 }$ , as it is presented in Algorithm 1.
|
| 138 |
+
|
| 139 |
+
Long-term prediction: Q-function represents the maximum cumulative reward that can be achieved from current state, $x _ { k }$ , taking an action $u _ { k }$ . Therefore, by learning Q-function, we learn the longterm prediction model for the system. Like NAF (Gu et al., 2016) (see equation (12)), we present
|
| 140 |
+
|
| 141 |
+
Q-function as a sum of value function and advantage function. However, we present the advantage function, $A ( x , u | \theta ^ { A } )$ using a locally linear function of $x _ { k }$ and $u _ { k }$ as:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\begin{array} { r } { Q ( x , u \vert \theta ^ { Q } ) = V ( x \vert \theta ^ { V } ) + A ( x , u \vert \theta ^ { A } ) , } \\ { A ( x , u \vert \theta ^ { A } ) = - \vert \vert ( h ( x _ { k } \vert \theta ^ { h } ) + d ( x _ { k } \vert \theta ^ { d } ) u _ { k } ) \vert \vert , } \end{array}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where $h ( x _ { k } | \theta ^ { h } )$ and $d ( x _ { k } | \theta ^ { d } )$ networks model the locally linear advantage function. Note the NAF advantage function is a special case of the LLQL advantage function when $d ( x _ { k } | \theta ^ { d } ) = I$ , where $I$ represents the identity matrix.
|
| 148 |
+
|
| 149 |
+
To maximize Q-function, we have to design $u _ { k }$ which minimizes $h ( x _ { k } | \theta ^ { h } ) + d ( x _ { k } | \theta ^ { d } ) u _ { k }$ . For simplicity, we present $h ( x _ { k } | \theta ^ { h } )$ , and $d ( x _ { k } | \bar { \theta } ^ { d } )$ with $h _ { k }$ and $d _ { k }$ respectively in the remainder of the paper. To maximize Q-function and achieve the long-term goal, we can use simple pseudo-inverse matrix multiplication and derive a solution with the least squares error as:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
u _ { k } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T } h _ { k } .
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
When $| | d _ { k } | | = 0$ , it means the network predicts that our action has no impact on the advantage function. Therefore, we choose a random action. Random exploration is an important part of any deep RL algorithm. Therefore, in addition to this unlikely case, we add noise, $\mathcal { N } _ { k }$ , to the action, $u _ { k }$ , during the training. We reduce the amount of noise injected to the action as the algorithm converges.
|
| 156 |
+
|
| 157 |
+
# Algorithm 1 Locally Linear Q-Learning Training
|
| 158 |
+
|
| 159 |
+
1: Initialize Q network (equation (15)) with random weights.
|
| 160 |
+
2: Initialize target network, $Q ^ { ' }$ , parameters: ${ \theta ^ { Q } } ^ { ' } = \theta ^ { Q }$ .
|
| 161 |
+
3: Create the reply buffer $R = \emptyset$ .
|
| 162 |
+
4: for episode $= 1 { : } \mathbf { M }$ do
|
| 163 |
+
5: Initialize a random process $\mathcal { N }$ for action exploration.
|
| 164 |
+
6: Receive the initial observation, $x _ { 0 }$ .
|
| 165 |
+
7: for $\mathrm { k } = 1 { : } \mathrm { T }$ do
|
| 166 |
+
8: if $| | d _ { k } | | \neq 0$ then
|
| 167 |
+
9: Set $\ddot { u } _ { k } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } ( d _ { k } ^ { T } ) h _ { k } + \mathcal { N } _ { k }$
|
| 168 |
+
10: else
|
| 169 |
+
Set $u _ { k } = \mathcal { N } _ { k }$
|
| 170 |
+
11: Execute $u _ { k }$ and observe $x _ { k + 1 }$ and $r _ { k }$ .
|
| 171 |
+
12: Store transition $\left( { { x } _ { k } } , { { u } _ { k } } , { { x } _ { k + 1 } } , { { r } _ { k } } \right)$ in $R$ .
|
| 172 |
+
13: for iteration $= 1 { : } I _ { s }$ do
|
| 173 |
+
14: Randomly select a mini-batch of $N _ { s }$ transition from $R$ .
|
| 174 |
+
15: Update $\theta ^ { f }$ and $\theta ^ { g }$ by minimizing the loss: $\begin{array} { r } { \begin{array} { r c l } { L _ { 1 } } & { = } & { \frac { 1 } { N _ { s } } \sum _ { i = 1 } ^ { N _ { s } } | | x _ { i + 1 } - x _ { i } - \Delta ( f ( x _ { i } | \theta ^ { f } ) \ + } \end{array} } \end{array}$
|
| 175 |
+
$g ( x _ { i } | \theta ^ { g } ) u _ { i } ) | |$ .
|
| 176 |
+
16: for iteration $= 1 { : } I _ { l }$ do
|
| 177 |
+
17: Randomly select a mini-batch of $N _ { l }$ transition from $R$ .
|
| 178 |
+
18: Set $y _ { i } = r _ { i } + \gamma Q ^ { ' } ( x _ { i + 1 } | \theta ^ { Q ^ { ' } } )$ .
|
| 179 |
+
19: Update $\theta ^ { Q }$ by minimizing the loss: $\begin{array} { r } { L _ { 2 } = \frac { 1 } { N _ { l } } \sum _ { i = 1 } ^ { N _ { l } } | | y _ { i } - Q ( x _ { i } , u _ { i } | \theta ^ { Q } ) | | . } \end{array}$
|
| 180 |
+
20: Update the target network: ${ \theta ^ { Q } } ^ { \prime } = \tau \theta ^ { Q } + ( 1 - \tau ) { \theta ^ { Q } } ^ { \prime }$
|
| 181 |
+
|
| 182 |
+
In the application, the controller solves $u _ { k }$ with additional constraints to achieve the desired shortterm trajectories. We will discuss our short-term adjustment algorithms in the next section. To learn Q-function, in addition to the state estimation error, we minimize the long-term loss function, $L _ { 2 }$ , as it is presented in Algorithm 1. Note that having the short-term model, it is straightforward to add imagination rollout to our algorithm to increase sample efficiency. However, improving sample efficiency in RL is not the focus of this work.
|
| 183 |
+
|
| 184 |
+
# 4 CONTROL STRATEGY
|
| 185 |
+
|
| 186 |
+
By separating action design from prediction models, LLQL gives us the freedom to design different control strategies for achieving short-term and long-term goals. Moreover, the linear structure of short-term and long-term models simplifies the control design. Consider the case where LLQL has learned a perfect long-term model for an environment using Algorithm 1. In this case, the optimum solution to achieve the long-term goal is given by equation (16). When we have one or more shortterm goals as well, we can formulate the control design as an optimization problem to satisfy both short-term and long-term goals as much as possible.
|
| 187 |
+
|
| 188 |
+
In this paper, we consider two types of short-term goals: 1) desired trajectory, and 2) constraint. In the first scenario, the agent has a short-term desired trajectory. For example, a car may be required to travel with specific speed during certain periods. In the second scenario, the agent has some limitation for a specific period of time. For example, a car is required to keep its speed below certain thresholds at some periods during the trip. To address the first problem, we add an additional term to the cost function for the short-term goal and solve for the action. We deal with the second problem as a constraint optimization.
|
| 189 |
+
|
| 190 |
+
# 4.1 SHORT-TERM TRAJECTORY
|
| 191 |
+
|
| 192 |
+
Let $x _ { d }$ represent our desired short-term trajectory. We develop a control strategy to track $x _ { d }$ while pursuing the long-term goals.
|
| 193 |
+
|
| 194 |
+
Using system dynamic functions $f _ { k }$ and $g _ { k }$ , we can define our control optimization problem as:
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
\operatorname* { m i n } _ { \mathrm { f i n d } ~ u _ { k } } ( \gamma _ { 1 } ( h _ { k } + d _ { k } u _ { k } ) ^ { 2 } + \gamma _ { 2 } ( x _ { d ( k + 1 ) } - x _ { k } - \Delta ( f _ { k } + g _ { k } u _ { k } ) ) ^ { 2 } ) ,
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
where $x _ { d ( k + 1 ) }$ represents the desired trajectory at time $k + 1$ . $\gamma _ { 1 }$ and $\gamma _ { 2 }$ are positive coefficients and can be adjusted to give higher weights to the short-term or long-term goals. Note that in this work, we assume the short-term goals are temporary and when their time expires the system goes to the long-term optimum policy given by (16). For example, we may require a car to have a specific speed at some specific locations.
|
| 201 |
+
|
| 202 |
+
We can apply a similar pseudo-inverse matrix multiplication, and derive a solution with the least squares error for (17) as:
|
| 203 |
+
|
| 204 |
+
$$
|
| 205 |
+
u _ { k } ^ { * } = \big ( \frac { \gamma _ { 1 } d _ { k } } { - \gamma _ { 2 } \Delta g _ { k } } \bigg ) ^ { T } \left[ \frac { \gamma _ { 1 } d _ { k } } { - \gamma _ { 2 } \Delta g _ { k } } \right] \big ) ^ { - 1 } \left[ \frac { \gamma _ { 1 } d _ { k } } - \gamma _ { 2 } \Delta g _ { k } \right] ^ { T } \left[ \gamma _ { 2 } \big ( - x _ { d ( k + 1 ) } + x _ { k } + \Delta f _ { k } \big ) \right] .
|
| 206 |
+
$$
|
| 207 |
+
|
| 208 |
+
# 4.2 SHORT-TERM CONSTRAINT
|
| 209 |
+
|
| 210 |
+
The LLQL algorithm provides a framework to design the actions considering different constraints. For safe operation, the agent may have to avoid specific states for a period of time (for example, high speed or locations close to an obstacle). For simplicity, we assume at each moment we only have maximum one constraint on one state variable, $x ^ { i }$ . This is a reasonable assumption, because in physical systems the agent is close to one of the boundaries at any moment in time. When this is not the case, we can define new constraints as a combination of constraints. Consider $c _ { k } ^ { i }$ as the constraint on the state variable, $x ^ { i }$ , at time $k$ . We can define the constraint optimization problem for LLQL as:
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\operatorname* { m i n } _ { \mathrm { f i n d } u _ { k } } \frac { 1 } { 2 } ( h _ { k } + d _ { k } u _ { k } ) ^ { 2 }
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
such that:
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
x _ { k + 1 } ^ { i } \leq c _ { k + 1 } ^ { i } .
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
$\textstyle { \frac { 1 } { 2 } }$ is a coefficient added to simplify the mathematical operation. Using our estimation of the next step, $x _ { k + 1 } ^ { i } = x _ { k } ^ { i } + \Delta ( f _ { k } ^ { i } + g _ { k } ^ { i } u _ { k } )$ , we can derive the optimum action which satisfies the constraint as:
|
| 223 |
+
|
| 224 |
+
$$
|
| 225 |
+
\begin{array} { r } { u _ { k } ^ { * } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T } ( h _ { k } + \lambda ^ { * } \alpha _ { 1 } ) , } \end{array}
|
| 226 |
+
$$
|
| 227 |
+
|
| 228 |
+
where $\alpha _ { 1 } = \Delta g _ { k } ^ { i } d _ { k } ^ { T } ( d _ { k } d _ { k } ^ { T } ) ^ { - 1 }$ , $\alpha _ { 2 } = \Delta g _ { k } ^ { i } ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T }$ , and $\begin{array} { r } { \lambda ^ { * } = \frac { x _ { k } ^ { i } + \Delta f _ { k } ^ { i } - c _ { k + 1 } - \alpha _ { 2 } h _ { k } } { \alpha _ { 1 } \alpha _ { 2 } } } \end{array}$ . The derivation details for short-term constraints are presented in Section C.
|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
|
| 232 |
+
(a) Average and standard deviation of cumulative rewards during the learning process. LLQL and DDPG algorithms converge in less than 40 episodes. Modelbased reinforcement learning algorithm (MPC) cannot learn a policy that guides the car to the top.
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
|
| 236 |
+
(b) State variables and estimated state variables. Using LLQL model, the car reached the top in 78 steps. Using DDPG model, the car reached the top in 110 steps. The car never reached the top when we used the MPC model. The mean absolute error for LLQL position estimation is 0.00078, the mean absolute error for LLQL velocity estimation is 0.000084, the mean absolute error for MPC position estimation is 0.00039 and the mean absolute error for MPC velocity estimation is 0.00014.
|
| 237 |
+
|
| 238 |
+
Figure 3: LLQL for MountainCarContinuous. The network’s parameters are presented in Section D.
|
| 239 |
+
|
| 240 |
+
# 5 EXPERIMENTAL RESULTS
|
| 241 |
+
|
| 242 |
+
In this section, we demonstrate the performance of LLQL using Mountain Car with Continuous Action (MountainCarContinuous) from OpenAI $\mathrm { G y m } ^ { 1 }$ . In Section B, we apply LLQL to control the crane system shown in Figure 1.
|
| 243 |
+
|
| 244 |
+
# 5.1 MOUNTAINCARCONTINUOUS
|
| 245 |
+
|
| 246 |
+
The MountainCarContinuous has two state variables: 1) car’s position $- 1 . 2 \leq x _ { k } \leq 0 . 5$ and 2) car’s velocity $- 0 . 0 7 \leq v _ { k } \leq 0 . 0 7$ . $u _ { k }$ is the continuous action at time $k$ . A negative action pushes the car to the left and a positive action pushes the car to the right. The experience stops after $1 , 0 0 0$ steps or when the car reaches the goal on top of the mountain, $x _ { k } = 0 . 5$ , whichever occurs first. In the beginning of each episode, the car is randomly positioned at $- 0 . 6 \leq x _ { 0 } \leq - 0 . 4$ . The reward for each episode is 100 for reaching the goal on top of the mountain minus the squared sum of actions from start to the goal. Figure 3a shows the cumulative rewards during the training for the LLQL, the DDPG, and a model-based reinforcement learning based on MPC presented by (Nagabandi et al., 2018). The details of the MPC based solution is presented in Section E. For each approach we performed the training 20 times, and selected the top 5 models with the maximum cumulative rewards to calculate mean and standard deviation of each episode in Figure 3a.
|
| 247 |
+
|
| 248 |
+
The MPC based solution uses the learned short-term predictive model (system dynamic model) to generate a sequence of actions that maximize the reward over a finite horizon. Figure 3b shows that the short-term predictive model estimates future states with high precision. However, optimizing for a finite horizon is a disadvantage for the model-based solution in achieving long-term goals. Increasing the horizon may improve the long-term performance, but it also increases the computational costs in the application phase. In our experiments, the car never reached the top of the mountain using the model-based method. Figure 3b presents the first 110 steps of a sample experiment. Unlike the MPC based solution, the LLQL and the DDPG algorithms converged in less than 40 episodes (see Figure 3a) and reach the top of the mountain in all experiments (see Figure 3b). Note that it is possible to improve the LLQL convergence time by applying imagination rollout. In fact, our short-term prediction model can be used to generate imaginary scenarios. However, sample efficiency is beyond the focus of this work. Figure 3 shows by applying the long-term predictive model, the LLQL algorithm outperforms the model-based reinforcement algorithm in achieving the long-term goals. In the next two subsections, we will show the LLQL algorithm can outperform the DDPG algorithm in achieving the short-term goals by using the short-term predictive model.
|
| 249 |
+
|
| 250 |
+

|
| 251 |
+
Figure 4: MountainCarContinuous with short-term and long-term goals. $\gamma _ { 1 } = 1$ , $\gamma _ { 2 } = 2 0 0 0$
|
| 252 |
+
|
| 253 |
+
(a) With LLQL the car reached the top of the mountain (b) Comparing the actions in normal case versus in 82 steps with a short-term goal error of 0.00008. With with the short-term trajectory. The hybrid stratDDPG $^ +$ modified reward ( $3 ^ { r { \bar { d } } }$ reward in Table 1) the car egy (see equation (21)) leads to quick adjustment in reached the top in 138 steps with short-term goal error LLQL action and therefore, smaller short-term goal 0.0023. The MPC $^ +$ modified reward cannot guide the error compared to the DDPG $^ +$ reward modification car to the top. solution.
|
| 254 |
+
|
| 255 |
+
# 5.2 SHORT-TERM TRAJECTORY
|
| 256 |
+
|
| 257 |
+
Figure 3b shows that the policy presented in equation (16) can lead the car to the top of the mountain using the LLQL algorithm. We can see that the car’s velocity is above 0.025 (the red line) when it reaches the top. Now consider the case where we want the car to reach the top of the mountain with our desired velocity, $v _ { d } = 0 . 0 2 5$ . Using equation (18), we can design a control strategy to reach this goal without requiring retraining the LLQL model. We apply the following hybrid control strategy to reach the top of the mountain with our desired speed.
|
| 258 |
+
|
| 259 |
+
$$
|
| 260 |
+
u _ { k } = { \left\{ \begin{array} { l l } { { \mathrm { u s e ~ e q u a t i o n ~ } } ( 1 6 ) } & { { \mathrm { i f ~ } } x _ { k } < 0 } \\ { { \mathrm { u s e ~ e q u a t i o n ~ } } ( 1 8 ) , } & { { \mathrm { o t h e r w i s e . } } } \end{array} \right. }
|
| 261 |
+
$$
|
| 262 |
+
|
| 263 |
+
Figure 4a shows that the car can reach the top of the mountain with our desired velocity. When we did not impose our desired speed to the system, the car reached the top of the mountain in 78 steps (see Figure 3b). Demanding a lower speed, slowed down the car and increased the number of steps to 82 (see Figure 4a). Figure 4b shows the actions with and without the short-term trajectory. We can see that the action temporarily becomes negative to reduce the velocity to the desired level and then goes back to positive to push the car to the top of the mountain.
|
| 264 |
+
|
| 265 |
+
To solve this problem in the traditional way, we had to modify the reward function to achieve both short-term and long-term goals. For comparison, we perform the following experience. We apply DDPG networks and MPC based networks with the modified reward functions shown in Table 1 to solve the MountainCarContinuous with the short-term and long-term goal problem. To achieve the short-term trajectory, we have considered different functions of the absolute error between the car’s velocity and the desired velocity, $\lvert v _ { d } - v _ { k } \rvert$ in the final stages as an additional penalty. We have tried various architectures and hyper parameters to design the DDPG network. The final parameters are presented in Section D. We train a model for each modified reward function up to 300 episodes and save the model with maximum cumulative reward for our experiment. We run each model 10 times and measure the average number of steps it takes to reach the top of the mountain, and the average error between the car’s final speed and the desired speed, $v _ { d } = 0 . 0 2 5$ . Table 1 shows that the MPC based solution cannot guide the car to the top. The DDPG with all the modified reward functions can achieve the long-term goal in all the experiences, reaching the top of the mountain in 10 out of 10 experiments. However, the DDPG based solutions do not perform very well with regard to the shortterm goal. On the other hand, LLQL does not require additional training or reward modification, achieves the long-term goal and has the least velocity error, $0 . 4 \%$ .
|
| 266 |
+
|
| 267 |
+
# 5.3 SHORT-TERM CONSTRAINT
|
| 268 |
+
|
| 269 |
+
Now consider the case where it is unsafe to drive the car above a specific speed, for example, we plan to keep the speed under $v _ { k } \le 0 . 0 3 5$ . We can use the following hybrid control strategy to achieve the
|
| 270 |
+
|
| 271 |
+
Table 1: Short-term trajectory performance
|
| 272 |
+
|
| 273 |
+
<table><tr><td rowspan=1 colspan=1>RLMethod</td><td rowspan=1 colspan=3>Modified Reward function</td><td rowspan=1 colspan=1>Average velocityerror</td><td rowspan=1 colspan=1>Averagenumber ofsteps</td><td rowspan=1 colspan=1>Long-termgoalsuccess rate</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=3>rnew=rk-5000*Uk-Udif done</td><td rowspan=1 colspan=1>0.0232</td><td rowspan=1 colspan=1>109.1</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=1>Tnew=rk-100*</td><td rowspan=1 colspan=1>Uk-Ud</td><td rowspan=1 colspan=1>Uk-Udifxk>0.45</td><td rowspan=1 colspan=1>0.0193</td><td rowspan=1 colspan=1>183.6</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=3>Tnew =rk-100*Uk-Udif xk >0.45Tnew = rk -5000*lUk-Udlif done</td><td rowspan=1 colspan=1>0.0088</td><td rowspan=1 colspan=1>173.8</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=3>rnew=Tk-25000*(Uk-vd)² ifdone</td><td rowspan=1 colspan=1>0.0193</td><td rowspan=1 colspan=1>103.3</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=3>rnew=rk-5000*Uk-Udif done</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=1>rnew=Tk-100*</td><td rowspan=1 colspan=1>Uk-Ud</td><td rowspan=1 colspan=1>if xk>0.45</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=3>rnew=rk-100*Uk1Udlif xk >0.45rnew=rk15000*Uk1Udif done</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=3>Tnew=rk-25000*((Uk-Ud)2ifdone</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>LLQL</td><td rowspan=1 colspan=3>·</td><td rowspan=1 colspan=1>0.0001</td><td rowspan=1 colspan=1>89.5</td><td rowspan=1 colspan=1>10/10</td></tr></table>
|
| 274 |
+
|
| 275 |
+

|
| 276 |
+
(a) With LLQL the car reached the top in 105 steps without (b) Comparing the actions in the normal case verviolating the constraints. With DDPG $^ +$ modified reward sus with the short-term constraint. The hybrid $3 ^ { r d }$ reward in Table 2) the car reached the top in 199 steps strategy (see equation (22)) leads to sharp adjustand violated the constraints 13 timesteps. The MPC $^ +$ mod- ment in LLQL action when the car gets close to ified reward cannot guide the car to the top. the hazardous areas.
|
| 277 |
+
|
| 278 |
+
Figure 5: State variables for MountainCarContinuous with long-term goal and short-term constraint. The horizontal red lines, $| v _ { k } | = 0 . 0 3 5$ , represent the boundaries. The car reaches the goal in 97 steps.
|
| 279 |
+
|
| 280 |
+
long-term goal while keeping the speed safe:
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
u _ { k } = \left\{ \begin{array} { l l } { \mathrm { u s e ~ e q u a t i o n ~ ( 1 6 ) ~ } } & { \mathrm { i f ~ } | v _ { k } | \leq 0 . 0 3 3 } \\ { \mathrm { u s e ~ e q u a t i o n ~ ( 2 0 ) , } } & { \mathrm { o t h e r w i s e . } } \end{array} \right.
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
We selected the boundary slightly less than the hazardous threshold (0.033 instead of 0.035) to be safe. Figure 5a shows that with the LLQL policy the car reaches its goal while staying outside of hazardous areas. The MPC based solution keeps the car outside of hazardous areas but cannot deliver the long-term goal (reaching the top of the mountain). The $\mathrm { D D P G } +$ modified reward reaches the top but fails to deliver the short-term goal (keeping the car out of hazardous areas). Like the previous section, we apply DDPG network $^ +$ modified reward function and $ { \mathrm { { M P C } } } +$ modified reward function to compare LLQL with the traditional model-free and model-based reward engineering approaches. We select the model with maximum cumulative rewards during 300 episodes of training. Table 2 shows that unlike LLQL, the modified rewards fail to keep the car below the allowed speed while reaching the top of the mountain. The model-based reinforcement learning algorithm baseline presented in Section E uses the same short-term network as the LLQL network. Table 1 and Table 2 show that even though the short-term part of our solution is useful in achieving short-term goals, it is not enough to solve the entire problem and achieve the long-term goal.
|
| 287 |
+
|
| 288 |
+
Table 2: Short-term constraint performance
|
| 289 |
+
|
| 290 |
+
<table><tr><td rowspan=1 colspan=1>RLMethod</td><td rowspan=1 colspan=2>Modified Reward function</td><td rowspan=1 colspan=1>Averagenumber ofsteps out ofboundary</td><td rowspan=1 colspan=1>Averagenumber ofsteps</td><td rowspan=1 colspan=1>Long-termgoalsuccess rate</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=2>Tnew=rk110if|Uk>0.033</td><td rowspan=1 colspan=1>21.5</td><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=2>rnew=rk1100(Uk10.033)ifuk>0.033</td><td rowspan=1 colspan=1>25.2</td><td rowspan=1 colspan=1>106.8</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=2>rnew=rk-(100(lUkl10.033))ifu> 0.033</td><td rowspan=1 colspan=1>20.4</td><td rowspan=1 colspan=1>147.5</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=2>Tnew=-10if|Uk>0.033</td><td rowspan=1 colspan=1>25.1</td><td rowspan=1 colspan=1>104.1</td><td rowspan=1 colspan=1>10/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=2>Tnew=rk-10ifUk>0.033</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=1>Tnew = rk -100(luk</td><td rowspan=1 colspan=1>10.033)ifuk>0.033</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=1>Tnew=rk-(</td><td rowspan=1 colspan=1>(100(luk|-0.033))² if|uk|>0.033</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>MPC</td><td rowspan=1 colspan=2>rnew=-10ifU>0.033</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>0/10</td></tr><tr><td rowspan=1 colspan=1>LLQL</td><td rowspan=1 colspan=2>·</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>98.9</td><td rowspan=1 colspan=1>10/10</td></tr></table>
|
| 291 |
+
|
| 292 |
+
(a) Number of steps to the top vs desired final velocity. $\gamma _ { 1 } = 1$ , $\gamma _ { 2 } = 2 0 0 0$ .
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 6: Long-term performance vs short-term goals. We run the model with each short-term goal 10 times and present the average and standard deviation of the long-term goal.
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
(b) Number of steps to the top vs velocity constraint.
|
| 299 |
+
|
| 300 |
+
# 5.4 EFFECT OF SHORT-TERM GOALS ON LONG-TERM PERFORMANCE
|
| 301 |
+
|
| 302 |
+
Using equations (18) or (20) for deriving a set of actions is equivalent to solving a sub-optimum solution for the long-term goal in order to satisfy the short-term desired trajectories or constraints. When the short-term goals are far from the global optimum solution, the long-term performance degrades. Figure 6a shows that lower desired velocities lead to longer traveling time for the MountainCar. Similarly, Figure 6b shows that further limiting the maximum velocity degrades the long-term performance.
|
| 303 |
+
|
| 304 |
+
# 6 CONCLUSIONS
|
| 305 |
+
|
| 306 |
+
In this work, we presented LLQL as a new model-based RL algorithm with the capability of achieving both short-term and long-term goals without requiring complex reward functions. By presenting the advantage function with a locally linear model and separating designing actions from the learning process, our method is capable of adopting control strategies to achieve different short-term goals without retraining the model. This can be very significant for industrial applications where the RL algorithms have not been used due to the necessity of different short-term adjustments.
|
| 307 |
+
|
| 308 |
+
The LLQL algorithm deviates from the optimal policy temporarily to address local short-term goals (trajectories or constraints). The agent would return to the optimum policy if the deviation is small enough that the agent is still in the environment explored during the training. In the future work, we will investigate conditions where short-term goals are feasible and develop a more analytical approach to set the meta parameters for the controller to guarantee short-term and long-term goals. Moreover, we will model uncertainties in short-term prediction model and apply robust control theory to design robust control solutions.
|
| 309 |
+
|
| 310 |
+
# REFERENCES
|
| 311 |
+
|
| 312 |
+
Giorgio Bartolini, Alessandro Pisano, and Elio Usai. Second-order sliding-mode control of container cranes. Automatica, 38(10):1783–1790, 2002.
|
| 313 |
+
|
| 314 |
+
F Boustany and Brigitte d’Andrea Novel. Adaptive control of an overhead crane using dynamic feedback linearization and estimation design. In Proceedings 1992 IEEE International Conference on Robotics and Automation, pp. 1963–1968. IEEE, 1992.
|
| 315 |
+
|
| 316 |
+
Jacob Buckman, Danijar Hafner, George Tucker, Eugene Brevdo, and Honglak Lee. Sampleefficient reinforcement learning with stochastic ensemble value expansion. In Advances in Neural Information Processing Systems, pp. 8224–8234, 2018.
|
| 317 |
+
|
| 318 |
+
Wen-Hua Chen, Donald J Ballance, and Peter J Gawthrop. Optimal control of nonlinear systems: a predictive control approach. Automatica, 39(4):633–641, 2003.
|
| 319 |
+
|
| 320 |
+
Gal Dalal, Krishnamurthy Dvijotham, Matej Vecerik, Todd Hester, Cosmin Paduraru, and Yuval Tassa. Safe exploration in continuous action spaces. arXiv preprint arXiv:1801.08757, 2018.
|
| 321 |
+
|
| 322 |
+
Vladimir Feinberg, Alvin Wan, Ion Stoica, Michael I Jordan, Joseph E Gonzalez, and Sergey Levine. Model-based value expansion for efficient model-free reinforcement learning. arXiv preprint arXiv:1803.00101, 2018.
|
| 323 |
+
|
| 324 |
+
Carlos E Garcia, David M Prett, and Manfred Morari. Model predictive control: theory and practice– a survey. Automatica, 25(3):335–348, 1989.
|
| 325 |
+
|
| 326 |
+
Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pp. 2829– 2838, 2016.
|
| 327 |
+
|
| 328 |
+
Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In 2017 IEEE international conference on robotics and automation (ICRA), pp. 3389–3396. IEEE, 2017.
|
| 329 |
+
|
| 330 |
+
David Ha and Jurgen Schmidhuber. World models. ¨ arXiv preprint arXiv:1803.10122, 2018.
|
| 331 |
+
|
| 332 |
+
Harold W Kuhn and Albert W Tucker. Nonlinear programming. In Traces and emergence of nonlinear programming, pp. 247–258. Springer, 2014.
|
| 333 |
+
|
| 334 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 335 |
+
|
| 336 |
+
Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 7559–7566. IEEE, 2018.
|
| 337 |
+
|
| 338 |
+
Sebastien Racani ´ ere, Th \` eophane Weber, David Reichert, Lars Buesing, Arthur Guez, ´ Danilo Jimenez Rezende, Adria Puigdomenech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, et al. Imagination-augmented agents for deep reinforcement learning. In Advances in neural information processing systems, pp. 5690–5701, 2017.
|
| 339 |
+
|
| 340 |
+
David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. arXiv preprint arXiv:1712.01815, 2017.
|
| 341 |
+
|
| 342 |
+
Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992.
|
| 343 |
+
|
| 344 |
+
# A RELATED WORK
|
| 345 |
+
|
| 346 |
+
Our work can be categorized as a new model-based RL approach. Model-based RL algorithms use the environment model which represents the state transition function to plan ahead and select actions that lead to higher rewards. Several model-based algorithms assume the environment model is known. Among them, AlphaZero (Silver et al., 2017) is one of the most famous. AlphaZero uses the game’s rules (Chess, Shogi and Go) as the environment model to generate a series of selfplay simulated games. During the simulations, the actions for both players are selected using a Monte-Carlo Tree Search (MCTS) algorithm. The MCTS performs as a planning algorithm by generating candidate actions which are superior to the current policy. The neural network parameters are updated at the end of each game to minimize the game prediction error (loss, draw or win) and maximize the similarity of policy vector to the planning algorithm. AlphaZero is limited to the discrete action space problems. The environment model is typically unknown in real-world applications. Therefore, many model-based RL algorithms learn the state transition model from the data. NAF (Gu et al., 2016) learns a linear model for state transition at each operating point and uses this model to generate additional samples through imagination rollout. World Models (Ha & Schmidhuber, 2018) uses a Variational Auto Encoder (VAE) to map a state variable, $x \in X$ to a lower dimensional variable $z$ in a latent space $Z$ . It then uses a recurrent neural network (RNN) to learn the state transition model in the latent space. Finally, it applies a simple linear controller to $z$ and the hidden state in the RNN, $h$ , to control the system.
|
| 347 |
+
|
| 348 |
+
Imagination-Augmented Agents (I2As) (Racaniere et al., 2017) introduces two paths: 1) model-free \` path and 2) imagination path. The imagination path learns a transition model and uses this model to generate imagination rollouts. These rollouts are aggregated with the samples in the model-free path. To generate actions in the imagination path, I2As uses the model-free path policy. Therefore, the rollouts in the imagination path improve as the I2As policy improves. Using the imagination rollouts, I2As converge faster than a model-free network with the same number of parameters. Nagabandi et al. (2018) showed that a two-step control policy based on 1) learning the dynamic model and 2) applying MPC to the learned model is significantly more sample efficient than model-free RL. However, this approach cannot achieve high rewards. To achieve higher rewards and preserve sample efficiency, they proposed a hybrid model-based and model-free (MBMF) algorithm which runs the model-based approach to achieve the initial result in a sample efficient way, it then trains a modelfree policy to mimic the learned model-based controller, and uses the resulting imitation policy as the initialization for the final model-free RL algorithm.
|
| 349 |
+
|
| 350 |
+
Feinberg et al. (2018) proposed Model-based Value Expansion (MVE) algorithm, which limits the uncertainty in the model by only allowing imagination up to a fixed number of steps, H. MVE uses the learned system dynamic model to generate simulation data up to H steps into the future, and applies these sample points to estimate Q-function. Instead of saving simulated samples in an imagination buffer, MVE retrains the dynamic model and generates a new imagination rollout at each step. Buckman et al. (2018) expanded MVE algorithm by proposing Stochastic Ensemble Value Expansion (STEVE), to generate a solution more robust to model uncertainty. Dalal et al. (2018) proposed safe exploration by modeling constraints using a linear model and applied Lagrangian optimization to modify the action in order to guarantee safety. In this work, we also used Lagrangian optimization for short-term constraints. However, our approach is different in two ways: 1) our method does not modify the RL action to achieve the goals. Instead, it derives an action by considering both long-term goals and short-term constraints. This is possible because our algorithm uses a locally linear model to represent the advantage function. 2) Unlike safe exploration, the focus of this paper is in handling new constraints in the application phase without retraining the model.
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 7: LLQL for the crane system.
|
| 354 |
+
|
| 355 |
+
# B CRANE CONTROL SYSTEM
|
| 356 |
+
|
| 357 |
+
Gantry cranes are widely used in industrial production lines and construction projects for transferring heavy and hazardous materials. The objective of the crane system is to convey the payload from the start position to the destination position as soon as possible while keeping the payload sway at the destination minimum. Higher traveling speed improves the efficiency and reduces costs. However, excessive movements at the destination wastes time and energy and can lead to accidents. To move the payload as fast as possible and stop the sway at the destination, skillful operators are required. Labor shortage in industries, and risk of human error, have motivated us to develop an automated solution for crane control. The crane dynamic system is highly nonlinear. Traditional nonlinear control techniques such as sliding control (Bartolini et al., 2002) and adaptive control (Boustany & d’Andrea Novel, 1992) have been applied to these systems. These methods require detailed mathematical model of the system and its environment, which can be complicated and expensive to derive. When a simulator is available for a crane system, RL algorithms can provide a compelling alternative to traditional control methodologies. This is the case in many industries, where for intellectual property concerns the companies are willing to provide simulators to the costumers but refuse to reveal mathematical models of their products.
|
| 358 |
+
|
| 359 |
+
Our crane simulator provides us six state variables: 1) trolley location, $x _ { t r o l l e y } \ 2$ ) trolley velocity, $v _ { t r o l l e y }$ , 3) payload angle, $\phi _ { p a y l o a d }$ , 4) payload angular velocity, $\omega _ { p a y l o a d } , 5$ ) payload horizontal location, $x _ { p a y l o a d }$ , and 6) payload vertical location, $y _ { p a y l o a d }$ . The only action is the force applied to the trolley, $\boldsymbol { u } _ { t r o l l e y }$ . The overall goal is to reach the final destination $x _ { p d }$ and $y _ { p d }$ in the shortest time possible. We choose the following reward function to learn a policy to do so.
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
r _ { k } = \left\{ \begin{array} { l l } { 5 0 0 } & { \mathrm { i f ~ } | x _ { p a y l o a d } ( k ) - x _ { p d } | < \epsilon \& | y _ { p a y l o a d } ( k ) - y _ { p d } | < \epsilon } \\ { - 1 } & { \mathrm { o t h e r w i s e , } } \end{array} \right.
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
where $\epsilon$ is a small constant. Figure 7b shows that our learned policy pushes the trolley with maximum force, $u _ { t r o l l e y }$ is eqaual 1 for the entire episode, till the payload reaches the goal $x _ { p d } = 6 , y _ { p d } = 1 0$ .
|
| 366 |
+
|
| 367 |
+
In additional to the long-term goal, our short-term goal is to minimize the object’s sway when it reaches to the final destination. Instead of designing complicated reward functions to achieve minimum travel time and minimum sway, we consider $\omega _ { p a y l o a d } = \mathrm { 0 }$ at the final destination as a short-term desired trajectory. We consider the following hybrid strategy to reach the final destination with close to zero sway.
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
u _ { t r o l l e y } = \left\{ \begin{array} { l l } { \mathrm { u s e ~ e q u a t i o n ~ ( 1 6 ) } } & { \mathrm { i f ~ } x _ { p a y l o a d } < 5 . 5 } \\ { \mathrm { u s e ~ e q u a t i o n ~ ( 1 8 ) , } } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
Figure 8 shows that our strategy can reach the destination with close to zero swing.
|
| 375 |
+
Figure 8: State variables for the crane system with required short-term trajectory, $\omega _ { p a y l o a d } = 0$ . The final error is 0.0001. The crane reaches the goal in 12.5s. $\gamma _ { 1 } = 1$ , $\gamma _ { 2 } = 1 0 0 0$ .
|
| 376 |
+
|
| 377 |
+
# C DERIVATION DETAILS FOR SHORT-TERM CONSTRAINTS
|
| 378 |
+
|
| 379 |
+
Consider equation (19). Substituting our estimation of the next step from equation (14) in (19), we have
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\operatorname* { m i n } _ { \mathrm { f i n d } u _ { k } } \frac { 1 } { 2 } ( h _ { k } + d _ { k } u _ { k } ) ^ { 2 }
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
such that:
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
x _ { k } ^ { i } + \Delta ( f _ { k } ^ { i } + g _ { k } ^ { i } u _ { k } ) \leq c _ { k + 1 } ^ { i }
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
Using Lagrangian method at each time step $k$ , we have
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { l } { { { \displaystyle { \cal L } ( u _ { k } , \lambda ) = \frac { 1 } { 2 } ( h _ { k } + d _ { k } u _ { k } ) ^ { 2 } + } } } \\ { { \lambda ( x _ { k } ^ { i } + \Delta ( f _ { k } ^ { i } + g _ { k } ^ { i } u _ { k } ) - c _ { k + 1 } ^ { i } ) } } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
Taking the gradient of $L$ with respect to $u _ { k }$ , we can write the Karush-Kuhn-Tucker (KKT) (Kuhn & Tucker, 2014) conditions for optimal solution of equation (25), $\{ u _ { k } ^ { * } , \lambda ^ { * } \}$ as:
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\begin{array} { l } { { ( h _ { k } + d _ { k } u _ { k } ^ { * } ) d _ { k } + \lambda ^ { * } \Delta g _ { k } ^ { i } = 0 } } \\ { { \lambda ^ { * } ( x _ { k } ^ { i } + \Delta ( f _ { k } ^ { i } + g _ { k } ^ { i } u _ { k } ^ { * } ) - c _ { k + 1 } ) = 0 } } \end{array}
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
With this assumption, we can show
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\boldsymbol { u } _ { k } ^ { \ast } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T } ( h _ { k } + \lambda ^ { \ast } \Delta g _ { k } ^ { i } d _ { k } ^ { T } ( d _ { k } d _ { k } ^ { T } ) ^ { - 1 } )
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
Note that when there is no constraint: $\lambda ^ { * } = 0$ , we have $\boldsymbol { u } _ { k } ^ { * } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T } \boldsymbol { h } _ { k }$ . This is exactly the input we computed in equation (16). When $\lambda ^ { * } \neq 0$ , we have
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
x _ { k } ^ { i } + \Delta ( f _ { k } ^ { i } + g _ { k } ^ { i } u _ { k } ^ { * } ) - c _ { k + 1 } = 0
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
We define $\alpha _ { 1 } = \Delta g _ { k } ^ { i } d _ { k } ^ { T } ( d _ { k } d _ { k } ^ { T } ) ^ { - 1 }$ , and $\alpha _ { 2 } = \Delta g _ { k } ^ { i } ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T }$ . $\alpha _ { 1 }$ and $\alpha _ { 2 }$ are scalar. Substituting $u _ { k } ^ { * }$ from equation (28) in equation (29) we have
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
x _ { k } ^ { i } + \Delta f _ { k } ^ { i } - \alpha _ { 2 } ( h _ { k } + \alpha _ { 1 } \lambda ^ { * } ) - c _ { k + 1 } = 0
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Therefore,
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\begin{array} { r l } & { \lambda ^ { * } = \frac { x _ { k } ^ { i } + \Delta f _ { k } ^ { i } - c _ { k + 1 } - \alpha _ { 2 } h _ { k } } { \alpha _ { 1 } \alpha _ { 2 } } } \\ & { u _ { k } ^ { * } = - ( d _ { k } ^ { T } d _ { k } ) ^ { - 1 } d _ { k } ^ { T } ( h _ { k } + \lambda ^ { * } \alpha _ { 1 } ) . } \end{array}
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
# D NETWORKS PARAMETERS
|
| 428 |
+
|
| 429 |
+
We used the following network structures and parameters in the experimental studies.
|
| 430 |
+
|
| 431 |
+
LLQL for MountainCarContinuous: $h , d , V$ , $f$ and $g$ networks each has two hidden layers with 200 neurons in each layer. All the activation functions are Rectified Linear Units (ReLUs). Each episode is maximum 1000 steps. The number of iterations for short-term and long-term prediction model: $I _ { s } = I _ { l } = 5$ . The learning rate for the long-term prediction model is 0.001. The batch size for this model is 10. The discount rate $\gamma = 0 . 9 9 9$ . The target model update rate, $\tau = 0 . 0 0 1$ . The learning rate for the short-term prediction model is 0.001 for the first 20000 steps and then reduces to 0.0001. $\Delta = 0 . 0 0 1$ . The batch size for this model is 100.
|
| 432 |
+
|
| 433 |
+
LLQL for the crane system: $h , d , V$ , $f$ and $g$ networks each has two hidden layers with 200 neurons in each layer. All the activation functions are ReLUs. Each episode includes maximum 1000 actions. The number of iterations for short-term and long-term prediction model: $I _ { s } = I _ { l } = 5$ . The learning rate for the long-term prediction model is 0.001. The batch size for this model is 10. The discount rate $\gamma = 0 . 9 9 9$ . The target model update rate, $\tau = 0 . 0 0 1$ . The learning rate for the short-term prediction model is 0.01 for the first 20000 steps and then reduces to 0.001. $\Delta = 0 . 0 0 1$ . The batch size for this model is 200.
|
| 434 |
+
|
| 435 |
+
DDPG networks with modified reward functions: The Q-network, and the deterministic policy network each has two hidden layers with 200 neurons. All the activation functions are ReLUs. The learning rate for the Q-network is 0.00001, and the learning rate for the deterministic policy network is 0.000001. The discount rate $\gamma = 0 . 9 9$ . The batch size is 8. The target model update rate for both networks is 0.1.
|
| 436 |
+
|
| 437 |
+
In all the networks we shift and scale the state variables to zero mean and unit standard deviation for a better learning. For exploration, we add an additive normal noise to the action:
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
u ( k ) = ( 1 - \alpha _ { N } ) u ( k ) ^ { * } + \alpha _ { N } { \mathcal { N } } ,
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
where $u ( k ) ^ { * }$ represents the optimum action generated by LLQL or DDPG, and $\mathcal { N } = U ( - 1 , 1 )$ is a continuous uniform random variable. We consider $\alpha _ { N } = 0 . 0 5$ in the beginning, and $\alpha _ { N } = . 9 9 \times \alpha _ { N }$ after each episode with positive cumulative rewards.
|
| 444 |
+
|
| 445 |
+
# E MODEL-BASED REINFORCEMENT LEARNING
|
| 446 |
+
|
| 447 |
+
Nagabandi et al. (2018) proposed a model-based RL based on MPC. Their approach uses the system dynamic model $^ +$ reward function to generate a sequence of actions that maximize the cumulative reward. To represent the effect of short-term and long-term predictive models in our algorithm, we present a modified version of (Nagabandi et al., 2018) algorithm using our short-term predictive model, $f$ and $g$ in equation (14). The model based RL uses the learned dynamic model, $f$ and $g$ networks, and generates a sequence of actions $U _ { k } ^ { H } = ( u _ { k } , . . . , u _ { k + H - 1 } )$ to maximize reward over a finite horizon, $H$ .
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
\begin{array} { l } { { \displaystyle U _ { k } ^ { H } = \arg \operatorname* { m a x } \sum _ { i = k } ^ { k + H - 1 } r ( \hat { x } _ { i } , u _ { i } ) , } } \\ { { \mathrm { s u c h ~ t h a t : ~ } \hat { x } _ { k } = x _ { k } \mathrm { ~ a n d ~ } \hat { x } _ { i + 1 } = \hat { x } _ { i } + \Delta ( f ( \hat { x } _ { i } | \theta ^ { f } ) + g ( \hat { x } _ { i } | \theta ^ { g } ) u _ { i } ) } } \end{array}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
Solving equation (33) for the exact solution is computationally expensive. Therefore, Nagabandi et al. (2018) applied a simple random sampling method and select the candidate action sequence with the highest expected cumulative reward. In this work, we apply the same method to solve equation (33). We set $H = 2 5$ and select 10000 samples at each step. Following the MPC closedloop control framework, the algorithm only executes the first action in the sequence and calculate a new sequence in the next step. Algorithm 2 presents the model-based RL.
|
| 454 |
+
|
| 455 |
+
# Algorithm 2 Model-based Reinforcement Learning (Nagabandi et al., 2018)
|
| 456 |
+
|
| 457 |
+
1: Initialize $f$ ang $g$ networks (equation (14)) with random weights.
|
| 458 |
+
2: Create dataset of random trajectories $R _ { r a n d }$ .
|
| 459 |
+
3: Create the reply buffer $R _ { r l } = \emptyset$ .
|
| 460 |
+
4: for episode $= 1 { : } \mathbf { M }$ do
|
| 461 |
+
5: Randomly select a mini-batch of $N _ { s }$ transition from $R _ { r a n d }$ and $R _ { r l }$ .
|
| 462 |
+
6: Update $\theta ^ { f }$ and $\theta ^ { g }$ by minimizing the loss: $\begin{array} { r } { L _ { 1 } = \frac { 1 } { N _ { s } } \sum _ { i = 1 } ^ { N _ { s } } | | x _ { i + 1 } - x _ { i } - \Delta ( f ( x _ { i } | \theta ^ { f } ) + g ( x _ { i } | \theta ^ { g } ) u _ { i } ) | | . } \end{array}$ .
|
| 463 |
+
7: for $\mathrm { k } = 1 { : } \mathrm { T }$ do
|
| 464 |
+
8: Solve equation (33) for the optimum sequence $U _ { k } ^ { H }$ at state $x _ { k }$ .
|
| 465 |
+
9: Executes the first action in the sequence, $u _ { k }$ .
|
| 466 |
+
10: Store transition $\left( { { x } _ { k } } , { { u } _ { k } } , { { x } _ { k + 1 } } , { { r } _ { k } } \right)$ in $R _ { r l }$ .
|
parse/train/SJlbyCNtPr/SJlbyCNtPr_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJlbyCNtPr/SJlbyCNtPr_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJlbyCNtPr/SJlbyCNtPr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1xMH1BtvB/r1xMH1BtvB.md
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ELECTRA: PRE-TRAINING TEXT ENCODERS AS DISCRIMINATORS RATHER THAN GENERATORS
|
| 2 |
+
|
| 3 |
+
Kevin Clark
|
| 4 |
+
Stanford University
|
| 5 |
+
kevclark@cs.stanford.edu
|
| 6 |
+
|
| 7 |
+
Minh-Thang Luong Google Brain thangluong@google.com
|
| 8 |
+
|
| 9 |
+
Quoc V. Le Google Brain qvl@google.com
|
| 10 |
+
|
| 11 |
+
Christopher D. Manning Stanford University & CIFAR Fellow manning@cs.stanford.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Masked language modeling (MLM) pre-training methods such as BERT corrupt the input by replacing some tokens with [MASK] and then train a model to reconstruct the original tokens. While they produce good results when transferred to downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a more sample-efficient pre-training task called replaced token detection. Instead of masking the input, our approach corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments demonstrate this new pre-training task is more efficient than MLM because the task is defined over all input tokens rather than just the small subset that was masked out. As a result, the contextual representations learned by our approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale, where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when using the same amount of compute.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Current state-of-the-art representation learning methods for language can be viewed as learning denoising autoencoders (Vincent et al., 2008). They select a small subset of the unlabeled input sequence (typically $15 \%$ ), mask the identities of those tokens (e.g., BERT; Devlin et al. (2019)) or attention to those tokens (e.g., XLNet; Yang et al. (2019)), and then train the network to recover the original input. While more effective than conventional language-model pre-training due to learning bidirectional representations, these masked language modeling (MLM) approaches incur a substantial compute cost because the network only learns from $15 \%$ of the tokens per example.
|
| 20 |
+
|
| 21 |
+
As an alternative, we propose replaced token detection, a pre-training task in which the model learns to distinguish real input tokens from plausible but synthetically generated replacements. Instead of masking, our method corrupts the input by replacing some tokens with samples from a proposal distribution, which is typically the output of a small masked language model. This corruption procedure solves a mismatch in BERT (although not in XLNet) where the network sees artificial [MASK] tokens during pre-training but not when being fine-tuned on downstream tasks. We then pre-train the network as a discriminator that predicts for every token whether it is an original or a replacement. In contrast, MLM trains the network as a generator that predicts the original identities of the corrupted tokens. A key advantage of our discriminative task is that the model learns from all input tokens instead of just the small masked-out subset, making it more computationally efficient. Although our approach is reminiscent of training the discriminator of a GAN, our method is not adversarial in that the generator producing corrupted tokens is trained with maximum likelihood due to the difficulty of applying GANs to text (Caccia et al., 2018).
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Replaced token detection pre-training consistently outperforms masked language model pre-training given the same compute budget. The left figure is a zoomed-in view of the dashed box.
|
| 25 |
+
|
| 26 |
+
We call our approach ELECTRA1 for “Efficiently Learning an Encoder that Classifies Token Replacements Accurately.” As in prior work, we apply it to pre-train Transformer text encoders (Vaswani et al., 2017) that can be fine-tuned on downstream tasks. Through a series of ablations, we show that learning from all input positions causes ELECTRA to train much faster than BERT. We also show ELECTRA achieves higher accuracy on downstream tasks when fully trained.
|
| 27 |
+
|
| 28 |
+
Most current pre-training methods require large amounts of compute to be effective, raising concerns about their cost and accessibility. Since pre-training with more compute almost always results in better downstream accuracies, we argue an important consideration for pre-training methods should be compute efficiency as well as absolute downstream performance. From this viewpoint, we train ELECTRA models of various sizes and evaluate their downstream performance vs. their compute requirement. In particular, we run experiments on the GLUE natural language understanding benchmark (Wang et al., 2019) and SQuAD question answering benchmark (Rajpurkar et al., 2016). ELECTRA substantially outperforms MLM-based methods such as BERT and XLNet given the same model size, data, and compute (see Figure 1). For example, we build an ELECTRA-Small model that can be trained on 1 GPU in 4 days.2 ELECTRA-Small outperforms a comparably small BERT model by 5 points on GLUE, and even outperforms the much larger GPT model (Radford et al., 2018). Our approach also works well at large scale, where we train an ELECTRA-Large model that performs comparably to RoBERTa (Liu et al., 2019) and XLNet (Yang et al., 2019), despite having fewer parameters and using 1/4 of the compute for training. Training ELECTRA-Large further results in an even stronger model that outperforms ALBERT (Lan et al., 2019) on GLUE and sets a new state-of-the-art for SQuAD 2.0. Taken together, our results indicate that the discriminative task of distinguishing real data from challenging negative samples is more compute-efficient and parameter-efficient than existing generative approaches for language representation learning.
|
| 29 |
+
|
| 30 |
+
# 2 METHOD
|
| 31 |
+
|
| 32 |
+
We first describe the replaced token detection pre-training task; see Figure 2 for an overview. We suggest and evaluate several modeling improvements for this method in Section 3.2.
|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
Figure 2: An overview of replaced token detection. The generator can be any model that produces an output distribution over tokens, but we usually use a small masked language model that is trained jointly with the discriminator. Although the models are structured like in a GAN, we train the generator with maximum likelihood rather than adversarially due to the difficulty of applying GANs to text. After pre-training, we throw out the generator and only fine-tune the discriminator (the ELECTRA model) on downstream tasks.
|
| 36 |
+
|
| 37 |
+
Our approach trains two neural networks, a generator $G$ and a discriminator $D$ . Each one primarily consists of an encoder (e.g., a Transformer network) that maps a sequence on input tokens ${ \textbf { \em x } } =$ $[ x _ { 1 } , . . . , x _ { n } ]$ into a sequence of contextualized vector representations $h ( \bar { \pmb { x } } ) = [ h _ { 1 } , . . . , \bar { h } _ { n } ]$ . For a given position $t$ , (in our case only positions where $x _ { t } = \mathrm { [ M A S K ] } .$ ), the generator outputs a probability for generating a particular token $x _ { t }$ with a softmax layer:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
p _ { G } ( x _ { t } | \boldsymbol { x } ) = \exp \left( { e ( x _ { t } ) ^ { T } h _ { G } ( \boldsymbol { x } ) _ { t } } \right) / \sum _ { \boldsymbol { x } ^ { \prime } } \exp \left( { e ( \boldsymbol { x } ^ { \prime } ) ^ { T } h _ { G } ( \boldsymbol { x } ) _ { t } } \right)
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $e$ denotes token embeddings. For a given position $t$ , the discriminator predicts whether the token $x _ { t }$ is “real,” i.e., that it comes from the data rather than the generator distribution, with a sigmoid output layer:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
D ( \pmb { x } , t ) = \mathrm { s i g m o i d } ( \boldsymbol { w } ^ { T } h _ { D } ( \pmb { x } ) _ { t } )
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
The generator is trained to perform masked language modeling (MLM). Given an input ${ \textbf { \em x } } =$ $[ x _ { 1 } , x _ { 2 } , . . . , x _ { n } ]$ , MLM first select a random set of positions (integers between 1 and $n$ ) to mask out $\pmb { m } = [ m _ { 1 } , . . . , m _ { k } ]$ .3 The tokens in the selected positions are replaced with a [MASK] token: we denote this as $\pmb { x } ^ { \mathrm { m a s k e d } } = \mathrm { R E P L A C E } ( \pmb { x } , \pmb { m } , [ \mathrm { M A S K } ] )$ . The generator then learns to predict the original identities of the masked-out tokens. The discriminator is trained to distinguish tokens in the data from tokens that have been replaced by generator samples. More specifically, we create a corrupted example $\pmb { x } ^ { \mathrm { c o r r u p t } }$ by replacing the masked-out tokens with generator samples and train the discriminator to predict which tokens in $\pmb { x } ^ { \mathrm { c o r r u p t } }$ match the original input $_ { \textbf { \em x } }$ . Formally, model inputs are constructed according to
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\begin{array} { r l r l } & { m _ { i } \sim \mathrm { u n i f } \{ 1 , n \} \mathrm { f o r } i = 1 \mathrm { t o } k } & { \qquad } & { x ^ { \mathrm { m a s k e d } } = \mathrm { R E P L A C E } ( { \pmb x } , { \pmb m } , [ \mathrm { M a S K } ] ) } \\ & { \hat { x } _ { i } \sim p _ { G } ( x _ { i } | { \pmb x } ^ { \mathrm { m a s k e d } } ) \mathrm { f o r } i \in { \pmb m } } & & { x ^ { \mathrm { c o r u p t } } = \mathrm { R E P L A C E } ( { \pmb x } , { \pmb m } , \hat { { \boldsymbol x } } ) } \end{array}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
and the loss functions are
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\begin{array} { r l } & { \mathcal { L } _ { \mathrm { M I M } } ( { \pmb x } , \theta _ { G } ) = \mathbb { E } \left( \displaystyle \sum _ { i \in m } - \log p _ { G } ( x _ { i } | { \pmb x } ^ { \mathrm { m a x i e d } } ) \right) } \\ & { \mathcal { L } _ { \mathrm { D i s c } } ( { \pmb x } , \theta _ { D } ) = \mathbb { E } \left( \displaystyle \sum _ { t = 1 } ^ { n } - \mathbb { 1 } ( x _ { t } ^ { \mathrm { c o r m p t } } = x _ { t } ) \log D ( x ^ { \mathrm { c o r m p t } } , t ) - \mathbb { 1 } ( x _ { t } ^ { \mathrm { c o r m p t } } \not = x _ { t } ) \log ( 1 - D ( x ^ { \mathrm { c o r m p t } } , t ) ) \right) } \end{array}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
Although similar to the training objective of a GAN, there are several key differences. First, if the generator happens to generate the correct token, that token is considered “real” instead of “fake”; we found this formulation to moderately improve results on downstream tasks. More importantly, the generator is trained with maximum likelihood rather than being trained adversarially to fool the discriminator. Adversarially training the generator is challenging because it is impossible to backpropagate through sampling from the generator. Although we experimented circumventing this issue by using reinforcement learning to train the generator (see Appendix F), this performed worse than maximum-likelihood training. Lastly, we do not supply the generator with a noise vector as input, as is typical with a GAN.
|
| 62 |
+
|
| 63 |
+
We minimize the combined loss
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\operatorname* { m i n } _ { \theta _ { G } , \theta _ { D } } \sum _ { \pmb { x } \in \mathcal { X } } \mathcal { L } _ { \mathrm { M L M } } ( \pmb { x } , \theta _ { G } ) + \lambda \mathcal { L } _ { \mathrm { D i s c } } ( \pmb { x } , \theta _ { D } )
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
over a large corpus $\mathcal { X }$ of raw text. We approximate the expectations in the losses with a single sample. We don’t back-propagate the discriminator loss through the generator (indeed, we can’t because of the sampling step). After pre-training, we throw out the generator and fine-tune the discriminator on downstream tasks.
|
| 70 |
+
|
| 71 |
+
# 3 EXPERIMENTS
|
| 72 |
+
|
| 73 |
+
# 3.1 EXPERIMENTAL SETUP
|
| 74 |
+
|
| 75 |
+
We evaluate on the General Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2019) and Stanford Question Answering (SQuAD) dataset (Rajpurkar et al., 2016). GLUE contains a variety of tasks covering textual entailment (RTE and MNLI) question-answer entailment (QNLI), paraphrase (MRPC), question paraphrase (QQP), textual similarity (STS), sentiment (SST), and linguistic acceptability (CoLA). See Appendix C for more details on the GLUE tasks. Our evaluation metrics are Spearman correlation for STS, Matthews correlation for CoLA, and accuracy for the other GLUE tasks; we generally report the average score over all tasks. For SQuAD, we evaluate on versions 1.1, in which models select the span of text answering a question, and 2.0, in which some questions are unanswerable by the passage. We use the standard evaluation metrics of Exact-Match (EM) and F1 scores. For most experiments we pre-train on the same data as BERT, which consists of 3.3 Billion tokens from Wikipedia and BooksCorpus (Zhu et al., 2015). However, for our Large model we pre-trained on the data used for XLNet (Yang et al., 2019), which extends the BERT dataset to 33B tokens by including data from ClueWeb (Callan et al., 2009), CommonCrawl, and Gigaword (Parker et al., 2011). All of the pre-training and evaluation is on English data, although we think it would be interesting to apply our methods to multilingual data in the future.
|
| 76 |
+
|
| 77 |
+
Our model architecture and most hyperparameters are the same as BERT’s. For fine-tuning on GLUE, we add simple linear classifiers on top of ELECTRA. For SQuAD, we add the questionanswering module from XLNet on top of ELECTRA, which is slightly more sophisticated than BERT’s in that it jointly rather than independently predicts the start and end positions and has a “answerability” classifier added for SQuAD 2.0. Some of our evaluation datasets are small, which means accuracies of fine-tuned models can vary substantially depending on the random seed. We therefore report the median of 10 fine-tuning runs from the same pre-trained checkpoint for each result. Unless stated otherwise, results are on the dev set. See the appendix for further training details and hyperparameter values.
|
| 78 |
+
|
| 79 |
+
# 3.2 MODEL EXTENSIONS
|
| 80 |
+
|
| 81 |
+
We improve our method by proposing and evaluating several extensions to the model. Unless stated otherwise, these experiments use the same model size and training data as BERT-Base.
|
| 82 |
+
|
| 83 |
+
Weight Sharing We propose improving the efficiency of the pre-training by sharing weights between the generator and discriminator. If the generator and discriminator are the same size, all of the transformer weights can be tied. However, we found it to be more efficient to have a small generator, in which case we only share the embeddings (both the token and positional embeddings) of the generator and discriminator. In this case we use embeddings the size of the discriminator’s hidden states.4 The “input” and “output” token embeddings of the generator are always tied as in BERT.
|
| 84 |
+
|
| 85 |
+
We compare the weight tying strategies when the generator is the same size as the discriminator. We train these models for $5 0 0 \mathrm { k }$ steps. GLUE scores are 83.6 for no weight tying, 84.3 for tying token embeddings, and 84.4 for tying all weights. We hypothesize that ELECTRA benefits from tied token embeddings because masked language modeling is particularly effective at learning these representations: while the discriminator only updates tokens that are present in the input or are sampled by the generator, the generator’s softmax over the vocabulary densely updates all token embeddings. On the other hand, tying all encoder weights caused little improvement while incurring the significant disadvantage of requiring the generator and discriminator to be the same size. Based on these findings, we use tied embeddings for further experiments in this paper.
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 3: Left: GLUE scores for different generator/discriminator sizes (number of hidden units). Interestingly, having a generator smaller than the discriminator improves results. Right: Comparison of different training algorithms. As our focus is on efficiency, the $\mathbf { X }$ -axis shows FLOPs rather than train steps (e.g., ELECTRA is trained for fewer steps than BERT because it includes the generator).
|
| 89 |
+
|
| 90 |
+
Smaller Generators If the generator and discriminator are the same size, training ELECTRA would take around twice as much compute per step as training only with masked language modeling. We suggest using a smaller generator to reduce this factor. Specifically, we make models smaller by decreasing the layer sizes while keeping the other hyperparameters constant. We also explore using an extremely simple “unigram” generator that samples fake tokens according their frequency in the train corpus. GLUE scores for differently-sized generators and discriminators are shown in the left of Figure 3. All models are trained for $5 0 0 \mathrm { k }$ steps, which puts the smaller generators at a disadvantage in terms of compute because they require less compute per training step. Nevertheless, we find that models work best with generators 1/4-1/2 the size of the discriminator. We speculate that having too strong of a generator may pose a too-challenging task for the discriminator, preventing it from learning as effectively. In particular, the discriminator may have to use many of its parameters modeling the generator rather than the actual data distribution. Further experiments in this paper use the best generator size found for the given discriminator size.
|
| 91 |
+
|
| 92 |
+
Training Algorithms Lastly, we explore other training algorithms for ELECTRA, although these did not end up improving results. The proposed training objective jointly trains the generator and discriminator. We experiment with instead using the following two-stage training procedure:
|
| 93 |
+
|
| 94 |
+
1. Train only the generator with ${ \mathcal { L } } _ { \mathrm { M L M } }$ for $n$ steps. 2. Initialize the weights of the discriminator with the weights of the generator. Then train the discriminator with $\mathcal { L } _ { \mathrm { D i s c } }$ for $n$ steps, keeping the generator’s weights frozen.
|
| 95 |
+
|
| 96 |
+
Note that the weight initialization in this procedure requires having the same size for the generator and discriminator. We found that without the weight initialization the discriminator would sometimes fail to learn at all beyond the majority class, perhaps because the generator started so far ahead of the discriminator. Joint training on the other hand naturally provides a curriculum for the discriminator where the generator starts off weak but gets better throughout training. We also explored training the generator adversarially as in a GAN, using reinforcement learning to accommodate the discrete operations of sampling from the generator. See Appendix F for details.
|
| 97 |
+
|
| 98 |
+
Results are shown in the right of Figure 3. During two-stage training, downstream task performance notably improves after the switch from the generative to the discriminative objective, but does not end up outscoring joint training. Although still outperforming BERT, we found adversarial training to underperform maximum-likelihood training. Further analysis suggests the gap is caused by two
|
| 99 |
+
|
| 100 |
+
<table><tr><td>Model</td><td>Train/Infer FLOPs</td><td>Speedup</td><td>Params</td><td>Train Time+Hardware</td><td>GLUE</td></tr><tr><td>ELMo</td><td>3.3e18 /2.6e10</td><td>19x /1.2x</td><td>96M</td><td>14d on 3 GTX 1080 GPUs</td><td>71.2</td></tr><tr><td>GPT</td><td>4.0e19 / 3.0e10</td><td>1.6x / 0.97x</td><td>117M</td><td>25d on 8 P6000 GPUs</td><td>78.8</td></tr><tr><td>BERT-Small</td><td>1.4e18 /3.7e9</td><td>45x/8x</td><td>14M</td><td>4d on 1V100 GPU</td><td>75.1</td></tr><tr><td>BERT-Base</td><td>6.4e19/2.9e10</td><td>1x/1x</td><td>110M</td><td>4d on 16 TPUv3s</td><td>82.2</td></tr><tr><td>ELECTRA-Small</td><td>1.4e18 /3.7e9</td><td>45x/8x</td><td>14M</td><td>4d on 1 V100 GPU</td><td>79.9</td></tr><tr><td>50% trained</td><td>7.1e17 /3.7e9</td><td>90x/8x</td><td>14M</td><td>2d on1 V100 GPU</td><td>79.0</td></tr><tr><td>25% trained</td><td>3.6e17 /3.7e9</td><td>181x/8x</td><td>14M</td><td>1d on 1 V100 GPU</td><td>77.7</td></tr><tr><td>12.5% trained</td><td>1.8e17/3.7e9</td><td>361x /8x</td><td>14M</td><td>12h on 1 V100 GPU</td><td>76.0</td></tr><tr><td>6.25% trained</td><td>8.9e16 /3.7e9</td><td>722x /8x</td><td>14M</td><td>6h on 1 V100 GPU</td><td>74.1</td></tr><tr><td>ELECTRA-Base</td><td>6.4e19 /2.9e10</td><td>1x/1x</td><td>110M</td><td>4d on 16 TPUv3s</td><td>85.1</td></tr></table>
|
| 101 |
+
|
| 102 |
+
Table 1: Comparison of small models on the GLUE dev set. BERT-Small/Base are our implementation and use the same hyperparameters as ELECTRA-Small/Base. Infer FLOPs assumes single length-128 input. Training times should be taken with a grain of salt as they are for different hardware and with sometimes un-optimized code. ELECTRA performs well even when trained on a single GPU, scoring 5 GLUE points higher than a comparable BERT model and even outscoring the much larger GPT model.
|
| 103 |
+
|
| 104 |
+
problems with adversarial training. First, the adversarial generator is simply worse at masked language modeling; it achieves $58 \%$ accuracy at masked language modeling compared to $65 \%$ accuracy for an MLE-trained one. We believe the worse accuracy is mainly due to the poor sample efficiency of reinforcement learning when working in the large action space of generating text. Secondly, the adversarially trained generator produces a low-entropy output distribution where most of the probability mass is on a single token, which means there is not much diversity in the generator samples. Both of these problems have been observed in GANs for text in prior work (Caccia et al., 2018).
|
| 105 |
+
|
| 106 |
+
# 3.3 SMALL MODELS
|
| 107 |
+
|
| 108 |
+
As a goal of this work is to improve the efficiency of pre-training, we develop a small model that can be quickly trained on a single GPU. Starting with the BERT-Base hyperparameters, we shortened the sequence length (from 512 to 128), reduced the batch size (from 256 to 128), reduced the model’s hidden dimension size (from 768 to 256), and used smaller token embeddings (from 768 to 128). To provide a fair comparison, we also train a BERT-Small model using the same hyperparameters. We train BERT-Small for 1.5M steps, so it uses the same training FLOPs as ELECTRA-Small, which was trained for 1M steps.5 In addition to BERT, we compare against two less resource-intensive pre-training methods based on language modeling: ELMo (Peters et al., 2018) and GPT (Radford et al., 2018).6 We also show results for a base-sized ELECTRA model comparable to BERT-Base.
|
| 109 |
+
|
| 110 |
+
Results are shown in Table 1. See Appendix D for additional results, including stronger small-sized and base-sized models trained with more compute. ELECTRA-Small performs remarkably well given its size, achieving a higher GLUE score than other methods using substantially more compute and parameters. For example, it scores 5 points higher than a comparable BERT-Small model and even outperforms the much larger GPT model. ELECTRA-Small is trained mostly to convergence, with models trained for even less time (as little as 6 hours) still achieving reasonable performance. While small models distilled from larger pre-trained transformers can also achieve good GLUE scores (Sun et al., 2019b; Jiao et al., 2019), these models require first expending substantial compute to pre-train the larger teacher model. The results also demonstrate the strength of ELECTRA at a moderate size; our base-sized ELECTRA model substantially outperforms BERT-Base and even outperforms BERT-Large (which gets 84.0 GLUE score). We hope ELECTRA’s ability to achieve strong results with relatively little compute will broaden the accessibility of developing and applying pre-trained models in NLP.
|
| 111 |
+
|
| 112 |
+
Table 2: Comparison of large models on the GLUE dev set. ELECTRA and RoBERTa are shown for different numbers of pre-training steps, indicated by the numbers after the dashes. ELECTRA performs comparably to XLNet and RoBERTa when using less than 1/4 of their pre-training compute and outperforms them when given a similar amount of pre-training compute. BERT dev results are from Clark et al. (2019).
|
| 113 |
+
|
| 114 |
+
<table><tr><td>Model</td><td>Train FLOPs Params</td><td></td><td>CoLA</td><td>SST</td><td>MRPC</td><td>STS</td><td>QQP</td><td>MNLI</td><td>QNLI</td><td>RTE</td><td>Avg.</td></tr><tr><td>BERT</td><td>1.9e20 (0.27x)</td><td>335M</td><td>60.6</td><td>93.2</td><td>88.0</td><td>90.0</td><td>91.3</td><td>86.6</td><td>92.3</td><td>70.4</td><td>84.0</td></tr><tr><td>RoBERTa-100K</td><td>6.4e20 (0.90x)</td><td>356M</td><td>66.1</td><td>95.6</td><td>91.4</td><td>92.2</td><td>92.0</td><td>89.3</td><td>94.0</td><td>82.7</td><td>87.9</td></tr><tr><td>RoBERTa-500K</td><td>3.2e21 (4.5x)</td><td>356M</td><td>68.0</td><td>96.4</td><td>90.9</td><td>92.1</td><td>92.2</td><td>90.2</td><td>94.7</td><td>86.6</td><td>88.9</td></tr><tr><td>XLNet</td><td>3.9e21 (5.4x)</td><td>360M</td><td>69.0</td><td>97.0</td><td>90.8</td><td>92.2</td><td>92.3</td><td>90.8</td><td>94.9</td><td>85.9</td><td>89.1</td></tr><tr><td>BERT (ours)</td><td>7.1e20 (1x)</td><td>335M</td><td>67.0</td><td>95.9</td><td>89.1</td><td>91.2</td><td>91.5</td><td>89.6</td><td>93.5</td><td>79.5</td><td>87.2</td></tr><tr><td>ELECTRA-400K</td><td>7.1e20 (1x)</td><td>335M</td><td>69.3</td><td></td><td>96.0 90.6</td><td>92.1</td><td>92.4</td><td>90.5</td><td>94.5</td><td>86.8</td><td>89.0</td></tr><tr><td>ELECTRA-1.75M</td><td>3.1e21 (4.4x)</td><td>335M</td><td>69.1</td><td>96.9</td><td>90.8</td><td>92.6</td><td>92.4</td><td>90.9</td><td>95.0</td><td>88.0</td><td>89.5</td></tr></table>
|
| 115 |
+
|
| 116 |
+
Table 3: GLUE test-set results for large models. Models in this table incorporate additional tricks such as ensembling to improve scores (see Appendix B for details). Some models do not have QNLI scores because they treat QNLI as a ranking task, which has recently been disallowed by the GLUE benchmark. To compare against these models, we report the average score excluding QNLI (Avg.\*) in addition to the GLUE leaderboard score (Score). “ELECTRA” and “RoBERTa” refer to the fully-trained ELECTRA-1.75M and RoBERTa-500K models.
|
| 117 |
+
|
| 118 |
+
<table><tr><td>Model</td><td>Train FLOPs CoLA</td><td>SST</td><td>MRPC</td><td>STS</td><td>QQP</td><td>MNLI</td><td></td><td>QNLI RTE</td><td></td><td>WNLI Avg.*</td><td>Score</td></tr><tr><td>BERT</td><td>1.9e20 (0.06x)</td><td>60.5</td><td>94.9</td><td>85.4</td><td>86.5</td><td>89.3</td><td>86.7</td><td>92.7</td><td>70.1 65.1</td><td>79.8</td><td>80.5</td></tr><tr><td>RoBERTa</td><td>3.2e21 (1.02x)</td><td>67.8</td><td>96.7 89.8</td><td>91.9</td><td>90.2</td><td>90.8</td><td>95.4</td><td>88.2</td><td>89.0</td><td>88.1</td><td>88.1</td></tr><tr><td>ALBERT</td><td>3.1e22 (10x)</td><td>69.1</td><td>97.1 91.2</td><td></td><td>92.0 90.5</td><td>91.3</td><td>1</td><td>89.2</td><td>91.8</td><td>89.0</td><td>1</td></tr><tr><td>XLNet</td><td>3.9e21 (1.26x) 70.2</td><td></td><td>97.1 90.5</td><td></td><td>92.6 90.4</td><td>90.9</td><td>1</td><td>88.5</td><td>92.5</td><td>89.1</td><td>1</td></tr><tr><td>ELECTRA</td><td>3.1e21 (1x)</td><td>71.7</td><td>97.1 90.7</td><td></td><td>92.5 90.8</td><td>91.3</td><td>95.8</td><td>89.8</td><td>92.5</td><td>89.5</td><td>89.4</td></tr></table>
|
| 119 |
+
|
| 120 |
+
# 3.4 LARGE MODELS
|
| 121 |
+
|
| 122 |
+
We train big ELECTRA models to measure the effectiveness of the replaced token detection pretraining task at the large scale of current state-of-the-art pre-trained Transformers. Our ELECTRALarge models are the same size as BERT-Large but are trained for much longer. In particular, we train a model for $4 0 0 \mathrm { k }$ steps (ELECTRA-400K; roughly 1/4 the pre-training compute of RoBERTa) and one for 1.75M steps (ELECTRA-1.75M; similar compute to RoBERTa). We use a batch size 2048 and the XLNet pre-training data. We note that although the XLNet data is similar to the data used to train RoBERTa, the comparison is not entirely direct. As a baseline, we trained our own BERT-Large model using the same hyperparameters and training time as ELECTRA-400K.
|
| 123 |
+
|
| 124 |
+
Results on the GLUE dev set are shown in Table 2. ELECTRA-400K performs comparably to RoBERTa and XLNet. However, it took less than 1/4 of the compute to train ELECTRA-400K as it did to train RoBERTa and XLNet, demonstrating that ELECTRA’s sample-efficiency gains hold at large scale. Training ELECTRA for longer (ELECTRA-1.75M) results in a model that outscores them on most GLUE tasks while still requiring less pre-training compute. Surprisingly, our baseline BERT model scores notably worse than RoBERTa-100K, suggesting our models may benefit from more hyperparameter tuning or using the RoBERTa training data. ELECTRA’s gains hold on the GLUE test set (see Table 3), although these comparisons are less apples-to-apples due to the additional tricks employed by the models (see Appendix B).
|
| 125 |
+
|
| 126 |
+
Results on SQuAD are shown in Table 4. Consistent, with the GLUE results, ELECTRA scores better than masked-language-modeling-based methods given the same compute resources. For example, ELECTRA-400K outperforms RoBERTa-100k and our BERT baseline, which use similar amounts of pre-training compute. ELECTRA-400K also performs comparably to RoBERTa-500K despite using less than 1/4th of the compute. Unsurprisingly, training ELECTRA longer improves results further: ELECTRA-1.75M scores higher than previous models on the SQuAD 2.0 benchmark. ELECTRA-Base also yields strong results, scoring substantially better than BERT-Base and XLNet-Base, and even surpassing BERT-Large according to most metrics. ELECTRA generally performs better at SQuAD 2.0 than 1.1. Perhaps replaced token detection, in which the model distinguishes real tokens from plausible fakes, is particularly transferable to the answerability classification of SQuAD 2.0, in which the model must distinguish answerable questions from fake unanswerable questions.
|
| 127 |
+
|
| 128 |
+
Table 4: Results on the SQuAD for non-ensemble models.
|
| 129 |
+
|
| 130 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Train FLOPs</td><td rowspan="2">Params</td><td colspan="2">SQuAD 1.1 dev</td><td colspan="2"> SQuAD 2.0 dev</td><td colspan="2"> SQuAD 2.0 test</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>BERT-Base</td><td>6.4e19 (0.09x)</td><td>110M</td><td>80.8</td><td>88.5</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>BERT</td><td>1.9e20 (0.27x)</td><td>335M</td><td>84.1</td><td>90.9</td><td>79.0</td><td>81.8</td><td>80.0</td><td>83.0</td></tr><tr><td>SpanBERT</td><td>7.1e20 (1x)</td><td>335M</td><td>88.8</td><td>94.6</td><td>85.7</td><td>88.7</td><td>85.7</td><td>88.7</td></tr><tr><td>XLNet-Base</td><td>6.6e19 (0.09x)</td><td>117M</td><td>81.3</td><td></td><td>78.5</td><td></td><td></td><td></td></tr><tr><td>XLNet</td><td>3.9e21 (5.4x)</td><td>360M</td><td>89.7</td><td>95.1</td><td>87.9</td><td>90.6</td><td>87.9</td><td>90.7</td></tr><tr><td>RoBERTa-100K</td><td>6.4e20 (0.90x)</td><td>356M</td><td>一</td><td>94.0</td><td>一</td><td>87.7</td><td></td><td></td></tr><tr><td>RoBERTa-500K</td><td>3.2e21 (4.5x)</td><td>356M</td><td>88.9</td><td>94.6</td><td>86.5</td><td>89.4</td><td>86.8</td><td>89.8</td></tr><tr><td>ALBERT</td><td>3.1e22 (44x)</td><td>235M</td><td>89.3</td><td>94.8</td><td>87.4</td><td>90.2</td><td>88.1</td><td>90.9</td></tr><tr><td>BERT (ours)</td><td>7.1e20 (1x)</td><td>335M</td><td>88.0</td><td>93.7</td><td>84.7</td><td>87.5</td><td>1</td><td>1</td></tr><tr><td>ELECTRA-Base</td><td>6.4e19 (0.09x)</td><td>110M</td><td>84.5</td><td>90.8</td><td>80.5</td><td>83.3</td><td>1</td><td>1</td></tr><tr><td>ELECTRA-400K</td><td>7.1e20 (1x)</td><td>335M</td><td>88.7</td><td>94.2</td><td>86.9</td><td>89.6</td><td>1</td><td>1</td></tr><tr><td>ELECTRA-1.75M</td><td>3.1e21 (4.4x)</td><td>335M</td><td>89.7</td><td>94.9</td><td>88.0</td><td>90.6</td><td>88.7</td><td>91.4</td></tr></table>
|
| 131 |
+
|
| 132 |
+
# 3.5 EFFICIENCY ANALYSIS
|
| 133 |
+
|
| 134 |
+
We have suggested that posing the training objective over a small subset of tokens makes masked language modeling inefficient. However, it isn’t entirely obvious that this is the case. After all, the model still receives a large number of input tokens even though it predicts only a small number of masked tokens. To better understand where the gains from ELECTRA are coming from, we compare a series of other pre-training objectives that are designed to be a set of “stepping stones” between BERT and ELECTRA.
|
| 135 |
+
|
| 136 |
+
• ELECTRA $15 \%$ : This model is identical to ELECTRA except the discriminator loss only comes from the $15 \%$ of the tokens that were masked out of the input. In other words, the sum in the discriminator loss $\mathcal { L } _ { \mathrm { D i s c } }$ is over $i \in m$ instead of from 1 to $n$ .7 • Replace MLM: This objective is the same as masked language modeling except instead of replacing masked-out tokens with [MASK], they are replaced with tokens from a generator model. This objective tests to what extent ELECTRA’s gains come from solving the discrepancy of exposing the model to [MASK] tokens during pre-training but not fine-tuning. All-Tokens MLM: Like in Replace MLM, masked tokens are replaced with generator samples. Furthermore, the model predicts the identity of all tokens in the input, not just ones that were masked out. We found it improved results to train this model with an explicit copy mechanism that outputs a copy probability $D$ for each token using a sigmoid layer. The model’s output distribution puts $D$ weight on the input token plus $1 - D$ times the output of the MLM softmax. This model is essentially a combination of BERT and ELECTRA. Note that without generator replacements, the model would trivially learn to make predictions from the vocabulary for [MASK] tokens and copy the input for other ones.
|
| 137 |
+
|
| 138 |
+
Results are shown in Table 5. First, we find that ELECTRA is greatly benefiting from having a loss defined over all input tokens rather than just a subset: ELECTRA $15 \%$ performs much worse than ELECTRA. Secondly, we find that BERT performance is being slightly harmed from the pre-train fine-tune mismatch from [MASK] tokens, as Replace MLM slightly outperforms BERT. We note that BERT (including our implementation) already includes a trick to help with the pre-train/finetune discrepancy: masked tokens are replaced with a random token $10 \%$ of the time and are kept the same $10 \%$ of the time. However, our results suggest these simple heuristics are insufficient to fully solve the issue. Lastly, we find that All-Tokens MLM, the generative model that makes predictions over all tokens instead of a subset, closes most of the gap between BERT and ELECTRA. In total, these results suggest a large amount of ELECTRA’s improvement can be attributed to learning from all tokens and a smaller amount can be attributed to alleviating the pre-train fine-tune mismatch.
|
| 139 |
+
|
| 140 |
+
Table 5: Compute-efficiency experiments (see text for details).
|
| 141 |
+
|
| 142 |
+
<table><tr><td>Model</td><td>ELECTRA</td><td>All-Tokens MLM</td><td>Replace MLM</td><td>ELECTRA15%</td><td>BERT</td></tr><tr><td>GLUE score</td><td>85.0</td><td>84.3</td><td>82.4</td><td>82.4</td><td>82.2</td></tr></table>
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 4: Left and Center: Comparison of BERT and ELECTRA for different model sizes. Right: A small ELECTRA model converges to higher downstream accuracy than BERT, showing the improvement comes from more than just faster training.
|
| 146 |
+
|
| 147 |
+
The improvement of ELECTRA over All-Tokens MLM suggests that the ELECTRA’s gains come from more than just faster training. We study this further by comparing BERT to ELECTRA for various model sizes (see Figure 4, left). We find that the gains from ELECTRA grow larger as the models get smaller. The small models are trained fully to convergence (see Figure 4, right), showing that ELECTRA achieves higher downstream accuracy than BERT when fully trained. We speculate that ELECTRA is more parameter-efficient than BERT because it does not have to model the full distribution of possible tokens at each position, but we believe more analysis is needed to completely explain ELECTRA’s parameter efficiency.
|
| 148 |
+
|
| 149 |
+
# 4 RELATED WORK
|
| 150 |
+
|
| 151 |
+
Self-Supervised Pre-training for NLP Self-supervised learning has been used to learn word representations (Collobert et al., 2011; Pennington et al., 2014) and more recently contextual representations of words though objectives such as language modeling (Dai & Le, 2015; Peters et al., 2018; Howard & Ruder, 2018). BERT (Devlin et al., 2019) pre-trains a large Transformer (Vaswani et al., 2017) at the masked-language modeling task. There have been numerous extensions to BERT. For example, MASS (Song et al., 2019) and UniLM (Dong et al., 2019) extend BERT to generation tasks by adding auto-regressive generative training objectives. ERNIE (Sun et al., 2019a) and SpanBERT (Joshi et al., 2019) mask out contiguous sequences of token for improved span representations. This idea may be complementary to ELECTRA; we think it would be interesting to make ELECTRA’s generator auto-regressive and add a “replaced span detection” task. Instead of masking out input tokens, XLNet (Yang et al., 2019) masks attention weights such that the input sequence is autoregressively generated in a random order. However, this method suffers from the same inefficiencies as BERT because XLNet only generates $15 \%$ of the input tokens in this way. Like ELECTRA, XLNet may alleviate BERT’s pretrain-finetune discrepancy by not requiring [MASK] tokens, although this isn’t entirely clear because XLNet uses two “streams” of attention during pre-training but only one for fine-tuning. Recently, models such as TinyBERT (Jiao et al., 2019) and MobileBERT (Sun et al., 2019b) show that BERT can effectively be distilled down to a smaller model. In contrast, we focus more on pre-training speed rather than inference speed, so we train ELECTRA-Small from scratch.
|
| 152 |
+
|
| 153 |
+
Generative Adversarial Networks GANs (Goodfellow et al., 2014) are effective at generating high-quality synthetic data. Radford et al. (2016) propose using the discriminator of a GAN in downstream tasks, which is similar to our method. GANs have been applied to text data (Yu et al., 2017; Zhang et al., 2017), although state-of-the-art approaches still lag behind standard maximumlikelihood training (Caccia et al., 2018; Tevet et al., 2018). Although we do not use adversarial learning, our generator is particularly reminiscent of MaskGAN (Fedus et al., 2018), which trains the generator to fill in tokens deleted from the input.
|
| 154 |
+
|
| 155 |
+
Contrastive Learning Broadly, contrastive learning methods distinguish observed data points from fictitious negative samples. They have been applied to many modalities including text (Smith & Eisner, 2005), images (Chopra et al., 2005), and video (Wang & Gupta, 2015; Sermanet et al., 2017) data. Common approaches learn embedding spaces where related data points are similar (Saunshi et al., 2019) or models that rank real data points over negative samples (Collobert et al., 2011; Bordes et al., 2013). ELECTRA is particularly related to Noise-Contrastive Estimation (NCE) (Gutmann & Hyvarinen, 2010), which also trains a binary classifier to distinguish real and fake data points. ¨
|
| 156 |
+
|
| 157 |
+
Word2Vec (Mikolov et al., 2013), one of the earliest pre-training methods for NLP, uses contrastive learning. In fact, ELECTRA can be viewed as a massively scaled-up version of Continuous Bagof-Words (CBOW) with Negative Sampling. CBOW also predicts an input token given surrounding context and negative sampling rephrases the learning task as a binary classification task on whether the input token comes from the data or proposal distribution. However, CBOW uses a bag-ofvectors encoder rather than a transformer and a simple proposal distribution derived from unigram token frequencies instead of a learned generator.
|
| 158 |
+
|
| 159 |
+
# 5 CONCLUSION
|
| 160 |
+
|
| 161 |
+
We have proposed replaced token detection, a new self-supervised task for language representation learning. The key idea is training a text encoder to distinguish input tokens from high-quality negative samples produced by an small generator network. Compared to masked language modeling, our pre-training objective is more compute-efficient and results in better performance on downstream tasks. It works well even when using relatively small amounts of compute, which we hope will make developing and applying pre-trained text encoders more accessible to researchers and practitioners with less access to computing resources. We also hope more future work on NLP pre-training will consider efficiency as well as absolute performance, and follow our effort in reporting compute usage and parameter counts along with evaluation metrics.
|
| 162 |
+
|
| 163 |
+
# ACKNOWLEDGEMENTS
|
| 164 |
+
|
| 165 |
+
We thank Allen Nie, Prajit Ramachandran, audiences at the CIFAR LMB meeting and U. de Montreal, and the anonymous reviewers for their thoughtful comments and suggestions. We thank ´ Matt Peters for answering our questions about ELMo, Alec Radford for answers about GPT, Naman Goyal and Myle Ott for answers about RoBERTa, Zihang Dai for answers about XLNet, Zhenzhong Lan for answers about ALBERT, and Danqi Chen and Mandar Joshi for answers about SpanBERT. Kevin is supported by a Google PhD Fellowship.
|
| 166 |
+
|
| 167 |
+
# REFERENCES
|
| 168 |
+
|
| 169 |
+
Antoine Bordes, Nicolas Usunier, Alberto Garc´ıa-Duran, Jason Weston, and Oksana Yakhnenko. ´ Translating embeddings for modeling multi-relational data. In NeurIPS, 2013.
|
| 170 |
+
|
| 171 |
+
Avishek Joey Bose, Huan Ling, and Yanshuai Cao. Adversarial contrastive estimation. In ACL, 2018.
|
| 172 |
+
|
| 173 |
+
Massimo Caccia, Lucas Caccia, William Fedus, Hugo Larochelle, Joelle Pineau, and Laurent Charlin. Language GANs falling short. arXiv preprint arXiv:1811.02549, 2018.
|
| 174 |
+
|
| 175 |
+
Jamie Callan, Mark Hoy, Changkuk Yoo, and Le Zhao. Clueweb09 data set, 2009. URL https: //lemurproject.org/clueweb09.php/.
|
| 176 |
+
|
| 177 |
+
Daniel M. Cer, Mona T. Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. Semeval- ˜ 2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In SemEval@ACL, 2017.
|
| 178 |
+
Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. CVPR, 2005.
|
| 179 |
+
Kevin Clark, Minh-Thang Luong, Urvashi Khandelwal, Christopher D. Manning, and Quoc V. Le. BAM! Born-again multi-task networks for natural language understanding. In ACL, 2019.
|
| 180 |
+
Ronan Collobert, Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel P. ´ Kuksa. Natural language processing (almost) from scratch. JMLR, 2011.
|
| 181 |
+
Andrew M Dai and Quoc V Le. Semi-supervised sequence learning. In NeurIPS, 2015.
|
| 182 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019.
|
| 183 |
+
William B. Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In IWP@IJCNLP, 2005.
|
| 184 |
+
Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. Unified language model pre-training for natural language understanding and generation. In NeurIPS, 2019.
|
| 185 |
+
William Fedus, Ian J. Goodfellow, and Andrew M. Dai. MaskGAN: Better text generation via filling in the . In ICLR, 2018.
|
| 186 |
+
Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and William B. Dolan. The third pascal recognizing textual entailment challenge. In ACL-PASCAL@ACL, 2007.
|
| 187 |
+
Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
|
| 188 |
+
Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle ¨ for unnormalized statistical models. In AISTATS, 2010.
|
| 189 |
+
Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In ACL, 2018.
|
| 190 |
+
Shankar Iyer, Nikhil Dandekar, and Kornl Csernai. First Quora dataset release: Question pairs, 2017. URL https://data.quora.com/ First-Quora-Dataset-Release-Question-Pairs.
|
| 191 |
+
Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019.
|
| 192 |
+
Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. SpanBERT: Improving pre-training by representing and predicting spans. arXiv preprint arXiv:1907.10529, 2019.
|
| 193 |
+
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. ALBERT: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942, 2019.
|
| 194 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 195 |
+
Tomas Mikolov, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. In ICLR Workshop Papers, 2013.
|
| 196 |
+
Robert Parker, David Graff, Junbo Kong, Ke Chen, and Kazuaki Maeda. English gigaword, fifth edition. Technical report, Linguistic Data Consortium, Philadelphia, 2011.
|
| 197 |
+
|
| 198 |
+
Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In EMNLP, 2014.
|
| 199 |
+
|
| 200 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In NAACL-HLT, 2018.
|
| 201 |
+
|
| 202 |
+
Jason Phang, Thibault Fevry, and Samuel R Bowman. Sentence encoders on STILTs: Supplemen- ´ tary training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088, 2018.
|
| 203 |
+
|
| 204 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
|
| 205 |
+
|
| 206 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. https://blog.openai.com/language-unsupervised, 2018.
|
| 207 |
+
|
| 208 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy S. Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In EMNLP, 2016.
|
| 209 |
+
|
| 210 |
+
Nikunj Saunshi, Orestis Plevrakis, Sanjeev Arora, Mikhail Khodak, and Hrishikesh Khandeparkar. A theoretical analysis of contrastive unsupervised representation learning. In ICML, 2019.
|
| 211 |
+
|
| 212 |
+
Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, and Sergey Levine. Time-contrastive networks: Self-supervised learning from video. ICRA, 2017.
|
| 213 |
+
|
| 214 |
+
Noah A. Smith and Jason Eisner. Contrastive estimation: Training log-linear models on unlabeled data. In ACL, 2005.
|
| 215 |
+
|
| 216 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. $\mathrm { N g }$ and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013.
|
| 217 |
+
|
| 218 |
+
Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. MASS: Masked sequence to sequence pre-training for language generation. In ICML, 2019.
|
| 219 |
+
|
| 220 |
+
Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, and Hua Wu. Ernie: Enhanced representation through knowledge integration. arXiv preprint arXiv:1904.09223, 2019a.
|
| 221 |
+
|
| 222 |
+
Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. MobileBERT: Task-agnostic compression of bert for resource limited devices, 2019b. URL https: //openreview.net/forum?id $=$ SJxjVaNKwB.
|
| 223 |
+
|
| 224 |
+
Guy Tevet, Gavriel Habib, Vered Shwartz, and Jonathan Berant. Evaluating text gans as language models. In NAACL-HLT, 2018.
|
| 225 |
+
|
| 226 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
|
| 227 |
+
|
| 228 |
+
Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008.
|
| 229 |
+
|
| 230 |
+
Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In ICLR, 2019.
|
| 231 |
+
|
| 232 |
+
Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. ICCV, 2015.
|
| 233 |
+
|
| 234 |
+
Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471, 2018.
|
| 235 |
+
|
| 236 |
+
Adina Williams, Nikita Nangia, and Samuel R. Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In NAACL-HLT, 2018.
|
| 237 |
+
|
| 238 |
+
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3-4):229–256, 1992.
|
| 239 |
+
|
| 240 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. XLNet: Generalized autoregressive pretraining for language understanding. In NeurIPS, 2019.
|
| 241 |
+
|
| 242 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yingrui Yu. SeqGAN: Sequence generative adversarial nets with policy gradient. In AAAI, 2017.
|
| 243 |
+
|
| 244 |
+
Yizhe Zhang, Zhe Gan, Kai Fan, Zhi Chen, Ricardo Henao, Dinghan Shen, and Lawrence Carin. Adversarial feature matching for text generation. In ICML, 2017.
|
| 245 |
+
|
| 246 |
+
Yukun Zhu, Ryan Kiros, Richard S. Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. ICCV, 2015.
|
| 247 |
+
|
| 248 |
+
# A PRE-TRAINING DETAILS
|
| 249 |
+
|
| 250 |
+
The following details apply to both our ELECTRA models and BERT baselines. We mostly use the same hyperparameters as BERT. We set $\lambda$ , the weight for the discriminator objective in the loss to 50.8 We use dynamic token masking with the masked positions decided on-the-fly instead of during preprocessing. Also, we did not use the next sentence prediction objective proposed in the original BERT paper, as recent work has suggested it does not improve scores (Yang et al., 2019; Liu et al., 2019). For our ELECTRA-Large model, we used a higher mask percent (25 instead of 15) because we noticed the generator was achieving high accuracy with $15 \%$ masking, resulting in very few replaced tokens. We searched for the best learning rate for the Base and Small models out of [1e-4, 2e-4, 3e-4, 5e-4] and selected $\lambda$ out of [1, 10, 20, 50, 100] in early experiments. Otherwise we did no hyperparameter tuning beyond the experiments in Section 3.2. The full set of hyperparameters are listed in Table 6.
|
| 251 |
+
|
| 252 |
+
# B FINE-TUNING DETAILS
|
| 253 |
+
|
| 254 |
+
For Large-sized models, we used the hyperparameters from Clark et al. (2019) for the most part. However, after noticing that RoBERTa (Liu et al., 2019) uses more training epochs (up to 10 rather than 3) we searched for the best number of train epochs out of [10, 3] for each task. For SQuAD, we decreased the number of train epochs to 2 to be consistent with BERT and RoBERTa. For Basesized models we searched for a learning rate out of [3e-5, 5e-5, 1e-4, 1.5e-4] and the layer-wise learning-rate decay out of [0.9, 0.8, 0.7], but otherwise used the same hyperparameters as for Large models. We found the small models benefit from a larger learning rate and searched for the best one out of [1e-4, 2e-4, 3e-4, 5e-3]. With the exception of number of train epochs, we used the same hyperparameters for all tasks. In contrast, previous research on GLUE such as BERT, XLNet, and RoBERTa separately searched for the best hyperparameters for each task. We expect our results would improve slightly if we performed the same sort of additional hyperparameter search. The full set of hyperparameters is listed in Table 7.
|
| 255 |
+
|
| 256 |
+
Following BERT, we do not show results on the WNLI GLUE task for the dev set results, as it is difficult to beat even the majority classifier using a standard fine-tuning-as-classifier approach. For the GLUE test set results, we apply the standard tricks used by many of the GLUE leaderboard submissions including RoBERTa (Liu et al., 2019), XLNet (Yang et al., 2019), and ALBERT (Lan et al., 2019). Specifically:
|
| 257 |
+
|
| 258 |
+
• For RTE and STS we use intermediate task training (Phang et al., 2018), starting from an ELECTRA checkpoint that has been fine-tuned on MNLI. For RTE, we found it helpful to combine this with a lower learning rate of 2e-5.
|
| 259 |
+
|
| 260 |
+
Table 6: Pre-train hyperparameters. We also train an ELECTRA-Large model for 1.75M steps (other hyperparameters are identical).
|
| 261 |
+
|
| 262 |
+
<table><tr><td>Hyperparameter</td><td>Small</td><td>Base</td><td>Large</td></tr><tr><td>Number of layers</td><td>12</td><td>12</td><td>24</td></tr><tr><td>Hidden Size</td><td>256</td><td>768</td><td>1024</td></tr><tr><td>FFN inner hidden size</td><td>1024</td><td>3072</td><td>4096</td></tr><tr><td>Attention heads</td><td>4</td><td>12</td><td>16</td></tr><tr><td>Attention head size</td><td>64</td><td>64</td><td>64</td></tr><tr><td>Embedding Size</td><td>128</td><td>768</td><td>1024</td></tr><tr><td>Generator Size (multiplier for hidden-size, FFN-size,and num-attention-heads)</td><td>1/4</td><td>1/3</td><td>1/4</td></tr><tr><td>Mask percent</td><td>15</td><td>15</td><td>25</td></tr><tr><td>Learning Rate Decay</td><td>Linear</td><td>Linear</td><td>Linear</td></tr><tr><td>Warmup steps</td><td>10000</td><td>10000</td><td>10000</td></tr><tr><td>Learning Rate</td><td>5e-4</td><td>2e-4</td><td>2e-4</td></tr><tr><td>Adam e</td><td>1e-6</td><td>1e-6</td><td>1e-6</td></tr><tr><td>Adam β1</td><td>0.9</td><td>0.9</td><td>0.9</td></tr><tr><td>Adam β2</td><td>0.999</td><td>0.999</td><td>0.999</td></tr><tr><td>Attention Dropout</td><td>0.1</td><td>0.1</td><td>0.1</td></tr><tr><td>Dropout</td><td>0.1</td><td>0.1</td><td>0.1</td></tr><tr><td>Weight Decay</td><td>0.01</td><td>0.01</td><td>0.01</td></tr><tr><td>Batch Size</td><td>128</td><td></td><td></td></tr><tr><td>Train Steps (BERT/ELECTRA)</td><td>1.45M/1M</td><td>256 1M/766K</td><td>2048 464K/400K</td></tr></table>
|
| 263 |
+
|
| 264 |
+
Table 7: Fine-tune hyperparameters
|
| 265 |
+
|
| 266 |
+
<table><tr><td>Hyperparameter</td><td>GLUE Value</td></tr><tr><td>Learning Rate</td><td>3e-4 for Small, 1e-4 for Base,5e-5 for Large</td></tr><tr><td>Adam e</td><td>1e-6</td></tr><tr><td>Adam β1</td><td>0.9</td></tr><tr><td>Adam β2</td><td>0.999</td></tr><tr><td>Layerwise LR decay</td><td>0.8 for Base/Small, O.9 for Large</td></tr><tr><td>Learning rate decay</td><td>Linear</td></tr><tr><td>Warmup fraction</td><td>0.1</td></tr><tr><td>Attention Dropout</td><td>0.1</td></tr><tr><td>Dropout</td><td>0.1</td></tr><tr><td>Weight Decay</td><td>0</td></tr><tr><td>Batch Size</td><td>32</td></tr><tr><td>Train Epochs</td><td>10 for RTE and STS,2for SQuAD,3 for other tasks</td></tr></table>
|
| 267 |
+
|
| 268 |
+
• For WNLI, we follow the trick described in Liu et al. (2019) where we extract candidate antecedents for the pronoun using rules and train a model to score the correct antecedent highly. However, different from Liu et al. (2019), the scoring function is not based on MLM probabilities. Instead, we fine-tune ELECTRA’s discriminator so it assigns high scores to the tokens of the correct antecedent when the correct antecedent replaces the pronoun. For example, if the Winograd schema is “the trophy could not fit in the suitcase because it was too big,” we train the discriminator so it gives a high score to “trophy” in “the trophy could not fit in the suitcase because the trophy was too big” but a low score to “suitcase” in “the trophy could not fit in the suitcase because the suitcase was too big.” • For each task we ensemble the best 10 of 30 models fine-tuned with different random seeds but initialized from the same pre-trained checkpoint.
|
| 269 |
+
|
| 270 |
+
While these tricks do improve scores, they make having clear scientific comparisons more difficult because they require extra work to implement, require lots of compute, and make results less applesto-apples because different papers implement the tricks differently. We therefore also report results for ELECTRA-1.75M with the only trick being dev-set model selection (best of 10 models), which is the setting BERT used to report results, in Table 8.
|
| 271 |
+
|
| 272 |
+
For our SQuAD 2.0 test set submission, we fine-tuned 20 models from the same pre-trained checkpoint and submitted the one with the best dev set score.
|
| 273 |
+
|
| 274 |
+
# C DETAILS ABOUT GLUE
|
| 275 |
+
|
| 276 |
+
We provide further details about the GLUE benchmark tasks below
|
| 277 |
+
|
| 278 |
+
• CoLA: Corpus of Linguistic Acceptability (Warstadt et al., 2018). The task is to determine whether a given sentence is grammatical or not. The dataset contains $8 . 5 \mathrm { k }$ train examples from books and journal articles on linguistic theory.
|
| 279 |
+
SST: Stanford Sentiment Treebank (Socher et al., 2013). The tasks is to determine if the sentence is positive or negative in sentiment. The dataset contains $6 7 \mathrm { k }$ train examples from movie reviews.
|
| 280 |
+
• MRPC: Microsoft Research Paraphrase Corpus (Dolan & Brockett, 2005). The task is to
|
| 281 |
+
predict whether two sentences are semantically equivalent or not. The dataset contains $3 . 7 \mathrm { k }$ train examples from online news sources.
|
| 282 |
+
• STS: Semantic Textual Similarity (Cer et al., 2017). The tasks is to predict how semantically similar two sentences are on a 1-5 scale. The dataset contains $5 . 8 \mathrm { k }$ train examples drawn from new headlines, video and image captions, and natural language inference data.
|
| 283 |
+
QQP: Quora Question Pairs (Iyer et al., 2017). The task is to determine whether a pair of questions are semantically equivalent. The dataset contains $3 6 4 \mathrm { k }$ train examples from the community question-answering website Quora.
|
| 284 |
+
• MNLI: Multi-genre Natural Language Inference (Williams et al., 2018). Given a premise sentence and a hypothesis sentence, the task is to predict whether the premise entails the hypothesis, contradicts the hypothesis, or neither. The dataset contains $3 9 3 \mathrm { k }$ train examples drawn from ten different sources.
|
| 285 |
+
• QNLI: Question Natural Language Inference; constructed from SQuAD (Rajpurkar et al., 2016). The task is to predict whether a context sentence contains the answer to a question sentence. The dataset contains $1 0 8 \mathrm { k }$ train examples from Wikipedia.
|
| 286 |
+
RTE: Recognizing Textual Entailment (Giampiccolo et al., 2007). Given a premise sentence and a hypothesis sentence, the task is to predict whether the premise entails the hypothesis or not. The dataset contains $2 . 5 \mathrm { k }$ train examples from a series of annual textual entailment challenges.
|
| 287 |
+
|
| 288 |
+
# D FURTHER RESULTS ON GLUE
|
| 289 |
+
|
| 290 |
+
We report results for ELECTRA-Base and ELECTRA-Small on the GLUE test set in Table 8. Furthermore, we push the limits of base-sized and small-sized models by training them on the XLNet data instead of wikibooks and for much longer (4e6 train steps); these models are called ELECTRA-Base $^ { + + }$ and ELECTRA-Smal $^ { + + }$ in the table. For ELECTRA-Small $^ { + + }$ we also increased the sequence length to 512; otherwise the hyperparameters are the same as the ones listed in Table 6. Lastly, the table contains results for ELECTRA-1.75M without the tricks described in Appendix B. Consistent with dev-set results in the paper, ELECTRA-Base outperforms BERT-Large while ELECTRA-Small outperforms GPT in terms of average score. Unsurprisingly, the $^ { + + }$ models perform even better. The small model scores are even close to TinyBERT (Jiao et al., 2019) and MobileBERT (Sun et al., 2019b). These models learn from BERT-Base using sophisticated distillation procedures. Our ELECTRA models, on the other hand, are trained from scratch. Given the success of distilling BERT, we believe it would be possible to build even stronger small pre-trained models by distilling ELECTRA. ELECTRA appears to be particularly effective at CoLA. In CoLA the goal is to distinguish linguistically acceptable sentences from ungrammatical ones, which fairly closely matches ELECTRA’s pre-training task of identifying fake tokens, perhaps explaining ELECTRA’s strength at the task.
|
| 291 |
+
|
| 292 |
+
<table><tr><td>Model</td><td>Train FLOPs</td><td>Params</td><td></td><td> CoLA SST MRPC STS</td><td></td><td>QQP MNLI QNLI RTE</td><td></td><td></td><td>Avg.</td></tr><tr><td>TinyBERT</td><td>6.4e19+ (45x+)</td><td>14.5M</td><td>51.1</td><td>93.1 82.6</td><td>83.7</td><td>89.1 84.6</td><td>90.4</td><td>70.0</td><td>80.6</td></tr><tr><td>MobileBERT</td><td>6.4e19+ (45x+)</td><td>25.3M</td><td>51.1</td><td>92.6 84.5</td><td>84.8</td><td>88.3 84.3</td><td>91.6</td><td>70.4</td><td>81.0</td></tr><tr><td>GPT</td><td>4.0e19 (29x)</td><td>117M</td><td>45.4</td><td>91.3 75.7</td><td>80.0</td><td>88.5 82.1</td><td>88.1</td><td>56.0</td><td>75.9</td></tr><tr><td>BERT-Base</td><td>6.4e19 (45x)</td><td>110M</td><td>52.1</td><td>93.5 84.8</td><td>85.8</td><td>89.2 84.6</td><td>90.5</td><td>66.4</td><td>80.9</td></tr><tr><td>BERT-Large</td><td>1.9e20 (135x)</td><td>335M</td><td>60.5</td><td>94.9 85.4</td><td>86.5</td><td>89.3 86.7</td><td>92.7</td><td>70.1</td><td>83.3</td></tr><tr><td>SpanBERT</td><td>7.1e20 (507x)</td><td>335M</td><td>64.3</td><td>94.8 87.9</td><td>89.9</td><td>89.5 87.7</td><td>94.3</td><td>79.0</td><td>85.9</td></tr><tr><td>ELECTRA-Small</td><td>1.4e18 (1x)</td><td>14M</td><td>54.6</td><td>89.1 83.7</td><td>80.3</td><td>88.0 79.7</td><td>87.7</td><td>60.8</td><td>78.0</td></tr><tr><td>ELECTRA-Small++</td><td>3.3e19 (18x)</td><td>14M</td><td>55.6</td><td>91.1 84.9</td><td>84.6</td><td>88.0 81.6</td><td>88.3</td><td>63.6</td><td>79.7</td></tr><tr><td>ELECTRA-Base</td><td>6.4e19 (45x)</td><td>110M</td><td>59.7</td><td>93.4 86.7</td><td>87.7</td><td>89.1 85.8</td><td>92.7</td><td>73.1</td><td>83.5</td></tr><tr><td>ELECTRA-Base++</td><td>3.3e20 (182x)</td><td>110M</td><td>64.6</td><td>96.0 88.1</td><td>90.2</td><td>89.5 88.5</td><td>93.1</td><td>75.2</td><td>85.7</td></tr><tr><td>ELECTRA-1.75M</td><td>3.1e21 (2200x)</td><td>330M</td><td>68.1</td><td>96.7 89.2</td><td>91.7 90.4</td><td>90.7</td><td>95.5</td><td>86.1</td><td>88.6</td></tr></table>
|
| 293 |
+
|
| 294 |
+
Table 8: Results for models on the GLUE test set. Only models with single-task finetuning (no ensembling, task-specific tricks, etc.) are shown.
|
| 295 |
+
|
| 296 |
+
# E COUNTING FLOPS
|
| 297 |
+
|
| 298 |
+
We chose to measure compute usage in terms of floating point operations (FLOPs) because it is a measure agnostic to the particular hardware, low-level optimizations, etc. However, it is worth noting that in some cases abstracting away hardware details is a drawback because hardware-centered optimizations can be key parts of a model’s design, such as the speedup ALBERT (Lan et al., 2019) gets by tying weights and thus reducing communication overhead between TPU workers. We used TensorFlow’s FLOP-counting capabilities9 and checked the results with by-hand computation. We made the following assumptions:
|
| 299 |
+
|
| 300 |
+
• An “operation” is a mathematical operation, not a machine instruction. For example, an exp is one op like an add, even though in practice the exp might be slower. We believe this assumption does not substantially change compute estimates because matrix-multiplies dominate the compute for most models. Similarly, we count matrix-multiplies as $2 * m * n$ FLOPs instead of $m * n$ as one might if considering fused multiply-add operations. The backwards pass takes the same number of FLOPs as the forward pass. This assumption is not exactly right (e.g., for softmax cross entropy loss the backward pass is faster), but importantly, the forward/backward pass FLOPs really are the same for matrix-multiplies, which is most of the compute anyway. We assume “dense” embedding lookups (i.e., multiplication by a one-hot vector). In practice, sparse embedding lookups are much slower than constant time; on some hardware accelerators dense operations are actually faster than sparse lookups.
|
| 301 |
+
|
| 302 |
+
# F ADVERSARIAL TRAINING
|
| 303 |
+
|
| 304 |
+
Here we detail attempts to adversarially train the generator instead of using maximum likelihood. In particular we train the generator $G$ to maximize the discriminator loss $\mathcal { L } _ { \mathrm { D i s c } }$ . As our discriminator isn’t precisely the same as the discriminator of a GAN (see the discussion in Section 2), this method is really an instance of Adversarial Contrastive Estimation (Bose et al., 2018) rather than Generative Adversarial Training. It is not possible to adversarially train the generator by back-propagating through the discriminator (e.g., as in a GAN trained on images) due to the discrete sampling from the generator, so we use reinforcement learning instead.
|
| 305 |
+
|
| 306 |
+
Our generator is different from most text generation models in that it is non-autogregressive: predictions are made independently. In other words, rather than taking a sequence of actions where each action generates a token, the generator takes a single giant action of generating all tokens simultaneously, where the probability for the action factorizes as the product of generator probabilities for each token. To deal with this enormous action space, we make the following simplifying assumption: that the discriminator’s prediction $D ( \pmb { x } ^ { \mathrm { c o r r u p t } } , t )$ depends only on the token $x _ { t }$ and the non-replaced tokens $\{ x _ { i } : i \notin m \}$ , i.e., it does not depend on other generated tokens $\{ \hat { x } _ { i } : i \in m \land i \neq t \}$ . This isn’t too bad of an assumption because a relatively small number of tokens are replaced, and it greatly simplifies credit assignment when using reinforcement learning. Notationally, we show this assumption by (in a slight abuse of notation) by writing $D ( \hat { x } _ { t } | \pmb { x } ^ { \mathrm { m a s \bar { k } e d } } )$ for the discriminator predicting whether the generated token $\hat { x } _ { t }$ equals the original token $x _ { t }$ given the masked context $\bar { \boldsymbol { x } } ^ { \mathrm { m a s k e d } }$ . A useful consequence of this assumption is that the discriminator score for non-replaced tokens $( D ( x _ { t } | x ^ { \mathrm { m a s k e d } } )$ for $t \not \in m ,$ ) is independent of $p _ { G }$ because we are assuming it does not depend on any replaced token. Therefore these tokens can be ignored when training $G$ to maximize $\bar { \mathcal { L } } _ { \mathrm { D i s c } }$ . During training we seek to find
|
| 307 |
+
|
| 308 |
+
$$
|
| 309 |
+
\underset { \theta _ { G } } { \arg \operatorname* { m a x } } \mathcal { L } _ { \mathrm { D i s c } } = \underset { \theta _ { G } } { \arg \operatorname* { m a x } } \ \underset { { \boldsymbol x } , m , \hat { \boldsymbol x } } { \mathbb { E } } \left( \sum _ { t = 1 } ^ { n } - { \mathbb { I } } ( x _ { t } ^ { \mathrm { c o r u p t } } = x _ { t } ) \log D ( { \boldsymbol x } ^ { \mathrm { c o r u p t } } , t ) - \right.
|
| 310 |
+
$$
|
| 311 |
+
|
| 312 |
+
Using the simplifying assumption, we approximate the above by finding the argmax of
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\begin{array} { r l } & { \quad \underset { x , m , \hat { x } } { \mathbb { E } } \left( \displaystyle \sum _ { t \in m } - \mathbb { 1 } \left( \hat { x } _ { t } = x _ { t } \right) \log D ( \hat { x } | x ^ { \mathrm { m a s k e d } } ) - \mathbb { 1 } \big ( \hat { x } _ { t } \neq x _ { t } \big ) \log \big ( 1 - D ( \hat { x } | x ^ { \mathrm { m a s k e d } } ) \big ) \right) } \\ & { = \underset { x , m } { \mathbb { E } } \displaystyle \sum _ { t \in m } \sum _ { \hat { x } _ { t } \sim p _ { G } } \mathbb { E } \left( \hat { x } _ { t } , x \right) } \end{array}
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
In short, the simplifying assumption allows us to decompose the loss over the individual generated tokens. We cannot directly find arg $\operatorname* { m a x } _ { \theta _ { G } }$ using gradient ascent because it is impossible to backpropagate through discrete sampling of $\hat { x }$ . Instead, we use policy gradient reinforcement learning (Williams, 1992). In particular, we use the REINFORCE gradient
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
\nabla _ { \theta _ { G } } \mathcal { L } _ { \mathrm { D i s c } } \approx \underset { x , m } { \mathbb { E } } \sum _ { t \in m } \underset { \dot { x } _ { t } \sim p _ { G } } { \mathbb { E } } \nabla _ { \theta _ { g } } \log p _ { G } ( \hat { x } _ { t } | x ^ { \mathrm { m a s k e d } } ) [ R ( \hat { x } _ { t } , x ) - b ( x ^ { \mathrm { m a s k e d } } , t ) ]
|
| 322 |
+
$$
|
| 323 |
+
|
| 324 |
+
Where $b$ is a learned baseline implemented as $b ( \pmb { x } ^ { \mathrm { m a s k e d } } , t ) \ = \ - \log \mathrm { s i g m o i d } ( \omega ^ { T } h _ { G } ( \pmb { x } ^ { \mathrm { m a s k e d } } ) _ { t } )$ where $h _ { G } ( \pmb { x } ^ { \mathrm { m a s k e d } } )$ are the outputs of the generator’s Transformer encoder. The baseline is trained with cross-entropy loss to match the reward for the corresponding position. We approximate the expectations with a single sample and learn $\theta _ { G }$ with gradient ascent. Despite receiving no explicit feedback about which generated tokens are correct, we found the adversarial training resulted in a fairly accurate generator (for a 256-hidden-size generator, the adversarially trained one achieves $58 \%$ accuracy at masked language modeling while the same sized MLE generator gets $65 \%$ ). However, using this generator did not improve over the MLE-trained one on downstream tasks (see the right of Figure 3 in the main paper).
|
| 325 |
+
|
| 326 |
+
# G EVALUATING ELECTRA AS A MASKED LANGUAGE MODEL
|
| 327 |
+
|
| 328 |
+
This sections details some initial experiments in evaluating ELECTRA as a masked language model. Using slightly different notation from the main paper, given a context $c$ consisting of a text sequence with one token $x$ masked-out, the discriminator loss can be written as
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\begin{array} { l l } { \dot { \mathrm { \tiny ~ \cdot p i s c } } = - \displaystyle \sum _ { x \in \mathrm { v o c a b } } \Big ( ( 1 - p _ { \mathrm { m a s k } } ) p _ { \mathrm { d a t a } } ( x | c ) \log D ( x , c ) + } & { \mathrm { / / u n m a s k e d ~ t o k e n } } \\ { ~ } \\ { p _ { \mathrm { m a s k } } p _ { \mathrm { d a t a } } ( x | c ) p _ { G } ( x | c ) \log D ( x , c ) + } & { \mathrm { / / g e n e r a t o r ~ s a m p l e s ~ c o r r e c t ~ t o k e n } } \\ { p _ { \mathrm { m a s k } } ( 1 - p _ { \mathrm { d a t a } } ( x | c ) ) p _ { G } ( x | c ) \log ( 1 - D ( x , c ) ) \Big ) } & { \mathrm { / / g e n e r a t o r ~ s a m p l e s ~ i n c o r r e c t ~ t o k e n } . } \end{array}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
Finding the critical points of this loss with respect to $D$ shows that for a fixed generator the optimal discriminator is
|
| 335 |
+
|
| 336 |
+
$$
|
| 337 |
+
D ( x , c ) = p _ { \mathrm { d a t a } } ( x | c ) ( a + p _ { G } ( x | c ) ) / ( a p _ { \mathrm { d a t a } } ( x | c ) + p _ { G } ( x | c ) )
|
| 338 |
+
$$
|
| 339 |
+
|
| 340 |
+
which means
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
p _ { \mathrm { d a t a } } ( x | c ) = D ( x , c ) p _ { G } ( x | c ) / ( a ( 1 - D ( x , c ) ) + p _ { G } ( x | c ) )
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
where $a ~ = ~ ( 1 ~ - ~ p _ { \mathrm { m a s k } } ) / p _ { \mathrm { m a s k } }$ is the number of unmasked tokens for every masked token. We can use this expression to evaluate ELECTRA as a masked language model by selecting $\mathrm { a r g m a x } _ { x \in \mathrm { v o c a b } } D ( x , \bar { c } ) p _ { G } ( x | c ) / ( a ( 1 - D ( x , c ) ) + p _ { G } ( x | c ) )$ as the model’s prediction for a given context. In practice, selecting over the whole vocabulary is very expensive, so we instead take the argmax over the top 100 predictions from the generator.10 Using this method, we compared ELECTRA-Base and BERT-Base on the Wikipedia+BooksCorpus dataset. We found that BERT slightly outperformed ELECTRA at masked language modeling $7 7 . 9 \%$ vs $7 5 . 5 \%$ accuracy). It is possible that the assumption of an optimal discriminator, which is certainly far from correct, is harming ELECTRA’s accuracy under this evaluation scheme. However, perhaps it is not too surprising that a model like BERT that is trained specifically for generation performs better at generation while a model with a discriminative objective like ELECTRA is better at being fine-tuned on discriminative tasks. We think comparisons of BERT’s and ELECTRA’s MLM predictions might be an interesting way to uncover more about the differences between ELECTRA and BERT encoders in future work.
|
| 347 |
+
|
| 348 |
+
# H NEGATIVE RESULTS
|
| 349 |
+
|
| 350 |
+
We briefly describe a few ideas that did not look promising in our initial experiments:
|
| 351 |
+
|
| 352 |
+
• We initially attempted to make BERT more efficient by strategically masking-out tokens (e.g., masking our rarer tokens more frequently, or training a model to guess which tokens BERT would struggle to predict if they were masked out). This resulted in fairly minor speedups over regular BERT.
|
| 353 |
+
• Given that ELECTRA seemed to benefit (up to a certain point) from having a weaker generator (see Section 3.2), we explored raising the temperature of the generator’s output softmax or disallowing the generator from sampling the correct token. Neither of these improved results.
|
| 354 |
+
• We tried adding a sentence-level contrastive objective. For this task, we kept $20 \%$ of input sentences unchanged rather than noising them with the generator. We then added a prediction head to the model that predicted if the entire input was corrupted or not. Surprisingly, this slightly decreased scores on downstream tasks.
|
parse/train/r1xMH1BtvB/r1xMH1BtvB_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1xMH1BtvB/r1xMH1BtvB_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1xMH1BtvB/r1xMH1BtvB_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rkgKBhA5Y7/rkgKBhA5Y7_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|