ZHANGYUXUAN-zR commited on
Commit
e94f7a9
·
verified ·
1 Parent(s): 3b1b017

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/0NXUSlb6oEu/0NXUSlb6oEu.md +286 -0
  2. parse/train/0NXUSlb6oEu/0NXUSlb6oEu_content_list.json +1126 -0
  3. parse/train/0NXUSlb6oEu/0NXUSlb6oEu_middle.json +0 -0
  4. parse/train/0NXUSlb6oEu/0NXUSlb6oEu_model.json +0 -0
  5. parse/train/6YEQUn0QICG/6YEQUn0QICG.md +578 -0
  6. parse/train/6YEQUn0QICG/6YEQUn0QICG_content_list.json +0 -0
  7. parse/train/6YEQUn0QICG/6YEQUn0QICG_middle.json +0 -0
  8. parse/train/6YEQUn0QICG/6YEQUn0QICG_model.json +0 -0
  9. parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM.md +286 -0
  10. parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_content_list.json +1582 -0
  11. parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_middle.json +0 -0
  12. parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_model.json +0 -0
  13. parse/train/BJlLdhNFPr/BJlLdhNFPr.md +501 -0
  14. parse/train/BJlLdhNFPr/BJlLdhNFPr_content_list.json +0 -0
  15. parse/train/BJlLdhNFPr/BJlLdhNFPr_middle.json +0 -0
  16. parse/train/BJlLdhNFPr/BJlLdhNFPr_model.json +0 -0
  17. parse/train/BJm4T4Kgx/BJm4T4Kgx.md +363 -0
  18. parse/train/BJm4T4Kgx/BJm4T4Kgx_content_list.json +1787 -0
  19. parse/train/BJm4T4Kgx/BJm4T4Kgx_middle.json +0 -0
  20. parse/train/BJm4T4Kgx/BJm4T4Kgx_model.json +0 -0
  21. parse/train/HJxwDiActX/HJxwDiActX.md +318 -0
  22. parse/train/HJxwDiActX/HJxwDiActX_content_list.json +1661 -0
  23. parse/train/HJxwDiActX/HJxwDiActX_middle.json +0 -0
  24. parse/train/HJxwDiActX/HJxwDiActX_model.json +0 -0
  25. parse/train/Hkg9HgBYwH/Hkg9HgBYwH.md +291 -0
  26. parse/train/Hkg9HgBYwH/Hkg9HgBYwH_content_list.json +1588 -0
  27. parse/train/Hkg9HgBYwH/Hkg9HgBYwH_middle.json +0 -0
  28. parse/train/Hkg9HgBYwH/Hkg9HgBYwH_model.json +0 -0
  29. parse/train/HyeJf1HKvS/HyeJf1HKvS.md +0 -0
  30. parse/train/HyeJf1HKvS/HyeJf1HKvS_content_list.json +0 -0
  31. parse/train/HyeJf1HKvS/HyeJf1HKvS_middle.json +0 -0
  32. parse/train/HyeJf1HKvS/HyeJf1HKvS_model.json +0 -0
  33. parse/train/OMizHuea_HB/OMizHuea_HB.md +507 -0
  34. parse/train/OMizHuea_HB/OMizHuea_HB_content_list.json +0 -0
  35. parse/train/OMizHuea_HB/OMizHuea_HB_middle.json +0 -0
  36. parse/train/OMizHuea_HB/OMizHuea_HB_model.json +0 -0
  37. parse/train/S1esMkHYPr/S1esMkHYPr.md +403 -0
  38. parse/train/S1esMkHYPr/S1esMkHYPr_content_list.json +0 -0
  39. parse/train/S1esMkHYPr/S1esMkHYPr_middle.json +0 -0
  40. parse/train/S1esMkHYPr/S1esMkHYPr_model.json +0 -0
  41. parse/train/S1xcx3C5FX/S1xcx3C5FX.md +333 -0
  42. parse/train/S1xcx3C5FX/S1xcx3C5FX_content_list.json +1688 -0
  43. parse/train/S1xcx3C5FX/S1xcx3C5FX_middle.json +0 -0
  44. parse/train/S1xcx3C5FX/S1xcx3C5FX_model.json +0 -0
  45. parse/train/SJe3HiC5KX/SJe3HiC5KX.md +247 -0
  46. parse/train/SJe3HiC5KX/SJe3HiC5KX_content_list.json +1098 -0
  47. parse/train/SJe3HiC5KX/SJe3HiC5KX_middle.json +0 -0
  48. parse/train/SJe3HiC5KX/SJe3HiC5KX_model.json +0 -0
  49. parse/train/SkgC6TNFvr/SkgC6TNFvr.md +351 -0
  50. parse/train/SkgC6TNFvr/SkgC6TNFvr_content_list.json +1866 -0
parse/train/0NXUSlb6oEu/0NXUSlb6oEu.md ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Improving Robustness using Generated Data
2
+
3
+ Sven Gowal\*, Sylvestre-Alvise Rebuffi\*, Olivia Wiles, Florian Stimberg, Dan Calian and Timothy Mann DeepMind, London {sgowal,sylvestre}@deepmind.com
4
+
5
+ # Abstract
6
+
7
+ Recent work argues that robust training requires substantially larger datasets than those required for standard classification. On CIFAR-10 and CIFAR-100, this translates into a sizable robust-accuracy gap between models trained solely on data from the original training set and those trained with additional data extracted from the $^ { 6 6 } 8 0$ Million Tiny Images” dataset (80M-TI). In this paper, we explore how generative models trained solely on the original training set can be leveraged to artificially increase the size of the original training set and improve adversarial robustness to $\ell _ { p }$ norm-bounded perturbations. We identify the sufficient conditions under which incorporating additional generated data can improve robustness, and demonstrate that it is possible to significantly reduce the robust-accuracy gap to models trained with additional real data. Surprisingly, we show that even the addition of non-realistic random data (generated by Gaussian sampling) can improve robustness. We evaluate our approach on CIFAR-10, CIFAR-100, SVHN and TINYIMAGENET against $\ell _ { \infty }$ and $\ell _ { 2 }$ norm-bounded perturbations of size $\epsilon =$ $8 / 2 5 5$ and $\epsilon = 1 2 8 / 2 5 5$ , respectively. We show large absolute improvements in robust accuracy compared to previous state-of-the-art methods. Against $\ell _ { \infty }$ normbounded perturbations of size $\epsilon = 8 / 2 5 5$ , our models achieve $6 6 . 1 0 \%$ and $3 3 . 4 9 \%$ robust accuracy on CIFAR-10 and CIFAR-100, respectively (improving upon the state-of-the-art by $+ 8 . 9 6 \%$ and $+ 3 . 2 9 \%$ ). Against $\ell _ { 2 }$ norm-bounded perturbations of size $\epsilon = 1 2 8 / 2 5 5$ , our model achieves $7 8 . 3 1 \%$ on CIFAR-10 $( + 3 . 8 1 \% )$ . These results beat most prior works that use external data.
8
+
9
+ # 1 Introduction
10
+
11
+ Neural networks are being deployed in a wide variety of applications ranging from ranking content on the web [15] to autonomous driving [5] via medical diagnostics [22]. It has become increasingly important to ensure that deployed models are robust and generalize to various input perturbations. Unfortunately, the addition of imperceptible adversarial perturbations can cause neural networks to make incorrect predictions [9, 10, 27, 44, 64]. There has been a lot of work on understanding and generating adversarial perturbations [1, 4, 10, 64], and on building defenses that are robust to such perturbations [27, 49, 60, 82]. We note that while robustness and invariance to input perturbations is crucial to the deployment of machine learning models in various applications, it can also have broader negative impacts to society such as hindering privacy [63] or increasing bias [68].
12
+
13
+ The adversarial training procedure proposed by Madry et al. [49] feeds adversarially perturbed examples back into the training data. It is widely regarded as one of the most successful method to train robust deep neural networks [30], and it has been augmented in different ways – with changes in the attack procedure [25], loss function [50, 82] or model architecture [76, 85]. We highlight the works by Carmon et al. [11], Najafi et al. [51], Uesato et al. [72], Zhai et al. [80] who simultaneously proposed the use of additional unlabeled external data. While the addition of external data helped boost robust accuracy by a large margin, progress in the setting without additional data has slowed (see Fig. 1). On CIFAR-10 [42] against $\ell _ { \infty }$ perturbations of size $\epsilon = 8 / 2 5 5$ , the best known model obtains a robust accuracy of $6 5 . 8 7 \%$ when using additional data. The same model obtains a robust accuracy of $5 7 . 1 4 \%$ without this data [30]. As a result, we ask ourselves whether it is possible to leverage the information contained in the original training set to a greater extent. This manuscript challenges the status-quo. To the contrary of standard training where it is widely believed that generative models lack diversity and that the samples they produce cannot be used to train better classifiers [59], we demonstrate both theoretically and experimentally that these generated samples can be used to improve robustness (using the approach described in Fig. 2 and Sec. 3.3). We make the following contributions:
14
+
15
+ ![](images/8eb9ee6d3777e7d8166f9e6f212649a7a9831e7486d3e37219d94bb171c3f31b.jpg)
16
+ Figure 1: Robust accuracy of models against AUTOATTACK [16] on CIFAR-10 with $\ell _ { \infty }$ perturbations of size $8 / 2 5 5$ displayed in publication order. Our method explores how generated data can be used to improve robust accuracy by $+ 8 . 9 6 \%$ without using any additional external data. This constitutes the largest jump in robust accuracy in this setting. Our best model reaches a robust accuracy of $6 6 . 1 0 \%$ against $\mathbf { A } \mathbf { A } { + } \mathbf { M } \mathbf { T }$ [30].
17
+
18
+ ![](images/3e6487378e9debb436c615ff8311fb38dd237c64fb4e3dc9118341aa066fb749.jpg)
19
+ Figure 2: Overview of our approach. Our method initially trains a generative model and a non-robust classifier. The non-robust classifier is used to provide pseudo-labels to the generated data. Finally, generated and original training data are combined to train a robust classifier.
20
+
21
+ • We demonstrate in Sec. 3.2 that it is possible to use low-quality random inputs (sampled from a conditional Gaussian fit of the training data) to improve robust accuracy on CIFAR-10 against $\ell _ { \infty }$ perturbations of size $\epsilon = 8 / 2 5 5$ $( + 0 . 9 3 \%$ on a WRN-28-10) and provide a justification and sufficient conditions in Sec. 4.
22
+ • We leverage higher quality generated inputs (i.e., inputs generated by generative models solely trained on the original data), and study four recent generative models: the Denoising Diffusion Probabilistic Model (DDPM) [36], StyleGAN2 [40], BigGAN [7] and the Very Deep Variational Auto-Encoder (VDVAE) [14] (Sec. 5). We show that DDPM samples cover most closely the real data distribution (as measured by the distance to the test set in the Inception feature space). Using images generated by the DDPM allows us to reach a robust accuracy of $6 6 . 1 0 \%$ on CIFAR-10 against $\ell _ { \infty }$ perturbations of size $\epsilon = 8 / 2 5 5$ (an improvement of $+ 8 . 9 6 \%$ upon the stateof-the-art). Notably, our best CIFAR-10 models beat all techniques that use additional data (see Sec. 6) and constitutes one of the largest improvements ever made in the setting without additional data. As a consequence, we demonstrate that it is possible to avoid the use of 80M-TI [65] which has been withdrawn due to presence of offensive images.1
23
+
24
+ # 2 Related work
25
+
26
+ Adversarial $\ell _ { p }$ norm-bounded attacks. Since Biggio et al. [4], Szegedy et al. [64] observed that neural networks which achieve high accuracy are highly vulnerable to adversarial examples, the art of crafting increasingly sophisticated adversarial examples has received a lot of attention. Goodfellow et al. [27] proposed the Fast Gradient Sign Method (FGSM) which generates adversarial examples with a single normalized gradient step. It was followed by $\mathrm { R + F G S M }$ [67], which adds a randomization step, and the Basic Iterative Method (BIM) [44], which takes multiple smaller gradient steps.
27
+
28
+ Adversarial training as a defense. Adversarial training [49] is widely regarded as one of the most successful methods to train deep neural networks robust to such attacks. It has received significant attention and various modifications have emerged [25, 50, 76]. A notable work is TRADES [82], which balances the trade-off between standard and robust accuracy, and achieved state-of-the-art performance against $\ell _ { \infty }$ norm-bounded perturbations on CIFAR-10. More recently, the work from Rice et al. [60] studied robust overfitting and demonstrated that improvements similar to TRADES could be obtained more easily using classical adversarial training with early stopping. Finally, Gowal et al. [30] highlighted how different hyper-parameters (such as network size and model weight averaging) affect robustness.
29
+
30
+ Data-driven augmentations. Works, such as AutoAugment [18] and related RandAugment [19], learn augmentation policies directly from data. These methods are tuned to improve standard classification accuracy and have been shown to work well on multiple datasets. DeepAugment [34] explores how perturbations of the parameters of pre-trained image-to-image models can be used to generate augmented datasets that provide increased robustness to common corruptions [32]. Similarly, generative models can be used to create novel views of images [37, 39, 57] by manipulating them in latent space. When optimized and used during training, these novel views reduce the impact of spurious correlations and improve accuracy [28, 73]. Most recently, Laidlaw et al. [45] proposed an adversarial training method based on bounding a neural perceptual distance (i.e., an approximation of the true perceptual distance). While these works make significant contributions towards improving generalization and robustness to semantic perturbations, they do not improve robustness to $\ell _ { p }$ normbounded perturbations.
31
+
32
+ Robustness to $\ell _ { p }$ norm-bounded perturbations using generative modeling. Finally, we highlight works, such as Defense-GAN [61] or ME-Net [77], which leverage data modeling techniques to create stronger defenses against $\ell _ { p }$ norm-bounded attacks. Unfortunately, these techniques are not as robust as they seem and are broken by adaptive attacks [2, 16, 66]. Overall, to the best of our knowledge, there is little [48] to no evidence that data augmentations or generative models can be used to improve robustness to $\ell _ { p }$ norm-bounded attacks. In fact, generative models mostly lack diversity and it is widely believed that the samples they produce cannot be used to train classifiers to the same accuracy than those trained on original datasets [59]. We differentiate ourselves from earlier works by leveraging additional generated samples for training rather than modifying the defense procedure, and by establishing sufficient conditions under which such samples improve robustness.
33
+
34
+ # 3 Adversarial training using generated data
35
+
36
+ The rest of this manuscript is organized as follows. In this section, we provide an overview of adversarial training, demonstrate using a motivational example that low-quality generated data can be leveraged to improve robustness to adversarial examples, and describe our method. In Sec. 4, we detail sufficient conditions that explain why generated samples can improve robustness and explore the limitations of our approach. In Sec. 5, we analyze four complementary and recent generative models in the context of our method. Finally, we provide experimental results in Sec. 6.
37
+
38
+ # 3.1 Adversarial training
39
+
40
+ For classification tasks, Madry et al. [49] propose to find model parameters $\pmb { \theta }$ that minimize the adversarial risk:
41
+
42
+ $$
43
+ \underset { \pmb { \theta } } { \arg \operatorname* { m i n } } \mathbb { E } _ { ( \pmb { x } , \pmb { y } ) \sim \mathcal { D } } \left( \underset { \delta \in S } { \operatorname* { m a x } } \left[ f ( \pmb { x } + \pmb { \delta } ; \pmb { \theta } ) \neq y \right] \right)
44
+ $$
45
+
46
+ where $\mathcal { D }$ is a data distribution over pairs of examples $_ { \textbf { \em x } }$ and corresponding labels $y$ , $f ( \cdot ; \pmb \theta )$ is a model parametrized by $\theta , [ \cdot ]$ is the Iverson bracket notation and corresponds to the $0 - 1$ loss, and $s$ defines the set of allowed perturbations. For $\ell _ { p }$ norm-bounded perturbations of size $\epsilon$ , the perturbation set is defined as $S _ { p } = \{ \bar { \delta } \mid \| \delta \| _ { p } \leq \epsilon \}$ . Hence, for $\ell _ { \infty }$ norm-bounded perturbations $\begin{array} { r } { S = S _ { \infty } } \end{array}$ and for $\ell _ { 2 }$ norm-bounded perturbations ${ \mathcal { S } } = { \mathcal { S } } _ { 2 }$ . In the rest of this manuscript, we use $\epsilon _ { p }$ to denote $\ell _ { p }$ norm-bounded perturbations of size $\epsilon$ (e.g., $\epsilon _ { \infty } = 8 / 2 5 5 )$ .
47
+
48
+ ![](images/5e1e8166420c62722485c6a7820dfe98653f2088972c7e84afa5280b7a8886d0.jpg)
49
+ Figure 3: Low-quality random inputs can improve robustness. Panel (a) shows the robust test accuracy (against $\mathbf { A A } { + } \mathbf { M } \mathbf { T }$ [30]) of a WRN-28-10 against $\epsilon _ { \infty } = 8 / 2 5 5$ on CIFAR-10 trained with additional data randomly sampled from a class-conditional Gaussian fit of the training data. We compare how the proportion of original CIFAR-10 and generated images affects robustness ( $0 \%$ means generated samples only, while $100 \%$ means original CIFAR-10 train set only). Panel (b) shows some of the class-conditional Gaussian samples that are used during training.
50
+
51
+ In practice, given a training set $\mathcal { D } _ { \mathrm { t r a i n } }$ , the adversarial training procedure replaces the $0 - 1$ loss with the cross-entropy loss $l _ { \mathrm { c e } }$ and is formulated as
52
+
53
+ $$
54
+ \underset { \pmb { \theta } } { \arg \operatorname* { m i n } } \mathbb { E } _ { ( \pmb { x } , \pmb { y } ) \in \mathcal { D } _ { \mathrm { t r a i n } } } \left( \underset { \delta \in \mathcal { S } } { \operatorname* { m a x } } l _ { \mathrm { c e } } ( f ( \pmb { x } + \delta ; \pmb { \theta } ) , \ b { y } ) \right) .
55
+ $$
56
+
57
+ # 3.2 Generated data can improve robust generalization
58
+
59
+ Data augmentations can reduce the generalization error of standard (non-robust) training [18, 19, 23, 81]. However, to the contrary of standard training, augmentations beyond random flips and crops [31] – such as Cutout [23], mixup [81], AutoAugment [18] or RandAugment [19] – have been unsuccessful in the context of adversarial training [30, 60, 75]. The gap in robust accuracy between models trained with and without additional data suggests that common augmentation techniques, which tend to produce augmented views that are close to the original image they augment, are intrinsically limited in their ability to improve robust generalization. In other words, augmented samples are diverse (if the training set is diverse), but not complementary to the training set. This phenomenon is particularly exacerbated when training adversarially robust models which are known to require an amount of data polynomial in the number of input dimensions [62].
60
+
61
+ We hypothesize that, to improve robust generalization, it is critical to use additional training samples (augmented or generated) that are diverse and that complement the original training set (in the sense that these new samples should ideally come from the same underlying distribution as the training set but should not duplicate the training set). To test this hypothesis, we propose to use samples generated from a simple class-conditional Gaussian fit of the training data. By construction, such samples (shown in Fig. 3(b)) are extremely blurry but diverse. We proceed by fitting a multivariate Gaussian to each set of 5K training images corresponding to each class in CIFAR-10. For each class, we sample 100K images resulting in a new dataset of 1M datapoints (no further filtering is applied). In Fig. 3(a), we show the performance of various robust models trained by decreasing the proportion of real samples present in each batch from $100 \%$ (original data only) to $0 \%$ (generated data only). Decreasing this proportion reduces the importance of the original data. We observe that all proportions between $50 \%$ and $90 \%$ provide improvements in robust accuracy. Most surprisingly, the optimal proportion of $80 \%$ provides an absolute improvement of $+ 0 . 9 3 \%$ , which is an improvement comparable in size to the ones provided by model weight averaging or TRADES [30]. As we show in Sec. 4, the drop in robust accuracy for proportions below $50 \%$ is expected in the capacity-limited regime. This experiment directly motivates our method.
62
+
63
+ # 3.3 Method
64
+
65
+ Given access to a pre-trained non-robust classifier $f _ { \mathrm { N R } }$ and an unconditional generative model approximating the true data distribution $\overline { { \mathcal { D } } }$ by a distribution $\hat { \mathcal { D } }$ , we would like to train a robust classifier $f ( \cdot ; \pmb \theta )$ parameterized by $\pmb \theta$ . We propose the following optimization problem:
66
+
67
+ $$
68
+ \underset { \theta } { \arg \operatorname* { m i n } } \alpha \cdot \underset { ( \alpha , y ) \in \mathcal { D } _ { \mathrm { t r a i n } } } { \mathbb { E } } \left( \operatorname* { m a x } _ { \delta \in \mathcal { S } } l _ { \infty } ( f ( \alpha + \delta ; \theta ) , y ) \right) + ( 1 - \alpha ) \cdot \underset { x \sim \hat { \mathcal { D } } } { \mathbb { E } } \left( \operatorname* { m a x } _ { \delta \in \mathcal { S } } l _ { \infty } ( f ( \alpha + \delta ; \theta ) , f _ { \mathrm { N R } } ( x ) ) \right)
69
+ $$
70
+
71
+ where $\alpha$ corresponds to a mixing factor that blends examples from the training set with those that are generated. When $\alpha$ is set to one, our method reverts back to the original adversarial training formulation in Eq. 2. When $\alpha$ is set to zero, our method only uses generated samples with their corresponding pseudo-labels. In practice, for efficiency, rather than generating samples on-the-fly, we pre-generate samples offline. Hence, both the original training set $\mathcal { D } _ { \mathrm { t r a i n } }$ and generated set $\hat { \mathcal { D } }$ contain a finite number of samples. We have the advantage, however, to be able to generate significantly more samples than present in the original training set. In App. B, we evaluate how varying the number of generated samples impacts adversarial robustness.
72
+
73
+ Overall, the complete method is described in Fig. 2 and is composed of three steps: $( i )$ it starts by training the non-robust classifier and generative model on the original training set (for CIFAR-10, that corresponds to 50K images only); (ii) then, the generated dataset is constructed by drawing samples from the generative model and pseudo-labeling them using the non-robust classifier; $( i i i )$ finally, the robust classifier is trained using both the original training set and the generated dataset using Eq. 3.
74
+
75
+ # 4 Randomness might be enough
76
+
77
+ In this section, we formalize our notation (Sec. 4.1), and provide three sufficient conditions that explain why generated data can improve robustness (Sec. 4.2). In summary, $( i )$ the pre-trained, non-robust classifier $f _ { \mathrm { N R } }$ used for pseudo-labeling must be accurate, $( i i )$ the likelihood of sampling examples that are adversarial to this non-robust classifier must be low, and $( i i i )$ the generative model must be able to sample images from the true data distribution with non-zero probability.
78
+
79
+ # 4.1 Setup
80
+
81
+ Given a ground-truth function $f ^ { \star }$ , we would like to find optimal parameters $\pmb { \theta } ^ { \star }$ for $f ( \cdot ; \theta ^ { \star } )$ that minimize the adversarial risk,
82
+
83
+ $$
84
+ \pmb \theta ^ { \star } = \underset { \pmb \theta } { \arg \operatorname* { m i n } } \mathbb { E } _ { \pmb { x } \sim \mathcal { D } } \left( \operatorname* { m a x } _ { \pmb \delta \in \mathcal { S } } \left[ f ( \pmb x + \pmb \delta ; \pmb \theta ) \neq f ^ { \star } ( \pmb x ) \right] \right) ,
85
+ $$
86
+
87
+ without access to the true data distribution $\mathcal { D }$ or the ground-truth classifier $f ^ { \star }$ . As such, we replace the distribution $\mathcal { D }$ with an approximated distribution $\hat { \mathcal { D } }$ (from a generative model) and use a pre-trained non-robust classifier $f _ { \mathrm { N R } }$ instead of $f ^ { \star }$ (see Sec. 3.3). This results in sub-optimal parameters
88
+
89
+ $$
90
+ \hat { \pmb { \theta } } ^ { \star } = \underset { \pmb { \theta } } { \arg \operatorname* { m i n } } \mathbb { E } _ { \pmb { x } \sim \hat { \mathcal { D } } } \left( \underset { \delta \in \cal S } { \operatorname* { m a x } } \left[ f ( \pmb { x } + \pmb { \delta } ; \pmb { \theta } ) \neq f _ { \mathrm { N R } } ( \pmb { x } ) \right] \right) .
91
+ $$
92
+
93
+ We introduce the unknown probability measure $\mu$ corresponding to the true data distribution $\mathcal { D }$ and defined over the set of inputs ${ \mathcal { A } } \subseteq \mathbb { R } ^ { n }$ (where $n$ is the input dimensionality), as well as the known probability measure $\hat { \mu }$ corresponding to the approximated distribution $\hat { \mathcal { D } }$ . The set of relevant inputs ${ \mathcal { X } } \subseteq A$ (i.e., the set of realistic images for which we would like to enforce robustness) is the support of $\mu$ such that $\mu ( \mathcal { X } ) = 1$ and $\forall \mathcal { W } \subseteq \mathcal { X } , \mu ( \mathcal { W } ) > 0$ if $\mathcal { W }$ is non-empty. We assume that each input $\mathbf { \boldsymbol { x } } \in \mathcal { X }$ can be assigned a label $y = f _ { - } ^ { \star } ( { \pmb x } )$ where $f ^ { \star } : \mathcal { X } \mapsto \mathcal { Y }$ is the ground-truth classifier (only valid for realistic images) and $\mathscr { y } \in 2 ^ { \mathbb { Z } }$ is the set of labels. Finally, given a perturbation set $s$ , we restrict labels such that there exists no realistic image within the perturbation set of another that has a different label; i.e., for $\mathbf { \boldsymbol { x } } \in \mathcal { X }$ , for all $\delta \in \{ \delta ^ { \prime } \in \mathcal { S } | { \pmb x } + \delta ^ { \prime } \in \mathcal { X } \}$ we have $f ^ { \star } ( { \pmb x } ) = f ^ { \star } ( { \pmb x } + \delta )$ .
94
+
95
+ # 4.2 Limitations and sufficient conditions
96
+
97
+ To understand the limitations of our approach, it is useful to think about idealized sufficient conditions that would allow the sub-optimal parameters $\hat { \pmb { \theta } } ^ { \star }$ to approach the performance of the optimal parameters $\pmb { \theta } ^ { \star }$ . First, we concentrate on the capacity-limited regime and later extrapolate to the infinite-capacity, infinite-compute regime to gain more insights. The first sufficient condition concerns the pre-trained non-robust classifier and holds for both regimes.
98
+
99
+ Condition 1 (accurate non-robust classifier). The pre-trained non-robust classifier $f _ { N R } : \mathcal { A } \mapsto \mathcal { V }$ must be accurate on all realistic inputs $\pmb { x } \in \mathcal { X } \colon \forall \pmb { x } \in \mathcal { X }$ , $f _ { N R } ( x ) = f ^ { \star } ( x )$ .
100
+
101
+ Indeed, if we had access to the true distribution $\mathcal { D }$ , Eq. 4 and Eq. 5 could be made equal by setting $f ^ { \star } ( x ) = f _ { \mathrm { N R } } ( x )$ . 2 In the capacity-limited regime, when Cond. 1 is satisfied, the problem reduces to a robust generalization problem. This problem is widely studied [3, 21, 70] and one can show that the adversarial risk is bounded by the Wasserstein distance between the training distribution $\hat { \mathcal { D } }$ and true data distribution $\mathcal { D }$ (under mild assumptions) [46]. In other words, as $\hat { \mathcal { D } }$ approaches $\mathcal { D }$ , we expect the robust accuracy of $f ( \cdot ; \hat { \pmb \theta } ^ { \star } )$ to approach the one of $f ( \cdot ; \theta ^ { \star } )$ . This intuitively leads to the second sufficient condition and Prop. 1.
102
+
103
+ Condition 2 (accurate approximated distribution). The approximated data distribution $\hat { \mathcal { D } }$ and true data distribution $\mathcal { D }$ must be equivalent: $\mu ( \mathcal { W } ) = \hat { \mu } ( \mathcal { W } )$ for all measurable subset $\mathcal { W } \subseteq \mathcal { X }$ .
104
+
105
+ Proposition 1 (capacity-limited regime). Cond. 1 and Cond. 2 are sufficient conditions that allow the sub-optimal parameters $\hat { \pmb { \theta } } ^ { \star }$ to match the performance of the optimal parameters $\pmb { \theta } ^ { \star }$ .
106
+
107
+ Together, Cond. 1 and 2 provide sufficient conditions for the capacity-limited regime (see proof in Sec. E.1). Cond. 2 (and associated bounds from [46]) generally indicates that the robust accuracy of the classifier $f ( \cdot ; \hat { \pmb \theta } ^ { \star } )$ should increase as the quality of the generative model that provides the approximated distribution $\hat { \mathcal { D } }$ improves. However, these two conditions do not provide a satisfying answer when it comes to understanding why seemingly random data can help improve robustness (as demonstrated in Sec. 3.2). To help our understanding, it is worth analyzing the consequence of increasing the capacity of $f$ . In particular, in the infinite-capacity regime, Cond. 2 can be relaxed and replaced by the following two conditions, and Prop. 1 becomes Prop. 2.
108
+
109
+ Condition 3 (unlikely adversarial examples). It is not possible to sample a point $\mathbf { \boldsymbol { x } } \sim \hat { \mathcal { D } }$ outside the realistic set $\mathcal { X }$ such that it is adversarial to fNR: $\hat { \mu } ( \mathcal { W } ) = 0$ on the measurable subset $\mathcal { W } =$ $\{ x + \delta \mid x \in \mathcal { X } , \delta \in \mathcal { S } , f _ { N R } ( x + \delta ) \neq f _ { N R } ( x ) \}$ .
110
+
111
+ Condition 4 (sufficient coverage). The likelihood of any finite sample in the set of realistic inputs $\mathcal { X }$ obtained from $\hat { \mathcal { D } }$ should be non-zero under the measure $\hat { \mu }$ : $\hat { \mu } ( \mathcal { W } ) > 0$ for all open measurable subsets $\mathcal { W } \subseteq \mathcal { X }$ .
112
+
113
+ Proposition 2 (infinite-capacity regime). Cond. 1, Cond. 3 and Cond. 4 are sufficient conditions that allow the sub-optimal parameters $\hat { \pmb { \theta } } ^ { \star }$ to match the performance of the optimal parameters $\pmb { \theta } ^ { \star }$ when the model $f$ has infinite capacity.
114
+
115
+ Cond. 3 enforces that labels are non-conflicting within the perturbation set of a realistic input,3 while Cond. 4 guarantees that realistic inputs appear with enough frequency during training. Together, Cond. 1, 3 and 4 do not only provide sufficient conditions for the infinite-capacity regime (see proof in Sec. E.1), but also explain why samples generated by a simple class-conditional Gaussian-fit can be used to improve robustness. Indeed, they imply that it is not necessary to have access to either the true data distribution or a perfect generative model when given enough compute and capacity. However, when compute and capacity are limited, it is critical that the optimization in Eq. 5 focuses on realistic inputs and that the distribution $\hat { \mathcal { D } }$ be as close as possible to the true distribution $\mathcal { D }$ . In practice, this translates to the fact that better generative models (such as DDPM) can be used to achieve better robustness. We have relegated a discussion about the theoretical impact of the mixing factor $\alpha$ in Sec. E.2. Briefly stated, increasing $\alpha$ improves the realism of training samples (since the training samples mostly come from the original training set), but comes at the cost of a reduction in complementarity with the training set.
116
+
117
+ Table 1: Complementarity and coverage of augmented and generated samples. We sample 10K images from the train set and various different generative models. For each sample in each set, we find its closest neighbor in Inception feature space (obtained after the pooling layer). To estimate complementarity, we report the proportion of samples with a nearest neighbor in either the train set, test set or the sampled set itself. To estimate coverage, we report the proportion of unique neighbors in the train and test set. We also include the IS and FID computed from 50K samples from each set and the robust accuracy obtained by a WRN-28-10 models trained on 1M samples (Sec. 6).
118
+
119
+ <table><tr><td rowspan="2"> SETUP</td><td colspan="3">COMPLEMENTARITY</td><td colspan="2">COVERAGE</td><td colspan="2">INCEPTION METRICS</td><td rowspan="2">ROBUST ACCURACY ↑</td></tr><tr><td>TRAIN</td><td>Test</td><td>SELF</td><td>TRAIN</td><td>TesT</td><td>Is↑</td><td>FID↓</td></tr><tr><td>mixup [81]</td><td>90.34%</td><td>3.91%</td><td>5.75%</td><td>90.43%</td><td>45.61%</td><td>9.33 ± 0.22</td><td>7.71</td><td></td></tr><tr><td>Class-conditional Gaussian-fit</td><td>0.13%</td><td>0.22%</td><td>99.65%</td><td>12.36%</td><td>12.24%</td><td>3.64±0.03</td><td>117.62</td><td>55.37%</td></tr><tr><td>VDVAE [14]</td><td>11.97%</td><td>12.14%</td><td>75.89%</td><td>34.20%</td><td>33.76%</td><td>6.88 ±0.05</td><td>26.44</td><td>55.51%</td></tr><tr><td>BigGAN[7]</td><td>14.97%</td><td>14.81%</td><td>70.22%</td><td>38.86%</td><td>39.06%</td><td>9.73 ±0.07</td><td>13.78</td><td>55.99%</td></tr><tr><td>StyleGAN2 [40]</td><td>28.13%</td><td>27.22%</td><td>44.65%</td><td>50.16%</td><td>48.29%</td><td>10.04± 0.11</td><td>2.57</td><td>58.17%</td></tr><tr><td>DDPM[36]</td><td>29.29%</td><td>29.17%</td><td>41.54%</td><td>49.07%</td><td>49.10%</td><td>9.50 ± 0.14</td><td>3.15</td><td>60.73%</td></tr></table>
120
+
121
+ # 5 Generative models
122
+
123
+ The derivations from Sec. 4 and the experiment performed in Sec. 3.2 strongly suggest that generative models, which are capable of creating novel images [54], are viable augmentation candidates for adversarial training.
124
+
125
+ Generative models considered in this work. In this work, we limit ourselves to generative models that are solely trained on the original train set, as we focus on how to improve robustness in the setting without external data. We consider four recent and fundamentally different models: (i) BigGAN [7]: one of the first large-scale application of Generative Adversarial Networks (GANs) which produced significant improvements in Frechet Inception Distance (FID) and Inception Score (IS) on CIFAR-10 (as well as on IMAGENET); (ii) VDVAE [14]: a hierarchical Variational AutoEncoder (VAE) which outperforms alternative VAE baselines; (iii) StyleGAN2 [40]: an improved version of StyleGAN which borrows interesting properties from the style transfer literature; and (iv) DDPM [36]: a diffusion probabilistic model based on Langevin dynamics that reaches state-of-the-art FID on CIFAR-10.4 As we have done for the simpler class-conditional Gaussian-fit, for each model, we sample 100K images per class, resulting in 1M images in total (see App. D for details). Samples are shown in App. D.
126
+
127
+ Analysis of complementary and coverage. In Table 1, we evaluate how close Cond. 2 and Cond. 4 are to be satisfied in practice. To do so, we sample 10K images from each generative model. We also sample 10K images from the CIFAR-10 training set, and apply mixup to them as a point of comparison.5 We observe that mixup achieves a similar IS to the BigGAN and DDPM models. In the left-most set of three columns, for each augmented or generated sample, we report whether its closest neighbor in the Inception6 feature space belongs to the train set, test set or the generated set itself (more details are available in App. D). An ideal generative model should create samples that are equally likely to be close to images from each set. We observe that mixup tends to produce samples that are too close to the original train set and that lack complementarity, potentially explaining its limited usefulness in terms of improving adversarial robustness. Meanwhile, generated samples (including those from the class-conditional Gaussian-fit) are much more likely to be close to images of the test set. We also observe that the DDPM neighbor distribution matches more closely the ideal uniform distribution. Images generated by BigGAN and VDVAE tend to have their nearest neighbor among themselves which indicates that these samples are either far from the train and test distributions or produce overly similar samples. Images generated by StyleGAN2, which reach an FID of 2.57 and IS of 10.07 that are better than the DDPM scores, have a slightly worse neighbor distribution (indicating a slight memorization of the training set). The middle two columns measure the ratio of unique neighbors that are matched in the train and test set. This provides a rough approximation of coverage. We observe a similar trend where samples from the DDPM seem to provide a better coverage of the true data distribution. Note that, while these numbers rely on an inaccurate distance measure (i.e., Euclidean distance in Inception feature space) and should be taken with a grain of salt, they correlate well with the results obtained from our experiments. For example, models trained with StyleGAN2 samples obtain a lower robust accuracy than those trained with DDPM samples – despite obtaining better FID and IS.
128
+
129
+ ![](images/a258345ad42ce663855c9b9f41cda34f90e8fb3d6c743c8733aecb768f7c50f9.jpg)
130
+ Figure 4: Impact of violations of the sufficient conditions detailed in Sec. 4. We report the robust test accuracy (against $\mathbf { A } \mathbf { A } { + } \mathbf { M } \mathbf { T }$ [30]) when training different model architectures against $\epsilon _ { \infty } = 8 / 2 5 5$ . In panel (a), non-robust classifiers with different clean acccuracies are used for pseudo-labeling. In panel (b), we vary the mixture of training samples from a class-conditional Gaussian and a BigGAN distribution while the test distribution is the BigGAN distribution. In panel (c), we fix the proportion of samples from the class-conditional Gaussian to $9 9 \%$ and increase the number of classes from the BigGAN distribution seen during training (thus increasing coverage).
131
+
132
+ # 6 Experiments
133
+
134
+ The experimental setup is explained in App. A. We use Residual Networks (ResNets) and Wide ResNets (WRNs) [31, 79] with Swish/SiLU [33] activations. We use stochastic weight averaging [38] with a decay rate of 0.995. For adversarial training, we use TRADES [82] with 10 Projected Gradient Descent (PGD) steps. We train for 400 CIFAR-10-equivalent epochs with a batch size of 1024 (i.e., 19K steps). We evaluate our models against AUTOATTACK [16] and MULTITARGETED [29], which is denoted $\mathbf { A A } { + } \mathbf { M } \mathbf { T }$ [30]. For comparison, we trained ten WRN-28-10 models on CIFAR-10 (without additional generated samples) against $\epsilon _ { \infty } = 8 / 2 5 5$ . The resulting robust accuracy is $5 4 . 4 4 { \pm } 0 . 3 9 \%$ , thus showing a relatively low variance. Furthermore, as we will see, our best models are well clear of the threshold for statistical significance. On CIFAR-10 against $\epsilon _ { \infty } = 8 / 2 5 5$ without additional generated samples a ResNet-18 achieves a robust accuracy of $5 0 . 6 4 \%$ and a WRN-70-16 achieves $5 7 . 1 4 \%$ . Unless stated otherwise, all results pertain to CIFAR-10.
135
+
136
+ # 6.1 Sufficient conditions
137
+
138
+ The first set of experiments probes how violations of Cond. 1, 2 and 4 impact robustness against $\epsilon _ { \infty } = 8 / 2 5 5$ (violations to Cond. 3 have an impact equivalent to those of Cond. 1). All experiments are summarized in Fig. 4 where we train models with increasing capacity.
139
+
140
+ Non-robust classifier accuracy. In Fig. 4(a), we train models using 1M samples generated by the DDPM and vary the accuracy of the the pre-trained, non-robust classifier $f _ { \mathrm { N R } }$ . We evaluate the robust accuracy obtained on CIFAR-10 test set. We observe that robustness improves as the accuracy of $f _ { \mathrm { N R } }$ increases. Notably, even with the $7 4 . 4 7 \%$ -accurate non-robust classifier, the WRN-28-10 and WRN-70-16 obtain robust accuracies of $5 8 . 1 5 \%$ and $5 9 . 8 3 \%$ , respectively, and already improve upon the state-of-the-art $( 5 7 . 1 4 \%$ at the time of writing). Thus, validating that, in practice, it is not necessary to have access to a perfect non-robust classifier.
141
+
142
+ Quality of the generative models. To analyze how the quality of the generative model influences robustness, we use the BigGAN to model the “true” data distribution. During training, we use samples generated from a mixture of the class-conditional Gaussian and BigGAN distributions; during testing, we evaluate on a separate subset of 10K unseen BigGAN samples. To probe Cond. 2, we change the proportion of training samples from the class-conditional Gaussian. In effect, decreasing the proportion of such samples skews the mixed generative model (modeled by the mixture of Gaussian and BigGAN distributions) to produce more samples from the true distribution (modeled by the BigGAN distribution), thereby closing the gap between the approximated distribution $\hat { \mathcal { D } }$ and true distribution $\mathcal { D }$ . As expected, Fig. 4(b) demonstrates that, given enough capacity, models can significantly reduce the adversarial risk.
143
+
144
+ ![](images/ae444178f536b7d1189a65c00f2c5be9d41a215baebe793de3b527af52a200d2.jpg)
145
+ Figure 5: Robust test accuracy obtained by training a WRN-28-10 against $\epsilon _ { \infty } = 8 / 2 5 5$ on CIFAR-10 when using additional data produced by different generative models. We compare how the ratio between original and generated images (i.e., $\alpha$ ) affects robustness ( $0 \%$ means generated samples only, $100 \%$ means CIFAR-10 train set only).
146
+ Table 2: Clean (without perturbations) and robust (under adversarial attack) accuracy obtained by different models (we pick the worst accuracy obtained by either AUTOATTACK or $\mathbf { A A + M T } ,$ ). The accuracies are reported on the full test sets. For CIFAR-10, we test against $\epsilon _ { \infty } ~ = ~ 8 / 2 5 5$ and $\epsilon _ { 2 } =$ 128/255. For CIFAR-100, SVHN and TINYIMAGENET, we test against $\epsilon _ { \infty } = 8 / 2 5 5$ . \* This model is trained for 2000 epochs on 100M samples.
147
+
148
+ <table><tr><td>MODEL</td><td>DATASET</td><td>NORM</td><td>CLEAN</td><td>ROBUST</td></tr><tr><td>Wu et al.[75](WRN-34-10) Gowal et al.[30](WRN-70-16) Ours (DDPM) (WRN-28-10) Ours (DDPM)(WRN-70-16) Ours (100M DDPM)*(ResNet-18) Ours (100MDDPM)*(WRN-28-10) Ours (100M DDPM)*(WRN-70-16)</td><td>CIFAR-10</td><td>lo</td><td>85.36% 85.29% 85.97% 86.94% 87.35% 87.50% 88.74%</td><td>56.17% 57.14% 60.73% 63.58% 58.50% 63.38% 66.10%</td></tr><tr><td>Wu et al.[75](WRN-34-10) Gowal et al. [30] (WRN-70-16) Ours (DDPM) (WRN-28-10) Ours (DDPM) (WRN-70-16)</td><td>CIFAR-10</td><td>l2</td><td>88.51% 90.90% 90.24% 90.83%</td><td>73.66% 74.50% 77.37% 78.31%</td></tr><tr><td>Cui et al. [20](WRN-34-10) Gowal et al. [30] (WRN-70-16) Ours (DDPM)(WRN-28-10) Ours (DDPM) (WRN-70-16)</td><td>CIFAR-100</td><td>lo</td><td>60.64% 60.86% 59.18% 60.46%</td><td>29.33% 30.03% 30.81% 33.49%</td></tr><tr><td>Ours (without DDPM) (WRN-28-10) Ours (DDPM) (WRN-28-10)</td><td>SVHN</td><td>l</td><td>92.87% 94.15%</td><td>56.83% 60.90%</td></tr><tr><td>Ours (without DDPM)(WRN-28-10) Ours (DDPM) (WRN-28-10)</td><td>TINYIMAGENET</td><td>l</td><td>51.56% 60.95%</td><td>21.56% 26.66%</td></tr></table>
149
+
150
+ Relationship between coverage and capacity. Similarly to Fig. 4(b), we use samples generated from a mixture of the class-conditional Gaussian and BigGAN distributions; during testing, we evaluate on a separate subset of 10K unseen BigGAN samples. To probe Cond. 4, we keep the proportion of samples from the class-conditional Gaussian distribution fixed at $9 9 \%$ and use the remaining $1 \%$ to include BigGAN samples corresponding to either 0, 1, . . . or 10 classes (thereby increasing coverage). In other words, the coverage of the true data distribution $\mathcal { D }$ (given by the BigGAN) increases as the number of seen classes increases. However, the approximated distribution $\hat { \mathcal { D } }$ remains different from the true data distribution even when the coverage reaches all classes (as the proportion of Gaussian samples is fixed to $9 9 \%$ ). We observe in Fig. 4(c) that the robust accuracy of models with lower capacity improves less drastically – yielding a gap of $1 7 . 3 7 \%$ at full coverage between the ResNet-18 and WRN-70-16 models. This observation confirms that, with enough coverage, model capacity can compensate for the lack of a perfect generative model.
151
+
152
+ Discussion. Overall, Fig. 4(b) shows that when Cond. 2 is satisfied, the difference between models reduces and capacity takes a secondary role (since all models can bring their adversarial risk close to zero). Fig. 4(c) shows that when Cond. 4 is satisfied (and Cond. 2 is not), capacity matters as we observe that larger models benefit more from increased coverage. Both figures point to the fact that the quality of the generative model becomes less important when the capacity of the classifiers increases (as long as coverage is sufficient).
153
+
154
+ # 6.2 State-of-the-art robust accuracy
155
+
156
+ Effect of mixing factor $( \alpha )$ . As done in Sec. 3.3, we vary the proportion $\alpha$ of original images in each batch for all generated datasets. Fig. 5 explores a wide range of proportions while training a
157
+
158
+ WRN-28-10 against $\epsilon _ { \infty } = 8 / 2 5 5$ on CIFAR-10. Samples from all models improve robustness when mixed optimally, but only samples from the StyleGAN2 and DDPM improve robustness significantly $( + 3 . 7 3 \%$ and $+ 6 . 2 9 \%$ , respectively). It is also interesting to observe that, in the case of the DDPM, using 1M generated images is better than using the 50K images from the original train set only. While this may seem surprising, it can easily be explained if we assume that the DDPM produces many more high-quality, high-diversity images than the limited set of images present in the original data (c.f. [62]). We also observe that the optimal mixing factor is different for different generative models. Indeed, increasing $\alpha$ reduces the gap to the true data distribution at the cost of less complementarity with the original train set (see Sec. E.2).
159
+
160
+ CIFAR-10. Table 2 shows the performance of models trained with 1M samples generated by the DDPM on CIFAR-10 against $\epsilon _ { \infty } = 8 / 2 5 5$ and $\epsilon _ { 2 } = 1 2 8 / 2 5 5$ . Irrespective of their size, models trained with 1M DDPM samples surpass the current state-of-the-art in robust accuracy by a large margin $+ 6 . 4 4 \%$ and $+ 3 . 8 1 \%$ ). When using 100M DDPM samples (and training for 2000 epochs), we reach $6 6 . 1 0 \%$ robust accuracy against $\epsilon _ { \infty } = 8 / 2 5 5$ which constitutes an improvement of $+ 8 . 9 6 \%$ over the state-of-the-art. In this setting, our smallest model (ResNet-18) surpasses state-of-the-art results obtained by much larger models (e.g., WRN-70-16). Most remarkably, despite not using any external data, against $\epsilon _ { \infty } = 8 / 2 5 5$ , our best model beats all RobustBench [17] entries that used external data (see Table 6 in the appendix).
161
+
162
+ Generalization to other datasets (CIFAR-100, SVHN and TINYIMAGENET). Finally, to evaluate the generality of our approach, we evaluate it on CIFAR-100, SVHN [53] and TINYIMAGENET [26]. We train two new DDPM on the train set of CIFAR-100 and SVHN and sample 1M images from each. For TINYIMAGENET, we use a DDPM trained on IMAGENET [24] at $6 4 \times 6 4$ resolution and restricted samples to the 200 classes of TINYIMAGENET. The results are shown in Table 2. On CIFAR-100, our best model reaches a robust accuracy of $3 3 . 4 9 \%$ and improves noticeably upon the state-of-the-art by $+ 3 . 4 6 \%$ (in the setting that does not use any external data). On SVHN, in the same table, we compare models trained without and with DDPM samples. Again, the addition of DDPM samples significantly improves robustness, with the robust accuracy improving by by $+ 4 . 0 7 \%$ . On TINYIMAGENET, the improvement is $+ 5 . 1 0 \%$ .
163
+
164
+ # 7 Conclusion.
165
+
166
+ Using generative models, we posit and demonstrate that generated samples provide a greater diversity of augmentations that allow adversarial training to go well beyond the current state-of-the-art. Our work provides novel insights into the effect of diversity and complementarity on robustness, which we hope can further our understanding of robustness. All our models and generated datasets are available online at https://github.com/deepmind/deepmind-research/tree/master/adversarial_robustness.
167
+
168
+ # References
169
+
170
+ [1] A. Athalye and I. Sutskever. Synthesizing robust adversarial examples. Int. Conf. Mach. Learn., 2018.
171
+ [2] A. Athalye, N. Carlini, and D. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. Int. Conf. Mach. Learn., 2018.
172
+ [3] A. N. Bhagoji, D. Cullina, and P. Mittal. Lower bounds on adversarial robustness from optimal transport. Adv. Neural Inform. Process. Syst., 2019.
173
+ [4] B. Biggio, I. Corona, D. Maiorca, B. Nelson, N. Šrndic, P. Laskov, G. Giacinto, and F. Roli. ´ Evasion attacks against machine learning at test time. In Machine Learning and Knowledge Discovery in Databases, 2013.
174
+ [5] M. Bojarski, D. Del Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang, X. Zhang, J. Zhao, and K. Zieba. End to end learning for self-driving cars. NIPS Deep Learning Symposium, 2016. [6] J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, and S. WandermanMilne. JAX: composable transformations of Python+NumPy programs, 2018. URL http: //github.com/google/jax. [7] A. Brock, J. Donahue, and K. Simonyan. Large scale gan training for high fidelity natural image synthesis. Int. Conf. Learn. Represent., 2018. [8] T. Brunner, F. Diehl, M. T. Le, and A. Knoll. Guessing smart: Biased sampling for efficient black-box adversarial attacks. arXiv preprint arXiv:1812.09803, 2019. [9] N. Carlini and D. Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 3–14. ACM, 2017.
175
+ [10] N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy, 2017.
176
+ [11] Y. Carmon, A. Raghunathan, L. Schmidt, J. C. Duchi, and P. S. Liang. Unlabeled data improves adversarial robustness. In Adv. Neural Inform. Process. Syst., 2019.
177
+ [12] H. Chang, T. D. Nguyen, S. K. Murakonda, E. Kazemi, and R. Shokri. On adversarial bias and the robustness of fair machine learning. arXiv preprint arXiv:2006.08669, 2020.
178
+ [13] D. Chen, N. Yu, Y. Zhang, and M. Fritz. Gan-leaks: A taxonomy of membership inference attacks against generative models. arXiv preprint arXiv:1909.03935, 2020.
179
+ [14] R. Child. Very deep vaes generalize autoregressive models and can outperform them on images. Int. Conf. Learn. Represent., 2021.
180
+ [15] P. Covington, J. Adams, and E. Sargin. Deep neural networks for YouTube recommendations. In Proceedings of the 10th ACM Conference on Recommender Systems, 2016.
181
+ [16] F. Croce and M. Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. arXiv preprint arXiv:2003.01690, 2020.
182
+ [17] F. Croce, M. Andriushchenko, V. Sehwag, N. Flammarion, M. Chiang, P. Mittal, and M. Hein. Robustbench: a standardized adversarial robustness benchmark. arXiv preprint arXiv:2010.09670, 2020.
183
+ [18] E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. Autoaugment: Learning augmentation policies from data. IEEE Conf. Comput. Vis. Pattern Recog., 2019.
184
+ [19] E. D. Cubuk, B. Zoph, J. Shlens, and Q. V. Le. Randaugment: Practical automated data augmentation with a reduced search space. IEEE Conf. Comput. Vis. Pattern Recog., 2020.
185
+ [20] J. Cui, S. Liu, L. Wang, and J. Jia. Learnable boundary guided adversarial training. arXiv preprint arXiv:2011.11164, 2020.
186
+ [21] D. Cullina, A. N. Bhagoji, and P. Mittal. Pac-learning in the presence of adversaries. In Adv. Neural Inform. Process. Syst., 2018.
187
+ [22] J. De Fauw, J. R. Ledsam, B. Romera-Paredes, S. Nikolov, N. Tomasev, S. Blackwell, H. Askham, X. Glorot, B. O’Donoghue, D. Visentin, G. v. d. Driessche, B. Lakshminarayanan, C. Meyer, F. Mackinder, S. Bouton, K. Ayoub, R. Chopra, D. King, A. Karthikesalingam, C. O. Hughes, R. Raine, J. Hughes, D. A. Sim, C. Egan, A. Tufail, H. Montgomery, D. Hassabis, G. Rees, T. Back, P. T. Khaw, M. Suleyman, J. Cornebise, P. A. Keane, and O. Ronneberger. Clinically applicable deep learning for diagnosis and referral in retinal disease. In Nature Medicine, 2018.
188
+ [23] T. DeVries and G. W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
189
+ [24] P. Dhariwal and A. Nichol. Diffusion models beat GANs on image synthesis. arXiv preprint arXiv:2105.05233, 2021.
190
+ [25] Y. Dong, F. Liao, T. Pang, H. Su, J. Zhu, X. Hu, and J. Li. Boosting Adversarial Attacks with Momentum. IEEE Conf. Comput. Vis. Pattern Recog., 2018.
191
+ [26] A. K. Fei-Fei Li and J. Johnson. The Tiny ImageNet dataset. 2017. URL https://www.kaggle.com/c/ tiny-imagenet.
192
+ [27] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. Int. Conf. Learn. Represent., 2015.
193
+ [28] S. Gowal, C. Qin, P.-S. Huang, T. Cemgil, K. Dvijotham, T. Mann, and P. Kohli. Achieving Robustness in the Wild via Adversarial Mixing with Disentangled Representations. arXiv preprint arXiv:1912.03192, 2019.
194
+ [29] S. Gowal, J. Uesato, C. Qin, P.-S. Huang, T. Mann, and P. Kohli. An Alternative Surrogate Loss for PGD-based Adversarial Testing. arXiv preprint arXiv:1910.09338, 2019.
195
+ [30] S. Gowal, C. Qin, J. Uesato, T. Mann, and P. Kohli. Uncovering the limits of adversarial training against norm-bounded adversarial examples. arXiv preprint arXiv:2010.03593, 2020.
196
+ [31] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. IEEE Conf. Comput. Vis. Pattern Recog., 2016.
197
+ [32] D. Hendrycks and T. Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In Int. Conf. Learn. Represent., 2018.
198
+ [33] D. Hendrycks and K. Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016.
199
+ [34] D. Hendrycks, S. Basart, N. Mu, S. Kadavath, F. Wang, E. Dorundo, R. Desai, T. Zhu, S. Parajuli, M. Guo, D. Song, J. Steinhardt, and J. Gilmer. The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization. arXiv preprint arXiv:2006.16241, 2020. URL https://arxiv.org/pdf/2006.16241.
200
+ [35] T. Hennigan, T. Cai, T. Norman, and I. Babuschkin. Haiku: Sonnet for JAX, 2020. URL http://github.com/deepmind/dm-haiku.
201
+ [36] J. Ho, A. Jain, and P. Abbeel. Denoising diffusion probabilistic models. Adv. Neural Inform. Process. Syst., 2021.
202
+ [37] E. Härkönen, A. Hertzmann, J. Lehtinen, and S. Paris. GANSpace: Discovering Interpretable GAN Controls. arXiv preprint arXiv:2004.02546, 2020.
203
+ [38] P. Izmailov, D. Podoprikhin, T. Garipov, D. Vetrov, and A. G. Wilson. Averaging Weights Leads to Wider Optima and Better Generalization. Uncertainty in Artificial Intelligence, 2018.
204
+ [39] A. Jahanian, L. Chai, and P. Isola. On the "steerability" of generative adversarial networks. In Int. Conf. Learn. Represent., 2019.
205
+ [40] T. Karras, S. Laine, M. Aittala, J. Hellsten, J. Lehtinen, and T. Aila. Analyzing and improving the image quality of stylegan. In IEEE Conf. Comput. Vis. Pattern Recog., 2020.
206
+ [41] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. Int. Conf. Learn. Represent., 2015.
207
+ [42] A. Krizhevsky, V. Nair, and G. Hinton. The CIFAR-10 dataset. 2014. URL http://www.cs.toronto. edu/kriz/cifar.html.
208
+ [43] S. Kumar, V. Bitorff, D. Chen, C. Chou, B. Hechtman, H. Lee, N. Kumar, P. Mattson, S. Wang, T. Wang, Y. Xu, and Z. Zhou. Scale mlperf-0.6 models on google tpu-v3 pods. arXiv preprint arXiv:1909.09756, 2019.
209
+ [44] A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. ICLR workshop, 2016.
210
+ [45] C. Laidlaw, S. Singla, and S. Feizi. Perceptual adversarial robustness: Defense against unseen threat models. In Int. Conf. Learn. Represent., 2021.
211
+ [46] J. Lee and M. Raginsky. Minimax statistical learning with wasserstein distances. Adv. Neural Inform. Process. Syst., 2018.
212
+ [47] I. Loshchilov and F. Hutter. SGDR: stochastic gradient descent with warm restarts. In Int. Conf. Learn. Represent., 2017.
213
+ [48] D. Madaan, J. Shin, and S. J. Hwang. Learning to generate noise for robustness against multiple perturbations. arXiv preprint arXiv:2006.12135, 2020.
214
+ [49] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. Int. Conf. Learn. Represent., 2018.
215
+ [50] M. Mosbach, M. Andriushchenko, T. Trost, M. Hein, and D. Klakow. Logit Pairing Methods Can Fool Gradient-Based Attacks. arXiv preprint arXiv:1810.12042, 2018.
216
+ [51] A. Najafi, S.-i. Maeda, M. Koyama, and T. Miyato. Robustness to adversarial perturbations in learning from incomplete data. Adv. Neural Inform. Process. Syst., 2019.
217
+ [52] Y. Nesterov. A method of solving a convex programming problem with convergence rate $o ( 1 / k ^ { 2 } )$ . In Sov. Math. Dokl, 1983.
218
+ [53] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. 2011.
219
+ [54] OpenAI. Dall-e: Creating images from text, 2021. URL https://openai.com/blog/dall-e.
220
+ [55] T. Pang, X. Yang, Y. Dong, H. Su, and J. Zhu. Bag of tricks for adversarial training. arXiv preprint arXiv:2010.00467, 2020.
221
+ [56] T. Pang, X. Yang, Y. Dong, K. Xu, H. Su, and J. Zhu. Boosting Adversarial Training with Hypersphere Embedding. Adv. Neural Inform. Process. Syst., 2020.
222
+ [57] A. Plumerault, H. L. Borgne, and C. Hudelot. Controlling generative models with continuous factors of variations. In Int. Conf. Learn. Represent., 2020.
223
+ [58] B. T. Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 1964.
224
+ [59] S. Ravuri and O. Vinyals. Classification Accuracy Score for Conditional Generative Models. arXiv preprint arXiv:1905.10887, 2019.
225
+ [60] L. Rice, E. Wong, and J. Z. Kolter. Overfitting in adversarially robust deep learning. Int. Conf. Mach. Learn., 2020.
226
+ [61] P. Samangouei, M. Kabkab, and R. Chellappa. Defense-gan: Protecting classifiers against adversarial attacks using generative models. In Int. Conf. Learn. Represent., 2018.
227
+ [62] L. Schmidt, S. Santurkar, D. Tsipras, K. Talwar, and A. Madry. Adversarially Robust Generalization Requires More Data. Adv. Neural Inform. Process. Syst., 2018.
228
+ [63] L. Song, R. Shokri, and P. Mittal. Privacy risks of securing machine learning models against adversarial examples. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pages 241–257, 2019.
229
+ [64] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. Int. Conf. Learn. Represent., 2014.
230
+ [65] A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: a large dataset for nonparametric object and scene recognition. IEEE Trans. Pattern Anal. Mach. Intell., 2008.
231
+ [66] F. Tramer, N. Carlini, W. Brendel, and A. Madry. On adaptive attacks to adversarial example defenses. arXiv preprint arXiv:2002.08347, 2020.
232
+ [67] F. Tramèr, A. Kurakin, N. Papernot, I. Goodfellow, D. Boneh, and P. McDaniel. Ensemble Adversarial Training: Attacks and Defenses. arXiv preprint arXiv:1705.07204, 2017.
233
+ [68] F. Tramèr, J. Behrmann, N. Carlini, N. Papernot, and J.-H. Jacobsen. Fundamental Tradeoffs between Invariance and Sensitivity to Adversarial Perturbations. arXiv preprint arXiv:2002.04599, 2020.
234
+ [69] D. Tsipras, S. Santurkar, L. Engstrom, A. Turner, and A. Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018.
235
+ [70] Z. Tu, J. Zhang, and D. Tao. Theoretical analysis of adversarial learning: A minimax approach. In Adv. Neural Inform. Process. Syst. 2019.
236
+ [71] J. Uesato, B. O’Donoghue, A. v. d. Oord, and P. Kohli. Adversarial Risk and the Dangers of Evaluating Against Weak Attacks. Int. Conf. Mach. Learn., 2018.
237
+ [72] J. Uesato, J.-B. Alayrac, P.-S. Huang, R. Stanforth, A. Fawzi, and P. Kohli. Are labels required for improving adversarial robustness? Adv. Neural Inform. Process. Syst., 2019.
238
+ [73] E. Wong and J. Z. Kolter. Learning perturbation sets for robust machine learning. In Int. Conf. Learn. Represent., 2021.
239
+ [74] B. Wu, J. Chen, D. Cai, X. He, and Q. Gu. Do wider neural networks really help adversarial robustness? arXiv preprint arXiv:2010.01279, 2021.
240
+ [75] D. Wu, S.-t. Xia, and Y. Wang. Adversarial weight perturbation helps robust generalization. Adv. Neural Inform. Process. Syst., 2020.
241
+ [76] C. Xie, Y. Wu, L. van der Maaten, A. Yuille, and K. He. Feature denoising for improving adversarial robustness. IEEE Conf. Comput. Vis. Pattern Recog., 2019.
242
+ [77] Y. Yang, G. Zhang, D. Katabi, and Z. Xu. Me-net: Towards effective adversarial robustness with matrix estimation. In Int. Conf. Mach. Learn., 2019.
243
+ [78] S. Yun, D. Han, S. J. Oh, S. Chun, J. Choe, and Y. Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. Int. Conf. Comput. Vis., 2019.
244
+ [79] S. Zagoruyko and N. Komodakis. Wide residual networks. Brit. Mach. Vis. Conf., 2016.
245
+ [80] R. Zhai, T. Cai, D. He, C. Dan, K. He, J. Hopcroft, and L. Wang. Adversarially Robust Generalization Just Requires More Unlabeled Data. arXiv preprint arXiv:1906.00555, 2019.
246
+ [81] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk minimization. Int. Conf. Learn. Represent., 2018.
247
+ [82] H. Zhang, Y. Yu, J. Jiao, E. P. Xing, L. E. Ghaoui, and M. I. Jordan. Theoretically Principled Trade-off between Robustness and Accuracy. Int. Conf. Mach. Learn., 2019.
248
+ [83] J. Zhang, J. Zhu, G. Niu, B. Han, M. Sugiyama, and M. Kankanhalli. Geometry-aware instancereweighted adversarial training. In Int. Conf. Learn. Represent., 2021.
249
+ [84] R. Zhang, P. Isola, A. A. Efros, E. Shechtman, and O. Wang. The unreasonable effectiveness of deep features as a perceptual metric. arXiv preprint arXiv:1801.03924, 2018.
250
+ [85] D. Zoran, M. Chrzanowski, P.-S. Huang, S. Gowal, A. Mott, and P. Kohl. Towards Robust Image Classification Using Sequential Attention Models. IEEE Conf. Comput. Vis. Pattern Recog., 2019.
251
+
252
+ # Checklist
253
+
254
+ 1. For all authors...
255
+
256
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We claim that adversarial robustness can be improved using generated data. Experiments demonstrate that this is possible and that the improvements are significant (Sec. 6).
257
+ (b) Did you describe the limitations of your work? [Yes] The sufficient conditions detailed in Sec. 4 provide an idealized situation that we degrade in the experimental section. In particular, the method is intrinsically limited by the accuracy of the non-robust classifier $f _ { \mathrm { N R } }$ as well as the ability to generate realistic inputs.
258
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] We highlight potential pitfalls in the introduction and related work. We summarize these and highlights them more broadly in App. G
259
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
260
+
261
+ 2. If you are including theoretical results...
262
+
263
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] We provide two set of sufficient conditions. The first set, composed of Cond. 1 and Cond. 2, applies to the limited-capacity and limited-compute regime, while the second set, composed of Cond. 1, Cond. 3 and Cond. 2, applies to the infinite-capacity and infinite-compute regime. Other assumptions are detailed in Sec. 4.1.
264
+ (b) Did you include complete proofs of all theoretical results? [Yes] Proof are included in the main text and rely on either demonstrating that Eq. 4 and Eq. 5 can be made equal when Cond. 1 and Cond. 2 are satisfied (limited-capacity) or showing that the combination of Cond. 1, Cond. 3 and Cond. 4 yields a perfectly robust classifier on the subset of inputs that includes the set of realistic inputs (infinite-capacity regime).
265
+
266
+ 3. If you ran experiments...
267
+
268
+ (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 training and evaluation code is available at https://github.com/deepmind/deepmind-research/tree/master/ adversarial_robustness.
269
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] All details are in App. A.
270
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Adversarial training is compute-intensive and the negative-impact of running more experiments outweighed the benefits. We use the same evaluation setup than proposed in [30]. That is, we always trained two models for each hyper-parameter setup and chose the best model according to a separate validation set of 1024 images (the average degradation in robustness between both models measured on a subset of 10 hyper-parameters setups is $- 0 . 1 2 \%$ in absolute robust accuracy). We also evaluated all models with one of the strongest set of adversarial attacks. Additionally, our baseline model was trained ten times resulting in a standard deviation of $0 . 3 9 \%$ and all reported improvements in robust accuracy are well beyond 2 standard deviations.
271
+ (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] All details are in App. A.
272
+
273
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
274
+
275
+ (a) If your work uses existing assets, did you cite the creators? [Yes] We use CIFAR10 [42], CIFAR-100 [42], SVHN [53] and TINYIMAGENET [26].
276
+ (b) Did you mention the license of the assets? [No] Please refer to citations for details on licensing. All datasets are available for non-commercial use.
277
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We generate additional data using generative models. These are available online at https://github.com/deepmind/deepmind-research/tree/master/adversarial_robustness.
278
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
279
+
280
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
281
+
282
+ 5. If you used crowdsourcing or conducted research with human subjects...
283
+
284
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
285
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
286
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/0NXUSlb6oEu/0NXUSlb6oEu_content_list.json ADDED
@@ -0,0 +1,1126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Improving Robustness using Generated Data ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 223,
8
+ 122,
9
+ 772,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Sven Gowal\\*, Sylvestre-Alvise Rebuffi\\*, Olivia Wiles, Florian Stimberg, Dan Calian and Timothy Mann DeepMind, London {sgowal,sylvestre}@deepmind.com ",
17
+ "bbox": [
18
+ 312,
19
+ 200,
20
+ 686,
21
+ 257
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 292,
32
+ 535,
33
+ 309
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Recent work argues that robust training requires substantially larger datasets than those required for standard classification. On CIFAR-10 and CIFAR-100, this translates into a sizable robust-accuracy gap between models trained solely on data from the original training set and those trained with additional data extracted from the $^ { 6 6 } 8 0$ Million Tiny Images” dataset (80M-TI). In this paper, we explore how generative models trained solely on the original training set can be leveraged to artificially increase the size of the original training set and improve adversarial robustness to $\\ell _ { p }$ norm-bounded perturbations. We identify the sufficient conditions under which incorporating additional generated data can improve robustness, and demonstrate that it is possible to significantly reduce the robust-accuracy gap to models trained with additional real data. Surprisingly, we show that even the addition of non-realistic random data (generated by Gaussian sampling) can improve robustness. We evaluate our approach on CIFAR-10, CIFAR-100, SVHN and TINYIMAGENET against $\\ell _ { \\infty }$ and $\\ell _ { 2 }$ norm-bounded perturbations of size $\\epsilon =$ $8 / 2 5 5$ and $\\epsilon = 1 2 8 / 2 5 5$ , respectively. We show large absolute improvements in robust accuracy compared to previous state-of-the-art methods. Against $\\ell _ { \\infty }$ normbounded perturbations of size $\\epsilon = 8 / 2 5 5$ , our models achieve $6 6 . 1 0 \\%$ and $3 3 . 4 9 \\%$ robust accuracy on CIFAR-10 and CIFAR-100, respectively (improving upon the state-of-the-art by $+ 8 . 9 6 \\%$ and $+ 3 . 2 9 \\%$ ). Against $\\ell _ { 2 }$ norm-bounded perturbations of size $\\epsilon = 1 2 8 / 2 5 5$ , our model achieves $7 8 . 3 1 \\%$ on CIFAR-10 $( + 3 . 8 1 \\% )$ . These results beat most prior works that use external data. ",
40
+ "bbox": [
41
+ 233,
42
+ 324,
43
+ 766,
44
+ 614
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 640,
55
+ 310,
56
+ 657
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Neural networks are being deployed in a wide variety of applications ranging from ranking content on the web [15] to autonomous driving [5] via medical diagnostics [22]. It has become increasingly important to ensure that deployed models are robust and generalize to various input perturbations. Unfortunately, the addition of imperceptible adversarial perturbations can cause neural networks to make incorrect predictions [9, 10, 27, 44, 64]. There has been a lot of work on understanding and generating adversarial perturbations [1, 4, 10, 64], and on building defenses that are robust to such perturbations [27, 49, 60, 82]. We note that while robustness and invariance to input perturbations is crucial to the deployment of machine learning models in various applications, it can also have broader negative impacts to society such as hindering privacy [63] or increasing bias [68]. ",
63
+ "bbox": [
64
+ 174,
65
+ 671,
66
+ 825,
67
+ 797
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The adversarial training procedure proposed by Madry et al. [49] feeds adversarially perturbed examples back into the training data. It is widely regarded as one of the most successful method to train robust deep neural networks [30], and it has been augmented in different ways – with changes in the attack procedure [25], loss function [50, 82] or model architecture [76, 85]. We highlight the works by Carmon et al. [11], Najafi et al. [51], Uesato et al. [72], Zhai et al. [80] who simultaneously proposed the use of additional unlabeled external data. While the addition of external data helped boost robust accuracy by a large margin, progress in the setting without additional data has slowed (see Fig. 1). On CIFAR-10 [42] against $\\ell _ { \\infty }$ perturbations of size $\\epsilon = 8 / 2 5 5$ , the best known model obtains a robust accuracy of $6 5 . 8 7 \\%$ when using additional data. The same model obtains a robust accuracy of $5 7 . 1 4 \\%$ without this data [30]. As a result, we ask ourselves whether it is possible to leverage the information contained in the original training set to a greater extent. This manuscript challenges the status-quo. To the contrary of standard training where it is widely believed that generative models lack diversity and that the samples they produce cannot be used to train better classifiers [59], we demonstrate both theoretically and experimentally that these generated samples can be used to improve robustness (using the approach described in Fig. 2 and Sec. 3.3). We make the following contributions: ",
74
+ "bbox": [
75
+ 174,
76
+ 803,
77
+ 825,
78
+ 900
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/8eb9ee6d3777e7d8166f9e6f212649a7a9831e7486d3e37219d94bb171c3f31b.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Robust accuracy of models against AUTOATTACK [16] on CIFAR-10 with $\\ell _ { \\infty }$ perturbations of size $8 / 2 5 5$ displayed in publication order. Our method explores how generated data can be used to improve robust accuracy by $+ 8 . 9 6 \\%$ without using any additional external data. This constitutes the largest jump in robust accuracy in this setting. Our best model reaches a robust accuracy of $6 6 . 1 0 \\%$ against $\\mathbf { A } \\mathbf { A } { + } \\mathbf { M } \\mathbf { T }$ [30]. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 179,
91
+ 93,
92
+ 501,
93
+ 263
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "image",
99
+ "img_path": "images/3e6487378e9debb436c615ff8311fb38dd237c64fb4e3dc9118341aa066fb749.jpg",
100
+ "image_caption": [
101
+ "Figure 2: Overview of our approach. Our method initially trains a generative model and a non-robust classifier. The non-robust classifier is used to provide pseudo-labels to the generated data. Finally, generated and original training data are combined to train a robust classifier. "
102
+ ],
103
+ "image_footnote": [],
104
+ "bbox": [
105
+ 578,
106
+ 88,
107
+ 774,
108
+ 299
109
+ ],
110
+ "page_idx": 1
111
+ },
112
+ {
113
+ "type": "text",
114
+ "text": "",
115
+ "bbox": [
116
+ 173,
117
+ 429,
118
+ 825,
119
+ 554
120
+ ],
121
+ "page_idx": 1
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "• We demonstrate in Sec. 3.2 that it is possible to use low-quality random inputs (sampled from a conditional Gaussian fit of the training data) to improve robust accuracy on CIFAR-10 against $\\ell _ { \\infty }$ perturbations of size $\\epsilon = 8 / 2 5 5$ $( + 0 . 9 3 \\%$ on a WRN-28-10) and provide a justification and sufficient conditions in Sec. 4. \n• We leverage higher quality generated inputs (i.e., inputs generated by generative models solely trained on the original data), and study four recent generative models: the Denoising Diffusion Probabilistic Model (DDPM) [36], StyleGAN2 [40], BigGAN [7] and the Very Deep Variational Auto-Encoder (VDVAE) [14] (Sec. 5). We show that DDPM samples cover most closely the real data distribution (as measured by the distance to the test set in the Inception feature space). Using images generated by the DDPM allows us to reach a robust accuracy of $6 6 . 1 0 \\%$ on CIFAR-10 against $\\ell _ { \\infty }$ perturbations of size $\\epsilon = 8 / 2 5 5$ (an improvement of $+ 8 . 9 6 \\%$ upon the stateof-the-art). Notably, our best CIFAR-10 models beat all techniques that use additional data (see Sec. 6) and constitutes one of the largest improvements ever made in the setting without additional data. As a consequence, we demonstrate that it is possible to avoid the use of 80M-TI [65] which has been withdrawn due to presence of offensive images.1 ",
126
+ "bbox": [
127
+ 181,
128
+ 564,
129
+ 825,
130
+ 779
131
+ ],
132
+ "page_idx": 1
133
+ },
134
+ {
135
+ "type": "text",
136
+ "text": "2 Related work ",
137
+ "text_level": 1,
138
+ "bbox": [
139
+ 174,
140
+ 799,
141
+ 316,
142
+ 815
143
+ ],
144
+ "page_idx": 1
145
+ },
146
+ {
147
+ "type": "text",
148
+ "text": "Adversarial $\\ell _ { p }$ norm-bounded attacks. Since Biggio et al. [4], Szegedy et al. [64] observed that neural networks which achieve high accuracy are highly vulnerable to adversarial examples, the art of crafting increasingly sophisticated adversarial examples has received a lot of attention. Goodfellow et al. [27] proposed the Fast Gradient Sign Method (FGSM) which generates adversarial examples with a single normalized gradient step. It was followed by $\\mathrm { R + F G S M }$ [67], which adds a randomization step, and the Basic Iterative Method (BIM) [44], which takes multiple smaller gradient steps. ",
149
+ "bbox": [
150
+ 174,
151
+ 830,
152
+ 825,
153
+ 886
154
+ ],
155
+ "page_idx": 1
156
+ },
157
+ {
158
+ "type": "text",
159
+ "text": "",
160
+ "bbox": [
161
+ 173,
162
+ 90,
163
+ 823,
164
+ 119
165
+ ],
166
+ "page_idx": 2
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "Adversarial training as a defense. Adversarial training [49] is widely regarded as one of the most successful methods to train deep neural networks robust to such attacks. It has received significant attention and various modifications have emerged [25, 50, 76]. A notable work is TRADES [82], which balances the trade-off between standard and robust accuracy, and achieved state-of-the-art performance against $\\ell _ { \\infty }$ norm-bounded perturbations on CIFAR-10. More recently, the work from Rice et al. [60] studied robust overfitting and demonstrated that improvements similar to TRADES could be obtained more easily using classical adversarial training with early stopping. Finally, Gowal et al. [30] highlighted how different hyper-parameters (such as network size and model weight averaging) affect robustness. ",
171
+ "bbox": [
172
+ 174,
173
+ 133,
174
+ 825,
175
+ 258
176
+ ],
177
+ "page_idx": 2
178
+ },
179
+ {
180
+ "type": "text",
181
+ "text": "Data-driven augmentations. Works, such as AutoAugment [18] and related RandAugment [19], learn augmentation policies directly from data. These methods are tuned to improve standard classification accuracy and have been shown to work well on multiple datasets. DeepAugment [34] explores how perturbations of the parameters of pre-trained image-to-image models can be used to generate augmented datasets that provide increased robustness to common corruptions [32]. Similarly, generative models can be used to create novel views of images [37, 39, 57] by manipulating them in latent space. When optimized and used during training, these novel views reduce the impact of spurious correlations and improve accuracy [28, 73]. Most recently, Laidlaw et al. [45] proposed an adversarial training method based on bounding a neural perceptual distance (i.e., an approximation of the true perceptual distance). While these works make significant contributions towards improving generalization and robustness to semantic perturbations, they do not improve robustness to $\\ell _ { p }$ normbounded perturbations. ",
182
+ "bbox": [
183
+ 174,
184
+ 272,
185
+ 825,
186
+ 439
187
+ ],
188
+ "page_idx": 2
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "Robustness to $\\ell _ { p }$ norm-bounded perturbations using generative modeling. Finally, we highlight works, such as Defense-GAN [61] or ME-Net [77], which leverage data modeling techniques to create stronger defenses against $\\ell _ { p }$ norm-bounded attacks. Unfortunately, these techniques are not as robust as they seem and are broken by adaptive attacks [2, 16, 66]. Overall, to the best of our knowledge, there is little [48] to no evidence that data augmentations or generative models can be used to improve robustness to $\\ell _ { p }$ norm-bounded attacks. In fact, generative models mostly lack diversity and it is widely believed that the samples they produce cannot be used to train classifiers to the same accuracy than those trained on original datasets [59]. We differentiate ourselves from earlier works by leveraging additional generated samples for training rather than modifying the defense procedure, and by establishing sufficient conditions under which such samples improve robustness. ",
193
+ "bbox": [
194
+ 173,
195
+ 454,
196
+ 825,
197
+ 592
198
+ ],
199
+ "page_idx": 2
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "3 Adversarial training using generated data ",
204
+ "text_level": 1,
205
+ "bbox": [
206
+ 174,
207
+ 611,
208
+ 555,
209
+ 628
210
+ ],
211
+ "page_idx": 2
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "The rest of this manuscript is organized as follows. In this section, we provide an overview of adversarial training, demonstrate using a motivational example that low-quality generated data can be leveraged to improve robustness to adversarial examples, and describe our method. In Sec. 4, we detail sufficient conditions that explain why generated samples can improve robustness and explore the limitations of our approach. In Sec. 5, we analyze four complementary and recent generative models in the context of our method. Finally, we provide experimental results in Sec. 6. ",
216
+ "bbox": [
217
+ 174,
218
+ 642,
219
+ 825,
220
+ 726
221
+ ],
222
+ "page_idx": 2
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "3.1 Adversarial training ",
227
+ "text_level": 1,
228
+ "bbox": [
229
+ 174,
230
+ 742,
231
+ 356,
232
+ 757
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "For classification tasks, Madry et al. [49] propose to find model parameters $\\pmb { \\theta }$ that minimize the adversarial risk: ",
239
+ "bbox": [
240
+ 174,
241
+ 767,
242
+ 821,
243
+ 794
244
+ ],
245
+ "page_idx": 2
246
+ },
247
+ {
248
+ "type": "equation",
249
+ "img_path": "images/f08bfdeec2b2376d091d17de2edb57f50277f1460687ff71f9b6b3adb42c627e.jpg",
250
+ "text": "$$\n\\underset { \\pmb { \\theta } } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { ( \\pmb { x } , \\pmb { y } ) \\sim \\mathcal { D } } \\left( \\underset { \\delta \\in S } { \\operatorname* { m a x } } \\left[ f ( \\pmb { x } + \\pmb { \\delta } ; \\pmb { \\theta } ) \\neq y \\right] \\right)\n$$",
251
+ "text_format": "latex",
252
+ "bbox": [
253
+ 348,
254
+ 791,
255
+ 648,
256
+ 825
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "where $\\mathcal { D }$ is a data distribution over pairs of examples $_ { \\textbf { \\em x } }$ and corresponding labels $y$ , $f ( \\cdot ; \\pmb \\theta )$ is a model parametrized by $\\theta , [ \\cdot ]$ is the Iverson bracket notation and corresponds to the $0 - 1$ loss, and $s$ defines the set of allowed perturbations. For $\\ell _ { p }$ norm-bounded perturbations of size $\\epsilon$ , the perturbation set is defined as $S _ { p } = \\{ \\bar { \\delta } \\mid \\| \\delta \\| _ { p } \\leq \\epsilon \\}$ . Hence, for $\\ell _ { \\infty }$ norm-bounded perturbations $\\begin{array} { r } { S = S _ { \\infty } } \\end{array}$ and for $\\ell _ { 2 }$ norm-bounded perturbations ${ \\mathcal { S } } = { \\mathcal { S } } _ { 2 }$ . In the rest of this manuscript, we use $\\epsilon _ { p }$ to denote $\\ell _ { p }$ norm-bounded perturbations of size $\\epsilon$ (e.g., $\\epsilon _ { \\infty } = 8 / 2 5 5 )$ . ",
263
+ "bbox": [
264
+ 174,
265
+ 827,
266
+ 825,
267
+ 912
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "image",
273
+ "img_path": "images/5e1e8166420c62722485c6a7820dfe98653f2088972c7e84afa5280b7a8886d0.jpg",
274
+ "image_caption": [
275
+ "Figure 3: Low-quality random inputs can improve robustness. Panel (a) shows the robust test accuracy (against $\\mathbf { A A } { + } \\mathbf { M } \\mathbf { T }$ [30]) of a WRN-28-10 against $\\epsilon _ { \\infty } = 8 / 2 5 5$ on CIFAR-10 trained with additional data randomly sampled from a class-conditional Gaussian fit of the training data. We compare how the proportion of original CIFAR-10 and generated images affects robustness ( $0 \\%$ means generated samples only, while $100 \\%$ means original CIFAR-10 train set only). Panel (b) shows some of the class-conditional Gaussian samples that are used during training. "
276
+ ],
277
+ "image_footnote": [],
278
+ "bbox": [
279
+ 232,
280
+ 93,
281
+ 767,
282
+ 262
283
+ ],
284
+ "page_idx": 3
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "In practice, given a training set $\\mathcal { D } _ { \\mathrm { t r a i n } }$ , the adversarial training procedure replaces the $0 - 1$ loss with the cross-entropy loss $l _ { \\mathrm { c e } }$ and is formulated as ",
289
+ "bbox": [
290
+ 173,
291
+ 400,
292
+ 825,
293
+ 429
294
+ ],
295
+ "page_idx": 3
296
+ },
297
+ {
298
+ "type": "equation",
299
+ "img_path": "images/8f10f51d06f3441bc5bb0521230257f6883c15ba0f829dfc03c3dfb4e01db041.jpg",
300
+ "text": "$$\n\\underset { \\pmb { \\theta } } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { ( \\pmb { x } , \\pmb { y } ) \\in \\mathcal { D } _ { \\mathrm { t r a i n } } } \\left( \\underset { \\delta \\in \\mathcal { S } } { \\operatorname* { m a x } } l _ { \\mathrm { c e } } ( f ( \\pmb { x } + \\delta ; \\pmb { \\theta } ) , \\ b { y } ) \\right) .\n$$",
301
+ "text_format": "latex",
302
+ "bbox": [
303
+ 330,
304
+ 449,
305
+ 666,
306
+ 484
307
+ ],
308
+ "page_idx": 3
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "3.2 Generated data can improve robust generalization ",
313
+ "text_level": 1,
314
+ "bbox": [
315
+ 173,
316
+ 513,
317
+ 562,
318
+ 529
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "Data augmentations can reduce the generalization error of standard (non-robust) training [18, 19, 23, 81]. However, to the contrary of standard training, augmentations beyond random flips and crops [31] – such as Cutout [23], mixup [81], AutoAugment [18] or RandAugment [19] – have been unsuccessful in the context of adversarial training [30, 60, 75]. The gap in robust accuracy between models trained with and without additional data suggests that common augmentation techniques, which tend to produce augmented views that are close to the original image they augment, are intrinsically limited in their ability to improve robust generalization. In other words, augmented samples are diverse (if the training set is diverse), but not complementary to the training set. This phenomenon is particularly exacerbated when training adversarially robust models which are known to require an amount of data polynomial in the number of input dimensions [62]. ",
325
+ "bbox": [
326
+ 173,
327
+ 545,
328
+ 825,
329
+ 684
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "We hypothesize that, to improve robust generalization, it is critical to use additional training samples (augmented or generated) that are diverse and that complement the original training set (in the sense that these new samples should ideally come from the same underlying distribution as the training set but should not duplicate the training set). To test this hypothesis, we propose to use samples generated from a simple class-conditional Gaussian fit of the training data. By construction, such samples (shown in Fig. 3(b)) are extremely blurry but diverse. We proceed by fitting a multivariate Gaussian to each set of 5K training images corresponding to each class in CIFAR-10. For each class, we sample 100K images resulting in a new dataset of 1M datapoints (no further filtering is applied). In Fig. 3(a), we show the performance of various robust models trained by decreasing the proportion of real samples present in each batch from $100 \\%$ (original data only) to $0 \\%$ (generated data only). Decreasing this proportion reduces the importance of the original data. We observe that all proportions between $50 \\%$ and $90 \\%$ provide improvements in robust accuracy. Most surprisingly, the optimal proportion of $80 \\%$ provides an absolute improvement of $+ 0 . 9 3 \\%$ , which is an improvement comparable in size to the ones provided by model weight averaging or TRADES [30]. As we show in Sec. 4, the drop in robust accuracy for proportions below $50 \\%$ is expected in the capacity-limited regime. This experiment directly motivates our method. ",
336
+ "bbox": [
337
+ 173,
338
+ 690,
339
+ 825,
340
+ 911
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "3.3 Method ",
347
+ "text_level": 1,
348
+ "bbox": [
349
+ 173,
350
+ 90,
351
+ 267,
352
+ 106
353
+ ],
354
+ "page_idx": 4
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "Given access to a pre-trained non-robust classifier $f _ { \\mathrm { N R } }$ and an unconditional generative model approximating the true data distribution $\\overline { { \\mathcal { D } } }$ by a distribution $\\hat { \\mathcal { D } }$ , we would like to train a robust classifier $f ( \\cdot ; \\pmb \\theta )$ parameterized by $\\pmb \\theta$ . We propose the following optimization problem: ",
359
+ "bbox": [
360
+ 174,
361
+ 116,
362
+ 825,
363
+ 159
364
+ ],
365
+ "page_idx": 4
366
+ },
367
+ {
368
+ "type": "equation",
369
+ "img_path": "images/5f8c12ad3886b79e61c74d1e271f56df7ddab4dadb0270c4828ddb7eb8df55b4.jpg",
370
+ "text": "$$\n\\underset { \\theta } { \\arg \\operatorname* { m i n } } \\alpha \\cdot \\underset { ( \\alpha , y ) \\in \\mathcal { D } _ { \\mathrm { t r a i n } } } { \\mathbb { E } } \\left( \\operatorname* { m a x } _ { \\delta \\in \\mathcal { S } } l _ { \\infty } ( f ( \\alpha + \\delta ; \\theta ) , y ) \\right) + ( 1 - \\alpha ) \\cdot \\underset { x \\sim \\hat { \\mathcal { D } } } { \\mathbb { E } } \\left( \\operatorname* { m a x } _ { \\delta \\in \\mathcal { S } } l _ { \\infty } ( f ( \\alpha + \\delta ; \\theta ) , f _ { \\mathrm { N R } } ( x ) ) \\right)\n$$",
371
+ "text_format": "latex",
372
+ "bbox": [
373
+ 181,
374
+ 162,
375
+ 825,
376
+ 199
377
+ ],
378
+ "page_idx": 4
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "where $\\alpha$ corresponds to a mixing factor that blends examples from the training set with those that are generated. When $\\alpha$ is set to one, our method reverts back to the original adversarial training formulation in Eq. 2. When $\\alpha$ is set to zero, our method only uses generated samples with their corresponding pseudo-labels. In practice, for efficiency, rather than generating samples on-the-fly, we pre-generate samples offline. Hence, both the original training set $\\mathcal { D } _ { \\mathrm { t r a i n } }$ and generated set $\\hat { \\mathcal { D } }$ contain a finite number of samples. We have the advantage, however, to be able to generate significantly more samples than present in the original training set. In App. B, we evaluate how varying the number of generated samples impacts adversarial robustness. ",
383
+ "bbox": [
384
+ 173,
385
+ 209,
386
+ 825,
387
+ 321
388
+ ],
389
+ "page_idx": 4
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "Overall, the complete method is described in Fig. 2 and is composed of three steps: $( i )$ it starts by training the non-robust classifier and generative model on the original training set (for CIFAR-10, that corresponds to 50K images only); (ii) then, the generated dataset is constructed by drawing samples from the generative model and pseudo-labeling them using the non-robust classifier; $( i i i )$ finally, the robust classifier is trained using both the original training set and the generated dataset using Eq. 3. ",
394
+ "bbox": [
395
+ 173,
396
+ 327,
397
+ 825,
398
+ 398
399
+ ],
400
+ "page_idx": 4
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "4 Randomness might be enough ",
405
+ "text_level": 1,
406
+ "bbox": [
407
+ 176,
408
+ 416,
409
+ 455,
410
+ 433
411
+ ],
412
+ "page_idx": 4
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "In this section, we formalize our notation (Sec. 4.1), and provide three sufficient conditions that explain why generated data can improve robustness (Sec. 4.2). In summary, $( i )$ the pre-trained, non-robust classifier $f _ { \\mathrm { N R } }$ used for pseudo-labeling must be accurate, $( i i )$ the likelihood of sampling examples that are adversarial to this non-robust classifier must be low, and $( i i i )$ the generative model must be able to sample images from the true data distribution with non-zero probability. ",
417
+ "bbox": [
418
+ 173,
419
+ 446,
420
+ 825,
421
+ 517
422
+ ],
423
+ "page_idx": 4
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "4.1 Setup",
428
+ "text_level": 1,
429
+ "bbox": [
430
+ 174,
431
+ 532,
432
+ 253,
433
+ 547
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "Given a ground-truth function $f ^ { \\star }$ , we would like to find optimal parameters $\\pmb { \\theta } ^ { \\star }$ for $f ( \\cdot ; \\theta ^ { \\star } )$ that minimize the adversarial risk, ",
440
+ "bbox": [
441
+ 174,
442
+ 558,
443
+ 825,
444
+ 587
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "equation",
450
+ "img_path": "images/0b5677bc7e5a3bbf200b8fc702fec82fae37b0d605c6084e4e31257142276015.jpg",
451
+ "text": "$$\n\\pmb \\theta ^ { \\star } = \\underset { \\pmb \\theta } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { \\pmb { x } \\sim \\mathcal { D } } \\left( \\operatorname* { m a x } _ { \\pmb \\delta \\in \\mathcal { S } } \\left[ f ( \\pmb x + \\pmb \\delta ; \\pmb \\theta ) \\neq f ^ { \\star } ( \\pmb x ) \\right] \\right) ,\n$$",
452
+ "text_format": "latex",
453
+ "bbox": [
454
+ 320,
455
+ 590,
456
+ 676,
457
+ 626
458
+ ],
459
+ "page_idx": 4
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "without access to the true data distribution $\\mathcal { D }$ or the ground-truth classifier $f ^ { \\star }$ . As such, we replace the distribution $\\mathcal { D }$ with an approximated distribution $\\hat { \\mathcal { D } }$ (from a generative model) and use a pre-trained non-robust classifier $f _ { \\mathrm { N R } }$ instead of $f ^ { \\star }$ (see Sec. 3.3). This results in sub-optimal parameters ",
464
+ "bbox": [
465
+ 174,
466
+ 628,
467
+ 825,
468
+ 674
469
+ ],
470
+ "page_idx": 4
471
+ },
472
+ {
473
+ "type": "equation",
474
+ "img_path": "images/7ee27a6f2cb5172661304ea51430cd343ec719189143dbc98738b2764dbfe3e9.jpg",
475
+ "text": "$$\n\\hat { \\pmb { \\theta } } ^ { \\star } = \\underset { \\pmb { \\theta } } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { \\pmb { x } \\sim \\hat { \\mathcal { D } } } \\left( \\underset { \\delta \\in \\cal S } { \\operatorname* { m a x } } \\left[ f ( \\pmb { x } + \\pmb { \\delta } ; \\pmb { \\theta } ) \\neq f _ { \\mathrm { N R } } ( \\pmb { x } ) \\right] \\right) .\n$$",
476
+ "text_format": "latex",
477
+ "bbox": [
478
+ 316,
479
+ 678,
480
+ 681,
481
+ 713
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "We introduce the unknown probability measure $\\mu$ corresponding to the true data distribution $\\mathcal { D }$ and defined over the set of inputs ${ \\mathcal { A } } \\subseteq \\mathbb { R } ^ { n }$ (where $n$ is the input dimensionality), as well as the known probability measure $\\hat { \\mu }$ corresponding to the approximated distribution $\\hat { \\mathcal { D } }$ . The set of relevant inputs ${ \\mathcal { X } } \\subseteq A$ (i.e., the set of realistic images for which we would like to enforce robustness) is the support of $\\mu$ such that $\\mu ( \\mathcal { X } ) = 1$ and $\\forall \\mathcal { W } \\subseteq \\mathcal { X } , \\mu ( \\mathcal { W } ) > 0$ if $\\mathcal { W }$ is non-empty. We assume that each input $\\mathbf { \\boldsymbol { x } } \\in \\mathcal { X }$ can be assigned a label $y = f _ { - } ^ { \\star } ( { \\pmb x } )$ where $f ^ { \\star } : \\mathcal { X } \\mapsto \\mathcal { Y }$ is the ground-truth classifier (only valid for realistic images) and $\\mathscr { y } \\in 2 ^ { \\mathbb { Z } }$ is the set of labels. Finally, given a perturbation set $s$ , we restrict labels such that there exists no realistic image within the perturbation set of another that has a different label; i.e., for $\\mathbf { \\boldsymbol { x } } \\in \\mathcal { X }$ , for all $\\delta \\in \\{ \\delta ^ { \\prime } \\in \\mathcal { S } | { \\pmb x } + \\delta ^ { \\prime } \\in \\mathcal { X } \\}$ we have $f ^ { \\star } ( { \\pmb x } ) = f ^ { \\star } ( { \\pmb x } + \\delta )$ . ",
488
+ "bbox": [
489
+ 173,
490
+ 717,
491
+ 825,
492
+ 843
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "4.2 Limitations and sufficient conditions ",
499
+ "text_level": 1,
500
+ "bbox": [
501
+ 176,
502
+ 857,
503
+ 467,
504
+ 872
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "To understand the limitations of our approach, it is useful to think about idealized sufficient conditions that would allow the sub-optimal parameters $\\hat { \\pmb { \\theta } } ^ { \\star }$ to approach the performance of the optimal parameters $\\pmb { \\theta } ^ { \\star }$ . First, we concentrate on the capacity-limited regime and later extrapolate to the infinite-capacity, infinite-compute regime to gain more insights. The first sufficient condition concerns the pre-trained non-robust classifier and holds for both regimes. ",
511
+ "bbox": [
512
+ 174,
513
+ 882,
514
+ 823,
515
+ 911
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "",
522
+ "bbox": [
523
+ 174,
524
+ 92,
525
+ 823,
526
+ 133
527
+ ],
528
+ "page_idx": 5
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "Condition 1 (accurate non-robust classifier). The pre-trained non-robust classifier $f _ { N R } : \\mathcal { A } \\mapsto \\mathcal { V }$ must be accurate on all realistic inputs $\\pmb { x } \\in \\mathcal { X } \\colon \\forall \\pmb { x } \\in \\mathcal { X }$ , $f _ { N R } ( x ) = f ^ { \\star } ( x )$ . ",
533
+ "bbox": [
534
+ 171,
535
+ 138,
536
+ 823,
537
+ 169
538
+ ],
539
+ "page_idx": 5
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "Indeed, if we had access to the true distribution $\\mathcal { D }$ , Eq. 4 and Eq. 5 could be made equal by setting $f ^ { \\star } ( x ) = f _ { \\mathrm { N R } } ( x )$ . 2 In the capacity-limited regime, when Cond. 1 is satisfied, the problem reduces to a robust generalization problem. This problem is widely studied [3, 21, 70] and one can show that the adversarial risk is bounded by the Wasserstein distance between the training distribution $\\hat { \\mathcal { D } }$ and true data distribution $\\mathcal { D }$ (under mild assumptions) [46]. In other words, as $\\hat { \\mathcal { D } }$ approaches $\\mathcal { D }$ , we expect the robust accuracy of $f ( \\cdot ; \\hat { \\pmb \\theta } ^ { \\star } )$ to approach the one of $f ( \\cdot ; \\theta ^ { \\star } )$ . This intuitively leads to the second sufficient condition and Prop. 1. ",
544
+ "bbox": [
545
+ 174,
546
+ 181,
547
+ 825,
548
+ 279
549
+ ],
550
+ "page_idx": 5
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "Condition 2 (accurate approximated distribution). The approximated data distribution $\\hat { \\mathcal { D } }$ and true data distribution $\\mathcal { D }$ must be equivalent: $\\mu ( \\mathcal { W } ) = \\hat { \\mu } ( \\mathcal { W } )$ for all measurable subset $\\mathcal { W } \\subseteq \\mathcal { X }$ . ",
555
+ "bbox": [
556
+ 174,
557
+ 286,
558
+ 821,
559
+ 315
560
+ ],
561
+ "page_idx": 5
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Proposition 1 (capacity-limited regime). Cond. 1 and Cond. 2 are sufficient conditions that allow the sub-optimal parameters $\\hat { \\pmb { \\theta } } ^ { \\star }$ to match the performance of the optimal parameters $\\pmb { \\theta } ^ { \\star }$ . ",
566
+ "bbox": [
567
+ 174,
568
+ 320,
569
+ 821,
570
+ 349
571
+ ],
572
+ "page_idx": 5
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "Together, Cond. 1 and 2 provide sufficient conditions for the capacity-limited regime (see proof in Sec. E.1). Cond. 2 (and associated bounds from [46]) generally indicates that the robust accuracy of the classifier $f ( \\cdot ; \\hat { \\pmb \\theta } ^ { \\star } )$ should increase as the quality of the generative model that provides the approximated distribution $\\hat { \\mathcal { D } }$ improves. However, these two conditions do not provide a satisfying answer when it comes to understanding why seemingly random data can help improve robustness (as demonstrated in Sec. 3.2). To help our understanding, it is worth analyzing the consequence of increasing the capacity of $f$ . In particular, in the infinite-capacity regime, Cond. 2 can be relaxed and replaced by the following two conditions, and Prop. 1 becomes Prop. 2. ",
577
+ "bbox": [
578
+ 174,
579
+ 362,
580
+ 825,
581
+ 474
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Condition 3 (unlikely adversarial examples). It is not possible to sample a point $\\mathbf { \\boldsymbol { x } } \\sim \\hat { \\mathcal { D } }$ outside the realistic set $\\mathcal { X }$ such that it is adversarial to fNR: $\\hat { \\mu } ( \\mathcal { W } ) = 0$ on the measurable subset $\\mathcal { W } =$ $\\{ x + \\delta \\mid x \\in \\mathcal { X } , \\delta \\in \\mathcal { S } , f _ { N R } ( x + \\delta ) \\neq f _ { N R } ( x ) \\}$ . ",
588
+ "bbox": [
589
+ 174,
590
+ 482,
591
+ 825,
592
+ 526
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "Condition 4 (sufficient coverage). The likelihood of any finite sample in the set of realistic inputs $\\mathcal { X }$ obtained from $\\hat { \\mathcal { D } }$ should be non-zero under the measure $\\hat { \\mu }$ : $\\hat { \\mu } ( \\mathcal { W } ) > 0$ for all open measurable subsets $\\mathcal { W } \\subseteq \\mathcal { X }$ . ",
599
+ "bbox": [
600
+ 176,
601
+ 530,
602
+ 821,
603
+ 571
604
+ ],
605
+ "page_idx": 5
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "Proposition 2 (infinite-capacity regime). Cond. 1, Cond. 3 and Cond. 4 are sufficient conditions that allow the sub-optimal parameters $\\hat { \\pmb { \\theta } } ^ { \\star }$ to match the performance of the optimal parameters $\\pmb { \\theta } ^ { \\star }$ when the model $f$ has infinite capacity. ",
610
+ "bbox": [
611
+ 176,
612
+ 579,
613
+ 821,
614
+ 621
615
+ ],
616
+ "page_idx": 5
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "Cond. 3 enforces that labels are non-conflicting within the perturbation set of a realistic input,3 while Cond. 4 guarantees that realistic inputs appear with enough frequency during training. Together, Cond. 1, 3 and 4 do not only provide sufficient conditions for the infinite-capacity regime (see proof in Sec. E.1), but also explain why samples generated by a simple class-conditional Gaussian-fit can be used to improve robustness. Indeed, they imply that it is not necessary to have access to either the true data distribution or a perfect generative model when given enough compute and capacity. However, when compute and capacity are limited, it is critical that the optimization in Eq. 5 focuses on realistic inputs and that the distribution $\\hat { \\mathcal { D } }$ be as close as possible to the true distribution $\\mathcal { D }$ . In practice, this translates to the fact that better generative models (such as DDPM) can be used to achieve better robustness. We have relegated a discussion about the theoretical impact of the mixing factor $\\alpha$ in Sec. E.2. Briefly stated, increasing $\\alpha$ improves the realism of training samples (since the training samples mostly come from the original training set), but comes at the cost of a reduction in complementarity with the training set. ",
621
+ "bbox": [
622
+ 173,
623
+ 633,
624
+ 826,
625
+ 814
626
+ ],
627
+ "page_idx": 5
628
+ },
629
+ {
630
+ "type": "table",
631
+ "img_path": "images/6d286d590fda27e0fbae3d5276222ff0a5236f19045b6bc7382a942a04e631ca.jpg",
632
+ "table_caption": [
633
+ "Table 1: Complementarity and coverage of augmented and generated samples. We sample 10K images from the train set and various different generative models. For each sample in each set, we find its closest neighbor in Inception feature space (obtained after the pooling layer). To estimate complementarity, we report the proportion of samples with a nearest neighbor in either the train set, test set or the sampled set itself. To estimate coverage, we report the proportion of unique neighbors in the train and test set. We also include the IS and FID computed from 50K samples from each set and the robust accuracy obtained by a WRN-28-10 models trained on 1M samples (Sec. 6). "
634
+ ],
635
+ "table_footnote": [],
636
+ "table_body": "<table><tr><td rowspan=\"2\"> SETUP</td><td colspan=\"3\">COMPLEMENTARITY</td><td colspan=\"2\">COVERAGE</td><td colspan=\"2\">INCEPTION METRICS</td><td rowspan=\"2\">ROBUST ACCURACY ↑</td></tr><tr><td>TRAIN</td><td>Test</td><td>SELF</td><td>TRAIN</td><td>TesT</td><td>Is↑</td><td>FID↓</td></tr><tr><td>mixup [81]</td><td>90.34%</td><td>3.91%</td><td>5.75%</td><td>90.43%</td><td>45.61%</td><td>9.33 ± 0.22</td><td>7.71</td><td></td></tr><tr><td>Class-conditional Gaussian-fit</td><td>0.13%</td><td>0.22%</td><td>99.65%</td><td>12.36%</td><td>12.24%</td><td>3.64±0.03</td><td>117.62</td><td>55.37%</td></tr><tr><td>VDVAE [14]</td><td>11.97%</td><td>12.14%</td><td>75.89%</td><td>34.20%</td><td>33.76%</td><td>6.88 ±0.05</td><td>26.44</td><td>55.51%</td></tr><tr><td>BigGAN[7]</td><td>14.97%</td><td>14.81%</td><td>70.22%</td><td>38.86%</td><td>39.06%</td><td>9.73 ±0.07</td><td>13.78</td><td>55.99%</td></tr><tr><td>StyleGAN2 [40]</td><td>28.13%</td><td>27.22%</td><td>44.65%</td><td>50.16%</td><td>48.29%</td><td>10.04± 0.11</td><td>2.57</td><td>58.17%</td></tr><tr><td>DDPM[36]</td><td>29.29%</td><td>29.17%</td><td>41.54%</td><td>49.07%</td><td>49.10%</td><td>9.50 ± 0.14</td><td>3.15</td><td>60.73%</td></tr></table>",
637
+ "bbox": [
638
+ 176,
639
+ 200,
640
+ 821,
641
+ 306
642
+ ],
643
+ "page_idx": 6
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "5 Generative models ",
648
+ "text_level": 1,
649
+ "bbox": [
650
+ 174,
651
+ 337,
652
+ 361,
653
+ 354
654
+ ],
655
+ "page_idx": 6
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "The derivations from Sec. 4 and the experiment performed in Sec. 3.2 strongly suggest that generative models, which are capable of creating novel images [54], are viable augmentation candidates for adversarial training. ",
660
+ "bbox": [
661
+ 174,
662
+ 369,
663
+ 825,
664
+ 411
665
+ ],
666
+ "page_idx": 6
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "Generative models considered in this work. In this work, we limit ourselves to generative models that are solely trained on the original train set, as we focus on how to improve robustness in the setting without external data. We consider four recent and fundamentally different models: (i) BigGAN [7]: one of the first large-scale application of Generative Adversarial Networks (GANs) which produced significant improvements in Frechet Inception Distance (FID) and Inception Score (IS) on CIFAR-10 (as well as on IMAGENET); (ii) VDVAE [14]: a hierarchical Variational AutoEncoder (VAE) which outperforms alternative VAE baselines; (iii) StyleGAN2 [40]: an improved version of StyleGAN which borrows interesting properties from the style transfer literature; and (iv) DDPM [36]: a diffusion probabilistic model based on Langevin dynamics that reaches state-of-the-art FID on CIFAR-10.4 As we have done for the simpler class-conditional Gaussian-fit, for each model, we sample 100K images per class, resulting in 1M images in total (see App. D for details). Samples are shown in App. D. ",
671
+ "bbox": [
672
+ 173,
673
+ 428,
674
+ 825,
675
+ 580
676
+ ],
677
+ "page_idx": 6
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "Analysis of complementary and coverage. In Table 1, we evaluate how close Cond. 2 and Cond. 4 are to be satisfied in practice. To do so, we sample 10K images from each generative model. We also sample 10K images from the CIFAR-10 training set, and apply mixup to them as a point of comparison.5 We observe that mixup achieves a similar IS to the BigGAN and DDPM models. In the left-most set of three columns, for each augmented or generated sample, we report whether its closest neighbor in the Inception6 feature space belongs to the train set, test set or the generated set itself (more details are available in App. D). An ideal generative model should create samples that are equally likely to be close to images from each set. We observe that mixup tends to produce samples that are too close to the original train set and that lack complementarity, potentially explaining its limited usefulness in terms of improving adversarial robustness. Meanwhile, generated samples (including those from the class-conditional Gaussian-fit) are much more likely to be close to images of the test set. We also observe that the DDPM neighbor distribution matches more closely the ideal uniform distribution. Images generated by BigGAN and VDVAE tend to have their nearest neighbor among themselves which indicates that these samples are either far from the train and test distributions or produce overly similar samples. Images generated by StyleGAN2, which reach an FID of 2.57 and IS of 10.07 that are better than the DDPM scores, have a slightly worse neighbor distribution (indicating a slight memorization of the training set). The middle two columns measure the ratio of unique neighbors that are matched in the train and test set. This provides a rough approximation of coverage. We observe a similar trend where samples from the DDPM seem to provide a better coverage of the true data distribution. Note that, while these numbers rely on an inaccurate distance measure (i.e., Euclidean distance in Inception feature space) and should be taken with a grain of salt, they correlate well with the results obtained from our experiments. For example, models trained with StyleGAN2 samples obtain a lower robust accuracy than those trained with DDPM samples – despite obtaining better FID and IS. ",
682
+ "bbox": [
683
+ 173,
684
+ 595,
685
+ 825,
686
+ 844
687
+ ],
688
+ "page_idx": 6
689
+ },
690
+ {
691
+ "type": "image",
692
+ "img_path": "images/a258345ad42ce663855c9b9f41cda34f90e8fb3d6c743c8733aecb768f7c50f9.jpg",
693
+ "image_caption": [
694
+ "Figure 4: Impact of violations of the sufficient conditions detailed in Sec. 4. We report the robust test accuracy (against $\\mathbf { A } \\mathbf { A } { + } \\mathbf { M } \\mathbf { T }$ [30]) when training different model architectures against $\\epsilon _ { \\infty } = 8 / 2 5 5$ . In panel (a), non-robust classifiers with different clean acccuracies are used for pseudo-labeling. In panel (b), we vary the mixture of training samples from a class-conditional Gaussian and a BigGAN distribution while the test distribution is the BigGAN distribution. In panel (c), we fix the proportion of samples from the class-conditional Gaussian to $9 9 \\%$ and increase the number of classes from the BigGAN distribution seen during training (thus increasing coverage). "
695
+ ],
696
+ "image_footnote": [],
697
+ "bbox": [
698
+ 184,
699
+ 97,
700
+ 813,
701
+ 223
702
+ ],
703
+ "page_idx": 7
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "",
708
+ "bbox": [
709
+ 174,
710
+ 359,
711
+ 825,
712
+ 443
713
+ ],
714
+ "page_idx": 7
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "6 Experiments ",
719
+ "text_level": 1,
720
+ "bbox": [
721
+ 174,
722
+ 462,
723
+ 312,
724
+ 479
725
+ ],
726
+ "page_idx": 7
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "The experimental setup is explained in App. A. We use Residual Networks (ResNets) and Wide ResNets (WRNs) [31, 79] with Swish/SiLU [33] activations. We use stochastic weight averaging [38] with a decay rate of 0.995. For adversarial training, we use TRADES [82] with 10 Projected Gradient Descent (PGD) steps. We train for 400 CIFAR-10-equivalent epochs with a batch size of 1024 (i.e., 19K steps). We evaluate our models against AUTOATTACK [16] and MULTITARGETED [29], which is denoted $\\mathbf { A A } { + } \\mathbf { M } \\mathbf { T }$ [30]. For comparison, we trained ten WRN-28-10 models on CIFAR-10 (without additional generated samples) against $\\epsilon _ { \\infty } = 8 / 2 5 5$ . The resulting robust accuracy is $5 4 . 4 4 { \\pm } 0 . 3 9 \\%$ , thus showing a relatively low variance. Furthermore, as we will see, our best models are well clear of the threshold for statistical significance. On CIFAR-10 against $\\epsilon _ { \\infty } = 8 / 2 5 5$ without additional generated samples a ResNet-18 achieves a robust accuracy of $5 0 . 6 4 \\%$ and a WRN-70-16 achieves $5 7 . 1 4 \\%$ . Unless stated otherwise, all results pertain to CIFAR-10. ",
731
+ "bbox": [
732
+ 174,
733
+ 492,
734
+ 826,
735
+ 645
736
+ ],
737
+ "page_idx": 7
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "6.1 Sufficient conditions ",
742
+ "text_level": 1,
743
+ "bbox": [
744
+ 174,
745
+ 661,
746
+ 354,
747
+ 676
748
+ ],
749
+ "page_idx": 7
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "The first set of experiments probes how violations of Cond. 1, 2 and 4 impact robustness against $\\epsilon _ { \\infty } = 8 / 2 5 5$ (violations to Cond. 3 have an impact equivalent to those of Cond. 1). All experiments are summarized in Fig. 4 where we train models with increasing capacity. ",
754
+ "bbox": [
755
+ 174,
756
+ 688,
757
+ 825,
758
+ 728
759
+ ],
760
+ "page_idx": 7
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "Non-robust classifier accuracy. In Fig. 4(a), we train models using 1M samples generated by the DDPM and vary the accuracy of the the pre-trained, non-robust classifier $f _ { \\mathrm { N R } }$ . We evaluate the robust accuracy obtained on CIFAR-10 test set. We observe that robustness improves as the accuracy of $f _ { \\mathrm { N R } }$ increases. Notably, even with the $7 4 . 4 7 \\%$ -accurate non-robust classifier, the WRN-28-10 and WRN-70-16 obtain robust accuracies of $5 8 . 1 5 \\%$ and $5 9 . 8 3 \\%$ , respectively, and already improve upon the state-of-the-art $( 5 7 . 1 4 \\%$ at the time of writing). Thus, validating that, in practice, it is not necessary to have access to a perfect non-robust classifier. ",
765
+ "bbox": [
766
+ 174,
767
+ 743,
768
+ 825,
769
+ 840
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "Quality of the generative models. To analyze how the quality of the generative model influences robustness, we use the BigGAN to model the “true” data distribution. During training, we use samples generated from a mixture of the class-conditional Gaussian and BigGAN distributions; during testing, we evaluate on a separate subset of 10K unseen BigGAN samples. To probe Cond. 2, we change the proportion of training samples from the class-conditional Gaussian. In effect, decreasing the proportion of such samples skews the mixed generative model (modeled by the mixture of Gaussian and BigGAN distributions) to produce more samples from the true distribution (modeled by the BigGAN distribution), thereby closing the gap between the approximated distribution $\\hat { \\mathcal { D } }$ and true distribution $\\mathcal { D }$ . As expected, Fig. 4(b) demonstrates that, given enough capacity, models can significantly reduce the adversarial risk. ",
776
+ "bbox": [
777
+ 176,
778
+ 856,
779
+ 823,
780
+ 911
781
+ ],
782
+ "page_idx": 7
783
+ },
784
+ {
785
+ "type": "image",
786
+ "img_path": "images/ae444178f536b7d1189a65c00f2c5be9d41a215baebe793de3b527af52a200d2.jpg",
787
+ "image_caption": [
788
+ "Figure 5: Robust test accuracy obtained by training a WRN-28-10 against $\\epsilon _ { \\infty } = 8 / 2 5 5$ on CIFAR-10 when using additional data produced by different generative models. We compare how the ratio between original and generated images (i.e., $\\alpha$ ) affects robustness ( $0 \\%$ means generated samples only, $100 \\%$ means CIFAR-10 train set only). ",
789
+ "Table 2: Clean (without perturbations) and robust (under adversarial attack) accuracy obtained by different models (we pick the worst accuracy obtained by either AUTOATTACK or $\\mathbf { A A + M T } ,$ ). The accuracies are reported on the full test sets. For CIFAR-10, we test against $\\epsilon _ { \\infty } ~ = ~ 8 / 2 5 5$ and $\\epsilon _ { 2 } =$ 128/255. For CIFAR-100, SVHN and TINYIMAGENET, we test against $\\epsilon _ { \\infty } = 8 / 2 5 5$ . \\* This model is trained for 2000 epochs on 100M samples. "
790
+ ],
791
+ "image_footnote": [],
792
+ "bbox": [
793
+ 179,
794
+ 92,
795
+ 459,
796
+ 238
797
+ ],
798
+ "page_idx": 8
799
+ },
800
+ {
801
+ "type": "table",
802
+ "img_path": "images/9250b3b0cafb63ebf6bc7675356e2df9650772e0cca3d83f6c4f1a8bda836553.jpg",
803
+ "table_caption": [],
804
+ "table_footnote": [],
805
+ "table_body": "<table><tr><td>MODEL</td><td>DATASET</td><td>NORM</td><td>CLEAN</td><td>ROBUST</td></tr><tr><td>Wu et al.[75](WRN-34-10) Gowal et al.[30](WRN-70-16) Ours (DDPM) (WRN-28-10) Ours (DDPM)(WRN-70-16) Ours (100M DDPM)*(ResNet-18) Ours (100MDDPM)*(WRN-28-10) Ours (100M DDPM)*(WRN-70-16)</td><td>CIFAR-10</td><td>lo</td><td>85.36% 85.29% 85.97% 86.94% 87.35% 87.50% 88.74%</td><td>56.17% 57.14% 60.73% 63.58% 58.50% 63.38% 66.10%</td></tr><tr><td>Wu et al.[75](WRN-34-10) Gowal et al. [30] (WRN-70-16) Ours (DDPM) (WRN-28-10) Ours (DDPM) (WRN-70-16)</td><td>CIFAR-10</td><td>l2</td><td>88.51% 90.90% 90.24% 90.83%</td><td>73.66% 74.50% 77.37% 78.31%</td></tr><tr><td>Cui et al. [20](WRN-34-10) Gowal et al. [30] (WRN-70-16) Ours (DDPM)(WRN-28-10) Ours (DDPM) (WRN-70-16)</td><td>CIFAR-100</td><td>lo</td><td>60.64% 60.86% 59.18% 60.46%</td><td>29.33% 30.03% 30.81% 33.49%</td></tr><tr><td>Ours (without DDPM) (WRN-28-10) Ours (DDPM) (WRN-28-10)</td><td>SVHN</td><td>l</td><td>92.87% 94.15%</td><td>56.83% 60.90%</td></tr><tr><td>Ours (without DDPM)(WRN-28-10) Ours (DDPM) (WRN-28-10)</td><td>TINYIMAGENET</td><td>l</td><td>51.56% 60.95%</td><td>21.56% 26.66%</td></tr></table>",
806
+ "bbox": [
807
+ 434,
808
+ 258,
809
+ 821,
810
+ 453
811
+ ],
812
+ "page_idx": 8
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "",
817
+ "bbox": [
818
+ 174,
819
+ 478,
820
+ 825,
821
+ 563
822
+ ],
823
+ "page_idx": 8
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Relationship between coverage and capacity. Similarly to Fig. 4(b), we use samples generated from a mixture of the class-conditional Gaussian and BigGAN distributions; during testing, we evaluate on a separate subset of 10K unseen BigGAN samples. To probe Cond. 4, we keep the proportion of samples from the class-conditional Gaussian distribution fixed at $9 9 \\%$ and use the remaining $1 \\%$ to include BigGAN samples corresponding to either 0, 1, . . . or 10 classes (thereby increasing coverage). In other words, the coverage of the true data distribution $\\mathcal { D }$ (given by the BigGAN) increases as the number of seen classes increases. However, the approximated distribution $\\hat { \\mathcal { D } }$ remains different from the true data distribution even when the coverage reaches all classes (as the proportion of Gaussian samples is fixed to $9 9 \\%$ ). We observe in Fig. 4(c) that the robust accuracy of models with lower capacity improves less drastically – yielding a gap of $1 7 . 3 7 \\%$ at full coverage between the ResNet-18 and WRN-70-16 models. This observation confirms that, with enough coverage, model capacity can compensate for the lack of a perfect generative model. ",
828
+ "bbox": [
829
+ 173,
830
+ 577,
831
+ 825,
832
+ 742
833
+ ],
834
+ "page_idx": 8
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "Discussion. Overall, Fig. 4(b) shows that when Cond. 2 is satisfied, the difference between models reduces and capacity takes a secondary role (since all models can bring their adversarial risk close to zero). Fig. 4(c) shows that when Cond. 4 is satisfied (and Cond. 2 is not), capacity matters as we observe that larger models benefit more from increased coverage. Both figures point to the fact that the quality of the generative model becomes less important when the capacity of the classifiers increases (as long as coverage is sufficient). ",
839
+ "bbox": [
840
+ 174,
841
+ 758,
842
+ 825,
843
+ 842
844
+ ],
845
+ "page_idx": 8
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "6.2 State-of-the-art robust accuracy ",
850
+ "text_level": 1,
851
+ "bbox": [
852
+ 176,
853
+ 858,
854
+ 434,
855
+ 872
856
+ ],
857
+ "page_idx": 8
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "Effect of mixing factor $( \\alpha )$ . As done in Sec. 3.3, we vary the proportion $\\alpha$ of original images in each batch for all generated datasets. Fig. 5 explores a wide range of proportions while training a ",
862
+ "bbox": [
863
+ 174,
864
+ 883,
865
+ 821,
866
+ 911
867
+ ],
868
+ "page_idx": 8
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "WRN-28-10 against $\\epsilon _ { \\infty } = 8 / 2 5 5$ on CIFAR-10. Samples from all models improve robustness when mixed optimally, but only samples from the StyleGAN2 and DDPM improve robustness significantly $( + 3 . 7 3 \\%$ and $+ 6 . 2 9 \\%$ , respectively). It is also interesting to observe that, in the case of the DDPM, using 1M generated images is better than using the 50K images from the original train set only. While this may seem surprising, it can easily be explained if we assume that the DDPM produces many more high-quality, high-diversity images than the limited set of images present in the original data (c.f. [62]). We also observe that the optimal mixing factor is different for different generative models. Indeed, increasing $\\alpha$ reduces the gap to the true data distribution at the cost of less complementarity with the original train set (see Sec. E.2). ",
873
+ "bbox": [
874
+ 173,
875
+ 90,
876
+ 825,
877
+ 215
878
+ ],
879
+ "page_idx": 9
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "CIFAR-10. Table 2 shows the performance of models trained with 1M samples generated by the DDPM on CIFAR-10 against $\\epsilon _ { \\infty } = 8 / 2 5 5$ and $\\epsilon _ { 2 } = 1 2 8 / 2 5 5$ . Irrespective of their size, models trained with 1M DDPM samples surpass the current state-of-the-art in robust accuracy by a large margin $+ 6 . 4 4 \\%$ and $+ 3 . 8 1 \\%$ ). When using 100M DDPM samples (and training for 2000 epochs), we reach $6 6 . 1 0 \\%$ robust accuracy against $\\epsilon _ { \\infty } = 8 / 2 5 5$ which constitutes an improvement of $+ 8 . 9 6 \\%$ over the state-of-the-art. In this setting, our smallest model (ResNet-18) surpasses state-of-the-art results obtained by much larger models (e.g., WRN-70-16). Most remarkably, despite not using any external data, against $\\epsilon _ { \\infty } = 8 / 2 5 5$ , our best model beats all RobustBench [17] entries that used external data (see Table 6 in the appendix). ",
884
+ "bbox": [
885
+ 174,
886
+ 233,
887
+ 825,
888
+ 358
889
+ ],
890
+ "page_idx": 9
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "Generalization to other datasets (CIFAR-100, SVHN and TINYIMAGENET). Finally, to evaluate the generality of our approach, we evaluate it on CIFAR-100, SVHN [53] and TINYIMAGENET [26]. We train two new DDPM on the train set of CIFAR-100 and SVHN and sample 1M images from each. For TINYIMAGENET, we use a DDPM trained on IMAGENET [24] at $6 4 \\times 6 4$ resolution and restricted samples to the 200 classes of TINYIMAGENET. The results are shown in Table 2. On CIFAR-100, our best model reaches a robust accuracy of $3 3 . 4 9 \\%$ and improves noticeably upon the state-of-the-art by $+ 3 . 4 6 \\%$ (in the setting that does not use any external data). On SVHN, in the same table, we compare models trained without and with DDPM samples. Again, the addition of DDPM samples significantly improves robustness, with the robust accuracy improving by by $+ 4 . 0 7 \\%$ . On TINYIMAGENET, the improvement is $+ 5 . 1 0 \\%$ . ",
895
+ "bbox": [
896
+ 174,
897
+ 375,
898
+ 825,
899
+ 513
900
+ ],
901
+ "page_idx": 9
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "7 Conclusion. ",
906
+ "text_level": 1,
907
+ "bbox": [
908
+ 174,
909
+ 535,
910
+ 302,
911
+ 551
912
+ ],
913
+ "page_idx": 9
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Using generative models, we posit and demonstrate that generated samples provide a greater diversity of augmentations that allow adversarial training to go well beyond the current state-of-the-art. Our work provides novel insights into the effect of diversity and complementarity on robustness, which we hope can further our understanding of robustness. All our models and generated datasets are available online at https://github.com/deepmind/deepmind-research/tree/master/adversarial_robustness. ",
918
+ "bbox": [
919
+ 174,
920
+ 568,
921
+ 825,
922
+ 637
923
+ ],
924
+ "page_idx": 9
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "References ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 174,
932
+ 660,
933
+ 266,
934
+ 676
935
+ ],
936
+ "page_idx": 9
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "[1] A. Athalye and I. Sutskever. Synthesizing robust adversarial examples. Int. Conf. Mach. Learn., 2018. \n[2] A. Athalye, N. Carlini, and D. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. Int. Conf. Mach. Learn., 2018. \n[3] A. N. Bhagoji, D. Cullina, and P. Mittal. Lower bounds on adversarial robustness from optimal transport. Adv. Neural Inform. Process. Syst., 2019. \n[4] B. Biggio, I. Corona, D. Maiorca, B. Nelson, N. Šrndic, P. Laskov, G. Giacinto, and F. Roli. ´ Evasion attacks against machine learning at test time. In Machine Learning and Knowledge Discovery in Databases, 2013. \n[5] M. Bojarski, D. Del Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang, X. Zhang, J. Zhao, and K. Zieba. End to end learning for self-driving cars. NIPS Deep Learning Symposium, 2016. [6] J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, and S. WandermanMilne. JAX: composable transformations of Python+NumPy programs, 2018. URL http: //github.com/google/jax. [7] A. Brock, J. Donahue, and K. Simonyan. Large scale gan training for high fidelity natural image synthesis. Int. Conf. Learn. Represent., 2018. [8] T. Brunner, F. Diehl, M. T. Le, and A. Knoll. Guessing smart: Biased sampling for efficient black-box adversarial attacks. arXiv preprint arXiv:1812.09803, 2019. [9] N. Carlini and D. Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 3–14. ACM, 2017. \n[10] N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy, 2017. \n[11] Y. Carmon, A. Raghunathan, L. Schmidt, J. C. Duchi, and P. S. Liang. Unlabeled data improves adversarial robustness. In Adv. Neural Inform. Process. Syst., 2019. \n[12] H. Chang, T. D. Nguyen, S. K. Murakonda, E. Kazemi, and R. Shokri. On adversarial bias and the robustness of fair machine learning. arXiv preprint arXiv:2006.08669, 2020. \n[13] D. Chen, N. Yu, Y. Zhang, and M. Fritz. Gan-leaks: A taxonomy of membership inference attacks against generative models. arXiv preprint arXiv:1909.03935, 2020. \n[14] R. Child. Very deep vaes generalize autoregressive models and can outperform them on images. Int. Conf. Learn. Represent., 2021. \n[15] P. Covington, J. Adams, and E. Sargin. Deep neural networks for YouTube recommendations. In Proceedings of the 10th ACM Conference on Recommender Systems, 2016. \n[16] F. Croce and M. Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. arXiv preprint arXiv:2003.01690, 2020. \n[17] F. Croce, M. Andriushchenko, V. Sehwag, N. Flammarion, M. Chiang, P. Mittal, and M. Hein. Robustbench: a standardized adversarial robustness benchmark. arXiv preprint arXiv:2010.09670, 2020. \n[18] E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. Autoaugment: Learning augmentation policies from data. IEEE Conf. Comput. Vis. Pattern Recog., 2019. \n[19] E. D. Cubuk, B. Zoph, J. Shlens, and Q. V. Le. Randaugment: Practical automated data augmentation with a reduced search space. IEEE Conf. Comput. Vis. Pattern Recog., 2020. \n[20] J. Cui, S. Liu, L. Wang, and J. Jia. Learnable boundary guided adversarial training. arXiv preprint arXiv:2011.11164, 2020. \n[21] D. Cullina, A. N. Bhagoji, and P. Mittal. Pac-learning in the presence of adversaries. In Adv. Neural Inform. Process. Syst., 2018. \n[22] J. De Fauw, J. R. Ledsam, B. Romera-Paredes, S. Nikolov, N. Tomasev, S. Blackwell, H. Askham, X. Glorot, B. O’Donoghue, D. Visentin, G. v. d. Driessche, B. Lakshminarayanan, C. Meyer, F. Mackinder, S. Bouton, K. Ayoub, R. Chopra, D. King, A. Karthikesalingam, C. O. Hughes, R. Raine, J. Hughes, D. A. Sim, C. Egan, A. Tufail, H. Montgomery, D. Hassabis, G. Rees, T. Back, P. T. Khaw, M. Suleyman, J. Cornebise, P. A. Keane, and O. Ronneberger. Clinically applicable deep learning for diagnosis and referral in retinal disease. In Nature Medicine, 2018. \n[23] T. DeVries and G. W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017. \n[24] P. Dhariwal and A. Nichol. Diffusion models beat GANs on image synthesis. arXiv preprint arXiv:2105.05233, 2021. \n[25] Y. Dong, F. Liao, T. Pang, H. Su, J. Zhu, X. Hu, and J. Li. Boosting Adversarial Attacks with Momentum. IEEE Conf. Comput. Vis. Pattern Recog., 2018. \n[26] A. K. Fei-Fei Li and J. Johnson. The Tiny ImageNet dataset. 2017. URL https://www.kaggle.com/c/ tiny-imagenet. \n[27] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. Int. Conf. Learn. Represent., 2015. \n[28] S. Gowal, C. Qin, P.-S. Huang, T. Cemgil, K. Dvijotham, T. Mann, and P. Kohli. Achieving Robustness in the Wild via Adversarial Mixing with Disentangled Representations. arXiv preprint arXiv:1912.03192, 2019. \n[29] S. Gowal, J. Uesato, C. Qin, P.-S. Huang, T. Mann, and P. Kohli. An Alternative Surrogate Loss for PGD-based Adversarial Testing. arXiv preprint arXiv:1910.09338, 2019. \n[30] S. Gowal, C. Qin, J. Uesato, T. Mann, and P. Kohli. Uncovering the limits of adversarial training against norm-bounded adversarial examples. arXiv preprint arXiv:2010.03593, 2020. \n[31] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. IEEE Conf. Comput. Vis. Pattern Recog., 2016. \n[32] D. Hendrycks and T. Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In Int. Conf. Learn. Represent., 2018. \n[33] D. Hendrycks and K. Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. \n[34] D. Hendrycks, S. Basart, N. Mu, S. Kadavath, F. Wang, E. Dorundo, R. Desai, T. Zhu, S. Parajuli, M. Guo, D. Song, J. Steinhardt, and J. Gilmer. The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization. arXiv preprint arXiv:2006.16241, 2020. URL https://arxiv.org/pdf/2006.16241. \n[35] T. Hennigan, T. Cai, T. Norman, and I. Babuschkin. Haiku: Sonnet for JAX, 2020. URL http://github.com/deepmind/dm-haiku. \n[36] J. Ho, A. Jain, and P. Abbeel. Denoising diffusion probabilistic models. Adv. Neural Inform. Process. Syst., 2021. \n[37] E. Härkönen, A. Hertzmann, J. Lehtinen, and S. Paris. GANSpace: Discovering Interpretable GAN Controls. arXiv preprint arXiv:2004.02546, 2020. \n[38] P. Izmailov, D. Podoprikhin, T. Garipov, D. Vetrov, and A. G. Wilson. Averaging Weights Leads to Wider Optima and Better Generalization. Uncertainty in Artificial Intelligence, 2018. \n[39] A. Jahanian, L. Chai, and P. Isola. On the \"steerability\" of generative adversarial networks. In Int. Conf. Learn. Represent., 2019. \n[40] T. Karras, S. Laine, M. Aittala, J. Hellsten, J. Lehtinen, and T. Aila. Analyzing and improving the image quality of stylegan. In IEEE Conf. Comput. Vis. Pattern Recog., 2020. \n[41] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. Int. Conf. Learn. Represent., 2015. \n[42] A. Krizhevsky, V. Nair, and G. Hinton. The CIFAR-10 dataset. 2014. URL http://www.cs.toronto. edu/kriz/cifar.html. \n[43] S. Kumar, V. Bitorff, D. Chen, C. Chou, B. Hechtman, H. Lee, N. Kumar, P. Mattson, S. Wang, T. Wang, Y. Xu, and Z. Zhou. Scale mlperf-0.6 models on google tpu-v3 pods. arXiv preprint arXiv:1909.09756, 2019. \n[44] A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. ICLR workshop, 2016. \n[45] C. Laidlaw, S. Singla, and S. Feizi. Perceptual adversarial robustness: Defense against unseen threat models. In Int. Conf. Learn. Represent., 2021. \n[46] J. Lee and M. Raginsky. Minimax statistical learning with wasserstein distances. Adv. Neural Inform. Process. Syst., 2018. \n[47] I. Loshchilov and F. Hutter. SGDR: stochastic gradient descent with warm restarts. In Int. Conf. Learn. Represent., 2017. \n[48] D. Madaan, J. Shin, and S. J. Hwang. Learning to generate noise for robustness against multiple perturbations. arXiv preprint arXiv:2006.12135, 2020. \n[49] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. Int. Conf. Learn. Represent., 2018. \n[50] M. Mosbach, M. Andriushchenko, T. Trost, M. Hein, and D. Klakow. Logit Pairing Methods Can Fool Gradient-Based Attacks. arXiv preprint arXiv:1810.12042, 2018. \n[51] A. Najafi, S.-i. Maeda, M. Koyama, and T. Miyato. Robustness to adversarial perturbations in learning from incomplete data. Adv. Neural Inform. Process. Syst., 2019. \n[52] Y. Nesterov. A method of solving a convex programming problem with convergence rate $o ( 1 / k ^ { 2 } )$ . In Sov. Math. Dokl, 1983. \n[53] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. 2011. \n[54] OpenAI. Dall-e: Creating images from text, 2021. URL https://openai.com/blog/dall-e. \n[55] T. Pang, X. Yang, Y. Dong, H. Su, and J. Zhu. Bag of tricks for adversarial training. arXiv preprint arXiv:2010.00467, 2020. \n[56] T. Pang, X. Yang, Y. Dong, K. Xu, H. Su, and J. Zhu. Boosting Adversarial Training with Hypersphere Embedding. Adv. Neural Inform. Process. Syst., 2020. \n[57] A. Plumerault, H. L. Borgne, and C. Hudelot. Controlling generative models with continuous factors of variations. In Int. Conf. Learn. Represent., 2020. \n[58] B. T. Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 1964. \n[59] S. Ravuri and O. Vinyals. Classification Accuracy Score for Conditional Generative Models. arXiv preprint arXiv:1905.10887, 2019. \n[60] L. Rice, E. Wong, and J. Z. Kolter. Overfitting in adversarially robust deep learning. Int. Conf. Mach. Learn., 2020. \n[61] P. Samangouei, M. Kabkab, and R. Chellappa. Defense-gan: Protecting classifiers against adversarial attacks using generative models. In Int. Conf. Learn. Represent., 2018. \n[62] L. Schmidt, S. Santurkar, D. Tsipras, K. Talwar, and A. Madry. Adversarially Robust Generalization Requires More Data. Adv. Neural Inform. Process. Syst., 2018. \n[63] L. Song, R. Shokri, and P. Mittal. Privacy risks of securing machine learning models against adversarial examples. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pages 241–257, 2019. \n[64] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. Int. Conf. Learn. Represent., 2014. \n[65] A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: a large dataset for nonparametric object and scene recognition. IEEE Trans. Pattern Anal. Mach. Intell., 2008. \n[66] F. Tramer, N. Carlini, W. Brendel, and A. Madry. On adaptive attacks to adversarial example defenses. arXiv preprint arXiv:2002.08347, 2020. \n[67] F. Tramèr, A. Kurakin, N. Papernot, I. Goodfellow, D. Boneh, and P. McDaniel. Ensemble Adversarial Training: Attacks and Defenses. arXiv preprint arXiv:1705.07204, 2017. \n[68] F. Tramèr, J. Behrmann, N. Carlini, N. Papernot, and J.-H. Jacobsen. Fundamental Tradeoffs between Invariance and Sensitivity to Adversarial Perturbations. arXiv preprint arXiv:2002.04599, 2020. \n[69] D. Tsipras, S. Santurkar, L. Engstrom, A. Turner, and A. Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018. \n[70] Z. Tu, J. Zhang, and D. Tao. Theoretical analysis of adversarial learning: A minimax approach. In Adv. Neural Inform. Process. Syst. 2019. \n[71] J. Uesato, B. O’Donoghue, A. v. d. Oord, and P. Kohli. Adversarial Risk and the Dangers of Evaluating Against Weak Attacks. Int. Conf. Mach. Learn., 2018. \n[72] J. Uesato, J.-B. Alayrac, P.-S. Huang, R. Stanforth, A. Fawzi, and P. Kohli. Are labels required for improving adversarial robustness? Adv. Neural Inform. Process. Syst., 2019. \n[73] E. Wong and J. Z. Kolter. Learning perturbation sets for robust machine learning. In Int. Conf. Learn. Represent., 2021. \n[74] B. Wu, J. Chen, D. Cai, X. He, and Q. Gu. Do wider neural networks really help adversarial robustness? arXiv preprint arXiv:2010.01279, 2021. \n[75] D. Wu, S.-t. Xia, and Y. Wang. Adversarial weight perturbation helps robust generalization. Adv. Neural Inform. Process. Syst., 2020. \n[76] C. Xie, Y. Wu, L. van der Maaten, A. Yuille, and K. He. Feature denoising for improving adversarial robustness. IEEE Conf. Comput. Vis. Pattern Recog., 2019. \n[77] Y. Yang, G. Zhang, D. Katabi, and Z. Xu. Me-net: Towards effective adversarial robustness with matrix estimation. In Int. Conf. Mach. Learn., 2019. \n[78] S. Yun, D. Han, S. J. Oh, S. Chun, J. Choe, and Y. Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. Int. Conf. Comput. Vis., 2019. \n[79] S. Zagoruyko and N. Komodakis. Wide residual networks. Brit. Mach. Vis. Conf., 2016. \n[80] R. Zhai, T. Cai, D. He, C. Dan, K. He, J. Hopcroft, and L. Wang. Adversarially Robust Generalization Just Requires More Unlabeled Data. arXiv preprint arXiv:1906.00555, 2019. \n[81] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk minimization. Int. Conf. Learn. Represent., 2018. \n[82] H. Zhang, Y. Yu, J. Jiao, E. P. Xing, L. E. Ghaoui, and M. I. Jordan. Theoretically Principled Trade-off between Robustness and Accuracy. Int. Conf. Mach. Learn., 2019. \n[83] J. Zhang, J. Zhu, G. Niu, B. Han, M. Sugiyama, and M. Kankanhalli. Geometry-aware instancereweighted adversarial training. In Int. Conf. Learn. Represent., 2021. \n[84] R. Zhang, P. Isola, A. A. Efros, E. Shechtman, and O. Wang. The unreasonable effectiveness of deep features as a perceptual metric. arXiv preprint arXiv:1801.03924, 2018. \n[85] D. Zoran, M. Chrzanowski, P.-S. Huang, S. Gowal, A. Mott, and P. Kohl. Towards Robust Image Classification Using Sequential Attention Models. IEEE Conf. Comput. Vis. Pattern Recog., 2019. ",
941
+ "bbox": [
942
+ 179,
943
+ 685,
944
+ 828,
945
+ 912
946
+ ],
947
+ "page_idx": 9
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "",
952
+ "bbox": [
953
+ 171,
954
+ 73,
955
+ 826,
956
+ 919
957
+ ],
958
+ "page_idx": 10
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "",
963
+ "bbox": [
964
+ 169,
965
+ 60,
966
+ 828,
967
+ 917
968
+ ],
969
+ "page_idx": 11
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "",
974
+ "bbox": [
975
+ 171,
976
+ 78,
977
+ 828,
978
+ 920
979
+ ],
980
+ "page_idx": 12
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "",
985
+ "bbox": [
986
+ 169,
987
+ 90,
988
+ 828,
989
+ 904
990
+ ],
991
+ "page_idx": 13
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "Checklist ",
996
+ "text_level": 1,
997
+ "bbox": [
998
+ 174,
999
+ 89,
1000
+ 254,
1001
+ 106
1002
+ ],
1003
+ "page_idx": 14
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "1. For all authors... ",
1008
+ "bbox": [
1009
+ 214,
1010
+ 116,
1011
+ 339,
1012
+ 130
1013
+ ],
1014
+ "page_idx": 14
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We claim that adversarial robustness can be improved using generated data. Experiments demonstrate that this is possible and that the improvements are significant (Sec. 6). \n(b) Did you describe the limitations of your work? [Yes] The sufficient conditions detailed in Sec. 4 provide an idealized situation that we degrade in the experimental section. In particular, the method is intrinsically limited by the accuracy of the non-robust classifier $f _ { \\mathrm { N R } }$ as well as the ability to generate realistic inputs. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] We highlight potential pitfalls in the introduction and related work. We summarize these and highlights them more broadly in App. G \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1019
+ "bbox": [
1020
+ 235,
1021
+ 133,
1022
+ 825,
1023
+ 319
1024
+ ],
1025
+ "page_idx": 14
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "2. If you are including theoretical results... ",
1030
+ "bbox": [
1031
+ 215,
1032
+ 324,
1033
+ 493,
1034
+ 338
1035
+ ],
1036
+ "page_idx": 14
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] We provide two set of sufficient conditions. The first set, composed of Cond. 1 and Cond. 2, applies to the limited-capacity and limited-compute regime, while the second set, composed of Cond. 1, Cond. 3 and Cond. 2, applies to the infinite-capacity and infinite-compute regime. Other assumptions are detailed in Sec. 4.1. \n(b) Did you include complete proofs of all theoretical results? [Yes] Proof are included in the main text and rely on either demonstrating that Eq. 4 and Eq. 5 can be made equal when Cond. 1 and Cond. 2 are satisfied (limited-capacity) or showing that the combination of Cond. 1, Cond. 3 and Cond. 4 yields a perfectly robust classifier on the subset of inputs that includes the set of realistic inputs (infinite-capacity regime). ",
1041
+ "bbox": [
1042
+ 236,
1043
+ 342,
1044
+ 825,
1045
+ 482
1046
+ ],
1047
+ "page_idx": 14
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "3. If you ran experiments... ",
1052
+ "bbox": [
1053
+ 214,
1054
+ 486,
1055
+ 393,
1056
+ 500
1057
+ ],
1058
+ "page_idx": 14
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "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 training and evaluation code is available at https://github.com/deepmind/deepmind-research/tree/master/ adversarial_robustness. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] All details are in App. A. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Adversarial training is compute-intensive and the negative-impact of running more experiments outweighed the benefits. We use the same evaluation setup than proposed in [30]. That is, we always trained two models for each hyper-parameter setup and chose the best model according to a separate validation set of 1024 images (the average degradation in robustness between both models measured on a subset of 10 hyper-parameters setups is $- 0 . 1 2 \\%$ in absolute robust accuracy). We also evaluated all models with one of the strongest set of adversarial attacks. Additionally, our baseline model was trained ten times resulting in a standard deviation of $0 . 3 9 \\%$ and all reported improvements in robust accuracy are well beyond 2 standard deviations. \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] All details are in App. A. ",
1063
+ "bbox": [
1064
+ 235,
1065
+ 505,
1066
+ 825,
1067
+ 758
1068
+ ],
1069
+ "page_idx": 14
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1074
+ "bbox": [
1075
+ 220,
1076
+ 762,
1077
+ 821,
1078
+ 776
1079
+ ],
1080
+ "page_idx": 14
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] We use CIFAR10 [42], CIFAR-100 [42], SVHN [53] and TINYIMAGENET [26]. \n(b) Did you mention the license of the assets? [No] Please refer to citations for details on licensing. All datasets are available for non-commercial use. \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We generate additional data using generative models. These are available online at https://github.com/deepmind/deepmind-research/tree/master/adversarial_robustness. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] ",
1085
+ "bbox": [
1086
+ 236,
1087
+ 781,
1088
+ 826,
1089
+ 912
1090
+ ],
1091
+ "page_idx": 14
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1096
+ "bbox": [
1097
+ 236,
1098
+ 92,
1099
+ 823,
1100
+ 119
1101
+ ],
1102
+ "page_idx": 15
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1107
+ "bbox": [
1108
+ 214,
1109
+ 123,
1110
+ 705,
1111
+ 138
1112
+ ],
1113
+ "page_idx": 15
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "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] ",
1118
+ "bbox": [
1119
+ 238,
1120
+ 142,
1121
+ 826,
1122
+ 232
1123
+ ],
1124
+ "page_idx": 15
1125
+ }
1126
+ ]
parse/train/0NXUSlb6oEu/0NXUSlb6oEu_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/0NXUSlb6oEu/0NXUSlb6oEu_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6YEQUn0QICG/6YEQUn0QICG.md ADDED
@@ -0,0 +1,578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FEDBN: FEDERATED LEARNING ON NON-IID FEATURES VIA LOCAL BATCH NORMALIZATION
2
+
3
+ Xiaoxiao Li
4
+ Department of Computer Science Princeton University
5
+ xiaoxiao.li@aya.yale.edu
6
+
7
+ Meirui Jiang Department of Computer Science and Engineering The Chinese University of Hong Kong mrjiang@cse.cuhk.edu.hk
8
+
9
+ Xiaofei Zhang Department of Statistics Iowa State University xfzhang@iastate.edu
10
+
11
+ Michael Kamp
12
+ Dept of Data Science and AI, Faculty of IT
13
+ Monash University
14
+ michael.kamp@monash.edu
15
+ Qi Dou∗
16
+ Department of Computer Science and Engineering
17
+ The Chinese University of Hong Kong
18
+ qdou@cse.cuhk.edu.hk
19
+
20
+ # ABSTRACT
21
+
22
+ The emerging paradigm of federated learning (FL) strives to enable collaborative training of deep models on the network edge without centrally aggregating raw data and hence improving data privacy. In most cases, the assumption of independent and identically distributed samples across local clients does not hold for federated learning setups. Under this setting, neural network training performance may vary significantly according to the data distribution and even hurt training convergence. Most of the previous work has focused on a difference in the distribution of labels or client shifts. Unlike those settings, we address an important problem of FL, e.g., different scanners/sensors in medical imaging, different scenery distribution in autonomous driving (highway vs. city), where local clients store examples with different distributions compared to other clients, which we denote as feature shift non-iid. In this work, we propose an effective method that uses local batch normalization to alleviate the feature shift before averaging models. The resulting scheme, called FedBN, outperforms both classical FedAvg, as well as the state-of-the-art for non-iid data (FedProx) on our extensive experiments. These empirical results are supported by a convergence analysis that shows in a simplified setting that FedBN has a faster convergence rate than FedAvg. Code is available at https://github.com/med-air/FedBN.
23
+
24
+ # 1 INTRODUCTION
25
+
26
+ Federated learning (FL), has gained popularity for various applications involving learning from distributed data. In FL, a cloud server (the “server”) can communicate with distributed data sources (the “clients”), while the clients hold data separately. A major challenge in FL is the training data statistical heterogeneity among the clients (Kairouz et al., 2019; Li et al., 2020b). It has been shown that standard federated methods such as FedAvg (McMahan et al., 2017) which are not designed particularly taking care of non-iid data significantly suffer from performance degradation or even diverge if deployed over non-iid samples (Karimireddy et al., 2019; Li et al., 2018; 2020a).
27
+
28
+ Recent studies have attempted to address the problem of FL on non-iid data. Most variants of FedAvg primarily tackle the issues of stability, client drift and heterogeneous label distribution over clients (Li et al., 2020b; Karimireddy et al., 2019; Zhao et al., 2018). Instead, we focus on the shift in the feature space, which has not yet been explored in the literature. Specifically, we consider that local data deviates in terms of the distribution in feature space, and identify this scenario as feature shift. This type of non-iid data is a critical problem in many real-world scenarios, typically in cases where the local devices are responisble for a heterogeneity in the feature distributions. For example in cancer diagnosis tasks, medical radiology images collected in different hospitals have uniformly distributed labels (i.e., the cancer types treated are quite similar across the hospitals). However, the image appearance can vary a lot due to different imaging machines and protocols used in hospitals, e.g., different intensity and contrast. In this example, each hospital is a client and hospitals aim to collaboratively train a cancer detection model without sharing privacy-sensitive data.
29
+
30
+ ![](images/95f881ad2ea770f8eff5d3510f8d601a42dbc51af6b6e252c4bdad5e958c734b.jpg)
31
+ Figure 1: Training error on local datasets for two clients respectively with and w/o BN, where BN harmonizes the loss surface.
32
+
33
+ ![](images/3cb2cdabb35d5e52e3308eee1550d60e963503b41ad7093f8f4e6bbb51705352.jpg)
34
+ Figure 2: Error surface of a client for model parameter $w \in [ 0 . 0 0 1 , 1 2 ]$ and BN parameter $\gamma \in [ 0 . 0 0 1 , 4 ]$ . Averaging model and BN parameters leads to worse solutions.
35
+
36
+ Tackling non-iid data with feature shift has been explored in classical centralized training in the context of domain adaptation. Here, an effective approach in practice is utilizing Batch Normalization (BN) (Ioffe & Szegedy, 2015): recent work has proposed BN as a tool to mitigate domain shifts in domain adaptation tasks with promising results achieved (Li et al., 2016; Liu et al., 2020; Chang et al., 2019). Inspired by this, this paper proposes to apply BN for feature shift FL. To illustrate the idea, we present a toy example that illustrates how BN may help harmonizing local feature distributions.
37
+
38
+ Observation of BN in a FL Toy Example: We consider a simple non-convex learning problem: we generate data $x , y \in \mathbb { R }$ with $y = \cos ( w _ { t r u e } x ) + \epsilon$ , where $x \in \mathbb { R }$ is drawn iid from Gaussian distribution and $\epsilon$ is zero-mean Gaussian noise and consider models of the form $f _ { w } ( x ) = \cos ( w x )$ with model parameter $w \in \mathbb { R }$ . Local data deviates in the variance of $x$ . First, we illustrate that local batch normalization harmonizes local data distributions. We consider a simplified form of BN that normalizes the input by scaling it with $\gamma _ { : }$ , i.e., the local empirical standard deviation, and a setting with 2 clients. As Fig. 1 shows, the local squared loss is very different between the two clients. Thus, averaging the model does not lead to a good model. However when applying local BN, the local training error surfaces become similar and averaging the models can be beneficial. To further illustrate the impact of BN, we plot the error surface for one client with respect to both model parameter $w \in \mathbb { R }$ and BN parameter $\gamma \in \mathbb { R }$ in Fig. 2. The figure shows that for an optimal weight $w _ { 1 } ^ { * }$ , changing $\gamma$ deteriorates the model quality. Similarly, for a given optimal BN parameter $\gamma _ { 1 } ^ { * }$ , changing $w$ deteriorates the quality. In particular, the average model $\overline { { w } } \overset { \cdot } { = } ( w _ { 1 } ^ { * } + \overset { \cdot } { w } _ { 2 } ^ { * } ) / 2$ and average BN parameters $\overline { { \gamma } } = ( \gamma _ { 1 } ^ { * } + \gamma _ { 2 } ^ { * } ) / 2$ has a high generalization error. At the same time, the average model $\overline { { w } }$ with local BN parameter $\gamma _ { 1 } ^ { * }$ performs very well.
39
+
40
+ Motivated by the above insight and observation, this paper proposes a novel federated learning method, called FedBN, for addressing non-iid training data which keeps the client BN layers updated locally, without communicating, and aggregating them at the server. In practice, we can simply update the non-BN layers using FedAvg, without modifying any optimization or aggregation scheme. This approach has zero parameters to tune, requires minimal additional computational resources, and can be easily applied to arbitrary neural network architectures with BN layers in FL. Besides the benefit shown in the toy example, we also show the benefits in accelerating convergence by theoretically analyzing the convergence of FedBN in the over-parameterized regime. In addition, we have conducted extensive experiments on a benchmark and three real-world datasets. Compared to classical FedAvg, as well as the state-of-the-art for non-iid data (FedProx), our novel method, FedBN, demonstrates significant practical improvements on the extensive experiments.
41
+
42
+ # 2 RELATED WORK
43
+
44
+ Techniques for Non-IID Challenges in Federated Learning: The widely known aggregation strategy in FL, FedAvg (McMahan et al., 2017), often suffers when data is heterogeneous over local client. Empirical work addressing non-iid issues, mainly focus on label distribution skew, where a non-iid dataset is formed by partitioning a “flat” existing dataset based on the labels. FedProx (Li et al., 2020b), a recent framework tackled the heterogeneity by allowing partial information aggregation and adding a proximal term to FedAvg. Zhao et al. (2018) assumed a subset of the data is globally shared between all the clients, hence generalizes to the problem at hand. FedMA (Wang et al., 2020) proposed an aggregation strategy for non-iid data partition that shares global model in a layer-wise manner. However, so far there are only limited attempts considering non-iid induced from feature shift, which is common in medical data collecting from different equipment and natural image collected in various noisy environment. Very recently, FedRobust (Reisizadeh et al., 2020) assumes data follows an affine distribution shift and tackles this problem by learning the affine transformation. This hampers the generalization when we cannot estimate the explicit affine transformation. Concurrently to our work, SiloBN Andreux et al. (2020) empirically shows that local clients keeping some untrainable BN parameters could improve robustness to data heterogeneity, but provides no theoretical analysis of the approach. FedBN instead keeps all BN parameters strictly local. Recently, an orthogonal approach to the non-iid problem has been proposed that focuses on improving the optimization mechanism (Reddi et al., 2020; Zhang et al., 2020).
45
+
46
+ Batch Normalization in Deep Neural Networks: Batch Normalization (Ioffe & Szegedy, 2015) is an indispensable component in many deep neural networks and has shown its success in neural network training. Relevant literature has uncovered a number of benefits given by batch normalization. Santurkar et al. (2018) showed that BN makes the optimization landscape significantly smoother. Luo et al. (2018) investigated an explicit regularization form of BN such that improving the robustness of optimization. Morcos et al. (2018) suggested that BN implicitly discourages single direction reliance, thus improving model generalizability. Li et al. (2018) took advantage of BN for tackling the domain adaptation problem. However, what a role BN is playing in the scope of federated learning, especially for non-iid training, still remains unexplored to date.
47
+
48
+ # 3 PRELIMINARY
49
+
50
+ Non-IID Data in Federated Learning: We introduce the concept of feature shift in federated learning as a novel category of client’s non-iid data distribution. So far, the categories of non-iid data considered according to Kairouz et al. (2019); Hsieh et al. (2019) can be described by the joint probability between features $\mathbf { x }$ and labels $y$ on each client. We can rewrite $P _ { i } ( \mathbf { x } , y )$ as $P _ { i } ( y | \mathbf { x } ) P _ { i } ( \mathbf { x } )$ and $P _ { i } ( { \bf x } | y ) P _ { i } ( y )$ . We define feature shift as the case that covers: 1) covariate shift: the marginal distributions $P _ { i } ( { \bf x } )$ varies across clients, even if $P _ { i } ( y | \mathbf { x } )$ is the same for all client; and 2) concept shift: the conditional distribution $P _ { i } ( \mathbf { x } | y )$ varies across clients and $P ( y )$ is the same.
51
+
52
+ Federated Averaging (FedAvg): We establish our algorithm on FedAvg introduced by McMahan et al. (2017) which is the most popular existing and easiest to implement federated learning strategy, where clients collaboratively send updates of locally trained models to a global server. Each client runs a local copy of the global model on its local data. The global model’s weights are then updated with an average of local clients’ updates and deployed back to the clients. This builds upon previous distributed learning work by not only supplying local models but also performing training locally on each device. Hence FedAvg potentially empowers clients (especially clients with small dataset) to collaboratively learn a shared prediction model while keeping all training data locally. Although FedAvg has shown successes in classical Federated Learning tasks, it suffers from slow convergence and low accuracy in most non-iid contents (Li et al., 2020b; 2019).
53
+
54
+ # 4 FEDERATED AVERAGING WITH LOCAL BATCH NORMALIZATION
55
+
56
+ # 4.1 PROPOSED METHOD - FEDBN
57
+
58
+ We propose an efficient and effective learning strategy denoted FedBN. Similar to FedAvg, FedBN performs local updates and averages local models. However, FedBN assumes local models have BN layers and excludes their parameters from the averaging step. We present the full algorithm in Appendix C. This simple modification results in significant empirical improvements in non-iid settings. We provide an explanation for these improvements in a simplified scenario, in which we show that FedBN improves the convergence rate under feature shift.
59
+
60
+ # 4.2 PROBLEM SETUP
61
+
62
+ We assume $N \in \mathbb { N }$ clients to jointly train for $T \in \mathbb { N }$ epochs and to communicate after $E \in \mathbb { N }$ local iterations. Thus, the system has $T / _ { E }$ communication rounds over the $T$ epochs. For simplicity, we assume all clients to have $M \in \mathbb { N }$ training examples (a difference in training examples can be account for by weighted averaging (McMahan et al., 2017)) for a regression task, i.e., each client $i \in [ N ] \left( [ N ] \right) = \{ 1 , \cdot \cdot . . , N \} )$ has training examples $\{ ( \mathbf { x } _ { j } ^ { i } , \boldsymbol { y } _ { j } ^ { i } ) \in \mathbb { R } ^ { d } { \times } \mathbb { R } : j \in [ M ] \}$ . Furthermore, we assume a two-layer neural network with ReLU activations trained by gradient descent. Let $\mathbf { v } _ { k } \in \mathbb { R } ^ { d }$ denote the parameters of the first layer, where $k \in [ m ]$ and $m$ is the width of the hidden layer. Let $\| \mathbf { v } \| \mathbf { s } \triangleq \sqrt { \mathbf { v } ^ { \top } \mathbf { S } \mathbf { v } }$ denote the induced vector norm for a positive definite matrix S.
63
+
64
+ We consider a non-iid setting in FL where local feature distributions differ—not label distribution, as considered, e.g., in McMahan et al. (2017); Li et al. (2019). To be more precise, we make the following assumption.
65
+
66
+ Assumption 4.1 (Data Distribution). For each client $i \in [ N ]$ the inputs $\mathbf { x } _ { j } ^ { i }$ are centered $\left( \mathbb { E } \mathbf { x } ^ { i } = \mathbf { 0 } \right)$ ) with covariance matrix $\mathbf { S } _ { i } = \mathbb { E } \mathbf { x } ^ { i } \mathbf { x } ^ { i \top }$ , where $\mathbf { S } _ { i }$ is independent from the label y and may differ for each $i \in [ N ]$ e.g., $\mathbf { S } _ { i }$ are not all identity matrices, and for each index pair $p \neq q$ , $\mathbf { x } _ { p } \neq \boldsymbol { \kappa } \cdot \mathbf { x } _ { q }$ for all $\kappa \in \mathbb { R } \backslash \{ 0 \}$ .
67
+
68
+ With Assumption 4.1, the normalization of the first layer for client $i$ is $\frac { \mathbf { v } _ { k } ^ { \top } \mathbf { x } ^ { i } } { \| \mathbf { v } _ { k } \| _ { \mathbf { s } _ { i } } }$ . FedBN with clientspecified BN parameters trains a model $f ^ { * } : \mathbb { R } ^ { d } \mathbb { R }$ parameterized by $\mathbf { \bar { \Phi } } ( \mathbf { V } , \gamma , \mathbf { c } ) \ \in \ \mathbb { R } ^ { m \times d } \ \times$ $\mathbf { \varmathbb { R } } ^ { m \times N } \times \mathbf { \varmathbb { R } } ^ { m }$ , i.e.,
69
+
70
+ $$
71
+ f ^ { * } ( { \bf x } ; { \bf V } , \gamma , { \bf c } ) = \frac { 1 } { \sqrt { m } } \sum _ { k = 1 } ^ { m } c _ { k } \sum _ { i = 1 } ^ { N } \sigma \left( \gamma _ { k , i } \cdot \frac { { \bf v } _ { k } ^ { \top } { \bf x } } { \| { \bf v } _ { k } \| _ { { \bf s } _ { i } } } \right) \cdot \mathbb { 1 } \left\{ { \bf x } \in \mathrm { c l i e n t ~ } i \right\} ~ ,
72
+ $$
73
+
74
+ where $\gamma$ is the scaling parameter of BN and $\sigma ( s ) = \operatorname* { m a x } \{ s , 0 \}$ is the ReLU activation function, $\mathbf { c }$ is the top layer parameters of the network. Here, we omit learning the shift parameter of $\mathbf { B N } ^ { 1 }$ . FedAvg instead trains a function $f : { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ which is a special case of Eq. 1 with $\gamma _ { k , i } = \gamma _ { k }$ for $\forall i \in [ N ]$ . We take a random initialization of the parameters (Salimans $\&$ Kingma, 2016) in our analysis:
75
+
76
+ $$
77
+ \begin{array} { r } { \mathbf { v } _ { k } ( 0 ) \sim N \left( 0 , \alpha ^ { 2 } \mathbf { I } \right) , \quad c _ { k } \sim U \{ - 1 , 1 \} , \quad \mathrm { a n d } \quad \gamma _ { k } = \gamma _ { k , i } = \| \mathbf { v } _ { k } ( 0 ) \| _ { 2 } / \alpha , } \end{array}
78
+ $$
79
+
80
+ where $\alpha ^ { 2 }$ controls the magnitude of $\mathbf { v } _ { k }$ at initialization. The initialization of the BN parameters $\gamma _ { k }$ and $\gamma _ { k , i }$ are independent of $\alpha$ . The parameters of the network $f ^ { * } ( \mathbf { x } ; \mathbf { V } , \gamma , \mathbf { c } )$ are obtained by minimizing the empirical risk with respect to the squared loss using gradient descent :
81
+
82
+ $$
83
+ L ( f ^ { * } ) = \frac { 1 } { N M } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { M } \left( f ^ { * } ( \mathbf { x } _ { j } ^ { i } ) - y _ { j } ^ { i } \right) ^ { 2 } .
84
+ $$
85
+
86
+ # 4.3 CONVERGENCE ANALYSIS
87
+
88
+ Here we study the trajectory of networks FedAvg $( f )$ and FedBN $( f ^ { * } )$ ’s prediction through the neural tangent kernel (NTK) introduced by Jacot et al. (2018). Recent machine learning theory
89
+
90
+ studies (Arora et al., 2019; Du et al., 2018; Allen-Zhu et al., 2019; van den Brand et al., 2020; Dukler et al., 2020) have shown that for finite-width over-parameterized networks, the convergence rate is controlled by the least eigenvalue of the induced kernel in the training evolution.
91
+
92
+ To simplify tracing the optimization dynamics, we consider the case that the number of local updates $E$ is 1. We can decompose the NTK into a magnitude component $\mathbf G ( t )$ and direction component $\mathbf { V } ( t ) / \alpha ^ { 2 }$ following Dukler et al. (2020):
93
+
94
+ $$
95
+ { \frac { d \mathbf { f } } { d t } } = - \mathbf { \nabla } \mathbf { A } ( t ) ( \mathbf { f } ( t ) - \mathbf { y } ) , \quad { \mathrm { w h e r e } } \quad \mathbf { \nabla } \mathbf { \mathbf { A } } ( t ) : = { \frac { \mathbf { V } ( t ) } { \alpha ^ { 2 } } } + \mathbf { G } ( t ) .
96
+ $$
97
+
98
+ The specific forms of $\mathbf { V } ( t )$ and $\mathbf G ( t )$ are given in Appendix B.1. Let $\lambda _ { m i n } ( A )$ denote the minimal eigenvalue of matrix $A$ . The matrices $\mathbf { V } ( t )$ and $\mathbf G ( t )$ are positive semi-definite, since they can be viewed as covariance matrices. This gives $\lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { \Lambda } } ( t ) ) \ge \operatorname* { m a x } \left\{ \lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { V } } ( t ) ) / \alpha ^ { 2 } , \lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { G } } ( t ) ) \right\}$ . According to NTK, the convergence rate is controlled by $\lambda _ { m i n } ( \pmb { \Lambda } ( t ) \ )$ . Then, for $\alpha > 1$ , convergence is dominated by $\mathbf G ( t )$ . Let $\mathbf { \boldsymbol { \Lambda } } ( t )$ and $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ denote the evolution dynamics of FedAvg and FedBN and let $\mathbf G ( t )$ and $\mathbf { G } ^ { * } ( t )$ denote the magnitude component in the evolution dynamics of FedAvg and FedBN. For the convergence analysis, we use the auxiliary version of the Gram matrices, which is defined as follows.
99
+
100
+ Definition 4.2. Given sample points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ , we define the auxiliary Gram matrices ${ \bf G } ^ { \infty } \in$ $\mathbb { R } ^ { N M \times N M }$ and $\mathbf { G } ^ { \ast \infty } \in \mathbb { R } ^ { N M \times N M }$ as
101
+
102
+ $$
103
+ \begin{array} { r l } & { \mathbf { G } _ { p q } ^ { \infty } : = \mathbb { E } _ { \mathbf { v } \sim N ( 0 , \alpha ^ { 2 } \mathbf { I } ) } \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { q } \right) , ~ ( F e d A \nu g ) } \\ & { \mathbf { G } _ { p q } ^ { * \infty } : = \mathbb { E } _ { \mathbf { v } \sim N ( 0 , \alpha ^ { 2 } \mathbf { I } ) } \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { q } \right) \mathbb { 1 } \{ i _ { p } = i _ { q } \} , ~ ( F e d B N ) . } \end{array}
104
+ $$
105
+
106
+ Given Assumption 4.1, we use the key results in Dukler et al. (2020) to show that $\mathbf { G } ^ { \infty }$ is positive definite. Further, we show that $\mathbf { G } ^ { * \infty }$ is positive definite. We use the fact that the distance between $\mathbf G ( t )$ and its auxiliary version is small in over-parameterized neural network, such that $\mathbf G ( t )$ remains positive definite.
107
+
108
+ Lemma 4.3. Fix points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ satisfying Assumption 4.1. Then Gram matrices $\mathbf { G } ^ { \infty }$ and $\mathbf { G } ^ { * \infty }$ defined as in (4) and (5) are strictly positive definite. Let the least eigenvalues be $\lambda _ { \operatorname* { m i n } } ( \mathbf G ^ { \infty } ) = : \mu _ { 0 }$ and $\lambda _ { \operatorname* { m i n } } ( \mathbf G ^ { * \infty } ) = : \mu _ { 0 } ^ { * }$ , where $\mu _ { 0 } , \mu _ { 0 } ^ { * } > 0$ .
109
+
110
+ Proof sketch The main idea follows Du et al. (2018); Dukler et al. (2020), that given points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ , the matrices . More details $\mathbf { G } ^ { \infty }$ and e pr $\mathbf { G } ^ { * \infty }$ can be shown as covariance matrix of linearly independente given in the Appendix B.2.
111
+
112
+ Based on our formulation, the convergence rate of FedAvg (Theorem 4.4) can be derived from Dukler et al. (2020) by considering non-identical covariance matrices. We derive the convergence rate of FedBN in Corollary 4.5. Our key result of comparing the convergence rates between FedAvg and FedBN is culminated in Corollary 4.6.
113
+
114
+ Theorem 4.4 (G-dominated convergence for FedAvg Dukler et al. (2020)). Suppose network (4) is initialized as in (2) with $\alpha > 1$ , trained using gradient descent and Assumptions 4.1 holds. Given the loss function of training the neural network is the square loss with targets y satisfying $\| \mathbf { y } \| _ { \infty } = O ( 1 )$ . If $m = \Omega$ ma $\mathrm { x } \left\{ \tilde { N ^ { 4 } } M ^ { 4 } \log ( N M / \delta ) / \alpha ^ { 4 } \mu _ { 0 } ^ { 4 } , \hat { N ^ { 2 } } M ^ { 2 } \log ( N M / \delta ) \tilde { / } \mu _ { 0 } ^ { 2 } \right\} \nonumber$ , then with probability $1 - \delta$ ,
115
+
116
+ 1. For iterations $t = 0 , 1 , \cdots$ , the evolution matrix $\Lambda ( t )$ satisfies $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { A } ( t ) ) \geq \frac { \mu _ { 0 } } { 2 } } \end{array}$
117
+
118
+ 2. Training with gradient descent of step-size $\begin{array} { r } { \eta = O \left( \frac { 1 } { \left. \mathbf { A } \left( t \right) \right. } \right) } \end{array}$ converges linearly as
119
+
120
+ $$
121
+ \| \mathbf { f } ( t ) - \mathbf { y } \| _ { 2 } ^ { 2 } \leq \Big ( 1 - \frac { \eta \mu _ { 0 } } { 2 } \Big ) ^ { t } \| \mathbf { f } ( 0 ) - \mathbf { y } \| _ { 2 } ^ { 2 } .
122
+ $$
123
+
124
+ Following the key ideas in Dukler et al. (2020), here we further characterize the convergence for FedBN.
125
+
126
+ Corollary 4.5 ( $\mathbf { G }$ -dominated convergence for FedBN). Suppose network (5) and all other conditions in Theorem 4.4. With probability $1 - \delta$ , for iterations $t = 0 , 1 , \cdots$ , the evolution matrix $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ satisfies $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { A } ^ { * } ( t ) ) \geq \frac { \mu _ { 0 } ^ { * } } { 2 } } \end{array}$ and training with gradient descent of step-size $\begin{array} { r } { \eta = O \left( \frac { 1 } { \left. \mathbf { 1 } ^ { * } \left( t \right) \right. } \right) } \end{array}$ converges linearly as $\begin{array} { r } { \| \mathbf { f } ^ { * } ( t ) - \mathbf { y } \| _ { 2 } ^ { 2 } \leq \left( 1 - \frac { \eta \mu _ { 0 } ^ { * } } { 2 } \right) ^ { t } \| \mathbf { f } ^ { * } ( 0 ) - \mathbf { y } \| _ { 2 } ^ { 2 } . } \end{array}$
127
+
128
+ ![](images/ffd4143cbe6a7365db699025cb628091fc8f1aeac7067fd59311043d243b4bcc.jpg)
129
+ Figure 3: Convergence of the training loss of FedBN and FedAvg on the digits classification datasets. FedBN exhibits faster and more robust convergence.
130
+
131
+ The exponential factor of convergence for FedAvg $( 1 - \eta \mu _ { 0 } / 2 )$ and FedBN $( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ are controlled by the smallest eigenvalue of $\mathbf G ( t )$ , respectively $\mathbf { G } ^ { * } ( t )$ . Then we can analyze the convergence performance of FedAvg and FedBN by comparing $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ and $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ .
132
+
133
+ Corollary 4.6 (Convergence rate comparison between FedAvg and FedBN). For the G-dominated convergence, the convergence rate of FedBN is faster than that of FedAvg.
134
+
135
+ Proof sketch The key is to show $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } ) \leq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ . Comparing equation (4) and (5), $\mathbf { G } ^ { * \infty }$ takes the $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . Let $\mathbf { G } _ { i } ^ { \infty }$ be the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . By linear algebra, $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ for $i \in [ N ]$ . Since $\mathbf { G } ^ { * \infty } = d i a g ( \mathbf { G } _ { 1 } ^ { \infty } , \cdot \cdot \cdot , \mathbf { G } _ { N } ^ { \infty } )$ , we have $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } ) = \operatorname* { m i n } _ { i \in [ N ] } \left\{ \lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \right\} } \end{array}$ . Therefore, we have the result $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ .
136
+
137
+ # 5 EXPERIMENTS
138
+
139
+ In this section, we demonstrate that using local BN parameters is beneficial in the presence of feature shift across clients with heterogeneity data. Our novel local parameter sharing strategy, FedBN, achieves more robust and faster convergence for feature shift non-iid datasets and obtains better model performance compared to alternative methods. This is shown on both benchmark and large real-world datasets.
140
+
141
+ # 5.1 BENCHMARK EXPERIMENTS
142
+
143
+ Settings: We perform an extensive empirical analysis using a benchmark digits classification task containing different data sources with feature shift where each dataset is from a different domain. Data of different domains have heterogeneous appearance but share the same labels and label distribution. Specifically, we use the following five datasets: SVHN Netzer et al. (2011), USPS Hull (1994), SynthDigits Ganin & Lempitsky (2015), MNIST-M Ganin & Lempitsky (2015) and MNIST LeCun et al. (1998). To match the setup in Section 4, we truncate the sample size of the five datasets to their smallest number with random sampling, resulting in 7438 training samples in each dataset 2. Testing samples are held out and kept the same for all the experiments on this benchmark dataset. Our classification model is a convolutional neural network where BN layers are added following each feature extraction layer (i.e., both convolutional and fully-connected). The architecture is detailed in Appendix D.2. For model training, we use the cross-entropy loss and SGD optimizer with a learning rate of $1 0 ^ { - 2 }$ . If not specified, our default setting for local update epochs is $E = 1$ , and the default setting for the amount of data at each client is $1 0 \%$ 3 of the dataset original size. For the default non-iid setting, the FL system contains five clients. Each client exclusively owns data sampled from one of the five datasets. More details are listed in Appendix D.2.
144
+
145
+ ![](images/ae95917e3702dcabb53411a932cba7f69f42d75dd387a3f6048fe8c6a1cd2b57.jpg)
146
+ Figure 4: Analytical experimental results on: (a) Analysis on different local updating epochs. FedBN consistently outperforms FedAvg in testing accuracy. (b) Model performance over varying dataset size on local clients. (c) Testing accuracy on different levels of heterogeneity.
147
+
148
+ Overviews: In the following paragraphs, we present a comprehensive investigation on the properties of the proposed FedBN approach, including: (1) convergence rate; (2) behavior with respect to the choices of local update epochs; (3) performance on various amounts of data at each client; (4) effects at different level of heterogeneity; (5) comparison to state of the art (FedProx (Li et al., 2020b)), and two baselines (FedAvg and SingleSet, i.e., training an individual model within each client). In Appendix G, we also provide empirical results for including a new client with data from an unknown domain into the learning system.
149
+
150
+ Convergence Rate: We analyze the training loss curve of FedBN in comparison with FedAvg, as shown in Fig. 3. The loss of FedBN goes down faster and smoother than FedAvg, indicating that FedBN has a larger convergence rate. Moreover, compared to FedAvg, FedBN presents smoother and more stable loss curves during learning. These experimental observations show consensus with what given by Corollary 4.6. In addition, we present a more comprehensive comparison with different local update epochs $E$ on convergence rate of FedBN and FedAvg (see Appendix E.1). The results show similar patterns as in Fig 3.
151
+
152
+ Analysis of Local Updating Epochs: Aggregating at different frequencies may affect the learning behaviour. Although our theory and the default setting for the other experiment takes $E = 1$ , we demonstrate FedBN is effective for cases when $E > 1$ . In Fig.4 (a), we explore $E = 1 , 4 , 8 , 1 6$ and compare FedBN to baseline FedAvg. As expected, an inverse relationship between the local updating epochs $E$ and testing accuracy implied for both FedBN and FedAvg shown in Fig.4 (a). Zooming into the final testing accuracy, FedBN’s accuracy stably exceeds the accuracy of FedAvg on various $E$ .
153
+
154
+ Analysis of Local Dataset Size: We vary the data amount for each client from $1 0 0 \%$ to $1 \%$ of its original dataset size, in order to observe FedBN behaviour over different data capacities at each client. The results in Fig.4 (b) present the accuracy of FedBN and SingleSet 4. Testing accuracy starts to significantly drop when each of the local client is only attributed $20 \%$ percentage of data from its original data amount. The improvement margin gained from FedBN increases as local dataset sizes decrease. The results indicate that FedBN can effectively benefit from collaborative training on distributed data, especially when each client only holds a small amount of data which are non-iid.
155
+
156
+ Effects of Statistical Heterogeneity: A salient question that arises is: to what degree of heterogeneity on feature shift FedBN is superior to FedAvg. To answer the question, we simulate a federated settings with varying heterogeneity as described below. We parcel each dataset into 10 subsets, one for each clients, with equal number of data samples and the same label distribution. We treat the clients generated from the same dataset as iid clients, while the clients generated from different datasets as non-iid clients.
157
+
158
+ <table><tr><td rowspan="2">Method</td><td colspan="4">Caltech-10</td><td colspan="6">DomainNet</td><td colspan="4">ABIDE (medical)</td></tr><tr><td>A</td><td>C</td><td>D</td><td>W</td><td>C</td><td>I</td><td>P</td><td>Q</td><td>R</td><td>S</td><td>NYU</td><td>USM</td><td>UM</td><td>UCLA</td></tr><tr><td>SingleSet</td><td>54.9 (1.5)</td><td>40.2 (1.6)</td><td>78.7 (1.3)</td><td>86.4 (2.4)</td><td>41.0 (0.9)</td><td>23.8 (1.2)</td><td>36.2 (2.7)</td><td>73.1 (0.9)</td><td>48.5 (1.9)</td><td>34.0 (1.1)</td><td>58.0 (3.3)</td><td>73.4 (2.2)</td><td>64.3 (1.4)</td><td>57.3 (2.4)</td></tr><tr><td>FedAvg</td><td>54.1 (1.1)</td><td>44.8 (1.0)</td><td>66.9 (1.5)</td><td>85.1 (2.9)</td><td>48.8 (1.9)</td><td>24.9 (0.7)</td><td>36.5 (1.1)</td><td>56.1 (1.6)</td><td>46.3 (1.4)</td><td>36.6 (2.5)</td><td>62.7 (1.7)</td><td>73.1 (2.4)</td><td>70.7 (0.5)</td><td>64.7 (0.7)</td></tr><tr><td>FedProx</td><td>54.2 (2.5)</td><td>44.5 (0.5)</td><td>65.0 (3.6)</td><td>84.4 (1.7)</td><td>48.9 (0.8)</td><td>24.9 (1.0)</td><td>36.6 (1.8)</td><td>54.4 (3.1)</td><td>47.8 (0.8)</td><td>36.9 (2.1)</td><td>63.3 (1.0)</td><td>73.0 (1.8)</td><td>70.5 (1.1)</td><td>64.5 (1.2)</td></tr><tr><td>FedBN</td><td>63.0 (1.6)</td><td>45.3 (1.5)</td><td>83.1 (2.5)</td><td>90.5 (2.3)</td><td>51.2 (1.4)</td><td>26.8 (0.5)</td><td>41.5 (1.4)</td><td>71.3 (0.7)</td><td>54.8 (0.8)</td><td>42.1 (1.3)</td><td>65.6 (1.1)</td><td>75.1 (1.4)</td><td>68.6 (2.9)</td><td>65.5 (1.0)</td></tr></table>
159
+
160
+ Table 1: We report results on three different real-world datasets with format mean(std) from 5-trial run. For Office-Caltech $1 0 , A , C , D , H$ are abbreviations for Amazon, Caltech, DSLR and WebCam, for DomainNet, $C , I , P , Q , R , i$ $s$ are abbreviations for Clipart, Infograph, Painting, Quickdraw, Real and Sketch. For ABIDE, we list the abbreviations for the clients (i.e., medical institutions).
161
+
162
+ We start with including one client from each dataset in FL system. Then, we simultaneously add one client from each datasets while keep the existing clients $n$ times, for $n \in \{ 1 , \ldots , 9 \} ^ { 5 }$ . For each setting, we train models from scratch. More clients correspond to less heterogenity. We show the testing accuracy under different level of heterogeneity in Fig. 4 (c) and include a comparison with FedAvg, which is designed for iid FL. Our FedBN achieves substantially higher testing accuracy than FedAvg over all levels of heterogeneity.
163
+
164
+ Comparison with State-of-theart: To further validate our method, we compare FedBN with one of the current state-of-the-art methods for non-iid FL, FedProx Li et al. (2020b), which also shares the benefit of easy adaptation to current FL frameworks in practice. We also include training on SingleSet and FedAvg as baselines. For each strategy, we split an independent testing datasets on clients and report the accuracy on the testing datasets. We perform 5-trial repeating experiment with different random seeds. The mean and standard deviation of the
165
+
166
+ ![](images/97eac8b4d8f28d29fdd8a00e11e739dc403181d1e75c030f77cd8de50fbeec3c.jpg)
167
+ Figure 5: Performance on benchmark experiments
168
+
169
+ accuracy on each dataset over trials are shown in Fig. $5 ^ { 6 }$ . From the results, we can make the following observation: (1) FedBN achieves the highest accuracy, consistently outperforming the state-of-the-art and baseline methods; (2) FedBN achieves the most significant improvements on SVHN whose image appearance is very different from others (i.e., presenting more obvious feature shift); (3) FedBN shows a smaller variance in error over multiple runs, indicating its stability.
170
+
171
+ # 5.2 EXPERIMENTS ON REAL-WORLD DATASETS
172
+
173
+ To better understand how our proposed algorithm can be beneficial in real-word feature-shift noniid, we have extensively validated the effectiveness of FedBN in comparison with other methods on three real-world datasets: image classification on Office-Caltech10 (Gong et al., 2012) with images acquired in different cameras or environments; image classification on DomainNet (Peng et al., 2019) with different image styles; and a neurodisorder diagnosis task on ABIDE I (Di Martino et al., 2014) with patients from different medical institutions7.
174
+
175
+ Datasets and Setup: (1) We conduct the classification task on natural images from OfficeCaltech10, which has four data sources composing Office-31 Saenko et al. (2010) (three data sources) and Caltech-256 datasets (one data source) Griffin et al. (2007), which are acquired using different camera devices or in different real environment with various background. Each client joining the FL system is assigned data from one of the four data sources. Thus data is non-iid across the clients. (2) Our second dataset is DomainNet, which contains natural images coming from six different data sources: Clipart, Infograph, Painting, Quickdraw, Real, and Sketch. Similar to (1), each client contains iid data from one of the data sources, but clients with different data sources have different feature distributions. (3) We include four medical institutions (NYU, USM, UM, UCLA; each is viewed as a client) from ABIDE I that collects functional brain images using different imaging equipment and protocols. We validate on a medical application for binary classification between autism spectrum disorders patients and healthy control subjects.
176
+
177
+ The Office-Caltech10 contains ten categories of objects. The DomainNet extensively contains 345 object categories and we use the top ten most common classes to form a sub-dataset for our experiments. Our classification models adopt AlexNet (Krizhevsky et al., 2012) architecture with BN added after each convolution and fully-connected layer. Before feeding into the network, all images are resized to $2 5 6 \times 2 5 6 \times 3$ . For ABIDE I, each instance is represented as a 5995-dimensional vector through brain connectome computation. We use a three-layer fully connected neural network as the classifier with the hidden layers of 16 with two BN layers after the first two fully connected layers. Same as the above benchmark, we perform 5 repeated runs for each experiment.
178
+
179
+ Results and Analysis: The experimental results are shown in Table 1 in the form of mean (std). On Office-Caltech10, FedBN significantly outperforms the state-of-the-art method of FedProx, and improves at least $6 \%$ on mean accuracy compared with all the alternative methods. On DomainNet, FedBN achieved supreme accuracy over most of the datasets. Interestingly, we find the alternative FL methods achieves comparable results with SingleSet except Quickdraw, and FedBN outperforms them over $1 0 \%$ . Surprisingly, for the above two tasks, the alternative FL strategies are ineffective in the feature shift non-iid datasets, even worse than using single client data for training for most of the clients. In ABIDE I, FedBN excell by a non-negligible margin on three clients regarding the mean testing accuracy. The results are inspiring and bring the hope of deploying FedBN to healthcare field, where data are often limited, isolated and heterogeneous on features.
180
+
181
+ # 6 CONCLUSION AND DISCUSSION
182
+
183
+ This work proposes a novel federated learning aggregation method called FedBN that keeps the local Batch Normalization parameters not synchronized with the global model, such that it mitigates feature shifts in non-IID data. We provide convergence guarantees for FedBN in realistic federated settings under the overparameterized neural networks regime, while also accounting for practical issues. In our experiments, our evaluation across a suite of federated datasets has demonstrated that FedBN can significantly improve the convergence behavior and model performance of non-IID datasets. We also demonstrate the effectiveness of FedBN in scenarios that where a new client with an unknown domain joins the FL system (see Appendix G).
184
+
185
+ FedBN is independent of the communication and aggregation strategy and thus can in practice be readily combined with different optimization algorithms, communication schemes, and aggregation techniques. The theoretical analysis of such combinations is an interesting direction for future work. We also note that since FedBN makes only lightweight modifications to FedAvg and has much flexibility to be combined with other strategies, these merits allow us to easily integrate FedBN into existing tool-kits/systems, such as Pysyft (Ryffel et al., 2018), Google TFF (Google, 2020), Flower (Beutel et al., 2020), dlplatform (Kamp & Adilova, 2020) and FedML (He et al., 2020)8.
186
+
187
+ We believe that FedBN can improve a wide range of applications such as healthcare (Rieke et al., 2020) and autonomous driving (Kamp et al., 2018). A few interesting directions for future work include analyzing what types of differences in local data can benefit from FedBN and explore the limits of FedBN. Moreover, privacy is an essential concern in FL. Invisible BN parameters in FedBN should make attacks on local data more challenging. It would be interesting to quantify the privacypreservation improvement in FedBN.
188
+
189
+ # REFERENCES
190
+
191
+ Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via overparameterization. In International Conference on Machine Learning, pp. 242–252. PMLR, 2019.
192
+
193
+ Mathieu Andreux, Jean Ogier du Terrail, Constance Beguier, and Eric W Tramel. Siloed federated learning for multi-centric histopathology datasets. In Domain Adaptation and Representation Transfer, and Distributed and Collaborative Learning, pp. 129–139. Springer, 2020.
194
+
195
+ Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. arXiv preprint arXiv:1901.08584, 2019.
196
+
197
+ Daniel J Beutel, Taner Topal, Akhil Mathur, Xinchi Qiu, Titouan Parcollet, and Nicholas D Lane. Flower: A friendly federated learning research framework. arXiv preprint arXiv:2007.14390, 2020.
198
+
199
+ Daniel C Castro, Jeremy Tan, Bernhard Kainz, Ender Konukoglu, and Ben Glocker. Morpho-mnist: Quantitative assessment and diagnostics for representation learning. Journal of Machine Learning Research, 20(178):1–29, 2019.
200
+
201
+ Woong-Gi Chang, Tackgeun You, Seonguk Seo, Suha Kwak, and Bohyung Han. Domain-specific batch normalization for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7354–7362, 2019.
202
+
203
+ Adriana Di Martino, Chao-Gan Yan, Qingyang Li, Erin Denio, Francisco X Castellanos, Kaat Alaerts, Jeffrey S Anderson, Michal Assaf, Susan Y Bookheimer, Mirella Dapretto, et al. The autism brain imaging data exchange: towards a large-scale evaluation of the intrinsic brain architecture in autism. Molecular psychiatry, 19(6):659, 2014.
204
+
205
+ Simon S Du, Xiyu Zhai, Barnabas Poczos, and Aarti Singh. Gradient descent provably optimizes over-parameterized neural networks. arXiv preprint arXiv:1810.02054, 2018.
206
+
207
+ Yonatan Dukler, Quanquan Gu, and Guido Montufar. Optimization theory for relu neural networks´ trained with normalization layers, 2020.
208
+
209
+ Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pp. 1180–1189. PMLR, 2015.
210
+
211
+ Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 2066–2073. IEEE, 2012.
212
+
213
+ Google. TensorFlow Federated: Machine Learning on Decentralized Data, 2020. https://www. tensorflow.org/federated.
214
+
215
+ Gregory Griffin, Alex Holub, and Pietro Perona. Caltech-256 object category dataset, 2007.
216
+
217
+ Chaoyang He, Songze Li, Jinhyun So, Mi Zhang, Hongyi Wang, Xiaoyang Wang, Praneeth Vepakomma, Abhishek Singh, Hang Qiu, Li Shen, et al. Fedml: A research library and benchmark for federated machine learning. arXiv preprint arXiv:2007.13518, 2020.
218
+
219
+ Kevin Hsieh, Amar Phanishayee, Onur Mutlu, and Phillip B Gibbons. The non-iid data quagmire of decentralized machine learning. arXiv preprint arXiv:1910.00189, 2019.
220
+
221
+ Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019.
222
+
223
+ Jonathan J. Hull. A database for handwritten text recognition research. IEEE Transactions on pattern analysis and machine intelligence, 16(5):550–554, 1994.
224
+
225
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
226
+
227
+ Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and gen- ´ eralization in neural networks. In Advances in neural information processing systems, pp. 8571– 8580, 2018.
228
+
229
+ Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurelien Bellet, Mehdi Bennis, Arjun Nitin ´ Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019.
230
+
231
+ Michael Kamp and Linara Adilova. Distributed Learning Platform, 2020. https://github. com/fraunhofer-iais/dlplatform.
232
+
233
+ Michael Kamp, Linara Adilova, Joachim Sicking, Fabian Huger, Peter Schlicht, Tim Wirtz, and ¨ Stefan Wrobel. Efficient decentralized deep learning by dynamic model averaging. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 393– 409. Springer, 2018.
234
+
235
+ Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J Reddi, Sebastian U Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for on-device federated learning. arXiv preprint arXiv:1910.06378, 2019.
236
+
237
+ Jonas Kohler, Hadi Daneshmand, Aurelien Lucchi, Thomas Hofmann, Ming Zhou, and Klaus Neymeyr. Exponential convergence rates for batch normalization: The power of length-direction decoupling in non-convex optimization. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 806–815. PMLR, 2019.
238
+
239
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
240
+
241
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
242
+
243
+ Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine, 37(3):50–60, 2020a.
244
+
245
+ Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. In Conference on Machine Learning and Systems, 2020a, 2020b.
246
+
247
+ Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. arXiv preprint arXiv:1907.02189, 2019.
248
+
249
+ Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016.
250
+
251
+ Yanghao Li, Naiyan Wang, Jianping Shi, Xiaodi Hou, and Jiaying Liu. Adaptive batch normalization for practical domain adaptation. Pattern Recognition, 80:109–117, 2018.
252
+
253
+ Quande Liu, Qi Dou, Lequan Yu, and Pheng Ann Heng. Ms-net: Multi-site network for improving prostate segmentation with heterogeneous mri data. IEEE Transactions on Medical Imaging, 2020.
254
+
255
+ Ping Luo, Xinjiang Wang, Wenqi Shao, and Zhanglin Peng. Towards understanding regularization in batch normalization. arXiv preprint arXiv:1809.00846, 2018.
256
+
257
+ Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pp. 1273–1282, 2017.
258
+
259
+ Ari S Morcos, David GT Barrett, Neil C Rabinowitz, and Matthew Botvinick. On the importance of single directions for generalization. arXiv preprint arXiv:1803.06959, 2018.
260
+
261
+ Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning, 2011.
262
+
263
+ Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1406–1415, 2019.
264
+
265
+ Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\` Sanjiv Kumar, and H Brendan McMahan. Adaptive federated optimization. arXiv preprint arXiv:2003.00295, 2020.
266
+
267
+ Amirhossein Reisizadeh, Farzan Farnia, Ramtin Pedarsani, and Ali Jadbabaie. Robust federated learning: The case of affine distribution shifts. arXiv preprint arXiv:2006.08907, 2020.
268
+
269
+ Nicola Rieke, Jonny Hancox, Wenqi Li, Fausto Milletari, Holger R Roth, Shadi Albarqouni, Spyridon Bakas, Mathieu N Galtier, Bennett A Landman, Klaus Maier-Hein, et al. The future of digital health with federated learning. NPJ digital medicine, 3(1):1–7, 2020.
270
+
271
+ Theo Ryffel, Andrew Trask, Morten Dahl, Bobby Wagner, Jason Mancuso, Daniel Rueckert, and Jonathan Passerat-Palmbach. A generic framework for privacy preserving deep learning. arXiv preprint arXiv:1811.04017, 2018.
272
+
273
+ Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European conference on computer vision, pp. 213–226. Springer, 2010.
274
+
275
+ Tim Salimans and Durk P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in neural information processing systems, pp. 901– 909, 2016.
276
+
277
+ Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? In Advances in Neural Information Processing Systems, pp. 2483– 2493, 2018.
278
+
279
+ Jan van den Brand, Binghui Peng, Zhao Song, and Omri Weinstein. Training (overparametrized) neural networks in near-linear time. arXiv e-prints, pp. arXiv–2006, 2020.
280
+
281
+ Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. arXiv preprint arXiv:2002.06440, 2020.
282
+
283
+ Xinwei Zhang, Mingyi Hong, Sairaj Dhople, Wotao Yin, and Yang Liu. Fedpd: A federated learning framework with optimal rates and adaptivity to non-iid data. arXiv preprint arXiv:2005.11418, 2020.
284
+
285
+ Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra. Federated learning with non-iid data. arXiv preprint arXiv:1806.00582, 2018.
286
+
287
+ # APPENDIX
288
+
289
+ Roadmap of Appendix The Appendix is organized as follows. We list the notations table in Section A. We provide theoretical proof of convergence in Section B. The algorithm of FedBN is described in Section C. The details of experimental setting are in Section D and additional results on benchmark datasets are in Section E. We show experiment on synthetic data in Section F. We demonstrate the ability of generalizing FedBN to test on a new client in Section G.
290
+
291
+ # A NOTATION TABLE
292
+
293
+ Table 2: Notations occurred in the paper.
294
+
295
+ <table><tr><td>Notations Description</td><td></td></tr><tr><td>X</td><td>features, x ∈ Rd</td></tr><tr><td>d</td><td>dimension of x</td></tr><tr><td>y</td><td></td></tr><tr><td>P()</td><td>labels,y ∈ R</td></tr><tr><td>N</td><td>probability distribution</td></tr><tr><td>T</td><td>total number of clients</td></tr><tr><td>E</td><td>total number of epochs in training</td></tr><tr><td>M</td><td>number of local iteration in FL</td></tr><tr><td>[N]</td><td>number of training samples in each client</td></tr><tr><td>i</td><td>set of numbers,[N] = {1,:..,N}</td></tr><tr><td>j</td><td>indicator for client, i ∈ [N] indicator for sample in each client, j ∈ [M]</td></tr><tr><td>(x,y)</td><td>the j-th training sample in client i</td></tr><tr><td>m</td><td></td></tr><tr><td>k</td><td>number of neurons in the first layer</td></tr><tr><td>Vk</td><td>indicator for neuron, k ∈ [m] parameters for the k-th neuron in the first layer</td></tr><tr><td>=ν |s</td><td>vector norm, Il v lls= √vT Sv, given a matrix S</td></tr><tr><td>Si</td><td>covariance matrix for features in client i, Si = ExixiT</td></tr><tr><td>p,q</td><td>indicator for sample,p,q ∈ [NM]</td></tr><tr><td>f</td><td>two layer ReLU neural network with BN</td></tr><tr><td>f*</td><td>two layer ReLU neural network with BN with client-specified BN parameters</td></tr><tr><td>V</td><td>parameters of the first phase neurons, V ∈ Rm ×d</td></tr><tr><td>Y</td><td></td></tr><tr><td>C</td><td>the scaling parameter of BN</td></tr><tr><td>9()</td><td> top layer parameters of the network</td></tr><tr><td>N(μ,Σ)</td><td>ReLU activation function,σ(·) = max{:, 0}</td></tr><tr><td>U[-1,1]</td><td>Gaussian with mean μ and covariance £</td></tr><tr><td>α</td><td>Rademacher distribution</td></tr><tr><td>L(f)</td><td>variance of Vk at initialization</td></tr><tr><td>A(t)</td><td>empirical risk with square loss for network f</td></tr><tr><td>V(t)</td><td>evolution dynamic for FedAvg at epoch t</td></tr><tr><td></td><td>evolution dynamic with respect to V for FedAvg at epoch t</td></tr><tr><td>G(t)</td><td>evolution dynamic with respect to y for FedAvg at epoch t</td></tr><tr><td>▲*(t)</td><td>evolution dynamic for FedBN at epoch t</td></tr><tr><td>V*(t)</td><td>evolution dynamic with respect to V for FedBN at epoch t</td></tr><tr><td>G*(t)</td><td>evolution dynamic with respect to γy for FedBN at epoch t</td></tr><tr><td>Amin(A)</td><td>the minimal eigenvalue of matrix A</td></tr><tr><td>G8</td><td>expectation of G(t)</td></tr><tr><td>G*80</td><td>expectation of G*(t)</td></tr></table>
296
+
297
+ # B CONVERGENCE PROOF
298
+
299
+ # B.1 EVOLUTION DYNAMICS
300
+
301
+ In this section, we calculate the evolution dynamics $\mathbf { \boldsymbol { \Lambda } } ( t )$ for training with function $f$ and $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ for training with $f ^ { * }$ . Since the parameters are updated using gradient descent, the optimization dynamics of parameters are
302
+
303
+ $$
304
+ { \frac { d \mathbf { v } _ { k } } { d t } } = - { \frac { \partial L } { \partial \mathbf { v } _ { k } } } , \quad { \frac { d { \boldsymbol { \gamma } } _ { k } } { d t } } = - { \frac { \partial L } { \partial { \boldsymbol { \gamma } } _ { k } } } .
305
+ $$
306
+
307
+ Let $f _ { p } = f ( \mathbf { x } _ { p } ^ { i _ { p } } )$ . Then, the dynamics of the prediction of the $p$ -th data point in site $i _ { p }$ is
308
+
309
+ $$
310
+ { \frac { \partial f _ { p } } { \partial t } } = \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } } { \frac { d \mathbf { v } _ { k } } { d t } } + { \frac { \partial f _ { p } } { \partial \gamma _ { k } } } { \frac { d { \boldsymbol { \gamma } } _ { k } } { d t } } = - \underbrace { \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } } { \frac { \partial L } { \partial \mathbf { v } _ { k } } } } _ { T _ { \mathrm { v } } ^ { p } } - \underbrace { \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \gamma _ { k } } } { \frac { \partial L } { \partial \gamma _ { k } } } } _ { T _ { \gamma } ^ { p } } .
311
+ $$
312
+
313
+ The gradients of $f _ { p }$ and $L$ with respect to $\mathbf { v } _ { k }$ and $\gamma _ { k }$ are computed as
314
+
315
+ $$
316
+ \begin{array} { r l } & { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \frac { c _ { k } \cdot \gamma _ { k } ( t ) } { \left. \mathbf { v } _ { k } \right. } _ { \mathbf { s } _ { p } } \cdot \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i , p } } ( t ) ^ { \perp } \mathbf { l } _ { p k } ( t ) , } \\ & { \frac { \partial L } { \partial \mathbf { v } _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \displaystyle \sum _ { q = 1 } ^ { N M } \left( f _ { q } ( t ) - y _ { q } \right) \frac { c _ { k } \cdot \gamma _ { k } ( t ) } { \left. \mathbf { v } _ { k } \right. } _ { \mathbf { l } _ { q } } \mathbf { x } _ { q } ^ { \mathbf { v } _ { k } ^ { i , q } } ( t ) ^ { \perp } \mathbf { l } _ { q k } ( t ) , } \\ & { \frac { \partial f _ { p } } { \partial \gamma _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \frac { c _ { k } } { \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { s } _ { p } } } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { p } \right) , } \\ & { \frac { \partial L } { \partial \gamma _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \displaystyle \sum _ { q = 1 } ^ { N M } \left( f _ { q } ( t ) - y _ { q } \right) \frac { c _ { k } } { \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { s } _ { q } } } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { q } \right) , } \end{array}
317
+ $$
318
+
319
+ where $\begin{array} { r } { f _ { p } = f ( \mathbf { x } _ { p } ^ { i _ { p } } ) , \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } \triangleq ( \mathbf { I } - \frac { \mathbf { S } _ { i _ { p } } \mathbf { u } \mathbf { u } ^ { \intercal } } { \| \mathbf { u } \| _ { \mathbf { S } _ { i _ { p } } } ^ { 2 } } ) \mathbf { x } } \end{array}$ )x, and 1pk(t) , 1{vk(t)>xp≥0}.
320
+
321
+ We define Gram matrix $\mathbf { V } ( t )$ and $\mathbf G ( t )$ as
322
+
323
+ $$
324
+ \begin{array} { l } { { \displaystyle { \bf V } _ { p q } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } \left( \alpha c _ { k } \cdot \gamma _ { k } ( t ) \right) ^ { 2 } \| { \bf v } _ { k } ( t ) \| _ { { \bf S } _ { i } _ { p } } ^ { - 1 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i } _ { q } } ^ { - 1 } \left. { \bf x } _ { p } ^ { { \bf v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } , { \bf x } _ { q } ^ { { \bf v } _ { k } ^ { i _ { q } } ( t ) \perp } \right. \mathbb { 1 } _ { p k } ( t ) \mathbb { 1 } _ { q k } ( t ) } , } \\ { { \displaystyle { \bf G } _ { p q } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } c _ { k } ^ { 2 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i p } } ^ { - 1 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i q } } ^ { - 1 } \sigma \left( { \bf v } _ { k } ( t ) ^ { \top } { \bf x } _ { p } \right) \sigma \left( { \bf v } _ { k } ( t ) ^ { \top } { \bf x } _ { q } \right) . } } \end{array}
325
+ $$
326
+
327
+ It follows that
328
+
329
+ $$
330
+ T _ { \mathbf { v } } ^ { p } ( t ) = \sum _ { q = 1 } ^ { N M } \frac { \mathbf { V } _ { p q } ( t ) } { \alpha ^ { 2 } } \left( f _ { q } ( t ) - y _ { q } \right) , \quad T _ { \gamma } ^ { p } ( t ) = \sum _ { q = 1 } ^ { N M } \mathbf { G } _ { p q } ( t ) \left( f _ { q } ( t ) - y _ { q } \right) .
331
+ $$
332
+
333
+ Let $\mathbf { f } = \left( f _ { 1 } , \ldots , f _ { n } \right) ^ { \intercal } = \left( f \left( \mathbf { x } _ { 1 } \right) , \ldots , f \left( \mathbf { x } _ { N M } \right) \right) ^ { \intercal }$ . The full evolution dynamic is given by
334
+
335
+ $$
336
+ { \frac { d \mathbf { f } } { d t } } = - \mathbf { A } ( t ) ( \mathbf { f } ( t ) - \mathbf { y } ) , \quad { \mathrm { w h e r e } } \quad \mathbf { A } ( t ) : = { \frac { \mathbf { V } ( t ) } { \alpha ^ { 2 } } } + \mathbf { G } ( t ) .
337
+ $$
338
+
339
+ Similarly, we compute Gram matrix $\mathbf { V } ^ { * } ( t )$ and $\mathbf { G } ^ { * } ( t )$ for FedBN with $f ^ { * }$ as
340
+
341
+ $$
342
+ V _ { p q } ^ { * } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } \left( \alpha c _ { k } \right) ^ { 2 } \gamma _ { k , i _ { p } } ( t ) \gamma _ { k , i _ { q } } ( t ) \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { p } } } ^ { - 1 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { q } } } ^ { - 1 } \left. \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } , \mathbf { x } _ { q } ^ { \mathbf { v } _ { k } ^ { i _ { q } } ( t ) ^ { \perp } } \right. \mathbb { 1 } _ { p k } ( t ) \mathbb { 1 } _ { q k } ( t ) ,
343
+ $$
344
+
345
+ $$
346
+ \mathbf { G } _ { p q } ^ { * } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } c _ { k } ^ { 2 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { p } } } ^ { - 1 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { q } } } ^ { - 1 } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { q } \right) \mathbb { 1 } \{ i _ { p } = i _ { q } \} .
347
+ $$
348
+
349
+ Thus, the full evolution dynamic of FedBN is
350
+
351
+ $$
352
+ \frac { d \mathbf { f } ^ { * } } { d t } = - \mathbf { \boldsymbol { \Lambda } } ^ { * } ( t ) ( \mathbf { f } ^ { * } ( t ) - \mathbf { \boldsymbol { y } } ) , \quad \mathrm { w h e r e } \quad \mathbf { \boldsymbol { \Lambda } } ^ { * } ( t ) : = \frac { \mathbf { \boldsymbol { V } } ^ { * } ( t ) } { \alpha ^ { 2 } } + \mathbf { \boldsymbol { G } } ^ { * } ( t ) .
353
+ $$
354
+
355
+ # B.2 PROOF OF LEMMA 4.3
356
+
357
+ Dukler et al. (2020) proved that the matrix $\mathbf { G } ^ { \infty }$ is strictly positive definite. In their proof, $\mathbf { G } ^ { \infty }$ is the covariance matrix of the functionals $\phi _ { p }$ define as
358
+
359
+ $$
360
+ \phi _ { p } ( \mathbf { v } ) : = \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right)
361
+ $$
362
+
363
+ over the Hilbert space $\nu$ of $L ^ { 2 } \left( N \left( 0 , \alpha ^ { 2 } \mathbf { I } \right) \right)$ . $\mathbf { G } ^ { * \infty }$ is strictly positive definite by showing that $\phi _ { 1 } , \cdots , \phi _ { N M }$ are linearly independent, which is equivalent to that
364
+
365
+ $$
366
+ c _ { 1 } \phi _ { 1 } + c _ { 2 } \phi _ { 2 } + \cdot \cdot \cdot + c _ { N M } \phi _ { N M } = 0 \mathrm { i n } \mathcal { V }
367
+ $$
368
+
369
+ holds only for $c _ { p } = 0$ for all $p$
370
+
371
+ Let $\mathbf { G } _ { i } ^ { \infty }$ denote the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . Then we have
372
+
373
+ $$
374
+ { \bf G } ^ { * \infty } = d i a g ( { \bf G } _ { 1 } ^ { \infty } , \cdot \cdot \cdot , { \bf G } _ { N } ^ { \infty } ) .
375
+ $$
376
+
377
+ To prove that $\mathbf { G } ^ { * \infty }$ is strictly positive definite, we will show that $\mathbf { G } _ { i } ^ { \infty }$ is positive definite. Let us define
378
+
379
+ $$
380
+ \phi _ { j , i } ^ { \ast } ( \mathbf { v } ) : = \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { j } \right) \mathbb { 1 } \{ j \in \mathrm { ~ s i t e ~ } i \} , \quad j = 1 , \cdots , M .
381
+ $$
382
+
383
+ Then, we are going to show that
384
+
385
+ $$
386
+ c _ { 1 } \phi _ { 1 , i } ^ { * } + c _ { 2 } \phi _ { 2 , i } ^ { * } + \cdot \cdot \cdot + c _ { M } \phi _ { M , i } ^ { * } = 0
387
+ $$
388
+
389
+ holds only for $c _ { j } = 0 , \forall j \in [ M ]$ . Suppose there exist $c _ { 1 } , \cdots , c _ { M }$ that are not identically 0, satisfying (11). Let the coefficients for client $i$ be $c _ { 1 } , \cdots , c _ { M }$ and let the coefficients for other client be 0. Then, we have a sequence of coefficients satisfying (10), which is a contradiction with that $\mathbf { G } ^ { \infty }$ is strictly positive definite. This implies $\mathbf { G } _ { i } ^ { \infty }$ is strictly positive definite. Namely, $\mathbf { G } _ { i } ^ { \infty }$ ’s eigenvalues are positive. Since the eigenvalues of $\mathbf { G } ^ { * \infty }$ are exactly the union of the eigenvalues of $\mathbf { G } _ { i } ^ { \infty }$ , $\lambda _ { m i n } \bigl ( \mathbf { G } ^ { * \infty } \bigr )$ is positive and thus, $\mathbf { G } ^ { * \infty }$ is strictly positive definite.
390
+
391
+ # B.3 PROOF OF COROLLARY 4.6
392
+
393
+ To compare the convergence rates of FedAvg and FedBN when $E = 1$ , we compare the exponential factor in the convergence rates, which are $\left( 1 - \eta \mu _ { 0 } / 2 \right)$ and $( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ for FedAvg and FedBN, respectively. Then, it reduces to comparing $\mu _ { 0 } = \lambda _ { \mathrm { m i n } } ( \mathbf G ^ { \infty } )$ and $\mu _ { 0 } ^ { * } = \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ . Comparing equation (7) and (9), $\mathbf { G } ^ { * \infty }$ takes the $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ :
394
+
395
+ $$
396
+ \mathbf { G } ^ { \infty } = \left[ \begin{array} { c c c c } { \mathbf { G } _ { 1 } ^ { \infty } } & { \mathbf { G } _ { 1 , 2 } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { 1 , N } ^ { \infty } } \\ { \mathbf { G } _ { 1 , 2 } ^ { \infty } } & { \mathbf { G } _ { 2 } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { 2 , N } ^ { \infty } } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { \mathbf { G } _ { 1 , N } ^ { \infty } } & { \mathbf { G } _ { 2 , N } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { N } ^ { \infty } } \end{array} \right] , \quad \mathbf { G } ^ { * \infty } = \left[ \begin{array} { c c c c } { \mathbf { G } _ { 1 } ^ { \infty } } & { 0 } & { \cdots } & { 0 } \\ { 0 } & { \mathbf { G } _ { 2 } ^ { \infty } } & { \cdots } & { 0 } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { 0 } & { 0 } & { \cdots } & { \mathbf { G } _ { N } ^ { \infty } } \end{array} \right] ,
397
+ $$
398
+
399
+ where $\mathbf { G } _ { i } ^ { \infty }$ is the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . By linear algebra,
400
+
401
+ $$
402
+ \lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } ) , \quad \forall i \in [ N ] .
403
+ $$
404
+
405
+ Since the eigenvalues of $\mathbf { G } ^ { * \infty }$ are exactly the union of eigenvalues of $\mathbf { G } _ { i } ^ { \infty }$ , we have
406
+
407
+ $$
408
+ \begin{array} { r l } & { \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } ^ { * \infty } \bigr ) = \underset { i \in [ N ] } { \operatorname* { m i n } } \big \{ \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } _ { i } ^ { \infty } \bigr ) \big \} , } \\ & { \qquad \geq \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } ^ { \infty } \bigr ) . } \end{array}
409
+ $$
410
+
411
+ Thus, $( 1 - \eta \mu _ { 0 } / 2 ) \ge ( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ and we can conclude that the convergence rate of FedBN is faster than the convergence of FedAvg.
412
+
413
+ # C FEDBN ALGORITHM
414
+
415
+ We describe the details algorithm of our proposed FedBN as following Algorithm 1:
416
+
417
+ # Algorithm 1 Federated Learning using FedBN
418
+
419
+ Notations: The user indexed by $k$ , neural network layer indexed by $l$ , initialized model parameters: $w _ { 0 , k } ^ { ( l ) }$ , local update pace: $E$ , and total optimization round $T$ .
420
+
421
+ 1: for each round $t = 1 , 2 , \dots , T$ do
422
+ 2: for each user $k$ and each layer $l$ do
423
+ 3: $w _ { t + 1 , k } ^ { ( l ) } S G D ( w _ { t , k } ^ { ( l ) } )$
424
+ 4: end for
425
+ 5: if $\mod ( t , E ) = 0$ then
426
+ 6: for each user $k$ and each layer $l$ do
427
+ 7: if layer $l$ is not BatchNorm then
428
+ 8: $\begin{array} { r } { w _ { t + 1 , k } ^ { ( l ) } \frac { 1 } { K } \sum _ { k = 1 } ^ { K } w _ { t + 1 , k } ^ { ( l ) } } \end{array}$
429
+ 9: end if
430
+ 10: end for
431
+ 11: end if
432
+ 12: end for
433
+
434
+ # D EXPERIMENTAL DETAILS
435
+
436
+ # D.1 VISUALIZATION OF BENCHMARK DATASETS
437
+
438
+ ![](images/9092214067a0f430a7de5f89cc805954beb11139b563366e7a32f0fae63cf12a.jpg)
439
+ Figure 6: Data visualization. (a) Examples from each dataset (client). (b) Non-iid feature distributions across the datasets (over random 100 samples for each dataset).
440
+
441
+ We show image examples from the five benchmark datasets and the pixel value histogram. It obviously presents the heterogeneous appearances and shifted distributions. Clients formed from the five benchmark datasets are viewed as non-iid.
442
+
443
+ # D.2 MODEL ARCHITECTURE AND TRAINING DETAILS ON BENCHMARK
444
+
445
+ We illustrate our model architecture and training details of the digits classification experiments in this section.
446
+
447
+ Model Architecture. For our benchmark experiment, we use a six-layer Convolutional Neural Network (CNN) and its details are listed in Table 3.
448
+
449
+ <table><tr><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Details</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>Conv2D(3, 64, 5, 1, 2)BN(64), ReLU, MaxPool2D(2,2)</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Conv2D(64, 64, 5, 1, 2)BN(64), ReLU, MaxPool2D(2, 2)</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64, 128,5, 1, 2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64, 128,5,1, 2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>FC(6272,2048)BN(2048), ReLU</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>FC(2048, 512)BN(512), ReLU</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>FC(512, 10)</td></tr></table>
450
+
451
+ Table 3: Model architecture of the benchmark experiment. For convolutional layer (Conv2D), we list parameters with sequence of input and output dimension, kernal size, stride and padding. For max pooling layer (MaxPool2D), we list kernal and stride. For fully connected layer (FC), we list input and output dimension. For BatchNormalization layer (BN), we list the channel dimension.
452
+
453
+ Training Details. We give detailed settings for the experiments conducted in 5.1: (1) convergence rate (Table 4), (2) analysis of local update epochs (Table 5), (3) analysis of local dataset size (Table 6), (4) effects of statistical heterogeneity (Table 7) and (5) comparison with state-of-the-art (Table 8). Each table describes the number of clients, samples and the local update epochs.
454
+
455
+ During training process, we use SGD optimizer with learning rate $1 0 ^ { - 2 }$ and cross-entropy loss, we set batch size to 32 and training epochs to 300. For hyper-parameter $\mu$ , we use the best value $\mu = 1 0 ^ { - 2 }$ founded by grid search from the the default settings in FedProx Li et al. (2020b).
456
+
457
+ Table 4: Settings for convergence rate. Each dataset has 1 client with 743 samples, local update epoch is set to 1.
458
+
459
+ <table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
460
+
461
+ <table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td></tr></table>
462
+
463
+ Table 5: Settings for local update epochs. Each dataset has 1 client with 743 samples, local update epoch for all datasets is set to 1, 4, 8, 16 successively.
464
+
465
+ <table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>W</td><td>W</td><td>W</td><td>W</td><td>8</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
466
+
467
+ Table 6: Settings for local dataset size, we set local update epochs to 1 and each dataset has 1 client.
468
+ The number of samples $\omega \in \{ 7 4 , 3 7 1$ , 743, 1487, 2975, 4462, 7438 .
469
+
470
+ <table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td></tr><tr><td>Number of samples</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
471
+
472
+ Table 7: Settings for statistical heterogeneity, [1, 10] for the range from 1 to 10. We increase number of clients step by step and number of samples will increase accordingly.
473
+
474
+ <table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
475
+
476
+ Table 8: Settings for comparison with SOTA, we use 1 client with 743 samples and 1 local update epoch for comparison experiment.
477
+
478
+ # D.3 MODEL ARCHITECTURE AND TRANING DETAILS OF IMAGE CLASSIFICATION TASK ON OFFICE-CALTECH10 AND DOMAINNET
479
+
480
+ In this section, we provide the details of our model and training process on both Office-Caltech10 Gong et al. (2012) and DomainNet Peng et al. (2019) dataset.
481
+
482
+ Model Architecture. For the image classification tasks on these two real-worlds datasets OfficeCaltech10 and DomainNet data, we use adapted AlexNet added with BN layer after each convolutional layer and fully-connected layer (except the last layer), architecture is shown in Table 9.
483
+ Table 9: Model architecture for Office-Caltech10 and DomainNet experiment. For convolutional layer (Conv2D), we list parameters with sequence of input and output dimension, kernal size, stride and padding. For max pooling layer (MaxPool2D), we list kernal and stride. For fully connected layer (FC), we list input and output dimension. For BatchNormalization layer (BN), we list the channel dimension.
484
+
485
+ <table><tr><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Details</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>Conv2D(3, 64, 11, 4, 2)BN(64), ReLU,MaxPool2D(3, 2)</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Conv2D(64,192,5,1,2)BN(192), ReLU,MaxPool2D(3,2)</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64,128,5, 1,2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(192, 384, 3, 1, 1)BN(384), ReLU</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>Conv2D(384, 256,3, 1, 1)BN(256), ReLU</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>Conv2D(256, 256, 3, 1, 1)BN(256),ReLU,MaxPoll2D(3,2)</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>AdaptiveAvgPool2D(6, 6)</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>FC(9216,4096)BN(4096), ReLU</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>FC(4096, 4096)BN(4096), ReLU</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>FC(4096, 10)</td></tr></table>
486
+
487
+ Training Details. Office-Caltech10 selects 10 common objects in Office-31 Saenko et al. (2010) and Caltech-256 datasets Griffin et al. (2007). There are four different data sources, one from Caltech-256 and three from Office-31, namely Amazon(images collected from online shopping website), DSLR and Webcam(images captured in office environment using Digital SLR camera and web camera).
488
+
489
+ We first reshape input images in the two dataset into $2 5 6 \times 2 5 6 \times 3$ , then for training process, we use cross-entropy loss and SGD optimizer with learning rate of $1 0 ^ { - 2 }$ , batch size is set to 32 and training epochs is 300. When comparing with FedProx, we set $\mu$ to $1 0 ^ { - 2 }$ which is tuned from the default settings. The data sample number are kept into the same size according to the smallest dataset, i.e. Office-Caltech10 uses 62 training samples and DomainNet uses 105 training samples on each dataset. In addition, for simplicity, we choose top-10 class based on data amount from DomainNet containing images over 345 categories.
490
+
491
+ # D.4 ABIDE DATASET AND TRAINING DETAILS
492
+
493
+ Here we describe the real-world medical datasets, the preprocessing and training details.
494
+
495
+ Dataset: The study was carried out using resting-state fMRI (rs-fMRI) data from the Autism Brain Imaging Data Exchange dataset (ABIDE I preprocessed, (Di Martino et al., 2014)). ABIDE is a consortium that provides preciously collected rs-fMRI ASD and matched controls data for the purpose of data sharing in the scientific community. We downloaded Regions of Interests (ROIs) fMRI series of the top four largest sites (UM, NYU, USM, UCLA viewed as clients) from the preprocessed ABIDE dataset with Configurable Pipeline for the Analysis of Connectomes (CPAC) and parcellated by Harvard-Oxford (HO) atlas. Skipping subjects lacking filename, resulting in 88, 167, 52, 63 subjects for UM, NYU, USM, UCLA separately. Due to a lack of sufficient data, we used sliding windows (with window size 32 and stride 1) to truncate raw time sequences of fMRI. The compositions of four sites were shown in Table 10. The number of overlapping truncate is the dataset size in a client.
496
+
497
+ Table 10: Data summary of the dataset used in our study.
498
+
499
+ <table><tr><td></td><td>NYU</td><td>UM1</td><td>USM</td><td>UCLA1</td></tr><tr><td>Total Subject</td><td>167</td><td>88</td><td>52</td><td>63</td></tr><tr><td>ASD Subject</td><td>73</td><td>43</td><td>33</td><td>37</td></tr><tr><td>HC Subject</td><td>94</td><td>45</td><td>19</td><td>26</td></tr><tr><td>ASD Percentage</td><td>44%</td><td>49%</td><td>63%</td><td>59%</td></tr><tr><td>fMRIFrames</td><td>176</td><td>296</td><td>236</td><td>116</td></tr><tr><td>Overlapping Trunc</td><td>145</td><td>265</td><td>205</td><td>85</td></tr></table>
500
+
501
+ Training Process : For all the strategies, we set batch size as 100. The total training local epoch is 50 with learning rate $1 0 ^ { - 2 }$ with SGD optimizer. Local update epoch for each client is $E = 1$ . We selected the best parameters $\mu = 0 . 2$ in FedProx through grid search.
502
+
503
+ # E MORE EXPERIMENTAL RESULTS ON BENCHMARK DATASETS
504
+
505
+ # E.1 CONVERGENCE COMPARISON OVER FEDAVG AND FEDBN
506
+
507
+ In this section we conduct an additional convergence analysis experiment over different local update epochs settings: $E = 1 , 4 , 8 , 1 6$ . As shown in Fig. 7, FedBN converges faster than FedAvg under different values of $E$ , which is supportive to our theoretical analysis in Section 4 and experimental results in Section 5.
508
+
509
+ ![](images/62420797776691eb600624283304fc2d3cea09d683088c4f0fb1d74b5fed52e9.jpg)
510
+ Figure 7: Training loss over epochs with different local update frequency.
511
+
512
+ # E.2 DETAILED STATISTICS OF FIGURE 5
513
+
514
+ In Figure 5, we compare the performance with respect to accuracy of FedBN and alternative methods. We show the detailed accuracy in the following Table 11.
515
+
516
+ <table><tr><td>Methods</td><td>SVHN</td><td>USPS</td><td>Synth</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Single</td><td>65.25 (1.07)</td><td>95.16 (0.12)</td><td>80.31 (0.38)</td><td>77.77 (0.47)</td><td>94.38 (0.07)</td></tr><tr><td>FedAvg</td><td>62.86 (1.49)</td><td>95.56 (0.27)</td><td>82.27 (0.44)</td><td>76.85 (0.54)</td><td>95.87 (0.20)</td></tr><tr><td>FedProx</td><td>63.08 (1.62)</td><td>95.58 (0.31)</td><td>82.34 (0.37)</td><td>76.64 (0.55)</td><td>95.75 (0.21)</td></tr><tr><td>FedBN</td><td>71.04 (0.31)</td><td>96.97 (0.32)</td><td>83.19 (0.42)</td><td>78.33 (0.66)</td><td>96.57 (0.13)</td></tr></table>
517
+
518
+ Table 11: The detailed statistics reported with format mean (std) of accuracy presented on Fig. 5 .
519
+
520
+ # E.3 COMPARE FEDBN WITH CENTRALIZED TRAINING
521
+
522
+ To better understand the significance of the numbers reported in our main context, we compare FedBN with centralized training, that pools all training data in to a center. We present the testing accuracy on each digit dataset in Table 12. FedBN, federated learning with data-specific BN layers, could achieve comparable performance with vanilla centralized training strategy.
523
+
524
+ <table><tr><td></td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Centralized</td><td>74.18 (0.44)</td><td>96.46 (0.30)</td><td>84.57 (0.38)</td><td>79.65 (0.24)</td><td>96.53 (0.19)</td></tr><tr><td>FedBN</td><td>71.04 (0.31)</td><td>96.97 (0.32)</td><td>83.19 (0.42)</td><td>78.33 (0.66)</td><td>96.57 (0.13)</td></tr></table>
525
+
526
+ Table 12: Testing accuracy on each testing sets with format mean(std) from 5-trial run.
527
+
528
+ # E.4 DIFFERENT COMBINATIONS OF $E$ AND $B$
529
+
530
+ In this section, we show different combinations of local update epochs $E$ and batch size $B$ . Specifically, $E \in \{ 1 , 4 , 1 6 \}$ and $B \in \{ 1 0 , 5 0 , \infty \}$ , $\infty$ denotes full batch learning. Following the setting in original FedAvg paper McMahan et al. (2017), we present the comparisons between FedBN and FedAvg on each combination of $E$ and $B$ in Table 13. The results are in good agreement that FedBN can consistently outperform FedAvg and robust to batch size selection. Further, we depicts the test sets accuracy vs. local epochs under different combination of $E$ and $B$ in Figure 8.
531
+
532
+ Table 13: Test sets accuracy using different combinations of batch size $B$ and local update epoch $E$ on benchmark experiment with the default non-iid setting.
533
+
534
+ <table><tr><td colspan="2">Setting</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>B=10,E=1</td><td>FedAvg FedBN</td><td>65.50 76.18</td><td>97.04 97.37</td><td>84.25 86.51</td><td>81.65 82.81</td><td>96.55 97.41</td></tr><tr><td>B=10,E=4</td><td>FedAvg FedBN</td><td>69.80 76.23</td><td>96.67 97.04</td><td>85.63 86.99</td><td>82.54 83.14</td><td>97.21 97.05</td></tr><tr><td>B=10,E=16</td><td>FedAvg FedBN</td><td>65.05 75.56</td><td>95.05 96.13</td><td>83.74 84.78</td><td>80.79 80.29</td><td>96.71 96.44</td></tr><tr><td>B=50,E=1</td><td>FedAvg FedBN</td><td>62.42 70.70</td><td>95.32 97.04</td><td>81.66 82.74</td><td>75.28 78.38</td><td>96.06 96.57</td></tr><tr><td>B=50,E=4</td><td>FedAvg FedBN</td><td>61.67 69.85</td><td>95.16 97.10</td><td>80.69 81.78</td><td>74.44 77.56</td><td>95.71 96.40</td></tr><tr><td>B=50,E=16</td><td>FedAvg FedBN</td><td>60.00 67.67</td><td>94.68 96.94</td><td>79.37 80.39</td><td>73.39 76.54</td><td>95.28 95.66</td></tr><tr><td>B=0,E=1</td><td>FedAvg FedBN</td><td>60.99 65.98</td><td>94.57 96.29</td><td>79.69 79.75</td><td>74.36 76.79</td><td>95.86 96.15</td></tr><tr><td>B=0,E=4</td><td>FedAvg FedBN</td><td>59.07 65.25</td><td>95.38 96.34</td><td>79.88 79.99</td><td>73.97 73.96</td><td>94.51 95.51</td></tr><tr><td>B=0,E=16</td><td>FedAvg FedBN</td><td>61.88 64.39</td><td>94.68 95.16</td><td>78.69 78.22</td><td>74.36 73.96</td><td>95.46 95.57</td></tr></table>
535
+
536
+ ![](images/38f977efc05dbe6b767563413356c6a50cf918f0febe3b2b47c0223723c1dfcd.jpg)
537
+ Figure 8: Test set accuracy curve (average of 5 datasets) of using different local updating epochs $E$ and batch size $B$ for FedBN.
538
+
539
+ # E.5 DETAILED STATISTICS OF VARYING LOCAL DATASET SIZE EXPERIMENT
540
+
541
+ Considering putting all results in one figure (15 lines) might affect readability of the figure, we excluded the statistics of FedAvg in our Fig. 4 (b), the ablation study of our method on the effect of local dataset size. Here, we list the full results in Table 14. It is not too surprising that at Singleset can be the best when the a local client gets a lot of data.
542
+
543
+ Table 14: Model performance over varying dataset sizes on local clients
544
+
545
+ <table><tr><td colspan="2">Setting</td><td>100%</td><td>60%</td><td>40%</td><td>20%</td><td>10%</td><td>5%</td><td>1%</td></tr><tr><td rowspan="3">MNIST</td><td>SingleSet</td><td>98.09</td><td>97.84</td><td>97.22</td><td>96.14</td><td>94.35</td><td>90.86</td><td>75.28</td></tr><tr><td>FedAvg</td><td>98.96</td><td>98.54</td><td>98.13</td><td>97.51</td><td>96.22</td><td>93.79</td><td>79.94</td></tr><tr><td>FedBN</td><td>98.91</td><td>98.63</td><td>98.34</td><td>97.78</td><td>96.72</td><td>94.67</td><td>85.22</td></tr><tr><td rowspan="3">SVHN</td><td>SingleSet</td><td>85.74</td><td>84.62</td><td>82.75</td><td>76.42</td><td>66.81</td><td>52.62</td><td>12.06</td></tr><tr><td>FedAvg</td><td>82.08</td><td>79.56</td><td>77.37</td><td>70.84</td><td>63.80</td><td>49.15</td><td>23.67</td></tr><tr><td>FedBN</td><td>86.93</td><td>84.72</td><td>82.87</td><td>78.20</td><td>71.31</td><td>61.53</td><td>31.98</td></tr><tr><td rowspan="3">USPS</td><td>SingleSet</td><td>98.87</td><td>98.49</td><td>97.85</td><td>96.94</td><td>95.11</td><td>93.01</td><td>80.11</td></tr><tr><td>FedAvg</td><td>98.33</td><td>97.85</td><td>97.42</td><td>96.61</td><td>95.59</td><td>93.76</td><td>79.09</td></tr><tr><td>FedBN</td><td>98.82</td><td>98.92</td><td>98.55</td><td>98.17</td><td>97.58</td><td>96.24</td><td>85.05</td></tr><tr><td rowspan="3">Synth</td><td>SingleSet</td><td>94.33</td><td>92.82</td><td>91.02</td><td>86.77</td><td>80.47</td><td>70.61</td><td>14.10</td></tr><tr><td>FedAvg</td><td>93.98</td><td>92.57</td><td>91.04</td><td>87.03</td><td>82.17</td><td>72.76</td><td>42.11</td></tr><tr><td>FedBN</td><td>94.40</td><td>92.81</td><td>91.75</td><td>88.03</td><td>83.06</td><td>74.85</td><td>43.76</td></tr><tr><td rowspan="3">MNISTM</td><td>SingleSet</td><td>93.30</td><td>91.63</td><td>89.41</td><td>84.34</td><td>77.59</td><td>66.02</td><td>17.23</td></tr><tr><td>FedAvg</td><td>90.59</td><td>88.91</td><td>86.21</td><td>82.11</td><td>76.93</td><td>67.97</td><td>41.71</td></tr><tr><td>FedBN</td><td>91.35</td><td>89.95</td><td>87.79</td><td>83.73</td><td>78.80</td><td>70.04</td><td>44.17</td></tr></table>
546
+
547
+ # E.6 TRAINING ON UNEQUAL DATASET SIZE
548
+
549
+ In our benchmark experiment (Section 5.1), we truncate the sample size of the five datasets to their smallest number. This data preprocessing intends to strictly control non-related factors (e.g., imbalanced sample numbers across clients), so that the experimental findings can more clearly reflect the effect of local BN. In this regard, truncating datasets is a reasonable way to make each client have an equal number of data points and local update steps. It is also possible to keep the data sets in their original size (which is unequal), by allowing clients with less data to repeat sampling. In this way, all clients use the same batch size and same local iterations of each epoch. We add results of such a setting with $10 \%$ and full original datasize in Table 15 and Table 16 respectively. It is observed that FedBN still consistently outperforms other methods.
550
+
551
+ Table 15: Testing accuracy of each clients when clients’ training samples are unequal using $10 \%$ of original data. The number of training samples for each client are denoted under their names.
552
+
553
+ <table><tr><td>Method</td><td>SVHN 7943</td><td>USPS 743</td><td>SynthDigits 39116</td><td>MNIST-M 5600</td><td>MNIST 5600</td></tr><tr><td>FedAvg</td><td>87.00</td><td>98.01</td><td>97.55</td><td>88.69</td><td>98.75</td></tr><tr><td>FedProx</td><td>86.75</td><td>97.90</td><td>97.53</td><td>88.86</td><td>98.86</td></tr><tr><td>FedBN</td><td>89.34</td><td>98.28</td><td>97.83</td><td>90.34</td><td>98.89</td></tr></table>
554
+
555
+ <table><tr><td>Method</td><td>SVHN 79430</td><td>USPS 7430</td><td>SynthDigits 391160</td><td>MNIST-M 56000</td><td>MNIST 56000</td></tr><tr><td>FedAvg</td><td>99.59</td><td>92.27</td><td>98.71</td><td>99.30</td><td>95.27</td></tr><tr><td>FedProx</td><td>99.50</td><td>92.12</td><td>98.66</td><td>99.27</td><td>95.44</td></tr><tr><td>FedBN</td><td>99.62</td><td>94.34</td><td>98.92</td><td>99.54</td><td>96.72</td></tr></table>
556
+
557
+ Table 16: Testing accuracy of each clients when clients’ training samples are unequal using full size data. The number of training samples for each client are denoted under their names.
558
+
559
+ # F SYNTHETIC DATA EXPERIMENT
560
+
561
+ Settings We generate data from two-pair of multi-Gaussian distributions. For one pair, samples $( x , 0 )$ and $( x , 1 )$ are sampled from $\mathcal { N } ( \bar { - } 1 , \Sigma _ { 1 } )$ and $\mathcal { N } ( 1 , \ \Sigma _ { 1 } )$ respectively, with coveriance $\Sigma _ { 1 } \in$ $\dot { \mathbb { R } } ^ { 1 0 \times 1 0 }$ . For another pair, samples $( \widetilde { x } , 0 )$ and $( \widetilde { x } , 1 )$ are sampled from $\mathcal { N } ( - 1 , ~ \Sigma _ { 2 } )$ and $\mathcal { N } ( 1 , \ \Sigma _ { 2 } )$ respectively, with coveriance $\bar { \Sigma } _ { 2 } \in \mathrm { ~ \mathbb { R } ^ { 1 0 \times 1 0 } ~ }$ e. Specifically, we design convariance matrix $\Sigma _ { 1 }$ as an identity diagonal matrix and $\Sigma _ { 2 }$ is different from $\Sigma _ { 1 }$ by having non-zero values on off-diagonal entries. We train a two-layer neural network with 100 hidden neurons for 600 steps using crossentropy loss and SGD optimizer with $1 \times 1 0 ^ { - 5 }$ learning rate. Denote $W _ { k }$ and $b _ { k }$ are the in-connection weigths and bias term of neuron $k$ . We initialize the model parameters with $W _ { k } \sim { \mathcal { N } } ( 0 , \alpha ^ { 2 } \mathbf { I } )$ , $b _ { k } \sim$ ${ \mathcal { N } } ( { \bar { 0 } } , \alpha ^ { 2 } )$ , where $\alpha = 1 0$ .
562
+
563
+ Results. The aim of synthetic experiments is to study the behavior of using FedBN with a controlled setup. We achieve $1 0 0 \%$ accuracy on binary classification for FedAvg and FedBN. Fig. 9 shows comparison of training loss curve over steps using FedAvg and FedBN, presenting that FedBN obtains significantly faster convergence than FedAvg.
564
+
565
+ ![](images/8d7c7d6c88c4050284340d7dcaeea9f2d4425955c2a65e22c1e97f87fe84f7e5.jpg)
566
+ Figure 9: Training loss on synthetic data. Data in client 1 is generated from Diagonal Gaussian, client 2 is generated from combination of Diagonal Gaussian and Full Gaussian.
567
+
568
+ # G TRANSFER LEARNING AND TESTING ON UNKNOWN DOMAIN CLIENT
569
+
570
+ In this section, we discuss out-of-domain generalization of FedBN and prove the solutions for the following two scenarios: 1) transferring FedBN to a new unknown domain clients during training; 2) testing an unknown domain client.
571
+
572
+ If a new center from another domain joins training, we can transfer the non-BN layer parameters of the global model to this new center. This new center will compute its own mean and variance statistics, and learn the corresponding local BN parameters.
573
+
574
+ Testing the global model on a new client with unknown statistics outside federation requires allowing access to local BN parameters at testing time (though BN layers are not aggregated at the global server during training). In this way, the new client can use the averaged trainable BN parameters learned at existing FL clients, and compute the (mean, variance) on its own data. Such a solution is also in line with what was done in recent literature, e.g., SiloBN (Andreux et al., 2020). We conduct the experiment with this solution for FedBN and compared its performance with FedAvg and FedProx. Specifically, we use the digits classification task and treat the two unseen datasets – Morpho-global and Morpho-local from Morpho-MNIST (Castro et al., 2019) as the two new clients. The new clients contain substantially perturbed digits. Specifically, Morpho-global containing thinning and thickening versions of MNIST digits, while Morpho-local changes MNIST by swelling and fractures. The results are listed in Table 17. It is observed that the obtained results from three methods are generally comparable in such a challenging setting, with FedBN presenting slightly higher performance on overall average accuracy.
575
+
576
+ <table><tr><td></td><td>Morpho-global</td><td>Morpho-local</td></tr><tr><td>FedBN</td><td>92.45</td><td>94.61</td></tr><tr><td>FedProx</td><td>92.35</td><td>94.31</td></tr><tr><td>FedAvg</td><td>91.28</td><td>93.55</td></tr></table>
577
+
578
+ Table 17: Generalizing the global model to unseen-domain clients.
parse/train/6YEQUn0QICG/6YEQUn0QICG_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6YEQUn0QICG/6YEQUn0QICG_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6YEQUn0QICG/6YEQUn0QICG_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM.md ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEAREST NEIGHBOR MACHINE TRANSLATION
2
+
3
+ Urvashi Khandelwal†∗, Angela Fan‡, Dan Jurafsky†, Luke Zettlemoyer‡, Mike Lewis‡
4
+
5
+ †Stanford University
6
+ ‡Facebook AI Research
7
+ {urvashik,jurafsky}@stanford.edu {angelafan,lsz,mikelewis}@fb.com
8
+
9
+ # ABSTRACT
10
+
11
+ We introduce $k$ -nearest-neighbor machine translation (kNN-MT), which predicts tokens with a nearest neighbor classifier over a large datastore of cached examples, using representations from a neural translation model for similarity search. This approach requires no additional training and scales to give the decoder direct access to billions of examples at test time, resulting in a highly expressive model that consistently improves performance across many settings. Simply adding nearest neighbor search improves a state-of-the-art German-English translation model by 1.5 BLEU. kNN-MT allows a single model to be adapted to diverse domains by using a domain-specific datastore, improving results by an average of 9.2 BLEU over zero-shot transfer, and achieving new state-of-the-art results—without training on these domains. A massively multilingual model can also be specialized for particular language pairs, with improvements of 3 BLEU for translating from English into German and Chinese. Qualitatively, $k \mathrm { N N - M T }$ is easily interpretable; it combines source and target context to retrieve highly relevant examples.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Non-parametric methods have recently been successfully applied to tasks such as language modeling (Khandelwal et al., 2020) and question answering (Guu et al., 2020; Lewis et al., 2020). They allow models that are (1) expressive, because they can use an arbitrary amount of data at test time; (2) adaptable, because predictions can be controlled by changing the datastore, and (3) interpretable, because the data used to make the prediction can be directly inspected. We introduce $k \mathrm { N N - M T }$ , a simple non-parametric method for machine translation (MT) using nearest neighbor retrieval. kNNMT can be added to any pre-trained neural translation model without further training, and significantly improves performance for in-domain, out-of-domain, and multi-lingual evaluations.
16
+
17
+ More specifically, kNN-MT interpolates the target-token softmax distribution from a neural MT model with a multinomial generated using nearest neighbor search over examples cached in a data store. The cache is over translation contexts (i.e. the complete source and prefix of the target), and is indexed by hidden states computed from the base MT model. We hypothesize that contexts which are close in representation space are more likely to be followed by the same target word. We show this is not only true for the original training data, thereby improving base model performance, but across a range of different bi-text corpora, allowing for simple and effective model adaptation.
18
+
19
+ Our work builds upon recent results showing the effectiveness of nearest neighbor methods in unconditional language models (Khandelwal et al., 2020). We generalize to conditional language models, by using both source and target context, and show nearest neighbour models can be effective for generation in addition to density estimation. Compared to prior work on non-parametric methods for MT, our approach is arguably simpler (in that it requires no training, as compared to Gu et al. (2018)) and more expressive (in that it provides access to billions of key-value pairs during inference, as compared to Zhang et al. (2018); Gu et al. (2018)).
20
+
21
+ Extensive experiments show that kNN-MT scales to datastores containing billions of tokens, improving results across a range of settings. For example, it improves a state-of-the-art GermanEnglish translation model by 1.5 BLEU. kNN-MT can also be used to adapt a single model to diverse domains by simply adding a domain-specific datastore—improving results by an average of 9.2 BLEU over the base model out-of-domain, and even outperforming existing models that train on these domains. Finally, language-pair-specific datastores are used to adapt a multilingual model to particular language pairs, with improvements of 3 BLEU for translating English into German and Chinese. We find that retrievals from kNN-MT are typically highly contextually relevant.
22
+
23
+ <table><tr><td rowspan="2" colspan="2">Training Translation Contexts ((s(2),)</td><td colspan="2">Datastore Representation</td><td rowspan="2" colspan="2">Distances dj=d(kj,q)</td><td rowspan="2">Nearest k</td><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">Temperature d=dj/T</td><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">Normalization p(kj) x exp(-d)</td><td rowspan="2"></td></tr><tr><td>kg=f(8(m),t)</td><td>Target U=t</td></tr><tr><td rowspan="2">J&#x27;aieteaParis. J&#x27;avaisetealamaison. J&#x27;appreciel&#x27;ete.</td><td>Ihave Ihad</td><td>8 0000</td><td>been been</td><td>4 3</td><td></td><td>my been</td><td>134</td><td></td><td>my been</td><td>0.1 0.3</td><td></td><td>my been</td><td>0.40 0.32</td></tr><tr><td>lenjoy .</td><td>000</td><td>summer</td><td>100 .</td><td></td><td>been</td><td></td><td></td><td>been</td><td>0.4</td><td></td><td>been</td><td>0.28</td></tr><tr><td>J&#x27;aimaproprechambre.</td><td>Ihave</td><td>8</td><td>. my</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1 Aggregation</td><td></td></tr><tr><td>Test Input x</td><td>Generated tokens 91:i-1</td><td>Representation q=f(x,g1:i-1)</td><td>Target yi</td><td></td><td></td><td></td><td></td><td></td><td></td><td>PkNN(yi)=∑1yi=ujp(kj)</td><td></td><td></td><td></td></tr><tr><td>J&#x27;ai etedansmapropre chambre.</td><td>Ihave</td><td>8</td><td>?</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>my been</td><td></td><td>0.4 0.6</td></tr></table>
24
+
25
+ # 2 NEAREST NEIGHBOR MACHINE TRANSLATION
26
+
27
+ kNN-MT involves augmenting the decoder of a pre-trained machine translation model with a nearest neighbor retrieval mechanism, allowing the model direct access to a datastore of cached examples. The translation is generated word-by-word; at each time step, we find the most similar contexts in the datastore, and compute a distribution over the corresponding target tokens, as shown in Figure 1. This distribution is then interpolated with the output distribution from the pre-trained MT model.
28
+
29
+ More specifically, given an input sequence of tokens in a source language $\boldsymbol { s } = \left( s _ { 1 } , \ldots , s _ { M _ { 1 } } \right)$ , a neural MT model outputs a sequence of tokens $t = \left( t _ { 1 } , \ldots , t _ { M _ { 2 } } \right)$ in the target language. When using autoregressive decoders, the output distribution for each token $t _ { i }$ in the target sequence is conditioned on the entire source sequence as well as the previous target tokens, $p ( t _ { i } | s , t _ { 1 : i - 1 } )$ . Let $\left( s , t _ { 1 : i - 1 } \right)$ be the translation context and $t _ { i }$ be the target token.
30
+
31
+ Datastore creation Our datastore is constructed offline and consists of a set of key-value pairs. The key is a high-dimensional representation of the entire translation context computed by the MT decoder, $f ( s , t _ { 1 : i - 1 } )$ , where $f$ represents a mapping from input to an intermediate representation of the decoder. The value is the corresponding ground truth target token $t _ { i }$ . For a parallel text collection $( s , \tau )$ , the representations are generated by a single forward pass over each example and the complete datastore is defined as follows:
32
+
33
+ $$
34
+ ( K , \mathcal { V } ) = \{ ( f ( s , t _ { 1 : i - 1 } ) , \ t _ { i } ) , \ \forall t _ { i } \in t \mid ( s , t ) \in ( S , T ) \}
35
+ $$
36
+
37
+ Tokens from the source language are not stored directly as values in the datastore. Conditioning on the source is implicit via the keys, and the values are only target language tokens.
38
+
39
+ Generation At test time, given a source $x$ , the model outputs a distribution over the vocabulary $p _ { M T } ( y _ { i } | x , \hat { y } _ { 1 : i - 1 } )$ for the target $y _ { i }$ at every step of generation, where $\hat { y }$ represents the generated tokens. The model also outputs the representation $f ( x , \hat { y } _ { 1 : i - 1 } )$ , which is used to query the datastore for the $k$ nearest neighbors $\mathcal { N }$ according to squared- $L ^ { 2 }$ distance, $d$ . In practice, the search over billions of key-value pairs is carried out using FAISS (Johnson et al., 2017), a library for fast nearest neighbor search in high-dimensional spaces.
40
+
41
+ The retrieved set is converted into a distribution over the vocabulary by applying a softmax with temperature $T$ to the negative distances and aggregating over multiple occurrences of the same vocabulary item. Using a temperature greater than one flattens the distribution, and prevents overfitting to the most similar retrievals.
42
+
43
+ $$
44
+ p _ { \mathrm { k N N } } ( y _ { i } | x , \hat { y } _ { 1 : i - 1 } ) \propto \sum _ { ( k _ { j } , v _ { j } ) \in N } \mathbb { 1 } _ { y _ { i } = v _ { j } } \exp \left( \frac { - d ( k _ { j } , f ( x , \hat { y } _ { 1 : i - 1 } ) ) } { T } \right)
45
+ $$
46
+
47
+ While a pure $k \mathbf { N N }$ approach is effective, we improve results by interpolating with the base model distribution, which is more robust in cases without relevant cached examples. The model and $k \mathbf { N N }$ distributions are interpolated with a tuned parameter $\lambda$ , resulting in the final $k$ NN-MT distribution:
48
+
49
+ $$
50
+ p ( y _ { i } | x , \hat { y } _ { 1 : i - 1 } ) = \lambda p _ { \mathrm { k N N } } ( y _ { i } | x , \hat { y } _ { 1 : i - 1 } ) + ( 1 - \lambda ) p _ { \mathrm { M T } } ( y _ { i } | x , \hat { y } _ { 1 : i - 1 } )
51
+ $$
52
+
53
+ The complete translation is generated using beam search.
54
+
55
+ kNN-MT vs. kNN-LM kNN-MT is a generalization of kNN-LM applied to conditional sequence generation, with a few important differences. First, the keys are not only conditioned on prior context, but also on the source sequence (here, in a different language). This means that the representations must encode both source and target context; we show examples in Section 6. Second, there is an additional tuned parameter, the softmax temperature. Higher temperatures flatten the distribution and allow for greater diversity without overfitting to the retrieved contexts, as shown in Section 6.
56
+
57
+ # 3 EXPERIMENTAL SETUP
58
+
59
+ We experiment with kNN-MT in three settings: (1) single language-pair translation, (2) multilingual MT and (3) domain adaptation.
60
+
61
+ Data We use the following datasets for training and evaluation.
62
+
63
+ WMT’19: For the single language-pair experiments, we use WMT’19 data for German-English.
64
+
65
+ CCMATRIX: We train our multilingual model on CCMatrix (Schwenk et al., 2019), containing parallel data for 79 languages and 1,546 language pairs. The parallel sentences are mined from cleaned monolingual commoncrawl data created using the ccNet pipeline (Wenzek et al., 2019). Semantically similar sentences in different languages are aligned using a learned distance measure; we use examples where the distance measure is at least 1.06, resulting in 4 billion sentence-pairs.
66
+
67
+ NEWSTEST: The newstest2018 and newstest2019 test sets from WMT (Bojar et al., 2018; Barrault et al., 2019) are used as validation and test sets for the multilingual experiments. The same GermanEnglish validation and test sets are also used for evaluation in the single language-pair and domain adaptation experiments.
68
+
69
+ TED TALKS: We use the Ted Talks data prepared by Qi et al. (2018) for evaluation in the multilingual setting, particularly to explore performance for language pairs that do no include English.
70
+
71
+ MULTI-DOMAINS: We use the multi-domains dataset (Koehn & Knowles, 2017), re-split by Aharoni & Goldberg (2020) for the domain adaptation experiments. It includes German-English parallel data for train/validation/test sets in five domains: Medical, Law, IT, Koran and Subtitles.
72
+
73
+ Models For the single language-pair and domain adaptation experiments, we use the WMT’19 German-English news translation task winner ( $\mathrm { N g }$ et al., 2019), available via the FAIRSEQ library (Ott et al., 2019).1 It is a Transformer encoder-decoder model (Vaswani et al., 2017) with 6 layers, 1,024 dimensional representations, 8,192 dimensional feedforward layers and 8 attention heads. Apart from WMT’19 training data, this model is trained on over 10 billion tokens of backtranslation data and fine-tuned on newstest test sets from years prior to 2018. In this work, we do not use ensembles or $n$ -best reranking.
74
+
75
+ For multilingual MT, we trained a 418M parameter Transformer-based encoder-decoder model on the CCMatrix data for 100K updates. The model has embedding dimension 1,024, hidden dimension 4,096, 12 layers in both the encoder and decoder, with 16 attention heads. To balance the training of different language pairs, which have various resource levels, we apply temperature upsampling with $T = 5$ (Arivazhagan et al., 2019). The vocabulary is shared across all languages and consists of 128K subwords extracted using sentencepiece (Kudo & Richardson, 2018).2 All results use case-sensitive detokenized BLEU, measured using SACREBLEU (Post, 2018).We provide the SACREBLEU signatures, along with details on the statistical power of our experiments, in Appendix C.
76
+
77
+ kNN-MT In this work, we use a FAISS index to represent the datastore and search for nearest neighbors. The keys are stored in clusters to speed up search and quantized to 64-bytes for space efficiency (the full-precision keys are discarded). The index is constructed offline via a single forward pass over every example in the given parallel text collection. We use the 1024-dimensional representation input to the final layer feedforward network as the key. Building the index involves a training phase to learn the cluster centroids. We use 5M keys for learning 131K cluster centroids for the multilingual experiments, and 1M keys for 4K clusters for in-domain data in the domain adaptation experiments. During inference, we query the datastore for 64 neighbors while searching 32 clusters. The interpolation and softmax temperature parameters are tuned on the validation sets.3
78
+
79
+ Computational Cost While kNN-MT does not add trainable model parameters, it does add some computational overhead. The primary cost of building the datastore is a single forward pass over all examples in the datastore, which is a fraction of the cost for training on the same examples for one epoch. During inference, retrieving 64 keys from a datastore containing billions of items results in a generation speed that is two orders of magnitude slower than the base MT system. Generation speed can be improved by searching fewer clusters, using smaller beams, or querying smaller datastores, with relatively minor trade-offs in performance, as we will see in Section 5. Developing faster nearest neighbor search tools remains an active area of research (Guo et al., 2020).
80
+
81
+ # 4 EXPERIMENTS
82
+
83
+ # 4.1 SINGLE LANGUAGE-PAIR TRANSLATION
84
+
85
+ To test whether kNN-MT can improve a model’s ability to generalize from its training data, we first apply it to a state-of-the-art translation model, using a datastore containing only the original training set. We use a state-of-the-art German-English model as our base MT system, which scores 37.59 BLEU on the newstest2019 test set.4 This is a highly competitive baseline – apart from the WMT’19 training data, the base model has also been trained on over 10 billion tokens of extra backtranslation data as well as fine-tuned on newstest test sets from previous years. Providing this heavily tuned base model with a datastore containing about 770M tokens of WMT’19 training data improves performance by 1.5 BLEU to 39.08, without any additional training. This result shows that even very strong translation models can be improved with test-time access to training sets.
86
+
87
+ # 4.2 MULTILINGUAL MACHINE TRANSLATION
88
+
89
+ Next, we apply $k \mathrm { N N - M T }$ to multilingual machine translation, to measure its ability to add capacity to a model when using very large training sets. For these experiments, we create datastores using subsets of the CCMatrix parallel data that the model has been trained on.
90
+
91
+ Retrieving neighbors from same source language data Here, we build one datastore per language-pair being tested, using the training examples for that language-pair. Table 1 shows performance for the baseline and $k \mathrm { N N - M T }$ on 17 language-pairs from newstest2019. Retrieving neighbors results in up to 3 BLEU improvements for English-German, English-Chinese and Chinese-English, with an average improvement of 1.4 BLEU across all 17 pairs, without any additional training.
92
+
93
+ Table 1 also shows the sizes of each of the datastores. Datastore size and the increase in BLEU are only weakly correlated across languages, though within a language, a larger datastore is decidedly better, as shown in Section 5. This suggests that underlying factors, such as the quality of the parallel data used to populate the datastore, may also factor into the size of the improvements from $k$ NN-MT.
94
+
95
+ Table 1: Multilingual machine translation with $k \mathrm { N N - M T }$ All test sets are from newstest2019, except ja-en/en-ja which are from newstest2020. Adding $k \mathrm { N N - M T }$ increases BLEU scores in all cases, and by over 3 points for en-de, zh-en and en-zh. Bold scores indicate significant results based on statistically powered experiments (Card et al., 2020).
96
+
97
+ <table><tr><td>Test set sizes</td><td>de-en 2,000</td><td>ru-en 2,000</td><td>zh-en 2,000</td><td>ja-en 993</td><td>fi-en 1,996</td><td>lt-en 1,000</td><td>de-fr 1,701</td><td>de-cs 1,997</td><td>en-cs 2,000</td></tr><tr><td>Base MT +kNN-MT</td><td>34.45 35.74</td><td>36.42 37.83</td><td>24.23 27.51</td><td>12.79 13.14</td><td>25.92 26.55</td><td>29.59 29.98</td><td>32.75 33.68</td><td>21.15 21.62</td><td>22.78 23.76</td></tr><tr><td>Datastore Size</td><td>5.56B</td><td>3.80B</td><td>1.19B</td><td>360M</td><td>318M</td><td>168M</td><td>4.21B</td><td>696M</td><td>533M</td></tr><tr><td>Test set sizes</td><td>en-de 1,997</td><td>en-ru 1,997</td><td>en-zh 1,997</td><td>en-ja 1,000</td><td>en-fi 1,997</td><td>en-lt 998</td><td>fr-de 1,701</td><td>cs-de 1,997</td><td>Avg. 1</td></tr><tr><td>Base MT +kNN-MT</td><td>36.47</td><td>26.28</td><td>30.22</td><td>21.35</td><td>21.37</td><td>17.41</td><td>26.04</td><td>22.78</td><td>26.00 27.40</td></tr><tr><td>Datastore Size</td><td>39.49 6.50B</td><td>27.91 4.23B</td><td>33.63 1.13B</td><td>23.23 433M</td><td>22.20 375M</td><td>18.25 204M</td><td>27.81 3.98B</td><td>23.55 689M</td><td>1</td></tr></table>
98
+
99
+ Table 2: Adding datastores with English source-side data can improve translation from other languages by an average of 1 BLEU, suggesting that our representations generalize over different source langauges. The model’s representations of the source generalize across languages and make crosslingual retrieval effective.
100
+
101
+ <table><tr><td></td><td colspan="5">Ted Talks</td><td colspan="3">Newstest2019</td><td>Avg.</td></tr><tr><td>Test set sizes</td><td>de-ja 4,442</td><td>ru-ja 5,090</td><td>uk-ja 3,560</td><td>de-ru 4,288</td><td>de-zh 4,349</td><td>fr-de 1,701</td><td>cs-de 1,997</td><td>de-cs 1,997</td><td>1</td></tr><tr><td>Base MT</td><td>10.11</td><td>9.69</td><td>8.36</td><td>17.24</td><td>20.48</td><td>26.04</td><td>22.78</td><td>21.15</td><td>16.98</td></tr><tr><td>+kNN-MT (en-*)</td><td>11.08</td><td>10.42</td><td>9.64</td><td>18.02</td><td>21.22</td><td>27.85</td><td>23.71</td><td>21.74</td><td>17.96</td></tr><tr><td>Datastore Size</td><td>433M</td><td>433M</td><td>433M</td><td>4.23B</td><td>1.13B</td><td>6.50B</td><td>6.50B</td><td>533M</td><td>1</td></tr></table>
102
+
103
+ Finally, we also observe that improvements for languages translated into English, on average 1.23 BLEU, are lower than improvements for languages translated from English, on average 1.94 BLEU. As English is the most frequent language in the base model’s training data, this suggests that kNNMT is particularly useful for improving decoders in languages that may be underfit during training.
104
+
105
+ Retrieving neighbors using English as the source language Here, we construct datastores from training examples where English is the source language, and the target language is the language being tested. This setting is useful for rarer language pairs with less bi-text, and is related to pivoting (Utiyama & Isahara, 2007; Cohn & Lapata, 2007). Table 2 shows that on five pairs from the Ted Talks data and three from newstest2019, we find that kNN-MT improves performance by 1 BLEU on average. This result shows that the model’s representations of the source generalize well enough across languages to make cross-lingual retrieval effective. Further investigation is needed to study the extent to which multilingual representations from related and unrelated languages can improve translation performance via $k \mathrm { N N - M T }$ .
106
+
107
+ # 4.3 DOMAIN ADAPTATION
108
+
109
+ We also measure the effectiveness of kNN-MT for domain adaptation, in which we use a domainspecific datastore to adapt the model, without further training. For these experiments, we use the German-English translation model from Section 4.1 as our base MT system and provide domainspecific data in the datastores. We also explore the effects of retrieving neighbors from a large amount of out-of-domain data as well as from a single multi-domain datastore.
110
+
111
+ Table 3: Domain adaptation using kNN-MT. The base MT system is trained on WMT’19 data which is also treated as the in-domain data for newstest2019. kNN-MT improves the base model by an average of 9.2 BLEU, without training, to achieve the best reported results on this task.
112
+
113
+ <table><tr><td></td><td>Newstest 2019</td><td>Medical</td><td>Law</td><td>IT</td><td>Koran</td><td>Subtitles</td><td>Avg.</td></tr><tr><td>Test set sizes</td><td>2,000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>-</td></tr><tr><td>Aharoni &amp; Goldberg (2020): one model per domain</td><td></td><td>56.5</td><td>59.0</td><td>43.0</td><td>15.9</td><td>27.3</td><td>40.34</td></tr><tr><td>one model for all domains</td><td></td><td>53.3</td><td>57.2</td><td>42.1</td><td>20.9</td><td>27.6</td><td>40.22</td></tr><tr><td>best data selection method</td><td>-</td><td>54.8</td><td>58.8</td><td>43.5</td><td>21.8</td><td>27.4</td><td>41.26</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Base MT +kNN-MT:</td><td>37.59</td><td>39.91</td><td>45.71</td><td>37.98</td><td>16.30</td><td>29.21</td><td>33.82</td></tr><tr><td>in-domain datastore</td><td>39.08</td><td>54.35</td><td>61.78</td><td>45.82</td><td>19.45</td><td>31.73</td><td>42.63</td></tr><tr><td>WMT&#x27;19 datastore</td><td>39.08</td><td>40.22</td><td>46.74</td><td>40.27</td><td>17.99</td><td>29.23</td><td>34.89</td></tr><tr><td>all-domains datastore</td><td>38.88</td><td>54.54</td><td>61.11</td><td>48.63</td><td>19.22</td><td>31.70</td><td>43.04</td></tr><tr><td>Datastore Size (in-domain)</td><td>770M</td><td>5.70M</td><td>18.3M</td><td>3.10M</td><td>450K</td><td>159M</td><td>-</td></tr></table>
114
+
115
+ Domain-specific datastores Table 3 shows the base MT system’s in-domain performance on newstest2019, as well as zero-shot transfer to five other domains. kNN-MT significantly outperforms the base MT system in all settings. For the multi-domains dataset, kNN-MT improves the base MT model performance by an average of 9.2 BLEU, with improvements as large as 16 BLEU on Law and 14.5 BLEU on Medical, all without any further training. We also provide scores from Aharoni & Goldberg (2020) for models trained on in-domain data, those trained on all domains jointly, and those trained using the best-performing data selection method proposed by the authors. We find that kNN-MT also outperforms the best reported average on the multi-domains dataset by 1.4 BLEU.
116
+
117
+ Out-of-domain and multi-domain datastores Table 3 also shows performance for retrieving neighbors from 770M tokens of WMT’19 data that the model has been trained on. While the average BLEU for the multi-domain data is 1 point higher, the improvements are much smaller compared to using in-domain data. This illustrates the value of adding domain-specific data to the datastore over adding a large amount of arbitrary data. We also measure the effectiveness of building a single multi-domain datastore containing parallel data from all six settings. Performance on IT improves by 3 BLEU but scores for the other domains are mostly the same. This shows that $k \mathrm { N N - M T }$ is robust to the presence of out-of-domain examples since retrieving neighbors from a datastore where large amounts of data is out-of-domain does not hurt performance relative to using only in-domain data.
118
+
119
+ # 5 TUNING KNN-MT
120
+
121
+ We investigate how key hyperparameters affect multilingual kNN-MT on validation data. We provide validation set BLEU scores as well as hyperparameter choices for our experiments in Appendix A.
122
+
123
+ Softmax temperature A softmax temperature is used when estimating the nearest neighbor distribution in order to prevent the model from assigning most of the probability mass to a single neighbor, thus hurting diversity. Values greater than 1 will flatten the distribution, which can improve $k \mathbf { N N } .$ - MT performance. Figure 2 shows that a temperature of 1 results in significantly lower BLEU scores. For all of our experiments, values of either 10 or 100 prove to be optimal.
124
+
125
+ Number of neighbors per query In our experiments, we fix the value of $k$ , the number of neighbors retrieved per query, to 64. For a fixed temperature and interpolation parameter, we find that performance does not improve when retrieving a larger number of neighbors, and in some cases, performance deteriorates. This suggests that retrieving more neighbors can add noise to the sequence generation process. Figure 2 shows that in some cases, performance improves when retrieving fewer neighbors, and further gains may be possible by tuning this parameter.
126
+
127
+ ![](images/4a894a653b5bc86d1ace69b7d9355010f59c2f95ab0e272cc0d4147ac07474f3.jpg)
128
+ Figure 2: Effect of the number of neighbors retrieved and the softmax temperature on the validation BLEU score for en- $z h$ . Temperatures greater than 1 are important to prevent the model from overfitting to the most similar neighbor. For higher temperatures, more neighbors do not always result in improvements.
129
+
130
+ ![](images/ffebda3037765255e36913287c15f19f093247f9555a28236f8315bb31082fba.jpg)
131
+ Figure 3: Effect of datastore size on the validation BLEU score for $r u – e n$ and $e n \ – \ z h$ . Performance improves monotonically with size but retrieval can be slow for datastores containing billions of tokens. Smaller datastores, which account for a large fraction of the improvement, can be used for faster retrieval.
132
+
133
+ Datastore size Figure 3 shows increasing the size of the datastore improves translation performance. However, larger datastores result in slower retrieval, indicating a speed-performance tradeoff. Much of the benefit can be realized with much smaller, and correspondingly faster, datastores.
134
+
135
+ # 6 QUALITATIVE ANALYSIS
136
+
137
+ To better understand kNN-MT, we examine the retrievals for several examples. We use the GermanEnglish model and generate with only the $k \mathbf { N N }$ distribution $\lambda = 1$ ) with beam size 1, retrieving $k = 8$ neighbors from the News Commentary and Common Crawl subsets of WMT’19 data.
138
+
139
+ Figure 4 shows an example from newstest2018 where all the retrieved neighbors map to the same target, military. Many of the retrieved examples include phrases similar to tamed the military such as Autoritat gegen ¨ uber dem Milit ¨ ar¨ , Kontrolle des Militars ¨ and das Militar gezwungen ¨ on the source side and authority over the military, control over the military and forced the military given the local target side context, but differ sharply in their longer context, often describing different nations and centuries. We provide additional examples illustrating this point in Appendix B.
140
+
141
+ Another interesting observation is that $k \mathbf { N N }$ , even when not interpolated with the base model, is able to reconstruct named entities that are split into multiple subword tokens, even if that particular named entity does not appear in the datastore. One such example is the name Haysom that is split into subwords Hay and som. The retrieved neighbors for the first subword token include examples that contain the names Hayes and Haydn, while those for the second include Grissom and Folsom, showing subword representations are used effectively in the nearest neighbor search.
142
+
143
+ # 7 RELATED WORK
144
+
145
+ Retrieval in Translation Recent work has integrated retrieval of words and phrases into neural translation, to gain some of the advantages of the previous generation of word- and phrase-based methods (Brown et al., 1993; Koehn et al., 2003). For example, Zhang et al. (2018) proposed guiding models by retrieving $n$ -grams and up-weighting the probabilities of retrieved tokens. Tu et al. (2018) use cache-based models (Grave et al., 2017a;b) to save and retrieve translation histories, so models can adapt to changing contexts. Compared to these, kNN-MT has several advantages — for instance, the external datastore only needs to be created once, whereas the cache model requires constant writes. Further, kNN-MT scales retrieval to orders-of-magnitude larger datastores, while taking advantage of neural context representations.
146
+
147
+ Other work has retrieved complete example translation sentences at test time. Nagao (1984) proposed example-based MT for translating sequences by analogy. Before deep learning was widely adopted, this approach was extended to identifying portions of the training data that could be a translation based on edit distance (Doi et al., 2005), matching training examples based on local trigram contexts (van den Bosch et al., 2007), using phrase-based memories (van Gompel et al., 2010) and incorporating syntactic features when retrieving similar examples (Stroppa et al., 2007; Haque et al., 2009). Recently, Gu et al. (2018) proposed a model that retrieves examples similar to the test source sequence and then attends over this subset of retrieved source-target pairs at the token level, while generating translations. Bulte & Tezcan (2019) and $\mathrm { X u }$ et al. (2020) use fuzzy-matching with translation memories and augment source sequences with retrieved source-target pairs. These techniques face challenges in identifying relevant retrieval candidates, as they focus on sentence-level retrieval. In contrast, kNN-MT focuses on token level retrieval from billions of key-value pairs, meaning that each word can retrieve the most relevant examples for its translation.
148
+
149
+ Figure 4: Example retrievals using kNN-MT. Not only do the retrievals all correctly predict the target word military, but the local contexts tend to be semantically related. Both the source and the three nearest retrievals express the concept of control over the military.
150
+
151
+ <table><tr><td colspan="3">TestInput:Dabei schien es,als habe Erdogan das Militar gezahmt. Generated tokens: In doing so,it seems as if Erdogan has tamed the</td></tr><tr><td colspan="2">Training Set Translation Context (source and target)</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Dem charismatischen Minis- terpräsidenten Recep Tayyip Erdogan,der drei aufeinanderfol- gendeWahlen fiirsich entscheiden konnte,ist es gelungenseine Autoritit gegeniiberdemMilitir</td><td>The charismatic prime minister, Re- cep Tayyip Erdogan,having won three consecutive elections, has been able to exert his authority over the</td><td>military</td><td>0.132</td></tr><tr><td>geltend zu machen. Ein bemerkenswerter Fall war die Ermordung des gemiβigten Pre-</td><td>One notable case was the assas- sination of moderate Prime Minis- terInukai Tsuyoshi in1932,which</td><td>military</td><td>0.130</td></tr><tr><td>mierministersInukaiTsuyoshi imJahre 1932, diedas Endejederwirklichenzivilen Kontrolle desMilitarsmarkiert. Siesind Teil eines Normal- isierungsprozesses und der Her-</td><td>marked theendofanyrealcivilian control ofthe They are part of a process of nor- malization,of the establishment of</td><td>military</td><td>0.129</td></tr><tr><td>stellung der absoluten zivilen Kontrolle iber dasMilitär und bestätigendasPrinzip, dass niemand iiber dem Gesetz steht.</td><td>absolute civilian control of the</td><td></td><td></td></tr><tr><td>Diese hart formulierte Erklarung wurdeals verschleierte,jedoch un- missverstandliche Warnung ange- sehen,dass das Militir bereit wire einzuschreiten...</td><td>That toughly worded statement was seenasa veiled but unmistakable warning that the</td><td>military</td><td>0.123</td></tr><tr><td colspan="2">… Final kNN distribution:military = 1.0 Final Translation: In doing so, Erdogan seemed to have tamed the military. Reference: In doing so, it seems as if Erdogan has tamed the military.</td><td></td><td></td></tr></table>
152
+
153
+ Finally, various studies have explored retrieving additional information to improve domain adaptation, often using lexicons (Hu et al., 2019), domain-adaptive training (Farajian et al., 2017) or attending over neighbors similar to $n$ -grams in the source (Bapna & Firat, 2019). These modifications require additional training, whereas kNN-MT provides the flexibility to use different datastores when decoding in different domains, keeping the model fixed.
154
+
155
+ Retrieval in Text Generation Retrieval mechanisms have also been applied to generation tasks more broadly. Weston et al. (2018) and Fan et al. (2020) improve dialogue response generation systems by retrieving examples and concatenating them to model inputs. Lewis et al. (2020) improve open-domain question answering systems by retrieving relevant contexts from Wikipedia and concatenating them to the inputs. Hashimoto et al. (2018) use a retrieve-and-edit framework to generate structured outputs such as code, by jointly training the editor and retriever. For $k \mathrm { N N - M T }$ , retrieval results in a distribution over the vocabulary that is used for generation directly and does not require further training or providing the retrieval candidates as input.
156
+
157
+ # 8 CONCLUSION
158
+
159
+ We introduced a simple and effective method that can be applied to any neural MT model without further training. We show that similar contexts in a model’s embedding space are more likely to be followed by similar next words, allowing the model to be improved by interpolation with a nearest neighbor classifier. The approach improves a state-of-the-art model in-domain, leads to large gains out-of-domain, and can specialize a multilingual model for specific language-pairs. Future work should improve efficiency, for example by down-sampling frequent target words in the datastore.
160
+
161
+ # ACKNOWLEDGMENTS
162
+
163
+ The authors thank Kartikay Khandelwal for thoughtful discussions, Holger Schwenk and Sergey Edunov for sharing data and model details, and Matthijs Douze for answering questions about FAISS.
164
+
165
+ # REFERENCES
166
+
167
+ Roee Aharoni and Yoav Goldberg. Unsupervised domain clusters in pretrained language models. In Association of Computational Linguistics (ACL), 2020.
168
+
169
+ Naveen Arivazhagan, Ankur Bapna, Orhan Firat, Dmitry Lepikhin, Melvin Johnson, Maxim Krikun, Mia Xu Chen, Yuan Cao, George Foster, Colin Cherry, et al. Massively multilingual neural machine translation in the wild: Findings and challenges. arXiv preprint arXiv:1907.05019, 2019.
170
+
171
+ Ankur Bapna and Orhan Firat. Non-parametric adaptation for neural machine translation. In North American Association of Computational Linguistics (NAACL), 2019.
172
+
173
+ Lo¨ıc Barrault, Ondˇrej Bojar, Marta R. Costa-jussa, Christian Federmann, Mark Fishel, Yvette \` Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, Christof Monz, Mathias Muller, Santanu Pal, Matt Post, and Marcos Zampieri. Findings of the 2019 con- ¨ ference on machine translation (WMT19). In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pp. 1–61, Florence, Italy, August 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-5301. URL https://www.aclweb.org/anthology/W19-5301.
174
+
175
+ Ondˇrej Bojar, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Philipp Koehn, and Christof Monz. Findings of the 2018 conference on machine translation (WMT18). In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pp. 272–303, Belgium, Brussels, October 2018. Association for Computational Linguistics. doi: 10.18653/v1/ W18-6401. URL https://www.aclweb.org/anthology/W18-6401.
176
+
177
+ Peter F Brown, Stephen A Della Pietra, Vincent J Della Pietra, and Robert L Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational linguistics, 19(2): 263–311, 1993.
178
+
179
+ Bram Bulte and Arda Tezcan. Neural fuzzy repair: Integrating fuzzy matches into neural machine translation. In Association of Computational Linguistics (ACL), 2019.
180
+
181
+ Dallas Card, Peter Henderson, Urvashi Khandelwal, Robin Jia, Kyle Mahowald, and Dan Jurafsky. With little power comes great responsibility. In Empirical Methods in Natural Language Processing (EMNLP), 2020.
182
+
183
+ Trevor Cohn and Mirella Lapata. Machine translation by triangulation: Making effective use of multi-parallel corpora. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pp. 728–735, Prague, Czech Republic, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P07-1092.
184
+
185
+ Takao Doi, Hirofumi Yamamoto, and Eiichiro Sumita. Example-based machine translation using efficient sentence retrieval based on edit-distance. ACM Transactions on Asian Language Information Processing, 4(4):377–399, 2005.
186
+
187
+ Angela Fan, Claire Gardent, Chloe Braud, and Antoine Bordes. Augmenting transformers with knn-based composite memory for dialogue. arXiv preprint arXiv:2004.12744, 2020.
188
+
189
+ M Amin Farajian, Marco Turchi, Matteo Negri, and Marcello Federico. Multi-domain neural machine translation through unsupervised adaptation. In Proceedings of the Second Conference on Machine Translation, pp. 127–137, 2017.
190
+
191
+ Edouard Grave, Moustapha M Cisse, and Armand Joulin. Unbounded cache model for online language modeling with open vocabulary. In NIPS, pp. 6042–6052, 2017a.
192
+
193
+ Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. In International Conference on Learning Representations (ICLR), 2017b.
194
+
195
+ Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. Search engine guided neural machine translation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
196
+
197
+ Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, and Sanjiv Kumar. Accelerating large-scale inference with anisotropic vector quantization. In International Conference on Machine Learning (ICML), 2020.
198
+
199
+ Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. arXiv preprint arXiv:2002.08909, 2020.
200
+
201
+ Rejwanul Haque, Sudip Naskar, Yanjun Ma, and Andy Way. Using supertags as source language context in smt. 13th Annual Conference of the European Association for Machine Translation, (EAMT), 01 2009.
202
+
203
+ Tatsunori B. Hashimoto, Kelvin Guu, Yonatan Oren, and Percy Liang. A retrieve-and-edit framework for predicting structured outputs. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
204
+
205
+ Junjie Hu, Mengzhou Xia, Graham Neubig, and Jaime G Carbonell. Domain adaptation of neural machine translation by lexicon induction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2989–3001, 2019.
206
+
207
+ Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
208
+
209
+ Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. Generalization through memorization: Nearest neighbor language models. In International Conference on Learning Representations (ICLR), 2020.
210
+
211
+ Philipp Koehn and Rebecca Knowles. Six challenges for neural machine translation. In First Workshop on Neural Machine Translation (WNMT), 2017.
212
+
213
+ Philipp Koehn, Franz J Och, and Daniel Marcu. Statistical phrase-based translation. Technical report, UNIVERSITY OF SOUTHERN CALIFORNIA MARINA DEL REY INFORMATION SCIENCES INST, 2003.
214
+
215
+ Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In Empirical Methods in Natural Language Processing: System Demonstrations (EMNLP), 2018.
216
+
217
+ Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen tau Yih, Tim Rockt ¨ aschel, Sebastian Riedel, and ¨ Douwe Kiela. Retrieval-augmented generation for knowledge-intensive nlp tasks. arXiv preprint arXiv:2005.11401, 2020.
218
+
219
+ Makoto Nagao. A framework of a mechanical translation between japanese and english by analogy principle. In Artificial and human intelligence, 1984.
220
+
221
+ Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, and Sergey Edunov. Facebook fair’s wmt19 news translation task submission. In Fourth Conference on Machine Translation (WMT), 2019.
222
+
223
+ Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In North American Association of Computational Linguistics: System Demonstrations (NAACL), 2019.
224
+
225
+ Matt Post. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pp. 186–191, Belgium, Brussels, October 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/ W18-6319.
226
+
227
+ Ye Qi, Devendra Sachan, Matthieu Felix, Sarguna Padmanabhan, and Graham Neubig. When and why are pre-trained word embeddings useful for neural machine translation? In North American Association of Computational Linguistics (NAACL), 2018.
228
+
229
+ Holger Schwenk, Guillaume Wenzek, Sergey Edunov, Edouard Grave, and Armand Joulin. Ccmatrix: Mining billions of high-quality parallel sentences on the web. arXiv preprint arXiv:1911.04944, 2019.
230
+
231
+ Nicolas Stroppa, Antal van den Bosch, and Andy Way. Exploiting source similarity for smt using context-informed features. Proceedings of The 11th Conference on Theoretical and Methodological Issues in Machine Translation, 01 2007.
232
+
233
+ Zhaopeng Tu, Yang Liu, Shuming Shi, and Tong Zhang. Learning to remember translation history with a continuous cache. In Transactions of the Association of Computational Linguistics (TACL), 2018.
234
+
235
+ Masao Utiyama and Hitoshi Isahara. A comparison of pivot methods for phrase-based statistical machine translation. In Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference, pp. 484–491, Rochester, New York, April 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/N07-1061.
236
+
237
+ Antal van den Bosch, Nicolas Stroppa, and Andy Way. A memory-based classification approach to marker-based ebmt. METIS-II Workshop on New Approaches to Machine Translation, 04 2007.
238
+
239
+ Maarten van Gompel, Antal van den Bosch, and Peter Berck. Extending memory-based machine translation to phrases. In Computational Linguistics in the Netherlands (CLIN), pp. 79–86, 01 2010.
240
+
241
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS), 2017.
242
+
243
+ Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzman, ´ Armand Joulin, and Edouard Grave. Ccnet: Extracting high quality monolingual datasets from web crawl data. arXiv preprint arXiv:1911.00359, 2019.
244
+
245
+ Jason Weston, Emily Dinan, and Alexander H Miller. Retrieve and refine: Improved sequence generation models for dialogue. arXiv preprint arXiv:1808.04776, 2018.
246
+
247
+ Jitao Xu, Josep Crego, and Jean Senellart. Boosting neural machine translation with similar translations. In Association of Computational Linguistics (ACL), 2020.
248
+
249
+ Biao Zhang, Philip Williams, Ivan Titov, and Rico Sennrich. Improving massively multilingual neural machine translation and zero-shot translation. arXiv preprint arXiv:2004.11867, 2020.
250
+
251
+ Jingyi Zhang, Masao Utiyama, Eiichro Sumita, Graham Neubig, and Satoshi Nakamura. Guiding neural machine translation with retrieved translation pieces. In North American Association of Computational Linguistics (NAACL), 2018.
252
+
253
+ Table 4: Multilingual machine translation with $k \mathrm { N N - M T }$ on the validation set. We show the the tuned interpolation parameter $( \lambda )$ as well as the tuned softmax temperature $( T )$ for each language pair.
254
+
255
+ <table><tr><td>Test set sizes</td><td>de-en 2,998</td><td>ru-en 3,000</td><td>zh-en 3,981</td><td>ja-en 1,998</td><td>fi-en 3,000</td><td>lt-en 2,000</td><td>de-fr 1,512</td><td>de-cs 3,000</td><td>en-cs 2,983</td></tr><tr><td>Base MT +kNN-MT</td><td>38.21 40.48</td><td>30.51 32.6</td><td>21.93 24.49</td><td>14.44 15.62</td><td>21.50 22.11</td><td>28.68 29.41</td><td>28.46 29.74</td><td>21.97 23.01</td><td>20.66 21.79</td></tr><tr><td>Datastore Size Interpolation (入) Temperature (T)</td><td>5.56B 0.6 10</td><td>3.80B 0.5 10</td><td>1.19B 0.4 10</td><td>360M 0.4 10</td><td>318M 0.2 10</td><td>168M 0.2 10</td><td>4.21B 0.6 100</td><td>696M 0.4 100</td><td>533M 0.3 10</td></tr><tr><td>Test set sizes</td><td>en-de 2,998</td><td>en-ru 3,000</td><td>en-zh 3,981</td><td>en-ja 1,998</td><td>en-fi 3,000</td><td>en-lt 2,000</td><td>fr-de 1,512</td><td>cs-de</td><td>Avg.</td></tr><tr><td>Base MT</td><td>39.07</td><td>26.00</td><td>32.72</td><td>16.31</td><td>16.02</td><td>21.11</td><td>25.16</td><td>3,000 24.16</td><td>- 25.11</td></tr><tr><td>+kNN-MT</td><td>42.22</td><td>29.52</td><td>37.96</td><td>18.28</td><td>17.22</td><td>22.84</td><td>26.39</td><td>24.5</td><td>26.95</td></tr><tr><td>Datastore Size</td><td>6.50B</td><td>4.23B</td><td>1.13B</td><td>433M</td><td>375M</td><td>204M</td><td>3.98B</td><td></td><td></td></tr><tr><td>Interpolation (入)</td><td>0.6</td><td>0.7</td><td>0.7</td><td></td><td></td><td></td><td></td><td>689M</td><td>-</td></tr><tr><td></td><td></td><td></td><td></td><td>0.6</td><td>0.4</td><td>0.4</td><td>0.5</td><td>0.4</td><td></td></tr><tr><td>Temperature (T)</td><td>100</td><td>10</td><td>100</td><td>10</td><td>10</td><td>10</td><td>10</td><td>100</td><td></td></tr></table>
256
+
257
+ Table 5: Domain adaptation using $k \mathrm { N N - M T }$ on the multi-domains validation data and newstest2018. The base MT system is trained on WMT’19 data which is also treated as the in-domain data for newstest2018. We present the interpolation $( \lambda )$ and softmax temperature $( T )$ hyperparameter choices for each domain.
258
+
259
+ <table><tr><td></td><td>Newstest 2019</td><td>Medical</td><td>Law</td><td>IT</td><td>Koran</td><td>Subtitles</td><td>Avg.</td></tr><tr><td>Test set sizes Base MT</td><td>2,000</td><td>2,000</td><td>2,000</td><td>2.000</td><td>2,000</td><td>2,000</td><td>1</td></tr><tr><td>+kNN-MT:</td><td>48.07</td><td>39.94</td><td>45.78</td><td>35.78</td><td>16.30</td><td>29.74</td><td>33.51</td></tr><tr><td>in-domain datastore</td><td>48.57</td><td>53.12</td><td>61.58</td><td>42.41</td><td>19.67</td><td>32.28</td><td>41.81</td></tr><tr><td>Datastore Size (in-domain)</td><td>770M</td><td>5.70M</td><td>18.3M</td><td>3.10M</td><td>450K</td><td>159M</td><td>1</td></tr><tr><td>Interpolation (入)</td><td>0.4</td><td>0.8</td><td>0.8</td><td>0.7</td><td>0.8</td><td>0.7</td><td>-</td></tr><tr><td>Temperature (T)</td><td>100</td><td>10</td><td>10</td><td>10</td><td>100</td><td>10</td><td>-</td></tr></table>
260
+
261
+ # A HYPERPARAMETER TUNING
262
+
263
+ In this section, we present validation set results as well as the hyperparameter choices for the multilingual machine translation and domain adaptation experiments. Only two hyperparameters have been tuned on the validation sets, the interpolation parameter $\lambda$ and the softmax temperature $T$ . The number of neighbors $k$ has been fixed to 64, the number of clusters searched has been set to 32 and the beam size has been set to 5. For the number of clusters in the FAISS index, preliminary experiments showed that for larger datastores, while using more clusters does not hurt performance, it does significantly speed up the search process since searching within the clusters is exhaustive. Hence, we use 131K clusters for the multilingual experiments.
264
+
265
+ Table 4 shows the validation set BLEU scores for the multilingual experiments as well as the hyperparameter choices, and Table 5 shows the same for the domain adaptation experiments using only the in-domain datastores. Values for the interpolation parameter lie between 0 and 1. We also note that for a fixed value of $\lambda = 0 . 5$ , using $k \mathrm { N N - M T }$ either performs similarly to or improves the base MT model’s performance, but never hurts, on validation sets across the 17 language pairs evaluated in Section 4.2. For the temperature, we find that values of either 10 or 100 are optimal for all of our experiments.
266
+
267
+ Test Input: Aber in Papua hat sich wenig verandert, und heute f ¨ uhlen sich die Einheimischen betrogen. ¨ Generated tokens: But not much has
268
+
269
+ <table><tr><td>Training Set Translation Context</td><td>Training Set Target</td><td>Context Probability</td><td></td></tr><tr><td>Nach einem schwerumkämpften Wahlkampf,derdeutlich überzwei Milliarden Dollarkostete,sieht esfir vieleBeobachter aus,alshättesich in deramerikanischen Politik nicht vielt geandert..</td><td>Aftera hard-fought elec- tion campaign,costing well in excess of $2 billion,it seems to many observers thatnot much has</td><td>changed</td><td>0.143</td></tr><tr><td>Geindert freilich hat sich wenig:SchlechtBut not much has gehandhabteKriege...</td><td></td><td>changed</td><td>0.137</td></tr><tr><td>Kaum etwas hat sich verändert,auβerNot much has dasses jetzt nicht mehr die Bewohner des</td><td></td><td>changed</td><td>0.130</td></tr><tr><td>Appartement-Gebaudes... Es ist zwar richtig,dass sich seit dem AusbruchderglobalenFinanzkrise vor über vier Jahren und derschon 2010verabschiedetenDodd-Frank- Finanzmarkreformen in den Vereinigten Staatenkaumetwasdaran geändert hat...</td><td>True,while the global f- nancial crisis erupted more than four years ago,and the Dodd-Frank financial reformswereadopted inthe UnitedStatesbackin2010, notmuch has</td><td>changed</td><td>0.121</td></tr><tr><td colspan="4">… Final kNN distribution: changed = 1.0 Final Translation: But not much has changed in Papua,and locals feel betrayed today. Reference:But precious little has changed in Papua,and today local people feel betrayed.</td></tr></table>
270
+
271
+ # B ADDITIONAL EXAMPLES
272
+
273
+ Figure 5 further illustrates the behavior of kNN-MT using local contexts in both the source and target to retrieve nearest neighbors. Figure 6 shows a case where the model has very little target-side prior context and mainly relies on the source context to retrieve the best neighbors.
274
+
275
+ # C BLEU SCORES
276
+
277
+ In this paper, all results use case-sensitive detokenized BLEU, measured using SACREBLEU (Post, 2018), with the following signatures:
278
+
279
+ General: BLEU+case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.13a+version.1.4.13
280
+ For chinese: BLEU $^ +$ case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.zh+version.1.4.13
281
+
282
+ BLEU $^ +$ case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.ja-mecab-0.996-IPA+version.1.4.13
283
+
284
+ For Table 1 and other experiments, we follow advice from Card et al. (2020) regarding the statistical power of machine translation experiments given the improvements in BLEU scores and the size of the dataset. The authors present results for a single language pair and we verify that their assumptions hold for a couple of other language pairs. Specifically, we find that for Chinese-English $P _ { 0 } = 0 . 1 3$ and $b _ { 0 } = 1 2$ , and for English-Chinese $P _ { 0 } = 0 . 0 7$ and $b _ { 0 } ~ = ~ 1 6$ . This indicates that these experiments, with the test sets containing about 2,000 examples, have close to $100 \%$ power which was verified using the notebooks provided by Card et al. (2020). We refer the reader to the original paper for more details. More generally, experiments on datasets which contain about 2,000 examples, with improvements of about 1 BLEU or higher, are statistically powered.
285
+
286
+ <table><tr><td colspan="3">TestInput:Wirwerden dasBeste tun,mit dem,waswir haben. Generated tokens:We</td></tr><tr><td>Training Set Translation Context (source and target)</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Wirwerden versuchen zu beweisen,dass die We Vermutung falsch ist,dies zu tun,nur um ein Gegenbeispiel Leinwände,dass die Aussage falsch ist,zu finden.</td><td>will</td><td>0.145</td></tr><tr><td>Allerdings,wenn man sich diese groβe Na- tion,wird diese Nation aussehen zu weit,und wir werden das tun, was wichtig und wertvoll, IdentityWiederherstellenderNation.</td><td>However, if you look will at this great nation, this nation will look too wide and we</td><td>0.132</td></tr><tr><td>Wir werden alles tun,um die Dinge fiir die We Anfänger sehr einfach zu machen,wahrend wir esden Experten erlauben,Dinge zu verändern,</td><td>will</td><td>0.127</td></tr><tr><td>fallssiewollen. “Wirwerden ihre Falleund die Fälle anderer politischer Gefangener vor die Gerichte brin- gen und das falsche Bild zerstoren...</td><td>“We</td><td>are 0.127</td></tr><tr><td colspan="3">· … · Final kNN distribution:will= O.639,are = O.238,intend= 0.123</td></tr></table>
parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_content_list.json ADDED
@@ -0,0 +1,1582 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "NEAREST NEIGHBOR MACHINE TRANSLATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 178,
8
+ 98,
9
+ 736,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Urvashi Khandelwal†∗, Angela Fan‡, Dan Jurafsky†, Luke Zettlemoyer‡, Mike Lewis‡ ",
17
+ "bbox": [
18
+ 189,
19
+ 143,
20
+ 776,
21
+ 160
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "†Stanford University \n‡Facebook AI Research \n{urvashik,jurafsky}@stanford.edu {angelafan,lsz,mikelewis}@fb.com ",
28
+ "bbox": [
29
+ 184,
30
+ 161,
31
+ 496,
32
+ 217
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 253,
43
+ 544,
44
+ 268
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "We introduce $k$ -nearest-neighbor machine translation (kNN-MT), which predicts tokens with a nearest neighbor classifier over a large datastore of cached examples, using representations from a neural translation model for similarity search. This approach requires no additional training and scales to give the decoder direct access to billions of examples at test time, resulting in a highly expressive model that consistently improves performance across many settings. Simply adding nearest neighbor search improves a state-of-the-art German-English translation model by 1.5 BLEU. kNN-MT allows a single model to be adapted to diverse domains by using a domain-specific datastore, improving results by an average of 9.2 BLEU over zero-shot transfer, and achieving new state-of-the-art results—without training on these domains. A massively multilingual model can also be specialized for particular language pairs, with improvements of 3 BLEU for translating from English into German and Chinese. Qualitatively, $k \\mathrm { N N - M T }$ is easily interpretable; it combines source and target context to retrieve highly relevant examples. ",
51
+ "bbox": [
52
+ 233,
53
+ 284,
54
+ 764,
55
+ 477
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 502,
66
+ 336,
67
+ 518
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Non-parametric methods have recently been successfully applied to tasks such as language modeling (Khandelwal et al., 2020) and question answering (Guu et al., 2020; Lewis et al., 2020). They allow models that are (1) expressive, because they can use an arbitrary amount of data at test time; (2) adaptable, because predictions can be controlled by changing the datastore, and (3) interpretable, because the data used to make the prediction can be directly inspected. We introduce $k \\mathrm { N N - M T }$ , a simple non-parametric method for machine translation (MT) using nearest neighbor retrieval. kNNMT can be added to any pre-trained neural translation model without further training, and significantly improves performance for in-domain, out-of-domain, and multi-lingual evaluations. ",
74
+ "bbox": [
75
+ 174,
76
+ 532,
77
+ 823,
78
+ 643
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "More specifically, kNN-MT interpolates the target-token softmax distribution from a neural MT model with a multinomial generated using nearest neighbor search over examples cached in a data store. The cache is over translation contexts (i.e. the complete source and prefix of the target), and is indexed by hidden states computed from the base MT model. We hypothesize that contexts which are close in representation space are more likely to be followed by the same target word. We show this is not only true for the original training data, thereby improving base model performance, but across a range of different bi-text corpora, allowing for simple and effective model adaptation. ",
85
+ "bbox": [
86
+ 174,
87
+ 651,
88
+ 823,
89
+ 750
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Our work builds upon recent results showing the effectiveness of nearest neighbor methods in unconditional language models (Khandelwal et al., 2020). We generalize to conditional language models, by using both source and target context, and show nearest neighbour models can be effective for generation in addition to density estimation. Compared to prior work on non-parametric methods for MT, our approach is arguably simpler (in that it requires no training, as compared to Gu et al. (2018)) and more expressive (in that it provides access to billions of key-value pairs during inference, as compared to Zhang et al. (2018); Gu et al. (2018)). ",
96
+ "bbox": [
97
+ 174,
98
+ 756,
99
+ 825,
100
+ 853
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Extensive experiments show that kNN-MT scales to datastores containing billions of tokens, improving results across a range of settings. For example, it improves a state-of-the-art GermanEnglish translation model by 1.5 BLEU. kNN-MT can also be used to adapt a single model to diverse domains by simply adding a domain-specific datastore—improving results by an average of 9.2 BLEU over the base model out-of-domain, and even outperforming existing models that train on these domains. Finally, language-pair-specific datastores are used to adapt a multilingual model to particular language pairs, with improvements of 3 BLEU for translating English into German and Chinese. We find that retrievals from kNN-MT are typically highly contextually relevant. ",
107
+ "bbox": [
108
+ 176,
109
+ 861,
110
+ 823,
111
+ 902
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "table",
117
+ "img_path": "images/20a1ccf1cf30c46d7bddacd08ee4088dcfc1c8141981161f775b1c03074811e6.jpg",
118
+ "table_caption": [],
119
+ "table_footnote": [],
120
+ "table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Training Translation Contexts ((s(2),)</td><td colspan=\"2\">Datastore Representation</td><td rowspan=\"2\" colspan=\"2\">Distances dj=d(kj,q)</td><td rowspan=\"2\">Nearest k</td><td rowspan=\"2\"></td><td rowspan=\"2\"></td><td rowspan=\"2\">Temperature d=dj/T</td><td rowspan=\"2\"></td><td rowspan=\"2\"></td><td rowspan=\"2\">Normalization p(kj) x exp(-d)</td><td rowspan=\"2\"></td></tr><tr><td>kg=f(8(m),t)</td><td>Target U=t</td></tr><tr><td rowspan=\"2\">J&#x27;aieteaParis. J&#x27;avaisetealamaison. J&#x27;appreciel&#x27;ete.</td><td>Ihave Ihad</td><td>8 0000</td><td>been been</td><td>4 3</td><td></td><td>my been</td><td>134</td><td></td><td>my been</td><td>0.1 0.3</td><td></td><td>my been</td><td>0.40 0.32</td></tr><tr><td>lenjoy .</td><td>000</td><td>summer</td><td>100 .</td><td></td><td>been</td><td></td><td></td><td>been</td><td>0.4</td><td></td><td>been</td><td>0.28</td></tr><tr><td>J&#x27;aimaproprechambre.</td><td>Ihave</td><td>8</td><td>. my</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1 Aggregation</td><td></td></tr><tr><td>Test Input x</td><td>Generated tokens 91:i-1</td><td>Representation q=f(x,g1:i-1)</td><td>Target yi</td><td></td><td></td><td></td><td></td><td></td><td></td><td>PkNN(yi)=∑1yi=ujp(kj)</td><td></td><td></td><td></td></tr><tr><td>J&#x27;ai etedansmapropre chambre.</td><td>Ihave</td><td>8</td><td>?</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>my been</td><td></td><td>0.4 0.6</td></tr></table>",
121
+ "bbox": [
122
+ 176,
123
+ 102,
124
+ 821,
125
+ 241
126
+ ],
127
+ "page_idx": 1
128
+ },
129
+ {
130
+ "type": "text",
131
+ "text": "",
132
+ "bbox": [
133
+ 173,
134
+ 372,
135
+ 825,
136
+ 443
137
+ ],
138
+ "page_idx": 1
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "2 NEAREST NEIGHBOR MACHINE TRANSLATION ",
143
+ "text_level": 1,
144
+ "bbox": [
145
+ 174,
146
+ 462,
147
+ 596,
148
+ 478
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "kNN-MT involves augmenting the decoder of a pre-trained machine translation model with a nearest neighbor retrieval mechanism, allowing the model direct access to a datastore of cached examples. The translation is generated word-by-word; at each time step, we find the most similar contexts in the datastore, and compute a distribution over the corresponding target tokens, as shown in Figure 1. This distribution is then interpolated with the output distribution from the pre-trained MT model. ",
155
+ "bbox": [
156
+ 174,
157
+ 492,
158
+ 825,
159
+ 563
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "More specifically, given an input sequence of tokens in a source language $\\boldsymbol { s } = \\left( s _ { 1 } , \\ldots , s _ { M _ { 1 } } \\right)$ , a neural MT model outputs a sequence of tokens $t = \\left( t _ { 1 } , \\ldots , t _ { M _ { 2 } } \\right)$ in the target language. When using autoregressive decoders, the output distribution for each token $t _ { i }$ in the target sequence is conditioned on the entire source sequence as well as the previous target tokens, $p ( t _ { i } | s , t _ { 1 : i - 1 } )$ . Let $\\left( s , t _ { 1 : i - 1 } \\right)$ be the translation context and $t _ { i }$ be the target token. ",
166
+ "bbox": [
167
+ 174,
168
+ 569,
169
+ 825,
170
+ 640
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Datastore creation Our datastore is constructed offline and consists of a set of key-value pairs. The key is a high-dimensional representation of the entire translation context computed by the MT decoder, $f ( s , t _ { 1 : i - 1 } )$ , where $f$ represents a mapping from input to an intermediate representation of the decoder. The value is the corresponding ground truth target token $t _ { i }$ . For a parallel text collection $( s , \\tau )$ , the representations are generated by a single forward pass over each example and the complete datastore is defined as follows: ",
177
+ "bbox": [
178
+ 173,
179
+ 654,
180
+ 825,
181
+ 738
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "equation",
187
+ "img_path": "images/f5357ba624ce5a00f05a13ec397eee0f47d08d1ea75dc036874a5aa5e4611522.jpg",
188
+ "text": "$$\n( K , \\mathcal { V } ) = \\{ ( f ( s , t _ { 1 : i - 1 } ) , \\ t _ { i } ) , \\ \\forall t _ { i } \\in t \\mid ( s , t ) \\in ( S , T ) \\}\n$$",
189
+ "text_format": "latex",
190
+ "bbox": [
191
+ 316,
192
+ 741,
193
+ 681,
194
+ 758
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "Tokens from the source language are not stored directly as values in the datastore. Conditioning on the source is implicit via the keys, and the values are only target language tokens. ",
201
+ "bbox": [
202
+ 174,
203
+ 762,
204
+ 823,
205
+ 790
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "Generation At test time, given a source $x$ , the model outputs a distribution over the vocabulary $p _ { M T } ( y _ { i } | x , \\hat { y } _ { 1 : i - 1 } )$ for the target $y _ { i }$ at every step of generation, where $\\hat { y }$ represents the generated tokens. The model also outputs the representation $f ( x , \\hat { y } _ { 1 : i - 1 } )$ , which is used to query the datastore for the $k$ nearest neighbors $\\mathcal { N }$ according to squared- $L ^ { 2 }$ distance, $d$ . In practice, the search over billions of key-value pairs is carried out using FAISS (Johnson et al., 2017), a library for fast nearest neighbor search in high-dimensional spaces. ",
212
+ "bbox": [
213
+ 173,
214
+ 804,
215
+ 825,
216
+ 888
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "The retrieved set is converted into a distribution over the vocabulary by applying a softmax with temperature $T$ to the negative distances and aggregating over multiple occurrences of the same vocabulary item. Using a temperature greater than one flattens the distribution, and prevents overfitting to the most similar retrievals. ",
223
+ "bbox": [
224
+ 174,
225
+ 895,
226
+ 823,
227
+ 924
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "",
234
+ "bbox": [
235
+ 171,
236
+ 103,
237
+ 823,
238
+ 132
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "equation",
244
+ "img_path": "images/84aad7135ccff9fe33818b0517a5def1faf3b3778bc796d4a7c37898510181cc.jpg",
245
+ "text": "$$\np _ { \\mathrm { k N N } } ( y _ { i } | x , \\hat { y } _ { 1 : i - 1 } ) \\propto \\sum _ { ( k _ { j } , v _ { j } ) \\in N } \\mathbb { 1 } _ { y _ { i } = v _ { j } } \\exp \\left( \\frac { - d ( k _ { j } , f ( x , \\hat { y } _ { 1 : i - 1 } ) ) } { T } \\right)\n$$",
246
+ "text_format": "latex",
247
+ "bbox": [
248
+ 274,
249
+ 135,
250
+ 722,
251
+ 178
252
+ ],
253
+ "page_idx": 2
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "While a pure $k \\mathbf { N N }$ approach is effective, we improve results by interpolating with the base model distribution, which is more robust in cases without relevant cached examples. The model and $k \\mathbf { N N }$ distributions are interpolated with a tuned parameter $\\lambda$ , resulting in the final $k$ NN-MT distribution: ",
258
+ "bbox": [
259
+ 174,
260
+ 190,
261
+ 825,
262
+ 233
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "equation",
268
+ "img_path": "images/339e767a8fc160f109859447be16d050e9c88d0aaa6bfa252036c719ad0df8d7.jpg",
269
+ "text": "$$\np ( y _ { i } | x , \\hat { y } _ { 1 : i - 1 } ) = \\lambda p _ { \\mathrm { k N N } } ( y _ { i } | x , \\hat { y } _ { 1 : i - 1 } ) + ( 1 - \\lambda ) p _ { \\mathrm { M T } } ( y _ { i } | x , \\hat { y } _ { 1 : i - 1 } )\n$$",
270
+ "text_format": "latex",
271
+ "bbox": [
272
+ 277,
273
+ 238,
274
+ 720,
275
+ 256
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "The complete translation is generated using beam search. ",
282
+ "bbox": [
283
+ 174,
284
+ 270,
285
+ 549,
286
+ 285
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "kNN-MT vs. kNN-LM kNN-MT is a generalization of kNN-LM applied to conditional sequence generation, with a few important differences. First, the keys are not only conditioned on prior context, but also on the source sequence (here, in a different language). This means that the representations must encode both source and target context; we show examples in Section 6. Second, there is an additional tuned parameter, the softmax temperature. Higher temperatures flatten the distribution and allow for greater diversity without overfitting to the retrieved contexts, as shown in Section 6. ",
293
+ "bbox": [
294
+ 174,
295
+ 297,
296
+ 825,
297
+ 383
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "3 EXPERIMENTAL SETUP ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 176,
307
+ 402,
308
+ 398,
309
+ 419
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "We experiment with kNN-MT in three settings: (1) single language-pair translation, (2) multilingual MT and (3) domain adaptation. ",
316
+ "bbox": [
317
+ 174,
318
+ 434,
319
+ 825,
320
+ 463
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Data We use the following datasets for training and evaluation. ",
327
+ "bbox": [
328
+ 173,
329
+ 478,
330
+ 599,
331
+ 492
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "WMT’19: For the single language-pair experiments, we use WMT’19 data for German-English. ",
338
+ "bbox": [
339
+ 174,
340
+ 500,
341
+ 805,
342
+ 513
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "CCMATRIX: We train our multilingual model on CCMatrix (Schwenk et al., 2019), containing parallel data for 79 languages and 1,546 language pairs. The parallel sentences are mined from cleaned monolingual commoncrawl data created using the ccNet pipeline (Wenzek et al., 2019). Semantically similar sentences in different languages are aligned using a learned distance measure; we use examples where the distance measure is at least 1.06, resulting in 4 billion sentence-pairs. ",
349
+ "bbox": [
350
+ 174,
351
+ 521,
352
+ 825,
353
+ 590
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "NEWSTEST: The newstest2018 and newstest2019 test sets from WMT (Bojar et al., 2018; Barrault et al., 2019) are used as validation and test sets for the multilingual experiments. The same GermanEnglish validation and test sets are also used for evaluation in the single language-pair and domain adaptation experiments. ",
360
+ "bbox": [
361
+ 173,
362
+ 597,
363
+ 825,
364
+ 654
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "TED TALKS: We use the Ted Talks data prepared by Qi et al. (2018) for evaluation in the multilingual setting, particularly to explore performance for language pairs that do no include English. ",
371
+ "bbox": [
372
+ 176,
373
+ 660,
374
+ 823,
375
+ 689
376
+ ],
377
+ "page_idx": 2
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "MULTI-DOMAINS: We use the multi-domains dataset (Koehn & Knowles, 2017), re-split by Aharoni & Goldberg (2020) for the domain adaptation experiments. It includes German-English parallel data for train/validation/test sets in five domains: Medical, Law, IT, Koran and Subtitles. ",
382
+ "bbox": [
383
+ 174,
384
+ 695,
385
+ 825,
386
+ 738
387
+ ],
388
+ "page_idx": 2
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "Models For the single language-pair and domain adaptation experiments, we use the WMT’19 German-English news translation task winner ( $\\mathrm { N g }$ et al., 2019), available via the FAIRSEQ library (Ott et al., 2019).1 It is a Transformer encoder-decoder model (Vaswani et al., 2017) with 6 layers, 1,024 dimensional representations, 8,192 dimensional feedforward layers and 8 attention heads. Apart from WMT’19 training data, this model is trained on over 10 billion tokens of backtranslation data and fine-tuned on newstest test sets from years prior to 2018. In this work, we do not use ensembles or $n$ -best reranking. ",
393
+ "bbox": [
394
+ 174,
395
+ 753,
396
+ 825,
397
+ 851
398
+ ],
399
+ "page_idx": 2
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "For multilingual MT, we trained a 418M parameter Transformer-based encoder-decoder model on the CCMatrix data for 100K updates. The model has embedding dimension 1,024, hidden dimension 4,096, 12 layers in both the encoder and decoder, with 16 attention heads. To balance the training of different language pairs, which have various resource levels, we apply temperature upsampling with $T = 5$ (Arivazhagan et al., 2019). The vocabulary is shared across all languages and consists of 128K subwords extracted using sentencepiece (Kudo & Richardson, 2018).2 All results use case-sensitive detokenized BLEU, measured using SACREBLEU (Post, 2018).We provide the SACREBLEU signatures, along with details on the statistical power of our experiments, in Appendix C. ",
404
+ "bbox": [
405
+ 176,
406
+ 858,
407
+ 823,
408
+ 900
409
+ ],
410
+ "page_idx": 2
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "",
415
+ "bbox": [
416
+ 174,
417
+ 103,
418
+ 823,
419
+ 186
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "kNN-MT In this work, we use a FAISS index to represent the datastore and search for nearest neighbors. The keys are stored in clusters to speed up search and quantized to 64-bytes for space efficiency (the full-precision keys are discarded). The index is constructed offline via a single forward pass over every example in the given parallel text collection. We use the 1024-dimensional representation input to the final layer feedforward network as the key. Building the index involves a training phase to learn the cluster centroids. We use 5M keys for learning 131K cluster centroids for the multilingual experiments, and 1M keys for 4K clusters for in-domain data in the domain adaptation experiments. During inference, we query the datastore for 64 neighbors while searching 32 clusters. The interpolation and softmax temperature parameters are tuned on the validation sets.3 ",
426
+ "bbox": [
427
+ 174,
428
+ 202,
429
+ 825,
430
+ 327
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "Computational Cost While kNN-MT does not add trainable model parameters, it does add some computational overhead. The primary cost of building the datastore is a single forward pass over all examples in the datastore, which is a fraction of the cost for training on the same examples for one epoch. During inference, retrieving 64 keys from a datastore containing billions of items results in a generation speed that is two orders of magnitude slower than the base MT system. Generation speed can be improved by searching fewer clusters, using smaller beams, or querying smaller datastores, with relatively minor trade-offs in performance, as we will see in Section 5. Developing faster nearest neighbor search tools remains an active area of research (Guo et al., 2020). ",
437
+ "bbox": [
438
+ 174,
439
+ 342,
440
+ 825,
441
+ 453
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "4 EXPERIMENTS ",
448
+ "text_level": 1,
449
+ "bbox": [
450
+ 176,
451
+ 473,
452
+ 326,
453
+ 489
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "4.1 SINGLE LANGUAGE-PAIR TRANSLATION",
460
+ "text_level": 1,
461
+ "bbox": [
462
+ 176,
463
+ 505,
464
+ 496,
465
+ 518
466
+ ],
467
+ "page_idx": 3
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "To test whether kNN-MT can improve a model’s ability to generalize from its training data, we first apply it to a state-of-the-art translation model, using a datastore containing only the original training set. We use a state-of-the-art German-English model as our base MT system, which scores 37.59 BLEU on the newstest2019 test set.4 This is a highly competitive baseline – apart from the WMT’19 training data, the base model has also been trained on over 10 billion tokens of extra backtranslation data as well as fine-tuned on newstest test sets from previous years. Providing this heavily tuned base model with a datastore containing about 770M tokens of WMT’19 training data improves performance by 1.5 BLEU to 39.08, without any additional training. This result shows that even very strong translation models can be improved with test-time access to training sets. ",
472
+ "bbox": [
473
+ 174,
474
+ 530,
475
+ 825,
476
+ 655
477
+ ],
478
+ "page_idx": 3
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "4.2 MULTILINGUAL MACHINE TRANSLATION ",
483
+ "text_level": 1,
484
+ "bbox": [
485
+ 174,
486
+ 672,
487
+ 503,
488
+ 686
489
+ ],
490
+ "page_idx": 3
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Next, we apply $k \\mathrm { N N - M T }$ to multilingual machine translation, to measure its ability to add capacity to a model when using very large training sets. For these experiments, we create datastores using subsets of the CCMatrix parallel data that the model has been trained on. ",
495
+ "bbox": [
496
+ 176,
497
+ 699,
498
+ 825,
499
+ 739
500
+ ],
501
+ "page_idx": 3
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "Retrieving neighbors from same source language data Here, we build one datastore per language-pair being tested, using the training examples for that language-pair. Table 1 shows performance for the baseline and $k \\mathrm { N N - M T }$ on 17 language-pairs from newstest2019. Retrieving neighbors results in up to 3 BLEU improvements for English-German, English-Chinese and Chinese-English, with an average improvement of 1.4 BLEU across all 17 pairs, without any additional training. ",
506
+ "bbox": [
507
+ 174,
508
+ 756,
509
+ 823,
510
+ 825
511
+ ],
512
+ "page_idx": 3
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "Table 1 also shows the sizes of each of the datastores. Datastore size and the increase in BLEU are only weakly correlated across languages, though within a language, a larger datastore is decidedly better, as shown in Section 5. This suggests that underlying factors, such as the quality of the parallel data used to populate the datastore, may also factor into the size of the improvements from $k$ NN-MT. ",
517
+ "bbox": [
518
+ 176,
519
+ 832,
520
+ 820,
521
+ 861
522
+ ],
523
+ "page_idx": 3
524
+ },
525
+ {
526
+ "type": "table",
527
+ "img_path": "images/72d8a278cbb129abd9187f3c258b785f290f66f7123b95dfbe6d12c289ab8319.jpg",
528
+ "table_caption": [
529
+ "Table 1: Multilingual machine translation with $k \\mathrm { N N - M T }$ All test sets are from newstest2019, except ja-en/en-ja which are from newstest2020. Adding $k \\mathrm { N N - M T }$ increases BLEU scores in all cases, and by over 3 points for en-de, zh-en and en-zh. Bold scores indicate significant results based on statistically powered experiments (Card et al., 2020). "
530
+ ],
531
+ "table_footnote": [],
532
+ "table_body": "<table><tr><td>Test set sizes</td><td>de-en 2,000</td><td>ru-en 2,000</td><td>zh-en 2,000</td><td>ja-en 993</td><td>fi-en 1,996</td><td>lt-en 1,000</td><td>de-fr 1,701</td><td>de-cs 1,997</td><td>en-cs 2,000</td></tr><tr><td>Base MT +kNN-MT</td><td>34.45 35.74</td><td>36.42 37.83</td><td>24.23 27.51</td><td>12.79 13.14</td><td>25.92 26.55</td><td>29.59 29.98</td><td>32.75 33.68</td><td>21.15 21.62</td><td>22.78 23.76</td></tr><tr><td>Datastore Size</td><td>5.56B</td><td>3.80B</td><td>1.19B</td><td>360M</td><td>318M</td><td>168M</td><td>4.21B</td><td>696M</td><td>533M</td></tr><tr><td>Test set sizes</td><td>en-de 1,997</td><td>en-ru 1,997</td><td>en-zh 1,997</td><td>en-ja 1,000</td><td>en-fi 1,997</td><td>en-lt 998</td><td>fr-de 1,701</td><td>cs-de 1,997</td><td>Avg. 1</td></tr><tr><td>Base MT +kNN-MT</td><td>36.47</td><td>26.28</td><td>30.22</td><td>21.35</td><td>21.37</td><td>17.41</td><td>26.04</td><td>22.78</td><td>26.00 27.40</td></tr><tr><td>Datastore Size</td><td>39.49 6.50B</td><td>27.91 4.23B</td><td>33.63 1.13B</td><td>23.23 433M</td><td>22.20 375M</td><td>18.25 204M</td><td>27.81 3.98B</td><td>23.55 689M</td><td>1</td></tr></table>",
533
+ "bbox": [
534
+ 174,
535
+ 101,
536
+ 823,
537
+ 285
538
+ ],
539
+ "page_idx": 4
540
+ },
541
+ {
542
+ "type": "table",
543
+ "img_path": "images/b5694d2a21ee6fdec4ab2d43b8b2ec473fb204c592a569633c1b625bead70a7b.jpg",
544
+ "table_caption": [
545
+ "Table 2: Adding datastores with English source-side data can improve translation from other languages by an average of 1 BLEU, suggesting that our representations generalize over different source langauges. The model’s representations of the source generalize across languages and make crosslingual retrieval effective. "
546
+ ],
547
+ "table_footnote": [],
548
+ "table_body": "<table><tr><td></td><td colspan=\"5\">Ted Talks</td><td colspan=\"3\">Newstest2019</td><td>Avg.</td></tr><tr><td>Test set sizes</td><td>de-ja 4,442</td><td>ru-ja 5,090</td><td>uk-ja 3,560</td><td>de-ru 4,288</td><td>de-zh 4,349</td><td>fr-de 1,701</td><td>cs-de 1,997</td><td>de-cs 1,997</td><td>1</td></tr><tr><td>Base MT</td><td>10.11</td><td>9.69</td><td>8.36</td><td>17.24</td><td>20.48</td><td>26.04</td><td>22.78</td><td>21.15</td><td>16.98</td></tr><tr><td>+kNN-MT (en-*)</td><td>11.08</td><td>10.42</td><td>9.64</td><td>18.02</td><td>21.22</td><td>27.85</td><td>23.71</td><td>21.74</td><td>17.96</td></tr><tr><td>Datastore Size</td><td>433M</td><td>433M</td><td>433M</td><td>4.23B</td><td>1.13B</td><td>6.50B</td><td>6.50B</td><td>533M</td><td>1</td></tr></table>",
549
+ "bbox": [
550
+ 173,
551
+ 368,
552
+ 838,
553
+ 474
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "",
560
+ "bbox": [
561
+ 174,
562
+ 570,
563
+ 823,
564
+ 599
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "Finally, we also observe that improvements for languages translated into English, on average 1.23 BLEU, are lower than improvements for languages translated from English, on average 1.94 BLEU. As English is the most frequent language in the base model’s training data, this suggests that kNNMT is particularly useful for improving decoders in languages that may be underfit during training. ",
571
+ "bbox": [
572
+ 174,
573
+ 606,
574
+ 823,
575
+ 662
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "Retrieving neighbors using English as the source language Here, we construct datastores from training examples where English is the source language, and the target language is the language being tested. This setting is useful for rarer language pairs with less bi-text, and is related to pivoting (Utiyama & Isahara, 2007; Cohn & Lapata, 2007). Table 2 shows that on five pairs from the Ted Talks data and three from newstest2019, we find that kNN-MT improves performance by 1 BLEU on average. This result shows that the model’s representations of the source generalize well enough across languages to make cross-lingual retrieval effective. Further investigation is needed to study the extent to which multilingual representations from related and unrelated languages can improve translation performance via $k \\mathrm { N N - M T }$ . ",
582
+ "bbox": [
583
+ 174,
584
+ 681,
585
+ 825,
586
+ 805
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "4.3 DOMAIN ADAPTATION ",
593
+ "text_level": 1,
594
+ "bbox": [
595
+ 176,
596
+ 827,
597
+ 370,
598
+ 840
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "We also measure the effectiveness of kNN-MT for domain adaptation, in which we use a domainspecific datastore to adapt the model, without further training. For these experiments, we use the German-English translation model from Section 4.1 as our base MT system and provide domainspecific data in the datastores. We also explore the effects of retrieving neighbors from a large amount of out-of-domain data as well as from a single multi-domain datastore. ",
605
+ "bbox": [
606
+ 174,
607
+ 853,
608
+ 823,
609
+ 924
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "table",
615
+ "img_path": "images/f76678d9e136b82f35983e81e76fe6881d314a201492125ddfa207c61811a6d0.jpg",
616
+ "table_caption": [
617
+ "Table 3: Domain adaptation using kNN-MT. The base MT system is trained on WMT’19 data which is also treated as the in-domain data for newstest2019. kNN-MT improves the base model by an average of 9.2 BLEU, without training, to achieve the best reported results on this task. "
618
+ ],
619
+ "table_footnote": [],
620
+ "table_body": "<table><tr><td></td><td>Newstest 2019</td><td>Medical</td><td>Law</td><td>IT</td><td>Koran</td><td>Subtitles</td><td>Avg.</td></tr><tr><td>Test set sizes</td><td>2,000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>2.000</td><td>-</td></tr><tr><td>Aharoni &amp; Goldberg (2020): one model per domain</td><td></td><td>56.5</td><td>59.0</td><td>43.0</td><td>15.9</td><td>27.3</td><td>40.34</td></tr><tr><td>one model for all domains</td><td></td><td>53.3</td><td>57.2</td><td>42.1</td><td>20.9</td><td>27.6</td><td>40.22</td></tr><tr><td>best data selection method</td><td>-</td><td>54.8</td><td>58.8</td><td>43.5</td><td>21.8</td><td>27.4</td><td>41.26</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Base MT +kNN-MT:</td><td>37.59</td><td>39.91</td><td>45.71</td><td>37.98</td><td>16.30</td><td>29.21</td><td>33.82</td></tr><tr><td>in-domain datastore</td><td>39.08</td><td>54.35</td><td>61.78</td><td>45.82</td><td>19.45</td><td>31.73</td><td>42.63</td></tr><tr><td>WMT&#x27;19 datastore</td><td>39.08</td><td>40.22</td><td>46.74</td><td>40.27</td><td>17.99</td><td>29.23</td><td>34.89</td></tr><tr><td>all-domains datastore</td><td>38.88</td><td>54.54</td><td>61.11</td><td>48.63</td><td>19.22</td><td>31.70</td><td>43.04</td></tr><tr><td>Datastore Size (in-domain)</td><td>770M</td><td>5.70M</td><td>18.3M</td><td>3.10M</td><td>450K</td><td>159M</td><td>-</td></tr></table>",
621
+ "bbox": [
622
+ 173,
623
+ 101,
624
+ 828,
625
+ 294
626
+ ],
627
+ "page_idx": 5
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "Domain-specific datastores Table 3 shows the base MT system’s in-domain performance on newstest2019, as well as zero-shot transfer to five other domains. kNN-MT significantly outperforms the base MT system in all settings. For the multi-domains dataset, kNN-MT improves the base MT model performance by an average of 9.2 BLEU, with improvements as large as 16 BLEU on Law and 14.5 BLEU on Medical, all without any further training. We also provide scores from Aharoni & Goldberg (2020) for models trained on in-domain data, those trained on all domains jointly, and those trained using the best-performing data selection method proposed by the authors. We find that kNN-MT also outperforms the best reported average on the multi-domains dataset by 1.4 BLEU. ",
632
+ "bbox": [
633
+ 173,
634
+ 376,
635
+ 825,
636
+ 488
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "Out-of-domain and multi-domain datastores Table 3 also shows performance for retrieving neighbors from 770M tokens of WMT’19 data that the model has been trained on. While the average BLEU for the multi-domain data is 1 point higher, the improvements are much smaller compared to using in-domain data. This illustrates the value of adding domain-specific data to the datastore over adding a large amount of arbitrary data. We also measure the effectiveness of building a single multi-domain datastore containing parallel data from all six settings. Performance on IT improves by 3 BLEU but scores for the other domains are mostly the same. This shows that $k \\mathrm { N N - M T }$ is robust to the presence of out-of-domain examples since retrieving neighbors from a datastore where large amounts of data is out-of-domain does not hurt performance relative to using only in-domain data. ",
643
+ "bbox": [
644
+ 174,
645
+ 507,
646
+ 825,
647
+ 632
648
+ ],
649
+ "page_idx": 5
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "5 TUNING KNN-MT ",
654
+ "text_level": 1,
655
+ "bbox": [
656
+ 176,
657
+ 655,
658
+ 359,
659
+ 671
660
+ ],
661
+ "page_idx": 5
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "We investigate how key hyperparameters affect multilingual kNN-MT on validation data. We provide validation set BLEU scores as well as hyperparameter choices for our experiments in Appendix A. ",
666
+ "bbox": [
667
+ 176,
668
+ 689,
669
+ 823,
670
+ 732
671
+ ],
672
+ "page_idx": 5
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "Softmax temperature A softmax temperature is used when estimating the nearest neighbor distribution in order to prevent the model from assigning most of the probability mass to a single neighbor, thus hurting diversity. Values greater than 1 will flatten the distribution, which can improve $k \\mathbf { N N } .$ - MT performance. Figure 2 shows that a temperature of 1 results in significantly lower BLEU scores. For all of our experiments, values of either 10 or 100 prove to be optimal. ",
677
+ "bbox": [
678
+ 174,
679
+ 751,
680
+ 823,
681
+ 820
682
+ ],
683
+ "page_idx": 5
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "Number of neighbors per query In our experiments, we fix the value of $k$ , the number of neighbors retrieved per query, to 64. For a fixed temperature and interpolation parameter, we find that performance does not improve when retrieving a larger number of neighbors, and in some cases, performance deteriorates. This suggests that retrieving more neighbors can add noise to the sequence generation process. Figure 2 shows that in some cases, performance improves when retrieving fewer neighbors, and further gains may be possible by tuning this parameter. ",
688
+ "bbox": [
689
+ 174,
690
+ 840,
691
+ 825,
692
+ 924
693
+ ],
694
+ "page_idx": 5
695
+ },
696
+ {
697
+ "type": "image",
698
+ "img_path": "images/4a894a653b5bc86d1ace69b7d9355010f59c2f95ab0e272cc0d4147ac07474f3.jpg",
699
+ "image_caption": [
700
+ "Figure 2: Effect of the number of neighbors retrieved and the softmax temperature on the validation BLEU score for en- $z h$ . Temperatures greater than 1 are important to prevent the model from overfitting to the most similar neighbor. For higher temperatures, more neighbors do not always result in improvements. "
701
+ ],
702
+ "image_footnote": [],
703
+ "bbox": [
704
+ 191,
705
+ 109,
706
+ 457,
707
+ 257
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "image",
713
+ "img_path": "images/ffebda3037765255e36913287c15f19f093247f9555a28236f8315bb31082fba.jpg",
714
+ "image_caption": [
715
+ "Figure 3: Effect of datastore size on the validation BLEU score for $r u – e n$ and $e n \\ – \\ z h$ . Performance improves monotonically with size but retrieval can be slow for datastores containing billions of tokens. Smaller datastores, which account for a large fraction of the improvement, can be used for faster retrieval. "
716
+ ],
717
+ "image_footnote": [],
718
+ "bbox": [
719
+ 526,
720
+ 109,
721
+ 785,
722
+ 257
723
+ ],
724
+ "page_idx": 6
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "Datastore size Figure 3 shows increasing the size of the datastore improves translation performance. However, larger datastores result in slower retrieval, indicating a speed-performance tradeoff. Much of the benefit can be realized with much smaller, and correspondingly faster, datastores. ",
729
+ "bbox": [
730
+ 174,
731
+ 393,
732
+ 825,
733
+ 435
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "6 QUALITATIVE ANALYSIS ",
740
+ "text_level": 1,
741
+ "bbox": [
742
+ 176,
743
+ 455,
744
+ 411,
745
+ 472
746
+ ],
747
+ "page_idx": 6
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "To better understand kNN-MT, we examine the retrievals for several examples. We use the GermanEnglish model and generate with only the $k \\mathbf { N N }$ distribution $\\lambda = 1$ ) with beam size 1, retrieving $k = 8$ neighbors from the News Commentary and Common Crawl subsets of WMT’19 data. ",
752
+ "bbox": [
753
+ 174,
754
+ 487,
755
+ 825,
756
+ 530
757
+ ],
758
+ "page_idx": 6
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Figure 4 shows an example from newstest2018 where all the retrieved neighbors map to the same target, military. Many of the retrieved examples include phrases similar to tamed the military such as Autoritat gegen ¨ uber dem Milit ¨ ar¨ , Kontrolle des Militars ¨ and das Militar gezwungen ¨ on the source side and authority over the military, control over the military and forced the military given the local target side context, but differ sharply in their longer context, often describing different nations and centuries. We provide additional examples illustrating this point in Appendix B. ",
763
+ "bbox": [
764
+ 174,
765
+ 536,
766
+ 825,
767
+ 621
768
+ ],
769
+ "page_idx": 6
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Another interesting observation is that $k \\mathbf { N N }$ , even when not interpolated with the base model, is able to reconstruct named entities that are split into multiple subword tokens, even if that particular named entity does not appear in the datastore. One such example is the name Haysom that is split into subwords Hay and som. The retrieved neighbors for the first subword token include examples that contain the names Hayes and Haydn, while those for the second include Grissom and Folsom, showing subword representations are used effectively in the nearest neighbor search. ",
774
+ "bbox": [
775
+ 174,
776
+ 627,
777
+ 825,
778
+ 712
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "7 RELATED WORK ",
785
+ "text_level": 1,
786
+ "bbox": [
787
+ 176,
788
+ 731,
789
+ 344,
790
+ 747
791
+ ],
792
+ "page_idx": 6
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "Retrieval in Translation Recent work has integrated retrieval of words and phrases into neural translation, to gain some of the advantages of the previous generation of word- and phrase-based methods (Brown et al., 1993; Koehn et al., 2003). For example, Zhang et al. (2018) proposed guiding models by retrieving $n$ -grams and up-weighting the probabilities of retrieved tokens. Tu et al. (2018) use cache-based models (Grave et al., 2017a;b) to save and retrieve translation histories, so models can adapt to changing contexts. Compared to these, kNN-MT has several advantages — for instance, the external datastore only needs to be created once, whereas the cache model requires constant writes. Further, kNN-MT scales retrieval to orders-of-magnitude larger datastores, while taking advantage of neural context representations. ",
797
+ "bbox": [
798
+ 174,
799
+ 762,
800
+ 825,
801
+ 888
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "Other work has retrieved complete example translation sentences at test time. Nagao (1984) proposed example-based MT for translating sequences by analogy. Before deep learning was widely adopted, this approach was extended to identifying portions of the training data that could be a translation based on edit distance (Doi et al., 2005), matching training examples based on local trigram contexts (van den Bosch et al., 2007), using phrase-based memories (van Gompel et al., 2010) and incorporating syntactic features when retrieving similar examples (Stroppa et al., 2007; Haque et al., 2009). Recently, Gu et al. (2018) proposed a model that retrieves examples similar to the test source sequence and then attends over this subset of retrieved source-target pairs at the token level, while generating translations. Bulte & Tezcan (2019) and $\\mathrm { X u }$ et al. (2020) use fuzzy-matching with translation memories and augment source sequences with retrieved source-target pairs. These techniques face challenges in identifying relevant retrieval candidates, as they focus on sentence-level retrieval. In contrast, kNN-MT focuses on token level retrieval from billions of key-value pairs, meaning that each word can retrieve the most relevant examples for its translation. ",
808
+ "bbox": [
809
+ 174,
810
+ 895,
811
+ 821,
812
+ 924
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "table",
818
+ "img_path": "images/b0c064f07c0b3808598b641df9f86b4812b89dc790b092c99f30b19cefd8ffe4.jpg",
819
+ "table_caption": [
820
+ "Figure 4: Example retrievals using kNN-MT. Not only do the retrievals all correctly predict the target word military, but the local contexts tend to be semantically related. Both the source and the three nearest retrievals express the concept of control over the military. "
821
+ ],
822
+ "table_footnote": [],
823
+ "table_body": "<table><tr><td colspan=\"3\">TestInput:Dabei schien es,als habe Erdogan das Militar gezahmt. Generated tokens: In doing so,it seems as if Erdogan has tamed the</td></tr><tr><td colspan=\"2\">Training Set Translation Context (source and target)</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Dem charismatischen Minis- terpräsidenten Recep Tayyip Erdogan,der drei aufeinanderfol- gendeWahlen fiirsich entscheiden konnte,ist es gelungenseine Autoritit gegeniiberdemMilitir</td><td>The charismatic prime minister, Re- cep Tayyip Erdogan,having won three consecutive elections, has been able to exert his authority over the</td><td>military</td><td>0.132</td></tr><tr><td>geltend zu machen. Ein bemerkenswerter Fall war die Ermordung des gemiβigten Pre-</td><td>One notable case was the assas- sination of moderate Prime Minis- terInukai Tsuyoshi in1932,which</td><td>military</td><td>0.130</td></tr><tr><td>mierministersInukaiTsuyoshi imJahre 1932, diedas Endejederwirklichenzivilen Kontrolle desMilitarsmarkiert. Siesind Teil eines Normal- isierungsprozesses und der Her-</td><td>marked theendofanyrealcivilian control ofthe They are part of a process of nor- malization,of the establishment of</td><td>military</td><td>0.129</td></tr><tr><td>stellung der absoluten zivilen Kontrolle iber dasMilitär und bestätigendasPrinzip, dass niemand iiber dem Gesetz steht.</td><td>absolute civilian control of the</td><td></td><td></td></tr><tr><td>Diese hart formulierte Erklarung wurdeals verschleierte,jedoch un- missverstandliche Warnung ange- sehen,dass das Militir bereit wire einzuschreiten...</td><td>That toughly worded statement was seenasa veiled but unmistakable warning that the</td><td>military</td><td>0.123</td></tr><tr><td colspan=\"2\">… Final kNN distribution:military = 1.0 Final Translation: In doing so, Erdogan seemed to have tamed the military. Reference: In doing so, it seems as if Erdogan has tamed the military.</td><td></td><td></td></tr></table>",
824
+ "bbox": [
825
+ 179,
826
+ 101,
827
+ 825,
828
+ 555
829
+ ],
830
+ "page_idx": 7
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "",
835
+ "bbox": [
836
+ 174,
837
+ 637,
838
+ 825,
839
+ 789
840
+ ],
841
+ "page_idx": 7
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "Finally, various studies have explored retrieving additional information to improve domain adaptation, often using lexicons (Hu et al., 2019), domain-adaptive training (Farajian et al., 2017) or attending over neighbors similar to $n$ -grams in the source (Bapna & Firat, 2019). These modifications require additional training, whereas kNN-MT provides the flexibility to use different datastores when decoding in different domains, keeping the model fixed. ",
846
+ "bbox": [
847
+ 174,
848
+ 796,
849
+ 823,
850
+ 866
851
+ ],
852
+ "page_idx": 7
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "Retrieval in Text Generation Retrieval mechanisms have also been applied to generation tasks more broadly. Weston et al. (2018) and Fan et al. (2020) improve dialogue response generation systems by retrieving examples and concatenating them to model inputs. Lewis et al. (2020) improve open-domain question answering systems by retrieving relevant contexts from Wikipedia and concatenating them to the inputs. Hashimoto et al. (2018) use a retrieve-and-edit framework to generate structured outputs such as code, by jointly training the editor and retriever. For $k \\mathrm { N N - M T }$ , retrieval results in a distribution over the vocabulary that is used for generation directly and does not require further training or providing the retrieval candidates as input. ",
857
+ "bbox": [
858
+ 176,
859
+ 882,
860
+ 823,
861
+ 924
862
+ ],
863
+ "page_idx": 7
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "",
868
+ "bbox": [
869
+ 174,
870
+ 103,
871
+ 825,
872
+ 174
873
+ ],
874
+ "page_idx": 8
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "8 CONCLUSION ",
879
+ "text_level": 1,
880
+ "bbox": [
881
+ 176,
882
+ 193,
883
+ 318,
884
+ 209
885
+ ],
886
+ "page_idx": 8
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "We introduced a simple and effective method that can be applied to any neural MT model without further training. We show that similar contexts in a model’s embedding space are more likely to be followed by similar next words, allowing the model to be improved by interpolation with a nearest neighbor classifier. The approach improves a state-of-the-art model in-domain, leads to large gains out-of-domain, and can specialize a multilingual model for specific language-pairs. Future work should improve efficiency, for example by down-sampling frequent target words in the datastore. ",
891
+ "bbox": [
892
+ 174,
893
+ 223,
894
+ 825,
895
+ 308
896
+ ],
897
+ "page_idx": 8
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "ACKNOWLEDGMENTS ",
902
+ "text_level": 1,
903
+ "bbox": [
904
+ 176,
905
+ 323,
906
+ 326,
907
+ 335
908
+ ],
909
+ "page_idx": 8
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "The authors thank Kartikay Khandelwal for thoughtful discussions, Holger Schwenk and Sergey Edunov for sharing data and model details, and Matthijs Douze for answering questions about FAISS. ",
914
+ "bbox": [
915
+ 176,
916
+ 345,
917
+ 823,
918
+ 375
919
+ ],
920
+ "page_idx": 8
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "REFERENCES ",
925
+ "text_level": 1,
926
+ "bbox": [
927
+ 176,
928
+ 393,
929
+ 285,
930
+ 409
931
+ ],
932
+ "page_idx": 8
933
+ },
934
+ {
935
+ "type": "text",
936
+ "text": "Roee Aharoni and Yoav Goldberg. Unsupervised domain clusters in pretrained language models. In Association of Computational Linguistics (ACL), 2020. ",
937
+ "bbox": [
938
+ 173,
939
+ 416,
940
+ 823,
941
+ 445
942
+ ],
943
+ "page_idx": 8
944
+ },
945
+ {
946
+ "type": "text",
947
+ "text": "Naveen Arivazhagan, Ankur Bapna, Orhan Firat, Dmitry Lepikhin, Melvin Johnson, Maxim Krikun, Mia Xu Chen, Yuan Cao, George Foster, Colin Cherry, et al. Massively multilingual neural machine translation in the wild: Findings and challenges. arXiv preprint arXiv:1907.05019, 2019. ",
948
+ "bbox": [
949
+ 174,
950
+ 452,
951
+ 825,
952
+ 507
953
+ ],
954
+ "page_idx": 8
955
+ },
956
+ {
957
+ "type": "text",
958
+ "text": "Ankur Bapna and Orhan Firat. Non-parametric adaptation for neural machine translation. In North American Association of Computational Linguistics (NAACL), 2019. ",
959
+ "bbox": [
960
+ 171,
961
+ 515,
962
+ 825,
963
+ 545
964
+ ],
965
+ "page_idx": 8
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "Lo¨ıc Barrault, Ondˇrej Bojar, Marta R. Costa-jussa, Christian Federmann, Mark Fishel, Yvette \\` Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, Christof Monz, Mathias Muller, Santanu Pal, Matt Post, and Marcos Zampieri. Findings of the 2019 con- ¨ ference on machine translation (WMT19). In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pp. 1–61, Florence, Italy, August 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-5301. URL https://www.aclweb.org/anthology/W19-5301. ",
970
+ "bbox": [
971
+ 173,
972
+ 551,
973
+ 825,
974
+ 648
975
+ ],
976
+ "page_idx": 8
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "Ondˇrej Bojar, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Philipp Koehn, and Christof Monz. Findings of the 2018 conference on machine translation (WMT18). In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pp. 272–303, Belgium, Brussels, October 2018. Association for Computational Linguistics. doi: 10.18653/v1/ W18-6401. URL https://www.aclweb.org/anthology/W18-6401. ",
981
+ "bbox": [
982
+ 173,
983
+ 655,
984
+ 825,
985
+ 727
986
+ ],
987
+ "page_idx": 8
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "Peter F Brown, Stephen A Della Pietra, Vincent J Della Pietra, and Robert L Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational linguistics, 19(2): 263–311, 1993. ",
992
+ "bbox": [
993
+ 174,
994
+ 733,
995
+ 825,
996
+ 775
997
+ ],
998
+ "page_idx": 8
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Bram Bulte and Arda Tezcan. Neural fuzzy repair: Integrating fuzzy matches into neural machine translation. In Association of Computational Linguistics (ACL), 2019. ",
1003
+ "bbox": [
1004
+ 173,
1005
+ 782,
1006
+ 823,
1007
+ 811
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "Dallas Card, Peter Henderson, Urvashi Khandelwal, Robin Jia, Kyle Mahowald, and Dan Jurafsky. With little power comes great responsibility. In Empirical Methods in Natural Language Processing (EMNLP), 2020. ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 818,
1017
+ 823,
1018
+ 861
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "Trevor Cohn and Mirella Lapata. Machine translation by triangulation: Making effective use of multi-parallel corpora. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pp. 728–735, Prague, Czech Republic, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P07-1092. ",
1025
+ "bbox": [
1026
+ 176,
1027
+ 867,
1028
+ 823,
1029
+ 924
1030
+ ],
1031
+ "page_idx": 8
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Takao Doi, Hirofumi Yamamoto, and Eiichiro Sumita. Example-based machine translation using efficient sentence retrieval based on edit-distance. ACM Transactions on Asian Language Information Processing, 4(4):377–399, 2005. ",
1036
+ "bbox": [
1037
+ 174,
1038
+ 103,
1039
+ 823,
1040
+ 146
1041
+ ],
1042
+ "page_idx": 9
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Angela Fan, Claire Gardent, Chloe Braud, and Antoine Bordes. Augmenting transformers with knn-based composite memory for dialogue. arXiv preprint arXiv:2004.12744, 2020. ",
1047
+ "bbox": [
1048
+ 169,
1049
+ 155,
1050
+ 823,
1051
+ 184
1052
+ ],
1053
+ "page_idx": 9
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "M Amin Farajian, Marco Turchi, Matteo Negri, and Marcello Federico. Multi-domain neural machine translation through unsupervised adaptation. In Proceedings of the Second Conference on Machine Translation, pp. 127–137, 2017. ",
1058
+ "bbox": [
1059
+ 174,
1060
+ 191,
1061
+ 823,
1062
+ 236
1063
+ ],
1064
+ "page_idx": 9
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Edouard Grave, Moustapha M Cisse, and Armand Joulin. Unbounded cache model for online language modeling with open vocabulary. In NIPS, pp. 6042–6052, 2017a. ",
1069
+ "bbox": [
1070
+ 171,
1071
+ 243,
1072
+ 823,
1073
+ 273
1074
+ ],
1075
+ "page_idx": 9
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. In International Conference on Learning Representations (ICLR), 2017b. ",
1080
+ "bbox": [
1081
+ 173,
1082
+ 281,
1083
+ 821,
1084
+ 310
1085
+ ],
1086
+ "page_idx": 9
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. Search engine guided neural machine translation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. ",
1091
+ "bbox": [
1092
+ 173,
1093
+ 319,
1094
+ 821,
1095
+ 348
1096
+ ],
1097
+ "page_idx": 9
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, and Sanjiv Kumar. Accelerating large-scale inference with anisotropic vector quantization. In International Conference on Machine Learning (ICML), 2020. ",
1102
+ "bbox": [
1103
+ 174,
1104
+ 356,
1105
+ 823,
1106
+ 400
1107
+ ],
1108
+ "page_idx": 9
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. arXiv preprint arXiv:2002.08909, 2020. ",
1113
+ "bbox": [
1114
+ 173,
1115
+ 407,
1116
+ 820,
1117
+ 438
1118
+ ],
1119
+ "page_idx": 9
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Rejwanul Haque, Sudip Naskar, Yanjun Ma, and Andy Way. Using supertags as source language context in smt. 13th Annual Conference of the European Association for Machine Translation, (EAMT), 01 2009. ",
1124
+ "bbox": [
1125
+ 173,
1126
+ 445,
1127
+ 823,
1128
+ 488
1129
+ ],
1130
+ "page_idx": 9
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "Tatsunori B. Hashimoto, Kelvin Guu, Yonatan Oren, and Percy Liang. A retrieve-and-edit framework for predicting structured outputs. In Advances in Neural Information Processing Systems (NeurIPS), 2018. ",
1135
+ "bbox": [
1136
+ 174,
1137
+ 497,
1138
+ 823,
1139
+ 540
1140
+ ],
1141
+ "page_idx": 9
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Junjie Hu, Mengzhou Xia, Graham Neubig, and Jaime G Carbonell. Domain adaptation of neural machine translation by lexicon induction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2989–3001, 2019. ",
1146
+ "bbox": [
1147
+ 171,
1148
+ 547,
1149
+ 825,
1150
+ 592
1151
+ ],
1152
+ "page_idx": 9
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017. ",
1157
+ "bbox": [
1158
+ 173,
1159
+ 599,
1160
+ 823,
1161
+ 630
1162
+ ],
1163
+ "page_idx": 9
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. Generalization through memorization: Nearest neighbor language models. In International Conference on Learning Representations (ICLR), 2020. ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 637,
1171
+ 823,
1172
+ 680
1173
+ ],
1174
+ "page_idx": 9
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "Philipp Koehn and Rebecca Knowles. Six challenges for neural machine translation. In First Workshop on Neural Machine Translation (WNMT), 2017. ",
1179
+ "bbox": [
1180
+ 169,
1181
+ 689,
1182
+ 823,
1183
+ 718
1184
+ ],
1185
+ "page_idx": 9
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Philipp Koehn, Franz J Och, and Daniel Marcu. Statistical phrase-based translation. Technical report, UNIVERSITY OF SOUTHERN CALIFORNIA MARINA DEL REY INFORMATION SCIENCES INST, 2003. ",
1190
+ "bbox": [
1191
+ 176,
1192
+ 727,
1193
+ 823,
1194
+ 770
1195
+ ],
1196
+ "page_idx": 9
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In Empirical Methods in Natural Language Processing: System Demonstrations (EMNLP), 2018. ",
1201
+ "bbox": [
1202
+ 176,
1203
+ 779,
1204
+ 823,
1205
+ 821
1206
+ ],
1207
+ "page_idx": 9
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen tau Yih, Tim Rockt ¨ aschel, Sebastian Riedel, and ¨ Douwe Kiela. Retrieval-augmented generation for knowledge-intensive nlp tasks. arXiv preprint arXiv:2005.11401, 2020. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 829,
1215
+ 825,
1216
+ 886
1217
+ ],
1218
+ "page_idx": 9
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "Makoto Nagao. A framework of a mechanical translation between japanese and english by analogy principle. In Artificial and human intelligence, 1984. ",
1223
+ "bbox": [
1224
+ 171,
1225
+ 895,
1226
+ 820,
1227
+ 924
1228
+ ],
1229
+ "page_idx": 9
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, and Sergey Edunov. Facebook fair’s wmt19 news translation task submission. In Fourth Conference on Machine Translation (WMT), 2019. ",
1234
+ "bbox": [
1235
+ 173,
1236
+ 103,
1237
+ 823,
1238
+ 145
1239
+ ],
1240
+ "page_idx": 10
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In North American Association of Computational Linguistics: System Demonstrations (NAACL), 2019. ",
1245
+ "bbox": [
1246
+ 176,
1247
+ 155,
1248
+ 823,
1249
+ 198
1250
+ ],
1251
+ "page_idx": 10
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "Matt Post. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pp. 186–191, Belgium, Brussels, October 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/ W18-6319. ",
1256
+ "bbox": [
1257
+ 173,
1258
+ 205,
1259
+ 826,
1260
+ 262
1261
+ ],
1262
+ "page_idx": 10
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Ye Qi, Devendra Sachan, Matthieu Felix, Sarguna Padmanabhan, and Graham Neubig. When and why are pre-trained word embeddings useful for neural machine translation? In North American Association of Computational Linguistics (NAACL), 2018. ",
1267
+ "bbox": [
1268
+ 174,
1269
+ 272,
1270
+ 826,
1271
+ 315
1272
+ ],
1273
+ "page_idx": 10
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Holger Schwenk, Guillaume Wenzek, Sergey Edunov, Edouard Grave, and Armand Joulin. Ccmatrix: Mining billions of high-quality parallel sentences on the web. arXiv preprint arXiv:1911.04944, 2019. ",
1278
+ "bbox": [
1279
+ 174,
1280
+ 323,
1281
+ 825,
1282
+ 366
1283
+ ],
1284
+ "page_idx": 10
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Nicolas Stroppa, Antal van den Bosch, and Andy Way. Exploiting source similarity for smt using context-informed features. Proceedings of The 11th Conference on Theoretical and Methodological Issues in Machine Translation, 01 2007. ",
1289
+ "bbox": [
1290
+ 173,
1291
+ 375,
1292
+ 825,
1293
+ 417
1294
+ ],
1295
+ "page_idx": 10
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Zhaopeng Tu, Yang Liu, Shuming Shi, and Tong Zhang. Learning to remember translation history with a continuous cache. In Transactions of the Association of Computational Linguistics (TACL), 2018. ",
1300
+ "bbox": [
1301
+ 174,
1302
+ 426,
1303
+ 823,
1304
+ 469
1305
+ ],
1306
+ "page_idx": 10
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Masao Utiyama and Hitoshi Isahara. A comparison of pivot methods for phrase-based statistical machine translation. In Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference, pp. 484–491, Rochester, New York, April 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/N07-1061. ",
1311
+ "bbox": [
1312
+ 174,
1313
+ 478,
1314
+ 825,
1315
+ 549
1316
+ ],
1317
+ "page_idx": 10
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Antal van den Bosch, Nicolas Stroppa, and Andy Way. A memory-based classification approach to marker-based ebmt. METIS-II Workshop on New Approaches to Machine Translation, 04 2007. ",
1322
+ "bbox": [
1323
+ 176,
1324
+ 556,
1325
+ 821,
1326
+ 587
1327
+ ],
1328
+ "page_idx": 10
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Maarten van Gompel, Antal van den Bosch, and Peter Berck. Extending memory-based machine translation to phrases. In Computational Linguistics in the Netherlands (CLIN), pp. 79–86, 01 2010. ",
1333
+ "bbox": [
1334
+ 174,
1335
+ 594,
1336
+ 825,
1337
+ 637
1338
+ ],
1339
+ "page_idx": 10
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS), 2017. ",
1344
+ "bbox": [
1345
+ 174,
1346
+ 646,
1347
+ 825,
1348
+ 689
1349
+ ],
1350
+ "page_idx": 10
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzman, ´ Armand Joulin, and Edouard Grave. Ccnet: Extracting high quality monolingual datasets from web crawl data. arXiv preprint arXiv:1911.00359, 2019. ",
1355
+ "bbox": [
1356
+ 173,
1357
+ 698,
1358
+ 825,
1359
+ 741
1360
+ ],
1361
+ "page_idx": 10
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Jason Weston, Emily Dinan, and Alexander H Miller. Retrieve and refine: Improved sequence generation models for dialogue. arXiv preprint arXiv:1808.04776, 2018. ",
1366
+ "bbox": [
1367
+ 171,
1368
+ 750,
1369
+ 823,
1370
+ 780
1371
+ ],
1372
+ "page_idx": 10
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Jitao Xu, Josep Crego, and Jean Senellart. Boosting neural machine translation with similar translations. In Association of Computational Linguistics (ACL), 2020. ",
1377
+ "bbox": [
1378
+ 171,
1379
+ 787,
1380
+ 823,
1381
+ 818
1382
+ ],
1383
+ "page_idx": 10
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Biao Zhang, Philip Williams, Ivan Titov, and Rico Sennrich. Improving massively multilingual neural machine translation and zero-shot translation. arXiv preprint arXiv:2004.11867, 2020. ",
1388
+ "bbox": [
1389
+ 173,
1390
+ 825,
1391
+ 825,
1392
+ 854
1393
+ ],
1394
+ "page_idx": 10
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Jingyi Zhang, Masao Utiyama, Eiichro Sumita, Graham Neubig, and Satoshi Nakamura. Guiding neural machine translation with retrieved translation pieces. In North American Association of Computational Linguistics (NAACL), 2018. ",
1399
+ "bbox": [
1400
+ 174,
1401
+ 863,
1402
+ 825,
1403
+ 905
1404
+ ],
1405
+ "page_idx": 10
1406
+ },
1407
+ {
1408
+ "type": "table",
1409
+ "img_path": "images/9777eb0ba0977a96cd11b5a3eb397a62eb248e42d00cdaf275c011e3d748301e.jpg",
1410
+ "table_caption": [
1411
+ "Table 4: Multilingual machine translation with $k \\mathrm { N N - M T }$ on the validation set. We show the the tuned interpolation parameter $( \\lambda )$ as well as the tuned softmax temperature $( T )$ for each language pair. "
1412
+ ],
1413
+ "table_footnote": [],
1414
+ "table_body": "<table><tr><td>Test set sizes</td><td>de-en 2,998</td><td>ru-en 3,000</td><td>zh-en 3,981</td><td>ja-en 1,998</td><td>fi-en 3,000</td><td>lt-en 2,000</td><td>de-fr 1,512</td><td>de-cs 3,000</td><td>en-cs 2,983</td></tr><tr><td>Base MT +kNN-MT</td><td>38.21 40.48</td><td>30.51 32.6</td><td>21.93 24.49</td><td>14.44 15.62</td><td>21.50 22.11</td><td>28.68 29.41</td><td>28.46 29.74</td><td>21.97 23.01</td><td>20.66 21.79</td></tr><tr><td>Datastore Size Interpolation (入) Temperature (T)</td><td>5.56B 0.6 10</td><td>3.80B 0.5 10</td><td>1.19B 0.4 10</td><td>360M 0.4 10</td><td>318M 0.2 10</td><td>168M 0.2 10</td><td>4.21B 0.6 100</td><td>696M 0.4 100</td><td>533M 0.3 10</td></tr><tr><td>Test set sizes</td><td>en-de 2,998</td><td>en-ru 3,000</td><td>en-zh 3,981</td><td>en-ja 1,998</td><td>en-fi 3,000</td><td>en-lt 2,000</td><td>fr-de 1,512</td><td>cs-de</td><td>Avg.</td></tr><tr><td>Base MT</td><td>39.07</td><td>26.00</td><td>32.72</td><td>16.31</td><td>16.02</td><td>21.11</td><td>25.16</td><td>3,000 24.16</td><td>- 25.11</td></tr><tr><td>+kNN-MT</td><td>42.22</td><td>29.52</td><td>37.96</td><td>18.28</td><td>17.22</td><td>22.84</td><td>26.39</td><td>24.5</td><td>26.95</td></tr><tr><td>Datastore Size</td><td>6.50B</td><td>4.23B</td><td>1.13B</td><td>433M</td><td>375M</td><td>204M</td><td>3.98B</td><td></td><td></td></tr><tr><td>Interpolation (入)</td><td>0.6</td><td>0.7</td><td>0.7</td><td></td><td></td><td></td><td></td><td>689M</td><td>-</td></tr><tr><td></td><td></td><td></td><td></td><td>0.6</td><td>0.4</td><td>0.4</td><td>0.5</td><td>0.4</td><td></td></tr><tr><td>Temperature (T)</td><td>100</td><td>10</td><td>100</td><td>10</td><td>10</td><td>10</td><td>10</td><td>100</td><td></td></tr></table>",
1415
+ "bbox": [
1416
+ 173,
1417
+ 101,
1418
+ 833,
1419
+ 340
1420
+ ],
1421
+ "page_idx": 11
1422
+ },
1423
+ {
1424
+ "type": "table",
1425
+ "img_path": "images/a4458de4cbe1120f80319e2c06caa93f42845ef43970f6b0419636d0edbf21f4.jpg",
1426
+ "table_caption": [
1427
+ "Table 5: Domain adaptation using $k \\mathrm { N N - M T }$ on the multi-domains validation data and newstest2018. The base MT system is trained on WMT’19 data which is also treated as the in-domain data for newstest2018. We present the interpolation $( \\lambda )$ and softmax temperature $( T )$ hyperparameter choices for each domain. "
1428
+ ],
1429
+ "table_footnote": [],
1430
+ "table_body": "<table><tr><td></td><td>Newstest 2019</td><td>Medical</td><td>Law</td><td>IT</td><td>Koran</td><td>Subtitles</td><td>Avg.</td></tr><tr><td>Test set sizes Base MT</td><td>2,000</td><td>2,000</td><td>2,000</td><td>2.000</td><td>2,000</td><td>2,000</td><td>1</td></tr><tr><td>+kNN-MT:</td><td>48.07</td><td>39.94</td><td>45.78</td><td>35.78</td><td>16.30</td><td>29.74</td><td>33.51</td></tr><tr><td>in-domain datastore</td><td>48.57</td><td>53.12</td><td>61.58</td><td>42.41</td><td>19.67</td><td>32.28</td><td>41.81</td></tr><tr><td>Datastore Size (in-domain)</td><td>770M</td><td>5.70M</td><td>18.3M</td><td>3.10M</td><td>450K</td><td>159M</td><td>1</td></tr><tr><td>Interpolation (入)</td><td>0.4</td><td>0.8</td><td>0.8</td><td>0.7</td><td>0.8</td><td>0.7</td><td>-</td></tr><tr><td>Temperature (T)</td><td>100</td><td>10</td><td>10</td><td>10</td><td>100</td><td>10</td><td>-</td></tr></table>",
1431
+ "bbox": [
1432
+ 176,
1433
+ 422,
1434
+ 823,
1435
+ 559
1436
+ ],
1437
+ "page_idx": 11
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "A HYPERPARAMETER TUNING ",
1442
+ "text_level": 1,
1443
+ "bbox": [
1444
+ 176,
1445
+ 666,
1446
+ 442,
1447
+ 683
1448
+ ],
1449
+ "page_idx": 11
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "In this section, we present validation set results as well as the hyperparameter choices for the multilingual machine translation and domain adaptation experiments. Only two hyperparameters have been tuned on the validation sets, the interpolation parameter $\\lambda$ and the softmax temperature $T$ . The number of neighbors $k$ has been fixed to 64, the number of clusters searched has been set to 32 and the beam size has been set to 5. For the number of clusters in the FAISS index, preliminary experiments showed that for larger datastores, while using more clusters does not hurt performance, it does significantly speed up the search process since searching within the clusters is exhaustive. Hence, we use 131K clusters for the multilingual experiments. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 708,
1457
+ 825,
1458
+ 819
1459
+ ],
1460
+ "page_idx": 11
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "Table 4 shows the validation set BLEU scores for the multilingual experiments as well as the hyperparameter choices, and Table 5 shows the same for the domain adaptation experiments using only the in-domain datastores. Values for the interpolation parameter lie between 0 and 1. We also note that for a fixed value of $\\lambda = 0 . 5$ , using $k \\mathrm { N N - M T }$ either performs similarly to or improves the base MT model’s performance, but never hurts, on validation sets across the 17 language pairs evaluated in Section 4.2. For the temperature, we find that values of either 10 or 100 are optimal for all of our experiments. ",
1465
+ "bbox": [
1466
+ 174,
1467
+ 825,
1468
+ 825,
1469
+ 924
1470
+ ],
1471
+ "page_idx": 11
1472
+ },
1473
+ {
1474
+ "type": "table",
1475
+ "img_path": "images/4b913a52b71a1038797f492c6259f1bfa60cc26de6e5b0d577f8997d355de1e7.jpg",
1476
+ "table_caption": [
1477
+ "Test Input: Aber in Papua hat sich wenig verandert, und heute f ¨ uhlen sich die Einheimischen betrogen. ¨ Generated tokens: But not much has "
1478
+ ],
1479
+ "table_footnote": [],
1480
+ "table_body": "<table><tr><td>Training Set Translation Context</td><td>Training Set Target</td><td>Context Probability</td><td></td></tr><tr><td>Nach einem schwerumkämpften Wahlkampf,derdeutlich überzwei Milliarden Dollarkostete,sieht esfir vieleBeobachter aus,alshättesich in deramerikanischen Politik nicht vielt geandert..</td><td>Aftera hard-fought elec- tion campaign,costing well in excess of $2 billion,it seems to many observers thatnot much has</td><td>changed</td><td>0.143</td></tr><tr><td>Geindert freilich hat sich wenig:SchlechtBut not much has gehandhabteKriege...</td><td></td><td>changed</td><td>0.137</td></tr><tr><td>Kaum etwas hat sich verändert,auβerNot much has dasses jetzt nicht mehr die Bewohner des</td><td></td><td>changed</td><td>0.130</td></tr><tr><td>Appartement-Gebaudes... Es ist zwar richtig,dass sich seit dem AusbruchderglobalenFinanzkrise vor über vier Jahren und derschon 2010verabschiedetenDodd-Frank- Finanzmarkreformen in den Vereinigten Staatenkaumetwasdaran geändert hat...</td><td>True,while the global f- nancial crisis erupted more than four years ago,and the Dodd-Frank financial reformswereadopted inthe UnitedStatesbackin2010, notmuch has</td><td>changed</td><td>0.121</td></tr><tr><td colspan=\"4\">… Final kNN distribution: changed = 1.0 Final Translation: But not much has changed in Papua,and locals feel betrayed today. Reference:But precious little has changed in Papua,and today local people feel betrayed.</td></tr></table>",
1481
+ "bbox": [
1482
+ 173,
1483
+ 132,
1484
+ 823,
1485
+ 479
1486
+ ],
1487
+ "page_idx": 12
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "B ADDITIONAL EXAMPLES ",
1492
+ "text_level": 1,
1493
+ "bbox": [
1494
+ 176,
1495
+ 560,
1496
+ 415,
1497
+ 577
1498
+ ],
1499
+ "page_idx": 12
1500
+ },
1501
+ {
1502
+ "type": "text",
1503
+ "text": "Figure 5 further illustrates the behavior of kNN-MT using local contexts in both the source and target to retrieve nearest neighbors. Figure 6 shows a case where the model has very little target-side prior context and mainly relies on the source context to retrieve the best neighbors. ",
1504
+ "bbox": [
1505
+ 174,
1506
+ 592,
1507
+ 823,
1508
+ 633
1509
+ ],
1510
+ "page_idx": 12
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "C BLEU SCORES ",
1515
+ "text_level": 1,
1516
+ "bbox": [
1517
+ 176,
1518
+ 654,
1519
+ 333,
1520
+ 670
1521
+ ],
1522
+ "page_idx": 12
1523
+ },
1524
+ {
1525
+ "type": "text",
1526
+ "text": "In this paper, all results use case-sensitive detokenized BLEU, measured using SACREBLEU (Post, 2018), with the following signatures: ",
1527
+ "bbox": [
1528
+ 174,
1529
+ 685,
1530
+ 821,
1531
+ 713
1532
+ ],
1533
+ "page_idx": 12
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "General: BLEU+case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.13a+version.1.4.13 \nFor chinese: BLEU $^ +$ case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.zh+version.1.4.13 ",
1538
+ "bbox": [
1539
+ 174,
1540
+ 715,
1541
+ 823,
1542
+ 742
1543
+ ],
1544
+ "page_idx": 12
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "BLEU $^ +$ case.mixed+numrefs. $^ { 1 + }$ smooth.exp+tok.ja-mecab-0.996-IPA+version.1.4.13 ",
1549
+ "bbox": [
1550
+ 169,
1551
+ 756,
1552
+ 901,
1553
+ 770
1554
+ ],
1555
+ "page_idx": 12
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "For Table 1 and other experiments, we follow advice from Card et al. (2020) regarding the statistical power of machine translation experiments given the improvements in BLEU scores and the size of the dataset. The authors present results for a single language pair and we verify that their assumptions hold for a couple of other language pairs. Specifically, we find that for Chinese-English $P _ { 0 } = 0 . 1 3$ and $b _ { 0 } = 1 2$ , and for English-Chinese $P _ { 0 } = 0 . 0 7$ and $b _ { 0 } ~ = ~ 1 6$ . This indicates that these experiments, with the test sets containing about 2,000 examples, have close to $100 \\%$ power which was verified using the notebooks provided by Card et al. (2020). We refer the reader to the original paper for more details. More generally, experiments on datasets which contain about 2,000 examples, with improvements of about 1 BLEU or higher, are statistically powered. ",
1560
+ "bbox": [
1561
+ 173,
1562
+ 776,
1563
+ 825,
1564
+ 902
1565
+ ],
1566
+ "page_idx": 12
1567
+ },
1568
+ {
1569
+ "type": "table",
1570
+ "img_path": "images/1877c35898e19a3fe5549972edb284899fbbb1b9ac44dfa14b08a27116ff8eb7.jpg",
1571
+ "table_caption": [],
1572
+ "table_footnote": [],
1573
+ "table_body": "<table><tr><td colspan=\"3\">TestInput:Wirwerden dasBeste tun,mit dem,waswir haben. Generated tokens:We</td></tr><tr><td>Training Set Translation Context (source and target)</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Wirwerden versuchen zu beweisen,dass die We Vermutung falsch ist,dies zu tun,nur um ein Gegenbeispiel Leinwände,dass die Aussage falsch ist,zu finden.</td><td>will</td><td>0.145</td></tr><tr><td>Allerdings,wenn man sich diese groβe Na- tion,wird diese Nation aussehen zu weit,und wir werden das tun, was wichtig und wertvoll, IdentityWiederherstellenderNation.</td><td>However, if you look will at this great nation, this nation will look too wide and we</td><td>0.132</td></tr><tr><td>Wir werden alles tun,um die Dinge fiir die We Anfänger sehr einfach zu machen,wahrend wir esden Experten erlauben,Dinge zu verändern,</td><td>will</td><td>0.127</td></tr><tr><td>fallssiewollen. “Wirwerden ihre Falleund die Fälle anderer politischer Gefangener vor die Gerichte brin- gen und das falsche Bild zerstoren...</td><td>“We</td><td>are 0.127</td></tr><tr><td colspan=\"3\">· … · Final kNN distribution:will= O.639,are = O.238,intend= 0.123</td></tr></table>",
1574
+ "bbox": [
1575
+ 173,
1576
+ 313,
1577
+ 825,
1578
+ 655
1579
+ ],
1580
+ "page_idx": 13
1581
+ }
1582
+ ]
parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7wCBOfJ8hJM/7wCBOfJ8hJM_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJlLdhNFPr/BJlLdhNFPr.md ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EXPLAINING A BLACK-BOX BY USING A DEEP VARIATIONAL INFORMATION BOTTLENECK APPROACH
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Interpretable machine learning has gained much attention recently. Briefness and comprehensiveness are necessary in order to provide a large amount of information concisely when explaining a black-box decision system. However, existing interpretable machine learning methods fail to consider briefness and comprehensiveness simultaneously, leading to redundant explanations. We propose the variational information bottleneck for interpretation, VIBI, a system-agnostic interpretable method that provides a brief but comprehensive explanation. VIBI adopts an information theoretic principle, information bottleneck principle, as a criterion for finding such explanations. For each instance, VIBI selects key features that are maximally compressed about an input (briefness), and informative about a decision made by a black-box system on that input (comprehensive). We evaluate VIBI on three datasets and compare with state-of-the-art interpretable machine learning methods in terms of both interpretability and fidelity evaluated by human and quantitative metrics.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Interpretability is crucial in building and deploying black-box decision systems such as deep learning models. Interpretation of a black-box system helps decide whether or not to follow its decisions, or understand the logic behind the system. In recent years, the extensive use of deep learning black-box systems has given rise to interpretable machine learning approaches (Lipton, 2016; Doshi-Velez & Kim, 2017), which aim to explain how black-box systems work or why they reach certain decisions. In order to provide sufficient information while avoiding redundancy when explaining a black-box decision, we need to consider both briefness and comprehensiveness. However, existing approaches lack in-depth consideration for and fail to find both brief but comprehensive explanation.
12
+
13
+ In order to obtain brief but comprehensive explanation, we adopt the information bottleneck principle (Tishby et al., 2000). This principle provides an appealing information theoretic perspective for learning supervised models by defining what we mean by a ‘good’ representation. The principle says that the optimal model transmits as much information as possible from its input to its output through a compressed representation called the information bottleneck. Then, the information bottleneck will maximally compress the mutual information (MI) with an input while preserving as much as possible MI with the output. Recently, it has been shown that the principle also applies to deep neural networks and each layer of a deep neural network can work as an information bottleneck (Tishby & Zaslavsky, 2015; Shwartz-Ziv & Tishby, 2017). Using this idea of information bottleneck principle, we define a brief but comprehensive explanation as maximally informative about the black-box decision while compressive about a given input.
14
+
15
+ In this paper, we introduce the variational information bottleneck for interpretation (VIBI), a systemagnostic information bottleneck model that provides a brief but comprehensive explanation for every single decision made by a black-box model. VIBI is composed of two parts: explainer and approximator, each of which is modeled by a deep neural network. The explainer returns a probability whether a chunk of features such as a word, phrase, sentence or a group of pixels will be selected as an explanation or not for each instance, and an approximator mimics behaviour of a black-box model. Using the information bottleneck principle, we learn an explainer that favors brief explanations while enforcing that the explanations alone suffice for accurate approximations to a black-box model.
16
+
17
+ # 1.1 CONTRIBUTION
18
+
19
+ Our main contribution is to provide a new framework that systematically defines and generates a ‘good’ (i.e. brief but comprehensive) explanation using the information bottleneck principle. Based on this principle, we develop VIBI that favors a brief but comprehensive explanation. In order to make the objective function of VIBI tractable, we derive a variational approximation to the objective.
20
+
21
+ The benefits of our method are as follows. 1) System-agnostic: VIBI can be applied to explain any black-box system. 2) Post-hoc learning: VIBI is learned in a post-hoc manner, hence there is no tradeoff between task accuracy of a black-box system and interpretability of an explainer. 3) Cognitive chunk: Cognitive chunk is defined as a group of raw features whose identity is understandable to human. VIBI groups non-cognitive raw features such as a pixel and letter into a cognitive chunk (e.g. a group of pixels, a word, a phrase, a sentence) and selects each unit as an explanation. 4) Separate explainer and approximator: The explainer and approximator are designed for separated tasks so that we do not need to limit the approximator to have a simple structure, which may reduce the fidelity (the ability to imitate the behaviour of a black-box) of approximator.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Most prior interpretable machine learning methods have been focusing on local interpretation, which implies knowing the reasons why a black-box system makes a certain decision at a very local point of interest, and our work is also situated in this line. Existing methods can be categorized into system-specific and system-agnostic method. System-specific methods only explain certain black-box decision systems (e.g. using backpropagation algorithm, or having CNN structure), while system-agnostic methods explain any black-box decision systems.
26
+
27
+ System-specific methods. To measure a change of output with respect to changes of input is an intuitive way of obtaining feature attribution for the output. Using this idea, Zeiler & Fergus (2014), and Zintgraf et al. (2017) observe how outputs change when they make perturbations to each instance. Baehrens et al. (2010); Simonyan et al. (2013), and Smilkov et al. (2017) use computationally more efficient approaches; they measure change of output by propagating contributions through layers of a deep neural network towards an input than the perturbation. However, these approaches fail to detect the changes of output when the prediction function is flattened at the instance (Shrikumar et al., 2017), which leads to interpretations focusing on irrelevant features. In order to solve this problem, the layer-wise relevance propagation (Bach et al., 2015; Binder et al., 2016), DeepLIFT (Shrikumar et al., 2017), and Integrated Gradients (Sundararajan et al., 2017) compare the changes of output to its reference output. Ross et al. (2017) learn a more generalizable model as well as desirable explanations by constraining its explanations (i.e. input gradient) to match domain knowledge.
28
+
29
+ System-agnostic methods. The great advantage of system-agnostic interpretable machine learning methods over system-specific methods is that their usage is not restricted to a specific black-box system. One of the most well-known system-agnostic methods is LIME (Ribeiro et al., 2016). It explains the decision of an instance by locally approximating the black-box decision boundary around the instance with an inherently interpretable model such as sparse linear or decision trees. The approximator is learned by samples generated by perturbing a given instance. Lundberg & Lee (2017) proposed SHAP, a unified measure defined over the additive feature attribution scores in order to achieve local accuracy, missingness, and consistency. L2X (Chen et al., 2018) learns a stochastic map that selects instance-wise features that are most informative for black-box decisions. Unlike LIME and SHAP, which approximate local behaviors of a black-box system with a simple (linear) model, L2X does not put a limit on the structure of the approximator; hence it avoids losing fidelity of the approximator. As SHAP does, Dabkowski & Gal (2017); Fong & Vedaldi (2017), and Petsiuk et al. (2018) use sample perturbation but they rather learn or estimate desired perturbation masks than using perturbed samples to learn an approximator. Dabkowski & Gal (2017), and Fong & Vedaldi (2017) learn a smallest perturbation mask that alters black-box outputs as much as possible. Petsiuk et al. (2018) empirically estimate feature attribution as a sum of random masks weighted by class scores corresponding to masked inputs. Our method VIBI is similar with L2X in that both learn a stochastic explainer that returns a distribution over the subset of features given the input and performs instance-wise feature selection based on that. However, given the same number of explanations, our explainer favors both briefness and comprehensiveness while the L2X explainer favors comprehensiveness of the explanation and does not account for briefness.
30
+
31
+ ![](images/fbf2db11882d4e969a67fd1d897a02970df566a07b36a47064b870cc4071b2ab.jpg)
32
+ Figure 1: Illustration of VIBI. (A) VIBI is composed of two parts: the explainer and approximator. The explainer selects a group of $k$ key cognitive chunks given an instance while the approximator mimics the behaviour of the black-box system using the selected keys as the input. (B) We set each word as a cognitive chunk and $k = 2$ . $\textcircled{1}$ The explainer takes an input $\mathbf { x }$ and returns a stochastic $\mathbf { k }$ -hot random vector $\mathbf { z }$ which indicates whether each cognitive chunk will be selected as an explanation or not. $\textcircled{2} \mathbf { t } ( \mathbf { x } )$ provides instance-specific explanation. $\textcircled{3}$ The approximator takes $\mathbf { t } ( \mathbf { x } )$ as an input and approximates the black-box output.
33
+
34
+ # 3.1 PERSPECTIVE FROM INFORMATION BOTTLENECK PRINCIPLE
35
+
36
+ The information bottleneck principle (Tishby et al., 2000) provides an appealing information theoretic view for learning a supervised model by defining what we mean by a ‘good’ representation. The principle says that the optimal model transmits as much information as possible from the input $\mathbf { x }$ to the output $\mathbf { y }$ through a compressed representation t (called the information bottleneck). The representation t is stochastically defined and the optimal stochastic mapping $p ( \mathbf { t } | \mathbf { x } )$ is obtained by optimizing the following problem with a Markov chain assumption $\mathbf { y } \mathbf { x } \mathbf { t }$ :
37
+
38
+ $$
39
+ p ( \mathbf { t } | \mathbf { x } ) = \operatorname * { a r g m a x } _ { p ( \mathbf { t } | \mathbf { x } ) , p ( \mathbf { y } | \mathbf { t } ) , p ( \mathbf { t } ) } \ I ( \mathbf { t } , \mathbf { y } ) - \beta \operatorname { I } ( \mathbf { x } , \mathbf { t } )
40
+ $$
41
+
42
+ where $\operatorname { I } ( \cdot , \cdot )$ is the MI and $\beta$ is a Lagrange multiplier representing the trade-off between the compressiveness $- \mathrm { I } ( \mathbf { x } , \mathbf { t } )$ and informativeness $\displaystyle \mathbf { I } ( \mathbf { t } , \mathbf { y } )$ of the representation t.
43
+
44
+ We adopt the information bottleneck principle as a criterion for finding brief but comprehensive explanations. Our aim is to learn an explainer generating explanations that are maximally informative about the black-box decision while compressive about a given input.
45
+
46
+ # 3.2 PROPOSED APPROACH
47
+
48
+ We introduce VIBI, a system-agnostic interpretation approach that provides brief but comprehensive explanations for decisions made by black-box decision system. In order to achieve this, we optimize the following information bottleneck objective.
49
+
50
+ $$
51
+ p ( \mathbf { z } | \mathbf { x } ) = \operatorname * { a r g m a x } _ { p ( \mathbf { z } | \mathbf { x } ) , p ( \mathbf { y } | \mathbf { t } ) } \quad \operatorname { I } ( \mathbf { t } , \mathbf { y } ) - \beta \operatorname { I } ( \mathbf { x } , \mathbf { t } )
52
+ $$
53
+
54
+ where $\operatorname { I } ( \mathbf { t } , \mathbf { y } )$ represents the sufficiency of information retained for explaining the black-box output $\mathbf { y }$ , $- \mathrm { I } ( \mathbf { x } , \mathbf { t } )$ represents the briefness of the explanation $\mathbf { t }$ , and $\beta$ is a Lagrange multiplier representing a trade-off between the two. The primary difference between our information bottleneck objective (2) and the one in Tishby et al. (2000) is as follows: the latter aims to identify a stochastic map of the representation $\mathbf { t }$ that itself works as an information bottleneck, whereas our objective aims to identify a stochastic map of $\mathbf { z }$ performing instance-wise selection of cognitive chunks and define information bottleneck as a function of $\mathbf { z }$ and the input $\mathbf { x }$ .
55
+
56
+ As illustrated in Figure 1A, VIBI is composed of two parts: the explainer and the approximator, each of which is modeled by a deep neural network. The explainer selects a group of $k$ key cognitive chunks given an instance while the approximator mimics the behaviour of the black-box system using the selected keys as the input. $k$ controls the level of sparsity in $\mathbf { z }$ . In detail, the explainer $p ( \mathbf { z } | \mathbf { x } ; \pmb { \theta } _ { e } )$ is a map from an input $\mathbf { x }$ to its attribution scores $p _ { j } ( \mathbf { x } ) = p ( \mathbf { z } _ { j } | \mathbf { x } )$ where $j$ is for the $j$ -th cognitive chunk and $\mathbf { Z } _ { j }$ is a binary indicator whether the chunk will be selected or not. The attribution score indicates the probability that each cognitive chunk to be selected. In order to select top $k$ cognitive chunks as an explanation, a $k$ -hot vector $\mathbf { z }$ is sampled from a categorical distribution with class probabilities $p _ { j } ( \mathbf { \bar { x } } ) = p ( \mathbf { z } _ { j } | \mathbf { x } )$ and the $j$ -th cognitive chunk is selected if $z _ { j } = 1$ . More specifically, the explanation $\mathbf { t }$ is defined as follows:
57
+
58
+ $$
59
+ \mathbf { t } _ { i } = ( \mathbf { x } \odot \mathbf { z } ) _ { i } = \mathbf { x } _ { i } \times \mathbf { z } _ { j } ,
60
+ $$
61
+
62
+ where $j$ indicates a cognitive chunk, each of which corresponds to multiple row features $i$ . The approximator is modeled by another deep neural network $p ( \mathbf { y } | \mathbf { t } ; \pmb { \theta } _ { a } )$ , which mimics the black-box decision system. It takes $\mathbf { t }$ as an input and returns an output approximating the black-box output for the instance $\mathbf { x }$ . $\theta _ { a }$ and $\pmb { \theta } _ { e }$ represent the weight parameters of neural networks. The explainer and approximator are trained jointly by minimizing a cost function that favors concise explanations while enforcing that the explanations alone suffice for accurate prediction.
63
+
64
+ To achieve compressiveness, in addition to encouraging small MI between explanations and inputs, we also encourage the number of selected cognitive chunks to be small, i.e., encouraging $\mathbf { z }$ to be sparse. Note that MI and sparsity are two complementary approaches for achieving compression. MI aims at reducing semantic redundancy in explanations. Sparsity cannot achieve such a goal. For example, consider a movie review where "great" occurs a lot and two explanations in judging the sentiment of the review: "great, great" and "great, thought-provoking". They have the same level of sparsity ( $k = 2$ ), but the former has semantic redundancy. In this case, MI helps to choose a better explanation. The first explanation has a larger MI with the input document. The second explanation has smaller MI and hence is more brief and preferable.
65
+
66
+ # 3.2.1 THE VARIATIONAL BOUND
67
+
68
+ The current form of information bottleneck objective is intractable due to the MIs $\displaystyle \mathbf { I } ( \mathbf { t } , \mathbf { y } )$ and $\mathbf { I } ( \mathbf { x } , \mathbf { t } )$ We address this problem by using a variational approximation of our information bottleneck objective. In this section, we summarize the results and refer to Supplementary Material A for details.
69
+
70
+ Variational bound for $\mathbf { I } ( \mathbf { x } , \mathbf { t } )$ : We first show that $\operatorname { I } ( \mathbf { x } , \mathbf { t } ) \leq \operatorname { I } ( \mathbf { x } , \mathbf { z } ) + C$ where $C$ is constant and use the lower bound for $- \mathrm { I } ( \mathbf { x } , \mathbf { z } ) - C$ as a lower bound for $- \mathrm { I } ( \mathbf { x } , \mathbf { t } )$ . As a result, we obtain:
71
+
72
+ $$
73
+ \mathrm { I } ( \mathbf { x } , \mathbf { t } ) \leq \mathrm { I } ( \mathbf { x } , \mathbf { z } ) + C \leq \mathbb { E } _ { ( \mathbf { x } , \mathbf { z } ) \sim p ( \mathbf { x } , \mathbf { z } ) } \left[ \log \frac { p ( \mathbf { z } | \mathbf { x } ) } { r ( \mathbf { z } ) } \right] + C = \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , r ( \mathbf { z } ) ) + C
74
+ $$
75
+
76
+ Note that with proper choices of $r ( \mathbf { z } )$ and $p ( \mathbf { z } | \mathbf { x } )$ , we can assume that the Kullback-Leibler divergence $D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , \bar { r } ( \mathbf { z } ) )$ has an analytical form.
77
+
78
+ Variational bound for $\operatorname { I } ( \mathbf { t } , \mathbf { y } )$ : We obtain the lower bound for $\operatorname { I } ( \mathbf { t } , \mathbf { y } )$ by using $q ( \mathbf { y } \vert \mathbf { t } )$ to approximate $p ( \mathbf { y } \vert \mathbf { t } )$ , which works as an approximator to the black-box system. As a result, we obtain:
79
+
80
+ $$
81
+ \begin{array} { r } { \operatorname { I } ( \mathbf { t } , \mathbf { y } ) \geq \operatorname { \mathbb { E } } _ { ( \mathbf { t } , \mathbf { y } ) \sim p ( \mathbf { t } , \mathbf { y } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] = \operatorname { \mathbb { E } } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \operatorname { \mathbb { E } } _ { \mathbf { y } | \mathbf { x } \sim p ( \mathbf { y } | \mathbf { x } ) } \operatorname { \mathbb { E } } _ { \mathbf { t } | \mathbf { x } \sim p ( \mathbf { t } | \mathbf { x } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] } \end{array}
82
+ $$
83
+
84
+ where $p ( \mathbf { t } | \mathbf { x } , \mathbf { y } ) = p ( \mathbf { t } | \mathbf { x } )$ by the Markov chain assumption $\mathbf { y } \mathbf { x } \mathbf { t }$ .
85
+
86
+ Combining Equations (3) and (4), we obtain the following variational bound:
87
+
88
+ $$
89
+ \begin{array} { r l } & { \mathbf { I } ( \mathbf { t } , \mathbf { y } ) - \beta \ \mathbf { I } ( \mathbf { x } , \mathbf { t } ) } \\ & { \qquad \geq \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathbb { E } _ { \mathbf { y } | \mathbf { x } \sim p ( \mathbf { y } | \mathbf { x } ) } \mathbb { E } _ { \mathbf { t } | \mathbf { x } \sim p ( \mathbf { t } | \mathbf { x } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] - \beta \ \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , r ( \mathbf { z } ) ) + C ^ { * } . } \end{array}
90
+ $$
91
+
92
+ where $C ^ { * } = - C \beta$ can be ignored since it is independent of the optimization procedure. We use the empirical data distribution to approximate $p ( \mathbf { x } , \mathbf { \bar { y } } ) = p ( \mathbf { x } ) p ( \mathbf { y } | \mathbf { x } )$ and $p ( \mathbf { x } )$ .
93
+
94
+ # 3.2.2 CONTINUOUS RELAXATION AND REPARAMETERIZATION
95
+
96
+ Current form of the bound (5) is still intractable because we need to sum over the $\binom { d } { k }$ combinations of feature subsets. This is because we sample top $k$ out of $d$ cognitive chunks where each chunk is assumed drawn from a categorical distribution with class probabilities $p _ { j } ( \mathbf { x } ) = p ( \mathbf { z } _ { j } | \mathbf { x } )$ . In order to avoid this, we use the generalized Gumbel-softmax trick (Jang et al., 2017; Chen et al., 2018). This is a well-known technique that are used to approximate a non-differentiable categorical subset sampling with differentiable Gumbel-softmax samples. The steps are as follows.
97
+
98
+ First, we independently sample a cognitive chunk for $k$ times. For each time, a random perturbation $\mathrm { e } _ { j }$ is added to the log probability of each cognitive chunk $\log p _ { j } ( { \bf x } )$ . From this, Concrete random vector $\mathbf { c } = ( \mathsf { c } _ { 1 } , \cdots , \mathsf { c } _ { d } )$ working as a continuous, differentiable approximation to argmax is defined:
99
+
100
+ $$
101
+ \begin{array} { l l l } { \displaystyle \mathbf { g } _ { j } = - \log \left( - \log \mathbf { e } _ { j } \right) \quad \mathrm { w h e r e } \mathbf { e } _ { j } \sim U ( 0 , 1 ) } \\ { \displaystyle \mathbf { c } _ { j } = \frac { \exp \left( \left( \mathbf { g } _ { j } + \log p _ { j } ( \mathbf { x } ) \right) / \tau \right) } { \sum _ { j = 1 } ^ { d } \exp \left( \left( \mathbf { g } _ { j } + \log p _ { j } ( \mathbf { x } ) \right) / \tau \right) } , } \end{array}
102
+ $$
103
+
104
+ where $\tau$ is a tuning parameter for the temperature of Gumbel-Softmax distribution. Next, we define a continuous-relaxed random vector $\mathbf { z } ^ { \bar { * } } = [ \mathbf { z } _ { 1 } ^ { * } , \cdots , \mathbf { z } _ { d } ^ { * } ] ^ { \top }$ as the element-wise maximum of the independently sampled Concrete vectors $\mathbf { c } ^ { ( l ) }$ where $l = 1 , \cdots , k$ :
105
+
106
+ $$
107
+ \mathbf { z } _ { j } ^ { * } = \operatorname* { m a x } _ { l } \mathbf { c } _ { j } ^ { ( l ) } \ \mathrm { f o r } \ l = 1 , \cdot \cdot \ , k
108
+ $$
109
+
110
+ With this sampling scheme, we approximate the $k$ -hot random vector and have the continuous approximation to the variational bound (5). This trick allows using standard backpropagation to compute the gradients of the parameters via reparameterization.
111
+
112
+ By putting everything together, we obtain:
113
+
114
+ $$
115
+ \frac { 1 } { N L } \sum _ { n } ^ { N } \sum _ { l } ^ { L } \left[ \log q ( y _ { ( n ) } | \mathbf x _ { ( n ) } \odot f ( \mathbf e _ { ( n ) } ^ { ( l ) } , \mathbf x _ { ( n ) } ) ) - \beta D _ { \mathrm { K L } } ( p ( \mathbf z _ { ( n ) } ^ { * } | \mathbf x _ { ( n ) } ) , r ( \mathbf z _ { ( n ) } ^ { * } ) ) \right]
116
+ $$
117
+
118
+ where $N$ is the number of samples, $n$ indicate the $n$ -th sample, $f ( \mathbf { e } _ { ( n ) } ^ { ( l ) } , \mathbf { x } _ { ( n ) } ) = \mathbf { z } _ { ( n ) } ^ { * }$ , $q ( \pmb { y } _ { ( n ) } | \mathbf { x } _ { ( n ) } \odot$ $\mathbf { z } _ { ( n ) } ^ { * } )$ is the approximator to the black-box system and $- D _ { \mathrm { K L } } ( p ( \mathbf { z } ^ { * } | \mathbf { x } _ { ( n ) } ) , r ( \mathbf { z } ^ { * } ) )$ represents the compactness of the explanation. Once we learn the model, the attribution score $p _ { j } ( \mathbf { x } )$ for each cognitive chunk is used to select top $k$ key cognitive chunks that are maximally compressive about the input $\mathbf { x }$ and informative about the black-box decision $\mathbf { y }$ on that input.
119
+
120
+ # 4 EXPERIMENTS
121
+
122
+ We evaluated VIBI on three datasets and compared with state-of-the-art interpretable machine learning methods. The evaluation is performed from two perspectives: interpretability and fidelity. The interpretability indicates the ability to explain a black-box model with human understandable terms. The fidelity implies how accurately our approximator approximates the black-box model. Based on these criteria, we compared VIBI with three state-of-the-art system-agnostic methods (LIME (Ribeiro et al., 2016), SHAP (Lundberg & Lee, 2017) and L2X (Chen et al., 2018)), and a commonly used model-specific method called Saliency Map (Simonyan et al., 2013). For Saliency Map, we used the smooth gradient technique (Smilkov et al., 2017) to get visually sharp gradientbased sensitivity maps over the basic gradient saliency map. See Supplementary Material B for further experimental details.
123
+
124
+ We examined how VIBI performs across different experimental settings varying the number of selected chunks $k$ (amount or number of explanation), size of chunk (unit of explanation), and tradeoff parameter $\beta$ (trade-off between the compressiveness of explanation and information preserved about the output). The settings of hyperparameter tuning include (bold indicate the choice for our final model): the temperature for Gumbel-softmax approximation $\tau - \left\{ 0 . 1 , 0 . 2 , 0 . 5 , \mathbf { 0 } . 7 , 1 \right\}$ , learning rate $- 5 \times 1 0 ^ { - 3 } , 1 0 ^ { \div 3 } , 5 \times 1 0 ^ { - 4 } , 1 0 ^ { - 4 } , 5 \times 1 0 ^ { - 5 } \}$ and $\beta - \{ 0 , 0 . 0 0 1 , \mathbf { 0 . 0 1 } , 0 . 1 , 1 , 1 0 , 1 0 0 \}$ . We use Adam algorithm (Kingma & Ba, 2014) with batch size 100 for MNIST and 50 for IMDB, the coefficients used for computing running averages of gradient and its square $( \beta _ { 1 } , \beta _ { 2 } ) = ( 0 . 5 , 0 . 9 9 9 )$ , and $\epsilon = 1 0 ^ { - 8 }$ . We tuned the hyperparameters via grid search and picked up the hyperparameters that yield the best fidelity score on the validation set. The code is publicly available on GitHub https://github.com/XXX.1
125
+
126
+ # Negative Sentiment if any negative words are found
127
+
128
+ # Positive Sentiment if any positive words are found
129
+
130
+ I do NOT understand why anyone would waste their time or money on utter trash like this … Don't get me wrong -- I LOVE a good Western -- Notice I said "GOOD" -- this is just trash. The acting is horrible -- Val Kilmer must know someone or owed a favor or something for them just to use his face and name in this ridiculous piece of crap... True: Negative / B-Box: Negative
131
+
132
+ I watched this movie when it was released and being really young and not too much into cinema it was one of the most fascinating cinematic experiences I ever had and it really left a mark inside me. At first I didn't quite understand the story and probably failed to … He plays so well the man that falls in love slowly but so deeply with Katherine Clifton, opens up his heart and dives into this prohibited affair…. True: Positive / B-Box: Positive
133
+
134
+ # Negative sentiment but predicted as Positive because several positive words are found
135
+
136
+ The reality of the mafia environment is absolutely dog-eat-dog where a gangster will be killed for showing any sign of weakness because they become a liability. I've got no problem with the human side of gansters' being portrayed but Bugsy steers too far in the direction of soft, comical, men. The film is enjoyable but is only light entertainment and not a biopic of a man who, though exciting, was extremely dangerous and fearsome. The acting's all good and the direction very solid. The locations and era are very well represented and the themes very interesting…. True: Negative / B-Box: Positive
137
+
138
+ Figure 2: The movie reviews and explanations provided by VIBI were randomly selected from the validation set. The selected words are colored red. Each word is used as a cognitive chunk and $k = 5$ words are provided for each review.
139
+
140
+ # 4.1 LSTM MOVIE SENTIMENT PREDICTION MODEL USING IMDB
141
+
142
+ The IMDB (Maas et al., 2011) is a large text dataset containing movie reviews labeled by sentiment (positive/negative). We grouped the reviews into training, validation, and test sets, which have 25,000, 12,500, and 12,500 reviews respectively. Then, we trained a hierarchical LSTM for sentiment prediction, which has two LSTM layers where each layer encodes words and sentences respectively. It achieved $87 \%$ of test accuracy. In order to explain this LSTM black-box model, we applied VIBI. We parameterized the explainer using a bidirectional LSTM and approximator using a 2D CNN. For the details of the black-box model and VIBI architectures, see Supplementary Material B.1.
143
+
144
+ VIBI explains why the LSTM predicts each movie review to be positive/negative and provides instance-wise key words that are the most important attributes to the sentiment prediction. As seen in the top-right and top-left of Figure 2, VIBI shows that the positive (or negative) words pass through the bottleneck and make a correct prediction. The bottom of Figure 2 shows that the LSTM sentiment prediction model makes a wrong prediction for a negative review because the review includes several positive words such as ‘enjoyable’ and ‘exciting’.
145
+
146
+ # 4.2 CNN DIGIT RECOGNITION MODEL USING MNIST
147
+
148
+ ![](images/16e204fb62fd6ff2e0969bd600b3363fb2887571bd2898ed0e22b2a693bb932f.jpg)
149
+ Figure 3: The hand-written digits and explanations provided by VIBI were randomly selected from the validation set. The selected patches are colored red if the pixel is activated (i.e. white) and yellow otherwise (i.e. black). A patch composed of $4 \times 4$ pixels is used as a cognitive chunk and $k = 4$ patches are identified for each image.
150
+
151
+ The MNIST (LeCun et al., 1998) is a large dataset contains $2 8 \times 2 8$ sized images of handwritten digits (0 to 9). We grouped the images into training, validation, and test sets, which have 50,000, 10,000, and 10,000 images respectively, and trained a simple 2D CNN for the digit recognition, which achieved $9 7 \%$ of test accuracy. In order to explain this CNN black-box model, we applied VIBI. We parameterized each the explainer and approximator using a 2D CNN. For the details of the black-box model and VIBI architectures, see Supplementary Material B.2.
152
+
153
+ VIBI explains how the CNN characterizes a digit and recognizes differences between digits. The first two examples in Figure 3 show that the CNN recognizes digits using both shapes and angles. In the first example, the CNN characterizes ‘1’s by straightly aligned patches along with the activated regions although ‘1’s in the left and right panels are written at different angles. Contrary to the first example, the second example shows that the CNN recognizes the difference between $\mathbf { \nabla } ^ { 6 } 9 ^ { \bullet }$ and $\cdot _ { 6 } ,$ by their differences in angles. The last two examples in Figure 3 show that the CNN catches a difference of ‘7’s from ‘1’s by patches located on the activated horizontal line on $\cdot _ { 7 } ,$ (see the cyan circle) and recognizes ‘8’s by two patches on the top of the digits and another two patches at the bottom circle. More qualitative examples for VIBI and the baselines are shown in Supplementary Figure 6.
154
+
155
+ The briefness of explanations also depends on the sparsity $k$ . Supplementary Figure 8 shows how our method works under different sparsity. When we increase $k$ , VIBI tends to select patches that are the same with or nearby previously selected patches and additionally select patches that catch new characteristics of digits.
156
+
157
+ # 4.3 TCR TO EPITOPE BINDING PREDICTION MODEL USING VDJDB AND IEDB
158
+
159
+ ![](images/85d34025a5078ff10133ea49170548edf0c1f8381952ab2257374a3c231c420a.jpg)
160
+ Figure 4: Black-box prediction scores of (A) VDJdb and (B) IEDB. (C) Black-box prediction scores between the matched and unmatched instances from IEDB and (D) those by six epitope sequences. (E) An example of matched explanation (The VIBI selected amino acids are shaded).
161
+
162
+ We next illustrate how VIBI can be used to get insights from a model and ensure the safety of a model in a real world application. Identifying which T-cell receptor (TCR) will bind to a specific epitope (i.e. cancer induced peptide molecules presented by the major histocompatibility complex to T-cells) is important for screening T-cells or genetically engineering T-cells that are effective in recognizing and destroying tumor cells. Therefore, there has been efforts in developing computational methods to predict binding affinity of given TCR-epitope pairs (Jurtz et al., 2018; Jokinen et al., 2019). These approaches rely on known interacting TCR-epitope pairs available from VDJdb (Shugay et al., 2017) and IEDB (Vita et al., 2014), which are the largest databases of several thousand entries. However, the number of unique TCRs harbored in a single individual is estimated to be $1 0 ^ { 1 0 }$ (Lythe et al., 2016) and a theoretical number of epitopes of length $l$ is $2 0 ^ { l }$ , which are much larger than the number of known interacting TCR-epitope pairs.
163
+
164
+ One of the main concerns is whether a black-box model trained on such limited dataset can accurately predict TCR-epitope bindings of out-of-samples. This concern becomes pressing in a TCR-epitope binding prediction model trained on VDJdb (For details of the data, black-box model architecture, and parameter tuning, see Supplementary Material B.3). The model accurately predicted the (in-sample) bindings from VDJdb (recall 0.79, Figure 4A). However, it achieved poor prediction performance when it is used to predict the (out-of-sample) bindings from another dataset, IEDB (recall 0.40, Figure 4B). In an attempt to address this problem, we applied VIBI and determined whether or not to accept a decision made by the black-box model based on VIBI’s explanation. As illustrated in Figure 4E, VIBI provided matched explanations—the identical amino acids in same positions (S and Y in this example) are highlighted in different TCR sequences when they are bound to the same epitope (GILGFVFTL in this example). Moreover, we found that if two TCR sequences binding to the same epitope, each from IEDB and VDJdb, are assigned with matched explanations by VIBI, then it significantly better predicts the binding than the others with no matching TCRs (Figure 4C-D, p-values are shown). Therefore, if a TCR sequence from IEDB has a matched explanation to a TCR from VDJdb, then we safely follow the positive decision made by the black-box model.
165
+
166
+ # 4.4 INTERPRETABILITY EVALUATED BY HUMANS
167
+
168
+ We evaluated interpretability of the methods on the LSTM movie sentiment prediction model and the CNN digit recognition model. For the movie sentiment prediction model, we provided instances that the black-box model had correctly predicted and asked humans to infer the output of the primary sentiment of the movie review (Positive/Negative/Neutral) given five key words selected by each method. Each method was evaluated by the humans on $\bar { \bf M T u r k } ^ { 2 }$ who are awarded the Masters Qualification, high-performance workers who have demonstrated excellence across a wide range of tasks). We randomly selected and evaluated 200 instances for VIBI and 100 instances for the others. Five workers were assigned per instance. For the digit recognition model, we asked humans to directly score the explanation on a 0–5 scale. Each method was evaluated by 16 graduate students at XXX-University3 who have taken at least one graduate-level machine learning class. For each method, 100 instances were randomly selected and evaluated. Four cognitive chunks with the size $4 \times 4$ were provided as an explanation for each instance $\beta = 0 . 1$ for VIBI). On average, 4.26 students were assigned per instance. Further details regarding the experiments can be found in Supplementary Material C.
169
+
170
+ Table 1: Evaluation of interpretability
171
+
172
+ <table><tr><td></td><td>Saliency</td><td>LIME</td><td>L2X</td><td>VIBI (Ours)</td></tr><tr><td>IMDB</td><td>34.2%</td><td>33.8%</td><td>35.6%</td><td>44.7%</td></tr><tr><td>MNIST</td><td>3.448</td><td>1.369</td><td>1.936</td><td>3.526</td></tr></table>
173
+
174
+ For IMDB, the percentage indicates how well the MTurk worker’s answers match the black-box output. For MNIST, the score indicates how well the highlighted chunks catch key characteristics of handwritten digits. The average scores over all samples is shown on a 0 to 5 scale. See the survey example and detailed result in Supplementary Material Tables 3 and 4 for the detailed result.
175
+
176
+ As shown by the Table 1, VIBI better explains the black-box models. When explaining the movie sentiment prediction model, humans better inferred the (correctly predicted) black-box output given the five keywords when they were provided by VIBI. Therefore, it better captures the most contributing key words to the LSTM decision and better explains why the LSTM predicted each movie review by providing five key words. For explaining the digit recognition model, VIBI also highlighted the most concise chunks for explaining key characteristics of handwritten digit. Thus, it better explains how the CNN model recognized each the handwritten digit.
177
+
178
+ # 4.5 FIDELITY
179
+
180
+ Table 2: Evaluation of approximator and rationale fidelity
181
+
182
+ <table><tr><td rowspan="2">k</td><td rowspan="2">chunk size</td><td rowspan="2"></td><td colspan="5">Approximator Fidelity</td><td rowspan="2"></td><td colspan="2">Rationale Fidelity</td></tr><tr><td>Saliency</td><td>LIME</td><td>SHAP</td><td>L2X</td><td>VIBI(Ours)</td><td>L2X</td><td>VIBI(Ours)</td></tr><tr><td rowspan="4">IMDB</td><td>sentence</td><td>1</td><td>38.7 ± 0.9</td><td>72.7 ± 0.8</td><td>49.5 ± 1.0</td><td>87.6± 0.6</td><td>87.7 ± 0.6</td><td></td><td>72.7 ± 0.8</td><td>73.1 ± 0.8</td></tr><tr><td>word</td><td>5</td><td>41.9 ± 0.9</td><td>75.6 ± 0.8</td><td>50.1 ± 1.0</td><td>73.8±0.8</td><td>74.4 ± 0.8</td><td></td><td>63.8 ±0.8</td><td>65.7 ± 0.8</td></tr><tr><td>5 words</td><td>1</td><td>42.4 ± 0.9</td><td>29.0± 0.8</td><td>49.7 ± 1.0</td><td>75.9 ± 0.7</td><td></td><td>76.4 ± 0.7</td><td>60.1 ± 0.9</td><td>63.2 ± 0.8</td></tr><tr><td>5words</td><td>3</td><td>41.4 ± 0.9</td><td>67.9 ± 0.8</td><td>49.1 ± 1.0</td><td></td><td>83.3± 0.7</td><td>83.5 ± 0.7</td><td>69.4 ± 0.8</td><td>66.0± 0.8</td></tr><tr><td rowspan="6">MNIST</td><td>2×2</td><td>16</td><td>91.2 ± 0.6</td><td>77.0 ±0.8</td><td>94.2 ± 0.5</td><td>93.4± 0.5</td><td>94.8 ± 0.4</td><td>73.5± 0.9</td><td></td><td>77.1 ± 0.8</td></tr><tr><td>2×2</td><td>24</td><td>93.8± 0.5</td><td>80.7 ±0.8</td><td>95.4 ± 0.4</td><td></td><td>95.1 ± 0.4</td><td>95.3 ± 0.4</td><td>77.6± 0.8</td><td>85.6 ± 0.7</td></tr><tr><td>2×2</td><td>40</td><td>95.7 ± 0.4</td><td>85.9 ±0.7</td><td>95.4 ± 0.4</td><td>96.7 ± 0.4</td><td></td><td>96.2 ± 0.4</td><td>81.1 ± 0.8</td><td>91.5 ± 0.5</td></tr><tr><td>4×4</td><td>4</td><td>86.3 ± 0.7</td><td>60.9 ±1.0</td><td>94.8 ± 0.4</td><td>95.3 ± 0.4</td><td></td><td>94.8 ± 0.4</td><td>65.0 ± 0.9</td><td>77.5 ± 0.8</td></tr><tr><td>4×4</td><td>6</td><td>90.6± 0.6</td><td>63.7 ± 0.9</td><td>93.6± 0.5</td><td>95.7 ± 0.4</td><td></td><td>95.6 ± 0.4</td><td>51.1 ± 1.0</td><td>70.1 ± 0.9</td></tr><tr><td>4×4</td><td>10</td><td>94.9 ± 0.4</td><td>70.5 ± 0.9</td><td>95.1 ± 0.4</td><td>96.5 ± 0.4</td><td></td><td>96.7 ± 0.4</td><td>83.5±0.7</td><td>93.3 ± 0.5</td></tr></table>
183
+
184
+ Note that the black-box models achieved $87 \%$ accuracy for IMDB and $9 7 \%$ accuracy for MNIST. $\beta = 0 . 1$ for VIBI. Accuracy and 0.95 confidence interval is shown. We performed three runs for each method and reported the best results. See more evaluations using F1-score and further results from different parameter settings in Supplementary Material Table 6 and 8 for approximator fidelity and Table 5 and 7 for rationale fidelity.
185
+
186
+ We assessed fidelity of the methods in approximating the black-box output. First, we compared the ability of the approximators to imitate behaviour of the black-box, denoted as Approximator fidelity.
187
+
188
+ (See Supplementary Material B.4 for details about how each approximator fidelity is evaluated.) As shown in Table 2, VIBI has a better approximator fidelity than Saliency, LIME and SHAP in most cases. VIBI and L2X showed similar levels of approximator fidelity, so we further compared them based on Rationale fidelity. The difference between approximator and rationale fidelity is as follows. Approximator fidelity is quantified by prediction performance of the approximators that takes $\mathbf { t } ^ { * }$ , the continuous relaxation of $\mathbf { t }$ , as an input and the black-box output as a targeted label; rationale fidelity is quantified by using t instead of $\mathbf { t } ^ { * }$ . Note that t only takes the top $k$ chunks and sets the others to be zero, while $\mathbf { t } ^ { * }$ sets the others to be small, non-zero values. Therefore, rationale fidelity allows to evaluate how much information purely flows through the explanations, not through a narrow crack made during the continuous relaxation procedure. As shown in Table 2, VIBI has a better rationale fidelity than L2X in most cases. Note that L2X can be viewed as a special case of VIBI without the compressiveness term, i.e., $\beta = 0$ . The rationale fidelity empirically demonstrates that the compressiveness term can help the information to flow purely through the explanations.
189
+
190
+ # 5 CONCLUSION
191
+
192
+ We employ the information bottleneck principle as a criterion for learning ‘good’ explanations. Instance-wisely selected cognitive chunks work as an information bottleneck, hence, provide concise but comprehensive explanations for each decision made by a black-box system. The information bottleneck framework provides a theoretical background that the bottleneck captures a minimal sufficient statistic, i.e. the most compressed representation that captures all the possible (i.e. sufficient) amount of information about output. For finite $\cdot$ , the bottleneck approximates such a minimal sufficient statistic.
193
+
194
+ However, the way this information is represented may have a substantial effect on interpretability. VIBI helps to address this issue to some extent by always returning a certain form of output (i.e., a $k$ -hot vector z assigned to each chunk) and having a certain form of the information bottleneck layer (i.e., a masked input) so that it makes sure that the explanations are easily understandable to humans. In practice, such a chunking strategy leads to a deviation from the strict theory that a ’good’ explanation is the most compressed one but helps to achieve better interpretability in practice.
195
+
196
+ # REFERENCES
197
+
198
+ Alexander A Alemi, Ian Fischer, Joshua V Dillon, and Kevin Murphy. Deep variational information bottleneck. International Conference on Learning Representations, 2017.
199
+
200
+ Sebastian Bach, Alexander Binder, Grégoire Montavon, Frederick Klauschen, Klaus-Robert Müller, and Wojciech Samek. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PLoS ONE, 10(7):e0130140, 2015.
201
+
202
+ David Baehrens, Timon Schroeter, Stefan Harmeling, Motoaki Kawanabe, Katja Hansen, and KlausRobert Müller. How to explain individual classification decisions. Journal of Machine Learning Research, 11(Jun):1803–1831, 2010.
203
+
204
+ Alexander Binder, Grégoire Montavon, Sebastian Lapuschkin, Klaus-Robert Müller, and Wojciech Samek. Layer-wise relevance propagation for neural networks with local renormalization layers. In International Conference on Artificial Neural Networks, pp. 63–71. Springer, 2016.
205
+
206
+ Jianbo Chen, Le Song, Martin J Wainwright, and Michael I Jordan. Learning to explain: An information-theoretic perspective on model interpretation. International Conference on Machine Learning (ICML), 2018.
207
+
208
+ Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, 2012.
209
+
210
+ Piotr Dabkowski and Yarin Gal. Real time image saliency for black box classifiers. In Advances in Neural Information Processing Systems, pp. 6967–6976, 2017.
211
+
212
+ Finale Doshi-Velez and Been Kim. Towards a rigorous science of interpretable machine learning. arXiv preprint arXiv:1702.08608, 2017.
213
+
214
+ Ruth C Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3429–3437, 2017.
215
+
216
+ Steven Henikoff and Jorja G Henikoff. Amino acid substitution matrices from protein blocks. Proceedings of the National Academy of Sciences, 89(22):10915–10919, 1992.
217
+
218
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. International Conference on Learning Representations, 2017.
219
+
220
+ Emmi Jokinen, Markus Heinonen, Jani Huuhtanen, Satu Mustjoki, and Harri Lähdesmäki. Tcrgp: Determining epitope specificity of t cell receptors. bioRxiv, pp. 542332, 2019.
221
+
222
+ Vanessa Isabell Jurtz, Leon Eyrich Jessen, Amalie Kai Bentzen, Martin Closter Jespersen, Swapnil Mahajan, Randi Vita, Kamilla Kjærgaard Jensen, Paolo Marcatili, Sine Reker Hadrup, Bjoern Peters, et al. Nettcr: sequence-based prediction of tcr binding to peptide-mhc complexes using convolutional neural networks. bioRxiv, pp. 433706, 2018.
223
+
224
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
225
+
226
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
227
+
228
+ Zachary C Lipton. The mythos of model interpretability. arXiv preprint arXiv:1606.03490, 2016.
229
+
230
+ Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems, pp. 4765–4774, 2017.
231
+
232
+ Grant Lythe, Robin E Callard, Rollo L Hoare, and Carmen Molina-París. How many TCR clonotypes does a body maintain? Journal of Theoretical Biology, 389:214–224, 2016.
233
+
234
+ Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pp. 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics. URL http: //www.aclweb.org/anthology/P11-1015.
235
+
236
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
237
+
238
+ Vitali Petsiuk, Abir Das, and Kate Saenko. Rise: Randomized input sampling for explanation of black-box models. The British Machine Vision Conference, 2018.
239
+
240
+ Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Why should i trust you?: Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1135–1144. ACM, 2016.
241
+
242
+ Andrew Slavin Ross, Michael C. Hughes, and Finale Doshi-Velez. Right for the right reasons: Training differentiable models by constraining their explanations. In Proceedings of the TwentySixth International Joint Conference on Artificial Intelligence, pp. 2662–2670, 2017.
243
+
244
+ Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3145–3153. JMLR. org, 2017.
245
+
246
+ Mikhail Shugay, Dmitriy V Bagaev, Ivan V Zvyagin, Renske M Vroomans, Jeremy Chase Crawford, Garry Dolton, Ekaterina A Komech, Anastasiya L Sycheva, Anna E Koneva, Evgeniy S Egorov, et al. Vdjdb: a curated database of t-cell receptor sequences with known antigen specificity. Nucleic Acids Research, 46(D1):D419–D427, 2017.
247
+
248
+ Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
249
+
250
+ Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013.
251
+
252
+ Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg. Smoothgrad: removing noise by adding noise. arXiv preprint arXiv:1706.03825, 2017.
253
+
254
+ Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3319–3328. JMLR. org, 2017.
255
+
256
+ Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In Information Theory Workshop (ITW), 2015 IEEE, pp. 1–5. IEEE, 2015.
257
+
258
+ Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
259
+
260
+ Randi Vita, James A Overton, Jason A Greenbaum, Julia Ponomarenko, Jason D Clark, Jason R Cantrell, Daniel K Wheeler, Joseph L Gabbard, Deborah Hix, Alessandro Sette, et al. The immune epitope database (iedb) 3.0. Nucleic Acids Research, 43(D1):D405–D412, 2014.
261
+
262
+ Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European Conference on Computer Vision, pp. 818–833. Springer, 2014.
263
+
264
+ Luisa M Zintgraf, Taco S Cohen, Tameem Adel, and Max Welling. Visualizing deep neural network decisions: Prediction difference analysis. International Conference on Learning Representations, 2017.
265
+
266
+ # A VARIATIONAL INFERENCE TO CONSTRUCT A LOWER BOUND ON THE IB OBJECTIVE
267
+
268
+ We illustrate the variational approximation of the following information bottleneck objective:
269
+
270
+ $$
271
+ p ( \mathbf { t } | \mathbf { x } ) = \operatorname * { a r g m a x } _ { p ( \mathbf { t } | \mathbf { x } ) , p ( \mathbf { y } | \mathbf { t } ) , p ( \mathbf { t } ) } \ I ( \mathbf { t } , \mathbf { y } ) - \beta \operatorname { I } ( \mathbf { x } , \mathbf { t } )
272
+ $$
273
+
274
+ Let us start with the Markov chain assumption $\textbf { y } \textbf { x } \textbf { t }$ , which also implies $\mathbf { y } \gets \mathbf { x } \gets \mathbf { t }$ . Therefore, the condition is written as $\mathbf { y } \mathbf { x } \mathbf { t }$ (Cover & Thomas, 2012). Using this condition, we factorize the joint distribution $p ( \mathbf { y } , \mathbf { x } , \mathbf { t } )$ :
275
+
276
+ $$
277
+ p ( \mathbf { y } , \mathbf { x } , \mathbf { t } ) = p ( \mathbf { x } ) p ( \mathbf { t } | \mathbf { x } ) p ( \mathbf { y } | \mathbf { t } , \mathbf { x } ) = p ( \mathbf { x } ) p ( \mathbf { t } | \mathbf { x } ) p ( \mathbf { y } | \mathbf { t } )
278
+ $$
279
+
280
+ where $p ( \mathbf { y } \vert \mathbf { t } , \mathbf { x } ) = p ( \mathbf { y } \vert \mathbf { t } )$ by the Markov chain.
281
+
282
+ Now, we will examine each of the expressions in the information bottleneck objective $\mathbf { I } ( \mathbf { t } , \mathbf { y } ) -$ $\beta \operatorname { I } ( \mathbf { x } , \mathbf { t } )$ in turn.
283
+
284
+ # (I) VARIATIONAL LOWER BOUND FOR $\operatorname { I } ( \mathbf { x } , \mathbf { t } )$
285
+
286
+ We first show that $\operatorname { I } ( \mathbf { x } , \mathbf { t } ) \leq \operatorname { I } ( \mathbf { x } , \mathbf { z } ) + C$ where $C$ is a constant and then use the lower bound for $- \mathrm { I } ( \mathbf { x } , \mathbf { z } ) - C$ as a lower bound for $- \mathrm { I } ( \mathbf { x } , \mathbf { t } )$ .
287
+
288
+ First, we prove $\operatorname { I } ( \mathbf { x } , \mathbf { t } ) \leq \operatorname { I } ( \mathbf { x } , \mathbf { z } ) + C$ . From the Markov Chain $\mathbf { x } ( \mathbf { x } , \mathbf { z } ) \mathbf { t }$ , we have $\mathbf { I } ( \mathbf { x } , \mathbf { t } ) \leq$ $\begin{array} { r } { \operatorname { I } ( \mathbf { x } , ( \mathbf { x } , \mathbf { z } ) ) } \end{array}$ . According to the chain rule for mutual information, $\operatorname { I } ( \mathbf { x } , ( \mathbf { x } , \mathbf { z } ) ) = \operatorname { I } ( \mathbf { x } , \mathbf { z } ) + \operatorname { I } ( \mathbf { x } , \mathbf { x } | \mathbf { z } )$ , where $\operatorname { I } ( \mathbf { x } , \mathbf { x } | \mathbf { z } ) = \operatorname { H } ( \mathbf { \bar { x } } | \mathbf { z } ) + \operatorname { H } ( \mathbf { x } | \mathbf { z } ) - \operatorname { H } ( \mathbf { x } , \mathbf { x } | \mathbf { z } )$ . Further, $\mathrm { H } ( \mathbf { x } | \mathbf { z } ) \leq \mathrm { H } ( \mathbf { x } )$ . Putting these pieces together, we have
289
+
290
+ $$
291
+ \mathrm { I } ( \mathbf { x } , \mathbf { t } ) \leq \mathrm { I } ( \mathbf { x } , \mathbf { z } ) + \mathrm { H } ( \mathbf { x } )
292
+ $$
293
+
294
+ where entropy $\mathrm { H } ( \mathbf { x } )$ of input is a constant. For simplicity, we denote it as $C$ .
295
+
296
+ We then approximate $p ( \mathbf { z } )$ using $r ( \mathbf { z } )$ . From the fact that Kullback Leibler divergence is always positive, we have
297
+
298
+ $$
299
+ \begin{array} { r l } & { \mathbb { E } _ { ( \mathbf { x } , \mathbf { z } ) \sim p ( \mathbf { x } , \mathbf { z } ) } \left[ \log p ( \mathbf { z } ) \right] = \mathbb { E } _ { \mathbf { z } \sim p ( \mathbf { z } ) } \left[ \log p ( \mathbf { z } ) \right] } \\ & { \qquad \quad \geq \mathbb { E } _ { \mathbf { z } \sim p ( \mathbf { z } ) } \left[ \log r ( \mathbf { z } ) \right] } \\ & { \qquad = \mathbb { E } _ { ( \mathbf { x } , \mathbf { z } ) \sim p ( \mathbf { x } , \mathbf { z } ) } \left[ \log r ( \mathbf { z } ) \right] . } \end{array}
300
+ $$
301
+
302
+ From (6) and (7), we have
303
+
304
+ $$
305
+ \begin{array} { l } { \displaystyle \mathrm { I } ( \mathbf { x } , \mathbf { t } ) \leq \mathrm { I } ( \mathbf { x } , \mathbf { z } ) + C } \\ { \displaystyle = \mathbb { E } _ { ( \mathbf { x } , \mathbf { z } ) \sim p ( \mathbf { x } , \mathbf { z } ) } \left[ \log \frac { p ( \mathbf { z } | \mathbf { x } ) } { p ( \mathbf { z } ) } \right] + C } \\ { \displaystyle \leq \mathbb { E } _ { ( \mathbf { x } , \mathbf { z } ) \sim p ( \mathbf { x } , \mathbf { z } ) } \left[ \log \frac { p ( \mathbf { z } | \mathbf { x } ) } { r ( \mathbf { z } ) } \right] + C } \\ { \displaystyle = \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , r ( \mathbf { z } ) ) + C . } \end{array}
306
+ $$
307
+
308
+ (II) VARIATIONAL LOWER BOUND FOR $\operatorname { I } ( \mathbf { t } , \mathbf { y } )$
309
+
310
+ Starting with $\operatorname { I } ( \mathbf { t } , \mathbf { y } )$ , we have
311
+
312
+ $$
313
+ \begin{array} { l } { { \displaystyle { \bf { I } } ( { \bf { t } } , { \bf { y } } ) = \mathbb { E } _ { ( { \bf { t } } , { \bf { y } } ) \sim p ( { \bf { t } } , { \bf { y } } ) } \left[ \log \frac { p ( { \bf { y } } , { \bf { t } } ) } { p ( { \bf { y } } ) p ( { \bf { t } } ) } \right] } \ ~ } \\ { ~ = \mathbb { E } _ { ( { \bf { t } } , { \bf { y } } ) \sim p ( { \bf { t } } , { \bf { y } } ) } \left[ \log \frac { p ( { \bf { y } } | { \bf { t } } ) } { p ( { \bf { y } } ) } \right] } \\ { ~ = \mathbb { E } _ { ( { \bf { t } } , { \bf { y } } ) \sim p ( { \bf { t } } , { \bf { y } } ) } \left[ \log p ( { \bf { y } } | { \bf { t } } ) \right] - \mathbb { E } _ { { \bf { y } } \sim p ( { \bf { y } } ) } \left[ \log p ( { \bf { y } } ) \right] } \\ { ~ = \mathbb { E } _ { ( { \bf { t } } , { \bf { y } } ) \sim p ( { \bf { t } } , { \bf { y } } ) } \left[ \log p ( { \bf { y } } | { \bf { t } } ) \right] + \mathrm { { C o n s t . } } } \end{array}
314
+ $$
315
+
316
+ Note that $\mathrm { H } ( \mathbf { y } ) = - \mathbb { E } _ { \mathbf { y } \sim p ( \mathbf { y } ) } \left[ \log p ( \mathbf { y } ) \right]$ is independent of the optimization procedure, hence can be ignored. Now, we use $q ( \mathbf { y } \vert \mathbf { t } )$ to approximate $p ( \mathbf { y } \vert \mathbf { t } )$ which works as an approximator to the black-box system. Using the fact that Kullback Leibler divergence is always positive, we have
317
+
318
+ $$
319
+ \mathbb { E } _ { \mathbf { y } | \mathbf { t } \sim p ( \mathbf { y } | \mathbf { t } ) } \left[ \log p ( \mathbf { y } | \mathbf { t } ) \right] \geq \mathbb { E } _ { \mathbf { y } | \mathbf { t } \sim p ( \mathbf { y } | \mathbf { t } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right]
320
+ $$
321
+
322
+ and
323
+
324
+ $$
325
+ \begin{array} { r l } & { \mathbf { I ( t , y ) } \geq \mathbb { E } _ { ( \mathbf { t } , \mathbf { y } ) \sim p ( \mathbf { t } , \mathbf { y } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] } \\ & { \qquad = \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathbb { E } _ { \mathbf { y } | \mathbf { x } \sim p ( \mathbf { y } | \mathbf { x } ) } \mathbb { E } _ { \mathbf { t } | \mathbf { x } , \mathbf { y } \sim p ( \mathbf { t } | \mathbf { x } , \mathbf { y } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] } \\ & { \qquad = \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathbb { E } _ { \mathbf { y } | \mathbf { x } \sim p ( \mathbf { y } | \mathbf { x } ) } \mathbb { E } _ { \mathbf { t } | \mathbf { x } \sim p ( \mathbf { t } | \mathbf { x } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] } \end{array}
326
+ $$
327
+
328
+ where $p ( \mathbf { t } | \mathbf { x } , \mathbf { y } ) = p ( \mathbf { t } | \mathbf { x } )$ by the Markov chain assumption $\mathbf { y } \mathbf { x } \mathbf { t }$
329
+
330
+ (III) VARIATIONAL LOWER BOUND FOR $\operatorname { I } ( \mathbf { t } , \mathbf { y } ) - \beta \operatorname { I } ( \mathbf { x } , \mathbf { t } )$
331
+
332
+ In summary, we have the following variational bounds for each term.
333
+
334
+ $$
335
+ \begin{array} { r l } & { \mathrm { I } ( \mathbf { t } , \mathbf { y } ) \geq \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathbb { E } _ { \mathbf { y } \mid \mathbf { x } \sim p ( \mathbf { y } \mid \mathbf { x } ) } \mathbb { E } _ { \mathbf { t } \mid \mathbf { x } \sim p ( \mathbf { t } \mid \mathbf { x } ) } \left[ \log q ( \mathbf { y } \mid \mathbf { t } ) \right] } \\ & { \mathrm { I } ( \mathbf { x } , \mathbf { t } ) \leq \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } D _ { \mathrm { K L } } ( p ( \mathbf { z } \mid \mathbf { x } ) , r ( \mathbf { z } ) ) + C } \end{array}
336
+ $$
337
+
338
+ which result in
339
+
340
+ $$
341
+ \begin{array} { r l } & { \mathbf { I } ( \mathbf { t } , \mathbf { y } ) \ - \ \beta \ \mathbf { I } ( \mathbf { x } , \mathbf { t } ) } \\ & { \quad \geq \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathbb { E } _ { \mathbf { y } | \mathbf { x } \sim p ( \mathbf { y } | \mathbf { x } ) } \mathbb { E } _ { \mathbf { t } | \mathbf { x } \sim p ( \mathbf { t } | \mathbf { x } ) } \left[ \log q ( \mathbf { y } | \mathbf { t } ) \right] - \beta \ \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , r ( \mathbf { z } ) ) + \mathrm { C o n s t . } } \end{array}
342
+ $$
343
+
344
+ With proper choices of $r ( \mathbf { z } )$ and $p ( \mathbf { z } | \mathbf { x } )$ , we assume that the Kullback-Leibler divergence $D _ { \mathrm { K L } } ( p ( \mathbf { z } | \mathbf { x } ) , r ( \mathbf { z } ) )$ is integrated analytically. We use the empirical data distribution to approximate $p ( \mathbf { x } , \mathbf { y } ) = p ( \mathbf { x } ) p ( \mathbf { y } | \mathbf { x } )$ and $p ( \mathbf { x } )$ .
345
+
346
+ Our variational approximation is similar to the one from Alemi et al. (2017), which first developed variational lower bound on the information bottleneck for deep neural networks. However, our information bottleneck is different from theirs: their information bottleneck is the stochastic encoding $\mathbf { z }$ of the input $\mathbf { x }$ as itself, whereas our information bottleneck is a pairwise product of the stochastic encoding $\mathbf { z }$ and the input $\mathbf { x }$ where $\mathbf { z }$ is a Boolean random vector. Due to this difference, we appproximate $\mathbf { I } ( \mathbf { x } , \mathbf { t } )$ by using the lower bound of $\mathbf { I } ( \mathbf { x } , \mathbf { z } )$ , instead of directly deriving the lower bound of $\operatorname { I } ( \mathbf { x } , \mathbf { t } )$ .
347
+
348
+ # B EXPERIMENTAL DETAILS
349
+
350
+ The settings of hyperparameter tuning include the followings (bold indicate the choice for our final model): the temperature for Gumbel-softmax approximation $\tau - \{ 0 . 1 , 0 . 2 , 0 . 5 , 0 . 7 , 1 \}$ , learning rate – $5 \times 1 0 ^ { - 3 }$ , $\mathrm { \bar { 1 0 } ^ { - 3 } }$ , $5 \times 1 0 ^ { - 4 }$ , $\bf { 1 0 ^ { - 4 } }$ , $5 \times 1 0 ^ { - 5 } \}$ and $\beta - \{ 0 , 0 . 0 0 1 , \mathbf { 0 . 0 1 } , 0 . 1 , 1 , 1 0 , 1 0 0 \}$ . We use Adam algorithm (Kingma & Ba, 2014) with batch size 100 for MNIST and 50 for IMDB, the coefficients used for computing running averages of gradient and its square $( \beta _ { 1 } , \beta _ { 2 } ) = ( 0 . 5 , 0 . 9 9 9 )$ , and $\epsilon = 1 0 ^ { - 8 }$ . We tuned the hyperparameters via grid search and picked up the hyperparameters that yield the best fidelity score on the validation set. All implementation is performed via PyTorch an open source deep learning platform (Paszke et al., 2017).
351
+
352
+ Approximator fidelity is prediction performance of the approximator that takes relaxation $\mathbf { t } ^ { * }$ as an input and black-box output as a target. In detail, we get a $\mathbf { t } ^ { * }$ with the Gumble-softmax sampling and make a prediction based on $\mathbf { t } ^ { * }$ . This procedure is repeated for 12 times and the final prediction is made by averaging the 12 prediction scores. Rationale fidelity is prediction performance of the approximator that takes $\mathbf { t }$ as an input and black-box output as a target. (Note that $\mathbf { t }$ is a masked input that only takes the top $k$ chunks and set others to zero.) The final prediction is made by its prediction score. We use the prior $-$ for all experiments where $J$ is the total number of chunks and $\begin{array} { r } { r ( { \bf z } ) = \prod _ { j } r _ { j } ( { \bf z } _ { j } ) } \end{array}$ . The analytical form of the Kullback-Leibler divergence term is $-$ $-$
353
+
354
+ # B.1 LSTM MOVIE SENTIMENT PREDICTION MODEL USING IMDB
355
+
356
+ Black-Box Model Structure. Each review is padded or cut to contain 15 sentences and 50 words for each sentence. The architecture consists of a word-embedding layer with size 50 for each word followed by two bidirectional LSTMs, a fully connected layer with two units, and a soft-max layer. The first LSTM layer encodes the word embedding vector and generates a word-representation vector with size 100 for each word. Within each sentence, the word representation vectors are elementwisely averaged to form a size 100 sentence representation vector. The second LSTM layer encodes the sentence representation vector and generates a size 60 review embedding vector.
357
+
358
+ VIBI Structure. We parameterize the explainer with a bidirectional LSTM and approximator with a 2D CNN. For the explainer, we use a bidirectional layer that returns multiple output vectors, each of which corresponds to a recurrent unit. Each element in the output vectors are averaged over all units, and then the averaged output vector is followed by log-softmax calculation. As a result, the explainer returns a vector of log-probabilities, each of which indicates whether or not each cognitive chunk will be selected as an input to the approximator. For the approximator, we use a convolutional layer followed by a ReLU activation function and max-pooling layer and a fully connected layer returning a size-2 vector followed by a log-softmax calculation. The final layer returns a vector of log-probabilities for the two sentiments (positive/negative).
359
+
360
+ # B.2 CNN DIGIT RECOGNITION MODEL USING MNIST
361
+
362
+ Black-Box Model Structure. The architecture consists of two convolutional layers with the kernel size 5 followed by a max-pooling layer with the pool size 2, two fully connected layers and a soft-max layer. The two convolutional layers contain 10 and 20 filters respectively and the two fully connected layers are composed of 50 and 10 units respectively.
363
+
364
+ VIBI Structure. We parameterize each the explainer and approximator using 2D CNNs. Structure of the explainer differs depending on the chunk size. For example, when $4 \times 4$ cognitive chunk is used, we use two convolutional layers with the kernel size 5 followed by a ReLU activation function and max-pooling layer with the pool size 2, and one convolutional layer with kernel size 1 returning a $7 \times 7$ 2D matrix followed by a log-softmax calculation. The final layer returns a vector of log-probabilities for the 49 chunks. The three convolutional layers contains 8, 16, and 1 filters respectively. The output from the explainer indicates which cognitive chunks should be taken as an input for the approximator. We parameterize the approximator using two convolutional layers with kernel size 5 followed by a ReLU activation function and max-pooling layer with pool size 2 and with 32 and 64 filters respectively, and one fully connected layer returning a size-10 vector followed by a log-softmax calculation so that the final layer returns a vector of log-probabilities for the ten digits.
365
+
366
+ B.3 TCR TO EPITOPE BINDING PREDICTION MODEL USING VDJDB AND IEDB
367
+
368
+ Data. We use two public datasets: VDJdb and IEDB. VDJdb (Shugay et al., 2017) contains the T-cell receptor (TCR) sequences with known antigen specificity (i.e., epitope sequences). We use a VDJdb dataset preprocessed by Jokinen et al. (2019) (See their paper for details in data preprocessing). The preprocessed dataset contains 5,784 samples (2,892 positively and 2,892 negatively binding pairs of TCR and epitope). This dataset consists of 4,363 unique TCR sequences and 21 unique epitope sequences. We group the pairs of TCR and epitope sequences into training, validation, and test sets, which have 4,627, 578, and 579 pairs, respectively. IEDB (Vita et al., 2014) contains TCR sequences and corresponding epitopes. We used an IEDB dataset preprocessed by Jurtz et al. (2018). The preprocessed dataset contains 9,328 samples (positively binding pairs only) and consists of 9,221 unique TCR sequences and 98 unique epitopes sequences. We used the IEDB dataset as out-ouf-samples. There are 6 epitopes contained in both VDJdb and IEDB dataset: GILGFVFTL, GLCTLVAML, NLVPMVATV, LLWNGPMAV, YVLDHLIVV, CINGVCWTV.
369
+
370
+ Black-Box Model Structure. Each TCR and epitope sequence is padded or cut to contain 20 and 13 amino acids, respectively. The embedding matrix has a size 24 and is initialized with BLOSUM50 matrix (Henikoff & Henikoff, 1992). The architecture consists of two sequence encoders that process TCR and epitope sequences each, and three dense layers that process the encoded sequences together. The TCR encoder consists of a dropout layers with the drop-out probability 0.3, two convolutional layers with the kernel size 3 followed by a batch normalization layer, a ReLU activation function and max-pooling layer with the pool size 3. The two convolutional layers contain 32 and 16 filters respectively. Structure of the epitope encoder is the same with the one from the TCR encoder. We optimized the models with the following search space (bold indicate the choice for our final model): the batch size – $\{ 2 5 , 5 0 , 1 0 0 \}$ , learning rate $\mathbf { - 0 . 0 5 , 0 . 0 1 , 0 . 0 0 5 , 0 . 0 0 1 , 0 . 0 0 0 5 } \}$ and filter size – $\left\{ ( 1 6 , 8 ) , ( { \bf 3 2 } , { \bf 1 6 } ) \right\}$ .
371
+
372
+ VIBI Structure. We parameterize the explainer and approximator using 2D CNNs and several dense layers. Each TCR and epitope sequence is preprocessed and embedded in the same way as for the black-box model. We have two types of explainers: one for TCR sequence and another for epitope sequence. Each explainer encodes both TCR and epitope sequences and concatenates them through three dense layers followed by a ReLU activation function. For the TCR explainer, the three dense layers contain 32, 16, 20 hidden-units, respectively. For the epitope explainer, the three dense layers contain 32, 16, 13 hidden-units, respectively. The TCR and epitope encoders have the same architectures with those of the black-box model. Each explainer then returns a vector of log-probabilities that indicate which peptides in TCR or epitope should be selected as an explanation. The approximator has the same architecture as the black-box model. We optimize the models with the following search space (bold indicate the choice for our final model): the batch size – $\{ 2 5 , 5 0 , 1 0 0 \}$ , learning rate $- 0 . 0 0 0 1 , \mathbf { 0 . 0 0 1 } , 0 . 0 1 , 0 . 1 \}$ .
373
+
374
+ # B.4 BASELINE METHODS
375
+
376
+ Hyperparameter tuning. For L2X, we used the same hyperparameter search space of VIBI. For LIME, we tuned the segmentation filter size over $\{ 1 , 2 , 4 \}$ for MNIST and $\{ \mathbf { 1 0 } , 2 5 \}$ for IMDB. For all methods, we tuned the hyperparameters via grid search and picked up the hyperparameters that yield the best fidelity score on the validation set.
377
+
378
+ Cognitive chunk. LIME, SHAP and Saliency yield an attribution score for each feature. A chunk-attribution score is an average of (absolute) attribution scores of features that belong to the chunk. Top $k$ chunks that have the highest chunk-attribution scores are selected. L2X selects chunks in the same way as VIBI.
379
+
380
+ Fidelity evaluation. LIME, SHAP, Saliency, and L2X all have their own approximators. LIME and SHAP have a sparse linear approximator for each black-box instance (See Section 3.4 in Ribeiro et al. (2016), and Equation (3) in Lundberg & Lee (2017)). Saliency has a 1st-order Taylor approximation to each black-box instance (See Equation (3) in Simonyan et al. (2013)). The approximator fidelity of LIME, SHAP, and Saliency is calculated using their proposed approximators that are composed of the selected features. L2X has a deep neural network that approximates a black-box model (See Section 4 in Chen et al. (2018)). The approximator and rationale fidelity of L2X is calculated in the same way as VIBI.
381
+
382
+ # C INTERPRETABILITY EVALUATED BY HUMANS
383
+
384
+ C.1 LSTM MOVIE SENTIMENT PREDICTION MODEL USING IMDB DATASET
385
+
386
+ EVALUATION
387
+
388
+ Table 3: Evaluation of Interpretability on an LSTM movie sentiment prediction model using IMDB.
389
+
390
+ <table><tr><td>Black-Box Output</td><td>Recognized by Mturk worker</td><td>Saliency</td><td>LIME</td><td>L2X</td><td>VIBI (Ours)</td></tr><tr><td>Positive</td><td>Positive</td><td>19.8</td><td>17.4</td><td>17.6</td><td>24.3</td></tr><tr><td>Positive</td><td>Negative</td><td>12.6</td><td>6.8</td><td>7.2</td><td>16.9</td></tr><tr><td>Positive</td><td>Neutral</td><td>25.6</td><td>18.8</td><td>24.2</td><td>11.1</td></tr><tr><td>Negative</td><td>Positive</td><td>11.0</td><td>10.6</td><td>11.6</td><td>16.2</td></tr><tr><td>Negative</td><td>Negative</td><td>14.4</td><td>16.4</td><td>18.0</td><td>20.4</td></tr><tr><td>Negative</td><td>Neutral</td><td>16.6</td><td>30.0</td><td>21.4</td><td>11.2</td></tr></table>
391
+
392
+ The percentage of samples belongs to each combination of the black-box output and the sentiment recognized by workers at Amazon Mechanical Turk (https://www.mturk. com/) are showed
393
+
394
+ We evaluated interpretability of the methods on the LSTM movie sentiment prediction model. The interpretable machine learning methods were evaluated by workers at Amazon Mechanical Turk (https://www.mturk.com/) who are awarded the Masters Qualification (i.e. high performance workers who have demonstrated excellence across a wide range of task). Randomly selected instances (200 for VIBI and 100 for the others) were evaluated for each method. 5 workers are assigned per instance.
395
+
396
+ We provided instances that the black-box model had correctly predicted and asked humans to infer the output of the primary sentiment of the movie review (Positive/Negative/Neutral) given five key words selected by each method. See the survey example below for further details. Note that this is a proxy for measuring how well humans infer the black-box output given explanations; we use such proxy because the workers are general public who are not familiar with the term ‘black-box’ or ‘output of the model.’
397
+
398
+ In Table 3, the percentage of samples belongs to each combination of the black-box output and the sentiment recognized by the workers are showed. VIBI has the highest percentage of samples belonging to the Positive/Positive or Negative/Negataive and the lowest percentage of samples belonging to the Positive/Neutral or Negative/Neutral. LIME has the lowest percentage of samples belonging to the Positive/Negative or Negative/Positive, but it is because LIME tends to select words such as ‘that’, ‘the’, ‘is’ so that most of samples are recognized as Neutral.
399
+
400
+ # SURVEY EXAMPLE FOR IMDB
401
+
402
+ Title: Label sentiment given a few words.
403
+ Description: Recognize the primary sentiment of the movie review given a few words only.
404
+
405
+ ![](images/a89dc647c064ea5399f30471906485ddcb17f8ce568007069d5dd92cadfe1a4c.jpg)
406
+ Figure 5: A survey example of MTurk evaluation on the LSTM movie sentiment prediction model
407
+
408
+ C.2 CNN DIGIT RECOGNITION MODEL USING MNIST
409
+
410
+ EVALUATION
411
+
412
+ Table 4: Evaluation of Interpretability on a 2d CNN digit recognition model using MNIST.
413
+
414
+ <table><tr><td>MNIST Digit</td><td>Saliency</td><td>LIME</td><td>L2X</td><td>VIBI (Ours)</td></tr><tr><td>0</td><td>3.200</td><td>2.000</td><td>2.333</td><td>3.000</td></tr><tr><td>1</td><td>4.393</td><td>0.795</td><td>1.263</td><td>3.913</td></tr><tr><td>2</td><td>3.125</td><td>1.200</td><td>1.400</td><td>3.200</td></tr><tr><td>3</td><td>3.286</td><td>1.833</td><td>2.429</td><td>3.625</td></tr><tr><td>4</td><td>3.333</td><td>1.000</td><td>1.857</td><td>3.857</td></tr><tr><td>5</td><td>3.167</td><td>1.381</td><td>2.000</td><td>2.875</td></tr><tr><td>6</td><td>3.333</td><td>1.000</td><td>1.889</td><td>3.625</td></tr><tr><td>7</td><td>3.667</td><td>2.000</td><td>1.667</td><td>4.000</td></tr><tr><td>8</td><td>3.750</td><td>1.333</td><td>2.667</td><td>3.500</td></tr><tr><td>9</td><td>3.222</td><td>1.143</td><td>1.857</td><td>3.667</td></tr><tr><td>Ave. over digits</td><td>3.448</td><td>1.369</td><td>1.936</td><td>3.526</td></tr></table>
415
+
416
+ The average scores (0–5 scale) evaluated by graduate students at XXX University (Blinded due to the double blinding reviewing) are showed.
417
+
418
+ We evaluated interpretability of the methods on the CNN digit recognition model. The interpretable machine learning methods were evaluated by 16 graduate students at XXX University (Blinded due to the double blinding reviewing) who have taken at least one graduate-level machine learning class. Randomly selected 100 instances were evaluated for each method. On average, 4.26 students are assigned per instance. See the survey example below for further details. For the digit recognition model, we asked humans to directly score the explanation on a 0–5 scale.
419
+
420
+ In Table 4, the average score per digit is showed. VIBI outperforms L2X and LIME and slightly outperforms Saliency in terms of the average score over digits. VIBI outperforms at digit 2, 3, 4, 6, 7, and 9, and performs comparable to Saliency at 0, 1, 5, 8.
421
+
422
+ ![](images/aeddd4f8cdeed0dfa41531477cba9aa19accb17a3dac2b3f68ec9854cb6df00c.jpg)
423
+ Figure 6: The hand-written digits and explanations provided by VIBI and the baselines. The examples are randomly selected from the validation set. The selected patches are colored red if the pixel is activated (i.e. white) and yellow otherwise (i.e. black). A patch composed of $4 \times 4$ pixels is used as a cognitive chunk and $k = 4$ patches are identified for each image.
424
+
425
+ # SURVEY EXAMPLE FOR MNIST
426
+
427
+ # Instruction
428
+
429
+ ● 2D CNN model is used for digit recognition for MNIST dataset ● Now, an interpretable learning method explains a decision made by the 2D CNN model:
430
+
431
+ ![](images/a48e09c8712277f6325f7cc8a875dcb5cc15d38696991ab75d31274820460922.jpg)
432
+
433
+ Recognized as 9
434
+
435
+ Explain by highlighting key pixels that play an important role in the 2D CNN digit recognition.
436
+
437
+ ![](images/a238bd5f5349a5008b2354920ed88c05770b46e4f6bd49820a4910fa750985ac.jpg)
438
+
439
+ MNIST is a large dataset contains $2 8 \times 2 8$ sized images of handwritten digits (0 to 9). Here, a 2D convolutional neural network (CNN) is used for the digit recognition for MNIST. Several interpretable machine learning methods are learned to explain the model by highlighting key pixels that play an important role in the CNN digit recognition. The highlighted pixels provides an explanation for a handwritten image why the CNN model recognized the handwriting as it does. Your task is to evaluate the explanation for each instance on a scale 0 to 5.Instruction
440
+
441
+ ![](images/8af58bf87fd7b67300c8c0109182cf97a02d4f7eaaa43a59ac5c3e12d35537ff.jpg)
442
+ Please score each instance based on following criteria:
443
+ Figure 7: A survey example of evaluation on the MNIST digit recognition model.
444
+
445
+ D FIDELITY
446
+
447
+ Table 5: Evaluation of rationale fidelity on LSTM movie sentiment prediction model using IMDB.
448
+
449
+ <table><tr><td></td><td></td><td></td><td>L2X</td><td colspan="6">VIBI (Ours)</td></tr><tr><td></td><td>chunk size</td><td>k</td><td>0</td><td>0.001</td><td>0.01</td><td>0.1</td><td>1</td><td>10</td><td>100</td></tr><tr><td rowspan="4">Accuracy</td><td>sentence</td><td>1</td><td>0.727</td><td>0.693</td><td>0.711</td><td>0.731</td><td>0.729</td><td>0.734</td><td>0.734</td></tr><tr><td>word</td><td>5</td><td>0.638</td><td>0.657</td><td>0.666</td><td>0.657</td><td>0.648</td><td>0.640</td><td>0.654</td></tr><tr><td>5 words</td><td>1</td><td>0.601</td><td>0.630</td><td>0.624</td><td>0.632</td><td>0.628</td><td>0.623</td><td>0.628</td></tr><tr><td>5 words</td><td>3</td><td>0.694</td><td>0.660</td><td>0.662</td><td>0.660</td><td>0.662</td><td>0.660</td><td>0.660</td></tr><tr><td rowspan="4">F1-score</td><td>sentence</td><td>1</td><td>0.581</td><td>0.547</td><td>0.562</td><td>0.567</td><td>0.585</td><td>0.586</td><td>0.586</td></tr><tr><td>word</td><td>5</td><td>0.486</td><td>0.521</td><td>0.551</td><td>0.512</td><td>0.516</td><td>0.508</td><td>0.526</td></tr><tr><td>5 words</td><td>1</td><td>0.478</td><td>0.506</td><td>0.500</td><td>0.540</td><td>0.501</td><td>0.498</td><td>0.504</td></tr><tr><td>5 words</td><td>3</td><td>0.551</td><td>0.528</td><td>0.529</td><td>0.522</td><td>0.529</td><td>0.528</td><td>0.525</td></tr></table>
450
+
451
+ Rationale fidelity quantifies ability of the selected chunks to infer the black-box output. A large rationale fidelity implies that the selected chunks account for a large portion of the approximator fidelity. Prediction accuracy and F1-score of the approximator for the CNN model are shown. $\beta =$ $0 , 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 , 1 0 , 1 0 0 )$
452
+
453
+ Table 6: Evaluation of approximator fidelity on LSTM movie sentiment prediction model using IMDB.
454
+
455
+ <table><tr><td></td><td></td><td></td><td>Saliency</td><td>LIME</td><td>SHAP</td><td>L2X</td><td colspan="6">VIBI (Ours)</td></tr><tr><td></td><td>chunk size</td><td>k</td><td></td><td></td><td></td><td>0</td><td>0.001</td><td>0.01</td><td>0.1</td><td>1</td><td>10</td><td>100</td></tr><tr><td rowspan="4">Accuracy</td><td>sentence</td><td>1</td><td>0.387</td><td>0.727</td><td>0.495</td><td>0.876</td><td>0.877</td><td>0.869</td><td>0.877</td><td>0.879</td><td>0.879</td><td>0.884</td></tr><tr><td>word</td><td>5</td><td>0.419</td><td>0.756</td><td>0.501</td><td>0.738</td><td>0.766</td><td>0.772</td><td>0.744</td><td>0.773</td><td>0.763</td><td>0.767</td></tr><tr><td>5 words</td><td>1</td><td>0.424</td><td>0.290</td><td>0.496</td><td>0.759</td><td>0.784</td><td>0.780</td><td>0.764</td><td>0.774</td><td>0.778</td><td>0.774</td></tr><tr><td>5 words</td><td>3</td><td>0.414</td><td>0.679</td><td>0.491</td><td>0.833</td><td>0.836</td><td>0.831</td><td>0.835</td><td>0.834</td><td>0.830</td><td>0.833</td></tr><tr><td rowspan="4">F1-score</td><td>sentence</td><td>1</td><td>0.331</td><td>0.564</td><td>0.400</td><td>0.721</td><td>0.693</td><td>0.707</td><td>0.730</td><td>0.730</td><td>0.727</td><td>0.734</td></tr><tr><td>word</td><td>5</td><td>0.350</td><td>0.585</td><td>0.413</td><td>0.565</td><td>0.607</td><td>0.616</td><td>0.594</td><td>0.620</td><td>0.609</td><td>0.612</td></tr><tr><td>5 words</td><td>1</td><td>0.360</td><td>0.302</td><td>0.418</td><td>0.621</td><td>0.641</td><td>0.622</td><td>0.624</td><td>0.615</td><td>0.622</td><td>0.616</td></tr><tr><td>5 words</td><td>3</td><td>0.352</td><td>0.523</td><td>0.409</td><td>0.680</td><td>0.683</td><td>0.674</td><td>0.681</td><td>0.677</td><td>0.669</td><td>0.682</td></tr></table>
456
+
457
+ Approximator fidelity quantifies ability of the approximator to imitate the behaviour of a black-box. Prediction accuracy and F1-score of the approximator for the LSTM model are shown. $( \beta = 0 , 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 , 1 0 , 1 0 0 )$
458
+
459
+ Table 7: Evaluation of the rationale fidelity on CNN digit recognition model using MNIST.
460
+
461
+ <table><tr><td></td><td></td><td>L2X</td><td colspan="6">VIBI (Ours)</td></tr><tr><td>chunk size</td><td>k</td><td></td><td>0.001</td><td>0.01</td><td>0.1</td><td>1</td><td>10</td><td>100</td></tr><tr><td></td><td>1×1</td><td>64 0.694</td><td>0.690</td><td>0.726</td><td>0.689</td><td>0.742</td><td>0.729</td><td>0.766</td></tr><tr><td>1×1</td><td>96</td><td>0.814</td><td>0.831</td><td>0.780</td><td>0.806</td><td>0.859</td><td>0.765</td><td>0.826</td></tr><tr><td>1×1</td><td>160</td><td>0.903</td><td>0.907</td><td>0.905</td><td>0.917</td><td>0.917</td><td>0.928</td><td>0.902</td></tr><tr><td>2×2</td><td>16</td><td>0.735</td><td>0.795</td><td>0.750</td><td>0.771</td><td>0.732</td><td>0.753</td><td>0.769</td></tr><tr><td>2×2 Accuracy</td><td>24</td><td>0.776</td><td>0.855</td><td>0.834</td><td>0.856</td><td>0.868</td><td>0.854</td><td>0.847</td></tr><tr><td>2×2</td><td>40</td><td>0.811</td><td>0.914</td><td>0.914</td><td>0.915</td><td>0.903</td><td>0.918</td><td>0.935</td></tr><tr><td>2×2</td><td>80 4</td><td>0.905</td><td>0.949</td><td>0.940</td><td>0.939</td><td>0.962</td><td>0.941</td><td>0.923</td></tr><tr><td>4×4</td><td></td><td>0.650</td><td>0.655</td><td>0.650</td><td>0.775</td><td>0.717</td><td>0.682</td><td>0.681</td></tr><tr><td>4×4</td><td>6</td><td>0.511</td><td>0.858</td><td>0.706</td><td>0.701</td><td>0.708</td><td>0.690</td><td>0.730</td></tr><tr><td>4×4</td><td>10</td><td>0.835</td><td>0.835</td><td>0.824</td><td>0.933</td><td>0.875</td><td>0.854</td><td>0.782</td></tr><tr><td>4×4</td><td>20</td><td>0.954</td><td>0.962</td><td>0.815</td><td>0.934</td><td>0.929</td><td>0.946</td><td>0.943</td></tr><tr><td></td><td>1×1</td><td>64 0.684</td><td>0.679</td><td>0.716</td><td>0.670</td><td>0.734</td><td>0.710</td><td>0.755</td></tr><tr><td></td><td>1×1</td><td>96 0.808</td><td>0.825</td><td>0.750</td><td>0.803</td><td>0.854</td><td>0.750</td><td>0.820</td></tr><tr><td>1×1</td><td>160</td><td>0.898</td><td>0.902</td><td>0.899</td><td>0.912</td><td>0.913</td><td>0.924</td><td>0.897</td></tr><tr><td>2×2</td><td>16 24</td><td>0.720</td><td>0.786</td><td>0.738</td><td>0.761</td><td>0.723</td><td>0.744</td><td>0.769</td></tr><tr><td>2×2 F1-score</td><td></td><td>0.766</td><td>0.848</td><td>0.836</td><td>0.851</td><td>0.858</td><td>0.859</td><td>0.840</td></tr><tr><td>2×2</td><td>40</td><td>0.798</td><td>0.914</td><td>0.910</td><td>0.910</td><td>0.898</td><td>0.914</td><td>0.931</td></tr><tr><td>2×2</td><td></td><td>0.901</td><td>0.946</td><td>0.936</td><td>0.930</td><td>0.959</td><td>0.938</td><td>0.918</td></tr><tr><td>4×4</td><td>80</td><td>0.634</td><td>0.658</td><td>0.637</td><td>0.763</td><td>0.704</td><td>0.671</td><td>0.669</td></tr><tr><td>4×4</td><td></td><td>0.493</td><td>0.852</td><td>0.693</td><td>0.687</td><td>0.692</td><td>0.675</td><td>0.720</td></tr><tr><td>4×4</td><td></td><td>0.828</td><td>0.827</td><td>0.816</td><td>0.928</td><td>0.869</td><td>0.849</td><td>0.773</td></tr><tr><td>4×4</td><td></td><td>0.950</td><td>0.959</td><td>0.806</td><td>0.931</td><td>0.926</td><td>0.942</td><td>0.940</td></tr></table>
462
+
463
+ Rationale fidelity quantifies ability of the selected chunks to infer the black-box output. A large rationale fidelity implies that the selected chunks account for a large portion of the approximator fidelity. Prediction accuracy and F1-score of the approximator for the CNN model are shown. $\beta =$ 0, 0.001, 0.01, 0.1, 1, 10, 100)
464
+
465
+ Table 8: Evaluation of the approximator fidelity on CNN digit recognition model using MNIST.
466
+
467
+ <table><tr><td></td><td></td><td></td><td>Saliency</td><td>LIME</td><td>SHAP</td><td>L2X</td><td colspan="6">VIBI(Ours)</td></tr><tr><td></td><td>chunk size</td><td>k</td><td></td><td></td><td></td><td>0</td><td>0.001</td><td>0.01</td><td>0.1</td><td>1</td><td>10</td><td>100</td></tr><tr><td rowspan="10">Accuracy</td><td>1×1</td><td>64</td><td>0.944</td><td>0.982</td><td>0.955</td><td>0.933</td><td>0.959</td><td>0.962</td><td>0.959</td><td>0.960</td><td>0.952</td><td>0.953</td></tr><tr><td>1×1</td><td>96</td><td>0.956</td><td>0.986</td><td>0.950</td><td>0.963</td><td>0.963</td><td>0.951</td><td>0.967</td><td>0.968</td><td>0.953</td><td>0.962</td></tr><tr><td>1×1</td><td>160</td><td>0.964</td><td>0.989</td><td>0.958</td><td>0.970</td><td>0.967</td><td>0.973</td><td>0.974</td><td>0.974</td><td>0.974</td><td>0.967</td></tr><tr><td>2×2</td><td>16</td><td>0.912</td><td>0.770</td><td>0.942</td><td>0.934</td><td>0.945</td><td>0.941</td><td>0.948</td><td>0.938</td><td>0.939</td><td>0.940</td></tr><tr><td>2×2</td><td>24</td><td>0.938</td><td>0.807</td><td>0.954</td><td>0.951</td><td>0.956</td><td>0.955</td><td>0.953</td><td>0.953</td><td>0.953</td><td>0.960</td></tr><tr><td>2×2</td><td>40</td><td>0.957</td><td>0.859</td><td>0.954</td><td>0.967</td><td>0.965</td><td>0.966</td><td>0.962</td><td>0.967</td><td>0.965</td><td>0.967</td></tr><tr><td>2×2</td><td>80</td><td>0.966</td><td>0.897</td><td>0.966</td><td>0.976</td><td>0.977</td><td>0.974</td><td>0.972</td><td>0.977</td><td>0.971</td><td>0.973</td></tr><tr><td>4×4</td><td>4</td><td>0.863</td><td>0.609</td><td>0.948</td><td>0.953</td><td>0.922</td><td>0.928</td><td>0.948</td><td>0.942</td><td>0.942</td><td>0.953</td></tr><tr><td>4×4</td><td>6</td><td>0.906</td><td>0.637</td><td>0.936</td><td>0.957</td><td>0.963</td><td>0.954</td><td>0.956</td><td>0.953</td><td>0.963</td><td>0.962</td></tr><tr><td>4×4</td><td>10</td><td>0.949</td><td>0.705</td><td>0.951</td><td>0.965</td><td>0.971</td><td>0.959</td><td>0.967</td><td>0.961</td><td>0.969</td><td>0.964</td></tr><tr><td rowspan="10"></td><td>4×4</td><td>20</td><td>0.963</td><td>0.771</td><td>0.955</td><td>0.974</td><td>0.977</td><td>0.975</td><td>0.975</td><td>0.973</td><td>0.975</td><td>0.974</td></tr><tr><td>1×1</td><td>64</td><td>0.938</td><td>0.981</td><td>0.952</td><td>0.930</td><td>0.956</td><td>0.960</td><td>0.956</td><td>0.957</td><td>0.950</td><td>0.950</td></tr><tr><td>1×1</td><td>96</td><td>0.950</td><td>0.985</td><td>0.948</td><td>0.961</td><td>0.961</td><td>0.954</td><td>0.965</td><td>0.966</td><td>0.951</td><td>0.960</td></tr><tr><td>1×1</td><td>160 16</td><td>0.959</td><td>0.989</td><td>0.954</td><td>0.969</td><td>0.965</td><td>0.971</td><td>0.973</td><td>0.972</td><td>0.972</td><td>0.966</td></tr><tr><td>2×2</td><td>24</td><td>0.902</td><td>0.755</td><td>0.938</td><td>0.930</td><td>0.942</td><td>0.936</td><td>0.944</td><td>0.934</td><td>0.936</td><td>0.936</td></tr><tr><td>2×2</td><td>40</td><td>0.932</td><td>0.795</td><td>0.951</td><td>0.949</td><td>0.954</td><td>0.952</td><td>0.950</td><td>0.951</td><td>0.950</td><td>0.958</td></tr><tr><td>2×2</td><td>80</td><td>0.952</td><td>0.853</td><td>0.946</td><td>0.965</td><td>0.963</td><td>0.964</td><td>0.961</td><td>0.965</td><td>0.963</td><td>0.965</td></tr><tr><td>2×2</td><td>4</td><td>0.962</td><td>0.892</td><td>0.963</td><td>0.974</td><td>0.976 0.917</td><td>0.973 0.923</td><td>0.972</td><td>0.975</td><td>0.969</td><td>0.971</td></tr><tr><td>4×4</td><td>6</td><td>0.849 0.895</td><td>0.588 0.621</td><td>0.943</td><td>0.951 0.954</td><td>0.961</td><td>0.951</td><td>0.944 0.953</td><td>0.938</td><td>0.939</td><td>0.950</td></tr><tr><td>4×4</td><td></td><td></td><td></td><td>0.920</td><td></td><td></td><td>0.956</td><td></td><td>0.950</td><td>0.960</td><td>0.959</td></tr><tr><td></td><td>4×4</td><td>10</td><td>0.943</td><td>0.689</td><td>0.946</td><td>0.963</td><td>0.969</td><td></td><td>0.965</td><td>0.958</td><td>0.968</td><td>0.961</td></tr><tr><td></td><td>4×4</td><td>20</td><td>0.959</td><td>0.763</td><td>0.952</td><td>0.972</td><td>0.976</td><td>0.972</td><td>0.974</td><td>0.972</td><td>0.973</td><td>0.972</td></tr></table>
468
+
469
+ Approximator fidelity quantifies ability of the approximator to imitate the behaviour of a black-box. Prediction accuracy and F1-score of the approximator for the CNN model are shown. $( \beta = 0 , 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 , 1 0 , 1 0 0 )$
470
+
471
+ # E EXTRA EXPERIMENTS
472
+
473
+ # E.1 CHOICE OF $k$
474
+
475
+ The compressiveness of explanations depends on the sparsity $\cdot$ (i.e., the number of cognitive chunks to be selected). A larger $k$ allows the information bottleneck to convey more information about output, but it gives less compressive explanations than a smaller $k$ . For deciding $\cdot$ , we recommend choosing the minimum possible $\cdot$ that achieves a target fidelity because an unnecessarily large $\cdot$ can make redundant explanations. Figure 8 shows how VIBI works under different sparsity $k$ . When we increase $k$ , VIBI tends to select chunks that are the same or nearby the previously selected chunks and additionally select new chunks that catch another characteristics of digits. The characteristics that are caught at $k = 4$ tend to be caught again at a larger $k s$ .
476
+
477
+ ![](images/4235c031ea293488685035721b51d7966f553709bdf5f3d2824394aba8dd8813.jpg)
478
+ Figure 8: The hand-written digits and explanations provided by VIBI using various number of chunks $( k )$ . The examples are randomly selected from the validation set. The selected patches are colored red if the pixel is activated (i.e. white) and yellow otherwise (i.e. black). A patch composed of $4 \times 4$ 4 X 4pixels is used as a cognitive chunk and $k = 4 , 6 , 1 0 , 2 0$ patches are identified for each image.
479
+
480
+ # 1 X 1E.2 CHOICE OF CHUNK SIZE
481
+
482
+ The chunk size changes the way the information is represented in the information bottleneck, which can affect interpretability. For choosing the chunk size, a greater fidelity does not always mean better interpretability. For example, in the MNIST experiment, the models with the chunk size $1 \times 1$ have achieved better fidelity than those with $\cdot$ and $\cdot$ under the same number of pixels that are used for the information bottleneck, but $\cdot$ is less recognizable than $2 \times 2$ or $\cdot$ (Figure 9).
483
+
484
+ Choosing the chunk size is not trivial, and the strategy varies for different domains (except the case that each (raw) feature itself is cognitive (e.g., age, gender) so that the chunk size should be 1). Obviously, the chunk size should be larger than the size of the smallest cognitive unit. For example, in the IMDB experiment, the smallest cognitive unit was set to 50 because 50 raw features compose a word. In our sentiment prediction task, using a word as the chunk size can be enough to explain the decision (i.e., positive/negative sentiment); to infer the sentiment, we do not need to know a whole sentence. However, we may need to use a phrase or sentence as the chunk size for complex tasks such as disease diagnosis or patient need detection since decisions on such tasks are made based on contextual information. In the MNIST experiment, we set the chunk size to be $\cdot$ because the digits’ stroke width is about to 4. However, we may need to use different chunk sizes, for example, for automated visual inspection for identifying defects on a factory production line. In this case, the chunk size can be set to the average defect size on the production line.
485
+
486
+ ![](images/42b83622f0d20351a26b82b1a4b0ee2ef33f699950d4f309ed450a5e70f2f5b6.jpg)
487
+ Figure 9: The hand-written digits and explanations provided by VIBI using various chunk sizes. The same examples with Figure 8 are shown. The selected patches are colored red if the pixel is activated (i.e. white) and yellow otherwise (i.e. black). A patch composed of ${ 4 \times 4 , 2 \times 2 , 1 \times 1 }$ pixels is used as a cognitive chunk.
488
+
489
+ # E.3 CHOICE OF APPROXIMATOR
490
+
491
+ Different approximators affect fidelity and interpretability of the explanation, which makes sense both intuitively and theoretically. In theory, explanation is obtained via solving the problem in Equation (2) where $\cdot$ represents the approximator. Different models of the approximator result in different $\cdot$ and optimizing the information bottleneck objective amounts to learning a decent approximator. Intuitively, different models of the approximator indeed affect the quality as well as evaluated fidelity of the explanation. If the model of approximator has low capacity, $\cdot$ and fidelity tend to be low. To remedy this, explainer has to generate less brief explanations; vice versa.
492
+
493
+ In addition to the approximator capacity, the chunk sizes, more precisely chunk types, can be an essential factor for choosing approximators. In the IMDB experiment, we investigated how the two approximators affect the fidelity and interpretability. As seen in Table 9, the LSTM approximator has lower fidelity than the CNN approximator when we use a word for the chunk size, while both approximators achieve similar fidelity when we use a sentence for the chunk size. When we use a sentence as a cognitive chunk, the LSTM achieves better interpretability than CNN, which is more substantial than when we use a word as a cognitive chunk. This may indicate that a sentence (as an explanation) should be processed with an approximator that resembles the black-box model, while a group of single words is relatively free from such a constraint. This may be because a sentence is more similar to the original input (i.e., movie review – one or two paragraphs) than a group of single words.
494
+
495
+ Table 9: Fidelity and interpretability under different approximators.
496
+
497
+ <table><tr><td></td><td></td><td colspan="2">Approximator Fidelity</td><td colspan="2">Rationale Fidelity</td><td colspan="2">Interpretability</td></tr><tr><td>chunk size</td><td>k</td><td>CNN</td><td>LSTM</td><td>CNN</td><td>LSTM</td><td>CNN</td><td>LSTM</td></tr><tr><td>sentence</td><td>1</td><td>87.7 ± 0.6</td><td>87.8 ± 1.0</td><td>73.1 ± 0.8</td><td>71.7± 2.4</td><td>45.1</td><td>65.9</td></tr><tr><td>word</td><td>5</td><td>74.4 ± 0.8</td><td>61.3 ± 3.0</td><td>65.7 ± 0.8</td><td>57.1 ± 2.4</td><td>49.4</td><td>51.3</td></tr></table>
498
+
499
+ Prediction accuracy is reported for all measures. Randomely selected instances (100 for each) were evaluated for each model. 5 workers are assigned per instance.
500
+
501
+ In practice, we recommend choosing the approximator that matches the black-box model, especially if a cognitive chunk resembles the original input. We then recommend starting with an approximator with enough capacity and reducing it as far as the approximator achieves a target fidelity because a large capacity usually makes it hard to learn.
parse/train/BJlLdhNFPr/BJlLdhNFPr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJlLdhNFPr/BJlLdhNFPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJlLdhNFPr/BJlLdhNFPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJm4T4Kgx/BJm4T4Kgx.md ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADVERSARIAL MACHINE LEARNING AT SCALE
2
+
3
+ Alexey Kurakin Google Brain kurakin@google.com
4
+
5
+ Ian J. Goodfellow OpenAI ian@openai.com
6
+
7
+ Samy Bengio
8
+ Google Brain
9
+ bengio@google.com
10
+
11
+ # ABSTRACT
12
+
13
+ Adversarial examples are malicious inputs designed to fool machine learning models. They often transfer from one model to another, allowing attackers to mount black box attacks without knowledge of the target model’s parameters. Adversarial training is the process of explicitly training a model on adversarial examples, in order to make it more robust to attack or to reduce its test error on clean inputs. So far, adversarial training has primarily been applied to small problems. In this research, we apply adversarial training to ImageNet (Russakovsky et al., 2014). Our contributions include: (1) recommendations for how to succesfully scale adversarial training to large models and datasets, (2) the observation that adversarial training confers robustness to single-step attack methods, (3) the finding that multi-step attack methods are somewhat less transferable than singlestep attack methods, so single-step attacks are the best for mounting black-box attacks, and (4) resolution of a “label leaking” effect that causes adversarially trained models to perform better on adversarial examples than on clean examples, because the adversarial example construction process uses the true label and the model can learn to exploit regularities in the construction process.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ It has been shown that machine learning models are often vulnerable to adversarial manipulation of their input intended to cause incorrect classification (Dalvi et al., 2004). In particular, neural networks and many other categories of machine learning models are highly vulnerable to attacks based on small modifications of the input to the model at test time (Biggio et al., 2013; Szegedy et al., 2014; Goodfellow et al., 2014; Papernot et al., 2016b).
18
+
19
+ The problem can be summarized as follows. Let’s say there is a machine learning system $M$ and input sample $C$ which we call a clean example. Let’s assume that sample $C$ is correctly classified by the machine learning system, i.e. $M ( C ) = y _ { t r u e }$ . It’s possible to construct an adversarial example $A$ which is perceptually indistinguishable from $C$ but is classified incorrectly, i.e. $M ( A ) \neq y _ { t r u e }$ . These adversarial examples are misclassified far more often than examples that have been perturbed by noise, even if the magnitude of the noise is much larger than the magnitude of the adversarial perturbation (Szegedy et al., 2014).
20
+
21
+ Adversarial examples pose potential security threats for practical machine learning applications. In particular, Szegedy et al. (2014) showed that an adversarial example that was designed to be misclassified by a model $M _ { 1 }$ is often also misclassified by a model $M _ { 2 }$ . This adversarial example transferability property means that it is possible to generate adversarial examples and perform a misclassification attack on a machine learning system without access to the underlying model. Papernot et al. (2016a) and Papernot et al. (2016b) demonstrated such attacks in realistic scenarios.
22
+
23
+ It has been shown (Goodfellow et al., 2014; Huang et al., 2015) that injecting adversarial examples into the training set (also called adversarial training) could increase robustness of neural networks to adversarial examples. Another existing approach is to use defensive distillation to train the network (Papernot et al., 2015). However all prior work studies defense measures only on relatively small datasets like MNIST and CIFAR10. Some concurrent work studies attack mechanisms on ImageNet (Rozsa et al., 2016), focusing on the question of how well adversarial examples transfer between different types of models, while we focus on defenses and studying how well different types of adversarial example generation procedures transfer between relatively similar models.
24
+
25
+ In this paper we studied adversarial training of Inception models trained on ImageNet. The contributions of this paper are the following:
26
+
27
+ • We successfully used adversarial training to train an Inception v3 model (Szegedy et al., 2015) on ImageNet dataset (Russakovsky et al., 2014) and to significantly increase robustness against adversarial examples generated by the fast gradient sign method (Goodfellow et al., 2014) as well as other one-step methods. We demonstrated that different types of adversarial examples tend to have different transferability properties between models. In particular we observed that those adversarial examples which are harder to resist using adversarial training are less likely to be transferrable between models. We showed that models which have higher capacity (i.e. number of parameters) tend to be more robust to adversarial examples compared to lower capacity model of the same architecture. This provides additional cue which could help building more robust models.
28
+ • We also observed an interesting property we call “label leaking”. Adversarial examples constructed with a single-step method making use of the true labels may be easier to classify than clean adversarial examples, because an adversarially trained model can learn to exploit regularities in the adversarial example construction process. This suggests using adversarial example construction processes that do not make use of the true label.
29
+
30
+ The rest of the paper is structured as follows: In section 2 we review different methods to generate adversarial examples. Section 3 describes details of our adversarial training algorithm. Finally, section 4 describes our experiments and results of adversarial training.
31
+
32
+ # 2 METHODS GENERATING ADVERSARIAL EXAMPLES
33
+
34
+ # 2.1 TERMINOLOGY AND NOTATION
35
+
36
+ In this paper we use the following notation and terminology regarding adversarial examples:
37
+
38
+ 1. $\boldsymbol { X }$ , the clean image — unmodified image from the dataset (either train or test set).
39
+ 2. $X ^ { a d v }$ , the adversarial image: the output of any procedure intended to produce an approximate worst-case modification of the clean image. We sometimes call this a candidate adversarial image to emphasize that an adversarial image is not necessarily misclassified by the neural network.
40
+ 3. Misclassified adversarial image — candidate adversarial image which is misclassified by the neural network. In addition we are typically interested only in those misclassified adversarial images when the corresponding clean image is correctly classified.
41
+ 4. $\epsilon { : }$ : The size of the adversarial perturbation. In most cases, we require the $L _ { \infty }$ norm of the perturbation to be less than $\epsilon$ , as done by Goodfellow et al. (2014). We always specify $\epsilon$ in terms of pixel values in the range [0, 255]. Note that some other work on adversarial examples minimizes the size of the perturbation rather than imposing a constraint on the size of the perturbation (Szegedy et al., 2014).
42
+ 5. The cost function used to train the model is denoted $J ( X , y _ { t r u e } )$ .
43
+ 6. $C l i p { \bf { _ { X , \epsilon } } } ( { \bf { A } } )$ denotes element-wise clipping $\pmb { A }$ , with $A _ { i , j }$ clipped to the range $[ X _ { i , j } \ -$ $\epsilon , X _ { i , j } + \epsilon ]$ .
44
+ 7. One-step methods of adversarial example generation generate a candidate adversarial image after computing only one gradient. They are often based on finding the optimal perturbation of a linear approximation of the cost or model. Iterative methods apply many gradient updates. They typically do not rely on any approximation of the model and typically produce more harmful adversarial examples when run for more iterations.
45
+
46
+ # 2.2 ATTACK METHODS
47
+
48
+ We study a variety of attack methods:
49
+
50
+ Fast gradient sign method Goodfellow et al. (2014) proposed the fast gradient sign method (FGSM) as a simple way to generate adversarial examples:
51
+
52
+ $$
53
+ X ^ { a d v } = X + \epsilon \mathrm { s i g n } \bigl ( \nabla _ { X } J ( X , y _ { t r u e } ) \bigr )
54
+ $$
55
+
56
+ This method is simple and computationally efficient compared to more complex methods like LBFGS (Szegedy et al., 2014), however it usually has a lower success rate. On ImageNet, top-1 error rate on candidate adversarial images for the FGSM is about $6 3 \% - 6 9 \%$ for $\epsilon \in [ 2 , 3 2 ]$ .
57
+
58
+ One-step target class methods FGSM finds adversarial perturbations which increase the value of the loss function. An alternative approach is to maximize probability $p ( y _ { t a r g e t } \mid X )$ of some specific target class $y _ { t a r g e t }$ which is unlikely to be the true class for a given image. For a neural network with cross-entropy loss this will lead to the following formula for the one-step target class method:
59
+
60
+ $$
61
+ X ^ { a d v } = X - \epsilon \mathrm { s i g n } \bigl ( \nabla _ { X } J ( X , y _ { t a r g e t } ) \bigr )
62
+ $$
63
+
64
+ As a target class we can use the least likely class predicted by the network $y _ { L L } = \arg \operatorname* { m i n } _ { y } \{ p ( y \mid$ $\pmb { X } ) \}$ , as suggested by Kurakin et al. (2016). In such case we refer to this method as one-step least likely class or just “step l.l.” Alternatively we can use a random class as target class. In such a case we refer to this method as “step rnd.”.
65
+
66
+ Basic iterative method A straightforward extension of FGSM is to apply it multiple times with small step size:
67
+
68
+ $$
69
+ X _ { 0 } ^ { a d v } = X , \quad X _ { N + 1 } ^ { a d v } = C l i p _ { X , \epsilon } \Big \{ X _ { N } ^ { a d v } + \alpha \mathrm { s i g n } \big ( \nabla _ { X } J \big ( X _ { N } ^ { a d v } , y _ { t r u e } \big ) \big ) \Big \}
70
+ $$
71
+
72
+ In our experiments we used $\alpha = 1$ , i.e. we changed the value of each pixel only by 1 on each step. We selected the number of iterations to be $\operatorname* { m i n } ( \epsilon + 4 , 1 . 2 5 \epsilon )$ . See more information on this method in Kurakin et al. (2016). Below we refer to this method as “iter. basic” method.
73
+
74
+ Iterative least-likely class method By running multiple iterations of the “step l.l.�� method we can get adversarial examples which are misclassified in more than $9 9 \%$ of the cases:
75
+
76
+ $$
77
+ X _ { 0 } ^ { a d v } = X , \quad X _ { N + 1 } ^ { a d v } = C l i p _ { X , \epsilon } \left\{ X _ { N } ^ { a d v } - \alpha \mathrm { s i g n } \left( \nabla _ { X } J ( X _ { N } ^ { a d v } , y _ { L L } ) \right) \right\}
78
+ $$
79
+
80
+ $\alpha$ and number of iterations were selected in the same way as for the basic iterative method. Below we refer to this method as the “iter. l.l.”.
81
+
82
+ # 3 ADVERSARIAL TRAINING
83
+
84
+ The basic idea of adversarial training is to inject adversarial examples into the training set, continually generating new adversarial examples at every step of training (Goodfellow et al., 2014). Adversarial training was originally developed for small models that did not use batch normalization. To scale adversarial training to ImageNet, we recommend using batch normalization (Ioffe & Szegedy, 2015). To do so successfully, we found that it was important for examples to be grouped into batches containing both normal and adversarial examples before taking each training step, as described in algorithm 1.
85
+
86
+ We use a loss function that allows independent control of the number and relative weight of adversarial examples in each batch:
87
+
88
+ $$
89
+ L o s s = \frac { 1 } { ( m - k ) + \lambda k } \left( \sum _ { i \in C L E A N } L ( X _ { i } | y _ { i } ) + \lambda \sum _ { i \in A D V } L ( X _ { i } ^ { a d v } | y _ { i } ) \right)
90
+ $$
91
+
92
+ where $L ( X | y )$ is a loss on a single example $X$ with true class $y ; m$ is total number of training examples in the minibatch; $k$ is number of adversarial examples in the minibatch and $\lambda$ is a parameter which controls the relative weight of adversarial examples in the loss. We used $\lambda = 0 . 3$ , $m = 3 2$ , and $k = 1 6$ . Note that we replace each clean example with its adversarial counterpart, for a total minibatch size of 32, which is a departure from previous approaches to adversarial training.
93
+
94
+ <table><tr><td colspan="2">Algorithm1 Adversarial training of network N. Size of the training minibatch is m.Number of adversarial images in the minibatch is k.</td></tr><tr><td colspan="2">1:Randomly initialize network N</td></tr><tr><td>2: repeat</td><td></td></tr><tr><td>3:</td><td>Read minibatch B = {X1,..., Xm} from training set</td></tr><tr><td>4:</td><td></td></tr><tr><td>5:</td><td>clean examples {X1,..., Xk} using current state of the network N Xkdo,Xk+1,Xmy</td></tr><tr><td>6:</td><td>Do one training step of network N using minibatch B&#x27;</td></tr><tr><td>7:</td><td></td></tr><tr><td colspan="2">until training converged</td></tr></table>
95
+
96
+ Fraction and weight of adversarial examples which we used in each minibatch differs from Huang et al. (2015) where authors replaced entire minibatch with adversarial examples. However their experiments was done on smaller datasets (MNIST and CIFAR-10) in which case adversarial training does not lead to decrease of accuracy on clean images. We found that our approach works better for ImageNet models (corresponding comparative experiments could be found in Appendix E).
97
+
98
+ We observed that if we fix $\epsilon$ during training then networks become robust only to that specific value of $\epsilon$ . We therefore recommend choosing $\epsilon$ randomly, independently for each training example. In our experiments we achieved best results when magnitudes were drawn from a truncated normal distribution defined in interval [0, 16] with underlying normal distribution $N ( \mu = 0 , \sigma = 8 )$ ) . 1
99
+
100
+ # 4 EXPERIMENTS
101
+
102
+ We adversarially trained an Inception v3 model (Szegedy et al., 2015) on ImageNet. All experiments were done using synchronous distributed training on 50 machines, with a minibatch of 32 examples on each machine. We observed that the network tends to reach maximum accuracy at around $1 3 0 k -$ $1 5 0 k$ iterations. If we continue training beyond $1 5 0 k$ iterations then eventually accuracy might decrease by a fraction of a percent. Thus we ran experiments for around $1 5 0 k$ iterations and then used the obtained accuracy as the final result of the experiment.
103
+
104
+ Similar to Szegedy et al. (2015) we used RMSProp optimizer for training. We used a learning rate of 0.045 except where otherwise indicated.
105
+
106
+ We looked at interaction of adversarial training and other forms or regularization (dropout, label smoothing and weight decay). By default training of Inception v3 model uses all three of them. We noticed that disabling label smoothing and/or dropout leads to small decrease of accuracy on clean examples (by $0 . 1 \% - 0 . 5 \%$ for top 1 accuracy) and small increase of accuracy on adversarial examples (by $1 \% - 1 . 5 \%$ for top 1 accuracy). On the other hand reducing weight decay leads to decrease of accuracy on both clean and adversarial examples.
107
+
108
+ We experimented with delaying adversarial training by 0, $1 0 k$ , $2 0 k$ and $4 0 k$ iterations. In such case we used only clean examples during the first $N$ training iterations and after $N$ iterations included both clean and adversarial examples in the minibatch. We noticed that delaying adversarial training has almost no effect on accuracy on clean examples (difference in accuracy within $0 . 2 \%$ ) after sufficient number of training iterations (more than $7 0 k$ in our case). At the same time we noticed that larger delays of adversarial training might cause up to $4 \%$ decline of accuracy on adversarial examples with high magnitude of adversarial perturbations. For small $1 0 k$ delay changes of accuracy was not statistically significant to recommend against it. We used a delay of $1 0 k$ because this allowed us to reuse the same partially trained model as a starting point for many different experiments.
109
+
110
+ For evaluation we used the ImageNet validation set which contains 50, 000 images and does not intersect with the training set.
111
+
112
+ We experimented with adversarial training using several types of one-step methods. We found that adversarial training using any type of one-step method increases robustness to all types of one-step adversarial examples that we tested. However there is still a gap between accuracy on clean and adversarial examples which could vary depending on the combination of methods used for training and evaluation.
113
+
114
+ Adversarial training caused a slight (less than $1 \%$ ) decrease of accuracy on clean examples in our ImageNet experiments. This differs from results of adversarial training reported previously, where adversarial training increased accuracy on the test set (Goodfellow et al., 2014; Miyato et al., 2016b;a). One possible explanation is that adversarial training acts as a regularizer. For datasets with few labeled examples where overfitting is the primary concern, adversarial training reduces test error. For datasets like ImageNet where state-of-the-art models typically have high training set error, adding a regularizer like adversarial training can increase training set error more than it decreases the gap between training and test set error. Our results suggest that adversarial training should be employed in two scenarios:
115
+
116
+ 1. When a model is overfitting, and a regularizer is required.
117
+ 2. When security against adversarial examples is a concern. In this case, adversarial training is the method that provides the most security of any known defense, while losing only a small amount of accuracy.
118
+
119
+ By comparing different one-step methods for adversarial training we observed that the best results in terms or accuracy on test set are achieved using “step l.l.” or “step rnd.” method. Moreover using these two methods helped the model to become robust to adversarial examples generated by other one-step methods. Thus for final experiments we used “step l.l.” adversarial method.
120
+
121
+ For brevity we omitted a detailed comparison of different one-step methods here, but the reader can find it in Appendix A.
122
+
123
+ Table 1: Top 1 and top 5 accuracies of an adversarially trained network on clean images and adversarial images with various test-time . Both training and evaluation were done using “step l.l.” method. Adversarially training caused the baseline model to become robust to adversarial examples but lost some accuracy on clean examples. We therefore also trained a deeper model with two additional Inception blocks. The deeper model benefits more from adversarial training in terms of robustness to adversarial perturbation, and loses less accuracy on clean examples than the smaller model does.
124
+
125
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>e=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=2 colspan=1>Baseline(standard training)</td><td rowspan=1 colspan=1>top1</td><td rowspan=1 colspan=1>78.4%</td><td rowspan=1 colspan=1>30.8%</td><td rowspan=1 colspan=1>27.2%</td><td rowspan=1 colspan=1>27.2%</td><td rowspan=1 colspan=1>29.5%</td></tr><tr><td rowspan=1 colspan=1>top 5</td><td rowspan=1 colspan=1>94.0%</td><td rowspan=1 colspan=1>60.0%</td><td rowspan=1 colspan=1>55.6%</td><td rowspan=1 colspan=1>55.1%</td><td rowspan=1 colspan=1>57.2%</td></tr><tr><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>77.6%93.8%</td><td rowspan=1 colspan=1>73.5%91.7%</td><td rowspan=1 colspan=1>74.0%91.9%</td><td rowspan=1 colspan=1>74.5%92.0%</td><td rowspan=1 colspan=1>73.9%91.4%</td></tr><tr><td rowspan=1 colspan=1>Deeper model(standard training)</td><td rowspan=1 colspan=1>top1top 5</td><td rowspan=1 colspan=1>78.7%94.4%</td><td rowspan=1 colspan=1>33.5%63.3%</td><td rowspan=1 colspan=1>30.0%58.9%</td><td rowspan=1 colspan=1>30.0%58.1%</td><td rowspan=1 colspan=1>31.6%59.5%</td></tr><tr><td rowspan=1 colspan=1>Deeper model(Adv. training)</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.1%94.1%</td><td rowspan=1 colspan=1>75.4%92.6%</td><td rowspan=1 colspan=1>75.7%92.7%</td><td rowspan=1 colspan=1>75.6%92.5%</td><td rowspan=1 colspan=1>74.4%91.6%</td></tr></table>
126
+
127
+ Results of adversarial training using “step l.l.” method are provided in Table 1. As it can be seen from the table we were able to significantly increase top-1 and top-5 accuracy on adversarial examples (up to $7 4 \%$ and $9 2 \%$ correspondingly) to make it to be on par with accuracy on clean images. However we lost about $0 . 8 \%$ accuracy on clean examples.
128
+
129
+ We were able to slightly reduce the gap in the accuracy on clean images by slightly increasing the size of the model. This was done by adding two additional Inception blocks to the model. For specific details about Inception blocks refer to Szegedy et al. (2015).
130
+
131
+ Unfortunately, training on one-step adversarial examples does not confer robustness to iterative adversarial examples, as shown in Table 2.
132
+
133
+ Table 2: Accuracy of adversarially trained network on iterative adversarial examples. Adversarial training was done using “step l.l.” method. Results were computed after $1 4 0 k$ iterations of training. Overall, we see that training on one-step adversarial examples does not confer resistance to iterative adversarial examples.
134
+
135
+ <table><tr><td rowspan=1 colspan=1>Adv. method</td><td rowspan=1 colspan=1>Training</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=2 colspan=1>Iter. 1.1.</td><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top 1top5</td><td rowspan=1 colspan=1>77.4%93.9%</td><td rowspan=1 colspan=1>29.1%56.9%</td><td rowspan=1 colspan=1>7.5%21.3%</td><td rowspan=1 colspan=1>3.0%9.4%</td><td rowspan=1 colspan=1>1.5%5.5%</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.3%94.1%</td><td rowspan=1 colspan=1>23.3%49.3%</td><td rowspan=1 colspan=1>5.5%18.8%</td><td rowspan=1 colspan=1>1.8%7.8%</td><td rowspan=1 colspan=1>0.7%4.4%</td></tr><tr><td rowspan=2 colspan=1>Iter. basic</td><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top 1top5</td><td rowspan=1 colspan=1>77.4%93.9%</td><td rowspan=1 colspan=1>30.0%44.3%</td><td rowspan=1 colspan=1>25.2%33.6%</td><td rowspan=1 colspan=1>23.5%28.4%</td><td rowspan=1 colspan=1>23.2%26.8%</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.3%94.1%</td><td rowspan=1 colspan=1>31.4%43.1%</td><td rowspan=1 colspan=1>28.1%34.8%</td><td rowspan=1 colspan=1>26.4%30.2%</td><td rowspan=1 colspan=1>25.9%28.8%</td></tr></table>
136
+
137
+ We also tried to use iterative adversarial examples during training, however we were unable to gain any benefits out of it. It is computationally costly and we were not able to obtain robustness to adversarial examples or to prevent the procedure from reducing the accuracy on clean examples significantly. It is possible that much larger models are necessary to achieve robustness to such a large class of inputs.
138
+
139
+ # 4.2 LABEL LEAKING
140
+
141
+ We discovered a label leaking effect: when a model is trained on FGSM adversarial examples and then evaluated using FGSM adversarial examples, the accuracy on adversarial images becomes much higher than the accuracy on clean images (see Table 3). This effect also occurs (but to a lesser degree) when using other one-step methods that require the true label as input.
142
+
143
+ We say that label for specific example has been leaked if and only if the model classifies an adversarial example correctly when that adversarial example is generated using the true label but misclassifies a corresponding adversarial example that was created without using the true label. If too many labels has been leaked then accuracy on adversarial examples might become bigger than accuracy on clean examples which we observed on ImageNet dataset.
144
+
145
+ We believe that the effect occurs because one-step methods that use the true label perform a very simple and predictable transformation that the model can learn to recognize. The adversarial example construction process thus inadvertently leaks information about the true label into the input. We found that the effect vanishes if we use adversarial example construction processes that do not use the true label. The effect also vanishes if an iterative method is used, presumably because the output of an iterative process is more diverse and less predictable than the output of a one-step process.
146
+
147
+ Overall due to the label leaking effect, we do not recommend to use FGSM or other methods defined with respect to the true class label to evaluate robustness to adversarial examples; we recommend to use other one-step methods that do not directly access the label instead.
148
+
149
+ We recommend to replace the true label with the most likely label predicted by the model. Alternately, one can maximize the cross-entropy between the full distribution over all predicted labels given the clean input and the distribution over all predicted labels given the perturbed input (Miyato et al., 2016b).
150
+
151
+ We revisited the adversarially trained MNIST classifier from Goodfellow et al. (2014) and found that it too leaks labels. The most labels are leaked with $\epsilon = 0 . 3$ on MNIST data in $[ 0 , 1 ]$ . With that $\epsilon$ , the model leaks 79 labels on the test set of 10,000 examples. However, the amount of label leaking is small compared to the amount of error caused by adversarial examples. The error rate on adversarial examples exceeds the error rate on clean examples for $\epsilon \in \{ . 0 5 , . 1 , . 2 5 , . 3 , . 4 , . 4 5 , . 5 \}$ . This explains why the label leaking effect was not noticed earlier.
152
+
153
+ ![](images/958081ef9f622f7fd5d7461988d99be64d8f6a7e76185807bf0637cc6550f678.jpg)
154
+ No adversarial training, “basic iter.” adv. examples With adversarial training, “basic iter.” adv. examples
155
+ Figure 1: Influence of size of the model on top 1 classification accuracy of various adversarial examples. Left column — base model without adversarial training, right column — model with adversarial training using “step l.l.” method. Top row — results on “step l.l.” adversarial images, middle row — results on “iter. l.l.” adversarial images, bottom row — results on “basic iter.” adversarial images. See text of Section 4.3 for explanation of meaning of horizontal and vertical axes.
156
+
157
+ Table 3: Effect of label leaking on adversarial examples. When training and evaluation was done using FGSM accuracy on adversarial examples was higher than on clean examples. This effect was not happening when training and evaluation was done using “step l.l.” method. In both experiments training was done for $1 5 0 k$ iterations with initial learning rate 0.0225.
158
+
159
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=1 colspan=1>No label leaking,training and eval using “step 1.1.”</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>77.3%93.7%</td><td rowspan=1 colspan=1>72.8%91.1%</td><td rowspan=1 colspan=1>73.1%91.1%</td><td rowspan=1 colspan=1>73.4%91.0%</td><td rowspan=1 colspan=1>72.0%90.3%</td></tr><tr><td rowspan=1 colspan=1>With label leaking,training and eval using FGSM</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>76.6%93.2%</td><td rowspan=1 colspan=1>86.2%95.9%</td><td rowspan=1 colspan=1>87.6%96.4%</td><td rowspan=1 colspan=1>88.7%96.9%</td><td rowspan=1 colspan=1>87.0%96.4%</td></tr></table>
160
+
161
+ # 4.3 INFLUENCE OF MODEL CAPACITY ON ADVERSARIAL ROBUSTNESS
162
+
163
+ We studied how the size of the model (in terms of number of parameters) could affect robustness to adversarial examples. We picked Inception v3 as a base model and varied its size by changing the number of filters in each convolution.
164
+
165
+ For each experiment we picked a scale factor $\rho$ and multiplied the number of filters in each convolution by $\rho$ . In other words $\rho = 1$ means unchanged Inception v3, $\rho = 0 . 5$ means Inception with half of the usual number of filters in convolutions, etc . . . For each chosen $\rho$ we trained two independent models: one with adversarial training and another without. Then we evaluated accuracy on clean and adversarial examples for both trained models. We have run these experiments for $\rho \in [ 0 . 5 , 2 . 0 ]$ .
166
+
167
+ In earlier experiments (Table 1) we found that deeper models benefit more from adversarial training. The increased depth changed many aspects of the model architecture. These experiments varying $\rho$ examine the effect in a more controlled setting, where the architecture remains constant except for the number of feature maps in each layer.
168
+
169
+ In all experiments we observed that accuracy on clean images kept increasing with increase of $\rho$ , though its increase slowed down as $\rho$ became bigger. Thus as a measure of robustness we used the ratio of accuracy on adversarial images to accuracy on clean images because an increase of this ratio means that the gap between accuracy on adversarial and clean images becomes smaller. If this ratio reaches 1 then the accuracy on adversarial images is the same as on clean ones. For a successful adversarial example construction technique, we would never expect this ratio to exceed 1, since this would imply that the adversary is actually helpful. Some defective adversarial example construction techniques, such as those suffering from label leaking, can inadvertently produce a ratio greater than 1.
170
+
171
+ Results with ratios of accuracy for various adversarial methods and $\epsilon$ are provided in Fig. 1.
172
+
173
+ For models without adversarial training, we observed that there is an optimal value of $\rho$ yielding best robustness. Models that are too large or too small perform worse. This may indicate that models become more robust to adversarial examples until they become large enough to overfit in some respect.
174
+
175
+ For adversarially trained models, we found that robustness consistently increases with increases in model size. We were not able to train large enough models to find when this process ends, but we did find that models with twice the normal size have an accuracy ratio approaching 1 for one-step adversarial examples. When evaluated on iterative adversarial examples, the trend toward increasing robustness with increasing size remains but has some exceptions. Also, none of our models was large enough to approach an accuracy ratio of 1 in this regime.
176
+
177
+ Overall we recommend exploring increase of accuracy (along with adversarial training) as a measure to improve robustness to adversarial examples.
178
+
179
+ # 4.4 TRANSFERABILITY OF ADVERSARIAL EXAMPLES
180
+
181
+ From a security perspective, an important property of adversarial examples is that they tend to transfer from one model to another, enabling an attacker in the black-box scenario to create adversarial
182
+
183
+ Table 4: Transfer rate of adversarial examples generated using different adversarial methods and perturbation size $\epsilon = 1 6$ . This is equivalent to the error rate in an attack scenario where the attacker prefilters their adversarial examples by ensuring that they are misclassified by the source model before deploying them against the target. Transfer rates are rounded to the nearest percent in order to fit the table on the page. The following models were used for comparison: $A$ and $B$ are Inception v3 models with different random initializations, $C$ is Inception v3 model with ELU activations instead of Relu, $D$ is Inception v4 model. See also Table 6 for the absolute error rate when the attack is not prefiltered, rather than the transfer rate of adversarial examples.
184
+
185
+ <table><tr><td rowspan="3"></td><td rowspan="3">source model</td><td colspan="4">FGSM</td><td colspan="4">basic iter.</td><td colspan="4">iter 1.1.</td></tr><tr><td colspan="4">target model</td><td colspan="4">target model</td><td colspan="4">target model</td></tr><tr><td>A</td><td>B</td><td>C</td><td>D</td><td>A</td><td>B</td><td>C</td><td>D</td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr><td rowspan="4">top 1</td><td>A(v3)</td><td>100</td><td>56</td><td>58</td><td>47</td><td>100</td><td>46</td><td>45</td><td>33</td><td>100</td><td>13</td><td>13</td><td>9</td></tr><tr><td>B(v3)</td><td>58</td><td>100</td><td>59</td><td>51</td><td>41</td><td>100</td><td>40</td><td>30</td><td>15</td><td>100</td><td>13</td><td>10</td></tr><tr><td>C (v3ELU)</td><td>56</td><td>58</td><td>100</td><td>52</td><td>44</td><td>44</td><td>100</td><td>32</td><td>12</td><td>11</td><td>100</td><td>9</td></tr><tr><td>D(v4)</td><td>50</td><td>54</td><td>52</td><td>100</td><td>35</td><td>39</td><td>37</td><td>100</td><td>12</td><td>13</td><td>13</td><td>100</td></tr><tr><td rowspan="4">top 5</td><td>A(v3)</td><td>100</td><td>50</td><td>50</td><td>36</td><td>100</td><td>15</td><td>17</td><td>11</td><td>100</td><td>8</td><td>7</td><td>5</td></tr><tr><td>B(v3)</td><td>51</td><td>100</td><td>50</td><td>37</td><td>16</td><td>100</td><td>14</td><td>10</td><td>7</td><td>100</td><td>5</td><td>4</td></tr><tr><td>C (v3ELU)</td><td>44</td><td>45</td><td>100</td><td>37</td><td>16</td><td>18</td><td>100</td><td>13</td><td>6</td><td>6</td><td>100</td><td>4</td></tr><tr><td>D(v4)</td><td>42</td><td>38</td><td>46</td><td>100</td><td>11</td><td>15</td><td>15</td><td>100</td><td>6</td><td>6</td><td>6</td><td>100</td></tr></table>
186
+
187
+ ![](images/e9b8d3fff56e6552946abda2fde8870f1863160f21d42f299541e0e998adfd18.jpg)
188
+ Top 1 transferability.
189
+
190
+ ![](images/f42264aec46ba5a0ae17952b02c11ed374b019c801053d32a9cdfd3008e23da2.jpg)
191
+ Top 5 transferability.
192
+
193
+ Figure 2: Influence of the size of adversarial perturbation on transfer rate of adversarial examples. Transfer rate was computed using two Inception v3 models with different random intializations. As could be seen from these plots, increase of $\epsilon$ leads to increase of transfer rate. It should be noted that transfer rate is a ratio of number of transferred adversarial examples to number of successful adversarial examples for source network. Both numerator and denominator of this ratio are increasing with increase of $\epsilon$ , however we observed that numerator (i.e. number of transferred examples) is increasing much faster compared to increase of denominator. For example when $\epsilon$ increases from 8 to 16 relative increase of denominator is less than $1 \%$ for each of the considered methods, at the same time relative increase of numerator is more than $2 0 \%$ .
194
+
195
+ examples for their own substitute model, then deploy those adversarial examples to fool a target model (Szegedy et al., 2014; Goodfellow et al., 2014; Papernot et al., 2016b).
196
+
197
+ We studied transferability of adversarial examples between the following models: two copies of normal Inception v3 (with different random initializations and order or training examples), Inception v4 (Szegedy et al., 2016) and Inception v3 which uses ELU activation (Clevert et al., 2015) instead of Relu2. All of these models were independently trained from scratch until they achieved maximum accuracy.
198
+
199
+ In each experiment we fixed the source and target networks, constructed adversarial examples from 1000 randomly sampled clean images from the test set using the source network and performed classification of all of them using both source and target networks. These experiments were done independently for different adversarial methods.
200
+
201
+ We measured transferability using the following criteria. Among 1000 images we picked only misclassified adversarial example for the source model (i.e. clean classified correctly, adversarial misclassified) and measured what fraction of them were misclassified by the target model.
202
+
203
+ Transferability results for all combinations of models and $\epsilon = 1 6$ are provided in Table 4. Results for various $\epsilon$ but fixed source and target model are provided in Fig. 2.
204
+
205
+ As can be seen from the results, FGSM adversarial examples are the most transferable, while “iter l.l.” are the least. On the other hand “iter l.l.” method is able to fool the network in more than $9 9 \%$ cases (top 1 accuracy), while FGSM is the least likely to fool the network. This suggests that there might be an inverse relationship between transferability of specific method and ability of the method to fool the network. We haven’t studied this phenomenon further, but one possible explanation could be the fact that iterative methods tend to overfit to specific network parameters.
206
+
207
+ In addition, we observed that for each of the considered methods transfer rate is increasing with increase of $\epsilon$ (see Fig. 2). Thus potential adversary performing a black-box attack have an incentive to use higher $\epsilon$ to increase the chance of success of the attack.
208
+
209
+ # 5 CONCLUSION
210
+
211
+ In this paper we studied how to increase robustness to adversarial examples of large models (Inception v3) trained on large dataset (ImageNet). We showed that adversarial training provides robustness to adversarial examples generated using one-step methods. While adversarial training didn’t help much against iterative methods we observed that adversarial examples generated by iterative methods are less likely to be transferred between networks, which provides indirect robustness against black box adversarial attacks. In addition we observed that increase of model capacity could also help to increase robustness to adversarial examples especially when used in conjunction with adversarial training. Finally we discovered the effect of label leaking which resulted in higher accuracy on FGSM adversarial examples compared to clean examples when the network was adversarially trained.
212
+
213
+ # REFERENCES
214
+
215
+ Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Srndiˇ c, Pavel Laskov, Gior-´ gio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 387– 402. Springer, 2013.
216
+ Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep net- ´ work learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015. URL http: //arxiv.org/abs/1511.07289.
217
+ Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, Deepak Verma, et al. Adversarial classification. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 99–108. ACM, 2004.
218
+ Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. URL http://arxiv.org/abs/1412.6572.
219
+ Ruitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. Learning with a strong adver- ´ sary. CoRR, abs/1511.03034, 2015. URL http://arxiv.org/abs/1511.03034.
220
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. 2015.
221
+ Alex Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. Technical report, arXiv, 2016. URL https://arxiv.org/abs/1607.02533.
222
+ Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Virtual adversarial training for semi-supervised text classification. arXiv preprint arXiv:1605.07725, 2016a.
223
+ Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae, and Shin Ishii. Distributional smoothing with virtual adversarial training. In International Conference on Learning Representations (ICLR2016), April 2016b.
224
+ N. Papernot, P. McDaniel, and I. Goodfellow. Transferability in Machine Learning: from Phenomena to Black-Box Attacks using Adversarial Samples. ArXiv e-prints, May 2016b. URL http://arxiv.org/abs/1605.07277.
225
+ Nicolas Papernot, Patrick Drew McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. CoRR, abs/1511.04508, 2015. URL http://arxiv.org/abs/1511.04508.
226
+ Nicolas Papernot, Patrick Drew McDaniel, Ian J. Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against deep learning systems using adversarial examples. CoRR, abs/1602.02697, 2016a. URL http://arxiv.org/abs/1602.02697.
227
+ Andras Rozsa, Manuel Gunther, and Terrance E Boult. Are accuracy and robustness correlated? ¨ arXiv preprint arXiv:1610.04563, 2016.
228
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. arXiv preprint arXiv:1409.0575, 2014.
229
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. ICLR, abs/1312.6199, 2014. URL http://arxiv.org/abs/1312.6199.
230
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. CoRR, abs/1512.00567, 2015. URL http://arxiv.org/abs/1512.00567.
231
+ Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. CoRR, abs/1602.07261, 2016. URL http: //arxiv.org/abs/1602.07261.
232
+
233
+ # Appendices
234
+
235
+ # A COMPARISON OF ONE-STEP ADVERSARIAL METHODS
236
+
237
+ In addition to FGSM and “step l.l.” methods we explored several other one-step adversarial methods both for training and evaluation. Generally all of these methods can be separated into two large categories. Methods which try to maximize the loss (similar to FGSM) are in the first category. The second category contains methods which try to maximize the probability of a specific target class (similar to “step l.l.”). We also tried to use different types of random noise instead of adversarial images, but random noise didn’t help with robustness against adversarial examples.
238
+
239
+ The full list of one-step methods we tried is as follows:
240
+
241
+ • Methods increasing loss function $J$ – FGSM (described in details in Section 2.2):
242
+
243
+ $$
244
+ X ^ { a d v } = X + \epsilon \mathrm { s i g n } \big ( \nabla _ { X } J ( X , y _ { t r u e } ) \big )
245
+ $$
246
+
247
+ – FGSM-pred or fast method with predicted class. It is similar to FGSM but uses the label of the class predicted by the network instead of true class $y _ { t r u e }$ .
248
+
249
+ – “Fast entropy” or fast method designed to maximize the entropy of the predicted distribution, thereby causing the model to become less certain of the predicted class.
250
+
251
+ – “Fast grad. $L _ { 2 } '$ is similar to FGSM but uses the value of gradient instead of its sign. The value of gradient is normalized to have unit $L _ { 2 }$ norm:
252
+
253
+ $$
254
+ X ^ { a d v } = X + \epsilon \frac { \nabla _ { X } J ( X , y _ { t r u e } ) } { \left\| \nabla _ { X } J ( X , y _ { t r u e } ) \right\| _ { 2 } }
255
+ $$
256
+
257
+ Miyato et al. (2016b) advocate this method.
258
+
259
+ – “Fast grad. $L _ { \infty } , $ is similar to “fast grad. $L _ { 2 } { } ^ { \ ' }$ but uses $L _ { \infty }$ norm for normalization.
260
+
261
+ • Methods increasing the probability of the selected target class
262
+
263
+ – “Step l.l.” is one-step towards least likely class (also described in Section 2.2):
264
+
265
+ $$
266
+ X ^ { a d v } = X - \epsilon \mathrm { s i g n } \bigl ( \nabla _ { X } J ( X , y _ { t a r g e t } ) \bigr )
267
+ $$
268
+
269
+ where $y _ { t a r g e t } = \arg \operatorname* { m i n } _ { y } \{ p ( y \mid X ) \}$ is least likely class prediction by the network. – “Step rnd.” is similar to “step l.l.” but uses random class instead of least likely class.
270
+
271
+ • Random perturbations
272
+
273
+ – Sign of random perturbation. This is an attempt to construct random perturbation which has similar structure to perturbations generated by FGSM:
274
+
275
+ $$
276
+ X ^ { a d v } = X + \epsilon \mathrm { s i g n } ( \mathcal { N } )
277
+ $$
278
+
279
+ where $\mathcal { N }$ is random normal variable with zero mean and identity covariance matrix.
280
+
281
+ – Random truncated normal perturbation with zero mean and $0 . 5 \epsilon$ standard deviation defined on $[ - \epsilon , \epsilon ]$ and uncorrelated pixels, which leads to the following formula for perturbed images:
282
+
283
+ $$
284
+ X ^ { a d v } = X + \mathcal { T }
285
+ $$
286
+
287
+ where $\tau$ is a random variable with truncated normal distribution.
288
+
289
+ Overall, we observed that using only one of these single step methods during adversarial training is sufficient to gain robustness to all of them. Fig. 3 shows accuracy on various one-step adversarial examples when the network was trained using only “step l.l.” method.
290
+
291
+ At the same time we observed that not all one-step methods are equally good for adversarial training, as shown in Table 5. The best results (achieving both good accuracy on clean data and good accuracy on adversarial inputs) were obtained when adversarial training was done using “step l.l.” or “step rnd.” methods.
292
+
293
+ ![](images/58f7f6cb781f7b825dd826be739683c9c880fd5a3796af47870f220250c24875.jpg)
294
+ Figure 3: Comparison of different one-step adversarial methods during eval. Adversarial training was done using “step l.l.” method. Some evaluation methods show increasing accuracy with increasing $\epsilon$ over part of the curve, due to the label leaking effect.
295
+
296
+ # B ADDITIONAL RESULTS WITH SIZE OF THE MODEL
297
+
298
+ Section 4.3 contains details regarding the influence of size of the model on robustness to adversarial examples. Here we provide additional Figure 4 which shows robustness calculated using top 5 accuracy. Generally it exhibits the same properties as the corresponding plots for top 1 accuracy.
299
+
300
+ # C ADDITIONAL RESULTS ON TRANSFERABILITY
301
+
302
+ Section 4.4 contains results with transfer rate of various adversarial examples between models. In addition to transfer rate computed only on misclassified adversarial examples it is also interesting to observe the error rate of all candidate adversarial examples generated for one model and classified by other model.
303
+
304
+ This result might be interesting because it models the following attack. Instead of trying to pick “good” adversarial images an adversary tries to modify all available images in order to get as much misclassified images as possible.
305
+
306
+ To compute the error rate we randomly generated 1000 adversarial images using the source model and then classified them using the target model. Results for various models, adversarial methods
307
+
308
+ Table 5: Comparison of different one-step adversarial methods for adversarial training. The evaluation was run after $9 0 k$ training steps.
309
+
310
+ \*) In all cases except “fast grad $L _ { 2 } { } ^ { \ ' }$ and “fast grad $L _ { \infty }$ ” the evaluation was done using FGSM. For “fast grad $L _ { 2 } { } ^ { \ ' }$ and “fast grad $L _ { \infty }$ ” the evaluation was done using “step l.l.” method. In the case where both training and testing were done with FGSM, the performance on adversarial examples is artificially high due to the label leaking effect. Based on this table, we recommend using “step rnd.” or “step l.l.” as the method of generating adversarial examples at training time, in order to obtain good accuracy on both clean and adversarial examples. We computed $9 5 \%$ confidence intervals based on the standard error of the mean around the test error, using the fact that the test error was evaluated with 50,000 samples. Within each column, we indicate which methods are statistically tied for the best using bold face.
311
+
312
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=1 colspan=1>No adversarial training</td><td rowspan=1 colspan=1>76.8%</td><td rowspan=1 colspan=1>40.7%</td><td rowspan=1 colspan=1>39.0%</td><td rowspan=1 colspan=1>37.9%</td><td rowspan=1 colspan=1>36.7%</td></tr><tr><td rowspan=1 colspan=1>FGSMFast with predicted classFast entropyStep rnd.Step 1.1.</td><td rowspan=1 colspan=1>74.9%76.4%76.4%76.4%76.3%</td><td rowspan=1 colspan=1>79.3%43.2%62.8%73.0%72.9%</td><td rowspan=1 colspan=1>82.8%42.0%61.7%75.4%75.1%</td><td rowspan=1 colspan=1>85.3%40.9%59.5%76.5%76.2%</td><td rowspan=1 colspan=1>83.2%40.0%54.8%72.5%72.2%</td></tr><tr><td rowspan=1 colspan=1>Fast grad. L2*Fast grad. L*</td><td rowspan=1 colspan=1>76.8%75.6%</td><td rowspan=1 colspan=1>44.0%52.2%</td><td rowspan=1 colspan=1>33.2%39.7%</td><td rowspan=1 colspan=1>26.4%30.9%</td><td rowspan=1 colspan=1>22.5%25.0%</td></tr><tr><td rowspan=1 colspan=1>Sign of random perturbationRandom normal perturbation</td><td rowspan=1 colspan=1>76.5%76.6%</td><td rowspan=1 colspan=1>38.8%38.3%</td><td rowspan=1 colspan=1>36.6%36.0%</td><td rowspan=1 colspan=1>35.0%34.4%</td><td rowspan=1 colspan=1>32.7%31.8%</td></tr></table>
313
+
314
+ and fixed $\epsilon = 1 6$ are provided in Table 6. Results for fixed source and target models and various $\epsilon$ are provided in Fig. 5.
315
+
316
+ Overall the error rate of transferred adversarial examples exhibits the same behavior as the transfer rate described in Section 4.4.
317
+
318
+ Table 6: Error rates on adversarial examples transferred between models, rounded to the nearest percent. Results are provided for adversarial images generated using different adversarial methods and fixed perturbation size $\epsilon = 1 6$ . The following models were used for comparison: $A$ and $B$ are Inception v3 models with different random initializations, $C$ is Inception v3 model with ELU activations instead of Relu, $D$ is Inception $\mathbf { v } 4$ model. See also Table 4 for the transfer rate of adversarial examples, rather than the absolute error rate.
319
+
320
+ <table><tr><td rowspan="3"></td><td rowspan="3">source model</td><td colspan="3">FGSM</td><td colspan="3">basic iter.</td><td colspan="3">iter 1.1.</td></tr><tr><td colspan="3">target model</td><td colspan="3">target model</td><td colspan="3">target model</td></tr><tr><td>A B</td><td>C</td><td>D</td><td>A B</td><td>C</td><td>D</td><td>A B</td><td>C</td><td>D</td></tr><tr><td rowspan="4">top1</td><td>A (v3)</td><td>65 52</td><td>53</td><td>45</td><td>78</td><td>51</td><td>50 42</td><td>100</td><td>32</td><td>31</td><td>27</td></tr><tr><td>B(v3)</td><td>52</td><td>66 54</td><td>48</td><td>50</td><td>79</td><td>51 43</td><td>35</td><td>99</td><td>34</td><td>29</td></tr><tr><td>C (v3 ELU)</td><td>53</td><td>55 70</td><td>50</td><td>47</td><td>46</td><td>74</td><td>40</td><td>31 30</td><td>100</td><td>28</td></tr><tr><td>D(v4)</td><td>47</td><td>51 49</td><td>62</td><td>43</td><td>46</td><td>45</td><td>73 30</td><td>31</td><td>31</td><td>99</td></tr><tr><td rowspan="4">top 5</td><td>A(v3)</td><td>46</td><td>28 28</td><td>22</td><td>76</td><td>17</td><td>18</td><td>13 94</td><td>12</td><td>12</td><td>9</td></tr><tr><td>B(v3)</td><td>29</td><td>46 30</td><td>22</td><td>19</td><td>76</td><td>18</td><td>16 13</td><td>96</td><td>12</td><td>11</td></tr><tr><td>C (v3 ELU)</td><td>28</td><td>29 55</td><td>25</td><td>18</td><td>19</td><td>74 15</td><td>12</td><td>12</td><td>96</td><td>9</td></tr><tr><td>D(v4)</td><td>23</td><td>22 25</td><td>40</td><td>14</td><td>16</td><td>16 70</td><td>11</td><td>11</td><td>11</td><td>97</td></tr></table>
321
+
322
+ # D RESULTS WITH DIFFERENT ACTIVATION FUNCTIONS
323
+
324
+ We evaluated robustness to adversarial examples when the network was trained using various nonlinear activation functions instead of the standard relu activation when used with adversarial training on “step l.l.” adversarial images. We tried to use following activation functions instead of $r e l u$ :
325
+
326
+ • tanh(x)
327
+
328
+ ![](images/4fc8661e7cd6a3298edceb42304156a3090e338bbc38bdf46e2ae112438ddf4e.jpg)
329
+ Figure 4: Influence of size of the model on top 5 classification accuracy of various adversarial examples. For a detailed explanation see Section 4.3 and Figure 1.
330
+
331
+ $$
332
+ \begin{array} { r l } & { \bullet r e l u 6 ( x ) = m i n ( r e l u ( x ) , 6 ) } \\ & { \bullet R e l u D e c a y _ { \beta } ( x ) = \frac { r e l u ( x ) } { 1 + \beta r e l u ( x ) ^ { 2 } } \mathrm { ~ f o r ~ } \beta \in \{ 0 . 1 , 0 . 0 1 , 0 . 0 0 1 \} } \end{array}
333
+ $$
334
+
335
+ Training converged using all of these activations, however test performance was not necessarily the same as with relu.
336
+
337
+ tanh and $R e l u D e c a y _ { \beta = 0 . 1 }$ lose about $2 \% - 3 \%$ of accuracy on clean examples and about $1 0 \% { - } 2 0 \%$ on “step l.l.” adversarial examples. relu6, ReluDecay $\scriptstyle { \beta = 0 . 0 1 }$ and $R e l u D e c a y _ { \beta = 0 . 0 0 1 }$ demonstrated similar accuracy (within $\pm 1 \%$ ) to relu on clean images and few percent loss of accuracy on “step l.l.” images. At the same time all non-linear activation functions increased classification accuracy on some of the iterative adversarial images. Detailed results are provided in Table 7.
338
+
339
+ ![](images/ca2ea6eca31c4cbdef1380db09eb81b2f300edd40a624085c176d03cbe177b94.jpg)
340
+ Top 1 error rate.
341
+
342
+ ![](images/f3ee75c54c24cd0dc49442a4a1cd65a2164519ca594c6face6e8a84029eecabf.jpg)
343
+ Top 5 error rate.
344
+ Figure 5: Influence of the size of adversarial perturbation on the error rate on adversarial examples generated for one model and classified using another model. Both source and target models were Inception v3 networks with different random intializations.
345
+
346
+ Overall non linear activation functions could be used as an additional measure of defense against iterative adversarial images.
347
+
348
+ Table 7: Activation functions and robustness to adversarial examples. For each activation function we adversarially trained the network on “step l.l.” adversarial images and then run classification of clean images and adversarial images generated using various adversarial methods and $\epsilon$ .
349
+
350
+ <table><tr><td>Adv. method</td><td>Activation</td><td>Clean</td><td>∈=2</td><td>∈=4</td><td>∈=8</td><td>∈=16</td></tr><tr><td rowspan="5">Step 1.1.</td><td>relu relu6</td><td>77.5% 77.7%</td><td>74.6% 71.8%</td><td>75.1% 73.5%</td><td>75.5% 74.5%</td><td>74.5% 74.0%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>74.0%</td><td>74.9%</td><td>75.2%</td><td>73.9%</td></tr><tr><td></td><td></td><td>73.6%</td><td>74.6%</td><td>75.0%</td><td></td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td></td><td></td><td></td><td>73.6%</td></tr><tr><td>ReluDecayo.1 tanh</td><td>75.3% 74.5%</td><td>67.5% 63.7%</td><td>67.5% 65.1%</td><td>67.0% 65.8%</td><td>64.8% 61.9%</td></tr><tr><td rowspan="6">Iter. 1.1.</td><td>relu</td><td>77.5%</td><td>30.2%</td><td>8.0%</td><td>3.1%</td><td>1.6%</td></tr><tr><td>relu6</td><td>77.7%</td><td>39.8%</td><td>13.7%</td><td>4.1%</td><td>1.9%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>39.9%</td><td>12.6%</td><td>3.8%</td><td>1.8%</td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td>36.2%</td><td>11.2%</td><td>3.2%</td><td>1.6%</td></tr><tr><td>ReluDecayo.1</td><td>75.3%</td><td>47.0%</td><td>25.8%</td><td>6.5%</td><td>2.4%</td></tr><tr><td>tanh</td><td>74.5%</td><td>35.8%</td><td>6.6%</td><td>2.7%</td><td>0.9%</td></tr><tr><td rowspan="6">Basic iter.</td><td>relu</td><td>77.5%</td><td>28.4%</td><td>23.2%</td><td>21.5%</td><td>21.0%</td></tr><tr><td>relu6</td><td>77.7%</td><td>31.2%</td><td>26.1%</td><td>23.8%</td><td>23.2%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>32.9%</td><td>27.2%</td><td>24.7%</td><td>24.1%</td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td>30.0%</td><td>24.2%</td><td>21.4%</td><td>20.5%</td></tr><tr><td>ReluDecayo.1</td><td>75.3%</td><td>26.7%</td><td>20.6%</td><td>16.5%</td><td>15.2%</td></tr><tr><td>tanh</td><td>74.5%</td><td>24.5%</td><td>22.0%</td><td>20.9%</td><td>20.7%</td></tr></table>
351
+
352
+ # E RESULTS WITH DIFFERENT NUMBER OF ADVERSARIAL EXAMPLES IN THE MINIBATCH
353
+
354
+ We studied how number of adversarial examples $k$ in the minibatch affect accuracy on clean and adversarial examples. Results are summarized in Table 8.
355
+
356
+ Overall we noticed that increase of $k$ lead to increase of accuracy on adversarial examples and to decrease of accuracy on clean examples. At the same having more than half of adversarial examples in the minibatch (which correspond to $k > 1 6$ in our case) does not provide significant improvement of accuracy on adversarial images, however lead to up to $1 \%$ of additional decrease of accuracy on clean images. Thus for most experiments in the paper we have chosen $k = 1 6$ as a reasonable trade-off between accuracy on clean and adversarial images.
357
+
358
+ Table 8: Results of adversarial training depending on $k$ — number of adversarial examples in the minibatch. Adversarial examples for training and evaluation were generated using step l.l. method.
359
+ Row ‘No adv‘ is a baseline result without adversarial training (which is equivalent to $k = 0$ ).
360
+ Rows ‘Adv, $k = X ^ { \ast }$ are results of adversarial training with $X$ adversarial examples in the minibatch.
361
+ Total minibatch size is 32, thus $k = 3 2$ correspond to minibatch without clean examples.
362
+
363
+ <table><tr><td></td><td>Clean</td><td>∈=2</td><td>∈=4</td><td>∈=8</td><td>∈=16</td></tr><tr><td>No adv</td><td>78.2%</td><td>31.5%</td><td>27.7%</td><td>27.8%</td><td>29.7%</td></tr><tr><td>Adv, k = 4</td><td>78.3%</td><td>71.7%</td><td>71.3%</td><td>69.4%</td><td>65.8%</td></tr><tr><td>Adv,k =8</td><td>78.1%</td><td>73.2%</td><td>73.2%</td><td>72.6%</td><td>70.5%</td></tr><tr><td>Adv, k = 16</td><td>77.6%</td><td>73.8%</td><td>75.3%</td><td>76.1%</td><td>75.4%</td></tr><tr><td>Adv,k = 24</td><td>77.1%</td><td>73.0%</td><td>75.3%</td><td>76.2%</td><td>76.0%</td></tr><tr><td>Adv,k = 32</td><td>76.3%</td><td>73.4%</td><td>75.1%</td><td>75.9%</td><td>75.8%</td></tr></table>
parse/train/BJm4T4Kgx/BJm4T4Kgx_content_list.json ADDED
@@ -0,0 +1,1787 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ADVERSARIAL MACHINE LEARNING AT SCALE ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 741,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Alexey Kurakin Google Brain kurakin@google.com ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 362,
21
+ 188
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Ian J. Goodfellow OpenAI ian@openai.com ",
28
+ "bbox": [
29
+ 415,
30
+ 145,
31
+ 555,
32
+ 188
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Samy Bengio \nGoogle Brain \nbengio@google.com ",
39
+ "bbox": [
40
+ 607,
41
+ 145,
42
+ 777,
43
+ 188
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 224,
54
+ 544,
55
+ 239
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Adversarial examples are malicious inputs designed to fool machine learning models. They often transfer from one model to another, allowing attackers to mount black box attacks without knowledge of the target model’s parameters. Adversarial training is the process of explicitly training a model on adversarial examples, in order to make it more robust to attack or to reduce its test error on clean inputs. So far, adversarial training has primarily been applied to small problems. In this research, we apply adversarial training to ImageNet (Russakovsky et al., 2014). Our contributions include: (1) recommendations for how to succesfully scale adversarial training to large models and datasets, (2) the observation that adversarial training confers robustness to single-step attack methods, (3) the finding that multi-step attack methods are somewhat less transferable than singlestep attack methods, so single-step attacks are the best for mounting black-box attacks, and (4) resolution of a “label leaking” effect that causes adversarially trained models to perform better on adversarial examples than on clean examples, because the adversarial example construction process uses the true label and the model can learn to exploit regularities in the construction process. ",
62
+ "bbox": [
63
+ 233,
64
+ 257,
65
+ 764,
66
+ 478
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 508,
77
+ 336,
78
+ 523
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "It has been shown that machine learning models are often vulnerable to adversarial manipulation of their input intended to cause incorrect classification (Dalvi et al., 2004). In particular, neural networks and many other categories of machine learning models are highly vulnerable to attacks based on small modifications of the input to the model at test time (Biggio et al., 2013; Szegedy et al., 2014; Goodfellow et al., 2014; Papernot et al., 2016b). ",
85
+ "bbox": [
86
+ 174,
87
+ 541,
88
+ 825,
89
+ 609
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The problem can be summarized as follows. Let’s say there is a machine learning system $M$ and input sample $C$ which we call a clean example. Let’s assume that sample $C$ is correctly classified by the machine learning system, i.e. $M ( C ) = y _ { t r u e }$ . It’s possible to construct an adversarial example $A$ which is perceptually indistinguishable from $C$ but is classified incorrectly, i.e. $M ( A ) \\neq y _ { t r u e }$ . These adversarial examples are misclassified far more often than examples that have been perturbed by noise, even if the magnitude of the noise is much larger than the magnitude of the adversarial perturbation (Szegedy et al., 2014). ",
96
+ "bbox": [
97
+ 174,
98
+ 617,
99
+ 825,
100
+ 715
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Adversarial examples pose potential security threats for practical machine learning applications. In particular, Szegedy et al. (2014) showed that an adversarial example that was designed to be misclassified by a model $M _ { 1 }$ is often also misclassified by a model $M _ { 2 }$ . This adversarial example transferability property means that it is possible to generate adversarial examples and perform a misclassification attack on a machine learning system without access to the underlying model. Papernot et al. (2016a) and Papernot et al. (2016b) demonstrated such attacks in realistic scenarios. ",
107
+ "bbox": [
108
+ 174,
109
+ 722,
110
+ 823,
111
+ 805
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "It has been shown (Goodfellow et al., 2014; Huang et al., 2015) that injecting adversarial examples into the training set (also called adversarial training) could increase robustness of neural networks to adversarial examples. Another existing approach is to use defensive distillation to train the network (Papernot et al., 2015). However all prior work studies defense measures only on relatively small datasets like MNIST and CIFAR10. Some concurrent work studies attack mechanisms on ImageNet (Rozsa et al., 2016), focusing on the question of how well adversarial examples transfer between different types of models, while we focus on defenses and studying how well different types of adversarial example generation procedures transfer between relatively similar models. ",
118
+ "bbox": [
119
+ 174,
120
+ 811,
121
+ 823,
122
+ 924
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "In this paper we studied adversarial training of Inception models trained on ImageNet. The contributions of this paper are the following: ",
129
+ "bbox": [
130
+ 174,
131
+ 103,
132
+ 821,
133
+ 132
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "• We successfully used adversarial training to train an Inception v3 model (Szegedy et al., 2015) on ImageNet dataset (Russakovsky et al., 2014) and to significantly increase robustness against adversarial examples generated by the fast gradient sign method (Goodfellow et al., 2014) as well as other one-step methods. We demonstrated that different types of adversarial examples tend to have different transferability properties between models. In particular we observed that those adversarial examples which are harder to resist using adversarial training are less likely to be transferrable between models. We showed that models which have higher capacity (i.e. number of parameters) tend to be more robust to adversarial examples compared to lower capacity model of the same architecture. This provides additional cue which could help building more robust models. \n• We also observed an interesting property we call “label leaking”. Adversarial examples constructed with a single-step method making use of the true labels may be easier to classify than clean adversarial examples, because an adversarially trained model can learn to exploit regularities in the adversarial example construction process. This suggests using adversarial example construction processes that do not make use of the true label. ",
140
+ "bbox": [
141
+ 215,
142
+ 142,
143
+ 825,
144
+ 382
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "The rest of the paper is structured as follows: In section 2 we review different methods to generate adversarial examples. Section 3 describes details of our adversarial training algorithm. Finally, section 4 describes our experiments and results of adversarial training. ",
151
+ "bbox": [
152
+ 176,
153
+ 393,
154
+ 825,
155
+ 436
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 METHODS GENERATING ADVERSARIAL EXAMPLES ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 174,
165
+ 458,
166
+ 625,
167
+ 473
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "2.1 TERMINOLOGY AND NOTATION ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 176,
177
+ 488,
178
+ 433,
179
+ 502
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "In this paper we use the following notation and terminology regarding adversarial examples: ",
186
+ "bbox": [
187
+ 168,
188
+ 513,
189
+ 776,
190
+ 530
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "1. $\\boldsymbol { X }$ , the clean image — unmodified image from the dataset (either train or test set). \n2. $X ^ { a d v }$ , the adversarial image: the output of any procedure intended to produce an approximate worst-case modification of the clean image. We sometimes call this a candidate adversarial image to emphasize that an adversarial image is not necessarily misclassified by the neural network. \n3. Misclassified adversarial image — candidate adversarial image which is misclassified by the neural network. In addition we are typically interested only in those misclassified adversarial images when the corresponding clean image is correctly classified. \n4. $\\epsilon { : }$ : The size of the adversarial perturbation. In most cases, we require the $L _ { \\infty }$ norm of the perturbation to be less than $\\epsilon$ , as done by Goodfellow et al. (2014). We always specify $\\epsilon$ in terms of pixel values in the range [0, 255]. Note that some other work on adversarial examples minimizes the size of the perturbation rather than imposing a constraint on the size of the perturbation (Szegedy et al., 2014). \n5. The cost function used to train the model is denoted $J ( X , y _ { t r u e } )$ . \n6. $C l i p { \\bf { _ { X , \\epsilon } } } ( { \\bf { A } } )$ denotes element-wise clipping $\\pmb { A }$ , with $A _ { i , j }$ clipped to the range $[ X _ { i , j } \\ -$ $\\epsilon , X _ { i , j } + \\epsilon ]$ . \n7. One-step methods of adversarial example generation generate a candidate adversarial image after computing only one gradient. They are often based on finding the optimal perturbation of a linear approximation of the cost or model. Iterative methods apply many gradient updates. They typically do not rely on any approximation of the model and typically produce more harmful adversarial examples when run for more iterations. ",
197
+ "bbox": [
198
+ 207,
199
+ 541,
200
+ 825,
201
+ 867
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "2.2 ATTACK METHODS ",
208
+ "text_level": 1,
209
+ "bbox": [
210
+ 174,
211
+ 883,
212
+ 344,
213
+ 897
214
+ ],
215
+ "page_idx": 1
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "We study a variety of attack methods: ",
220
+ "bbox": [
221
+ 176,
222
+ 910,
223
+ 421,
224
+ 924
225
+ ],
226
+ "page_idx": 1
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "Fast gradient sign method Goodfellow et al. (2014) proposed the fast gradient sign method (FGSM) as a simple way to generate adversarial examples: ",
231
+ "bbox": [
232
+ 171,
233
+ 103,
234
+ 825,
235
+ 132
236
+ ],
237
+ "page_idx": 2
238
+ },
239
+ {
240
+ "type": "equation",
241
+ "img_path": "images/f483e5bc55c1b907e684441d0e287301f64b1521cacd5dd90df826e088b31d32.jpg",
242
+ "text": "$$\nX ^ { a d v } = X + \\epsilon \\mathrm { s i g n } \\bigl ( \\nabla _ { X } J ( X , y _ { t r u e } ) \\bigr )\n$$",
243
+ "text_format": "latex",
244
+ "bbox": [
245
+ 369,
246
+ 138,
247
+ 629,
248
+ 159
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "This method is simple and computationally efficient compared to more complex methods like LBFGS (Szegedy et al., 2014), however it usually has a lower success rate. On ImageNet, top-1 error rate on candidate adversarial images for the FGSM is about $6 3 \\% - 6 9 \\%$ for $\\epsilon \\in [ 2 , 3 2 ]$ . ",
255
+ "bbox": [
256
+ 173,
257
+ 165,
258
+ 826,
259
+ 208
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "One-step target class methods FGSM finds adversarial perturbations which increase the value of the loss function. An alternative approach is to maximize probability $p ( y _ { t a r g e t } \\mid X )$ of some specific target class $y _ { t a r g e t }$ which is unlikely to be the true class for a given image. For a neural network with cross-entropy loss this will lead to the following formula for the one-step target class method: ",
266
+ "bbox": [
267
+ 173,
268
+ 223,
269
+ 825,
270
+ 292
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "equation",
276
+ "img_path": "images/063f640bae14820b4750e73059878e954d98cffa805ecda6aae48aebd25adc5c.jpg",
277
+ "text": "$$\nX ^ { a d v } = X - \\epsilon \\mathrm { s i g n } \\bigl ( \\nabla _ { X } J ( X , y _ { t a r g e t } ) \\bigr )\n$$",
278
+ "text_format": "latex",
279
+ "bbox": [
280
+ 362,
281
+ 291,
282
+ 633,
283
+ 310
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "As a target class we can use the least likely class predicted by the network $y _ { L L } = \\arg \\operatorname* { m i n } _ { y } \\{ p ( y \\mid$ $\\pmb { X } ) \\}$ , as suggested by Kurakin et al. (2016). In such case we refer to this method as one-step least likely class or just “step l.l.” Alternatively we can use a random class as target class. In such a case we refer to this method as “step rnd.”. ",
290
+ "bbox": [
291
+ 173,
292
+ 323,
293
+ 825,
294
+ 383
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Basic iterative method A straightforward extension of FGSM is to apply it multiple times with small step size: ",
301
+ "bbox": [
302
+ 174,
303
+ 397,
304
+ 823,
305
+ 428
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/d8e0c2e1720a259b5fb942bc3d1b3c92e251c456403b5dfdd5eb6b57f2085799.jpg",
312
+ "text": "$$\nX _ { 0 } ^ { a d v } = X , \\quad X _ { N + 1 } ^ { a d v } = C l i p _ { X , \\epsilon } \\Big \\{ X _ { N } ^ { a d v } + \\alpha \\mathrm { s i g n } \\big ( \\nabla _ { X } J \\big ( X _ { N } ^ { a d v } , y _ { t r u e } \\big ) \\big ) \\Big \\}\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 254,
316
+ 444,
317
+ 743,
318
+ 472
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "In our experiments we used $\\alpha = 1$ , i.e. we changed the value of each pixel only by 1 on each step. We selected the number of iterations to be $\\operatorname* { m i n } ( \\epsilon + 4 , 1 . 2 5 \\epsilon )$ . See more information on this method in Kurakin et al. (2016). Below we refer to this method as “iter. basic” method. ",
325
+ "bbox": [
326
+ 174,
327
+ 481,
328
+ 825,
329
+ 525
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "Iterative least-likely class method By running multiple iterations of the “step l.l.” method we can get adversarial examples which are misclassified in more than $9 9 \\%$ of the cases: ",
336
+ "bbox": [
337
+ 171,
338
+ 540,
339
+ 823,
340
+ 569
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "equation",
346
+ "img_path": "images/bad4f315afadd3d7ab54d31d4a341cbd2f93c7576a21cea85b9577e0478f7e62.jpg",
347
+ "text": "$$\nX _ { 0 } ^ { a d v } = X , \\quad X _ { N + 1 } ^ { a d v } = C l i p _ { X , \\epsilon } \\left\\{ X _ { N } ^ { a d v } - \\alpha \\mathrm { s i g n } \\left( \\nabla _ { X } J ( X _ { N } ^ { a d v } , y _ { L L } ) \\right) \\right\\}\n$$",
348
+ "text_format": "latex",
349
+ "bbox": [
350
+ 258,
351
+ 575,
352
+ 740,
353
+ 595
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "$\\alpha$ and number of iterations were selected in the same way as for the basic iterative method. Below we refer to this method as the “iter. l.l.”. ",
360
+ "bbox": [
361
+ 173,
362
+ 609,
363
+ 825,
364
+ 638
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "3 ADVERSARIAL TRAINING ",
371
+ "text_level": 1,
372
+ "bbox": [
373
+ 176,
374
+ 659,
375
+ 418,
376
+ 674
377
+ ],
378
+ "page_idx": 2
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "The basic idea of adversarial training is to inject adversarial examples into the training set, continually generating new adversarial examples at every step of training (Goodfellow et al., 2014). Adversarial training was originally developed for small models that did not use batch normalization. To scale adversarial training to ImageNet, we recommend using batch normalization (Ioffe & Szegedy, 2015). To do so successfully, we found that it was important for examples to be grouped into batches containing both normal and adversarial examples before taking each training step, as described in algorithm 1. ",
383
+ "bbox": [
384
+ 173,
385
+ 690,
386
+ 825,
387
+ 789
388
+ ],
389
+ "page_idx": 2
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "We use a loss function that allows independent control of the number and relative weight of adversarial examples in each batch: ",
394
+ "bbox": [
395
+ 174,
396
+ 795,
397
+ 821,
398
+ 824
399
+ ],
400
+ "page_idx": 2
401
+ },
402
+ {
403
+ "type": "equation",
404
+ "img_path": "images/520c5b5405d7ad7a272e985c957bbd04aee398a57346141cc9a6b8ea90ea2327.jpg",
405
+ "text": "$$\nL o s s = \\frac { 1 } { ( m - k ) + \\lambda k } \\left( \\sum _ { i \\in C L E A N } L ( X _ { i } | y _ { i } ) + \\lambda \\sum _ { i \\in A D V } L ( X _ { i } ^ { a d v } | y _ { i } ) \\right)\n$$",
406
+ "text_format": "latex",
407
+ "bbox": [
408
+ 261,
409
+ 830,
410
+ 735,
411
+ 875
412
+ ],
413
+ "page_idx": 2
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "where $L ( X | y )$ is a loss on a single example $X$ with true class $y ; m$ is total number of training examples in the minibatch; $k$ is number of adversarial examples in the minibatch and $\\lambda$ is a parameter which controls the relative weight of adversarial examples in the loss. We used $\\lambda = 0 . 3$ , $m = 3 2$ , and $k = 1 6$ . Note that we replace each clean example with its adversarial counterpart, for a total minibatch size of 32, which is a departure from previous approaches to adversarial training. ",
418
+ "bbox": [
419
+ 176,
420
+ 881,
421
+ 825,
422
+ 924
423
+ ],
424
+ "page_idx": 2
425
+ },
426
+ {
427
+ "type": "table",
428
+ "img_path": "images/1dde32b661400dc331885d847a85c8b4b6487d3bf66556c8b396c9c7656870dd.jpg",
429
+ "table_caption": [],
430
+ "table_footnote": [],
431
+ "table_body": "<table><tr><td colspan=\"2\">Algorithm1 Adversarial training of network N. Size of the training minibatch is m.Number of adversarial images in the minibatch is k.</td></tr><tr><td colspan=\"2\">1:Randomly initialize network N</td></tr><tr><td>2: repeat</td><td></td></tr><tr><td>3:</td><td>Read minibatch B = {X1,..., Xm} from training set</td></tr><tr><td>4:</td><td></td></tr><tr><td>5:</td><td>clean examples {X1,..., Xk} using current state of the network N Xkdo,Xk+1,Xmy</td></tr><tr><td>6:</td><td>Do one training step of network N using minibatch B&#x27;</td></tr><tr><td>7:</td><td></td></tr><tr><td colspan=\"2\">until training converged</td></tr></table>",
432
+ "bbox": [
433
+ 169,
434
+ 102,
435
+ 823,
436
+ 255
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "",
443
+ "bbox": [
444
+ 174,
445
+ 284,
446
+ 820,
447
+ 311
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Fraction and weight of adversarial examples which we used in each minibatch differs from Huang et al. (2015) where authors replaced entire minibatch with adversarial examples. However their experiments was done on smaller datasets (MNIST and CIFAR-10) in which case adversarial training does not lead to decrease of accuracy on clean images. We found that our approach works better for ImageNet models (corresponding comparative experiments could be found in Appendix E). ",
454
+ "bbox": [
455
+ 174,
456
+ 318,
457
+ 823,
458
+ 388
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "We observed that if we fix $\\epsilon$ during training then networks become robust only to that specific value of $\\epsilon$ . We therefore recommend choosing $\\epsilon$ randomly, independently for each training example. In our experiments we achieved best results when magnitudes were drawn from a truncated normal distribution defined in interval [0, 16] with underlying normal distribution $N ( \\mu = 0 , \\sigma = 8 )$ ) . 1 ",
465
+ "bbox": [
466
+ 174,
467
+ 395,
468
+ 825,
469
+ 450
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "4 EXPERIMENTS ",
476
+ "text_level": 1,
477
+ "bbox": [
478
+ 176,
479
+ 473,
480
+ 326,
481
+ 489
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "We adversarially trained an Inception v3 model (Szegedy et al., 2015) on ImageNet. All experiments were done using synchronous distributed training on 50 machines, with a minibatch of 32 examples on each machine. We observed that the network tends to reach maximum accuracy at around $1 3 0 k -$ $1 5 0 k$ iterations. If we continue training beyond $1 5 0 k$ iterations then eventually accuracy might decrease by a fraction of a percent. Thus we ran experiments for around $1 5 0 k$ iterations and then used the obtained accuracy as the final result of the experiment. ",
488
+ "bbox": [
489
+ 174,
490
+ 506,
491
+ 825,
492
+ 590
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "Similar to Szegedy et al. (2015) we used RMSProp optimizer for training. We used a learning rate of 0.045 except where otherwise indicated. ",
499
+ "bbox": [
500
+ 176,
501
+ 597,
502
+ 821,
503
+ 625
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "We looked at interaction of adversarial training and other forms or regularization (dropout, label smoothing and weight decay). By default training of Inception v3 model uses all three of them. We noticed that disabling label smoothing and/or dropout leads to small decrease of accuracy on clean examples (by $0 . 1 \\% - 0 . 5 \\%$ for top 1 accuracy) and small increase of accuracy on adversarial examples (by $1 \\% - 1 . 5 \\%$ for top 1 accuracy). On the other hand reducing weight decay leads to decrease of accuracy on both clean and adversarial examples. ",
510
+ "bbox": [
511
+ 174,
512
+ 632,
513
+ 825,
514
+ 715
515
+ ],
516
+ "page_idx": 3
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "We experimented with delaying adversarial training by 0, $1 0 k$ , $2 0 k$ and $4 0 k$ iterations. In such case we used only clean examples during the first $N$ training iterations and after $N$ iterations included both clean and adversarial examples in the minibatch. We noticed that delaying adversarial training has almost no effect on accuracy on clean examples (difference in accuracy within $0 . 2 \\%$ ) after sufficient number of training iterations (more than $7 0 k$ in our case). At the same time we noticed that larger delays of adversarial training might cause up to $4 \\%$ decline of accuracy on adversarial examples with high magnitude of adversarial perturbations. For small $1 0 k$ delay changes of accuracy was not statistically significant to recommend against it. We used a delay of $1 0 k$ because this allowed us to reuse the same partially trained model as a starting point for many different experiments. ",
521
+ "bbox": [
522
+ 174,
523
+ 722,
524
+ 825,
525
+ 848
526
+ ],
527
+ "page_idx": 3
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "For evaluation we used the ImageNet validation set which contains 50, 000 images and does not intersect with the training set. ",
532
+ "bbox": [
533
+ 174,
534
+ 854,
535
+ 821,
536
+ 883
537
+ ],
538
+ "page_idx": 3
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "We experimented with adversarial training using several types of one-step methods. We found that adversarial training using any type of one-step method increases robustness to all types of one-step adversarial examples that we tested. However there is still a gap between accuracy on clean and adversarial examples which could vary depending on the combination of methods used for training and evaluation. ",
543
+ "bbox": [
544
+ 174,
545
+ 128,
546
+ 825,
547
+ 199
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "Adversarial training caused a slight (less than $1 \\%$ ) decrease of accuracy on clean examples in our ImageNet experiments. This differs from results of adversarial training reported previously, where adversarial training increased accuracy on the test set (Goodfellow et al., 2014; Miyato et al., 2016b;a). One possible explanation is that adversarial training acts as a regularizer. For datasets with few labeled examples where overfitting is the primary concern, adversarial training reduces test error. For datasets like ImageNet where state-of-the-art models typically have high training set error, adding a regularizer like adversarial training can increase training set error more than it decreases the gap between training and test set error. Our results suggest that adversarial training should be employed in two scenarios: ",
554
+ "bbox": [
555
+ 174,
556
+ 205,
557
+ 825,
558
+ 330
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "1. When a model is overfitting, and a regularizer is required. \n2. When security against adversarial examples is a concern. In this case, adversarial training is the method that provides the most security of any known defense, while losing only a small amount of accuracy. ",
565
+ "bbox": [
566
+ 210,
567
+ 342,
568
+ 825,
569
+ 404
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "By comparing different one-step methods for adversarial training we observed that the best results in terms or accuracy on test set are achieved using “step l.l.” or “step rnd.” method. Moreover using these two methods helped the model to become robust to adversarial examples generated by other one-step methods. Thus for final experiments we used “step l.l.” adversarial method. ",
576
+ "bbox": [
577
+ 178,
578
+ 415,
579
+ 825,
580
+ 470
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "For brevity we omitted a detailed comparison of different one-step methods here, but the reader can find it in Appendix A. ",
587
+ "bbox": [
588
+ 173,
589
+ 477,
590
+ 823,
591
+ 506
592
+ ],
593
+ "page_idx": 4
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "Table 1: Top 1 and top 5 accuracies of an adversarially trained network on clean images and adversarial images with various test-time \u000f. Both training and evaluation were done using “step l.l.” method. Adversarially training caused the baseline model to become robust to adversarial examples but lost some accuracy on clean examples. We therefore also trained a deeper model with two additional Inception blocks. The deeper model benefits more from adversarial training in terms of robustness to adversarial perturbation, and loses less accuracy on clean examples than the smaller model does. ",
598
+ "bbox": [
599
+ 173,
600
+ 517,
601
+ 825,
602
+ 616
603
+ ],
604
+ "page_idx": 4
605
+ },
606
+ {
607
+ "type": "table",
608
+ "img_path": "images/ff7c16cc2abdf0d5dd18b135821913445673450e448072b61d84e67207a329fb.jpg",
609
+ "table_caption": [],
610
+ "table_footnote": [],
611
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>e=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=2 colspan=1>Baseline(standard training)</td><td rowspan=1 colspan=1>top1</td><td rowspan=1 colspan=1>78.4%</td><td rowspan=1 colspan=1>30.8%</td><td rowspan=1 colspan=1>27.2%</td><td rowspan=1 colspan=1>27.2%</td><td rowspan=1 colspan=1>29.5%</td></tr><tr><td rowspan=1 colspan=1>top 5</td><td rowspan=1 colspan=1>94.0%</td><td rowspan=1 colspan=1>60.0%</td><td rowspan=1 colspan=1>55.6%</td><td rowspan=1 colspan=1>55.1%</td><td rowspan=1 colspan=1>57.2%</td></tr><tr><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>77.6%93.8%</td><td rowspan=1 colspan=1>73.5%91.7%</td><td rowspan=1 colspan=1>74.0%91.9%</td><td rowspan=1 colspan=1>74.5%92.0%</td><td rowspan=1 colspan=1>73.9%91.4%</td></tr><tr><td rowspan=1 colspan=1>Deeper model(standard training)</td><td rowspan=1 colspan=1>top1top 5</td><td rowspan=1 colspan=1>78.7%94.4%</td><td rowspan=1 colspan=1>33.5%63.3%</td><td rowspan=1 colspan=1>30.0%58.9%</td><td rowspan=1 colspan=1>30.0%58.1%</td><td rowspan=1 colspan=1>31.6%59.5%</td></tr><tr><td rowspan=1 colspan=1>Deeper model(Adv. training)</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.1%94.1%</td><td rowspan=1 colspan=1>75.4%92.6%</td><td rowspan=1 colspan=1>75.7%92.7%</td><td rowspan=1 colspan=1>75.6%92.5%</td><td rowspan=1 colspan=1>74.4%91.6%</td></tr></table>",
612
+ "bbox": [
613
+ 245,
614
+ 633,
615
+ 753,
616
+ 763
617
+ ],
618
+ "page_idx": 4
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Results of adversarial training using “step l.l.” method are provided in Table 1. As it can be seen from the table we were able to significantly increase top-1 and top-5 accuracy on adversarial examples (up to $7 4 \\%$ and $9 2 \\%$ correspondingly) to make it to be on par with accuracy on clean images. However we lost about $0 . 8 \\%$ accuracy on clean examples. ",
623
+ "bbox": [
624
+ 174,
625
+ 784,
626
+ 823,
627
+ 839
628
+ ],
629
+ "page_idx": 4
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "We were able to slightly reduce the gap in the accuracy on clean images by slightly increasing the size of the model. This was done by adding two additional Inception blocks to the model. For specific details about Inception blocks refer to Szegedy et al. (2015). ",
634
+ "bbox": [
635
+ 174,
636
+ 847,
637
+ 825,
638
+ 888
639
+ ],
640
+ "page_idx": 4
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Unfortunately, training on one-step adversarial examples does not confer robustness to iterative adversarial examples, as shown in Table 2. ",
645
+ "bbox": [
646
+ 174,
647
+ 895,
648
+ 823,
649
+ 924
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "table",
655
+ "img_path": "images/2a1e7301ab7d757ce6989d2bdba6bc249e4c087e6c43db62e8d1f72ba29d4a94.jpg",
656
+ "table_caption": [
657
+ "Table 2: Accuracy of adversarially trained network on iterative adversarial examples. Adversarial training was done using “step l.l.” method. Results were computed after $1 4 0 k$ iterations of training. Overall, we see that training on one-step adversarial examples does not confer resistance to iterative adversarial examples. "
658
+ ],
659
+ "table_footnote": [],
660
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Adv. method</td><td rowspan=1 colspan=1>Training</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=2 colspan=1>Iter. 1.1.</td><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top 1top5</td><td rowspan=1 colspan=1>77.4%93.9%</td><td rowspan=1 colspan=1>29.1%56.9%</td><td rowspan=1 colspan=1>7.5%21.3%</td><td rowspan=1 colspan=1>3.0%9.4%</td><td rowspan=1 colspan=1>1.5%5.5%</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.3%94.1%</td><td rowspan=1 colspan=1>23.3%49.3%</td><td rowspan=1 colspan=1>5.5%18.8%</td><td rowspan=1 colspan=1>1.8%7.8%</td><td rowspan=1 colspan=1>0.7%4.4%</td></tr><tr><td rowspan=2 colspan=1>Iter. basic</td><td rowspan=1 colspan=1>Adv. training</td><td rowspan=1 colspan=1>top 1top5</td><td rowspan=1 colspan=1>77.4%93.9%</td><td rowspan=1 colspan=1>30.0%44.3%</td><td rowspan=1 colspan=1>25.2%33.6%</td><td rowspan=1 colspan=1>23.5%28.4%</td><td rowspan=1 colspan=1>23.2%26.8%</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>78.3%94.1%</td><td rowspan=1 colspan=1>31.4%43.1%</td><td rowspan=1 colspan=1>28.1%34.8%</td><td rowspan=1 colspan=1>26.4%30.2%</td><td rowspan=1 colspan=1>25.9%28.8%</td></tr></table>",
661
+ "bbox": [
662
+ 209,
663
+ 175,
664
+ 789,
665
+ 304
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We also tried to use iterative adversarial examples during training, however we were unable to gain any benefits out of it. It is computationally costly and we were not able to obtain robustness to adversarial examples or to prevent the procedure from reducing the accuracy on clean examples significantly. It is possible that much larger models are necessary to achieve robustness to such a large class of inputs. ",
672
+ "bbox": [
673
+ 174,
674
+ 354,
675
+ 825,
676
+ 425
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "4.2 LABEL LEAKING ",
683
+ "text_level": 1,
684
+ "bbox": [
685
+ 176,
686
+ 464,
687
+ 330,
688
+ 477
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "We discovered a label leaking effect: when a model is trained on FGSM adversarial examples and then evaluated using FGSM adversarial examples, the accuracy on adversarial images becomes much higher than the accuracy on clean images (see Table 3). This effect also occurs (but to a lesser degree) when using other one-step methods that require the true label as input. ",
695
+ "bbox": [
696
+ 174,
697
+ 497,
698
+ 825,
699
+ 554
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "We say that label for specific example has been leaked if and only if the model classifies an adversarial example correctly when that adversarial example is generated using the true label but misclassifies a corresponding adversarial example that was created without using the true label. If too many labels has been leaked then accuracy on adversarial examples might become bigger than accuracy on clean examples which we observed on ImageNet dataset. ",
706
+ "bbox": [
707
+ 174,
708
+ 560,
709
+ 823,
710
+ 631
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "We believe that the effect occurs because one-step methods that use the true label perform a very simple and predictable transformation that the model can learn to recognize. The adversarial example construction process thus inadvertently leaks information about the true label into the input. We found that the effect vanishes if we use adversarial example construction processes that do not use the true label. The effect also vanishes if an iterative method is used, presumably because the output of an iterative process is more diverse and less predictable than the output of a one-step process. ",
717
+ "bbox": [
718
+ 174,
719
+ 637,
720
+ 825,
721
+ 722
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "Overall due to the label leaking effect, we do not recommend to use FGSM or other methods defined with respect to the true class label to evaluate robustness to adversarial examples; we recommend to use other one-step methods that do not directly access the label instead. ",
728
+ "bbox": [
729
+ 176,
730
+ 728,
731
+ 820,
732
+ 770
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "We recommend to replace the true label with the most likely label predicted by the model. Alternately, one can maximize the cross-entropy between the full distribution over all predicted labels given the clean input and the distribution over all predicted labels given the perturbed input (Miyato et al., 2016b). ",
739
+ "bbox": [
740
+ 174,
741
+ 776,
742
+ 823,
743
+ 833
744
+ ],
745
+ "page_idx": 5
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "We revisited the adversarially trained MNIST classifier from Goodfellow et al. (2014) and found that it too leaks labels. The most labels are leaked with $\\epsilon = 0 . 3$ on MNIST data in $[ 0 , 1 ]$ . With that $\\epsilon$ , the model leaks 79 labels on the test set of 10,000 examples. However, the amount of label leaking is small compared to the amount of error caused by adversarial examples. The error rate on adversarial examples exceeds the error rate on clean examples for $\\epsilon \\in \\{ . 0 5 , . 1 , . 2 5 , . 3 , . 4 , . 4 5 , . 5 \\}$ . This explains why the label leaking effect was not noticed earlier. ",
750
+ "bbox": [
751
+ 174,
752
+ 839,
753
+ 825,
754
+ 924
755
+ ],
756
+ "page_idx": 5
757
+ },
758
+ {
759
+ "type": "image",
760
+ "img_path": "images/958081ef9f622f7fd5d7461988d99be64d8f6a7e76185807bf0637cc6550f678.jpg",
761
+ "image_caption": [
762
+ "No adversarial training, “basic iter.” adv. examples With adversarial training, “basic iter.” adv. examples ",
763
+ "Figure 1: Influence of size of the model on top 1 classification accuracy of various adversarial examples. Left column — base model without adversarial training, right column — model with adversarial training using “step l.l.” method. Top row — results on “step l.l.” adversarial images, middle row — results on “iter. l.l.” adversarial images, bottom row — results on “basic iter.” adversarial images. See text of Section 4.3 for explanation of meaning of horizontal and vertical axes. "
764
+ ],
765
+ "image_footnote": [],
766
+ "bbox": [
767
+ 179,
768
+ 171,
769
+ 816,
770
+ 736
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Table 3: Effect of label leaking on adversarial examples. When training and evaluation was done using FGSM accuracy on adversarial examples was higher than on clean examples. This effect was not happening when training and evaluation was done using “step l.l.” method. In both experiments training was done for $1 5 0 k$ iterations with initial learning rate 0.0225. ",
777
+ "bbox": [
778
+ 174,
779
+ 101,
780
+ 823,
781
+ 157
782
+ ],
783
+ "page_idx": 7
784
+ },
785
+ {
786
+ "type": "table",
787
+ "img_path": "images/b2219b9f133ee537d200dce8b96d9378ecc21792b613af650a214955013fe5ea.jpg",
788
+ "table_caption": [],
789
+ "table_footnote": [],
790
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=1 colspan=1>No label leaking,training and eval using “step 1.1.”</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>77.3%93.7%</td><td rowspan=1 colspan=1>72.8%91.1%</td><td rowspan=1 colspan=1>73.1%91.1%</td><td rowspan=1 colspan=1>73.4%91.0%</td><td rowspan=1 colspan=1>72.0%90.3%</td></tr><tr><td rowspan=1 colspan=1>With label leaking,training and eval using FGSM</td><td rowspan=1 colspan=1>top1top5</td><td rowspan=1 colspan=1>76.6%93.2%</td><td rowspan=1 colspan=1>86.2%95.9%</td><td rowspan=1 colspan=1>87.6%96.4%</td><td rowspan=1 colspan=1>88.7%96.9%</td><td rowspan=1 colspan=1>87.0%96.4%</td></tr></table>",
791
+ "bbox": [
792
+ 199,
793
+ 175,
794
+ 799,
795
+ 250
796
+ ],
797
+ "page_idx": 7
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "4.3 INFLUENCE OF MODEL CAPACITY ON ADVERSARIAL ROBUSTNESS ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 176,
805
+ 289,
806
+ 669,
807
+ 301
808
+ ],
809
+ "page_idx": 7
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "We studied how the size of the model (in terms of number of parameters) could affect robustness to adversarial examples. We picked Inception v3 as a base model and varied its size by changing the number of filters in each convolution. ",
814
+ "bbox": [
815
+ 178,
816
+ 316,
817
+ 825,
818
+ 358
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "For each experiment we picked a scale factor $\\rho$ and multiplied the number of filters in each convolution by $\\rho$ . In other words $\\rho = 1$ means unchanged Inception v3, $\\rho = 0 . 5$ means Inception with half of the usual number of filters in convolutions, etc . . . For each chosen $\\rho$ we trained two independent models: one with adversarial training and another without. Then we evaluated accuracy on clean and adversarial examples for both trained models. We have run these experiments for $\\rho \\in [ 0 . 5 , 2 . 0 ]$ . ",
825
+ "bbox": [
826
+ 174,
827
+ 366,
828
+ 825,
829
+ 435
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "In earlier experiments (Table 1) we found that deeper models benefit more from adversarial training. The increased depth changed many aspects of the model architecture. These experiments varying $\\rho$ examine the effect in a more controlled setting, where the architecture remains constant except for the number of feature maps in each layer. ",
836
+ "bbox": [
837
+ 174,
838
+ 443,
839
+ 825,
840
+ 498
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "In all experiments we observed that accuracy on clean images kept increasing with increase of $\\rho$ , though its increase slowed down as $\\rho$ became bigger. Thus as a measure of robustness we used the ratio of accuracy on adversarial images to accuracy on clean images because an increase of this ratio means that the gap between accuracy on adversarial and clean images becomes smaller. If this ratio reaches 1 then the accuracy on adversarial images is the same as on clean ones. For a successful adversarial example construction technique, we would never expect this ratio to exceed 1, since this would imply that the adversary is actually helpful. Some defective adversarial example construction techniques, such as those suffering from label leaking, can inadvertently produce a ratio greater than 1. ",
847
+ "bbox": [
848
+ 174,
849
+ 506,
850
+ 825,
851
+ 631
852
+ ],
853
+ "page_idx": 7
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Results with ratios of accuracy for various adversarial methods and $\\epsilon$ are provided in Fig. 1. ",
858
+ "bbox": [
859
+ 174,
860
+ 637,
861
+ 771,
862
+ 651
863
+ ],
864
+ "page_idx": 7
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "For models without adversarial training, we observed that there is an optimal value of $\\rho$ yielding best robustness. Models that are too large or too small perform worse. This may indicate that models become more robust to adversarial examples until they become large enough to overfit in some respect. ",
869
+ "bbox": [
870
+ 174,
871
+ 659,
872
+ 825,
873
+ 715
874
+ ],
875
+ "page_idx": 7
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "For adversarially trained models, we found that robustness consistently increases with increases in model size. We were not able to train large enough models to find when this process ends, but we did find that models with twice the normal size have an accuracy ratio approaching 1 for one-step adversarial examples. When evaluated on iterative adversarial examples, the trend toward increasing robustness with increasing size remains but has some exceptions. Also, none of our models was large enough to approach an accuracy ratio of 1 in this regime. ",
880
+ "bbox": [
881
+ 174,
882
+ 722,
883
+ 825,
884
+ 806
885
+ ],
886
+ "page_idx": 7
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "Overall we recommend exploring increase of accuracy (along with adversarial training) as a measure to improve robustness to adversarial examples. ",
891
+ "bbox": [
892
+ 174,
893
+ 813,
894
+ 823,
895
+ 840
896
+ ],
897
+ "page_idx": 7
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "4.4 TRANSFERABILITY OF ADVERSARIAL EXAMPLES ",
902
+ "text_level": 1,
903
+ "bbox": [
904
+ 176,
905
+ 867,
906
+ 549,
907
+ 880
908
+ ],
909
+ "page_idx": 7
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "From a security perspective, an important property of adversarial examples is that they tend to transfer from one model to another, enabling an attacker in the black-box scenario to create adversarial ",
914
+ "bbox": [
915
+ 174,
916
+ 895,
917
+ 823,
918
+ 924
919
+ ],
920
+ "page_idx": 7
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "Table 4: Transfer rate of adversarial examples generated using different adversarial methods and perturbation size $\\epsilon = 1 6$ . This is equivalent to the error rate in an attack scenario where the attacker prefilters their adversarial examples by ensuring that they are misclassified by the source model before deploying them against the target. Transfer rates are rounded to the nearest percent in order to fit the table on the page. The following models were used for comparison: $A$ and $B$ are Inception v3 models with different random initializations, $C$ is Inception v3 model with ELU activations instead of Relu, $D$ is Inception v4 model. See also Table 6 for the absolute error rate when the attack is not prefiltered, rather than the transfer rate of adversarial examples. ",
925
+ "bbox": [
926
+ 173,
927
+ 101,
928
+ 825,
929
+ 212
930
+ ],
931
+ "page_idx": 8
932
+ },
933
+ {
934
+ "type": "table",
935
+ "img_path": "images/fcbe344690e5cfc076b55206cb879d764253ad0e1fd0a66829397e520c7a3f97.jpg",
936
+ "table_caption": [],
937
+ "table_footnote": [],
938
+ "table_body": "<table><tr><td rowspan=\"3\"></td><td rowspan=\"3\">source model</td><td colspan=\"4\">FGSM</td><td colspan=\"4\">basic iter.</td><td colspan=\"4\">iter 1.1.</td></tr><tr><td colspan=\"4\">target model</td><td colspan=\"4\">target model</td><td colspan=\"4\">target model</td></tr><tr><td>A</td><td>B</td><td>C</td><td>D</td><td>A</td><td>B</td><td>C</td><td>D</td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr><td rowspan=\"4\">top 1</td><td>A(v3)</td><td>100</td><td>56</td><td>58</td><td>47</td><td>100</td><td>46</td><td>45</td><td>33</td><td>100</td><td>13</td><td>13</td><td>9</td></tr><tr><td>B(v3)</td><td>58</td><td>100</td><td>59</td><td>51</td><td>41</td><td>100</td><td>40</td><td>30</td><td>15</td><td>100</td><td>13</td><td>10</td></tr><tr><td>C (v3ELU)</td><td>56</td><td>58</td><td>100</td><td>52</td><td>44</td><td>44</td><td>100</td><td>32</td><td>12</td><td>11</td><td>100</td><td>9</td></tr><tr><td>D(v4)</td><td>50</td><td>54</td><td>52</td><td>100</td><td>35</td><td>39</td><td>37</td><td>100</td><td>12</td><td>13</td><td>13</td><td>100</td></tr><tr><td rowspan=\"4\">top 5</td><td>A(v3)</td><td>100</td><td>50</td><td>50</td><td>36</td><td>100</td><td>15</td><td>17</td><td>11</td><td>100</td><td>8</td><td>7</td><td>5</td></tr><tr><td>B(v3)</td><td>51</td><td>100</td><td>50</td><td>37</td><td>16</td><td>100</td><td>14</td><td>10</td><td>7</td><td>100</td><td>5</td><td>4</td></tr><tr><td>C (v3ELU)</td><td>44</td><td>45</td><td>100</td><td>37</td><td>16</td><td>18</td><td>100</td><td>13</td><td>6</td><td>6</td><td>100</td><td>4</td></tr><tr><td>D(v4)</td><td>42</td><td>38</td><td>46</td><td>100</td><td>11</td><td>15</td><td>15</td><td>100</td><td>6</td><td>6</td><td>6</td><td>100</td></tr></table>",
939
+ "bbox": [
940
+ 181,
941
+ 231,
942
+ 816,
943
+ 387
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "image",
949
+ "img_path": "images/e9b8d3fff56e6552946abda2fde8870f1863160f21d42f299541e0e998adfd18.jpg",
950
+ "image_caption": [
951
+ "Top 1 transferability. "
952
+ ],
953
+ "image_footnote": [],
954
+ "bbox": [
955
+ 181,
956
+ 411,
957
+ 493,
958
+ 582
959
+ ],
960
+ "page_idx": 8
961
+ },
962
+ {
963
+ "type": "image",
964
+ "img_path": "images/f42264aec46ba5a0ae17952b02c11ed374b019c801053d32a9cdfd3008e23da2.jpg",
965
+ "image_caption": [
966
+ "Top 5 transferability. "
967
+ ],
968
+ "image_footnote": [],
969
+ "bbox": [
970
+ 504,
971
+ 414,
972
+ 813,
973
+ 582
974
+ ],
975
+ "page_idx": 8
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Figure 2: Influence of the size of adversarial perturbation on transfer rate of adversarial examples. Transfer rate was computed using two Inception v3 models with different random intializations. As could be seen from these plots, increase of $\\epsilon$ leads to increase of transfer rate. It should be noted that transfer rate is a ratio of number of transferred adversarial examples to number of successful adversarial examples for source network. Both numerator and denominator of this ratio are increasing with increase of $\\epsilon$ , however we observed that numerator (i.e. number of transferred examples) is increasing much faster compared to increase of denominator. For example when $\\epsilon$ increases from 8 to 16 relative increase of denominator is less than $1 \\%$ for each of the considered methods, at the same time relative increase of numerator is more than $2 0 \\%$ . ",
980
+ "bbox": [
981
+ 173,
982
+ 617,
983
+ 825,
984
+ 741
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "examples for their own substitute model, then deploy those adversarial examples to fool a target model (Szegedy et al., 2014; Goodfellow et al., 2014; Papernot et al., 2016b). ",
991
+ "bbox": [
992
+ 174,
993
+ 773,
994
+ 823,
995
+ 801
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "We studied transferability of adversarial examples between the following models: two copies of normal Inception v3 (with different random initializations and order or training examples), Inception v4 (Szegedy et al., 2016) and Inception v3 which uses ELU activation (Clevert et al., 2015) instead of Relu2. All of these models were independently trained from scratch until they achieved maximum accuracy. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 809,
1005
+ 825,
1006
+ 878
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "In each experiment we fixed the source and target networks, constructed adversarial examples from 1000 randomly sampled clean images from the test set using the source network and performed classification of all of them using both source and target networks. These experiments were done independently for different adversarial methods. ",
1013
+ "bbox": [
1014
+ 174,
1015
+ 103,
1016
+ 823,
1017
+ 159
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "We measured transferability using the following criteria. Among 1000 images we picked only misclassified adversarial example for the source model (i.e. clean classified correctly, adversarial misclassified) and measured what fraction of them were misclassified by the target model. ",
1024
+ "bbox": [
1025
+ 176,
1026
+ 166,
1027
+ 821,
1028
+ 208
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Transferability results for all combinations of models and $\\epsilon = 1 6$ are provided in Table 4. Results for various $\\epsilon$ but fixed source and target model are provided in Fig. 2. ",
1035
+ "bbox": [
1036
+ 173,
1037
+ 215,
1038
+ 821,
1039
+ 244
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "As can be seen from the results, FGSM adversarial examples are the most transferable, while “iter l.l.” are the least. On the other hand “iter l.l.” method is able to fool the network in more than $9 9 \\%$ cases (top 1 accuracy), while FGSM is the least likely to fool the network. This suggests that there might be an inverse relationship between transferability of specific method and ability of the method to fool the network. We haven’t studied this phenomenon further, but one possible explanation could be the fact that iterative methods tend to overfit to specific network parameters. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 251,
1049
+ 823,
1050
+ 334
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "In addition, we observed that for each of the considered methods transfer rate is increasing with increase of $\\epsilon$ (see Fig. 2). Thus potential adversary performing a black-box attack have an incentive to use higher $\\epsilon$ to increase the chance of success of the attack. ",
1057
+ "bbox": [
1058
+ 176,
1059
+ 342,
1060
+ 821,
1061
+ 383
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "5 CONCLUSION ",
1068
+ "text_level": 1,
1069
+ "bbox": [
1070
+ 176,
1071
+ 404,
1072
+ 318,
1073
+ 420
1074
+ ],
1075
+ "page_idx": 9
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "In this paper we studied how to increase robustness to adversarial examples of large models (Inception v3) trained on large dataset (ImageNet). We showed that adversarial training provides robustness to adversarial examples generated using one-step methods. While adversarial training didn’t help much against iterative methods we observed that adversarial examples generated by iterative methods are less likely to be transferred between networks, which provides indirect robustness against black box adversarial attacks. In addition we observed that increase of model capacity could also help to increase robustness to adversarial examples especially when used in conjunction with adversarial training. Finally we discovered the effect of label leaking which resulted in higher accuracy on FGSM adversarial examples compared to clean examples when the network was adversarially trained. ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 435,
1083
+ 825,
1084
+ 574
1085
+ ],
1086
+ "page_idx": 9
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "REFERENCES ",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 174,
1094
+ 594,
1095
+ 285,
1096
+ 609
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Srndiˇ c, Pavel Laskov, Gior-´ gio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 387– 402. Springer, 2013. \nDjork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep net- ´ work learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015. URL http: //arxiv.org/abs/1511.07289. \nNilesh Dalvi, Pedro Domingos, Sumit Sanghai, Deepak Verma, et al. Adversarial classification. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 99–108. ACM, 2004. \nIan J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. URL http://arxiv.org/abs/1412.6572. \nRuitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. Learning with a strong adver- ´ sary. CoRR, abs/1511.03034, 2015. URL http://arxiv.org/abs/1511.03034. \nSergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. 2015. \nAlex Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. Technical report, arXiv, 2016. URL https://arxiv.org/abs/1607.02533. \nTakeru Miyato, Andrew M Dai, and Ian Goodfellow. Virtual adversarial training for semi-supervised text classification. arXiv preprint arXiv:1605.07725, 2016a. \nTakeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae, and Shin Ishii. Distributional smoothing with virtual adversarial training. In International Conference on Learning Representations (ICLR2016), April 2016b. \nN. Papernot, P. McDaniel, and I. Goodfellow. Transferability in Machine Learning: from Phenomena to Black-Box Attacks using Adversarial Samples. ArXiv e-prints, May 2016b. URL http://arxiv.org/abs/1605.07277. \nNicolas Papernot, Patrick Drew McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. CoRR, abs/1511.04508, 2015. URL http://arxiv.org/abs/1511.04508. \nNicolas Papernot, Patrick Drew McDaniel, Ian J. Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against deep learning systems using adversarial examples. CoRR, abs/1602.02697, 2016a. URL http://arxiv.org/abs/1602.02697. \nAndras Rozsa, Manuel Gunther, and Terrance E Boult. Are accuracy and robustness correlated? ¨ arXiv preprint arXiv:1610.04563, 2016. \nOlga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. arXiv preprint arXiv:1409.0575, 2014. \nChristian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. ICLR, abs/1312.6199, 2014. URL http://arxiv.org/abs/1312.6199. \nChristian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. CoRR, abs/1512.00567, 2015. URL http://arxiv.org/abs/1512.00567. \nChristian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. CoRR, abs/1602.07261, 2016. URL http: //arxiv.org/abs/1602.07261. ",
1103
+ "bbox": [
1104
+ 171,
1105
+ 617,
1106
+ 826,
1107
+ 924
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "",
1114
+ "bbox": [
1115
+ 171,
1116
+ 92,
1117
+ 826,
1118
+ 590
1119
+ ],
1120
+ "page_idx": 10
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Appendices ",
1125
+ "text_level": 1,
1126
+ "bbox": [
1127
+ 176,
1128
+ 98,
1129
+ 343,
1130
+ 127
1131
+ ],
1132
+ "page_idx": 11
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "A COMPARISON OF ONE-STEP ADVERSARIAL METHODS",
1137
+ "text_level": 1,
1138
+ "bbox": [
1139
+ 176,
1140
+ 150,
1141
+ 651,
1142
+ 166
1143
+ ],
1144
+ "page_idx": 11
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "In addition to FGSM and “step l.l.” methods we explored several other one-step adversarial methods both for training and evaluation. Generally all of these methods can be separated into two large categories. Methods which try to maximize the loss (similar to FGSM) are in the first category. The second category contains methods which try to maximize the probability of a specific target class (similar to “step l.l.”). We also tried to use different types of random noise instead of adversarial images, but random noise didn’t help with robustness against adversarial examples. ",
1149
+ "bbox": [
1150
+ 174,
1151
+ 180,
1152
+ 826,
1153
+ 265
1154
+ ],
1155
+ "page_idx": 11
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "The full list of one-step methods we tried is as follows: ",
1160
+ "bbox": [
1161
+ 174,
1162
+ 271,
1163
+ 534,
1164
+ 286
1165
+ ],
1166
+ "page_idx": 11
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "• Methods increasing loss function $J$ – FGSM (described in details in Section 2.2): ",
1171
+ "bbox": [
1172
+ 215,
1173
+ 297,
1174
+ 553,
1175
+ 332
1176
+ ],
1177
+ "page_idx": 11
1178
+ },
1179
+ {
1180
+ "type": "equation",
1181
+ "img_path": "images/f9c5fa2fb6d64d2ec8ebe59b7f5b6d9768cd0ae22fd7412364c88fa53c65f6fb.jpg",
1182
+ "text": "$$\nX ^ { a d v } = X + \\epsilon \\mathrm { s i g n } \\big ( \\nabla _ { X } J ( X , y _ { t r u e } ) \\big )\n$$",
1183
+ "text_format": "latex",
1184
+ "bbox": [
1185
+ 415,
1186
+ 337,
1187
+ 673,
1188
+ 356
1189
+ ],
1190
+ "page_idx": 11
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "– FGSM-pred or fast method with predicted class. It is similar to FGSM but uses the label of the class predicted by the network instead of true class $y _ { t r u e }$ . ",
1195
+ "bbox": [
1196
+ 246,
1197
+ 362,
1198
+ 825,
1199
+ 391
1200
+ ],
1201
+ "page_idx": 11
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "– “Fast entropy” or fast method designed to maximize the entropy of the predicted distribution, thereby causing the model to become less certain of the predicted class. ",
1206
+ "bbox": [
1207
+ 246,
1208
+ 392,
1209
+ 823,
1210
+ 421
1211
+ ],
1212
+ "page_idx": 11
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "– “Fast grad. $L _ { 2 } '$ is similar to FGSM but uses the value of gradient instead of its sign. The value of gradient is normalized to have unit $L _ { 2 }$ norm: ",
1217
+ "bbox": [
1218
+ 251,
1219
+ 422,
1220
+ 818,
1221
+ 452
1222
+ ],
1223
+ "page_idx": 11
1224
+ },
1225
+ {
1226
+ "type": "equation",
1227
+ "img_path": "images/df2e39ee420d05543f4a9c8d1941bb6318a3e21c49d3b30624f3104ee9020c17.jpg",
1228
+ "text": "$$\nX ^ { a d v } = X + \\epsilon \\frac { \\nabla _ { X } J ( X , y _ { t r u e } ) } { \\left\\| \\nabla _ { X } J ( X , y _ { t r u e } ) \\right\\| _ { 2 } }\n$$",
1229
+ "text_format": "latex",
1230
+ "bbox": [
1231
+ 423,
1232
+ 457,
1233
+ 666,
1234
+ 493
1235
+ ],
1236
+ "page_idx": 11
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Miyato et al. (2016b) advocate this method. ",
1241
+ "bbox": [
1242
+ 264,
1243
+ 500,
1244
+ 552,
1245
+ 513
1246
+ ],
1247
+ "page_idx": 11
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "– “Fast grad. $L _ { \\infty } , $ is similar to “fast grad. $L _ { 2 } { } ^ { \\ ' }$ but uses $L _ { \\infty }$ norm for normalization. ",
1252
+ "bbox": [
1253
+ 233,
1254
+ 515,
1255
+ 803,
1256
+ 531
1257
+ ],
1258
+ "page_idx": 11
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "• Methods increasing the probability of the selected target class ",
1263
+ "bbox": [
1264
+ 220,
1265
+ 534,
1266
+ 645,
1267
+ 549
1268
+ ],
1269
+ "page_idx": 11
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "– “Step l.l.” is one-step towards least likely class (also described in Section 2.2): ",
1274
+ "bbox": [
1275
+ 223,
1276
+ 551,
1277
+ 779,
1278
+ 568
1279
+ ],
1280
+ "page_idx": 11
1281
+ },
1282
+ {
1283
+ "type": "equation",
1284
+ "img_path": "images/d7be3e39a413a7f5e1abf3ac51e662749e195a93db5a84998ae2486b6dd867fd.jpg",
1285
+ "text": "$$\nX ^ { a d v } = X - \\epsilon \\mathrm { s i g n } \\bigl ( \\nabla _ { X } J ( X , y _ { t a r g e t } ) \\bigr )\n$$",
1286
+ "text_format": "latex",
1287
+ "bbox": [
1288
+ 408,
1289
+ 574,
1290
+ 679,
1291
+ 593
1292
+ ],
1293
+ "page_idx": 11
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "where $y _ { t a r g e t } = \\arg \\operatorname* { m i n } _ { y } \\{ p ( y \\mid X ) \\}$ is least likely class prediction by the network. – “Step rnd.” is similar to “step l.l.” but uses random class instead of least likely class. ",
1298
+ "bbox": [
1299
+ 243,
1300
+ 599,
1301
+ 820,
1302
+ 632
1303
+ ],
1304
+ "page_idx": 11
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "• Random perturbations ",
1309
+ "bbox": [
1310
+ 217,
1311
+ 637,
1312
+ 380,
1313
+ 651
1314
+ ],
1315
+ "page_idx": 11
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "– Sign of random perturbation. This is an attempt to construct random perturbation which has similar structure to perturbations generated by FGSM: ",
1320
+ "bbox": [
1321
+ 238,
1322
+ 655,
1323
+ 821,
1324
+ 684
1325
+ ],
1326
+ "page_idx": 11
1327
+ },
1328
+ {
1329
+ "type": "equation",
1330
+ "img_path": "images/10c8bf0c90ead5f2cc76040acc6eeb4ebe81f05d49474f0af66763867500f153.jpg",
1331
+ "text": "$$\nX ^ { a d v } = X + \\epsilon \\mathrm { s i g n } ( \\mathcal { N } )\n$$",
1332
+ "text_format": "latex",
1333
+ "bbox": [
1334
+ 459,
1335
+ 689,
1336
+ 629,
1337
+ 709
1338
+ ],
1339
+ "page_idx": 11
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "where $\\mathcal { N }$ is random normal variable with zero mean and identity covariance matrix. ",
1344
+ "bbox": [
1345
+ 261,
1346
+ 714,
1347
+ 813,
1348
+ 729
1349
+ ],
1350
+ "page_idx": 11
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "– Random truncated normal perturbation with zero mean and $0 . 5 \\epsilon$ standard deviation defined on $[ - \\epsilon , \\epsilon ]$ and uncorrelated pixels, which leads to the following formula for perturbed images: ",
1355
+ "bbox": [
1356
+ 250,
1357
+ 731,
1358
+ 823,
1359
+ 772
1360
+ ],
1361
+ "page_idx": 11
1362
+ },
1363
+ {
1364
+ "type": "equation",
1365
+ "img_path": "images/f0dc8910b83f42131b7cb7255604b0bb33a4f40d4ffc1b019cd724b72822827e.jpg",
1366
+ "text": "$$\nX ^ { a d v } = X + \\mathcal { T }\n$$",
1367
+ "text_format": "latex",
1368
+ "bbox": [
1369
+ 486,
1370
+ 770,
1371
+ 602,
1372
+ 789
1373
+ ],
1374
+ "page_idx": 11
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "where $\\tau$ is a random variable with truncated normal distribution. ",
1379
+ "bbox": [
1380
+ 264,
1381
+ 792,
1382
+ 691,
1383
+ 808
1384
+ ],
1385
+ "page_idx": 11
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Overall, we observed that using only one of these single step methods during adversarial training is sufficient to gain robustness to all of them. Fig. 3 shows accuracy on various one-step adversarial examples when the network was trained using only “step l.l.” method. ",
1390
+ "bbox": [
1391
+ 176,
1392
+ 818,
1393
+ 825,
1394
+ 861
1395
+ ],
1396
+ "page_idx": 11
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "At the same time we observed that not all one-step methods are equally good for adversarial training, as shown in Table 5. The best results (achieving both good accuracy on clean data and good accuracy on adversarial inputs) were obtained when adversarial training was done using “step l.l.” or “step rnd.” methods. ",
1401
+ "bbox": [
1402
+ 174,
1403
+ 867,
1404
+ 823,
1405
+ 924
1406
+ ],
1407
+ "page_idx": 11
1408
+ },
1409
+ {
1410
+ "type": "image",
1411
+ "img_path": "images/58f7f6cb781f7b825dd826be739683c9c880fd5a3796af47870f220250c24875.jpg",
1412
+ "image_caption": [
1413
+ "Figure 3: Comparison of different one-step adversarial methods during eval. Adversarial training was done using “step l.l.” method. Some evaluation methods show increasing accuracy with increasing $\\epsilon$ over part of the curve, due to the label leaking effect. "
1414
+ ],
1415
+ "image_footnote": [],
1416
+ "bbox": [
1417
+ 178,
1418
+ 98,
1419
+ 818,
1420
+ 541
1421
+ ],
1422
+ "page_idx": 12
1423
+ },
1424
+ {
1425
+ "type": "text",
1426
+ "text": "B ADDITIONAL RESULTS WITH SIZE OF THE MODEL ",
1427
+ "text_level": 1,
1428
+ "bbox": [
1429
+ 174,
1430
+ 643,
1431
+ 617,
1432
+ 659
1433
+ ],
1434
+ "page_idx": 12
1435
+ },
1436
+ {
1437
+ "type": "text",
1438
+ "text": "Section 4.3 contains details regarding the influence of size of the model on robustness to adversarial examples. Here we provide additional Figure 4 which shows robustness calculated using top 5 accuracy. Generally it exhibits the same properties as the corresponding plots for top 1 accuracy. ",
1439
+ "bbox": [
1440
+ 174,
1441
+ 678,
1442
+ 825,
1443
+ 720
1444
+ ],
1445
+ "page_idx": 12
1446
+ },
1447
+ {
1448
+ "type": "text",
1449
+ "text": "C ADDITIONAL RESULTS ON TRANSFERABILITY ",
1450
+ "text_level": 1,
1451
+ "bbox": [
1452
+ 173,
1453
+ 748,
1454
+ 586,
1455
+ 763
1456
+ ],
1457
+ "page_idx": 12
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Section 4.4 contains results with transfer rate of various adversarial examples between models. In addition to transfer rate computed only on misclassified adversarial examples it is also interesting to observe the error rate of all candidate adversarial examples generated for one model and classified by other model. ",
1462
+ "bbox": [
1463
+ 174,
1464
+ 784,
1465
+ 825,
1466
+ 839
1467
+ ],
1468
+ "page_idx": 12
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "This result might be interesting because it models the following attack. Instead of trying to pick “good” adversarial images an adversary tries to modify all available images in order to get as much misclassified images as possible. ",
1473
+ "bbox": [
1474
+ 174,
1475
+ 847,
1476
+ 825,
1477
+ 888
1478
+ ],
1479
+ "page_idx": 12
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "To compute the error rate we randomly generated 1000 adversarial images using the source model and then classified them using the target model. Results for various models, adversarial methods ",
1484
+ "bbox": [
1485
+ 174,
1486
+ 895,
1487
+ 823,
1488
+ 924
1489
+ ],
1490
+ "page_idx": 12
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Table 5: Comparison of different one-step adversarial methods for adversarial training. The evaluation was run after $9 0 k$ training steps. ",
1495
+ "bbox": [
1496
+ 174,
1497
+ 101,
1498
+ 823,
1499
+ 128
1500
+ ],
1501
+ "page_idx": 13
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "\\*) In all cases except “fast grad $L _ { 2 } { } ^ { \\ ' }$ and “fast grad $L _ { \\infty }$ ” the evaluation was done using FGSM. For “fast grad $L _ { 2 } { } ^ { \\ ' }$ and “fast grad $L _ { \\infty }$ ” the evaluation was done using “step l.l.” method. In the case where both training and testing were done with FGSM, the performance on adversarial examples is artificially high due to the label leaking effect. Based on this table, we recommend using “step rnd.” or “step l.l.” as the method of generating adversarial examples at training time, in order to obtain good accuracy on both clean and adversarial examples. We computed $9 5 \\%$ confidence intervals based on the standard error of the mean around the test error, using the fact that the test error was evaluated with 50,000 samples. Within each column, we indicate which methods are statistically tied for the best using bold face. ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 128,
1509
+ 825,
1510
+ 253
1511
+ ],
1512
+ "page_idx": 13
1513
+ },
1514
+ {
1515
+ "type": "table",
1516
+ "img_path": "images/95e1c8c35f71b2ed7ebe5b0730365c8c6659412b8b73701e1d06746f1b95d254.jpg",
1517
+ "table_caption": [],
1518
+ "table_footnote": [],
1519
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>∈=2</td><td rowspan=1 colspan=1>∈=4</td><td rowspan=1 colspan=1>∈=8</td><td rowspan=1 colspan=1>∈=16</td></tr><tr><td rowspan=1 colspan=1>No adversarial training</td><td rowspan=1 colspan=1>76.8%</td><td rowspan=1 colspan=1>40.7%</td><td rowspan=1 colspan=1>39.0%</td><td rowspan=1 colspan=1>37.9%</td><td rowspan=1 colspan=1>36.7%</td></tr><tr><td rowspan=1 colspan=1>FGSMFast with predicted classFast entropyStep rnd.Step 1.1.</td><td rowspan=1 colspan=1>74.9%76.4%76.4%76.4%76.3%</td><td rowspan=1 colspan=1>79.3%43.2%62.8%73.0%72.9%</td><td rowspan=1 colspan=1>82.8%42.0%61.7%75.4%75.1%</td><td rowspan=1 colspan=1>85.3%40.9%59.5%76.5%76.2%</td><td rowspan=1 colspan=1>83.2%40.0%54.8%72.5%72.2%</td></tr><tr><td rowspan=1 colspan=1>Fast grad. L2*Fast grad. L*</td><td rowspan=1 colspan=1>76.8%75.6%</td><td rowspan=1 colspan=1>44.0%52.2%</td><td rowspan=1 colspan=1>33.2%39.7%</td><td rowspan=1 colspan=1>26.4%30.9%</td><td rowspan=1 colspan=1>22.5%25.0%</td></tr><tr><td rowspan=1 colspan=1>Sign of random perturbationRandom normal perturbation</td><td rowspan=1 colspan=1>76.5%76.6%</td><td rowspan=1 colspan=1>38.8%38.3%</td><td rowspan=1 colspan=1>36.6%36.0%</td><td rowspan=1 colspan=1>35.0%34.4%</td><td rowspan=1 colspan=1>32.7%31.8%</td></tr></table>",
1520
+ "bbox": [
1521
+ 228,
1522
+ 272,
1523
+ 769,
1524
+ 429
1525
+ ],
1526
+ "page_idx": 13
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "and fixed $\\epsilon = 1 6$ are provided in Table 6. Results for fixed source and target models and various $\\epsilon$ are provided in Fig. 5. ",
1531
+ "bbox": [
1532
+ 176,
1533
+ 458,
1534
+ 823,
1535
+ 488
1536
+ ],
1537
+ "page_idx": 13
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "Overall the error rate of transferred adversarial examples exhibits the same behavior as the transfer rate described in Section 4.4. ",
1542
+ "bbox": [
1543
+ 178,
1544
+ 494,
1545
+ 823,
1546
+ 522
1547
+ ],
1548
+ "page_idx": 13
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "Table 6: Error rates on adversarial examples transferred between models, rounded to the nearest percent. Results are provided for adversarial images generated using different adversarial methods and fixed perturbation size $\\epsilon = 1 6$ . The following models were used for comparison: $A$ and $B$ are Inception v3 models with different random initializations, $C$ is Inception v3 model with ELU activations instead of Relu, $D$ is Inception $\\mathbf { v } 4$ model. See also Table 4 for the transfer rate of adversarial examples, rather than the absolute error rate. ",
1553
+ "bbox": [
1554
+ 174,
1555
+ 531,
1556
+ 825,
1557
+ 616
1558
+ ],
1559
+ "page_idx": 13
1560
+ },
1561
+ {
1562
+ "type": "table",
1563
+ "img_path": "images/837d57ce13028d456d791138c8a4f79c82d6e6e4d66ca4f0248449ad8fd7c9b4.jpg",
1564
+ "table_caption": [],
1565
+ "table_footnote": [],
1566
+ "table_body": "<table><tr><td rowspan=\"3\"></td><td rowspan=\"3\">source model</td><td colspan=\"3\">FGSM</td><td colspan=\"3\">basic iter.</td><td colspan=\"3\">iter 1.1.</td></tr><tr><td colspan=\"3\">target model</td><td colspan=\"3\">target model</td><td colspan=\"3\">target model</td></tr><tr><td>A B</td><td>C</td><td>D</td><td>A B</td><td>C</td><td>D</td><td>A B</td><td>C</td><td>D</td></tr><tr><td rowspan=\"4\">top1</td><td>A (v3)</td><td>65 52</td><td>53</td><td>45</td><td>78</td><td>51</td><td>50 42</td><td>100</td><td>32</td><td>31</td><td>27</td></tr><tr><td>B(v3)</td><td>52</td><td>66 54</td><td>48</td><td>50</td><td>79</td><td>51 43</td><td>35</td><td>99</td><td>34</td><td>29</td></tr><tr><td>C (v3 ELU)</td><td>53</td><td>55 70</td><td>50</td><td>47</td><td>46</td><td>74</td><td>40</td><td>31 30</td><td>100</td><td>28</td></tr><tr><td>D(v4)</td><td>47</td><td>51 49</td><td>62</td><td>43</td><td>46</td><td>45</td><td>73 30</td><td>31</td><td>31</td><td>99</td></tr><tr><td rowspan=\"4\">top 5</td><td>A(v3)</td><td>46</td><td>28 28</td><td>22</td><td>76</td><td>17</td><td>18</td><td>13 94</td><td>12</td><td>12</td><td>9</td></tr><tr><td>B(v3)</td><td>29</td><td>46 30</td><td>22</td><td>19</td><td>76</td><td>18</td><td>16 13</td><td>96</td><td>12</td><td>11</td></tr><tr><td>C (v3 ELU)</td><td>28</td><td>29 55</td><td>25</td><td>18</td><td>19</td><td>74 15</td><td>12</td><td>12</td><td>96</td><td>9</td></tr><tr><td>D(v4)</td><td>23</td><td>22 25</td><td>40</td><td>14</td><td>16</td><td>16 70</td><td>11</td><td>11</td><td>11</td><td>97</td></tr></table>",
1567
+ "bbox": [
1568
+ 199,
1569
+ 633,
1570
+ 799,
1571
+ 790
1572
+ ],
1573
+ "page_idx": 13
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "D RESULTS WITH DIFFERENT ACTIVATION FUNCTIONS ",
1578
+ "text_level": 1,
1579
+ "bbox": [
1580
+ 174,
1581
+ 825,
1582
+ 640,
1583
+ 842
1584
+ ],
1585
+ "page_idx": 13
1586
+ },
1587
+ {
1588
+ "type": "text",
1589
+ "text": "We evaluated robustness to adversarial examples when the network was trained using various nonlinear activation functions instead of the standard relu activation when used with adversarial training on “step l.l.” adversarial images. We tried to use following activation functions instead of $r e l u$ : ",
1590
+ "bbox": [
1591
+ 174,
1592
+ 856,
1593
+ 825,
1594
+ 898
1595
+ ],
1596
+ "page_idx": 13
1597
+ },
1598
+ {
1599
+ "type": "text",
1600
+ "text": "• tanh(x) ",
1601
+ "bbox": [
1602
+ 215,
1603
+ 909,
1604
+ 290,
1605
+ 924
1606
+ ],
1607
+ "page_idx": 13
1608
+ },
1609
+ {
1610
+ "type": "image",
1611
+ "img_path": "images/4fc8661e7cd6a3298edceb42304156a3090e338bbc38bdf46e2ae112438ddf4e.jpg",
1612
+ "image_caption": [
1613
+ "Figure 4: Influence of size of the model on top 5 classification accuracy of various adversarial examples. For a detailed explanation see Section 4.3 and Figure 1. "
1614
+ ],
1615
+ "image_footnote": [],
1616
+ "bbox": [
1617
+ 168,
1618
+ 92,
1619
+ 821,
1620
+ 680
1621
+ ],
1622
+ "page_idx": 14
1623
+ },
1624
+ {
1625
+ "type": "equation",
1626
+ "img_path": "images/ecad2c4a280273be29749136dd1982de646f6f19c5a5d11546e4cd83d148dce7.jpg",
1627
+ "text": "$$\n\\begin{array} { r l } & { \\bullet r e l u 6 ( x ) = m i n ( r e l u ( x ) , 6 ) } \\\\ & { \\bullet R e l u D e c a y _ { \\beta } ( x ) = \\frac { r e l u ( x ) } { 1 + \\beta r e l u ( x ) ^ { 2 } } \\mathrm { ~ f o r ~ } \\beta \\in \\{ 0 . 1 , 0 . 0 1 , 0 . 0 0 1 \\} } \\end{array}\n$$",
1628
+ "text_format": "latex",
1629
+ "bbox": [
1630
+ 218,
1631
+ 750,
1632
+ 620,
1633
+ 805
1634
+ ],
1635
+ "page_idx": 14
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "Training converged using all of these activations, however test performance was not necessarily the same as with relu. ",
1640
+ "bbox": [
1641
+ 174,
1642
+ 818,
1643
+ 825,
1644
+ 847
1645
+ ],
1646
+ "page_idx": 14
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "tanh and $R e l u D e c a y _ { \\beta = 0 . 1 }$ lose about $2 \\% - 3 \\%$ of accuracy on clean examples and about $1 0 \\% { - } 2 0 \\%$ on “step l.l.” adversarial examples. relu6, ReluDecay $\\scriptstyle { \\beta = 0 . 0 1 }$ and $R e l u D e c a y _ { \\beta = 0 . 0 0 1 }$ demonstrated similar accuracy (within $\\pm 1 \\%$ ) to relu on clean images and few percent loss of accuracy on “step l.l.” images. At the same time all non-linear activation functions increased classification accuracy on some of the iterative adversarial images. Detailed results are provided in Table 7. ",
1651
+ "bbox": [
1652
+ 174,
1653
+ 853,
1654
+ 825,
1655
+ 924
1656
+ ],
1657
+ "page_idx": 14
1658
+ },
1659
+ {
1660
+ "type": "image",
1661
+ "img_path": "images/ca2ea6eca31c4cbdef1380db09eb81b2f300edd40a624085c176d03cbe177b94.jpg",
1662
+ "image_caption": [
1663
+ "Top 1 error rate. "
1664
+ ],
1665
+ "image_footnote": [],
1666
+ "bbox": [
1667
+ 181,
1668
+ 102,
1669
+ 496,
1670
+ 270
1671
+ ],
1672
+ "page_idx": 15
1673
+ },
1674
+ {
1675
+ "type": "image",
1676
+ "img_path": "images/f3ee75c54c24cd0dc49442a4a1cd65a2164519ca594c6face6e8a84029eecabf.jpg",
1677
+ "image_caption": [
1678
+ "Top 5 error rate. ",
1679
+ "Figure 5: Influence of the size of adversarial perturbation on the error rate on adversarial examples generated for one model and classified using another model. Both source and target models were Inception v3 networks with different random intializations. "
1680
+ ],
1681
+ "image_footnote": [],
1682
+ "bbox": [
1683
+ 504,
1684
+ 103,
1685
+ 815,
1686
+ 270
1687
+ ],
1688
+ "page_idx": 15
1689
+ },
1690
+ {
1691
+ "type": "text",
1692
+ "text": "Overall non linear activation functions could be used as an additional measure of defense against iterative adversarial images. ",
1693
+ "bbox": [
1694
+ 174,
1695
+ 375,
1696
+ 823,
1697
+ 404
1698
+ ],
1699
+ "page_idx": 15
1700
+ },
1701
+ {
1702
+ "type": "table",
1703
+ "img_path": "images/c04715c66170f04eab9f6be7ccfbd6fd98c3f4b6ebd69a04ccdbc0f0585e68e0.jpg",
1704
+ "table_caption": [
1705
+ "Table 7: Activation functions and robustness to adversarial examples. For each activation function we adversarially trained the network on “step l.l.” adversarial images and then run classification of clean images and adversarial images generated using various adversarial methods and $\\epsilon$ . "
1706
+ ],
1707
+ "table_footnote": [],
1708
+ "table_body": "<table><tr><td>Adv. method</td><td>Activation</td><td>Clean</td><td>∈=2</td><td>∈=4</td><td>∈=8</td><td>∈=16</td></tr><tr><td rowspan=\"5\">Step 1.1.</td><td>relu relu6</td><td>77.5% 77.7%</td><td>74.6% 71.8%</td><td>75.1% 73.5%</td><td>75.5% 74.5%</td><td>74.5% 74.0%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>74.0%</td><td>74.9%</td><td>75.2%</td><td>73.9%</td></tr><tr><td></td><td></td><td>73.6%</td><td>74.6%</td><td>75.0%</td><td></td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td></td><td></td><td></td><td>73.6%</td></tr><tr><td>ReluDecayo.1 tanh</td><td>75.3% 74.5%</td><td>67.5% 63.7%</td><td>67.5% 65.1%</td><td>67.0% 65.8%</td><td>64.8% 61.9%</td></tr><tr><td rowspan=\"6\">Iter. 1.1.</td><td>relu</td><td>77.5%</td><td>30.2%</td><td>8.0%</td><td>3.1%</td><td>1.6%</td></tr><tr><td>relu6</td><td>77.7%</td><td>39.8%</td><td>13.7%</td><td>4.1%</td><td>1.9%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>39.9%</td><td>12.6%</td><td>3.8%</td><td>1.8%</td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td>36.2%</td><td>11.2%</td><td>3.2%</td><td>1.6%</td></tr><tr><td>ReluDecayo.1</td><td>75.3%</td><td>47.0%</td><td>25.8%</td><td>6.5%</td><td>2.4%</td></tr><tr><td>tanh</td><td>74.5%</td><td>35.8%</td><td>6.6%</td><td>2.7%</td><td>0.9%</td></tr><tr><td rowspan=\"6\">Basic iter.</td><td>relu</td><td>77.5%</td><td>28.4%</td><td>23.2%</td><td>21.5%</td><td>21.0%</td></tr><tr><td>relu6</td><td>77.7%</td><td>31.2%</td><td>26.1%</td><td>23.8%</td><td>23.2%</td></tr><tr><td>ReluDecayo.001</td><td>78.0%</td><td>32.9%</td><td>27.2%</td><td>24.7%</td><td>24.1%</td></tr><tr><td>ReluDecayo.01</td><td>77.4%</td><td>30.0%</td><td>24.2%</td><td>21.4%</td><td>20.5%</td></tr><tr><td>ReluDecayo.1</td><td>75.3%</td><td>26.7%</td><td>20.6%</td><td>16.5%</td><td>15.2%</td></tr><tr><td>tanh</td><td>74.5%</td><td>24.5%</td><td>22.0%</td><td>20.9%</td><td>20.7%</td></tr></table>",
1709
+ "bbox": [
1710
+ 225,
1711
+ 478,
1712
+ 774,
1713
+ 746
1714
+ ],
1715
+ "page_idx": 15
1716
+ },
1717
+ {
1718
+ "type": "text",
1719
+ "text": "E RESULTS WITH DIFFERENT NUMBER OF ADVERSARIAL EXAMPLES IN THE MINIBATCH ",
1720
+ "text_level": 1,
1721
+ "bbox": [
1722
+ 176,
1723
+ 784,
1724
+ 816,
1725
+ 815
1726
+ ],
1727
+ "page_idx": 15
1728
+ },
1729
+ {
1730
+ "type": "text",
1731
+ "text": "We studied how number of adversarial examples $k$ in the minibatch affect accuracy on clean and adversarial examples. Results are summarized in Table 8. ",
1732
+ "bbox": [
1733
+ 176,
1734
+ 832,
1735
+ 821,
1736
+ 861
1737
+ ],
1738
+ "page_idx": 15
1739
+ },
1740
+ {
1741
+ "type": "text",
1742
+ "text": "Overall we noticed that increase of $k$ lead to increase of accuracy on adversarial examples and to decrease of accuracy on clean examples. At the same having more than half of adversarial examples in the minibatch (which correspond to $k > 1 6$ in our case) does not provide significant improvement of accuracy on adversarial images, however lead to up to $1 \\%$ of additional decrease of accuracy on clean images. Thus for most experiments in the paper we have chosen $k = 1 6$ as a reasonable trade-off between accuracy on clean and adversarial images. ",
1743
+ "bbox": [
1744
+ 174,
1745
+ 867,
1746
+ 825,
1747
+ 924
1748
+ ],
1749
+ "page_idx": 15
1750
+ },
1751
+ {
1752
+ "type": "text",
1753
+ "text": "",
1754
+ "bbox": [
1755
+ 171,
1756
+ 103,
1757
+ 823,
1758
+ 132
1759
+ ],
1760
+ "page_idx": 16
1761
+ },
1762
+ {
1763
+ "type": "text",
1764
+ "text": "Table 8: Results of adversarial training depending on $k$ — number of adversarial examples in the minibatch. Adversarial examples for training and evaluation were generated using step l.l. method. \nRow ‘No adv‘ is a baseline result without adversarial training (which is equivalent to $k = 0$ ). \nRows ‘Adv, $k = X ^ { \\ast }$ are results of adversarial training with $X$ adversarial examples in the minibatch. \nTotal minibatch size is 32, thus $k = 3 2$ correspond to minibatch without clean examples. ",
1765
+ "bbox": [
1766
+ 173,
1767
+ 145,
1768
+ 826,
1769
+ 215
1770
+ ],
1771
+ "page_idx": 16
1772
+ },
1773
+ {
1774
+ "type": "table",
1775
+ "img_path": "images/cbd244071f33c8c5f077a01a3cc759a9a8ea7786d8cc59363282769f43cada35.jpg",
1776
+ "table_caption": [],
1777
+ "table_footnote": [],
1778
+ "table_body": "<table><tr><td></td><td>Clean</td><td>∈=2</td><td>∈=4</td><td>∈=8</td><td>∈=16</td></tr><tr><td>No adv</td><td>78.2%</td><td>31.5%</td><td>27.7%</td><td>27.8%</td><td>29.7%</td></tr><tr><td>Adv, k = 4</td><td>78.3%</td><td>71.7%</td><td>71.3%</td><td>69.4%</td><td>65.8%</td></tr><tr><td>Adv,k =8</td><td>78.1%</td><td>73.2%</td><td>73.2%</td><td>72.6%</td><td>70.5%</td></tr><tr><td>Adv, k = 16</td><td>77.6%</td><td>73.8%</td><td>75.3%</td><td>76.1%</td><td>75.4%</td></tr><tr><td>Adv,k = 24</td><td>77.1%</td><td>73.0%</td><td>75.3%</td><td>76.2%</td><td>76.0%</td></tr><tr><td>Adv,k = 32</td><td>76.3%</td><td>73.4%</td><td>75.1%</td><td>75.9%</td><td>75.8%</td></tr></table>",
1779
+ "bbox": [
1780
+ 290,
1781
+ 233,
1782
+ 707,
1783
+ 333
1784
+ ],
1785
+ "page_idx": 16
1786
+ }
1787
+ ]
parse/train/BJm4T4Kgx/BJm4T4Kgx_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJm4T4Kgx/BJm4T4Kgx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJxwDiActX/HJxwDiActX.md ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STROKENET: A NEURAL PAINTING ENVIRONMENT
2
+
3
+ Ningyuan Zheng, Yifan Jiang & Dingjiang Huang School of Data Science and Engineering, East China Normal University {10165101164, 10153903133}@stu.ecnu.edu.cn, djhuang@dase.ecnu.edu.cn
4
+
5
+ # ABSTRACT
6
+
7
+ We’ve seen tremendous success of image generating models these years. Generating images through a neural network is usually pixel-based, which is fundamentally different from how humans create artwork using brushes. To imitate human drawing, interactions between the environment and the agent is required to allow trials. However, the environment is usually non-differentiable, leading to slow convergence and massive computation. In this paper we try to address the discrete nature of software environment with an intermediate, differentiable simulation. We present StrokeNet, a novel model where the agent is trained upon a wellcrafted neural approximation of the painting environment. With this approach, our agent was able to learn to write characters such as MNIST digits faster than reinforcement learning approaches in an unsupervised manner. Our primary contribution is the neural simulation of a real-world environment. Furthermore, the agent trained with the emulated environment is able to directly transfer its skills to real-world software. 1
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ To learn drawing or writing, a person first observes (encodes) the target image visually and uses a pen or a brush to scribble (decode), to reconstruct the original image. For an experienced painter, he or she foresees the consequences before taking any move, and could choose the optimal action.
12
+
13
+ Stroke-based image generation is fairly different from traditional image generation problems due to the intermediate rendering program. Raster-based deep learning approaches for image generation allow effective optimization using back-propagation. While for stroke-based approaches, rather than learning to generate the image, it is more of learning to manipulate the painting program.
14
+
15
+ An intuitive yet potentially effective way to tackle the problem is to first learn this mapping from “stroke data” to the resulting image with a neural network, which is analogous to learning painting experience. An advantage of such a mapping over software is that it provides a continuous transformation. For any painting program, the pixel values of an image are calcuated based on the coordinate points along the trajectory of an action. Specific pixels are indexed by the discrete pixel coordinates, which cuts the gradient flow with respect to the action. In our implementation, the indexing is done by an MLP described in Section 3.
16
+
17
+ We further define “drawing” by giving a formal definition of “stroke”. In our context, a “stroke” consists of color, brush radius, and a sequence of tuples containing the coordinate and pressure of each point along the trajectory. We will later describe this in detail in Section 3.
18
+
19
+ Based on these ideas, we train a differentiable approximator of our painting software, which we call a “generator”. We then tested the generator by training a vanilla CNN as an agent that encodes the image into “stroke” data as an input for the environment. Our proposed architecture, StrokeNet, basically comprises the two components, a generator and an agent.
20
+
21
+ Finally, an agent is trained to write and draw pictures of several popular datasets upon the generator. For the MNIST (LeCun & Cortes, 2010) digits, we evaluated the quality of the agent with a classifier trained solely on the original MNIST dataset, and tested the classifier on generated images. We also compared our method with others to show the efficiency. We explored the latent space of the agent as well.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Generative models such as VAEs(Kingma & Welling, 2013; Sohn et al., 2015) and GANs(Goodfellow et al., 2014; Mirza & Osindero, 2014; Radford et al., 2015; Arjovsky et al., 2017) have achieved huge success in image generation in recent years. These models generate images directly to pixel-level and thus could be trained through back-propagation effectively.
26
+
27
+ To mimic human drawing, attempts have been made by both graphics and machine learning communities. Traditionally, trial-and-error algorithms(Hertzmann, 2003) are designed to optimize stroke placement by minimizing an energy function, incorporating heuristics, e.g., constraining the number of strokes. Concept learning is another example tackling this problem using Bayesian program learning (Lake et al., 2015). Recent deep learning based approaches generally falls into two categories: RNN-based approaches and reinforcement learning.
28
+
29
+ For RNN-based approaches such as SketchRNN (Ha & Eck, 2017) and handwriting generation with RNN by Graves (Graves, 2013), they both rely on sequential datasets. Thus for unpaired data, those models cannot be applied.
30
+
31
+ Another popular solution is to adopt reinforcement learning such as “artist agent”(Xie et al., 2012) and SPIRAL (Ganin et al., 2018). These methods train an agent that interact with the painting environment. For reinforcement learning tasks with large, continuous action space like this, the training process can be computationally costly and it could take the agent tens of epochs to converge.
32
+
33
+ To mitigate this situation, we simulate the environment in a differentiable manner much alike the idea in World Models (Ha & Schmidhuber, 2018; Schmidhuber, 1990; 2018), where an agent learns from a neural network simulated environment. Similar approach is also used in character reconstruction for background denoising(Huang et al., 2018). In our scenario, we train our generator (auto-encoder) by parts for flexible stroke sequence length and image resolution, discussed in Section 3 and 4.
34
+
35
+ Differentiable rendering is an extensively researched topic in computer graphics. It is used to solve inverse rendering problems. Some differentiable renderers explicitly model the relationship between the parameters and observations (Loper & Black, 2014), others use neural network to approximate the result (Nguyen-Phuoc et al., 2018) since neural nets are powerful function approximators. While little has been done on simulating 2D rendering process adopted in digital painting software, we used a generator neural network to meet our needs.
36
+
37
+ # 3 STROKENET ARCHITECTURE AND ENVIRONMENT
38
+
39
+ # 3.1 STROKE
40
+
41
+ We define a single stroke as follows,
42
+
43
+ $$
44
+ s = \{ ( c , r ) , ( x _ { 1 } , y _ { 1 } , p _ { 1 } ) , \cdots , ( x _ { n } , y _ { n } , p _ { n } ) \} , n = 1 6 ,
45
+ $$
46
+
47
+ where $c \in \mathbb { R } ^ { 3 }$ stands for RGB color, scalar $r$ for brush radius, and tuple $( x _ { i } , y _ { i } , p _ { i } )$ for an anchor point on the stroke, consisting of $x , y$ coordinate and pressure $p$ , and $n$ is the maximum number of points in a single stroke, in this case, 16. These values are normalized such that the coordinates correspond to the default OpenGL coordinate system.
48
+
49
+ $$
50
+ c _ { k } , r , p _ { i } \in [ 0 , 1 ] , x _ { i } , y _ { i } \in [ - 1 , 1 ] ,
51
+ $$
52
+
53
+ for $k = 1 , 2 , 3$ and $i = 1 , 2 , \cdots , n$ . We used absolute coordinates for each point. It is notable that compared to the QuickDraw (Ha & Eck, 2017) dataset which contains longer lines, our strokes consist of much fewer points. We consider many trajectory points redundant since the stroke lines can be fitted by spline curves with fewer anchor points. For example, to fit a straight line, only two end-points are needed regardless of the length, in other words, stroke curves are usually scaleinvariant. However, if we are to sample the data from a user input, we could have dozens of points along the trajectory. Hence we made the assumption of being able to represent curves with a few anchors. We later showed that a single stroke with only 16 anchors is able to fit most MNIST digits and generate twisted lines in Section 5. We further assumed that longer and more complicated lines can be decomposed into simple segments and extended our experiments to include recurrent drawing of multiple strokes to generate more complex drawings.
54
+
55
+ ![](images/6583c490aa16fce28fe0294e0a0c39b064a9259ee1d6a36cec1c6b46e30bf286.jpg)
56
+ Figure 1: StrokeNet architecture. The generator part of the model outputs $2 5 6 \times 2 5 6$ images. The position encoder encodes input coordinate into $6 4 \times 6 4$ spatial feature for each point. The agent decodes different information about the stroke using three parallel FC-decoders.
57
+
58
+ # 3.2 GENERATOR
59
+
60
+ The outline of the StrokeNet architecture is shown in Figure 1. The generator takes $s$ as input, and projects the stroke data with two MLPs. One is the position encoder which encodes $( x _ { i } , y _ { i } , p _ { i } )$ into $6 4 \times 6 4$ feature maps, the other, brush encoder encodes the color and radius of the brush to a single $6 4 \times 6 4$ feature map. The color $c ^ { \prime }$ is a single gray scale scalar whose value equals to $\textstyle { \frac { 1 } { 3 } } \sum _ { k = 1 } ^ { 3 } c _ { k }$ , while color strokes are approximated by channel mixing described in Section 3.4. The features are then concatenated and passed to the (de)convolution layers.
61
+
62
+ To preserve the sequential and pressure information of each point $( x _ { i } , y _ { i } , p _ { i } )$ , the position encoder first maps $( x _ { i } , y _ { i } )$ to the corresponding position onto a $6 4 \times 6 4$ matrix by putting a bright dot on that point. This is modeled by a 2D Gaussian function with its peak scaled to 1, which simplifies to:
63
+
64
+ $$
65
+ g _ { i } ( x , y ) = \exp [ - \frac { 1 } { 2 } ( ( x - x _ { i } ) ^ { 2 } + ( y - y _ { i } ) ^ { 2 } ) ] ,
66
+ $$
67
+
68
+ for $i = 1 , 2 , \cdots , n$ where the value is calculated for each point $( x , y )$ on the $6 4 \times 6 4$ map. Denote this mapping from $( x _ { i } , y _ { i } )$ to $\mathbb { R } ^ { 6 4 \times 6 4 }$ as pos:
69
+
70
+ $$
71
+ m _ { i } = p _ { i } \cdot p o s ( x _ { i } , y _ { i } ) , m _ { i } \in \mathbb { R } ^ { 6 4 \times 6 4 } .
72
+ $$
73
+
74
+ By multiplying the corresponding pressure $p _ { i }$ , we now have $n$ position features, in our setup, sixteen. This part of the generator is trained separately with random coordinates until it generates accurate and reliable signals.
75
+
76
+ However, if we directly feed these features into the (de)convolutional layers of the network, the generator fails partly due to the sparsity of the single brightness feature. Instead, we take every two neighbouring feature maps and add them together (denoted by “reduce” in Figure 1.),
77
+
78
+ $$
79
+ f _ { i } = m _ { i } + m _ { i + 1 } , i = 1 , 2 , \cdots , n - 1 .
80
+ $$
81
+
82
+ Now, each feature map $f _ { i }$ represents a segment of the stroke. By learning to connect and curve the $n - 1$ “segments”, we are able to reconstruct the stroke. By appending the encoded color and radius data we now have the feature with shape $6 4 \times 6 4 \times n$ . We then feed the features into three (de)convolutional layers with batch-normalization (Ioffe & Szegedy, 2015) activated by LeakyReLU ( $\mathrm { X u }$ et al., 2015). The last layer is activated by tanh.
83
+
84
+ ![](images/cd0fb8b0b8397f69a4446cdcc90821d1797d6aee654882edd8dc4328fc66c0f9.jpg)
85
+ Figure 2: Recurrent version of StrokeNet. Two separate CNNs are used as encoders for the agent.
86
+
87
+ # 3.3 AGENT
88
+
89
+ The agent is a VGG (Simonyan & Zisserman, 2014)-like CNN that encodes the target image into its underlying stroke representation $s$ . Three parallel FC-decoders with different activations are used to decode position (tanh), pressure (sigmoid) and brush data (sigmoid) from the feature. We used average-pooling instead of max-pooling to improve gradient flow. For the recurrent version of StrokeNet, two separate CNNs are trained for the target image and the drawing frame, as shown in Figure 2. In practice the target image feature is computed once for all steps.
90
+
91
+ # 3.4 ENVIRONMENT
92
+
93
+ We first built a painting software using JavaScript and WebGL. We later tailored this web application for our experiment. 2 The spline used to fit the anchor points is centripetal CatmullRom (Catmull & Rom, 1974; Barry & Goldman, 1988). A desirable feature about Catmull-Rom spline is that the curve goes through all control points, unlike the more commonly used Bezier curve (Sederberg & Farouki, 1992).
94
+
95
+ We then interpolate through the sampled points and draw circles around each center point as shown in Figure 3. For each pixel inside a circle, its color depends on various factors including attributes of the brush, blending algorithm, etc. Our generator is trained on the naive brush. When it comes to the color blending of two frames, the generator is fed with the mean value of input RGB color as a gray scale scalar, and its output is treated as an alpha map. Normalization and alpha-blending is then performed to yield the next color frame, to simulate real blending algorithm underlying the software. Denote the generator output at time-step $t$ by $q ^ { ( t ) } \in \mathbb { R } ^ { 2 5 6 \times 2 5 6 }$ , the frame image by $\overline { { r ^ { ( t ) } } } \in \mathbb { R } ^ { 3 \times 2 5 6 \times 2 5 6 }$ , RGB color of the brush by $c \in \mathbb { R } ^ { 3 }$ , the blending process is approximated as follows,
96
+
97
+ $$
98
+ n ^ { ( t ) } = \frac { q ^ { ( t ) } } { \underset { 1 \leq i , j \leq 2 5 6 } { \operatorname* { m a x } } q _ { i j } ^ { ( t ) } } ,
99
+ $$
100
+
101
+ $$
102
+ r _ { k } ^ { ( t ) } = ( J - n ^ { ( t ) } ) r _ { k } ^ { ( t - 1 ) } + c _ { k } n ^ { ( t ) }
103
+ $$
104
+
105
+ for $k = 1 , 2 , 3$ corresponding to the RGB channels, where J denotes a $2 5 6 \times 2 5 6$ all-one matrix.
106
+
107
+ # 4 TRAINING METHODS
108
+
109
+ # 4.1 DATASET FOR GENERATOR
110
+
111
+ For the generator, we synthesize a large amount of samples, each of length $n$ . We would like to capture both the randomness and the smoothness of human writing, thus it is natural to incorporate chaos, most notably, the motion of three-body (Nielsen et al., 2001).
112
+
113
+ ![](images/c225ea23a10e81fccc5bb5ac12beaf88d3dd4a4380938ca733214e6a03ea550a.jpg)
114
+ Figure 3: Illustration of how a stroke is rendered.
115
+
116
+ ![](images/ba005ed854b84d3c2a3e3ee6f1ad177c538f73860517a0f464ae80d613871d54.jpg)
117
+ Figure 4: Images from our three-body dataset.
118
+
119
+ There is no closed-form solution to three-body problem, and error accumulates in simulation using numerical methods, leading to unpredictable and chaotic results. We simulate three-body motion in space $\mathbf { Z }$ -component for pressure) with random initial conditions and sample the trajectories as strokes for our dataset. The simulation is done with a set of equations using Newton’s universal law of gravitation:
120
+
121
+ $$
122
+ \begin{array} { r } { \left\{ \\begin{array} { l l } { \vec { F _ { 1 } } = \frac { G m _ { 1 } m _ { 2 } } { \| P _ { 2 } - P _ { 1 } \| _ { 2 } ^ { 3 } } ( P _ { 2 } - P _ { 1 } ) + \frac { G m _ { 1 } m _ { 3 } } { \| P _ { 3 } - P _ { 1 } \| _ { 2 } ^ { 3 } } ( P _ { 3 } - P _ { 1 } ) } \\ { \vec { F _ { 2 } } = \frac { G m _ { 1 } m _ { 2 } } { \| P _ { 1 } - P _ { 2 } \| _ { 2 } ^ { 3 } } ( P _ { 1 } - P _ { 2 } ) + \frac { G m _ { 2 } m _ { 3 } } { \| P _ { 3 } - P _ { 2 } \| _ { 2 } ^ { 3 } } ( P _ { 3 } - P _ { 2 } ) , } \\ { \vec { F _ { 3 } } = \frac { G m _ { 1 } m _ { 3 } } { \| P _ { 1 } - P _ { 3 } \| _ { 2 } ^ { 3 } } ( P _ { 1 } - P _ { 3 } ) + \frac { G m _ { 2 } m _ { 3 } } { \| P _ { 2 } - P _ { 3 } \| _ { 2 } ^ { 3 } } ( P _ { 2 } - P _ { 3 } ) } \end{array} \right. } \end{array}
123
+ $$
124
+
125
+ where $P _ { i } ( i = 1 , 2 , 3$ , $\qquad P _ { i } \in \mathbb { R } ^ { 3 } .$ ) denotes the position of the three objects respectively, $\vec { F _ { i } }$ denotes the gravitational force exerted on the $i$ th object. In our simulation we set mass $m _ { 1 } = m _ { 2 } = m _ { 3 } = 1$ and gravitational constant $G = 5 \times 1 0 ^ { - 5 }$ . We also always keep our camera (origin point) at the center of the triangle formed by the three objects to maintain relatively stable “footage”.
126
+
127
+ Using this method we collected about 600K images since there is virtually no cost to generate samples. Samples from the dataset are shown in Figure 4.
128
+
129
+ # 4.2 DATASETS FOR AGENT
130
+
131
+ To prove the effectivess of our neural environment, we trained an agent to perform drawing task on several popular datasets, from characters to drawings, with the generator part frozen. For MNIST and Omniglot, we trained an agent to draw the characters within one stroke. We later trained the recurrent StrokeNet on more complex datasets like QuickDraw and KanjiVG (Ofusa et al., 2017). We resized all the input images to $2 5 6 \times 2 5 6$ with anti-alias and paddings.
132
+
133
+ # 4.3 TRAINING METHODOLOGY
134
+
135
+ At first we train the position encoder guided by function pos that maps a coordinate to a $6 4 \times 6 4$ matrix with $l ^ { 2 }$ distance to measure the loss. Next we freeze the position encoder and train the other parts of the generator, again with $l ^ { 2 }$ loss to measure the performance on the three-body dataset. It can be found that smaller batch size results in more accurate images. We trained the generator with a batch size of 64 until the loss no longer improves. We then set the batch size to 32 to sharpen the neural network.
136
+
137
+ To train the agent, we freeze the generator. Denote the agent loss as $\boldsymbol { l } _ { a g e n t }$ , the generated image and ground-truth image as $i _ { g e n }$ and $i _ { g t }$ respectively, the loss is defined as:
138
+
139
+ $$
140
+ l _ { a g e n t } = \left\| i _ { g e n } - i _ { g t } \right\| _ { 2 } ^ { 2 } + \frac { \lambda } { n - 1 } \sum _ { k = 1 } ^ { n - 1 } \left\| P _ { k } - P _ { k + 1 } \right\| _ { 2 } ^ { 2 } ,
141
+ $$
142
+
143
+ where $P _ { k } = [ x _ { k } , y _ { k } , p _ { k } ] ^ { T }$ is the data describing the $k$ th anchor point on the stroke. Here the summation term constrains the average distance between neighbouring points, where $\lambda$ denotes the penalty strength. If we drop this term, the agent fails to learn the correct order of the points in a stroke because the generator itself is, after all, not robust to all cases of input, and is very likely to produce wrong results for sequences with large gaps between neighbouring points.
144
+
145
+ # 5 EXPERIMENTS
146
+
147
+ All experiments are conducted on a single NVIDIA Tesla P40 GPU. We first experimented with single step StrokeNet on MNIST and Omniglot, then we experimented recurrent StrokeNet with QuickDraw and Kanji. For the MNIST dataset, we later enforced a Gaussian prior to the latent variable and explored the latent space of the agent by linear interpolation. Finally, for a quantitative evaluation of the model, we trained a classifier on MNIST, and tested the classifier with images generated by the agent. The close accuracies indicate the quality of the generated images.
148
+
149
+ # 5.1 SINGLE-STEP STROKENET
150
+
151
+ It can be seen that a single stroke provides rich expressive power for different shapes. The generator generalizes well to unseen stroke patterns other than the synthesized three-body dataset. On the Omniglot dataset, since many characters consist of multiple strokes while the agent can only draw one, the agent tries to capture the contour of the character.
152
+
153
+ ![](images/fda5720d46cc52464b46743c9dc970b8d18a8f078a4ae084fafe70b19c4123c0.jpg)
154
+ Figure 5: Agent trained on MNIST. MNIST sample (left), generator output (middle), WebApp reconstruction (right). 1.5 epochs.
155
+
156
+ ![](images/e51f6aa6863d062961ab788f55e2115111bed60f9704e81160eb899861150adf.jpg)
157
+ Figure 6: Agent trained on Omniglot dataset learns to “sketch” the characters. Layout is the same as Figure 5. $1 0 ^ { 4 }$ iterations.
158
+
159
+ # 5.2 RECURRENT-STEP STROKENET
160
+
161
+ For more complex datasets, multiple steps of strokes are needed. Again the agent does pretty well to capture the contour of the given image. However, it seems that the agent has trouble to recover the details of the pictures, and tends to smear inside the boundaries with thick strokes.
162
+
163
+ ![](images/5877850f6a696278032a065d087f4fa24a19d79aa23f47b2aa9c496d94e89f59.jpg)
164
+ Figure 7: Agent trained on QuickDraw. Sample (left), reconstruction (right). 6 recurrent steps. 300K-image subset, 5 epochs, $1 0 ^ { 5 }$ iterations.
165
+
166
+ ![](images/6a2983fb32a44cb93b90d7dbcbefe6d6e236b400196c2e700f733b5896bd0c71.jpg)
167
+ Figure 8: Agent trained on KanjiVG dataset. Evaluated on a test-set of simple characters. $1 0 ^ { 5 }$ iterations. 8 recurrent steps.
168
+
169
+ ![](images/12adc89fd98d0d6e7695b08f1fd72cd6beb3a85dd40b057fdaee4f3d9f3534d9.jpg)
170
+ Figure 9: Latent space interpolation. Leftmost and rightmost columns are images from MNIST dataset. Middles are the rendered images with interpolation factors varying from 0 to 1.
171
+
172
+ ![](images/593fc981486363436c5a296bd938a3f0cc0ade15f69f2a64e2e0f35d38ab5059.jpg)
173
+ Figure 10: Latent space arithmetics. (a) and (b) demonstrate different attributes of the digits.
174
+
175
+ # 5.3 LATENT SPACE EXPLORATION
176
+
177
+ To convert the agent into a latent space generative model, we experimented with the VAE version of the agent, where the feature obtained from the last layer of CNN is projected into two vectors representing the means $\mu$ and standard deviations (activated by softplus) $\sigma$ , both of 1024 dimensions. A vector noise of i.i.d. Gaussian $U \sim N ( 0 , I )$ is sampled, latent variable $z$ is given by
178
+
179
+ $$
180
+ z = \mu + \sigma \odot U .
181
+ $$
182
+
183
+ We did latent space interpolation with the agent trained on MNIST. The simple data led to easily interpretable results. Since the images are generated by strokes, the digits transform smoothly to one another. That is to say, the results looked as if we were directly interpolating the stroke data. Results are shown in Figure 9 and 10.
184
+
185
+ # 5.4 PERFORMANCE EVALUATION
186
+
187
+ In order to evaluate the agent, we trained a 5-layer CNN classifier solely on pre-processed MNIST dataset, which is also the input to the MNIST agent. The size of the image is $2 5 6 \times 2 5 6$ , so there is some performance drop to the classification task compared to standard $2 8 \times 2 8$ images. The classifier is then used to evaluate the paired test-set image generated by the agent. The accuracies reflect the quality of the generated images. We also compared the $l ^ { 2 }$ loss with SPIRAL on MNIST to illustrate that our method has the advantage of faster convergence over reinforcement learning approaches, shown in Figure 11.
188
+
189
+ Table 1: MNIST Classification Accuracies
190
+
191
+ <table><tr><td>TESTDATA</td><td>ACCURACY</td></tr><tr><td></td><td></td></tr><tr><td>Pre-processed images</td><td>90.82%</td></tr><tr><td>Agent Output (3 steps)</td><td>88.43%</td></tr><tr><td>Agent Output (1 step)</td><td>79.33%</td></tr><tr><td>Agent Output (1 step, VAE)</td><td>67.21%</td></tr></table>
192
+
193
+ ![](images/3393c1316e650209fdaeb85ab62a718088c1ada207a2377867aa89e7b8a81c48.jpg)
194
+ Figure 11: Comparison of loss curves between StrokeNet (ours) and SPIRAL.
195
+
196
+ ![](images/4a80132369306393f978eca23cc50d9f6a07c414590dda72eeea87cdcb3a5008.jpg)
197
+ Figure 12: 16-step color image reconstruction. (a) Mona Lisa. (b) Successful reconstruction includes use of different colors. (c) Fail to use different colors.
198
+
199
+ ![](images/e0b0f3f62c87099c3be63048b1cf65e4a3dcc30599750b6cdfd1200ac64da07e.jpg)
200
+ Figure 13: Comparison of stroke orders between human and agent. We can see the stroke order is completely chaotic compared to natural order.
201
+
202
+ # 6 DISCUSSION
203
+
204
+ For future work, there are several major improvements we want to make both to the network structure and to the algorithm.
205
+
206
+ The recurrent structure adopted here is of the simplest form. We use this setup because we consider drawing as a Markov process, where the current action only depends on what the agent sees, the target image and the previous frame. More advanced structures like LSTM (Hochreiter & Schmidhuber, 1997) or GRU (Chung et al., 2014) may boost the performance. A stop sign can be also introduced to determine when to stop drawing, which can be useful in character reconstruction. For the agent, various attention mechanism could be incorporated to help the agent focus on undrawn regions, so that smear and blurry scribbles might be prevented.
207
+
208
+ Secondly, The generator and the agent were trained as two separate parts throughout the experiment. We can somehow train them as a whole: during the training of the agent, store all the intermediate stroke data. After a period of training, sample images from the real environment with the stroke data just collected, and train the generator with the data. By doing so in an iterative manner, the generator could fit better to the current agent and provide more reliable reconstructions, while a changing generator may potentially provide more valuable overall gradients.
209
+
210
+ It is also found useful to add a bit of randomness to the learning rate. Since different decoders of the agent learn at different rates, stochasticity results in more appealing results. For example, the agent usually fails to generalize to color images because it always sticks with one global average color (as shown in Figure 12). However, it sometimes generates appealing results with some randomness added during the training. As a result of this immobility, the way agent writes is dull compared to humans and reinforcement learning agents like SPIRAL. For instance, when writing the digit “8”, the agent is simply writing “3” with endpoints closed. Also, the agent avoids to make intersecting strokes over all datasets, although such actions are harmless and should be totally encouraged and explored! Thus, random sampling techniques could be added to the decision making process to encourage bolder moves. Finally, for the evaluation metrics, the naive $l ^ { 2 }$ loss can be combined with adversarial learning. If paired sequential data is available, we believe adding it to training will also improve the results.
211
+
212
+ # 7 CONCLUSION
213
+
214
+ In this paper we bring a proof-of-concept that an agent is able to learn from its neural simulation of an environment. Especially when the environment is deterministic given the action, or contains a huge action space, the proposed approach could be useful. Our primary contribution is that we devised a model-based method to approximate non-differentiable environment with neural network, and the agent trained with our method converges quickly on several datasets. It is able to adapt its skills to real world. Hopefully such approaches can be useful when dealing with more difficult reinforcement learning problems.
215
+
216
+ # ACKNOWLEDGEMENTS
217
+
218
+ This work was partially supported by the National Natural Science Foundation of China (U1711262, U1811264, 11501204). We thank our anonymous reviewers for their valuable feedback and opinions.
219
+
220
+ # REFERENCES
221
+
222
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. ´ In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 214–223, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR.
223
+
224
+ Phillip J. Barry and Ronald N. Goldman. A recursive evaluation algorithm for a class of catmullrom splines. SIGGRAPH Comput. Graph., 22(4):199–204, June 1988. ISSN 0097-8930. doi: 10.1145/378456.378511.
225
+
226
+ Edwin Catmull and Raphael Rom. A class of local interpolating splines. Computer Aided Geometric Design, pp. 317–326, 1974.
227
+
228
+ Junyoung Chung, C¸ aglar Gulc¸ehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of ¨ gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014.
229
+
230
+ Yaroslav Ganin, Tejas Kulkarni, Igor Babuschkin, S. M. Ali Eslami, and Oriol Vinyals. Synthesizing programs for images using reinforced adversarial learning. CoRR, abs/1804.01118, 2018.
231
+
232
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 2672–2680. Curran Associates, Inc., 2014.
233
+
234
+ Alex Graves. Generating sequences with recurrent neural networks. CoRR, abs/1308.0850, 2013.
235
+
236
+ David Ha and Douglas Eck. A neural representation of sketch drawings. CoRR, abs/1704.03477, 2017.
237
+
238
+ David Ha and Jurgen Schmidhuber. World models. ¨ CoRR, abs/1803.10122, 2018.
239
+
240
+ Aaron Hertzmann. A survey of stroke-based rendering. IEEE Computer Graphics and Applications, 23:70–81, 2003.
241
+
242
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
243
+
244
+ Zhewei Huang, Wen Heng, Yuanzheng Tao, and Shuchang Zhou. Stroke-based character reconstruction. arXiv preprint arXiv:1806.08990, 2018.
245
+
246
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR, abs/1502.03167, 2015.
247
+
248
+ Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. CoRR, abs/1312.6114, 2013.
249
+
250
+ Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 2015.
251
+
252
+ Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010.
253
+
254
+ Matthew M. Loper and Michael J. Black. OpenDR: An approximate differentiable renderer. In Computer Vision – ECCV 2014, volume 8695 of Lecture Notes in Computer Science, pp. 154– 169. Springer International Publishing, September 2014.
255
+
256
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014.
257
+
258
+ Thu Nguyen-Phuoc, Chuan Li, Stephen Balaban, and Yong-Liang Yang. Rendernet: A deep convolutional network for differentiable rendering from 3d shapes. arXiv preprint arXiv, abs/1806.06575, 2018.
259
+
260
+ E. Nielsen, D.V. Fedorov, A.S. Jensen, and E. Garrido. The three-body problem with short-range interactions. Physics Reports, 347(5):373 – 459, 2001. ISSN 0370-1573. doi: https://doi.org/10. 1016/S0370-1573(00)00107-1.
261
+
262
+ Kenichiro Ofusa, Tomo Miyazaki, Yoshihiro Sugaya, and Shinichiro Omachi. Glyph-based data augmentation for accurate kanji character recognition. In 14th IAPR International Conference on Document Analysis and Recognition, ICDAR 2017, Kyoto, Japan, November 9-15, 2017, pp. 597–602. IEEE, 2017. ISBN 978-1-5386-3586-5. doi: https://doi.org/10.1109/ICDAR.2017.103.
263
+
264
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015.
265
+
266
+ Jurgen Schmidhuber. Making the world differentiable: On using self-supervised fully recurrent ¨ neural networks for dynamic reinforcement learning and planning in non-stationary environments. Technical report, 1990.
267
+
268
+ Jurgen Schmidhuber. One big net for everything. ¨ CoRR, abs/1802.08864, 2018.
269
+
270
+ Thomas W. Sederberg and Rida T. Farouki. Approximation by interval bezier curves. IEEE Computer Graphics and Applications, 12(5):87–95, 1992. doi: http://doi.ieeecomputersociety.org/10. 1109/38.156018.
271
+
272
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014.
273
+
274
+ Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 3483–3491. Curran Associates, Inc., 2015.
275
+
276
+ Ning Xie, Hirotaka Hachiya, and Masashi Sugiyama. Artist agent: A reinforcement learning approach to automatic stroke generation in oriental ink painting. CoRR, abs/1206.4634, 2012.
277
+
278
+ Bing Xu, Naiyan Wang, Tianqi Chen, and Mu Li. Empirical evaluation of rectified activations in convolutional network. CoRR, abs/1505.00853, 2015.
279
+
280
+ # 8 APPENDIX
281
+
282
+ # 8.1 ENVIRONMENT DETAILS
283
+
284
+ Let $P _ { i } = [ x _ { i } , y _ { i } ] ^ { T }$ denote the coordinate of a sampled point. For a curve defined by points $P _ { 0 } , P _ { 1 } , P _ { 2 } , P _ { 3 }$ , the spline can be produced by:
285
+
286
+ $$
287
+ C = \frac { t _ { 2 } - t } { t _ { 2 } - t _ { 1 } } B _ { 1 } + \frac { t - t _ { 1 } } { t _ { 2 } - t _ { 1 } } B _ { 2 } ,
288
+ $$
289
+
290
+ where
291
+
292
+ $$
293
+ { \begin{array} { r l } & { B _ { 1 } = { \frac { t _ { 2 } - t } { t _ { 2 } - t _ { 0 } } } A _ { 1 } + { \frac { t - t _ { 0 } } { t _ { 2 } - t _ { 0 } } } A _ { 2 } , \quad B _ { 2 } = { \frac { t _ { 3 } - t } { t _ { 3 } - t _ { 1 } } } A _ { 2 } + { \frac { t - t _ { 1 } } { t _ { 3 } - t _ { 1 } } } A _ { 3 } , } \\ & { A _ { 1 } = { \frac { t _ { 1 } - t } { t _ { 1 } - t _ { 0 } } } P _ { 0 } + { \frac { t - t _ { 0 } } { t _ { 1 } - t _ { 0 } } } P _ { 1 } , \quad A _ { 2 } = { \frac { t _ { 2 } - t } { t _ { 2 } - t _ { 1 } } } P _ { 1 } + { \frac { t - t _ { 1 } } { t _ { 2 } - t _ { 1 } } } P _ { 2 } , } \\ & { A _ { 3 } = { \frac { t _ { 3 } - t } { t _ { 3 } - t _ { 2 } } } P _ { 2 } + { \frac { t - t _ { 2 } } { t _ { 3 } - t _ { 2 } } } P _ { 3 } , \quad t _ { i + 1 } = { \Vert } P _ { i + 1 } - P { i } { \Vert } _ { 2 } ^ { \alpha } + t _ { i } . } \end{array} }
294
+ $$
295
+
296
+ with $\alpha = 0 . 5$ , $t _ { 0 } = 0$ and $i = { 0 , 1 , 2 , 3 }$
297
+
298
+ By interpolating $t$ from $t _ { 1 }$ to $t _ { 2 }$ linearly, we generate the curve between $P _ { 1 }$ and $P _ { 2 }$ . The pressure values between neighbouring points are interpolated linearly.
299
+
300
+ # 8.2 LOSSES
301
+
302
+ ![](images/51e22126b3933d20d8956c3997ec5ea365d386f3d94ee0e1646b2ef1103bf225.jpg)
303
+ (a) Loss of encoder when trained separately at first. (b) Loss of generator trained on our 600K dataset.
304
+
305
+ ![](images/918c6afe99629ee0b28104d8a9108c9698ad147b66336844239de69be60b6761.jpg)
306
+ Figure 14: Training loss of generator and agent. The agent loss equals to the $l ^ { 2 }$ distance between the generator output and agent input plus the penalty term constraining the average point distance within a stroke. For (c) and (d) the learning rate is set to $1 0 ^ { - 4 }$ , batch size equals to 64.
307
+
308
+ ![](images/fbf03a0ebb808615c2b8f5fdff2ad1c44f0dce152416ea929956926aaaba3b35.jpg)
309
+ Figure 15: A trained StrokeNet generates images that resemble the output of painting software. The first row depicts results generated by our model (left) and by the software (right) given the same input. The second row shows the model could produce strokes with color and texture using simple arithmetic operations. The third and fourth row shows the model’s ability to draw MNIST digits (left) on both its own generative model (middle) and real-world painting software (right).
310
+
311
+ ![](images/ea7e6900d0585b611e13695dbd8d6dd019e443c57b0b9d67df8d74b05e118cf3.jpg)
312
+ Figure 16: (a) A trained position encoder maps two $( x _ { i } , y _ { i } , p _ { i } )$ tuples to two feature maps. (b) Each pair of neighbouring features are added together to eliminate sparsity and preserve sequential information. (c) A trained brush encoder encodes color and radius information into a spatial feature which is later concatenated to the end of position features.
313
+
314
+ ![](images/efa474886deb1f2b0d27a17f8d9eb62f73e171b17f3ef63af211a6a6ebb42bf2.jpg)
315
+ Figure 17: The generator tries to predict what the real environment would ouput given the same input stroke data. Software output (left), generator prediction (right).
316
+
317
+ ![](images/46746c2f2c4cd0c3cc97e7b171627657bfa7857c1c7b4aced2897811ebf2906a.jpg)
318
+ Figure 18: Interpolation across four digits. In the corners are the four MNIST samples.
parse/train/HJxwDiActX/HJxwDiActX_content_list.json ADDED
@@ -0,0 +1,1661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "STROKENET: A NEURAL PAINTING ENVIRONMENT ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 205,
8
+ 98,
9
+ 820,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Ningyuan Zheng, Yifan Jiang & Dingjiang Huang School of Data Science and Engineering, East China Normal University {10165101164, 10153903133}@stu.ecnu.edu.cn, djhuang@dase.ecnu.edu.cn ",
17
+ "bbox": [
18
+ 217,
19
+ 143,
20
+ 687,
21
+ 202
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 238,
32
+ 544,
33
+ 252
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We’ve seen tremendous success of image generating models these years. Generating images through a neural network is usually pixel-based, which is fundamentally different from how humans create artwork using brushes. To imitate human drawing, interactions between the environment and the agent is required to allow trials. However, the environment is usually non-differentiable, leading to slow convergence and massive computation. In this paper we try to address the discrete nature of software environment with an intermediate, differentiable simulation. We present StrokeNet, a novel model where the agent is trained upon a wellcrafted neural approximation of the painting environment. With this approach, our agent was able to learn to write characters such as MNIST digits faster than reinforcement learning approaches in an unsupervised manner. Our primary contribution is the neural simulation of a real-world environment. Furthermore, the agent trained with the emulated environment is able to directly transfer its skills to real-world software. 1 ",
40
+ "bbox": [
41
+ 233,
42
+ 270,
43
+ 764,
44
+ 463
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 493,
55
+ 336,
56
+ 510
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "To learn drawing or writing, a person first observes (encodes) the target image visually and uses a pen or a brush to scribble (decode), to reconstruct the original image. For an experienced painter, he or she foresees the consequences before taking any move, and could choose the optimal action. ",
63
+ "bbox": [
64
+ 174,
65
+ 526,
66
+ 823,
67
+ 568
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Stroke-based image generation is fairly different from traditional image generation problems due to the intermediate rendering program. Raster-based deep learning approaches for image generation allow effective optimization using back-propagation. While for stroke-based approaches, rather than learning to generate the image, it is more of learning to manipulate the painting program. ",
74
+ "bbox": [
75
+ 174,
76
+ 575,
77
+ 823,
78
+ 631
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "An intuitive yet potentially effective way to tackle the problem is to first learn this mapping from “stroke data” to the resulting image with a neural network, which is analogous to learning painting experience. An advantage of such a mapping over software is that it provides a continuous transformation. For any painting program, the pixel values of an image are calcuated based on the coordinate points along the trajectory of an action. Specific pixels are indexed by the discrete pixel coordinates, which cuts the gradient flow with respect to the action. In our implementation, the indexing is done by an MLP described in Section 3. ",
85
+ "bbox": [
86
+ 174,
87
+ 638,
88
+ 825,
89
+ 736
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We further define “drawing” by giving a formal definition of “stroke”. In our context, a “stroke” consists of color, brush radius, and a sequence of tuples containing the coordinate and pressure of each point along the trajectory. We will later describe this in detail in Section 3. ",
96
+ "bbox": [
97
+ 174,
98
+ 742,
99
+ 821,
100
+ 785
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Based on these ideas, we train a differentiable approximator of our painting software, which we call a “generator”. We then tested the generator by training a vanilla CNN as an agent that encodes the image into “stroke” data as an input for the environment. Our proposed architecture, StrokeNet, basically comprises the two components, a generator and an agent. ",
107
+ "bbox": [
108
+ 174,
109
+ 791,
110
+ 825,
111
+ 848
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Finally, an agent is trained to write and draw pictures of several popular datasets upon the generator. For the MNIST (LeCun & Cortes, 2010) digits, we evaluated the quality of the agent with a classifier trained solely on the original MNIST dataset, and tested the classifier on generated images. We also compared our method with others to show the efficiency. We explored the latent space of the agent as well. ",
118
+ "bbox": [
119
+ 176,
120
+ 854,
121
+ 821,
122
+ 897
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "",
129
+ "bbox": [
130
+ 173,
131
+ 103,
132
+ 823,
133
+ 132
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 RELATED WORK ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 176,
143
+ 151,
144
+ 344,
145
+ 167
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Generative models such as VAEs(Kingma & Welling, 2013; Sohn et al., 2015) and GANs(Goodfellow et al., 2014; Mirza & Osindero, 2014; Radford et al., 2015; Arjovsky et al., 2017) have achieved huge success in image generation in recent years. These models generate images directly to pixel-level and thus could be trained through back-propagation effectively. ",
152
+ "bbox": [
153
+ 174,
154
+ 183,
155
+ 825,
156
+ 239
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "To mimic human drawing, attempts have been made by both graphics and machine learning communities. Traditionally, trial-and-error algorithms(Hertzmann, 2003) are designed to optimize stroke placement by minimizing an energy function, incorporating heuristics, e.g., constraining the number of strokes. Concept learning is another example tackling this problem using Bayesian program learning (Lake et al., 2015). Recent deep learning based approaches generally falls into two categories: RNN-based approaches and reinforcement learning. ",
163
+ "bbox": [
164
+ 174,
165
+ 246,
166
+ 825,
167
+ 330
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "For RNN-based approaches such as SketchRNN (Ha & Eck, 2017) and handwriting generation with RNN by Graves (Graves, 2013), they both rely on sequential datasets. Thus for unpaired data, those models cannot be applied. ",
174
+ "bbox": [
175
+ 176,
176
+ 337,
177
+ 825,
178
+ 378
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Another popular solution is to adopt reinforcement learning such as “artist agent”(Xie et al., 2012) and SPIRAL (Ganin et al., 2018). These methods train an agent that interact with the painting environment. For reinforcement learning tasks with large, continuous action space like this, the training process can be computationally costly and it could take the agent tens of epochs to converge. ",
185
+ "bbox": [
186
+ 176,
187
+ 386,
188
+ 825,
189
+ 441
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "To mitigate this situation, we simulate the environment in a differentiable manner much alike the idea in World Models (Ha & Schmidhuber, 2018; Schmidhuber, 1990; 2018), where an agent learns from a neural network simulated environment. Similar approach is also used in character reconstruction for background denoising(Huang et al., 2018). In our scenario, we train our generator (auto-encoder) by parts for flexible stroke sequence length and image resolution, discussed in Section 3 and 4. ",
196
+ "bbox": [
197
+ 174,
198
+ 448,
199
+ 825,
200
+ 532
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Differentiable rendering is an extensively researched topic in computer graphics. It is used to solve inverse rendering problems. Some differentiable renderers explicitly model the relationship between the parameters and observations (Loper & Black, 2014), others use neural network to approximate the result (Nguyen-Phuoc et al., 2018) since neural nets are powerful function approximators. While little has been done on simulating 2D rendering process adopted in digital painting software, we used a generator neural network to meet our needs. ",
207
+ "bbox": [
208
+ 174,
209
+ 539,
210
+ 825,
211
+ 623
212
+ ],
213
+ "page_idx": 1
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "3 STROKENET ARCHITECTURE AND ENVIRONMENT ",
218
+ "text_level": 1,
219
+ "bbox": [
220
+ 174,
221
+ 642,
222
+ 622,
223
+ 659
224
+ ],
225
+ "page_idx": 1
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "3.1 STROKE ",
230
+ "text_level": 1,
231
+ "bbox": [
232
+ 174,
233
+ 674,
234
+ 272,
235
+ 688
236
+ ],
237
+ "page_idx": 1
238
+ },
239
+ {
240
+ "type": "text",
241
+ "text": "We define a single stroke as follows, ",
242
+ "bbox": [
243
+ 207,
244
+ 700,
245
+ 446,
246
+ 714
247
+ ],
248
+ "page_idx": 1
249
+ },
250
+ {
251
+ "type": "equation",
252
+ "img_path": "images/728dba15c496270334ec9bb3633eadfed395b33b19efa8da841769dd5ee42c7c.jpg",
253
+ "text": "$$\ns = \\{ ( c , r ) , ( x _ { 1 } , y _ { 1 } , p _ { 1 } ) , \\cdots , ( x _ { n } , y _ { n } , p _ { n } ) \\} , n = 1 6 ,\n$$",
254
+ "text_format": "latex",
255
+ "bbox": [
256
+ 325,
257
+ 719,
258
+ 671,
259
+ 738
260
+ ],
261
+ "page_idx": 1
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "where $c \\in \\mathbb { R } ^ { 3 }$ stands for RGB color, scalar $r$ for brush radius, and tuple $( x _ { i } , y _ { i } , p _ { i } )$ for an anchor point on the stroke, consisting of $x , y$ coordinate and pressure $p$ , and $n$ is the maximum number of points in a single stroke, in this case, 16. These values are normalized such that the coordinates correspond to the default OpenGL coordinate system. ",
266
+ "bbox": [
267
+ 174,
268
+ 742,
269
+ 825,
270
+ 799
271
+ ],
272
+ "page_idx": 1
273
+ },
274
+ {
275
+ "type": "equation",
276
+ "img_path": "images/4328a2a5ada1d0da21560bfb3192aa5de292ddf81a01eb151890d443c82e0df6.jpg",
277
+ "text": "$$\nc _ { k } , r , p _ { i } \\in [ 0 , 1 ] , x _ { i } , y _ { i } \\in [ - 1 , 1 ] ,\n$$",
278
+ "text_format": "latex",
279
+ "bbox": [
280
+ 387,
281
+ 804,
282
+ 609,
283
+ 820
284
+ ],
285
+ "page_idx": 1
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "for $k = 1 , 2 , 3$ and $i = 1 , 2 , \\cdots , n$ . We used absolute coordinates for each point. It is notable that compared to the QuickDraw (Ha & Eck, 2017) dataset which contains longer lines, our strokes consist of much fewer points. We consider many trajectory points redundant since the stroke lines can be fitted by spline curves with fewer anchor points. For example, to fit a straight line, only two end-points are needed regardless of the length, in other words, stroke curves are usually scaleinvariant. However, if we are to sample the data from a user input, we could have dozens of points along the trajectory. Hence we made the assumption of being able to represent curves with a few anchors. We later showed that a single stroke with only 16 anchors is able to fit most MNIST digits and generate twisted lines in Section 5. We further assumed that longer and more complicated lines can be decomposed into simple segments and extended our experiments to include recurrent drawing of multiple strokes to generate more complex drawings. ",
290
+ "bbox": [
291
+ 173,
292
+ 825,
293
+ 823,
294
+ 924
295
+ ],
296
+ "page_idx": 1
297
+ },
298
+ {
299
+ "type": "image",
300
+ "img_path": "images/6583c490aa16fce28fe0294e0a0c39b064a9259ee1d6a36cec1c6b46e30bf286.jpg",
301
+ "image_caption": [
302
+ "Figure 1: StrokeNet architecture. The generator part of the model outputs $2 5 6 \\times 2 5 6$ images. The position encoder encodes input coordinate into $6 4 \\times 6 4$ spatial feature for each point. The agent decodes different information about the stroke using three parallel FC-decoders. "
303
+ ],
304
+ "image_footnote": [],
305
+ "bbox": [
306
+ 176,
307
+ 102,
308
+ 825,
309
+ 325
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "",
316
+ "bbox": [
317
+ 173,
318
+ 391,
319
+ 825,
320
+ 448
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "3.2 GENERATOR ",
327
+ "text_level": 1,
328
+ "bbox": [
329
+ 176,
330
+ 464,
331
+ 302,
332
+ 478
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "The outline of the StrokeNet architecture is shown in Figure 1. The generator takes $s$ as input, and projects the stroke data with two MLPs. One is the position encoder which encodes $( x _ { i } , y _ { i } , p _ { i } )$ into $6 4 \\times 6 4$ feature maps, the other, brush encoder encodes the color and radius of the brush to a single $6 4 \\times 6 4$ feature map. The color $c ^ { \\prime }$ is a single gray scale scalar whose value equals to $\\textstyle { \\frac { 1 } { 3 } } \\sum _ { k = 1 } ^ { 3 } c _ { k }$ , while color strokes are approximated by channel mixing described in Section 3.4. The features are then concatenated and passed to the (de)convolution layers. ",
339
+ "bbox": [
340
+ 173,
341
+ 489,
342
+ 825,
343
+ 577
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "To preserve the sequential and pressure information of each point $( x _ { i } , y _ { i } , p _ { i } )$ , the position encoder first maps $( x _ { i } , y _ { i } )$ to the corresponding position onto a $6 4 \\times 6 4$ matrix by putting a bright dot on that point. This is modeled by a 2D Gaussian function with its peak scaled to 1, which simplifies to: ",
350
+ "bbox": [
351
+ 173,
352
+ 582,
353
+ 825,
354
+ 637
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "equation",
360
+ "img_path": "images/19c961a8418d60a5c347aab8c59d6f84a9c439acdc514242eab85de0e83f4f4f.jpg",
361
+ "text": "$$\ng _ { i } ( x , y ) = \\exp [ - \\frac { 1 } { 2 } ( ( x - x _ { i } ) ^ { 2 } + ( y - y _ { i } ) ^ { 2 } ) ] ,\n$$",
362
+ "text_format": "latex",
363
+ "bbox": [
364
+ 349,
365
+ 636,
366
+ 647,
367
+ 666
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "for $i = 1 , 2 , \\cdots , n$ where the value is calculated for each point $( x , y )$ on the $6 4 \\times 6 4$ map. Denote this mapping from $( x _ { i } , y _ { i } )$ to $\\mathbb { R } ^ { 6 4 \\times 6 4 }$ as pos: ",
374
+ "bbox": [
375
+ 178,
376
+ 666,
377
+ 823,
378
+ 695
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/8cc9340e9f6cf001385745ac8cc4b37b39a59349aa733cfc788bdd925935ff93.jpg",
385
+ "text": "$$\nm _ { i } = p _ { i } \\cdot p o s ( x _ { i } , y _ { i } ) , m _ { i } \\in \\mathbb { R } ^ { 6 4 \\times 6 4 } .\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 375,
389
+ 698,
390
+ 622,
391
+ 715
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "By multiplying the corresponding pressure $p _ { i }$ , we now have $n$ position features, in our setup, sixteen. This part of the generator is trained separately with random coordinates until it generates accurate and reliable signals. ",
398
+ "bbox": [
399
+ 174,
400
+ 718,
401
+ 825,
402
+ 761
403
+ ],
404
+ "page_idx": 2
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "However, if we directly feed these features into the (de)convolutional layers of the network, the generator fails partly due to the sparsity of the single brightness feature. Instead, we take every two neighbouring feature maps and add them together (denoted by “reduce” in Figure 1.), ",
409
+ "bbox": [
410
+ 174,
411
+ 767,
412
+ 825,
413
+ 810
414
+ ],
415
+ "page_idx": 2
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/78f6dcb25f87433f876a05ebda8e11d0a83e41e7db7b03a40163cee0b2baad0d.jpg",
420
+ "text": "$$\nf _ { i } = m _ { i } + m _ { i + 1 } , i = 1 , 2 , \\cdots , n - 1 .\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 369,
424
+ 829,
425
+ 629,
426
+ 845
427
+ ],
428
+ "page_idx": 2
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Now, each feature map $f _ { i }$ represents a segment of the stroke. By learning to connect and curve the $n - 1$ “segments”, we are able to reconstruct the stroke. By appending the encoded color and radius data we now have the feature with shape $6 4 \\times 6 4 \\times n$ . We then feed the features into three (de)convolutional layers with batch-normalization (Ioffe & Szegedy, 2015) activated by LeakyReLU ( $\\mathrm { X u }$ et al., 2015). The last layer is activated by tanh. ",
433
+ "bbox": [
434
+ 174,
435
+ 853,
436
+ 825,
437
+ 924
438
+ ],
439
+ "page_idx": 2
440
+ },
441
+ {
442
+ "type": "image",
443
+ "img_path": "images/cd0fb8b0b8397f69a4446cdcc90821d1797d6aee654882edd8dc4328fc66c0f9.jpg",
444
+ "image_caption": [
445
+ "Figure 2: Recurrent version of StrokeNet. Two separate CNNs are used as encoders for the agent. "
446
+ ],
447
+ "image_footnote": [],
448
+ "bbox": [
449
+ 173,
450
+ 101,
451
+ 826,
452
+ 280
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "3.3 AGENT ",
459
+ "text_level": 1,
460
+ "bbox": [
461
+ 174,
462
+ 319,
463
+ 266,
464
+ 333
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "The agent is a VGG (Simonyan & Zisserman, 2014)-like CNN that encodes the target image into its underlying stroke representation $s$ . Three parallel FC-decoders with different activations are used to decode position (tanh), pressure (sigmoid) and brush data (sigmoid) from the feature. We used average-pooling instead of max-pooling to improve gradient flow. For the recurrent version of StrokeNet, two separate CNNs are trained for the target image and the drawing frame, as shown in Figure 2. In practice the target image feature is computed once for all steps. ",
471
+ "bbox": [
472
+ 174,
473
+ 344,
474
+ 825,
475
+ 429
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "3.4 ENVIRONMENT ",
482
+ "text_level": 1,
483
+ "bbox": [
484
+ 174,
485
+ 445,
486
+ 325,
487
+ 460
488
+ ],
489
+ "page_idx": 3
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "We first built a painting software using JavaScript and WebGL. We later tailored this web application for our experiment. 2 The spline used to fit the anchor points is centripetal CatmullRom (Catmull & Rom, 1974; Barry & Goldman, 1988). A desirable feature about Catmull-Rom spline is that the curve goes through all control points, unlike the more commonly used Bezier curve (Sederberg & Farouki, 1992). ",
494
+ "bbox": [
495
+ 174,
496
+ 472,
497
+ 825,
498
+ 541
499
+ ],
500
+ "page_idx": 3
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "We then interpolate through the sampled points and draw circles around each center point as shown in Figure 3. For each pixel inside a circle, its color depends on various factors including attributes of the brush, blending algorithm, etc. Our generator is trained on the naive brush. When it comes to the color blending of two frames, the generator is fed with the mean value of input RGB color as a gray scale scalar, and its output is treated as an alpha map. Normalization and alpha-blending is then performed to yield the next color frame, to simulate real blending algorithm underlying the software. Denote the generator output at time-step $t$ by $q ^ { ( t ) } \\in \\mathbb { R } ^ { 2 5 6 \\times 2 5 6 }$ , the frame image by $\\overline { { r ^ { ( t ) } } } \\in \\mathbb { R } ^ { 3 \\times 2 5 6 \\times 2 5 6 }$ , RGB color of the brush by $c \\in \\mathbb { R } ^ { 3 }$ , the blending process is approximated as follows, ",
505
+ "bbox": [
506
+ 173,
507
+ 547,
508
+ 825,
509
+ 676
510
+ ],
511
+ "page_idx": 3
512
+ },
513
+ {
514
+ "type": "equation",
515
+ "img_path": "images/b90cbb0741b34dcf3c71a8aa8ca4a1061c3be49ed7bff08682c3c328047045b9.jpg",
516
+ "text": "$$\nn ^ { ( t ) } = \\frac { q ^ { ( t ) } } { \\underset { 1 \\leq i , j \\leq 2 5 6 } { \\operatorname* { m a x } } q _ { i j } ^ { ( t ) } } ,\n$$",
517
+ "text_format": "latex",
518
+ "bbox": [
519
+ 424,
520
+ 693,
521
+ 571,
522
+ 739
523
+ ],
524
+ "page_idx": 3
525
+ },
526
+ {
527
+ "type": "equation",
528
+ "img_path": "images/fa80a5f32051b56fde49f5102a99ebeb6bcaea836173663b563a5f20ce540db0.jpg",
529
+ "text": "$$\nr _ { k } ^ { ( t ) } = ( J - n ^ { ( t ) } ) r _ { k } ^ { ( t - 1 ) } + c _ { k } n ^ { ( t ) }\n$$",
530
+ "text_format": "latex",
531
+ "bbox": [
532
+ 388,
533
+ 742,
534
+ 607,
535
+ 763
536
+ ],
537
+ "page_idx": 3
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "for $k = 1 , 2 , 3$ corresponding to the RGB channels, where J denotes a $2 5 6 \\times 2 5 6$ all-one matrix. ",
542
+ "bbox": [
543
+ 174,
544
+ 765,
545
+ 802,
546
+ 780
547
+ ],
548
+ "page_idx": 3
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "4 TRAINING METHODS ",
553
+ "text_level": 1,
554
+ "bbox": [
555
+ 176,
556
+ 799,
557
+ 383,
558
+ 816
559
+ ],
560
+ "page_idx": 3
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "4.1 DATASET FOR GENERATOR ",
565
+ "text_level": 1,
566
+ "bbox": [
567
+ 176,
568
+ 832,
569
+ 401,
570
+ 847
571
+ ],
572
+ "page_idx": 3
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "For the generator, we synthesize a large amount of samples, each of length $n$ . We would like to capture both the randomness and the smoothness of human writing, thus it is natural to incorporate chaos, most notably, the motion of three-body (Nielsen et al., 2001). ",
577
+ "bbox": [
578
+ 176,
579
+ 858,
580
+ 825,
581
+ 900
582
+ ],
583
+ "page_idx": 3
584
+ },
585
+ {
586
+ "type": "image",
587
+ "img_path": "images/c225ea23a10e81fccc5bb5ac12beaf88d3dd4a4380938ca733214e6a03ea550a.jpg",
588
+ "image_caption": [
589
+ "Figure 3: Illustration of how a stroke is rendered. "
590
+ ],
591
+ "image_footnote": [],
592
+ "bbox": [
593
+ 181,
594
+ 99,
595
+ 488,
596
+ 222
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "image",
602
+ "img_path": "images/ba005ed854b84d3c2a3e3ee6f1ad177c538f73860517a0f464ae80d613871d54.jpg",
603
+ "image_caption": [
604
+ "Figure 4: Images from our three-body dataset. "
605
+ ],
606
+ "image_footnote": [],
607
+ "bbox": [
608
+ 524,
609
+ 101,
610
+ 831,
611
+ 246
612
+ ],
613
+ "page_idx": 4
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "There is no closed-form solution to three-body problem, and error accumulates in simulation using numerical methods, leading to unpredictable and chaotic results. We simulate three-body motion in space $\\mathbf { Z }$ -component for pressure) with random initial conditions and sample the trajectories as strokes for our dataset. The simulation is done with a set of equations using Newton’s universal law of gravitation: ",
618
+ "bbox": [
619
+ 174,
620
+ 289,
621
+ 825,
622
+ 359
623
+ ],
624
+ "page_idx": 4
625
+ },
626
+ {
627
+ "type": "equation",
628
+ "img_path": "images/55d0f33075fc7e1319ed4edb76d5ba47b60cc87af4c91fce599014a09ea5f6f7.jpg",
629
+ "text": "$$\n\\begin{array} { r } { \\left\\{ \\\\begin{array} { l l } { \\vec { F _ { 1 } } = \\frac { G m _ { 1 } m _ { 2 } } { \\| P _ { 2 } - P _ { 1 } \\| _ { 2 } ^ { 3 } } ( P _ { 2 } - P _ { 1 } ) + \\frac { G m _ { 1 } m _ { 3 } } { \\| P _ { 3 } - P _ { 1 } \\| _ { 2 } ^ { 3 } } ( P _ { 3 } - P _ { 1 } ) } \\\\ { \\vec { F _ { 2 } } = \\frac { G m _ { 1 } m _ { 2 } } { \\| P _ { 1 } - P _ { 2 } \\| _ { 2 } ^ { 3 } } ( P _ { 1 } - P _ { 2 } ) + \\frac { G m _ { 2 } m _ { 3 } } { \\| P _ { 3 } - P _ { 2 } \\| _ { 2 } ^ { 3 } } ( P _ { 3 } - P _ { 2 } ) , } \\\\ { \\vec { F _ { 3 } } = \\frac { G m _ { 1 } m _ { 3 } } { \\| P _ { 1 } - P _ { 3 } \\| _ { 2 } ^ { 3 } } ( P _ { 1 } - P _ { 3 } ) + \\frac { G m _ { 2 } m _ { 3 } } { \\| P _ { 2 } - P _ { 3 } \\| _ { 2 } ^ { 3 } } ( P _ { 2 } - P _ { 3 } ) } \\end{array} \\right. } \\end{array}\n$$",
630
+ "text_format": "latex",
631
+ "bbox": [
632
+ 325,
633
+ 363,
634
+ 674,
635
+ 429
636
+ ],
637
+ "page_idx": 4
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "where $P _ { i } ( i = 1 , 2 , 3$ , $\\qquad P _ { i } \\in \\mathbb { R } ^ { 3 } .$ ) denotes the position of the three objects respectively, $\\vec { F _ { i } }$ denotes the gravitational force exerted on the $i$ th object. In our simulation we set mass $m _ { 1 } = m _ { 2 } = m _ { 3 } = 1$ and gravitational constant $G = 5 \\times 1 0 ^ { - 5 }$ . We also always keep our camera (origin point) at the center of the triangle formed by the three objects to maintain relatively stable “footage”. ",
642
+ "bbox": [
643
+ 174,
644
+ 434,
645
+ 825,
646
+ 492
647
+ ],
648
+ "page_idx": 4
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Using this method we collected about 600K images since there is virtually no cost to generate samples. Samples from the dataset are shown in Figure 4. ",
653
+ "bbox": [
654
+ 174,
655
+ 497,
656
+ 823,
657
+ 526
658
+ ],
659
+ "page_idx": 4
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "4.2 DATASETS FOR AGENT ",
664
+ "text_level": 1,
665
+ "bbox": [
666
+ 174,
667
+ 542,
668
+ 372,
669
+ 558
670
+ ],
671
+ "page_idx": 4
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "To prove the effectivess of our neural environment, we trained an agent to perform drawing task on several popular datasets, from characters to drawings, with the generator part frozen. For MNIST and Omniglot, we trained an agent to draw the characters within one stroke. We later trained the recurrent StrokeNet on more complex datasets like QuickDraw and KanjiVG (Ofusa et al., 2017). We resized all the input images to $2 5 6 \\times 2 5 6$ with anti-alias and paddings. ",
676
+ "bbox": [
677
+ 174,
678
+ 569,
679
+ 825,
680
+ 638
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "4.3 TRAINING METHODOLOGY ",
687
+ "text_level": 1,
688
+ "bbox": [
689
+ 176,
690
+ 655,
691
+ 401,
692
+ 670
693
+ ],
694
+ "page_idx": 4
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "At first we train the position encoder guided by function pos that maps a coordinate to a $6 4 \\times 6 4$ matrix with $l ^ { 2 }$ distance to measure the loss. Next we freeze the position encoder and train the other parts of the generator, again with $l ^ { 2 }$ loss to measure the performance on the three-body dataset. It can be found that smaller batch size results in more accurate images. We trained the generator with a batch size of 64 until the loss no longer improves. We then set the batch size to 32 to sharpen the neural network. ",
699
+ "bbox": [
700
+ 173,
701
+ 681,
702
+ 825,
703
+ 765
704
+ ],
705
+ "page_idx": 4
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "To train the agent, we freeze the generator. Denote the agent loss as $\\boldsymbol { l } _ { a g e n t }$ , the generated image and ground-truth image as $i _ { g e n }$ and $i _ { g t }$ respectively, the loss is defined as: ",
710
+ "bbox": [
711
+ 173,
712
+ 771,
713
+ 823,
714
+ 801
715
+ ],
716
+ "page_idx": 4
717
+ },
718
+ {
719
+ "type": "equation",
720
+ "img_path": "images/bd7ac006442084af2ca3a9be2fe4440769f067883a0e1ff4e66a21e9e75a978d.jpg",
721
+ "text": "$$\nl _ { a g e n t } = \\left\\| i _ { g e n } - i _ { g t } \\right\\| _ { 2 } ^ { 2 } + \\frac { \\lambda } { n - 1 } \\sum _ { k = 1 } ^ { n - 1 } \\left\\| P _ { k } - P _ { k + 1 } \\right\\| _ { 2 } ^ { 2 } ,\n$$",
722
+ "text_format": "latex",
723
+ "bbox": [
724
+ 323,
725
+ 805,
726
+ 673,
727
+ 848
728
+ ],
729
+ "page_idx": 4
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "where $P _ { k } = [ x _ { k } , y _ { k } , p _ { k } ] ^ { T }$ is the data describing the $k$ th anchor point on the stroke. Here the summation term constrains the average distance between neighbouring points, where $\\lambda$ denotes the penalty strength. If we drop this term, the agent fails to learn the correct order of the points in a stroke because the generator itself is, after all, not robust to all cases of input, and is very likely to produce wrong results for sequences with large gaps between neighbouring points. ",
734
+ "bbox": [
735
+ 174,
736
+ 853,
737
+ 823,
738
+ 924
739
+ ],
740
+ "page_idx": 4
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "5 EXPERIMENTS ",
745
+ "text_level": 1,
746
+ "bbox": [
747
+ 176,
748
+ 102,
749
+ 326,
750
+ 117
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "All experiments are conducted on a single NVIDIA Tesla P40 GPU. We first experimented with single step StrokeNet on MNIST and Omniglot, then we experimented recurrent StrokeNet with QuickDraw and Kanji. For the MNIST dataset, we later enforced a Gaussian prior to the latent variable and explored the latent space of the agent by linear interpolation. Finally, for a quantitative evaluation of the model, we trained a classifier on MNIST, and tested the classifier with images generated by the agent. The close accuracies indicate the quality of the generated images. ",
757
+ "bbox": [
758
+ 174,
759
+ 133,
760
+ 825,
761
+ 217
762
+ ],
763
+ "page_idx": 5
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "5.1 SINGLE-STEP STROKENET",
768
+ "text_level": 1,
769
+ "bbox": [
770
+ 176,
771
+ 234,
772
+ 400,
773
+ 248
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "It can be seen that a single stroke provides rich expressive power for different shapes. The generator generalizes well to unseen stroke patterns other than the synthesized three-body dataset. On the Omniglot dataset, since many characters consist of multiple strokes while the agent can only draw one, the agent tries to capture the contour of the character. ",
780
+ "bbox": [
781
+ 174,
782
+ 261,
783
+ 825,
784
+ 315
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "image",
790
+ "img_path": "images/fda5720d46cc52464b46743c9dc970b8d18a8f078a4ae084fafe70b19c4123c0.jpg",
791
+ "image_caption": [
792
+ "Figure 5: Agent trained on MNIST. MNIST sample (left), generator output (middle), WebApp reconstruction (right). 1.5 epochs. "
793
+ ],
794
+ "image_footnote": [],
795
+ "bbox": [
796
+ 217,
797
+ 330,
798
+ 455,
799
+ 512
800
+ ],
801
+ "page_idx": 5
802
+ },
803
+ {
804
+ "type": "image",
805
+ "img_path": "images/e51f6aa6863d062961ab788f55e2115111bed60f9704e81160eb899861150adf.jpg",
806
+ "image_caption": [
807
+ "Figure 6: Agent trained on Omniglot dataset learns to “sketch” the characters. Layout is the same as Figure 5. $1 0 ^ { 4 }$ iterations. "
808
+ ],
809
+ "image_footnote": [],
810
+ "bbox": [
811
+ 558,
812
+ 330,
813
+ 797,
814
+ 512
815
+ ],
816
+ "page_idx": 5
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "5.2 RECURRENT-STEP STROKENET",
821
+ "text_level": 1,
822
+ "bbox": [
823
+ 176,
824
+ 602,
825
+ 431,
826
+ 616
827
+ ],
828
+ "page_idx": 5
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "For more complex datasets, multiple steps of strokes are needed. Again the agent does pretty well to capture the contour of the given image. However, it seems that the agent has trouble to recover the details of the pictures, and tends to smear inside the boundaries with thick strokes. ",
833
+ "bbox": [
834
+ 173,
835
+ 627,
836
+ 826,
837
+ 670
838
+ ],
839
+ "page_idx": 5
840
+ },
841
+ {
842
+ "type": "image",
843
+ "img_path": "images/5877850f6a696278032a065d087f4fa24a19d79aa23f47b2aa9c496d94e89f59.jpg",
844
+ "image_caption": [
845
+ "Figure 7: Agent trained on QuickDraw. Sample (left), reconstruction (right). 6 recurrent steps. 300K-image subset, 5 epochs, $1 0 ^ { 5 }$ iterations. "
846
+ ],
847
+ "image_footnote": [],
848
+ "bbox": [
849
+ 217,
850
+ 675,
851
+ 455,
852
+ 858
853
+ ],
854
+ "page_idx": 5
855
+ },
856
+ {
857
+ "type": "image",
858
+ "img_path": "images/6a2983fb32a44cb93b90d7dbcbefe6d6e236b400196c2e700f733b5896bd0c71.jpg",
859
+ "image_caption": [
860
+ "Figure 8: Agent trained on KanjiVG dataset. Evaluated on a test-set of simple characters. $1 0 ^ { 5 }$ iterations. 8 recurrent steps. "
861
+ ],
862
+ "image_footnote": [],
863
+ "bbox": [
864
+ 560,
865
+ 675,
866
+ 797,
867
+ 858
868
+ ],
869
+ "page_idx": 5
870
+ },
871
+ {
872
+ "type": "image",
873
+ "img_path": "images/12adc89fd98d0d6e7695b08f1fd72cd6beb3a85dd40b057fdaee4f3d9f3534d9.jpg",
874
+ "image_caption": [
875
+ "Figure 9: Latent space interpolation. Leftmost and rightmost columns are images from MNIST dataset. Middles are the rendered images with interpolation factors varying from 0 to 1. "
876
+ ],
877
+ "image_footnote": [],
878
+ "bbox": [
879
+ 181,
880
+ 98,
881
+ 493,
882
+ 267
883
+ ],
884
+ "page_idx": 6
885
+ },
886
+ {
887
+ "type": "image",
888
+ "img_path": "images/593fc981486363436c5a296bd938a3f0cc0ade15f69f2a64e2e0f35d38ab5059.jpg",
889
+ "image_caption": [
890
+ "Figure 10: Latent space arithmetics. (a) and (b) demonstrate different attributes of the digits. "
891
+ ],
892
+ "image_footnote": [],
893
+ "bbox": [
894
+ 524,
895
+ 103,
896
+ 831,
897
+ 286
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "5.3 LATENT SPACE EXPLORATION ",
904
+ "text_level": 1,
905
+ "bbox": [
906
+ 176,
907
+ 349,
908
+ 423,
909
+ 364
910
+ ],
911
+ "page_idx": 6
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "To convert the agent into a latent space generative model, we experimented with the VAE version of the agent, where the feature obtained from the last layer of CNN is projected into two vectors representing the means $\\mu$ and standard deviations (activated by softplus) $\\sigma$ , both of 1024 dimensions. A vector noise of i.i.d. Gaussian $U \\sim N ( 0 , I )$ is sampled, latent variable $z$ is given by ",
916
+ "bbox": [
917
+ 174,
918
+ 376,
919
+ 823,
920
+ 433
921
+ ],
922
+ "page_idx": 6
923
+ },
924
+ {
925
+ "type": "equation",
926
+ "img_path": "images/58ac904b17dfb6b9dfc15ba2f1714e4cba22987cb55f76e17797f5e7eebd4070.jpg",
927
+ "text": "$$\nz = \\mu + \\sigma \\odot U .\n$$",
928
+ "text_format": "latex",
929
+ "bbox": [
930
+ 444,
931
+ 439,
932
+ 553,
933
+ 454
934
+ ],
935
+ "page_idx": 6
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "We did latent space interpolation with the agent trained on MNIST. The simple data led to easily interpretable results. Since the images are generated by strokes, the digits transform smoothly to one another. That is to say, the results looked as if we were directly interpolating the stroke data. Results are shown in Figure 9 and 10. ",
940
+ "bbox": [
941
+ 174,
942
+ 460,
943
+ 825,
944
+ 517
945
+ ],
946
+ "page_idx": 6
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "5.4 PERFORMANCE EVALUATION ",
951
+ "text_level": 1,
952
+ "bbox": [
953
+ 176,
954
+ 534,
955
+ 416,
956
+ 547
957
+ ],
958
+ "page_idx": 6
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "In order to evaluate the agent, we trained a 5-layer CNN classifier solely on pre-processed MNIST dataset, which is also the input to the MNIST agent. The size of the image is $2 5 6 \\times 2 5 6$ , so there is some performance drop to the classification task compared to standard $2 8 \\times 2 8$ images. The classifier is then used to evaluate the paired test-set image generated by the agent. The accuracies reflect the quality of the generated images. We also compared the $l ^ { 2 }$ loss with SPIRAL on MNIST to illustrate that our method has the advantage of faster convergence over reinforcement learning approaches, shown in Figure 11. ",
963
+ "bbox": [
964
+ 173,
965
+ 559,
966
+ 826,
967
+ 657
968
+ ],
969
+ "page_idx": 6
970
+ },
971
+ {
972
+ "type": "table",
973
+ "img_path": "images/2ff9c093b643afca8ef2c1e3f88855bcf31afbd13dd1528e6247eae8019aba54.jpg",
974
+ "table_caption": [
975
+ "Table 1: MNIST Classification Accuracies "
976
+ ],
977
+ "table_footnote": [],
978
+ "table_body": "<table><tr><td>TESTDATA</td><td>ACCURACY</td></tr><tr><td></td><td></td></tr><tr><td>Pre-processed images</td><td>90.82%</td></tr><tr><td>Agent Output (3 steps)</td><td>88.43%</td></tr><tr><td>Agent Output (1 step)</td><td>79.33%</td></tr><tr><td>Agent Output (1 step, VAE)</td><td>67.21%</td></tr></table>",
979
+ "bbox": [
980
+ 184,
981
+ 728,
982
+ 493,
983
+ 818
984
+ ],
985
+ "page_idx": 6
986
+ },
987
+ {
988
+ "type": "image",
989
+ "img_path": "images/3393c1316e650209fdaeb85ab62a718088c1ada207a2377867aa89e7b8a81c48.jpg",
990
+ "image_caption": [
991
+ "Figure 11: Comparison of loss curves between StrokeNet (ours) and SPIRAL. "
992
+ ],
993
+ "image_footnote": [],
994
+ "bbox": [
995
+ 524,
996
+ 676,
997
+ 825,
998
+ 863
999
+ ],
1000
+ "page_idx": 6
1001
+ },
1002
+ {
1003
+ "type": "image",
1004
+ "img_path": "images/4a80132369306393f978eca23cc50d9f6a07c414590dda72eeea87cdcb3a5008.jpg",
1005
+ "image_caption": [
1006
+ "Figure 12: 16-step color image reconstruction. (a) Mona Lisa. (b) Successful reconstruction includes use of different colors. (c) Fail to use different colors. "
1007
+ ],
1008
+ "image_footnote": [],
1009
+ "bbox": [
1010
+ 183,
1011
+ 137,
1012
+ 490,
1013
+ 226
1014
+ ],
1015
+ "page_idx": 7
1016
+ },
1017
+ {
1018
+ "type": "image",
1019
+ "img_path": "images/e0b0f3f62c87099c3be63048b1cf65e4a3dcc30599750b6cdfd1200ac64da07e.jpg",
1020
+ "image_caption": [
1021
+ "Figure 13: Comparison of stroke orders between human and agent. We can see the stroke order is completely chaotic compared to natural order. "
1022
+ ],
1023
+ "image_footnote": [],
1024
+ "bbox": [
1025
+ 566,
1026
+ 102,
1027
+ 790,
1028
+ 273
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "6 DISCUSSION ",
1035
+ "text_level": 1,
1036
+ "bbox": [
1037
+ 174,
1038
+ 344,
1039
+ 310,
1040
+ 361
1041
+ ],
1042
+ "page_idx": 7
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "For future work, there are several major improvements we want to make both to the network structure and to the algorithm. ",
1047
+ "bbox": [
1048
+ 173,
1049
+ 377,
1050
+ 823,
1051
+ 405
1052
+ ],
1053
+ "page_idx": 7
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "The recurrent structure adopted here is of the simplest form. We use this setup because we consider drawing as a Markov process, where the current action only depends on what the agent sees, the target image and the previous frame. More advanced structures like LSTM (Hochreiter & Schmidhuber, 1997) or GRU (Chung et al., 2014) may boost the performance. A stop sign can be also introduced to determine when to stop drawing, which can be useful in character reconstruction. For the agent, various attention mechanism could be incorporated to help the agent focus on undrawn regions, so that smear and blurry scribbles might be prevented. ",
1058
+ "bbox": [
1059
+ 174,
1060
+ 412,
1061
+ 825,
1062
+ 510
1063
+ ],
1064
+ "page_idx": 7
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Secondly, The generator and the agent were trained as two separate parts throughout the experiment. We can somehow train them as a whole: during the training of the agent, store all the intermediate stroke data. After a period of training, sample images from the real environment with the stroke data just collected, and train the generator with the data. By doing so in an iterative manner, the generator could fit better to the current agent and provide more reliable reconstructions, while a changing generator may potentially provide more valuable overall gradients. ",
1069
+ "bbox": [
1070
+ 174,
1071
+ 517,
1072
+ 825,
1073
+ 601
1074
+ ],
1075
+ "page_idx": 7
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "It is also found useful to add a bit of randomness to the learning rate. Since different decoders of the agent learn at different rates, stochasticity results in more appealing results. For example, the agent usually fails to generalize to color images because it always sticks with one global average color (as shown in Figure 12). However, it sometimes generates appealing results with some randomness added during the training. As a result of this immobility, the way agent writes is dull compared to humans and reinforcement learning agents like SPIRAL. For instance, when writing the digit “8”, the agent is simply writing “3” with endpoints closed. Also, the agent avoids to make intersecting strokes over all datasets, although such actions are harmless and should be totally encouraged and explored! Thus, random sampling techniques could be added to the decision making process to encourage bolder moves. Finally, for the evaluation metrics, the naive $l ^ { 2 }$ loss can be combined with adversarial learning. If paired sequential data is available, we believe adding it to training will also improve the results. ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 607,
1083
+ 825,
1084
+ 773
1085
+ ],
1086
+ "page_idx": 7
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "7 CONCLUSION ",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 176,
1094
+ 795,
1095
+ 318,
1096
+ 810
1097
+ ],
1098
+ "page_idx": 7
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "In this paper we bring a proof-of-concept that an agent is able to learn from its neural simulation of an environment. Especially when the environment is deterministic given the action, or contains a huge action space, the proposed approach could be useful. Our primary contribution is that we devised a model-based method to approximate non-differentiable environment with neural network, and the agent trained with our method converges quickly on several datasets. It is able to adapt its skills to real world. Hopefully such approaches can be useful when dealing with more difficult reinforcement learning problems. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 827,
1106
+ 825,
1107
+ 924
1108
+ ],
1109
+ "page_idx": 7
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "ACKNOWLEDGEMENTS ",
1114
+ "text_level": 1,
1115
+ "bbox": [
1116
+ 176,
1117
+ 103,
1118
+ 367,
1119
+ 117
1120
+ ],
1121
+ "page_idx": 8
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "This work was partially supported by the National Natural Science Foundation of China (U1711262, U1811264, 11501204). We thank our anonymous reviewers for their valuable feedback and opinions. ",
1126
+ "bbox": [
1127
+ 174,
1128
+ 132,
1129
+ 825,
1130
+ 175
1131
+ ],
1132
+ "page_idx": 8
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "REFERENCES ",
1137
+ "text_level": 1,
1138
+ "bbox": [
1139
+ 176,
1140
+ 196,
1141
+ 287,
1142
+ 210
1143
+ ],
1144
+ "page_idx": 8
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. ´ In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 214–223, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. ",
1149
+ "bbox": [
1150
+ 173,
1151
+ 219,
1152
+ 825,
1153
+ 276
1154
+ ],
1155
+ "page_idx": 8
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "Phillip J. Barry and Ronald N. Goldman. A recursive evaluation algorithm for a class of catmullrom splines. SIGGRAPH Comput. Graph., 22(4):199–204, June 1988. ISSN 0097-8930. doi: 10.1145/378456.378511. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 284,
1163
+ 821,
1164
+ 327
1165
+ ],
1166
+ "page_idx": 8
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "Edwin Catmull and Raphael Rom. A class of local interpolating splines. Computer Aided Geometric Design, pp. 317–326, 1974. ",
1171
+ "bbox": [
1172
+ 173,
1173
+ 334,
1174
+ 821,
1175
+ 364
1176
+ ],
1177
+ "page_idx": 8
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "Junyoung Chung, C¸ aglar Gulc¸ehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of ¨ gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. ",
1182
+ "bbox": [
1183
+ 173,
1184
+ 372,
1185
+ 823,
1186
+ 401
1187
+ ],
1188
+ "page_idx": 8
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Yaroslav Ganin, Tejas Kulkarni, Igor Babuschkin, S. M. Ali Eslami, and Oriol Vinyals. Synthesizing programs for images using reinforced adversarial learning. CoRR, abs/1804.01118, 2018. ",
1193
+ "bbox": [
1194
+ 173,
1195
+ 410,
1196
+ 825,
1197
+ 439
1198
+ ],
1199
+ "page_idx": 8
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 2672–2680. Curran Associates, Inc., 2014. ",
1204
+ "bbox": [
1205
+ 173,
1206
+ 446,
1207
+ 825,
1208
+ 505
1209
+ ],
1210
+ "page_idx": 8
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Alex Graves. Generating sequences with recurrent neural networks. CoRR, abs/1308.0850, 2013. ",
1215
+ "bbox": [
1216
+ 173,
1217
+ 512,
1218
+ 810,
1219
+ 527
1220
+ ],
1221
+ "page_idx": 8
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "David Ha and Douglas Eck. A neural representation of sketch drawings. CoRR, abs/1704.03477, 2017. ",
1226
+ "bbox": [
1227
+ 174,
1228
+ 535,
1229
+ 821,
1230
+ 565
1231
+ ],
1232
+ "page_idx": 8
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "David Ha and Jurgen Schmidhuber. World models. ¨ CoRR, abs/1803.10122, 2018. ",
1237
+ "bbox": [
1238
+ 176,
1239
+ 571,
1240
+ 712,
1241
+ 588
1242
+ ],
1243
+ "page_idx": 8
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "Aaron Hertzmann. A survey of stroke-based rendering. IEEE Computer Graphics and Applications, 23:70–81, 2003. ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 595,
1251
+ 820,
1252
+ 626
1253
+ ],
1254
+ "page_idx": 8
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1259
+ "bbox": [
1260
+ 173,
1261
+ 633,
1262
+ 823,
1263
+ 662
1264
+ ],
1265
+ "page_idx": 8
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Zhewei Huang, Wen Heng, Yuanzheng Tao, and Shuchang Zhou. Stroke-based character reconstruction. arXiv preprint arXiv:1806.08990, 2018. ",
1270
+ "bbox": [
1271
+ 173,
1272
+ 671,
1273
+ 823,
1274
+ 700
1275
+ ],
1276
+ "page_idx": 8
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR, abs/1502.03167, 2015. ",
1281
+ "bbox": [
1282
+ 174,
1283
+ 708,
1284
+ 823,
1285
+ 738
1286
+ ],
1287
+ "page_idx": 8
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. CoRR, abs/1312.6114, 2013. ",
1292
+ "bbox": [
1293
+ 173,
1294
+ 746,
1295
+ 823,
1296
+ 775
1297
+ ],
1298
+ "page_idx": 8
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 2015. ",
1303
+ "bbox": [
1304
+ 173,
1305
+ 784,
1306
+ 823,
1307
+ 813
1308
+ ],
1309
+ "page_idx": 8
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. ",
1314
+ "bbox": [
1315
+ 173,
1316
+ 820,
1317
+ 674,
1318
+ 835
1319
+ ],
1320
+ "page_idx": 8
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Matthew M. Loper and Michael J. Black. OpenDR: An approximate differentiable renderer. In Computer Vision – ECCV 2014, volume 8695 of Lecture Notes in Computer Science, pp. 154– 169. Springer International Publishing, September 2014. ",
1325
+ "bbox": [
1326
+ 176,
1327
+ 843,
1328
+ 823,
1329
+ 887
1330
+ ],
1331
+ "page_idx": 8
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. ",
1336
+ "bbox": [
1337
+ 174,
1338
+ 895,
1339
+ 823,
1340
+ 924
1341
+ ],
1342
+ "page_idx": 8
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "Thu Nguyen-Phuoc, Chuan Li, Stephen Balaban, and Yong-Liang Yang. Rendernet: A deep convolutional network for differentiable rendering from 3d shapes. arXiv preprint arXiv, abs/1806.06575, 2018. ",
1347
+ "bbox": [
1348
+ 173,
1349
+ 103,
1350
+ 823,
1351
+ 146
1352
+ ],
1353
+ "page_idx": 9
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "E. Nielsen, D.V. Fedorov, A.S. Jensen, and E. Garrido. The three-body problem with short-range interactions. Physics Reports, 347(5):373 – 459, 2001. ISSN 0370-1573. doi: https://doi.org/10. 1016/S0370-1573(00)00107-1. ",
1358
+ "bbox": [
1359
+ 179,
1360
+ 155,
1361
+ 823,
1362
+ 196
1363
+ ],
1364
+ "page_idx": 9
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "Kenichiro Ofusa, Tomo Miyazaki, Yoshihiro Sugaya, and Shinichiro Omachi. Glyph-based data augmentation for accurate kanji character recognition. In 14th IAPR International Conference on Document Analysis and Recognition, ICDAR 2017, Kyoto, Japan, November 9-15, 2017, pp. 597–602. IEEE, 2017. ISBN 978-1-5386-3586-5. doi: https://doi.org/10.1109/ICDAR.2017.103. ",
1369
+ "bbox": [
1370
+ 173,
1371
+ 207,
1372
+ 825,
1373
+ 263
1374
+ ],
1375
+ "page_idx": 9
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015. ",
1380
+ "bbox": [
1381
+ 173,
1382
+ 272,
1383
+ 823,
1384
+ 301
1385
+ ],
1386
+ "page_idx": 9
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "Jurgen Schmidhuber. Making the world differentiable: On using self-supervised fully recurrent ¨ neural networks for dynamic reinforcement learning and planning in non-stationary environments. Technical report, 1990. ",
1391
+ "bbox": [
1392
+ 174,
1393
+ 309,
1394
+ 825,
1395
+ 352
1396
+ ],
1397
+ "page_idx": 9
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "Jurgen Schmidhuber. One big net for everything. ¨ CoRR, abs/1802.08864, 2018. ",
1402
+ "bbox": [
1403
+ 173,
1404
+ 361,
1405
+ 697,
1406
+ 376
1407
+ ],
1408
+ "page_idx": 9
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "Thomas W. Sederberg and Rida T. Farouki. Approximation by interval bezier curves. IEEE Computer Graphics and Applications, 12(5):87–95, 1992. doi: http://doi.ieeecomputersociety.org/10. 1109/38.156018. ",
1413
+ "bbox": [
1414
+ 174,
1415
+ 385,
1416
+ 825,
1417
+ 428
1418
+ ],
1419
+ "page_idx": 9
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. ",
1424
+ "bbox": [
1425
+ 173,
1426
+ 436,
1427
+ 823,
1428
+ 465
1429
+ ],
1430
+ "page_idx": 9
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 3483–3491. Curran Associates, Inc., 2015. ",
1435
+ "bbox": [
1436
+ 173,
1437
+ 474,
1438
+ 825,
1439
+ 531
1440
+ ],
1441
+ "page_idx": 9
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "Ning Xie, Hirotaka Hachiya, and Masashi Sugiyama. Artist agent: A reinforcement learning approach to automatic stroke generation in oriental ink painting. CoRR, abs/1206.4634, 2012. ",
1446
+ "bbox": [
1447
+ 171,
1448
+ 540,
1449
+ 823,
1450
+ 569
1451
+ ],
1452
+ "page_idx": 9
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "Bing Xu, Naiyan Wang, Tianqi Chen, and Mu Li. Empirical evaluation of rectified activations in convolutional network. CoRR, abs/1505.00853, 2015. ",
1457
+ "bbox": [
1458
+ 171,
1459
+ 577,
1460
+ 823,
1461
+ 607
1462
+ ],
1463
+ "page_idx": 9
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "8 APPENDIX ",
1468
+ "text_level": 1,
1469
+ "bbox": [
1470
+ 174,
1471
+ 102,
1472
+ 294,
1473
+ 118
1474
+ ],
1475
+ "page_idx": 10
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "8.1 ENVIRONMENT DETAILS ",
1480
+ "text_level": 1,
1481
+ "bbox": [
1482
+ 174,
1483
+ 133,
1484
+ 387,
1485
+ 148
1486
+ ],
1487
+ "page_idx": 10
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Let $P _ { i } = [ x _ { i } , y _ { i } ] ^ { T }$ denote the coordinate of a sampled point. For a curve defined by points $P _ { 0 } , P _ { 1 } , P _ { 2 } , P _ { 3 }$ , the spline can be produced by: ",
1492
+ "bbox": [
1493
+ 173,
1494
+ 159,
1495
+ 825,
1496
+ 189
1497
+ ],
1498
+ "page_idx": 10
1499
+ },
1500
+ {
1501
+ "type": "equation",
1502
+ "img_path": "images/40b22a0ad601377a1ce1e611194332e0a89f564a58c33a04e379d5c89fec841e.jpg",
1503
+ "text": "$$\nC = \\frac { t _ { 2 } - t } { t _ { 2 } - t _ { 1 } } B _ { 1 } + \\frac { t - t _ { 1 } } { t _ { 2 } - t _ { 1 } } B _ { 2 } ,\n$$",
1504
+ "text_format": "latex",
1505
+ "bbox": [
1506
+ 397,
1507
+ 204,
1508
+ 599,
1509
+ 236
1510
+ ],
1511
+ "page_idx": 10
1512
+ },
1513
+ {
1514
+ "type": "text",
1515
+ "text": "where ",
1516
+ "bbox": [
1517
+ 173,
1518
+ 238,
1519
+ 217,
1520
+ 252
1521
+ ],
1522
+ "page_idx": 10
1523
+ },
1524
+ {
1525
+ "type": "equation",
1526
+ "img_path": "images/b558e893981f87fa96e3a405f141ba3ff4246cbec97db62af7c5c9f55d69fe38.jpg",
1527
+ "text": "$$\n{ \\begin{array} { r l } & { B _ { 1 } = { \\frac { t _ { 2 } - t } { t _ { 2 } - t _ { 0 } } } A _ { 1 } + { \\frac { t - t _ { 0 } } { t _ { 2 } - t _ { 0 } } } A _ { 2 } , \\quad B _ { 2 } = { \\frac { t _ { 3 } - t } { t _ { 3 } - t _ { 1 } } } A _ { 2 } + { \\frac { t - t _ { 1 } } { t _ { 3 } - t _ { 1 } } } A _ { 3 } , } \\\\ & { A _ { 1 } = { \\frac { t _ { 1 } - t } { t _ { 1 } - t _ { 0 } } } P _ { 0 } + { \\frac { t - t _ { 0 } } { t _ { 1 } - t _ { 0 } } } P _ { 1 } , \\quad A _ { 2 } = { \\frac { t _ { 2 } - t } { t _ { 2 } - t _ { 1 } } } P _ { 1 } + { \\frac { t - t _ { 1 } } { t _ { 2 } - t _ { 1 } } } P _ { 2 } , } \\\\ & { A _ { 3 } = { \\frac { t _ { 3 } - t } { t _ { 3 } - t _ { 2 } } } P _ { 2 } + { \\frac { t - t _ { 2 } } { t _ { 3 } - t _ { 2 } } } P _ { 3 } , \\quad t _ { i + 1 } = { \\Vert } P _ { i + 1 } - P { i } { \\Vert } _ { 2 } ^ { \\alpha } + t _ { i } . } \\end{array} }\n$$",
1528
+ "text_format": "latex",
1529
+ "bbox": [
1530
+ 281,
1531
+ 246,
1532
+ 714,
1533
+ 344
1534
+ ],
1535
+ "page_idx": 10
1536
+ },
1537
+ {
1538
+ "type": "text",
1539
+ "text": "with $\\alpha = 0 . 5$ , $t _ { 0 } = 0$ and $i = { 0 , 1 , 2 , 3 }$ ",
1540
+ "bbox": [
1541
+ 207,
1542
+ 352,
1543
+ 460,
1544
+ 367
1545
+ ],
1546
+ "page_idx": 10
1547
+ },
1548
+ {
1549
+ "type": "text",
1550
+ "text": "By interpolating $t$ from $t _ { 1 }$ to $t _ { 2 }$ linearly, we generate the curve between $P _ { 1 }$ and $P _ { 2 }$ . The pressure values between neighbouring points are interpolated linearly. ",
1551
+ "bbox": [
1552
+ 173,
1553
+ 373,
1554
+ 825,
1555
+ 401
1556
+ ],
1557
+ "page_idx": 10
1558
+ },
1559
+ {
1560
+ "type": "text",
1561
+ "text": "8.2 LOSSES ",
1562
+ "text_level": 1,
1563
+ "bbox": [
1564
+ 173,
1565
+ 419,
1566
+ 269,
1567
+ 433
1568
+ ],
1569
+ "page_idx": 10
1570
+ },
1571
+ {
1572
+ "type": "image",
1573
+ "img_path": "images/51e22126b3933d20d8956c3997ec5ea365d386f3d94ee0e1646b2ef1103bf225.jpg",
1574
+ "image_caption": [
1575
+ "(a) Loss of encoder when trained separately at first. (b) Loss of generator trained on our 600K dataset. "
1576
+ ],
1577
+ "image_footnote": [],
1578
+ "bbox": [
1579
+ 196,
1580
+ 462,
1581
+ 797,
1582
+ 613
1583
+ ],
1584
+ "page_idx": 10
1585
+ },
1586
+ {
1587
+ "type": "image",
1588
+ "img_path": "images/918c6afe99629ee0b28104d8a9108c9698ad147b66336844239de69be60b6761.jpg",
1589
+ "image_caption": [
1590
+ "Figure 14: Training loss of generator and agent. The agent loss equals to the $l ^ { 2 }$ distance between the generator output and agent input plus the penalty term constraining the average point distance within a stroke. For (c) and (d) the learning rate is set to $1 0 ^ { - 4 }$ , batch size equals to 64. "
1591
+ ],
1592
+ "image_footnote": [],
1593
+ "bbox": [
1594
+ 196,
1595
+ 647,
1596
+ 800,
1597
+ 815
1598
+ ],
1599
+ "page_idx": 10
1600
+ },
1601
+ {
1602
+ "type": "image",
1603
+ "img_path": "images/fbf03a0ebb808615c2b8f5fdff2ad1c44f0dce152416ea929956926aaaba3b35.jpg",
1604
+ "image_caption": [
1605
+ "Figure 15: A trained StrokeNet generates images that resemble the output of painting software. The first row depicts results generated by our model (left) and by the software (right) given the same input. The second row shows the model could produce strokes with color and texture using simple arithmetic operations. The third and fourth row shows the model’s ability to draw MNIST digits (left) on both its own generative model (middle) and real-world painting software (right). "
1606
+ ],
1607
+ "image_footnote": [],
1608
+ "bbox": [
1609
+ 184,
1610
+ 133,
1611
+ 490,
1612
+ 292
1613
+ ],
1614
+ "page_idx": 11
1615
+ },
1616
+ {
1617
+ "type": "image",
1618
+ "img_path": "images/ea7e6900d0585b611e13695dbd8d6dd019e443c57b0b9d67df8d74b05e118cf3.jpg",
1619
+ "image_caption": [
1620
+ "Figure 16: (a) A trained position encoder maps two $( x _ { i } , y _ { i } , p _ { i } )$ tuples to two feature maps. (b) Each pair of neighbouring features are added together to eliminate sparsity and preserve sequential information. (c) A trained brush encoder encodes color and radius information into a spatial feature which is later concatenated to the end of position features. "
1621
+ ],
1622
+ "image_footnote": [],
1623
+ "bbox": [
1624
+ 566,
1625
+ 137,
1626
+ 789,
1627
+ 291
1628
+ ],
1629
+ "page_idx": 11
1630
+ },
1631
+ {
1632
+ "type": "image",
1633
+ "img_path": "images/efa474886deb1f2b0d27a17f8d9eb62f73e171b17f3ef63af211a6a6ebb42bf2.jpg",
1634
+ "image_caption": [
1635
+ "Figure 17: The generator tries to predict what the real environment would ouput given the same input stroke data. Software output (left), generator prediction (right). "
1636
+ ],
1637
+ "image_footnote": [],
1638
+ "bbox": [
1639
+ 183,
1640
+ 474,
1641
+ 490,
1642
+ 710
1643
+ ],
1644
+ "page_idx": 11
1645
+ },
1646
+ {
1647
+ "type": "image",
1648
+ "img_path": "images/46746c2f2c4cd0c3cc97e7b171627657bfa7857c1c7b4aced2897811ebf2906a.jpg",
1649
+ "image_caption": [
1650
+ "Figure 18: Interpolation across four digits. In the corners are the four MNIST samples. "
1651
+ ],
1652
+ "image_footnote": [],
1653
+ "bbox": [
1654
+ 524,
1655
+ 488,
1656
+ 833,
1657
+ 726
1658
+ ],
1659
+ "page_idx": 11
1660
+ }
1661
+ ]
parse/train/HJxwDiActX/HJxwDiActX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJxwDiActX/HJxwDiActX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hkg9HgBYwH/Hkg9HgBYwH.md ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ENCODING MUSICAL STYLE WITH TRANSFORMER AUTOENCODERS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We consider the problem of learning high-level controls over the global structure of sequence generation, particularly in the context of symbolic music generation with complex language models. In this work, we present the Transformer autoencoder, which aggregates encodings of the input data across time to obtain a global representation of style from a given performance. We show it is possible to combine this global embedding with other temporally distributed embeddings, enabling improved control over the separate aspects of performance style and and melody. Empirically, we demonstrate the effectiveness of our method on a variety of music generation tasks on the MAESTRO dataset and an internal dataset with $1 0 { , } 0 0 0 { + }$ hours of piano performances, where we achieve improvements in terms of log-likelihood and mean listening scores as compared to relevant baselines.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ There has been significant progress in generative modeling, particularly with respect to creative applications such as art and music (Oord et al., 2016; Engel et al., 2017b; Ha & Eck, 2017; Huang et al., 2019a; Payne, 2019). As the number of generative applications increase, it becomes increasingly important to consider how users can interact with such systems, particularly when the generative model functions as a tool in their creative process (Engel et al., 2017a; Gillick et al., 2019) To this end, we consider how one can learn high-level controls over the global structure of a generated sample. We focus on symbolic music generation, where Music Transformer (Huang et al., 2019b) is the current state-of-the-art in generating high-quality samples that span over a minute in length.
12
+
13
+ The challenge in controllable sequence generation is the fact that Transformers (Vaswani et al., 2017) and their variants excel as language models or in sequence-to-sequence tasks such as translation, but it is less clear as to how they can: (1) learn and (2) incorporate global conditioning information at inference time. This contrasts with traditional generative models for images such as the variational autoencoder (VAE) (Kingma & Welling, 2013) or generative adversarial network (GAN) (Goodfellow et al., 2014) which typically incorprate global conditioning as part of their training procedure (Sohn et al., 2015; Sønderby et al., 2016; Isola et al., 2017; Van den Oord et al., 2016).
14
+
15
+ In this work, we introduce the Transformer autoencoder, where we aggregate encodings across time to obtain a holistic representation of the performance style. We show that this learned global representation can be incorporated with other forms of structural conditioning in two ways. First, we show that given a performance, our model can generate performances that are similar in style to the provided input. Then, we explore different methods to combine melody and performance representations to harmonize a melody in the style of the given performance. In both cases, we show that combining both global and fine-scale encodings of the musical performance allows us to gain better control of generation, separately manipulating both the style and melody of the resulting sample.
16
+
17
+ Empirically, we evaluate our model on two datasets: the publicly-available MAESTRO (Hawthorne et al., 2019) dataset, and an internal dataset of piano performances transcribed from $1 0 { , } 0 0 0 { + }$ hours of audio (Anonymous for review). We find that the Transformer autoencoder is able to generate not only performances that sound similar to the input, but also accompaniments of melodies that follow a given style, as shown through both quantitative and qualitative experiments as well as a user listening study. In particular, we demonstrate that our model is capable of adapting to a particular musical style even in the case where we have one single input performance.
18
+
19
+ ![](images/bc82bd157bca56953080c77933040d21ce1a37ea33c5d67ed123aa59090ddf61.jpg)
20
+ Figure 1: A flowchart of the Transformer autoencoder. We first transcribe the .wav data files into MIDI using the Onsets and Frames framework, then encode them into performance representations to use as input. The output of the performance encoder is aggregated across time and (optionally) combined with a melody embedding to produce a representation of the entire performance, which is then used by the Transformer decoder at inference time.
21
+
22
+ # 2 PRELIMINARIES
23
+
24
+ # 2.1 DATA REPRESENTATION FOR MUSIC GENERATION
25
+
26
+ The MAESTRO (Hawthorne et al., 2019) dataset consists of over 1,100 classical piano performances, where each piece is represented as a MIDI file. The internal performance dataset consists of over 10,000 hours of piano performances transcribed from audio (Anonymous for review). In both cases, we represent music as a sequence of discrete tokens, effectively formulating the generation task as a language modeling problem. The performances are encoded using the vocabulary as described in (Oore et al., 2018), which captures expressive dynamics and timing. This performance encoding vocabulary consists of 128 note on events, 128 note off events, 100 time shift events representing time shifts in 10ms increments from $1 0 \mathrm { m s }$ to 1s, and 32 quantized velocity bins representing the velocity at which the 128 note on events were played.
27
+
28
+ # 2.2 MUSIC TRANSFORMER
29
+
30
+ We build our Transformer autoencoder from Music Transformer, a state-of-the-art generative model that is capable of generating music with long-term coherence (Huang et al., 2019b). While the original Transformer uses a self-attention mechanism that operates over absolute positional encodings of each token in a given sequence (Vaswani et al., 2017), Music Transformer replaces this with relative attention (Shaw et al., 2018), which allows the model to keep better track of regularity based on event orderings and periodicity in the performance. Huang et al. (2019b) propose a novel algorithm for implementing relative self-attention that is significantly more memory-efficient, enabling the model to generate musical sequences over a minute in length. For more details regarding the self-attention mechanism and Transformers, we refer the reader to (Vaswani et al., 2017; Parmar et al., 2018).
31
+
32
+ # 3 CONDITIONAL GENERATION WITH THE TRANSFORMER AUTOENCODER
33
+
34
+ # 3.1 MODEL ARCHITECTURE
35
+
36
+ We leverage the standard encoder and decoder stacks of the Transformer as a foundation for our model, with minor modifications that we outline below.
37
+
38
+ Transformer Encoder: For both the performance and melody encoder networks, we use the Transformer’s stack of 6 layers which are each comprised of a: (1) multi-head relative attention mechanism; and a (2) position-wise fully-connected feed-forward network. The performance encoder takes as input the event-based performance encoding of an input performance, while the melody encoder learns an encoding of the melody which has been extracted from the input performance. Depending on the music generation task, which we elaborate upon in Section 3.2, the encoder output(s) are fed into the Transformer decoder. Figure 1 describes the way in which the encoder and decoder networks are composed together.
39
+
40
+ Transformer Decoder: The decoder shares the same structure as the encoder network, but with an additional multi-head attention layer over the encoder outputs. At each step of generation, the decoder takes in the output of the encoder, as well as each new token that was previously generated.
41
+
42
+ The model is trained end-to-end with maximum likelihood. That is, for a given sequence $x$ of length $n$ , we maximize $\begin{array} { r } { \log p _ { \theta } ( x ) = \sum _ { i = 1 } ^ { n } \log p _ { \theta } ( x _ { i } | x _ { < i } ) } \end{array}$ with respect to the model parameters $\theta$ .
43
+
44
+ # 3.2 CONDITIONING MECHANISM
45
+
46
+ Performance Conditioning and Bottleneck For this task, we aim to generate samples that sound “similar” to a conditioning input performance. We incorporate a bottleneck in the output of the Transformer encoder in order to prevent the model from simply memorizing the input (Baldi, 2012). Thus, as shown in Figure 1, we mean-aggregate the performance embedding across the time dimension in order to learn a global representation of style. This mean-performance embedding is then fed into the autoregressive decoder, where the decoder attends to this global representation in order to predict the appropriate target. Although this bottleneck may be undesirable in sequence transduction tasks where the input and output sequences differ (e.g. translation), we find that it works well in our setting where we require the generated samples to be similar in style to the input sequence.
47
+
48
+ Melody & Performance Conditioning: Next, we synthesize any given melody in the style of a different performance. Although the setup shares similarities to that of the melody conditioning problem in (Huang et al., 2019b), we note that we also provide a conditioning performance signal, which makes the generation task more challenging. During training, we follow an internal procedure to extract melodies from performances in the training set, quantize the melody to a $1 0 0 \mathrm { m s }$ grid, and encode it as a sequence of tokens that uses a different vocabulary than the performance representation. We then use two distinct Transformer encoders (each with the same architecture) as in Section 3.1 to separately encode the melody and performance inputs. The melody and performance embeddings are combined to use as input to the decoder.
49
+
50
+ We explore various ways of combining the intermediate representations: (1) sum, where we add the performance and melody embeddings together; (2) concatenate, where we concatenate the two embeddings separated with a stop token; and (3) tile, where we tile the performance embedding across every dimension of time in the melody encoding. In all three cases, we work with the meanaggregated representation of the input performance. We find that different approaches work better than others on some dataets, a point which we elaborate upon in Section 5.
51
+
52
+ Input Perturbation In order to encourage the encoded performance representations to generalize across various melodies, keys, and tempos, we draw inspiration from the denoising autoencoder (Vincent et al., 2008) as a means to regularize the model. For every target performance from which we extract the input melody, we provide the model with a perturbed version of the input performance as the conditioning signal. We allow this “noisy” performance to vary across two axes of variation: (1) pitch, where we artificially shift the overall pitch either down or up by 6 semitones; and (2) time, where we stretch the timing of the performance by at most $5 \%$ . In our experiments, we find that this augmentation procedure leads to samples that sound more pleasing (Oore et al., 2018). We provide further details on the augmentation procedure in Appendix A.
53
+
54
+ # 4 SIMILARITY EVALUATION ON PERFORMANCE FEATURES
55
+
56
+ Although a variety of different metrics have been proposed to quantify both the quality (Engel et al., 2019) and similarity of musical performances relative to one another (Yang & Lerch, 2018; Hung et al., 2019), the development of a proper metric to measure such characteristics in music generation remains an open question. Therefore, we draw inspiration from (Yang & Lerch, 2018) to capture the style of a given performance based its the pitch- and rhythm-related features using 8 features:
57
+
58
+ 1. Note Density (ND): The note density refers to the average number of notes per second in a performance: a higher note density often indicates a fast-moving piece, while a lower note density correlates with softer, slower pieces. This feature is a good indicator for rhythm.
59
+ 2. Pitch Range $( P R )$ : The pitch range denotes the difference between the highest and lowest semitones (MIDI pitches) in a given phrase.
60
+
61
+ 3. Mean Pitch (MP) / Variation of Pitch (VP): Similar in vein to the pitch range (PR), the average and overall variation of pitch in a musical performance captures whether the piece is played in a higher or lower octave. 4. Mean Velocity (MV) / Variation of Velocity (VV): The velocity of each note indicates how hard a key is pressed in a musical performance, and serves as a heuristic for overall volume. 5. Mean Duration (MD) / Variation of Duration $( V D )$ : The duration describes for how long each note is pressed in a performance, representing articulation, dynamics, and phrasing.
62
+
63
+ # 4.1 OVERLAPPING AREA (OA) METRIC
64
+
65
+ To best capture the salient features within the periodic structure of a musical performance, we used a sliding window of 2s to construct histograms of the desired feature within each window. We found that representing each performance with such relative measurements better preserved changing dynamics and stylistic motifs across the entire performance as opposed to a single scalar value (e.g. average note density across the entire performance).
66
+
67
+ Similar to (Yang & Lerch, 2018; Hung et al., 2019), we smoothed the histograms obtained by fitting a Gaussian distribution to each feature – this allowed us to learn a compact representation while still capturing the feature’s variability through its mean $\mu$ and variance $\bar { \sigma } ^ { 2 }$ . Then to compare two performances, we computed the Overlapping Area (OA) between the Gaussian pdfs of each feature to quantify their similarity. We demonstrate empirically that this metric identifies the relevant characteristics of interest in our generated performances in Section 5.
68
+
69
+ # 5 EXPERIMENTS
70
+
71
+ Datasets We used both MAESTRO (Hawthorne et al., 2019) and internal datasets (Simon et al., 2019) for the experimental setup. We used the standard 80/10/10 train/validation/test split from MAESTRO v1.0.0, and augmented the dataset by $1 0 \mathrm { x }$ using pitch shifts of no more than a minor third and time stretches of at most $5 \%$ . We note that this augmentation is distinct from the noiseinjection procedure referenced in Section 3: the data augmentation merely increases the size of the initial dataset, while the perturbation procedure operates only on the input performance signal. The internal dataset did not require any additional augmentation.
72
+
73
+ Experimental Setup We implemented the model in the Tensor2Tensor framework (Vaswani et al., 2017), and used the default hyperparameters for training: 0.2 learning rate with 8000 warmup steps, rsqrt decay, 0.2 dropout, and early stopping for GPU training. For TPU training, we use AdaFactor with the rsqrt decay and learning rate warmup steps to be 10K. We adopt many of the hyperparameter configurations from (Huang et al., 2019b), where we reduce the query and key hidden size to half the hidden size, use 8 hidden layers, use 384 hidden units, and set the maximum relative distance to consider to half the training sequence length for relative global attention. We set the maximum sequence length to be 2048 tokens, and a filter size of 1024. We provide additional details on the model architectures and hyperparameter configurations in Appendix C.
74
+
75
+ # 5.1 LOG-LIKELIHOOD EVALUATION
76
+
77
+ As expected, we find that the Transformer autoencoder framework with the encoder output bottleneck outperforms other baselines. In Tables 1 and 2, we see that all conditional model variants outperform their unconditional counterparts. Interestingly, we find that for the melody & performance model, different methods of combining the embeddings work better for different datasets. For example, concatenate led to the lowest NLL for the internal dataset, while sum outperformed all other variants for MAESTRO. We report NLL values for both MAESTRO and the internal dataset for the perturbed-input model variants in Appendix B.
78
+
79
+ # 5.2 SIMILARITY EVALUATION
80
+
81
+ We use the OA metric from Section 4 to evaluate whether using a conditioning signal in both the (a) performance autoencoder and (b) melody & performance autoencoder produces samples that are more similar in style to the conditioning inputs from the evaluation set relative to other baselines.
82
+
83
+ Table 1: Note-wise test NLL on the MAESTRO and internal datasets, with event-based representations of lengths $L = 2 0 4 8$ . We exclude the performance autoencoder baseline (no aggregation) as it memorized the data $( { \mathrm { N L L } } = 0 $ ). Conditional models outperformed their unconditional counterparts.
84
+
85
+ <table><tr><td>Model variation</td><td>MAESTRO</td><td>internal</td></tr><tr><td>Unconditional model with rel. attention (Huang et al., 2019b)</td><td>1.840</td><td>1.49</td></tr><tr><td>Performance autoencoder with rel. attention (ours)</td><td>1.799</td><td>1.384</td></tr></table>
86
+
87
+ Table 2: Note-wise test NLL on the MAESTRO and internal datasets with melody conditioning, with event-based representations of lengths $L = 2 0 4 8$ . We note that sum worked best for MAESTRO, while concatenate outperformed all other baselines for the internal dataset.
88
+
89
+ <table><tr><td>Model variation</td><td>MAESTRO</td><td>internal</td></tr><tr><td>Melody-only Transformer with rel. attention (Huang et al., 2019b)</td><td>1.786</td><td>1.302</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, sum (ours)</td><td>1.706</td><td>1.275</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, concat (ours)</td><td>1.713</td><td>1.237</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, tile (ours)</td><td>1.709</td><td>1.248</td></tr></table>
90
+
91
+ First, we sample 500 examples from the evaluation set and use them as conditioning signals to generate one sample for each input. Then, we compare each conditioning signal to: (1) the generated sample and (2) an unconditional sample. We compute the similarity metric as defined in Section 4 pairwise and take the average over 500 examples. As shown in Table 3, we find that the performance autoencoder generates samples that have $48 \%$ higher similarity overall to the conditioning input as compared to the unconditional baseline.
92
+
93
+ <table><tr><td rowspan=1 colspan=1>MAESTRO 1</td><td rowspan=1 colspan=1>ND</td><td rowspan=1 colspan=1>PR MP</td><td rowspan=1 colspan=2>VP MV</td><td rowspan=1 colspan=1>vv</td><td rowspan=1 colspan=1>MD</td><td rowspan=1 colspan=1>VD</td><td rowspan=1 colspan=1>Avg</td></tr><tr><td rowspan=1 colspan=1>Performance (ours)Unconditional</td><td rowspan=1 colspan=1>0.6510.370</td><td rowspan=1 colspan=1>0.696 0.6340.466 0.435</td><td rowspan=1 colspan=1>0.6890.485</td><td rowspan=1 colspan=1>0.6930.401</td><td rowspan=1 colspan=1>0.7320.606</td><td rowspan=1 colspan=1>0.5820.385</td><td rowspan=1 colspan=1>0.6920.529</td><td rowspan=1 colspan=1>0.670.46</td></tr><tr><td rowspan=1 colspan=1>Internal Dataset</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>Performance (ours)Unconditional</td><td rowspan=1 colspan=1>0.7310.466</td><td rowspan=1 colspan=1>0.8370.7840.561 0.556</td><td rowspan=1 colspan=1>0.8380.578</td><td rowspan=1 colspan=1>0.7780.405</td><td rowspan=1 colspan=1>0.8350.590</td><td rowspan=1 colspan=1>0.7850.521</td><td rowspan=1 colspan=1>0.8270.624</td><td rowspan=1 colspan=1>0.800.54</td></tr></table>
94
+
95
+ Table 3: Average overlapping area (OA) similarity metrics comparing performance conditioned models with unconditional models. Unconditional and Melody-only baselines are from (Huang et al., 2019b). The metrics are described in detail in Section 4. The samples in this quantitative comparison are used for the listener study shown in the left graph of Figure 4.
96
+
97
+ For the melody & performance autoencoder, we sample $7 1 7 \ast 2$ distinct performances – we reserve one set of 717 for conditioning performance styles, and the other set of 717 we use to extract melodies in order to synthesize in the style of a different performance. We compare the melody & performance autoencoder to 3 different baselines: (1) one that is conditioned only on the melody (Melody-only); (2) conditioned only on performance (Performance-only); and (3) an unconditional language model. Interestingly, we find that the OA metric is more sensitive to the performance style than melodic similarity. Table 4 demonstrates that the Melody-only autoencoder suffers without the performance conditioning, while the Performance-only model performs best. The Melody & performance autoencoder performs comparably to the best model.
98
+
99
+ # 5.3 INTERPOLATIONS
100
+
101
+ # 5.3.1 PERFORMANCE AUTOENCODER
102
+
103
+ In this experiment, we test whether the performance autoencoder can successfully interpolate between different performances. First, we sample 1000 performances from the internal test set (100 for MAESTRO, due to its smaller size), and split this dataset in half. The first half we reserve for
104
+
105
+ <table><tr><td>MAESTRO</td><td>ND</td><td>PR</td><td>MP</td><td>VP</td><td>MV</td><td>vv</td><td>MD</td><td>VD</td><td>Avg</td></tr><tr><td>Melody &amp; perf. (ours)</td><td>0.650</td><td>0.696</td><td>0.634</td><td>0.689</td><td>0.692</td><td>0.732</td><td>0.582</td><td>0.692</td><td>0.67</td></tr><tr><td>Perf-only (ours)</td><td>0.600</td><td>0.695</td><td>0.657</td><td>0.721</td><td>0.664</td><td>0.740</td><td>0.527</td><td>0.648</td><td>0.66</td></tr><tr><td>Melody-only</td><td>0.609</td><td>0.693</td><td>0.640</td><td>0.693</td><td>0.582</td><td>0.711</td><td>0.569</td><td>0.636</td><td>0.64</td></tr><tr><td>Unconditional</td><td>0.376</td><td>0.461</td><td>0.423</td><td>0.480</td><td>0.384</td><td>0.588</td><td>0.347</td><td>0.520</td><td>0.48</td></tr><tr><td>Internal Dataset</td><td colspan="9"></td></tr><tr><td>Melody &amp; perf (ours)</td><td>0.646</td><td>0.708</td><td>0.610</td><td>0.717</td><td>0.590</td><td>0.706</td><td>0.658</td><td>0.743</td><td>0.67</td></tr><tr><td>Perf-only (ours)</td><td>0.624</td><td>0.646</td><td>0.624</td><td>0.638</td><td>0.422</td><td>0.595</td><td>0.601</td><td>0.702</td><td>0.61</td></tr><tr><td>Melody-only</td><td>0.575</td><td>0.707</td><td>0.662</td><td>0.718</td><td>0.583</td><td>0.702</td><td>0.634</td><td>0.707</td><td>0.66</td></tr><tr><td>Unconditional</td><td>0.476</td><td>0.580</td><td>0.541</td><td>0.594</td><td>0.400</td><td>0.585</td><td>0.522</td><td>0.623</td><td>0.54</td></tr></table>
106
+
107
+ Table 4: Average overlapping area (OA) similarity metrics comparing models with different conditioning. Unconditional and Melody-only baselines are from (Huang et al., 2019b). The metrics are described in detail in Section 4. The samples in this quantitative comparison are used for the listener study shown in the right graph of Figure 4.
108
+
109
+ the original starting performance, which we call “performance A”, and the other half we reserve for the end performance, denoted as “performance B.” Then we use the performance encoder to encode performance A into its compressed representation $z _ { A }$ , and do the same for performance B to obtain $z _ { B }$ . For a range $\alpha \in [ 0 , 0 . 1 2 5 , \hdots , 0 . 8 7 5 , 1 . 0 ]$ , we sample a new performance $\mathrm { p e r f } _ { \mathrm { n e w } }$ that results from decoding $\alpha \cdot z _ { A } + ( 1 - \alpha ) \cdot z _ { B }$ . We observe how the OA (averaged across all features) defined in Section 4 changes between this newly interpolated performance $\mathrm { p e r f } _ { \mathrm { n e w } }$ and performances $\{ \mathrm { A } , \mathrm { B } \}$ .
110
+
111
+ ![](images/9143cf4263afb01001cd56408b4e5d97dd06e0da98ce3b6b9819bac7c4a15181.jpg)
112
+ Figure 2: For the internal dataset, the relative distance from performance A $( \alpha = 1$ ) to the interpolated sample increases as $\alpha$ is slowly increased to 1.0.
113
+
114
+ Specifically, we compute the similarity metric between each input performance A and interpolated sample $\mathrm { p e r f } _ { \mathrm { n e w } }$ for all 500 samples, and compute the same pairwise similarity for each performance B. We then compute the normalized distance between each interpolated sample and the corresponding performance A or B, which we denote as: rel distance(perf $\begin{array} { r } { \dot { { \mathrm { ~ a ~ } } } ) \ = 1 - \ \frac { \mathsf { O A } - { \mathrm { ~ \mathbb { A } ~ } } } { \mathsf { O A } - { \mathrm { A } } \ + \ \mathsf { O A } - { \mathrm { B } } } } \end{array}$ , where the OA is averaged across all features. We average this distance across all elements in the set and find in Figure 2 that the relative distance between performance A slowly increases as we increase $\alpha$ from 0 to 1, as expected. We note that it is not possible to conduct this interpolation study with non-aggregated baselines, as we cannot interpolate across variable-length embeddings. We find that a similar trend holds for MAESTRO as in Figure 3(a).
115
+
116
+ # 5.3.2 MELODY & PERFORMANCE AUTOENCODER
117
+
118
+ We conduct a similar study as above with the melody & performance autoencoder. We hold out 716 unique melody-performance pairs (melody is not derived from the same performance) from the internal evaluation dataset and 50 examples from MAESTRO. We then interpolate across the different performances, while keeping the conditioning melody input the same across the interpolations.
119
+
120
+ As shown in Figure 3(a), we find that a similar trend holds as in the performance autoencoder: the newly-interpolated samples show that the relative distance between performance A increases as we increase the corresponding value of $\alpha$ . We note that the interpolation effect is slightly lower than that of the previous section, particularly because the interpolated sample is also dependent on the melody that it is conditioned on. Interestingly, in Figure 3(b), we note that the relative distance between the input performance from which we derived the original melody remains fairly constant across the interpolation procedure. This suggests that we are able to factorize out the two sources of variation and that varying the axis of the input performance keeps the variation in melody constant.
121
+
122
+ ![](images/75efeab00569c13b28563387655884feec0002aca2c13fab5b665278b73c3031.jpg)
123
+ Figure 3: For the internal dataset, relative distance from performance A $\alpha = 1$ ) as $\alpha$ is slowly increased to 1.0 while the conditioned melody remains fixed. As in (b), we note that the relative distance to the fixed conditioning melody with respect to a random performance remains fixed while the interpolation is conducted between performances A and B, which shows that we can control for elements of style and melody separately.
124
+
125
+ # 5.4 HUMAN EVALUATION
126
+
127
+ We also conducted listening studies to evaluate the perceived effect of performance and melody conditioning on the generated output. Using models trained on the internal dataset, we conducted two studies: one for performance conditioning, and one for melody and performance conditioning.
128
+
129
+ ![](images/709133722cd8eb5b31e91b6a93b84f89295eb2c658fb84eb35a1a695cc7617d7.jpg)
130
+ Figure 4: Results of our listening studies, showing the number of times each source won in a pairwise comparison. Black error bars indicate estimated standard deviation of means.
131
+
132
+ For performance conditioning, we presented participants with a 20s performance clip from the evaluation dataset that we used as a conditioning signal. We then asked them to listen to two additional 20s performance clips and use a Likert scale to rate which one sounded most similar in style to the conditioning signal. The sources the participants rated included “Ground Truth” (a different snippet of the same sample used for the conditioning signal), “Conditioned” (output of the Performance Autoencoder), and “Unconditioned” (output of unconditional model). For this study, 492 ratings were collected, with each source involved in 328 pair-wise comparisons.
133
+
134
+ For melody and performance conditioning, we presented participants with a 20s performance clip from the evaluation dataset and a 20s melody from a different piece in the evaluation dataset that we used as our conditioning signals. We then asked them to listen to two additional 20s performance clips and use a Likert scale to rate which sounded most like the conditioning melody played in the style of the conditioning performance. The sources the participants rated included “Melody & Performance” (output of the Melody-Performance Autoencoder), “Melody only” (output of a model conditioned only on the melody signal), “Performance only” (output of a model conditioned only on the performance signal), and “Unconditioned” (output of an unconditional model). For this study, 714 ratings were collected, with each source involved in 357 pair-wise comparisons.
135
+
136
+ Figure 4 shows the number of comparisons in which each source was selected as being most similar in style to the conditioning signal. A Kruskal-Wallis H test of the ratings showed that there is at least one statistically significant difference between the models: $\chi ^ { 2 } ( 2 ) = 3 3 2 . 0 9$ , $p < 0 . 0 5 \ : ( 7 . 7 2 \mathrm { e } - 7 3 )$ for melody conditioning and $\chi ^ { 2 } ( 2 ) = 2 7 7 . 7 4$ , $p < 0 . 0 5$ $( 6 . 5 3 \mathrm { e } - 6 0 )$ for melody and performance conditioning. A post-hoc analysis using the Wilcoxon signed-rank test with Bonferroni correction showed that there were statistically significant differences between all pairs of the performance study with $p < 0 . 0 5 / 3$ and all pairs of the performance and melody study with $p < 0 . 0 5 / 6$ except between the “Melody only” and “Melody & Performance” models $\begin{array} { r } { p = 0 . 0 8 9 4 , } \end{array}$ ).
137
+
138
+ These results demonstrate that the performance conditioning signal has a clear effect on the generated output. In fact, the effect was sufficiently robust that in the 164 comparisons between “Ground Truth” and “Conditioned”, participants said they had a preference for “Conditioned” 58 times.
139
+
140
+ Although the results between “Melody-only” and “Melody & Performance” are close, this study demonstrates that conditioning with both melody and performance outperforms conditioning on performance alone, and they are competitive with melody-only conditioning, despite the model having to deal with the complexity of incorporating both conditioning signals. In fact, we find quantitative evidence that human evaluation is more sensitive to melodic similarity, as the “Performance-only” model performs worst – a slight contrast to the results from the OA metric in Section 5.2.
141
+
142
+ We provide several audio examples demonstrating the effectiveness of these conditioning signals in the online supplement at http://bit.ly/2l14pYg. Our qualitative findings from the audio examples and interpolations, coupled with the quantitative results from the similarity metric and the listening test which capture different aspects of the synthesized performance, support the finding that the Melody & Performance autoencoder offers significant control over the generated samples.
143
+
144
+ # 6 RELATED WORK
145
+
146
+ Sequential autoencoders: Building on the wealth of autoencoding literature (Hinton & Salakhutdinov, 2006; Salakhutdinov & Hinton, 2009; Vincent et al., 2010), our work bridges the gap between the traditional sequence-to-sequence framework (Sutskever et al., 2014), their recent advances with various attention mechanisms (Vaswani et al., 2017; Shaw et al., 2018; Huang et al., 2019b), and sequential autoencoders. Though (Wang & Wan, 2019) propose a Transformer-based conditional VAE for story generation, the self-attention mechanism is shared between the encoder and decoder. Most similar to our work is that of (Kaiser & Bengio, 2018), which uses a Transformer decoder and a discrete autoencoding function to map an input sequence into a discretized, compressed representation. We note that this approach is complementary to ours, where a similar idea of discretization may be applied to the output of our Transformer encoder. The MusicVAE (Roberts et al., 2018) is a sequential VAE with a hierarchical recurrent decoder, which learns an interpretable latent code for musical sequences that can be used during generation time. This work builds upon (Bowman et al., 2015) that uses recurrence and an autoregressive decoder for text generation. Our Transformer autoencoder can be seen as a deterministic variant of the MusicVAE, with a complex self-attention mechanism based on relative positioning in both the encoder and decoder to capture more expressive features of the data at both the local and global scale.
147
+
148
+ Controllable generations using representation learning: There is also a wide range of recent work on controllable generations, where we focus on the music domain. (Engel et al., 2017a) proposes to constrain the latent space of unconditional generative models to sample with respect to some predefined attributes, whereas we explicitly define our conditioning signal in the data space and learn a global representation of its style during training. The Universal Music Translation network aims to translate music across various styles, but is not directly comparable to our approach as they work with raw audio waveforms (Mor et al., 2018). Both (Meade et al., 2019) and MuseNet (Payne, 2019) generate music based on user preferences, but adopt a slightly different approach: the models are specifically trained with labeled tokens (e.g., composer and instrumentation) as conditioning input, while our Transformer autoencoder’s global style representation is learned in an unsupervised way.
149
+
150
+ # 7 CONCLUSION
151
+
152
+ We proposed our Transformer autoencoder for conditional music generation, a sequential autoencoder model which utilizes an autoregressive Transformer encoder and decoder for improved modeling of musical sequences with long-term structure. We show that this model allows users to easily adapt the outputs of their generative model using even a single input performance. Through experiments on the MAESTRO and internal datasets, we demonstrate both quantitatively and qualitatively that our model generates samples that sound similar in style to a variety of conditioning signals relative to baselines. For future work, it would be interesting to explore other training procedures such as variational techniques or few-shot learning approaches to account for situations in which the input signals are from slightly different data distributions than the training set.
153
+
154
+ # REFERENCES
155
+
156
+ Pierre Baldi. Autoencoders, unsupervised learning, and deep architectures. In Proceedings of ICML workshop on unsupervised and transfer learning, pp. 37–49, 2012.
157
+
158
+ Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
159
+
160
+ Jesse Engel, Matthew Hoffman, and Adam Roberts. Latent constraints: Learning to generate conditionally from unconditional generative models. arXiv preprint arXiv:1711.05772, 2017a.
161
+
162
+ Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Mohammad Norouzi, Douglas Eck, and Karen Simonyan. Neural audio synthesis of musical notes with wavenet autoencoders. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1068– 1077. JMLR. org, 2017b.
163
+
164
+ Jesse Engel, Kumar Krishna Agrawal, Shuo Chen, Ishaan Gulrajani, Chris Donahue, and Adam Roberts. Gansynth: Adversarial neural audio synthesis. arXiv preprint arXiv:1902.08710, 2019.
165
+
166
+ Jon Gillick, Adam Roberts, Jesse Engel, Douglas Eck, and David Bamman. Learning to groove with inverse sequence transformations. arXiv preprint arXiv:1905.06118, 2019.
167
+
168
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
169
+
170
+ David Ha and Douglas Eck. A neural representation of sketch drawings. arXiv preprint arXiv:1704.03477, 2017.
171
+
172
+ Curtis Hawthorne, Andriy Stasyuk, Adam Roberts, Ian Simon, Cheng-Zhi Anna Huang, Sander Dieleman, Erich Elsen, Jesse Engel, and Douglas Eck. Enabling factorized piano music modeling and generation with the MAESTRO dataset. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ r1lYRjC9F7.
173
+
174
+ Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006.
175
+
176
+ Cheng-Zhi Anna Huang, Tim Cooijmans, Adam Roberts, Aaron Courville, and Douglas Eck. Counterpoint by convolution. arXiv preprint arXiv:1903.07227, 2019a.
177
+
178
+ Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam Shazeer, Andrew M. Dai, Matthew D. Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer: Generating music with long-term structure. In International Conference on Learning Representations, 2019b. URL https://openreview.net/forum?id $=$ rJe4ShAcF7.
179
+
180
+ Hsiao-Tzu Hung, Chung-Yang Wang, Yi-Hsuan Yang, and Hsin-Min Wang. Improving automatic jazz melody generation by transfer learning techniques. arXiv preprint arXiv:1908.09484, 2019.
181
+
182
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017.
183
+
184
+ Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint arXiv:1801.09797, 2018.
185
+
186
+ Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
187
+
188
+ Nicholas Meade, Nicholas Barreyre, Scott C Lowe, and Sageev Oore. Exploring conditioning for generative music systems with human-interpretable controls. arXiv preprint arXiv:1907.04352, 2019.
189
+
190
+ Noam Mor, Lior Wolf, Adam Polyak, and Yaniv Taigman. A universal music translation network. arXiv preprint arXiv:1805.07848, 2018.
191
+
192
+ Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
193
+
194
+ Sageev Oore, Ian Simon, Sander Dieleman, Douglas Eck, and Karen Simonyan. This time with feeling: learning expressive musical performance. Neural Computing and Applications, pp. 1– 13, 2018.
195
+
196
+ Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018.
197
+
198
+ Christine Payne. Musenet, 2019. URL https://openai.com/blog/musenet/.
199
+
200
+ Adam Roberts, Jesse Engel, Colin Raffel, Curtis Hawthorne, and Douglas Eck. A hierarchical latent vector model for learning long-term structure in music. arXiv preprint arXiv:1803.05428, 2018.
201
+
202
+ Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In Artificial intelligence and statistics, pp. 448–455, 2009.
203
+
204
+ Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018.
205
+
206
+ Ian Simon, Cheng-Zhi Anna Huang, Jesse Engel, Curtis Hawthorne, and Monica Dinculescu. Generating piano music with transformer. 2019. URL https://magenta.tensorflow.org/ piano-transformer.
207
+
208
+ Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pp. 3483–3491, 2015.
209
+
210
+ Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances in neural information processing systems, pp. 3738–3746, 2016.
211
+
212
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
213
+
214
+ Aaron Van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in neural information processing systems, pp. 4790–4798, 2016.
215
+
216
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
217
+
218
+ Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008.
219
+
220
+ Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research, 11(Dec):3371–3408, 2010.
221
+
222
+ Tianming Wang and Xiaojun Wan. T-cvae: Transformer-based conditioned variational autoencoder for story completion. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pp. 5233–5239. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/727. URL https://doi.org/ 10.24963/ijcai.2019/727.
223
+
224
+ Li-Chia Yang and Alexander Lerch. On the evaluation of generative models in music. Neural Computing and Applications, pp. 1–12, 2018.
225
+
226
+ # APPENDIX
227
+
228
+ A FURTHER DETAILS ON INPUT PERTURBATION PROCEDURE
229
+
230
+ We elaborate upon the perturbation procedure as follows, which only applies to the melody & performance conditioning music generation task. First, we take a target performance that we would like our model to predict and extract the corresponding melody from this performance. We use this “clean” melody as part of our conditioning signal. Then, we modify the conditioning performance by either shifting the pitch up or down 6 semitones and stretching the timing by $\pm 5 \%$ . Then for each new data point during training, a single noise injection procedure is randomly sampled from the cross product of all possible combinations of 12 pitch shift values and 4 time stretch values (evaluated in intervals of $2 . 5 \%$ ). At test time, the data points are left unperturbed.
231
+
232
+ # B NLL EVALUATION FOR ”NOISY” MODEL
233
+
234
+ Below, we provide the note-wise test NLL on the MAESTRO and internal datasets with melody conditioning, where the conditioning performance is perturbed by the procedure outlined in Section 3.
235
+
236
+ Table 5: Note-wise test NLL on the MAESTRO and internal piano performance datasets with melody conditioning, with event-based representations of lengths $L = 2 0 4 8$ .
237
+
238
+ <table><tr><td>Model variation</td><td>MAESTRO</td><td> internal Dataset</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, sum</td><td>1.721</td><td>1.248</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, concat</td><td>1.719</td><td>1.249</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, tile</td><td>1.728</td><td>1.253</td></tr></table>
239
+
240
+ C ADDITIONAL DETAILS ON MODEL TRAINING PROCEDURE
241
+
242
+ We emphasize that the Transformer is trained in an autoencoder-like fashion. Specifically, for performance-only conditioning, the Transforemr decoder is tasked with predicting the same performance that was fed as input to the encoder. In this way, we encourage the model to learn global representations (the mean-aggregated performance embedding from the encoder) that will faithfully be able to reconstruct the input performance. For melody performance conditioning, the Transformer autoencoder is trained to predict a new performance using the combined melody+performance embedding, where the loss is computed with respect to the conditioned input performance that is provided to the encoder.
243
+
244
+ # D MODEL ARCHITECTURE AND HYPERPARAMETER CONFIGURATIONS
245
+
246
+ We mostly use the default Transformer architecture as provided in the Tensor2Tensor framework, such as 8 self-attention heads as listed in the main text, and list the slight adjustments we made for each dataset below:
247
+
248
+ # D.1 MAESTRO
249
+
250
+ For the MAESTRO dataset, we follow the hyperparameter setup of (Huang et al., 2019b):
251
+
252
+ 1. num hidden layers $= 6$
253
+ 2. hidden units $= 3 8 4$
254
+ 3. filter size $= 1 0 2 4$
255
+ 4. maximum sequence length $= 2 0 4 8$
256
+ 5. maximum relative distance $=$ half the hidden size
257
+ 6. dropout $= 0 . 1$
258
+
259
+ # D.2 INTERNAL DATASET
260
+
261
+ For the internal dataset, we modify the number of hidden layers to 8 and slightly increase the level of dropout.
262
+
263
+ 1. num hidden layers $= 8$
264
+ 2. hidden units $= 3 8 4$
265
+ 3. filter size $= 1 0 2 4$
266
+ 4. maximum sequence length $= 2 0 4 8$
267
+ 5. maximum relative distance $=$ half the hidden size
268
+ 6. dropout $= 0 . 1 5$
269
+
270
+ # E INTERPOLATIONS DETAILS
271
+
272
+ Interpolation relative distance results for the (a) performance and (b) melody & performance Transformer autoencoders for the MAESTRO dataset.
273
+
274
+ ![](images/00947a914d6f11b4f28e5ab82a6459e872ffdb95d5e4faee942d111deebf480b.jpg)
275
+
276
+ ![](images/7c9073195f56bbc57d2a14c7a45342f17da059b1fc837236892d6730e164904f.jpg)
277
+ (b) Relative distance from the interpolated sample to the original melody, which is kept fixed.
278
+
279
+ (a) Relative distance from interpolated sample to the original starting performance.
280
+
281
+ Figure 5: The distance to the original performance increases as the value of $\alpha$ increases in (a), as expected. In (b), we see that there is a very slight increase in the relative distance to the original melody during the interpolation procedure.
282
+
283
+ # F INTERNAL DATASET PERFORMANCE INTERPOLATIONS
284
+
285
+ Here, we provide piano rolls demonstrating the effects of latent-space interpolation for the internal dataset, for both the (a) performance and (b) melody & performance Transformer autoencoder. For similar results in MAESTRO as well as additional listening samples, we refer the reader to the online supplement: http://bit.ly/2l14pYg.
286
+
287
+ ![](images/b66a13d74361917ee7ccccacc6121b5c49899e962dcd86bd78a1a467af26109b.jpg)
288
+ Figure 6: Interpolation of a starting performance (a) from the internal dataset to a final performance (h), with the coefficient $\alpha$ controlling the level of interpolation between the latent encodings between the two performances.
289
+
290
+ ![](images/ba9cf42e5f640a7644af8396e335d8e5ca1c273744f87052f503d4dd8e3d7b41.jpg)
291
+ Figure 7: Interpolation of a starting performance (b) from the internal dataset to a final performance (j), with the coefficient $\alpha$ controlling the level of interpolation between the latent encodings between the two performances. The original conditioning melody (a) is kept fixed throughout the interpolation.
parse/train/Hkg9HgBYwH/Hkg9HgBYwH_content_list.json ADDED
@@ -0,0 +1,1588 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ENCODING MUSICAL STYLE WITH TRANSFORMER AUTOENCODERS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 640,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We consider the problem of learning high-level controls over the global structure of sequence generation, particularly in the context of symbolic music generation with complex language models. In this work, we present the Transformer autoencoder, which aggregates encodings of the input data across time to obtain a global representation of style from a given performance. We show it is possible to combine this global embedding with other temporally distributed embeddings, enabling improved control over the separate aspects of performance style and and melody. Empirically, we demonstrate the effectiveness of our method on a variety of music generation tasks on the MAESTRO dataset and an internal dataset with $1 0 { , } 0 0 0 { + }$ hours of piano performances, where we achieve improvements in terms of log-likelihood and mean listening scores as compared to relevant baselines. ",
40
+ "bbox": [
41
+ 233,
42
+ 268,
43
+ 764,
44
+ 421
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 452,
55
+ 336,
56
+ 468
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "There has been significant progress in generative modeling, particularly with respect to creative applications such as art and music (Oord et al., 2016; Engel et al., 2017b; Ha & Eck, 2017; Huang et al., 2019a; Payne, 2019). As the number of generative applications increase, it becomes increasingly important to consider how users can interact with such systems, particularly when the generative model functions as a tool in their creative process (Engel et al., 2017a; Gillick et al., 2019) To this end, we consider how one can learn high-level controls over the global structure of a generated sample. We focus on symbolic music generation, where Music Transformer (Huang et al., 2019b) is the current state-of-the-art in generating high-quality samples that span over a minute in length. ",
63
+ "bbox": [
64
+ 174,
65
+ 484,
66
+ 825,
67
+ 597
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The challenge in controllable sequence generation is the fact that Transformers (Vaswani et al., 2017) and their variants excel as language models or in sequence-to-sequence tasks such as translation, but it is less clear as to how they can: (1) learn and (2) incorporate global conditioning information at inference time. This contrasts with traditional generative models for images such as the variational autoencoder (VAE) (Kingma & Welling, 2013) or generative adversarial network (GAN) (Goodfellow et al., 2014) which typically incorprate global conditioning as part of their training procedure (Sohn et al., 2015; Sønderby et al., 2016; Isola et al., 2017; Van den Oord et al., 2016). ",
74
+ "bbox": [
75
+ 174,
76
+ 603,
77
+ 825,
78
+ 700
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this work, we introduce the Transformer autoencoder, where we aggregate encodings across time to obtain a holistic representation of the performance style. We show that this learned global representation can be incorporated with other forms of structural conditioning in two ways. First, we show that given a performance, our model can generate performances that are similar in style to the provided input. Then, we explore different methods to combine melody and performance representations to harmonize a melody in the style of the given performance. In both cases, we show that combining both global and fine-scale encodings of the musical performance allows us to gain better control of generation, separately manipulating both the style and melody of the resulting sample. ",
85
+ "bbox": [
86
+ 174,
87
+ 708,
88
+ 823,
89
+ 819
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Empirically, we evaluate our model on two datasets: the publicly-available MAESTRO (Hawthorne et al., 2019) dataset, and an internal dataset of piano performances transcribed from $1 0 { , } 0 0 0 { + }$ hours of audio (Anonymous for review). We find that the Transformer autoencoder is able to generate not only performances that sound similar to the input, but also accompaniments of melodies that follow a given style, as shown through both quantitative and qualitative experiments as well as a user listening study. In particular, we demonstrate that our model is capable of adapting to a particular musical style even in the case where we have one single input performance. ",
96
+ "bbox": [
97
+ 174,
98
+ 827,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/bc82bd157bca56953080c77933040d21ce1a37ea33c5d67ed123aa59090ddf61.jpg",
107
+ "image_caption": [
108
+ "Figure 1: A flowchart of the Transformer autoencoder. We first transcribe the .wav data files into MIDI using the Onsets and Frames framework, then encode them into performance representations to use as input. The output of the performance encoder is aggregated across time and (optionally) combined with a melody embedding to produce a representation of the entire performance, which is then used by the Transformer decoder at inference time. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 274,
113
+ 104,
114
+ 723,
115
+ 241
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 PRELIMINARIES ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 349,
126
+ 339,
127
+ 366
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "2.1 DATA REPRESENTATION FOR MUSIC GENERATION ",
134
+ "text_level": 1,
135
+ "bbox": [
136
+ 174,
137
+ 381,
138
+ 563,
139
+ 395
140
+ ],
141
+ "page_idx": 1
142
+ },
143
+ {
144
+ "type": "text",
145
+ "text": "The MAESTRO (Hawthorne et al., 2019) dataset consists of over 1,100 classical piano performances, where each piece is represented as a MIDI file. The internal performance dataset consists of over 10,000 hours of piano performances transcribed from audio (Anonymous for review). In both cases, we represent music as a sequence of discrete tokens, effectively formulating the generation task as a language modeling problem. The performances are encoded using the vocabulary as described in (Oore et al., 2018), which captures expressive dynamics and timing. This performance encoding vocabulary consists of 128 note on events, 128 note off events, 100 time shift events representing time shifts in 10ms increments from $1 0 \\mathrm { m s }$ to 1s, and 32 quantized velocity bins representing the velocity at which the 128 note on events were played. ",
146
+ "bbox": [
147
+ 174,
148
+ 406,
149
+ 825,
150
+ 531
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "2.2 MUSIC TRANSFORMER ",
157
+ "text_level": 1,
158
+ "bbox": [
159
+ 176,
160
+ 549,
161
+ 374,
162
+ 563
163
+ ],
164
+ "page_idx": 1
165
+ },
166
+ {
167
+ "type": "text",
168
+ "text": "We build our Transformer autoencoder from Music Transformer, a state-of-the-art generative model that is capable of generating music with long-term coherence (Huang et al., 2019b). While the original Transformer uses a self-attention mechanism that operates over absolute positional encodings of each token in a given sequence (Vaswani et al., 2017), Music Transformer replaces this with relative attention (Shaw et al., 2018), which allows the model to keep better track of regularity based on event orderings and periodicity in the performance. Huang et al. (2019b) propose a novel algorithm for implementing relative self-attention that is significantly more memory-efficient, enabling the model to generate musical sequences over a minute in length. For more details regarding the self-attention mechanism and Transformers, we refer the reader to (Vaswani et al., 2017; Parmar et al., 2018). ",
169
+ "bbox": [
170
+ 173,
171
+ 574,
172
+ 825,
173
+ 699
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "3 CONDITIONAL GENERATION WITH THE TRANSFORMER AUTOENCODER ",
180
+ "text_level": 1,
181
+ "bbox": [
182
+ 176,
183
+ 720,
184
+ 797,
185
+ 736
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "3.1 MODEL ARCHITECTURE ",
192
+ "text_level": 1,
193
+ "bbox": [
194
+ 176,
195
+ 751,
196
+ 383,
197
+ 766
198
+ ],
199
+ "page_idx": 1
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "We leverage the standard encoder and decoder stacks of the Transformer as a foundation for our model, with minor modifications that we outline below. ",
204
+ "bbox": [
205
+ 173,
206
+ 776,
207
+ 823,
208
+ 805
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "Transformer Encoder: For both the performance and melody encoder networks, we use the Transformer’s stack of 6 layers which are each comprised of a: (1) multi-head relative attention mechanism; and a (2) position-wise fully-connected feed-forward network. The performance encoder takes as input the event-based performance encoding of an input performance, while the melody encoder learns an encoding of the melody which has been extracted from the input performance. Depending on the music generation task, which we elaborate upon in Section 3.2, the encoder output(s) are fed into the Transformer decoder. Figure 1 describes the way in which the encoder and decoder networks are composed together. ",
215
+ "bbox": [
216
+ 174,
217
+ 811,
218
+ 823,
219
+ 924
220
+ ],
221
+ "page_idx": 1
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "Transformer Decoder: The decoder shares the same structure as the encoder network, but with an additional multi-head attention layer over the encoder outputs. At each step of generation, the decoder takes in the output of the encoder, as well as each new token that was previously generated. ",
226
+ "bbox": [
227
+ 176,
228
+ 103,
229
+ 823,
230
+ 146
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "The model is trained end-to-end with maximum likelihood. That is, for a given sequence $x$ of length $n$ , we maximize $\\begin{array} { r } { \\log p _ { \\theta } ( x ) = \\sum _ { i = 1 } ^ { n } \\log p _ { \\theta } ( x _ { i } | x _ { < i } ) } \\end{array}$ with respect to the model parameters $\\theta$ . ",
237
+ "bbox": [
238
+ 173,
239
+ 152,
240
+ 821,
241
+ 183
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "3.2 CONDITIONING MECHANISM ",
248
+ "text_level": 1,
249
+ "bbox": [
250
+ 176,
251
+ 196,
252
+ 415,
253
+ 212
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "Performance Conditioning and Bottleneck For this task, we aim to generate samples that sound “similar” to a conditioning input performance. We incorporate a bottleneck in the output of the Transformer encoder in order to prevent the model from simply memorizing the input (Baldi, 2012). Thus, as shown in Figure 1, we mean-aggregate the performance embedding across the time dimension in order to learn a global representation of style. This mean-performance embedding is then fed into the autoregressive decoder, where the decoder attends to this global representation in order to predict the appropriate target. Although this bottleneck may be undesirable in sequence transduction tasks where the input and output sequences differ (e.g. translation), we find that it works well in our setting where we require the generated samples to be similar in style to the input sequence. ",
260
+ "bbox": [
261
+ 174,
262
+ 223,
263
+ 825,
264
+ 348
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "Melody & Performance Conditioning: Next, we synthesize any given melody in the style of a different performance. Although the setup shares similarities to that of the melody conditioning problem in (Huang et al., 2019b), we note that we also provide a conditioning performance signal, which makes the generation task more challenging. During training, we follow an internal procedure to extract melodies from performances in the training set, quantize the melody to a $1 0 0 \\mathrm { m s }$ grid, and encode it as a sequence of tokens that uses a different vocabulary than the performance representation. We then use two distinct Transformer encoders (each with the same architecture) as in Section 3.1 to separately encode the melody and performance inputs. The melody and performance embeddings are combined to use as input to the decoder. ",
271
+ "bbox": [
272
+ 174,
273
+ 363,
274
+ 825,
275
+ 488
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "We explore various ways of combining the intermediate representations: (1) sum, where we add the performance and melody embeddings together; (2) concatenate, where we concatenate the two embeddings separated with a stop token; and (3) tile, where we tile the performance embedding across every dimension of time in the melody encoding. In all three cases, we work with the meanaggregated representation of the input performance. We find that different approaches work better than others on some dataets, a point which we elaborate upon in Section 5. ",
282
+ "bbox": [
283
+ 174,
284
+ 496,
285
+ 825,
286
+ 579
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Input Perturbation In order to encourage the encoded performance representations to generalize across various melodies, keys, and tempos, we draw inspiration from the denoising autoencoder (Vincent et al., 2008) as a means to regularize the model. For every target performance from which we extract the input melody, we provide the model with a perturbed version of the input performance as the conditioning signal. We allow this “noisy” performance to vary across two axes of variation: (1) pitch, where we artificially shift the overall pitch either down or up by 6 semitones; and (2) time, where we stretch the timing of the performance by at most $5 \\%$ . In our experiments, we find that this augmentation procedure leads to samples that sound more pleasing (Oore et al., 2018). We provide further details on the augmentation procedure in Appendix A. ",
293
+ "bbox": [
294
+ 173,
295
+ 593,
296
+ 825,
297
+ 719
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "4 SIMILARITY EVALUATION ON PERFORMANCE FEATURES ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 176,
307
+ 738,
308
+ 676,
309
+ 755
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Although a variety of different metrics have been proposed to quantify both the quality (Engel et al., 2019) and similarity of musical performances relative to one another (Yang & Lerch, 2018; Hung et al., 2019), the development of a proper metric to measure such characteristics in music generation remains an open question. Therefore, we draw inspiration from (Yang & Lerch, 2018) to capture the style of a given performance based its the pitch- and rhythm-related features using 8 features: ",
316
+ "bbox": [
317
+ 176,
318
+ 768,
319
+ 825,
320
+ 839
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "1. Note Density (ND): The note density refers to the average number of notes per second in a performance: a higher note density often indicates a fast-moving piece, while a lower note density correlates with softer, slower pieces. This feature is a good indicator for rhythm. \n2. Pitch Range $( P R )$ : The pitch range denotes the difference between the highest and lowest semitones (MIDI pitches) in a given phrase. ",
327
+ "bbox": [
328
+ 209,
329
+ 849,
330
+ 825,
331
+ 924
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "3. Mean Pitch (MP) / Variation of Pitch (VP): Similar in vein to the pitch range (PR), the average and overall variation of pitch in a musical performance captures whether the piece is played in a higher or lower octave. 4. Mean Velocity (MV) / Variation of Velocity (VV): The velocity of each note indicates how hard a key is pressed in a musical performance, and serves as a heuristic for overall volume. 5. Mean Duration (MD) / Variation of Duration $( V D )$ : The duration describes for how long each note is pressed in a performance, representing articulation, dynamics, and phrasing. ",
338
+ "bbox": [
339
+ 210,
340
+ 103,
341
+ 825,
342
+ 210
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "4.1 OVERLAPPING AREA (OA) METRIC ",
349
+ "text_level": 1,
350
+ "bbox": [
351
+ 178,
352
+ 226,
353
+ 464,
354
+ 239
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "To best capture the salient features within the periodic structure of a musical performance, we used a sliding window of 2s to construct histograms of the desired feature within each window. We found that representing each performance with such relative measurements better preserved changing dynamics and stylistic motifs across the entire performance as opposed to a single scalar value (e.g. average note density across the entire performance). ",
361
+ "bbox": [
362
+ 174,
363
+ 252,
364
+ 825,
365
+ 320
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "Similar to (Yang & Lerch, 2018; Hung et al., 2019), we smoothed the histograms obtained by fitting a Gaussian distribution to each feature – this allowed us to learn a compact representation while still capturing the feature’s variability through its mean $\\mu$ and variance $\\bar { \\sigma } ^ { 2 }$ . Then to compare two performances, we computed the Overlapping Area (OA) between the Gaussian pdfs of each feature to quantify their similarity. We demonstrate empirically that this metric identifies the relevant characteristics of interest in our generated performances in Section 5. ",
372
+ "bbox": [
373
+ 174,
374
+ 328,
375
+ 825,
376
+ 411
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "5 EXPERIMENTS ",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 176,
386
+ 431,
387
+ 326,
388
+ 446
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Datasets We used both MAESTRO (Hawthorne et al., 2019) and internal datasets (Simon et al., 2019) for the experimental setup. We used the standard 80/10/10 train/validation/test split from MAESTRO v1.0.0, and augmented the dataset by $1 0 \\mathrm { x }$ using pitch shifts of no more than a minor third and time stretches of at most $5 \\%$ . We note that this augmentation is distinct from the noiseinjection procedure referenced in Section 3: the data augmentation merely increases the size of the initial dataset, while the perturbation procedure operates only on the input performance signal. The internal dataset did not require any additional augmentation. ",
395
+ "bbox": [
396
+ 174,
397
+ 462,
398
+ 825,
399
+ 559
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Experimental Setup We implemented the model in the Tensor2Tensor framework (Vaswani et al., 2017), and used the default hyperparameters for training: 0.2 learning rate with 8000 warmup steps, rsqrt decay, 0.2 dropout, and early stopping for GPU training. For TPU training, we use AdaFactor with the rsqrt decay and learning rate warmup steps to be 10K. We adopt many of the hyperparameter configurations from (Huang et al., 2019b), where we reduce the query and key hidden size to half the hidden size, use 8 hidden layers, use 384 hidden units, and set the maximum relative distance to consider to half the training sequence length for relative global attention. We set the maximum sequence length to be 2048 tokens, and a filter size of 1024. We provide additional details on the model architectures and hyperparameter configurations in Appendix C. ",
406
+ "bbox": [
407
+ 174,
408
+ 574,
409
+ 825,
410
+ 699
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "5.1 LOG-LIKELIHOOD EVALUATION ",
417
+ "text_level": 1,
418
+ "bbox": [
419
+ 176,
420
+ 715,
421
+ 436,
422
+ 729
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "As expected, we find that the Transformer autoencoder framework with the encoder output bottleneck outperforms other baselines. In Tables 1 and 2, we see that all conditional model variants outperform their unconditional counterparts. Interestingly, we find that for the melody & performance model, different methods of combining the embeddings work better for different datasets. For example, concatenate led to the lowest NLL for the internal dataset, while sum outperformed all other variants for MAESTRO. We report NLL values for both MAESTRO and the internal dataset for the perturbed-input model variants in Appendix B. ",
429
+ "bbox": [
430
+ 174,
431
+ 742,
432
+ 825,
433
+ 840
434
+ ],
435
+ "page_idx": 3
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "5.2 SIMILARITY EVALUATION ",
440
+ "text_level": 1,
441
+ "bbox": [
442
+ 174,
443
+ 856,
444
+ 395,
445
+ 869
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "We use the OA metric from Section 4 to evaluate whether using a conditioning signal in both the (a) performance autoencoder and (b) melody & performance autoencoder produces samples that are more similar in style to the conditioning inputs from the evaluation set relative to other baselines. ",
452
+ "bbox": [
453
+ 176,
454
+ 882,
455
+ 823,
456
+ 924
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "table",
462
+ "img_path": "images/67408dbb7c9ae86dbe2128a85229b51a8827797707b5eb78032c4218695d5694.jpg",
463
+ "table_caption": [
464
+ "Table 1: Note-wise test NLL on the MAESTRO and internal datasets, with event-based representations of lengths $L = 2 0 4 8$ . We exclude the performance autoencoder baseline (no aggregation) as it memorized the data $( { \\mathrm { N L L } } = 0 $ ). Conditional models outperformed their unconditional counterparts. "
465
+ ],
466
+ "table_footnote": [],
467
+ "table_body": "<table><tr><td>Model variation</td><td>MAESTRO</td><td>internal</td></tr><tr><td>Unconditional model with rel. attention (Huang et al., 2019b)</td><td>1.840</td><td>1.49</td></tr><tr><td>Performance autoencoder with rel. attention (ours)</td><td>1.799</td><td>1.384</td></tr></table>",
468
+ "bbox": [
469
+ 200,
470
+ 101,
471
+ 795,
472
+ 165
473
+ ],
474
+ "page_idx": 4
475
+ },
476
+ {
477
+ "type": "table",
478
+ "img_path": "images/3e19fe817ce4a99ff396bce5f0974f6c494fb6de5aa1471310accb6358a90ff0.jpg",
479
+ "table_caption": [
480
+ "Table 2: Note-wise test NLL on the MAESTRO and internal datasets with melody conditioning, with event-based representations of lengths $L = 2 0 4 8$ . We note that sum worked best for MAESTRO, while concatenate outperformed all other baselines for the internal dataset. "
481
+ ],
482
+ "table_footnote": [],
483
+ "table_body": "<table><tr><td>Model variation</td><td>MAESTRO</td><td>internal</td></tr><tr><td>Melody-only Transformer with rel. attention (Huang et al., 2019b)</td><td>1.786</td><td>1.302</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, sum (ours)</td><td>1.706</td><td>1.275</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, concat (ours)</td><td>1.713</td><td>1.237</td></tr><tr><td>Melody &amp; performance autoencoder with rel. attention, tile (ours)</td><td>1.709</td><td>1.248</td></tr></table>",
484
+ "bbox": [
485
+ 176,
486
+ 231,
487
+ 821,
488
+ 323
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "First, we sample 500 examples from the evaluation set and use them as conditioning signals to generate one sample for each input. Then, we compare each conditioning signal to: (1) the generated sample and (2) an unconditional sample. We compute the similarity metric as defined in Section 4 pairwise and take the average over 500 examples. As shown in Table 3, we find that the performance autoencoder generates samples that have $48 \\%$ higher similarity overall to the conditioning input as compared to the unconditional baseline. ",
495
+ "bbox": [
496
+ 173,
497
+ 400,
498
+ 825,
499
+ 484
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "table",
505
+ "img_path": "images/169edf5d45f7dc40da8e89f154db60d512947d0313ecc2015ef0fe44b377935f.jpg",
506
+ "table_caption": [],
507
+ "table_footnote": [],
508
+ "table_body": "<table><tr><td rowspan=1 colspan=1>MAESTRO 1</td><td rowspan=1 colspan=1>ND</td><td rowspan=1 colspan=1>PR MP</td><td rowspan=1 colspan=2>VP MV</td><td rowspan=1 colspan=1>vv</td><td rowspan=1 colspan=1>MD</td><td rowspan=1 colspan=1>VD</td><td rowspan=1 colspan=1>Avg</td></tr><tr><td rowspan=1 colspan=1>Performance (ours)Unconditional</td><td rowspan=1 colspan=1>0.6510.370</td><td rowspan=1 colspan=1>0.696 0.6340.466 0.435</td><td rowspan=1 colspan=1>0.6890.485</td><td rowspan=1 colspan=1>0.6930.401</td><td rowspan=1 colspan=1>0.7320.606</td><td rowspan=1 colspan=1>0.5820.385</td><td rowspan=1 colspan=1>0.6920.529</td><td rowspan=1 colspan=1>0.670.46</td></tr><tr><td rowspan=1 colspan=1>Internal Dataset</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>Performance (ours)Unconditional</td><td rowspan=1 colspan=1>0.7310.466</td><td rowspan=1 colspan=1>0.8370.7840.561 0.556</td><td rowspan=1 colspan=1>0.8380.578</td><td rowspan=1 colspan=1>0.7780.405</td><td rowspan=1 colspan=1>0.8350.590</td><td rowspan=1 colspan=1>0.7850.521</td><td rowspan=1 colspan=1>0.8270.624</td><td rowspan=1 colspan=1>0.800.54</td></tr></table>",
509
+ "bbox": [
510
+ 173,
511
+ 496,
512
+ 826,
513
+ 608
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "Table 3: Average overlapping area (OA) similarity metrics comparing performance conditioned models with unconditional models. Unconditional and Melody-only baselines are from (Huang et al., 2019b). The metrics are described in detail in Section 4. The samples in this quantitative comparison are used for the listener study shown in the left graph of Figure 4. ",
520
+ "bbox": [
521
+ 173,
522
+ 618,
523
+ 825,
524
+ 674
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "For the melody & performance autoencoder, we sample $7 1 7 \\ast 2$ distinct performances – we reserve one set of 717 for conditioning performance styles, and the other set of 717 we use to extract melodies in order to synthesize in the style of a different performance. We compare the melody & performance autoencoder to 3 different baselines: (1) one that is conditioned only on the melody (Melody-only); (2) conditioned only on performance (Performance-only); and (3) an unconditional language model. Interestingly, we find that the OA metric is more sensitive to the performance style than melodic similarity. Table 4 demonstrates that the Melody-only autoencoder suffers without the performance conditioning, while the Performance-only model performs best. The Melody & performance autoencoder performs comparably to the best model. ",
531
+ "bbox": [
532
+ 173,
533
+ 689,
534
+ 825,
535
+ 815
536
+ ],
537
+ "page_idx": 4
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "5.3 INTERPOLATIONS ",
542
+ "text_level": 1,
543
+ "bbox": [
544
+ 176,
545
+ 832,
546
+ 336,
547
+ 845
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "5.3.1 PERFORMANCE AUTOENCODER ",
554
+ "text_level": 1,
555
+ "bbox": [
556
+ 176,
557
+ 857,
558
+ 446,
559
+ 871
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "In this experiment, we test whether the performance autoencoder can successfully interpolate between different performances. First, we sample 1000 performances from the internal test set (100 for MAESTRO, due to its smaller size), and split this dataset in half. The first half we reserve for ",
566
+ "bbox": [
567
+ 176,
568
+ 882,
569
+ 823,
570
+ 924
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "table",
576
+ "img_path": "images/a2d9f2ffb6690827d30510f9470f7c6cac7f0f4e5a80a2d787ee6cbc8c0d2ef4.jpg",
577
+ "table_caption": [],
578
+ "table_footnote": [],
579
+ "table_body": "<table><tr><td>MAESTRO</td><td>ND</td><td>PR</td><td>MP</td><td>VP</td><td>MV</td><td>vv</td><td>MD</td><td>VD</td><td>Avg</td></tr><tr><td>Melody &amp; perf. (ours)</td><td>0.650</td><td>0.696</td><td>0.634</td><td>0.689</td><td>0.692</td><td>0.732</td><td>0.582</td><td>0.692</td><td>0.67</td></tr><tr><td>Perf-only (ours)</td><td>0.600</td><td>0.695</td><td>0.657</td><td>0.721</td><td>0.664</td><td>0.740</td><td>0.527</td><td>0.648</td><td>0.66</td></tr><tr><td>Melody-only</td><td>0.609</td><td>0.693</td><td>0.640</td><td>0.693</td><td>0.582</td><td>0.711</td><td>0.569</td><td>0.636</td><td>0.64</td></tr><tr><td>Unconditional</td><td>0.376</td><td>0.461</td><td>0.423</td><td>0.480</td><td>0.384</td><td>0.588</td><td>0.347</td><td>0.520</td><td>0.48</td></tr><tr><td>Internal Dataset</td><td colspan=\"9\"></td></tr><tr><td>Melody &amp; perf (ours)</td><td>0.646</td><td>0.708</td><td>0.610</td><td>0.717</td><td>0.590</td><td>0.706</td><td>0.658</td><td>0.743</td><td>0.67</td></tr><tr><td>Perf-only (ours)</td><td>0.624</td><td>0.646</td><td>0.624</td><td>0.638</td><td>0.422</td><td>0.595</td><td>0.601</td><td>0.702</td><td>0.61</td></tr><tr><td>Melody-only</td><td>0.575</td><td>0.707</td><td>0.662</td><td>0.718</td><td>0.583</td><td>0.702</td><td>0.634</td><td>0.707</td><td>0.66</td></tr><tr><td>Unconditional</td><td>0.476</td><td>0.580</td><td>0.541</td><td>0.594</td><td>0.400</td><td>0.585</td><td>0.522</td><td>0.623</td><td>0.54</td></tr></table>",
580
+ "bbox": [
581
+ 173,
582
+ 102,
583
+ 846,
584
+ 267
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "Table 4: Average overlapping area (OA) similarity metrics comparing models with different conditioning. Unconditional and Melody-only baselines are from (Huang et al., 2019b). The metrics are described in detail in Section 4. The samples in this quantitative comparison are used for the listener study shown in the right graph of Figure 4. ",
591
+ "bbox": [
592
+ 173,
593
+ 277,
594
+ 825,
595
+ 335
596
+ ],
597
+ "page_idx": 5
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "the original starting performance, which we call “performance A”, and the other half we reserve for the end performance, denoted as “performance B.” Then we use the performance encoder to encode performance A into its compressed representation $z _ { A }$ , and do the same for performance B to obtain $z _ { B }$ . For a range $\\alpha \\in [ 0 , 0 . 1 2 5 , \\hdots , 0 . 8 7 5 , 1 . 0 ]$ , we sample a new performance $\\mathrm { p e r f } _ { \\mathrm { n e w } }$ that results from decoding $\\alpha \\cdot z _ { A } + ( 1 - \\alpha ) \\cdot z _ { B }$ . We observe how the OA (averaged across all features) defined in Section 4 changes between this newly interpolated performance $\\mathrm { p e r f } _ { \\mathrm { n e w } }$ and performances $\\{ \\mathrm { A } , \\mathrm { B } \\}$ . ",
602
+ "bbox": [
603
+ 173,
604
+ 362,
605
+ 825,
606
+ 446
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "image",
612
+ "img_path": "images/9143cf4263afb01001cd56408b4e5d97dd06e0da98ce3b6b9819bac7c4a15181.jpg",
613
+ "image_caption": [
614
+ "Figure 2: For the internal dataset, the relative distance from performance A $( \\alpha = 1$ ) to the interpolated sample increases as $\\alpha$ is slowly increased to 1.0. "
615
+ ],
616
+ "image_footnote": [],
617
+ "bbox": [
618
+ 338,
619
+ 462,
620
+ 658,
621
+ 582
622
+ ],
623
+ "page_idx": 5
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "Specifically, we compute the similarity metric between each input performance A and interpolated sample $\\mathrm { p e r f } _ { \\mathrm { n e w } }$ for all 500 samples, and compute the same pairwise similarity for each performance B. We then compute the normalized distance between each interpolated sample and the corresponding performance A or B, which we denote as: rel distance(perf $\\begin{array} { r } { \\dot { { \\mathrm { ~ a ~ } } } ) \\ = 1 - \\ \\frac { \\mathsf { O A } - { \\mathrm { ~ \\mathbb { A } ~ } } } { \\mathsf { O A } - { \\mathrm { A } } \\ + \\ \\mathsf { O A } - { \\mathrm { B } } } } \\end{array}$ , where the OA is averaged across all features. We average this distance across all elements in the set and find in Figure 2 that the relative distance between performance A slowly increases as we increase $\\alpha$ from 0 to 1, as expected. We note that it is not possible to conduct this interpolation study with non-aggregated baselines, as we cannot interpolate across variable-length embeddings. We find that a similar trend holds for MAESTRO as in Figure 3(a). ",
628
+ "bbox": [
629
+ 173,
630
+ 638,
631
+ 825,
632
+ 763
633
+ ],
634
+ "page_idx": 5
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "5.3.2 MELODY & PERFORMANCE AUTOENCODER ",
639
+ "text_level": 1,
640
+ "bbox": [
641
+ 176,
642
+ 780,
643
+ 529,
644
+ 794
645
+ ],
646
+ "page_idx": 5
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "We conduct a similar study as above with the melody & performance autoencoder. We hold out 716 unique melody-performance pairs (melody is not derived from the same performance) from the internal evaluation dataset and 50 examples from MAESTRO. We then interpolate across the different performances, while keeping the conditioning melody input the same across the interpolations. ",
651
+ "bbox": [
652
+ 174,
653
+ 805,
654
+ 825,
655
+ 861
656
+ ],
657
+ "page_idx": 5
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "As shown in Figure 3(a), we find that a similar trend holds as in the performance autoencoder: the newly-interpolated samples show that the relative distance between performance A increases as we increase the corresponding value of $\\alpha$ . We note that the interpolation effect is slightly lower than that of the previous section, particularly because the interpolated sample is also dependent on the melody that it is conditioned on. Interestingly, in Figure 3(b), we note that the relative distance between the input performance from which we derived the original melody remains fairly constant across the interpolation procedure. This suggests that we are able to factorize out the two sources of variation and that varying the axis of the input performance keeps the variation in melody constant. ",
662
+ "bbox": [
663
+ 174,
664
+ 867,
665
+ 823,
666
+ 924
667
+ ],
668
+ "page_idx": 5
669
+ },
670
+ {
671
+ "type": "image",
672
+ "img_path": "images/75efeab00569c13b28563387655884feec0002aca2c13fab5b665278b73c3031.jpg",
673
+ "image_caption": [
674
+ "Figure 3: For the internal dataset, relative distance from performance A $\\alpha = 1$ ) as $\\alpha$ is slowly increased to 1.0 while the conditioned melody remains fixed. As in (b), we note that the relative distance to the fixed conditioning melody with respect to a random performance remains fixed while the interpolation is conducted between performances A and B, which shows that we can control for elements of style and melody separately. "
675
+ ],
676
+ "image_footnote": [],
677
+ "bbox": [
678
+ 174,
679
+ 99,
680
+ 792,
681
+ 228
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "",
688
+ "bbox": [
689
+ 174,
690
+ 338,
691
+ 825,
692
+ 393
693
+ ],
694
+ "page_idx": 6
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "5.4 HUMAN EVALUATION ",
699
+ "text_level": 1,
700
+ "bbox": [
701
+ 176,
702
+ 412,
703
+ 366,
704
+ 425
705
+ ],
706
+ "page_idx": 6
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "We also conducted listening studies to evaluate the perceived effect of performance and melody conditioning on the generated output. Using models trained on the internal dataset, we conducted two studies: one for performance conditioning, and one for melody and performance conditioning. ",
711
+ "bbox": [
712
+ 174,
713
+ 438,
714
+ 823,
715
+ 481
716
+ ],
717
+ "page_idx": 6
718
+ },
719
+ {
720
+ "type": "image",
721
+ "img_path": "images/709133722cd8eb5b31e91b6a93b84f89295eb2c658fb84eb35a1a695cc7617d7.jpg",
722
+ "image_caption": [
723
+ "Figure 4: Results of our listening studies, showing the number of times each source won in a pairwise comparison. Black error bars indicate estimated standard deviation of means. "
724
+ ],
725
+ "image_footnote": [],
726
+ "bbox": [
727
+ 173,
728
+ 492,
729
+ 795,
730
+ 604
731
+ ],
732
+ "page_idx": 6
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "For performance conditioning, we presented participants with a 20s performance clip from the evaluation dataset that we used as a conditioning signal. We then asked them to listen to two additional 20s performance clips and use a Likert scale to rate which one sounded most similar in style to the conditioning signal. The sources the participants rated included “Ground Truth” (a different snippet of the same sample used for the conditioning signal), “Conditioned” (output of the Performance Autoencoder), and “Unconditioned” (output of unconditional model). For this study, 492 ratings were collected, with each source involved in 328 pair-wise comparisons. ",
737
+ "bbox": [
738
+ 173,
739
+ 659,
740
+ 825,
741
+ 756
742
+ ],
743
+ "page_idx": 6
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "For melody and performance conditioning, we presented participants with a 20s performance clip from the evaluation dataset and a 20s melody from a different piece in the evaluation dataset that we used as our conditioning signals. We then asked them to listen to two additional 20s performance clips and use a Likert scale to rate which sounded most like the conditioning melody played in the style of the conditioning performance. The sources the participants rated included “Melody & Performance” (output of the Melody-Performance Autoencoder), “Melody only” (output of a model conditioned only on the melody signal), “Performance only” (output of a model conditioned only on the performance signal), and “Unconditioned” (output of an unconditional model). For this study, 714 ratings were collected, with each source involved in 357 pair-wise comparisons. ",
748
+ "bbox": [
749
+ 173,
750
+ 762,
751
+ 825,
752
+ 888
753
+ ],
754
+ "page_idx": 6
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "Figure 4 shows the number of comparisons in which each source was selected as being most similar in style to the conditioning signal. A Kruskal-Wallis H test of the ratings showed that there is at least one statistically significant difference between the models: $\\chi ^ { 2 } ( 2 ) = 3 3 2 . 0 9$ , $p < 0 . 0 5 \\ : ( 7 . 7 2 \\mathrm { e } - 7 3 )$ for melody conditioning and $\\chi ^ { 2 } ( 2 ) = 2 7 7 . 7 4$ , $p < 0 . 0 5$ $( 6 . 5 3 \\mathrm { e } - 6 0 )$ for melody and performance conditioning. A post-hoc analysis using the Wilcoxon signed-rank test with Bonferroni correction showed that there were statistically significant differences between all pairs of the performance study with $p < 0 . 0 5 / 3$ and all pairs of the performance and melody study with $p < 0 . 0 5 / 6$ except between the “Melody only” and “Melody & Performance” models $\\begin{array} { r } { p = 0 . 0 8 9 4 , } \\end{array}$ ). ",
759
+ "bbox": [
760
+ 173,
761
+ 895,
762
+ 823,
763
+ 924
764
+ ],
765
+ "page_idx": 6
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "",
770
+ "bbox": [
771
+ 174,
772
+ 103,
773
+ 823,
774
+ 188
775
+ ],
776
+ "page_idx": 7
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "These results demonstrate that the performance conditioning signal has a clear effect on the generated output. In fact, the effect was sufficiently robust that in the 164 comparisons between “Ground Truth” and “Conditioned”, participants said they had a preference for “Conditioned” 58 times. ",
781
+ "bbox": [
782
+ 174,
783
+ 194,
784
+ 825,
785
+ 236
786
+ ],
787
+ "page_idx": 7
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "Although the results between “Melody-only” and “Melody & Performance” are close, this study demonstrates that conditioning with both melody and performance outperforms conditioning on performance alone, and they are competitive with melody-only conditioning, despite the model having to deal with the complexity of incorporating both conditioning signals. In fact, we find quantitative evidence that human evaluation is more sensitive to melodic similarity, as the “Performance-only” model performs worst – a slight contrast to the results from the OA metric in Section 5.2. ",
792
+ "bbox": [
793
+ 174,
794
+ 243,
795
+ 825,
796
+ 327
797
+ ],
798
+ "page_idx": 7
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "We provide several audio examples demonstrating the effectiveness of these conditioning signals in the online supplement at http://bit.ly/2l14pYg. Our qualitative findings from the audio examples and interpolations, coupled with the quantitative results from the similarity metric and the listening test which capture different aspects of the synthesized performance, support the finding that the Melody & Performance autoencoder offers significant control over the generated samples. ",
803
+ "bbox": [
804
+ 176,
805
+ 334,
806
+ 825,
807
+ 404
808
+ ],
809
+ "page_idx": 7
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "6 RELATED WORK ",
814
+ "text_level": 1,
815
+ "bbox": [
816
+ 176,
817
+ 425,
818
+ 343,
819
+ 441
820
+ ],
821
+ "page_idx": 7
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "Sequential autoencoders: Building on the wealth of autoencoding literature (Hinton & Salakhutdinov, 2006; Salakhutdinov & Hinton, 2009; Vincent et al., 2010), our work bridges the gap between the traditional sequence-to-sequence framework (Sutskever et al., 2014), their recent advances with various attention mechanisms (Vaswani et al., 2017; Shaw et al., 2018; Huang et al., 2019b), and sequential autoencoders. Though (Wang & Wan, 2019) propose a Transformer-based conditional VAE for story generation, the self-attention mechanism is shared between the encoder and decoder. Most similar to our work is that of (Kaiser & Bengio, 2018), which uses a Transformer decoder and a discrete autoencoding function to map an input sequence into a discretized, compressed representation. We note that this approach is complementary to ours, where a similar idea of discretization may be applied to the output of our Transformer encoder. The MusicVAE (Roberts et al., 2018) is a sequential VAE with a hierarchical recurrent decoder, which learns an interpretable latent code for musical sequences that can be used during generation time. This work builds upon (Bowman et al., 2015) that uses recurrence and an autoregressive decoder for text generation. Our Transformer autoencoder can be seen as a deterministic variant of the MusicVAE, with a complex self-attention mechanism based on relative positioning in both the encoder and decoder to capture more expressive features of the data at both the local and global scale. ",
826
+ "bbox": [
827
+ 174,
828
+ 458,
829
+ 825,
830
+ 680
831
+ ],
832
+ "page_idx": 7
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "Controllable generations using representation learning: There is also a wide range of recent work on controllable generations, where we focus on the music domain. (Engel et al., 2017a) proposes to constrain the latent space of unconditional generative models to sample with respect to some predefined attributes, whereas we explicitly define our conditioning signal in the data space and learn a global representation of its style during training. The Universal Music Translation network aims to translate music across various styles, but is not directly comparable to our approach as they work with raw audio waveforms (Mor et al., 2018). Both (Meade et al., 2019) and MuseNet (Payne, 2019) generate music based on user preferences, but adopt a slightly different approach: the models are specifically trained with labeled tokens (e.g., composer and instrumentation) as conditioning input, while our Transformer autoencoder’s global style representation is learned in an unsupervised way. ",
837
+ "bbox": [
838
+ 174,
839
+ 688,
840
+ 825,
841
+ 827
842
+ ],
843
+ "page_idx": 7
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "7 CONCLUSION ",
848
+ "text_level": 1,
849
+ "bbox": [
850
+ 176,
851
+ 848,
852
+ 318,
853
+ 864
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "We proposed our Transformer autoencoder for conditional music generation, a sequential autoencoder model which utilizes an autoregressive Transformer encoder and decoder for improved modeling of musical sequences with long-term structure. We show that this model allows users to easily adapt the outputs of their generative model using even a single input performance. Through experiments on the MAESTRO and internal datasets, we demonstrate both quantitatively and qualitatively that our model generates samples that sound similar in style to a variety of conditioning signals relative to baselines. For future work, it would be interesting to explore other training procedures such as variational techniques or few-shot learning approaches to account for situations in which the input signals are from slightly different data distributions than the training set. ",
860
+ "bbox": [
861
+ 176,
862
+ 882,
863
+ 823,
864
+ 924
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "",
871
+ "bbox": [
872
+ 174,
873
+ 103,
874
+ 825,
875
+ 188
876
+ ],
877
+ "page_idx": 8
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "REFERENCES ",
882
+ "text_level": 1,
883
+ "bbox": [
884
+ 176,
885
+ 208,
886
+ 285,
887
+ 223
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "Pierre Baldi. Autoencoders, unsupervised learning, and deep architectures. In Proceedings of ICML workshop on unsupervised and transfer learning, pp. 37–49, 2012. ",
894
+ "bbox": [
895
+ 173,
896
+ 231,
897
+ 823,
898
+ 260
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015. ",
905
+ "bbox": [
906
+ 173,
907
+ 267,
908
+ 823,
909
+ 296
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Jesse Engel, Matthew Hoffman, and Adam Roberts. Latent constraints: Learning to generate conditionally from unconditional generative models. arXiv preprint arXiv:1711.05772, 2017a. ",
916
+ "bbox": [
917
+ 173,
918
+ 304,
919
+ 821,
920
+ 333
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Mohammad Norouzi, Douglas Eck, and Karen Simonyan. Neural audio synthesis of musical notes with wavenet autoencoders. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1068– 1077. JMLR. org, 2017b. ",
927
+ "bbox": [
928
+ 173,
929
+ 342,
930
+ 823,
931
+ 397
932
+ ],
933
+ "page_idx": 8
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Jesse Engel, Kumar Krishna Agrawal, Shuo Chen, Ishaan Gulrajani, Chris Donahue, and Adam Roberts. Gansynth: Adversarial neural audio synthesis. arXiv preprint arXiv:1902.08710, 2019. ",
938
+ "bbox": [
939
+ 171,
940
+ 405,
941
+ 823,
942
+ 435
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Jon Gillick, Adam Roberts, Jesse Engel, Douglas Eck, and David Bamman. Learning to groove with inverse sequence transformations. arXiv preprint arXiv:1905.06118, 2019. ",
949
+ "bbox": [
950
+ 171,
951
+ 443,
952
+ 823,
953
+ 472
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014. ",
960
+ "bbox": [
961
+ 173,
962
+ 479,
963
+ 823,
964
+ 522
965
+ ],
966
+ "page_idx": 8
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "David Ha and Douglas Eck. A neural representation of sketch drawings. arXiv preprint arXiv:1704.03477, 2017. ",
971
+ "bbox": [
972
+ 169,
973
+ 530,
974
+ 825,
975
+ 559
976
+ ],
977
+ "page_idx": 8
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Curtis Hawthorne, Andriy Stasyuk, Adam Roberts, Ian Simon, Cheng-Zhi Anna Huang, Sander Dieleman, Erich Elsen, Jesse Engel, and Douglas Eck. Enabling factorized piano music modeling and generation with the MAESTRO dataset. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ r1lYRjC9F7. ",
982
+ "bbox": [
983
+ 173,
984
+ 568,
985
+ 825,
986
+ 625
987
+ ],
988
+ "page_idx": 8
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. ",
993
+ "bbox": [
994
+ 176,
995
+ 632,
996
+ 820,
997
+ 661
998
+ ],
999
+ "page_idx": 8
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Cheng-Zhi Anna Huang, Tim Cooijmans, Adam Roberts, Aaron Courville, and Douglas Eck. Counterpoint by convolution. arXiv preprint arXiv:1903.07227, 2019a. ",
1004
+ "bbox": [
1005
+ 173,
1006
+ 669,
1007
+ 823,
1008
+ 698
1009
+ ],
1010
+ "page_idx": 8
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam Shazeer, Andrew M. Dai, Matthew D. Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer: Generating music with long-term structure. In International Conference on Learning Representations, 2019b. URL https://openreview.net/forum?id $=$ rJe4ShAcF7. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 705,
1018
+ 825,
1019
+ 762
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Hsiao-Tzu Hung, Chung-Yang Wang, Yi-Hsuan Yang, and Hsin-Min Wang. Improving automatic jazz melody generation by transfer learning techniques. arXiv preprint arXiv:1908.09484, 2019. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 770,
1029
+ 823,
1030
+ 800
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017. ",
1037
+ "bbox": [
1038
+ 173,
1039
+ 808,
1040
+ 825,
1041
+ 851
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint arXiv:1801.09797, 2018. ",
1048
+ "bbox": [
1049
+ 171,
1050
+ 858,
1051
+ 821,
1052
+ 887
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Diederik $\\mathrm { \\bf P }$ Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 895,
1062
+ 821,
1063
+ 924
1064
+ ],
1065
+ "page_idx": 8
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Nicholas Meade, Nicholas Barreyre, Scott C Lowe, and Sageev Oore. Exploring conditioning for generative music systems with human-interpretable controls. arXiv preprint arXiv:1907.04352, 2019. ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 103,
1073
+ 823,
1074
+ 146
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Noam Mor, Lior Wolf, Adam Polyak, and Yaniv Taigman. A universal music translation network. arXiv preprint arXiv:1805.07848, 2018. ",
1081
+ "bbox": [
1082
+ 171,
1083
+ 154,
1084
+ 823,
1085
+ 183
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 190,
1095
+ 823,
1096
+ 233
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Sageev Oore, Ian Simon, Sander Dieleman, Douglas Eck, and Karen Simonyan. This time with feeling: learning expressive musical performance. Neural Computing and Applications, pp. 1– 13, 2018. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 241,
1106
+ 825,
1107
+ 284
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 291,
1117
+ 825,
1118
+ 321
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Christine Payne. Musenet, 2019. URL https://openai.com/blog/musenet/. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 328,
1128
+ 751,
1129
+ 344
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Adam Roberts, Jesse Engel, Colin Raffel, Curtis Hawthorne, and Douglas Eck. A hierarchical latent vector model for learning long-term structure in music. arXiv preprint arXiv:1803.05428, 2018. ",
1136
+ "bbox": [
1137
+ 173,
1138
+ 352,
1139
+ 821,
1140
+ 381
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In Artificial intelligence and statistics, pp. 448–455, 2009. ",
1147
+ "bbox": [
1148
+ 171,
1149
+ 388,
1150
+ 823,
1151
+ 417
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 425,
1161
+ 823,
1162
+ 454
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Ian Simon, Cheng-Zhi Anna Huang, Jesse Engel, Curtis Hawthorne, and Monica Dinculescu. Generating piano music with transformer. 2019. URL https://magenta.tensorflow.org/ piano-transformer. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 462,
1172
+ 825,
1173
+ 506
1174
+ ],
1175
+ "page_idx": 9
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pp. 3483–3491, 2015. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 512,
1183
+ 823,
1184
+ 555
1185
+ ],
1186
+ "page_idx": 9
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances in neural information processing systems, pp. 3738–3746, 2016. ",
1191
+ "bbox": [
1192
+ 174,
1193
+ 563,
1194
+ 823,
1195
+ 606
1196
+ ],
1197
+ "page_idx": 9
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014. ",
1202
+ "bbox": [
1203
+ 169,
1204
+ 613,
1205
+ 821,
1206
+ 643
1207
+ ],
1208
+ "page_idx": 9
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Aaron Van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in neural information processing systems, pp. 4790–4798, 2016. ",
1213
+ "bbox": [
1214
+ 174,
1215
+ 650,
1216
+ 821,
1217
+ 694
1218
+ ],
1219
+ "page_idx": 9
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
1224
+ "bbox": [
1225
+ 176,
1226
+ 700,
1227
+ 823,
1228
+ 744
1229
+ ],
1230
+ "page_idx": 9
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008. ",
1235
+ "bbox": [
1236
+ 174,
1237
+ 752,
1238
+ 823,
1239
+ 796
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research, 11(Dec):3371–3408, 2010. ",
1246
+ "bbox": [
1247
+ 176,
1248
+ 803,
1249
+ 823,
1250
+ 845
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Tianming Wang and Xiaojun Wan. T-cvae: Transformer-based conditioned variational autoencoder for story completion. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pp. 5233–5239. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/727. URL https://doi.org/ 10.24963/ijcai.2019/727. ",
1257
+ "bbox": [
1258
+ 176,
1259
+ 854,
1260
+ 825,
1261
+ 922
1262
+ ],
1263
+ "page_idx": 9
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Li-Chia Yang and Alexander Lerch. On the evaluation of generative models in music. Neural Computing and Applications, pp. 1–12, 2018. ",
1268
+ "bbox": [
1269
+ 173,
1270
+ 103,
1271
+ 823,
1272
+ 132
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "APPENDIX ",
1279
+ "text_level": 1,
1280
+ "bbox": [
1281
+ 176,
1282
+ 103,
1283
+ 263,
1284
+ 117
1285
+ ],
1286
+ "page_idx": 11
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "A FURTHER DETAILS ON INPUT PERTURBATION PROCEDURE ",
1291
+ "bbox": [
1292
+ 176,
1293
+ 133,
1294
+ 609,
1295
+ 147
1296
+ ],
1297
+ "page_idx": 11
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "We elaborate upon the perturbation procedure as follows, which only applies to the melody & performance conditioning music generation task. First, we take a target performance that we would like our model to predict and extract the corresponding melody from this performance. We use this “clean” melody as part of our conditioning signal. Then, we modify the conditioning performance by either shifting the pitch up or down 6 semitones and stretching the timing by $\\pm 5 \\%$ . Then for each new data point during training, a single noise injection procedure is randomly sampled from the cross product of all possible combinations of 12 pitch shift values and 4 time stretch values (evaluated in intervals of $2 . 5 \\%$ ). At test time, the data points are left unperturbed. ",
1302
+ "bbox": [
1303
+ 174,
1304
+ 160,
1305
+ 825,
1306
+ 271
1307
+ ],
1308
+ "page_idx": 11
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "B NLL EVALUATION FOR ”NOISY” MODEL ",
1313
+ "text_level": 1,
1314
+ "bbox": [
1315
+ 176,
1316
+ 287,
1317
+ 486,
1318
+ 301
1319
+ ],
1320
+ "page_idx": 11
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Below, we provide the note-wise test NLL on the MAESTRO and internal datasets with melody conditioning, where the conditioning performance is perturbed by the procedure outlined in Section 3. ",
1325
+ "bbox": [
1326
+ 176,
1327
+ 314,
1328
+ 823,
1329
+ 343
1330
+ ],
1331
+ "page_idx": 11
1332
+ },
1333
+ {
1334
+ "type": "table",
1335
+ "img_path": "images/743e474368fbf561237b0c29fe3d5975e4bbc36327b4ae2809973edb592256c7.jpg",
1336
+ "table_caption": [
1337
+ "Table 5: Note-wise test NLL on the MAESTRO and internal piano performance datasets with melody conditioning, with event-based representations of lengths $L = 2 0 4 8$ . "
1338
+ ],
1339
+ "table_footnote": [],
1340
+ "table_body": "<table><tr><td>Model variation</td><td>MAESTRO</td><td> internal Dataset</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, sum</td><td>1.721</td><td>1.248</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, concat</td><td>1.719</td><td>1.249</td></tr><tr><td>Noisy Melody TF autoencoder with relative attention, tile</td><td>1.728</td><td>1.253</td></tr></table>",
1341
+ "bbox": [
1342
+ 178,
1343
+ 367,
1344
+ 820,
1345
+ 438
1346
+ ],
1347
+ "page_idx": 11
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "C ADDITIONAL DETAILS ON MODEL TRAINING PROCEDURE ",
1352
+ "bbox": [
1353
+ 174,
1354
+ 512,
1355
+ 607,
1356
+ 526
1357
+ ],
1358
+ "page_idx": 11
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "We emphasize that the Transformer is trained in an autoencoder-like fashion. Specifically, for performance-only conditioning, the Transforemr decoder is tasked with predicting the same performance that was fed as input to the encoder. In this way, we encourage the model to learn global representations (the mean-aggregated performance embedding from the encoder) that will faithfully be able to reconstruct the input performance. For melody performance conditioning, the Transformer autoencoder is trained to predict a new performance using the combined melody+performance embedding, where the loss is computed with respect to the conditioned input performance that is provided to the encoder. ",
1363
+ "bbox": [
1364
+ 174,
1365
+ 537,
1366
+ 825,
1367
+ 650
1368
+ ],
1369
+ "page_idx": 11
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "D MODEL ARCHITECTURE AND HYPERPARAMETER CONFIGURATIONS ",
1374
+ "text_level": 1,
1375
+ "bbox": [
1376
+ 176,
1377
+ 667,
1378
+ 674,
1379
+ 681
1380
+ ],
1381
+ "page_idx": 11
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "text": "We mostly use the default Transformer architecture as provided in the Tensor2Tensor framework, such as 8 self-attention heads as listed in the main text, and list the slight adjustments we made for each dataset below: ",
1386
+ "bbox": [
1387
+ 174,
1388
+ 693,
1389
+ 825,
1390
+ 734
1391
+ ],
1392
+ "page_idx": 11
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "text": "D.1 MAESTRO ",
1397
+ "text_level": 1,
1398
+ "bbox": [
1399
+ 174,
1400
+ 750,
1401
+ 302,
1402
+ 765
1403
+ ],
1404
+ "page_idx": 11
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "For the MAESTRO dataset, we follow the hyperparameter setup of (Huang et al., 2019b): ",
1409
+ "bbox": [
1410
+ 173,
1411
+ 775,
1412
+ 758,
1413
+ 790
1414
+ ],
1415
+ "page_idx": 11
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "1. num hidden layers $= 6$ \n2. hidden units $= 3 8 4$ \n3. filter size $= 1 0 2 4$ \n4. maximum sequence length $= 2 0 4 8$ \n5. maximum relative distance $=$ half the hidden size \n6. dropout $= 0 . 1$ ",
1420
+ "bbox": [
1421
+ 210,
1422
+ 801,
1423
+ 555,
1424
+ 911
1425
+ ],
1426
+ "page_idx": 11
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "D.2 INTERNAL DATASET ",
1431
+ "text_level": 1,
1432
+ "bbox": [
1433
+ 174,
1434
+ 103,
1435
+ 357,
1436
+ 118
1437
+ ],
1438
+ "page_idx": 12
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "For the internal dataset, we modify the number of hidden layers to 8 and slightly increase the level of dropout. ",
1443
+ "bbox": [
1444
+ 171,
1445
+ 127,
1446
+ 825,
1447
+ 156
1448
+ ],
1449
+ "page_idx": 12
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "1. num hidden layers $= 8$ \n2. hidden units $= 3 8 4$ \n3. filter size $= 1 0 2 4$ \n4. maximum sequence length $= 2 0 4 8$ \n5. maximum relative distance $=$ half the hidden size \n6. dropout $= 0 . 1 5$ ",
1454
+ "bbox": [
1455
+ 210,
1456
+ 167,
1457
+ 557,
1458
+ 277
1459
+ ],
1460
+ "page_idx": 12
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "E INTERPOLATIONS DETAILS ",
1465
+ "text_level": 1,
1466
+ "bbox": [
1467
+ 173,
1468
+ 294,
1469
+ 390,
1470
+ 308
1471
+ ],
1472
+ "page_idx": 12
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Interpolation relative distance results for the (a) performance and (b) melody & performance Transformer autoencoders for the MAESTRO dataset. ",
1477
+ "bbox": [
1478
+ 174,
1479
+ 320,
1480
+ 823,
1481
+ 348
1482
+ ],
1483
+ "page_idx": 12
1484
+ },
1485
+ {
1486
+ "type": "image",
1487
+ "img_path": "images/00947a914d6f11b4f28e5ab82a6459e872ffdb95d5e4faee942d111deebf480b.jpg",
1488
+ "image_caption": [],
1489
+ "image_footnote": [],
1490
+ "bbox": [
1491
+ 176,
1492
+ 359,
1493
+ 460,
1494
+ 465
1495
+ ],
1496
+ "page_idx": 12
1497
+ },
1498
+ {
1499
+ "type": "image",
1500
+ "img_path": "images/7c9073195f56bbc57d2a14c7a45342f17da059b1fc837236892d6730e164904f.jpg",
1501
+ "image_caption": [
1502
+ "(b) Relative distance from the interpolated sample to the original melody, which is kept fixed. "
1503
+ ],
1504
+ "image_footnote": [],
1505
+ "bbox": [
1506
+ 504,
1507
+ 359,
1508
+ 790,
1509
+ 465
1510
+ ],
1511
+ "page_idx": 12
1512
+ },
1513
+ {
1514
+ "type": "text",
1515
+ "text": "(a) Relative distance from interpolated sample to the original starting performance. ",
1516
+ "bbox": [
1517
+ 173,
1518
+ 473,
1519
+ 493,
1520
+ 498
1521
+ ],
1522
+ "page_idx": 12
1523
+ },
1524
+ {
1525
+ "type": "text",
1526
+ "text": "Figure 5: The distance to the original performance increases as the value of $\\alpha$ increases in (a), as expected. In (b), we see that there is a very slight increase in the relative distance to the original melody during the interpolation procedure. ",
1527
+ "bbox": [
1528
+ 173,
1529
+ 510,
1530
+ 825,
1531
+ 553
1532
+ ],
1533
+ "page_idx": 12
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "F INTERNAL DATASET PERFORMANCE INTERPOLATIONS ",
1538
+ "text_level": 1,
1539
+ "bbox": [
1540
+ 173,
1541
+ 103,
1542
+ 578,
1543
+ 117
1544
+ ],
1545
+ "page_idx": 13
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "Here, we provide piano rolls demonstrating the effects of latent-space interpolation for the internal dataset, for both the (a) performance and (b) melody & performance Transformer autoencoder. For similar results in MAESTRO as well as additional listening samples, we refer the reader to the online supplement: http://bit.ly/2l14pYg. ",
1550
+ "bbox": [
1551
+ 174,
1552
+ 128,
1553
+ 825,
1554
+ 185
1555
+ ],
1556
+ "page_idx": 13
1557
+ },
1558
+ {
1559
+ "type": "image",
1560
+ "img_path": "images/b66a13d74361917ee7ccccacc6121b5c49899e962dcd86bd78a1a467af26109b.jpg",
1561
+ "image_caption": [
1562
+ "Figure 6: Interpolation of a starting performance (a) from the internal dataset to a final performance (h), with the coefficient $\\alpha$ controlling the level of interpolation between the latent encodings between the two performances. "
1563
+ ],
1564
+ "image_footnote": [],
1565
+ "bbox": [
1566
+ 176,
1567
+ 199,
1568
+ 777,
1569
+ 637
1570
+ ],
1571
+ "page_idx": 13
1572
+ },
1573
+ {
1574
+ "type": "image",
1575
+ "img_path": "images/ba9cf42e5f640a7644af8396e335d8e5ca1c273744f87052f503d4dd8e3d7b41.jpg",
1576
+ "image_caption": [
1577
+ "Figure 7: Interpolation of a starting performance (b) from the internal dataset to a final performance (j), with the coefficient $\\alpha$ controlling the level of interpolation between the latent encodings between the two performances. The original conditioning melody (a) is kept fixed throughout the interpolation. "
1578
+ ],
1579
+ "image_footnote": [],
1580
+ "bbox": [
1581
+ 174,
1582
+ 131,
1583
+ 777,
1584
+ 684
1585
+ ],
1586
+ "page_idx": 14
1587
+ }
1588
+ ]
parse/train/Hkg9HgBYwH/Hkg9HgBYwH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hkg9HgBYwH/Hkg9HgBYwH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeJf1HKvS/HyeJf1HKvS.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeJf1HKvS/HyeJf1HKvS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeJf1HKvS/HyeJf1HKvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeJf1HKvS/HyeJf1HKvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/OMizHuea_HB/OMizHuea_HB.md ADDED
@@ -0,0 +1,507 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ACTIVE CONTRASTIVE LEARNING OF AUDIO-VISUAL VIDEO REPRESENTATIONS
2
+
3
+ Shuang Ma∗ Microsoft Redmond, WA, USA
4
+
5
+ Zhaoyang Zeng∗ Sun Yat-sen University Guangzhou, China
6
+
7
+ Daniel McDuff Microsoft Research Redmond, WA, USA
8
+
9
+ Yale Song Microsoft Research Redmond, WA, USA
10
+
11
+ # ABSTRACT
12
+
13
+ Contrastive learning has been shown to produce generalizable representations of audio and visual data by maximizing the lower bound on the mutual information (MI) between different views of an instance. However, obtaining a tight lower bound requires a sample size exponential in MI and thus a large set of negative samples. We can incorporate more samples by building a large queue-based dictionary, but there are theoretical limits to performance improvements even with a large number of negative samples. We hypothesize that random negative sampling leads to a highly redundant dictionary that results in suboptimal representations for downstream tasks. In this paper, we propose an active contrastive learning approach that builds an actively sampled dictionary with diverse and informative items, which improves the quality of negative samples and improves performances on tasks where there is high mutual information in the data, e.g., video classification. Our model achieves state-of-the-art performance on challenging audio and visual downstream benchmarks including UCF101, HMDB51 and ESC50.1
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Contrastive learning of audio and visual representations has delivered impressive results on various downstream scenarios (Oord et al., 2018; Henaff et al., 2019; Schneider et al., 2019; Chen et al., ´ 2020). This self-supervised training process can be understood as building a dynamic dictionary per mini-batch, where “keys” are typically randomly sampled from the data. The encoders are trained to perform dictionary look-up: an encoded “query” should be similar to the value of its matching key and dissimilar to others. This training objective maximizes a lower bound of mutual information (MI) between representations and the data (Hjelm et al., 2018; Arora et al., 2019). However, such lower bounds are tight only for sample sizes exponential in the MI (McAllester & Stratos, 2020), suggesting the importance of building a large and consistent dictionary across mini-batches.
18
+
19
+ Recently, He et al. (2020) designed Momentum Contrast (MoCo) that builds a queue-based dictionary with momentum updates. It achieves a large and consistent dictionary by decoupling the dictionary size from the GPU/TPU memory capacity. However, Arora et al. (2019) showed that simply increasing the dictionary size beyond a threshold does not improve (and sometimes can even harm) the performance on downstream tasks. Furthermore, we find that MoCo can suffer when there is high redundancy in the data, because only relevant – and thus limited – parts of the dictionary are updated in each iteration, ultimately leading to a dictionary of redundant items (we show this empirically in Fig. 3). We argue that random negative sampling is much responsible for this: a randomly constructed dictionary will contain more “biased keys” (similar keys that belong to the same class) and “ineffective keys” (keys that can be easily discriminated by the current model) than a carefully constructed one. Furthermore, this issue can get aggravated when the dictionary size is large.
20
+
21
+ In this paper, we focus on learning audio-visual representations of video data by leveraging the natural correspondence between the two modalities, which serves as a useful self-supervisory signal (Owens & Efros, 2018; Owens et al., 2016; Alwassel et al., 2019). Our starting point is contrastive learning (Gutmann & Hyvarinen, 2010; Oord et al., 2018) with momentum updates (He et al., 2020). ¨
22
+
23
+ However, as we discussed above, there are both practical challenges and theoretical limits to the dictionary size. This issue is common to all natural data but is especially severe in video; successive frames contain highly redundant information, and from the information-theoretic perspective, audiovisual channels of video data contain higher MI than images because the higher dimensionality – i.e., temporal and multimodal – reduces the uncertainty between successive video clips. Therefore, a dictionary of randomly sampled video clips would contain highly redundant information, causing the contrastive learning to be ineffective. Therefore, we propose an actively sampled dictionary to sample informative and diverse set of negative instances. Our approach is inspired by active learning (Settles, 2009) that aims to identify and label only the maximally informative samples, so that one can train a high-performing classifier with minimal labeling effort. We adapt this idea to construct a non-redundant dictionary with informative negative samples.
24
+
25
+ Our approach, Cross-Modal Active Contrastive Coding (CM-ACC), learns discriminative audiovisual representations and achieves substantially better results on video data with a high amount of redundancy (and thus high MI). We show that our actively sampled dictionary contains negative samples from a wider variety of semantic categories than a randomly sampled dictionary. As a result, our approach can benefit from large dictionaries even when randomly sampled dictionaries of the same size start to have a deleterious effect on model performance. When pretrained on AudioSet (Gemmeke et al., 2017), our approach achieves new state-of-the-art classification performance on UCF101 (Soomro et al., 2012), HMDB51 (Kuehne et al., 2011), and ESC50 (Piczak, 2015b).
26
+
27
+ # 2 BACKGROUND
28
+
29
+ Contrastive learning optimizes an objective that encourages similar samples to have similar representations than with dissimilar ones (called negative samples) (Oord et al., 2018):
30
+
31
+ $$
32
+ \operatorname* { m i n } _ { \theta _ { f } , \theta _ { h } } \mathbb { E } _ { x \sim p _ { \mathcal { X } } } \left[ - l o g \left( \frac { e ^ { f ( x ; \theta _ { f } ) ^ { \top } h ( x ^ { + } ; \theta _ { h } ) } } { e ^ { f ( x ; \theta _ { f } ) ^ { \top } h ( x ^ { + } ; \theta _ { h } ) } + e ^ { f ( x ; \theta _ { f } ) ^ { \top } h ( x ^ { - } ; \theta _ { h } ) } } \right) \right]
33
+ $$
34
+
35
+ The samples $x ^ { + }$ and $x ^ { - }$ are drawn from the same distribution as $x \in \mathcal { X }$ , and are assumed to be similar and dissimilar to $x$ , respectively. The objective encourages $f ( \cdot )$ and $h ( \cdot )$ to learn representations of $x$ such that $( x , x ^ { + } )$ have a higher similarity than all the other pairs of $( x , x ^ { - } )$ .
36
+
37
+ We can interpret it as a dynamic dictionary look-up process: Given a “query” $x$ , it finds the correct “key” $x ^ { + }$ among the other irrelevant keys $x ^ { - }$ in a dictionary. Denoting the query by $q = f ( x )$ , the correct key by $k ^ { + } = h ( x ^ { + } )$ , and the dictionary of $K$ negative samples by $\{ k _ { i } = h ( x _ { i } ) \} , i \in [ 1 , K ]$ , we can express equation 1 in a softmax form, $\begin{array} { r } { \operatorname* { m i n } _ { \theta _ { q } , \theta _ { k } } \mathbb { E } _ { { x } \sim { p x } } \left[ - l o g \frac { { e ^ { { q \cdot k ^ { + } } / { \tau } } } } { \sum _ { i = 0 } ^ { K } e ^ { { q \cdot k _ { i } } / { \tau } } } \right] } \end{array}$ , where $\theta _ { q }$ and $\theta _ { k }$ are parameters of the query and key encoders, respectively, and $\tau$ is a temperature term that controls the shape of the probability distribution computed by the softmax function.
38
+
39
+ Momentum Contrast $\mathbf { ( M o C 0 ) }$ decouples the dictionary size from the mini-batch size by implementing a queue-based dictionary, i.e., current mini-batch samples are enqueued while the oldest are dequeued (He et al., 2020). It then applies momentum updates to parameters of a key encoder $\theta _ { k }$ with respect to parameters of a query encoder, $\theta _ { k } \gets m \bar { \theta _ { k } } + ( 1 - \bar { m } ) \theta _ { q }$ , where $m \in [ 0 , 1 )$ is a momentum coefficient. Only the parameters $\theta _ { q }$ are updated by back-propagation, while the parameters $\theta _ { k }$ are defined as a moving average of $\theta _ { q }$ with exponential smoothing. These two modifications allow MoCo to build a large and slowly-changing (and thus consistent) dictionary.
40
+
41
+ Theoretical Limitations of Contrastive Learning. Recent work provides theoretical analysis of the shortcomings of contrastive learning. McAllester & Stratos (2020) show that lower bounds to the MI are only tight for sample size exponential in the MI, suggesting that a large amount of data are required to achieve a tighter lower bound on MI. He et al. (2020) empirically showed that increasing negative samples has shown to improve the learned presentations. However, Arora et al. (2019) showed that such a phenomenon does not always hold: Excessive negative samples can sometimes hurt performance. Also, when the number of negative samples is large, the chance of sampling redundant instances increases, limiting the effectiveness of contrastive learning. One of our main contributions is to address this issue with active sampling of negative instances, which reduces redundancy and improves diversity, leading to improved performance on various downstream tasks.
42
+
43
+ ![](images/845b45e610d4e5defefab8b4d45c8ba5ee52e98a4d52bda717db72fd253c3e20.jpg)
44
+ Figure 1: (a) We extend contrastive learning to the cross-modal scenario and adapt momentum contrast (MoCo) (He et al., 2020) to the dictionary update. Different from all existing work, we propose an active learning idea to the negative sampling. (b) To sample negatives, we use the gradient space of our key encoders to estimate the uncertainty of each candidate in audio/visual pools, and take a diverse set of negatives in that space using the $k – \mathbf { M E A N S } _ { \mathrm { I N I T } } ^ { + + }$ algorithm.
45
+
46
+ # 3 APPROACH
47
+
48
+ # 3.1 CROSS-MODAL CONTRASTIVE REPRESENTATION LEARNING
49
+
50
+ Our learning objective encourages the representations of audio and visual clips to be similar if they come from the same temporal block of a video. Let $A = \left\{ a _ { 0 } , \cdot \cdot \cdot , a _ { N - 1 } \right\}$ and $V = \{ v _ { 0 } , \cdot \cdot \cdot , v _ { N - 1 } \}$ be collections of audio and visual clips, where each pair $( a _ { i } , v _ { i } )$ is from the same block of a video. We define query encoders $f _ { a }$ and $f _ { v }$ and key encoders $h _ { a }$ and $h _ { v }$ for audio and visual clips, respectively, with learnable parameters $\{ \theta _ { q _ { . } } ^ { a } , \theta _ { q } ^ { v } \}$ for the query encoders and $\{ \theta _ { k } ^ { a } , \theta _ { k } ^ { v } \}$ for the key encoders. These encoders compute representations of audio and visual clips as queries and keys,
51
+
52
+ $$
53
+ q ^ { v } = f _ { v } ( v ^ { q u e r y } ) , \quad k ^ { v } = h _ { v } ( v ^ { k e y } ) , \quad q ^ { a } = f _ { a } ( a ^ { q u e r y } ) , \quad k ^ { a } = h _ { a } ( a ^ { k e y } )
54
+ $$
55
+
56
+ We train our encoders to perform cross-modal dictionary look-up, e.g., given a query video clip $v ^ { q u e r y }$ , we find the corresponding audio clip $a ^ { k e y }$ from a dictionary $D _ { a }$ . Adapting MoCo (He et al., 2020) to our cross-modal setup, we implement a queue-based dictionary $D _ { a }$ that stores keys of audio clips $\{ k _ { i } ^ { a } \} _ { i = 1 } ^ { K }$ , where $K$ is the dictionary size. We compute the contrastive loss and backpropagate the gradients only to the visual query encoder $f _ { v }$ and update the parameters $\theta _ { q } ^ { v }$ . For the audio encoder $h _ { a }$ , we apply the momentum update (He et al., 2020),
57
+
58
+ $$
59
+ \theta _ { k } ^ { a } m \theta _ { k } ^ { a } + ( 1 - m ) \theta _ { q } ^ { a }
60
+ $$
61
+
62
+ The parameter $\theta _ { g } ^ { a }$ is not updated in this contrastive coding step; we update it during the audio-tovisual step (similar as above with the opposite modalities). Here we explain the visual-to-audio step only; we perform bi-directional contrastive coding and train the whole model end-to-end.
63
+
64
+ # 3.2 ACTIVE SAMPLING OF NEGATIVE INSTANCES: UNCERTAINTY AND DIVERSITY
65
+
66
+ The quality of negative samples is crucial in contrastive learning. Existing work typically adopts random negative sampling. However, we want a diverse set of negative samples so that comparisons between positive and negative pairs are the most informative they can be. Motivated by active learning (Settles, 2009), we propose a gradient-based active sampling approach to improve the quality of negative samples. In active learning, the learner chooses samples that seem maximally informative and queries an oracle for labels to obtain an optimal solution with a minimal labeling budget. Adapting this to our setting, we can empower the learner to choose the maximally informative negative samples to construct a dictionary; the main question is how to measure the informativeness of samples without labels.
67
+
68
+ One way to measure informativeness is through the lens of uncertainty: If a model is highly uncertain about its prediction of a sample, we can ensure the maximum update to the model by including the sample in a mini-batch (conversely, if the uncertainly is low for all samples in a mini-batch, the model update will be small). Ash et al. (2020) showed that gradients of a loss function with respect to the model’s most confident predictions can approximate the uncertainty of samples, demonstrating its effectiveness in active learning. They provide a theoretical justification by showing that gradient norms of the last layer of a neural network with respect to pseudo-labels provides a lower bound on gradient norms induced by any other labels. In this work, we use gradients of the last layer to measure the uncertainty and encourage our model to include samples that have the highest gradient magnitudes to constitute a dictionary.
69
+
70
+ While the uncertainty of each individual samples is important, the diversity of samples is also a critical measure of informativeness. Intuitively, it is possible that a model is highly uncertain about samples from particular semantic categories, but constructing a mini-batch of samples from just those categories can severely bias gradients and ultimately lead to a bad local minima. There are several principled approaches to ensure diversity, e.g., submodular optimization (Fujishige, 2005) and Determinantal Point Processes (DPP) (Macchi, 1975; Kulesza & Taskar, 2011). Unfortunately, those methods are typically inefficient because of the combinatorial search space (Nemhauser et al., 1978; Gilks et al., 1995). In this work, instead of using the expensive solutions, we opt to the fast solution of Ash et al. (2020) and use the initialization scheme of the $k – \mathbf { M E A N S } { + + }$ seeding algorithm (Arthur & Vassilvitskii, 2007) to sample a diverse set of negative samples.
71
+
72
+ # 3.3 CROSS-MODAL ACTIVE CONTRASTIVE CODING
73
+
74
+ Algorithm 1 describes our proposed cross-modal active contrastive coding (we provide a simplified version here; we include a more detailed version and another version without active sampling in Appendix). At a high-level, we initialize the dictionaries $D _ { v }$ and $D _ { a }$ with $K$ randomly drawn samples from $V$ and $A$ , respectively (lines 3-4). For each epoch, we construct “negative candidate pools” $U _ { v }$ and $U _ { a }$ with $N$ random samples from $V$ and $A$ , respectively (lines $6 - 7$ ). For each iteration within an epoch, we actively select the most informative negative samples $S _ { v }$ and $S _ { a }$ from the pools $U _ { v }$ and $U _ { a }$ , respectively, and enqueue them into the dictionaries $D _ { v }$ and $D _ { a }$ , respectively (lines $9 - 2 1 )$ . We then perform cross-modal contrastive coding, update the parameters of query encoders $\theta _ { a } ^ { v }$ and $\theta _ { q } ^ { a }$ via backpropagation, and apply momentum updates to the parameters of key encoders $\theta _ { k } ^ { \vec { v } }$ and $\theta _ { k } ^ { a ^ { \prime } }$ (lines 22-27).
75
+
76
+ # Algorithm 1 Cross-Modal Active Contrastive Coding
77
+
78
+ 1: Require: Audio-visual clips $A , V$ ; encoders $f _ { v }$ , $f _ { a }$ , $h _ { v }$ , $h _ { a }$ ; dictionary size $K$ ; pool size $N$ ; batch size $M$
79
+ 2: Initialize parameters, $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a } \sim U n i f o r m ( 0 , 1 )$
80
+ 3: Draw random dictionary, $D _ { v } \{ v _ { 1 } , \cdot \cdot \cdot , v _ { K } \} \sim V$ , $D _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { K } \} \sim A$
81
+ 4: Encode dictionary samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in D _ { v }$ , $k _ { i } ^ { a } \gets h _ { a } ( a _ { i } ) , \forall a _ { i } \in D _ { a }$
82
+ 5: for epoch $= 1$ to #epochs: do
83
+ 6: Draw random pool, $U _ { v } \gets \{ v _ { 1 } , \cdot \cdot \cdot , v _ { N } \} \sim V$ , $U _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { N } \} \sim A$
84
+ 7: Encode pool samples, $k _ { n } ^ { v } h _ { v } ( v _ { n } ) , \forall v _ { n } \in U _ { v }$ , $k _ { n } ^ { a } h _ { a } ( a _ { n } ) , \forall a _ { n } \in U _ { a }$
85
+ 8: for $t = 1$ to #mini-batches: do
86
+ 9: Draw mini-batch, $B _ { v } \{ v _ { 1 } , \cdot \cdot \cdot , v _ { M } \} \sim V$ , $B _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { M } \} \sim A$
87
+ 10: . Active sampling of negative video keys for $D _ { v }$
88
+ 11: Encode mini-batch samples, $q _ { i } ^ { a } \gets f _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
89
+ 12: Compute pseudo-labels, $\tilde { y } _ { n } ^ { v } \gets \arg \operatorname* { m a x } { p ( \hat { y } _ { n } ^ { v } | v _ { n } , B _ { a } ) , \forall v _ { n } \in U _ { v } \backslash D _ { v } }$
90
+ 13: Compute gradients $g _ { v _ { n } }$ using the pseudo-labels $\tilde { y } _ { n } ^ { v }$ , $\forall n \in [ 1 , N ]$
91
+ 14: Obtain $S _ { v } \gets k \mathrm { - M E A N S _ { I N I T } ^ { + + } }$ $\{ g _ { v _ { n } } : v _ { n } \in U _ { v } \backslash D _ { v } \}$ , #seeds $= M$ )
92
+ 15: Update $D _ { v } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( D _ { v } ) , S _ { v } \big )$
93
+ 16: . Active sampling of negative audio keys for $D _ { a }$
94
+ 17: Encode mini-batch samples, $q _ { i } ^ { v } f _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$
95
+ 18: Compute pseudo-label, $\tilde { y } _ { n } ^ { a } \gets \arg \operatorname* { m a x } p ( \hat { y } _ { n } ^ { a } | a _ { n } , B _ { v } ) , \forall a _ { n } \in U _ { a } \backslash D _ { a }$
96
+ 19: Compute gradients $g _ { a _ { n } }$ using the pseudo-labels ${ \tilde { y } } _ { n } ^ { a }$ , $\forall n \in [ 1 , N ]$
97
+ 20: Obtain $S _ { a } \gets k \mathrm { – M E A N S _ { I N I T } ^ { + + } }$ $\{ g _ { a _ { n } } : a _ { n } \in U _ { a } \backslash D _ { a } \}$ , #seeds $= M$ )
98
+ 21: Update ${ \cal D } _ { a } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( { \cal D } _ { a } ) , { \cal S } _ { a } \big )$
99
+ 22: . Cross-modal contrastive predictive coding
100
+ 23: Encode mini-batch samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$ , $k _ { i } ^ { a } \gets h _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
101
+ 24: Compute $p ( y _ { i } ^ { v } | v _ { i } , a _ { i } , D _ { a } )$ and $p ( y _ { i } ^ { a } | a _ { i } , v _ { i } , D _ { v } ) , \forall i \in [ 1 , M ]$
102
+ 25: $\triangleright$ Update model parameters
103
+ 26: Update parameters of query encoders $\theta _ { q } ^ { v }$ and $\theta _ { q } ^ { a }$ with backpropagation
104
+ 27: Momentum update parameters of key encoders $\theta _ { k } ^ { v }$ and $\theta _ { k } ^ { a }$
105
+ 28: end for
106
+ 29: end for
107
+ 30: return Optimal solution $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a }$
108
+
109
+ Active sampling. To measure uncertainty, we define a pseudo-label space induced by the queries from the other modality, and take the gradient of the last layer of a query encoder with respect to the most confident prediction, which we call the pseudo-label $\tilde { y }$ . For instance, in the case of sampling negative video keys from the pool $U _ { v }$ (lines 10-15), we compute the pseudo-posterior of a video key $v _ { n } \in U _ { v } \backslash D _ { a }$ ,
110
+
111
+ $$
112
+ p ( \boldsymbol { \hat { y } } _ { n } ^ { v } | v _ { n } , B _ { a } ) = \frac { \exp ( k _ { n } ^ { v } \cdot q _ { j } ^ { a } ) } { \sum _ { i = 1 } ^ { M } \exp ( k _ { n } ^ { v } \cdot q _ { i } ^ { a } ) } , \forall j \in [ 1 , M ]
113
+ $$
114
+
115
+ where $B _ { a }$ is the current mini-batch of audio queries and defines the pseudo-label space. Note that we consider only the samples in $U _ { v } \backslash D _ { v }$ to rule out samples already in $D _ { v }$ . Intuitively, this computes the posterior by the dot-product similarity between $v _ { n }$ and all $q _ { i } ^ { a } \in B _ { a }$ , producing an $M$ -dimensional probability distribution. We then take the most confident class category as the pseudo-label $\tilde { y } _ { n } ^ { v }$ (line 12) and compute the gradient according to the cross-entropy loss
116
+
117
+ $$
118
+ g _ { v _ { n } } = \frac \partial { \partial \theta _ { l a s t } } \mathcal { L } _ { C E } \left( p ( \hat { y } _ { n } ^ { v } | v _ { n } , B _ { a } ) , \tilde { y } _ { n } ^ { v } \right) | _ { \theta = \theta _ { q } ^ { a } }
119
+ $$
120
+
121
+ where $\theta _ { l a s t }$ is the parameters of the last layer of $\theta$ (in this case, $\theta _ { q } ^ { a }$ of the audio query encoder $h _ { a }$ ). Intuitively, the gradient $g _ { v _ { n } }$ measures the amount of change – and thus, the uncertainty $\mathbf { \Sigma } - v _ { n }$ will bring to the audio query encoder $h _ { a }$ .
122
+
123
+ One can interpret this as a form of online hard negative mining: The gradient is measured with respect to the most probable pseudo-label $\tilde { y } _ { n } ^ { v }$ induced by the corresponding audio query $q _ { j } ^ { a }$ . When we compute the contrastive loss, the same audio query will be maximally confused by $v _ { n }$ with its positive key $v ^ { + }$ per dot-product similarity, and $v _ { n }$ in this case can serve as a hard negative sample.
124
+
125
+ Next, we obtain the most diverse and highly uncertain subset $S _ { v } \subseteq U _ { v } \backslash D _ { v }$ using the initialization scheme of $k { \mathrm { - M E A N S ^ { + + } } }$ (Arthur & Vassilvitskii, 2007) over the gradient embeddings $g _ { v }$ (line 14). The $k { \mathrm { - M E A N S ^ { + + } } }$ initialization scheme finds the seed cluster centroids by iteratively sampling points with a probability in proportion to their squared distances from the nearest centroid that has already been chosen (we provide the exact algorithm in the Appendix). Intuitively, this returns a diverse set of instances sampled in a greedy manner, each of which has a high degree of uncertainty measured as its squared distances from other instances that have already been chosen. Finally, we enqueue $S _ { v }$ into $D _ { v }$ and dequeue the oldest batch from $D _ { v }$ (line 15). We repeat this process to sample negative audio keys (lines 16-21); this concludes the active sampling process for $D _ { v }$ and $D _ { a }$ .
126
+
127
+ Cross-modal contrastive coding. Given the updated $D _ { v }$ and $D _ { a }$ , we perform cross-modal contrastive coding. For visual-to-audio coding, we compute the posteriors of all video samples $v _ { i } \in B _ { v }$ with respect to the negative samples in the audio dictionary $D _ { a }$ ,
128
+
129
+ $$
130
+ p ( y _ { i } ^ { v } | v _ { i } , a _ { i } , D _ { a } ) = \frac { \exp ( q _ { i } ^ { v } \cdot k _ { i } ^ { a } / \tau ) } { \sum _ { j = 0 } ^ { K } \exp ( q _ { i } ^ { v } \cdot k _ { j } ^ { a } / \tau ) } , \forall i \in [ 1 , M ]
131
+ $$
132
+
133
+ where the posterior is defined over a cross-modal space with one positive and $K$ negative pairs (line 24). Next, we backpropagate gradients only to the query encoders $f _ { v }$ and $f _ { a }$ (line $2 6$ ),
134
+
135
+ $$
136
+ \begin{array} { r } { \theta _ { q } ^ { v } \theta _ { q } ^ { v } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( p ( y ^ { v } | \cdot ) , y _ { g t } ^ { v } ) | _ { \theta = \theta _ { q } ^ { v } } , \ \theta _ { q } ^ { a } \theta _ { q } ^ { a } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( p ( y ^ { a } | \cdot ) , y _ { g t } ^ { a } ) | _ { \theta = \theta _ { q } ^ { a } } } \end{array}
137
+ $$
138
+
139
+ while applying momentum update to the parameters of the key encoders $h _ { v }$ and $h _ { a }$ (line 27),
140
+
141
+ $$
142
+ \theta _ { k } ^ { v } m \theta _ { k } ^ { v } + ( 1 - m ) \theta _ { q } ^ { v } , \theta _ { k } ^ { a } m \theta _ { k } ^ { a } + ( 1 - m ) \theta _ { q } ^ { a }
143
+ $$
144
+
145
+ The momentum update allows the dictionaries to change their states slowly, thus making them consistent across iterations. However, our cross-modal formulation can cause inconsistency in dictionary states because the gradient used to update query encoders are not directly used to update the corresponding key encoders. To improve stability, we let the gradients flow in a cross-modal fashion, updating part of $f _ { v }$ and $h _ { a }$ using the same gradient signal from the contrastive loss. We do this by adding one FC layer on top of all encoders and applying momentum update to their parameters. For example, we apply momentum update to the parameters of the FC layer on top of $h _ { a }$ using the parameters of the FC layer from $f _ { v }$ . We omit this in Alg. 1 for clarity but show its importance in our ablation experiments (XMoCo (w/o fcl) in Table 1).
146
+
147
+ Table 1: Top-1 accuracy of unimodal vs. cross-modal pretraining on downstream tasks.
148
+
149
+ <table><tr><td>#</td><td>Approach</td><td>Pretrain Obj.</td><td>UCF101</td><td>HMDB51</td><td>ESC50</td><td>Gains</td></tr><tr><td>1 ②</td><td>Scratch Supervised</td><td>- Supervised</td><td>63.3 86.9</td><td>29.7 53.1</td><td>54.3 78.3</td><td></td></tr><tr><td>③</td><td>SMoCo</td><td>Uni. rand.</td><td>70.7</td><td>35.2</td><td>69.0</td><td></td></tr><tr><td>4</td><td>XMoCo (w/o fcl)</td><td>Cross rand.</td><td>72.9 (12.2)</td><td>37.5 (12.3)</td><td>70.9 (↑1.9)</td><td>△(④-③)</td></tr><tr><td>③</td><td>XMoCo</td><td>Cross rand.</td><td>74.1 (↑1.2)</td><td>38.7 (↑1.2)</td><td>73.0 (12.1)</td><td>△(⑤-④)</td></tr><tr><td>6</td><td>CM-ACC (w/o fcl)</td><td>Cross active</td><td>75.8 (↓1.4)</td><td>39.1 (↓1.5)</td><td>77.3 (↓1.9)</td><td>△(⑥-0)</td></tr><tr><td>①</td><td>CM-ACC</td><td>Cross active</td><td>77.2 (13.1)</td><td>40.6 (↑1.9)</td><td>79.2 (16.2)</td><td>△(-)</td></tr></table>
150
+
151
+ # 4 RELATED WORK
152
+
153
+ Self-supervised learning has been studied in vision, language, and audio domains. In the image domain, one popular idea is learning representations by maximizing the MI between different views of the same image (Belghazi et al., 2018; Hjelm et al., 2018; Tian et al., 2019; He et al., 2020). In the video domain, several approaches have exploited the spatio-temporal structure of video data to design efficient pretext tasks, e.g. by adopting ordering (Sermanet et al., 2017; Wang et al., 2019b), temporal consistency (Dwibedi et al., 2019), and spatio-temporal statistics (Xu et al., 2019; Wang et al., 2019a; Han et al., 2019). In the language domain, the transformer-based approaches trained with the masked language model (MLM) objective has been the most successful (Devlin et al., 2019; Liu et al., 2019; Yang et al., 2019). Riding on the success of BERT (Devlin et al., 2019), several concurrent approaches generalize it to learn visual-linguistic representations (Lu et al., 2019; Li et al., 2020; Su et al., 2019; Tan & Bansal, 2019; Li et al., 2019). CBT (Sun et al., 2019a) and VideoBERT (Sun et al., 2019b) made efforts on adapting BERT-style pretraining for video.
154
+
155
+ Besides vision and language signals, several approaches learn audio-visual representations in a selfsupervised manner (Owens et al., 2016; Arandjelovic & Zisserman, 2017; Owens & Efros, 2018; Owens et al., 2016). Recently, audio-visual learning has been applied to enable interesting applications beyond recognition tasks, such as sound source localization/separation (Zhao et al., 2018; Arandjelovic & Zisserman, 2018; Gao et al., 2018; Gao & Grauman, 2019a;b; Ephrat et al., 2018; Gan et al., 2020; Zhao et al., 2019; Yang et al., 2020) and visual-to-sound generation (Hao et al., 2018; Zhou et al., 2018). The work of Owens & Efros (2018), Korbar et al. (2018), and Alwassel et al. (2019) are similar in spirit to our own, but our technical approach differs substantially in the use of active sampling and contrastive learning.
156
+
157
+ Hard negative mining is used in a variety of tasks, such as detection (Li et al., 2020), tracking (Nam & Han, 2016), and retrieval (Faghri et al., 2017; Pang et al., 2019), to improve the quality of prediction models by incorporating negative examples that are more difficult than randomly chosen ones. Several recent work have focused on finding informative negative samples for contrastive learning. Wu et al. (2020) show that the choice of negative samples is critical in contrastive learning and propose variational extension to InfoNCE with modified strategies for negative sampling. Iscen et al. (2018) propose hard examples mining for effective finetuning of pretrained networks. Cao et al. (2020) utilize negative sampling to reduce the computational cost. In the context of audio-visual selfsupervised learning, Korbar et al. (2018) sample negatives under the assumption that the smaller the time gap is between audio and visual clips of the same video, the harder it is to differentiate them (and thus they are considered hard negatives). Our proposed approach does not make such an assumption and estimates the hardness of negatives by directly analyzing the magnitude of the gradients with respect to the contrastive learning objective.
158
+
159
+ # 5 EXPERIMENTS
160
+
161
+ Experimental Setting. We use 3D-ResNet18 (Hara et al., 2018) as our visual encoders ( $f _ { v }$ and $h _ { v }$ ) in most of the experiments. We also use $\mathrm { R } ( 2 + 1 ) \mathrm { D } { - } 1 8 $ (Tran et al., 2018) to enable a fair comparison with previous work (see Table 4). For audio encoders ( $f _ { a }$ and $h _ { a }$ ), we adapt ResNet-18 (He et al., 2016) to audio signals by replacing 2D convolution kernels with 1D kernels. We employ Batch Normalization (BN) (Ioffe & Szegedy, 2015) with the shuffling BN (He et al., 2020) in all our encoders. All models are trained end-to-end with the ADAM optimizer (Kingma & Ba, 2014) with an initial learning rate $\gamma = 1 0 ^ { - 3 }$ after a warm-up period of 500 iterations. We use the mini-batch size $M = 1 2 8$ , dictionary size $K = 3 0 \times 1 2 8$ , pool size $N = 3 0 0 \times 1 2 8$ , momentum $m = 0 . 9 9 9$ , and temperature $\tau = 0 . 7$ . We used 40 NVIDIA Tesla P100 GPUs for our experiments.
162
+
163
+ ![](images/e53af3d6503cc01c3c0c062c1192b390300dadc8cf7b4324d174b0d3839ff648.jpg)
164
+ Figure 2: Effects of random sampling and active sampling on the number of categories.
165
+
166
+ We pretrain our model on Kinetics-700 (Carreira et al., 2019) and AudioSet (Gemmeke et al., 2017) when comparing with state-of-the-art approaches. For Kinetics-700, we use 240K randomly selected videos that contain the audio channel. On AudioSet, we use both a subset of 240K randomly selected videos and the 1.8M full set. For our ablation study, we use Kinetics-Sound (Arandjelovic & Zisserman, 2017) that contains 22K videos from 34 classes that are potentially manifested both visually and audibly, and thus provides a relatively clean testbed for ablation purposes. As for downstream tasks, we evaluate our models on action recognition using UCF101 (Soomro et al., 2012) and HMDB51 (Kuehne et al., 2011), and on sound classification using ESC50 (Piczak, 2015b).
167
+
168
+ Unimodal vs. cross-modal pretraining. To validate the benefits of cross-modal pretraining, we compare it to its unimodal counterparts. We pretrain our model on Kinetics-Sound with a randomly sampled dictionary (similar to MoCo (He et al., 2020)); we call this XMoCo. For the unimodal case, we pretrain two models on visual clips and audio clips, respectively; we call these SMoCo. We also compare ours with a model trained from scratch (Scratch), and a model pretrained on KineticsSound in a fully-supervised manner (Supervised). Lastly, we include XMoCo (w/o fcl) that is identical to XMoCo except that we do not include the additional FC layers on top of the encoders. All these models are finetuned end-to-end on each downstream task using the same protocol.
169
+
170
+ Table 1 shows the top-1 accuracy of each downstream task. We observe that all the self-supervised models outperform Scratch on all downstream tasks, suggesting the effectiveness of pretraining with contrastive learning. We also see that our cross-modal objective outperforms the unimodal objective $( \Delta ( \textcircled{4} \ – \textcircled { 3 } ) )$ . The comparisons between XMoCo vs. XMoCo $( \mathrm { w } / \mathrm { o } \mathrm { f c } ]$ ) and CM-ACC vs. CM-ACC (w/o fcl) show the effectiveness of the additional FC layer on top of the encoders $( \Delta ( \textcircled{ 5 } ) - \textcircled { 4 } )$ , $\Delta ( \textcircled{6} - \textcircled{7} ) )$ . When adding the FC layer, the performance further improves on all three benchmarks. This shows the importance of letting the gradients flow in a cross-modal fashion. Finally, the performance gap with the full-supervised case shows there is still room for improvement in the self-supervised approaches.
171
+
172
+ Next, we compare the number of unique categories the sampled instances originally belong to, using the ground-truth labels provided in the dataset. Our logic is that the more categories the samples come from, the more diverse and less redundant the samples are. We train these on UCF-101 over 300 iterations with different mini-batch sizes, $M \in \{ 3 2 , 6 4 , 1 2 8 \}$ . Fig. 2 shows that active sampling selects more categories than random sampling across all three mini-batch sizes. At $M = 1 2 8$ , active sampling (with gradient embedding) covers $6 0 – 7 0 \%$ of categories on UCF101, which is substantially more diverse than random sampling $( 3 0 - 4 0 \% )$ ). (A plot showing the probability of sampling unique negatives (instances from different categories) is shown in Appendix Figure 4.) While both sampling schemes perform similarly in early iterations, active sampling starts choosing more diverse instances as the training progresses; this is because the gradient embedding becomes more discriminative with respect to the uncertainty.
173
+
174
+ Random vs. active sampling. To validate the benefit of active sampling over random sampling, we compare models pretrained with different sampling approaches on downstream tasks. As shown in Table 1, our CM-ACC outperforms the XMoCo, which uses random sampling, by large margins, i.e. $3 . 1 \%$ , $1 . 9 \%$ , and $6 . 2 \%$ on UCF101, HMDB51, and ESC50, respectively $( \Delta ( \textcircled { 7 } - \textcircled { 5 } ) )$ .
175
+
176
+ Table 2: Top-1 accuracy on downstream tasks: feature- vs. gradient-based embedding.
177
+
178
+ <table><tr><td>Pretrain Objective</td><td>Embedding Space</td><td>UCF101</td><td>HMDB51</td><td>ESC50</td></tr><tr><td>Cross-modal active</td><td>Feature Embedding</td><td>74.5</td><td>38.2</td><td>75.1</td></tr><tr><td>Cross-modal active</td><td>Gradient Embedding</td><td>77.2 (↑2.7)</td><td>40.6 (12.4)</td><td>79.2 (↑4.1)</td></tr></table>
179
+
180
+ <table><tr><td></td><td colspan="3">UCF101</td><td colspan="3">HMDB51</td></tr><tr><td></td><td>M=32</td><td>M=64</td><td>M=128</td><td>M=32</td><td>M=64</td><td>M=128</td></tr><tr><td>Random</td><td>61.9</td><td>63.1</td><td>66.9</td><td>33.1</td><td>33.8</td><td>35.8</td></tr><tr><td>OHEM</td><td>50.2 (-11.7)</td><td>60.8 (-2.3)</td><td>65.7 (-1.2)</td><td>26.8 (-6.3)</td><td>30.1 (-3.7)</td><td>33.2 (-2.6)</td></tr><tr><td>Active</td><td>78.0 (+16.1)</td><td>78.9 (+15.8)</td><td>79.2 (+12.3)</td><td>41.2 (+8.1)</td><td>42.3 (+8.5)</td><td>42.6 (+6.8)</td></tr></table>
181
+
182
+ Table 3: Online hard example mining (OHEM) (Shrivastava et al., 2016) vs. our active sampling
183
+
184
+ Feature vs. gradient embedding. We compare two ways to do active sampling: using gradient embeddings (Eqn. 5) and feature embeddings (the outputs from $h _ { a }$ and $h _ { v }$ ) when selecting the seed centroids with $k { \mathrm { - M E A N S ^ { + + } } }$ . Fig. 2 shows that gradient embeddings produce a more diverse set of negative samples than feature embeddings; this is consistent across all three batch sizes. Table 2 shows that this diversity helps achieve better downstream performances across all three benchmarks. Fig. 5 (in Appendix) provides further insights, showing that the samples with high gradient magnitudes tend to be more informative negative samples.
185
+
186
+ From a theoretical aspect, the gradient norm induced by each candidate with computed pseudo labels estimates the candidates influence on the current model. The gradient embeddings convey information both about the model’s uncertainty and potential update direction upon receiving a candidate. However, such messages are missing from the feature embeddings. This shows the importance of considering both uncertainty and diversity when selecting random samples: the $k { \mathrm { - M E A N S ^ { + + } } }$ ensures the diversity in the sample set, but without the uncertainty measure we lose important discriminative information from the candidates.
187
+
188
+ Online hard example mining vs. active sampling. We compare our approach to online hard example mining (OHEM) (Shrivastava et al., 2016), which constructs negative samples by explicitly choosing the ones that incur high loss values. Specifically, we compute the pseudo-labels for all keys (negative sample candidates) with a given mini-batch of queries. We then compute the classification loss based on these pseudo labels and select the top $M$ keys with the highest loss values. We pretrain the models on Kinetics-700 (Kay et al., 2017) and report the top-1 accuracy on UCF101 (Soomro et al., 2012) and HMDB51 (Kuehne et al., 2011). We use the same architecture and hyperparameters; the only difference is the sampling approach.
189
+
190
+ Table 3 shows OHEM is generally less effective than both random sampling and our active sampling. Intuitively, OHEM promotes the dictionary to contain the most challenging keys for a given minibatch of queries. Unfortunately, this causes OHEM to produce a redundant and biased dictionary, e.g., negative samples coming from a particular semantic category. Our results show that, when $M$ (mini-batch size) is small, the performance of OHEM is even worse than random sampling, although the gap between OHEM and random sampling decreases as $M$ increases. We believe this is because OHEM has a higher chance of selecting similar negative instances. When $M$ is large, this issue can be mitigated to some extent, but the performance still falls behind ours by a large margin. This suggests the importance of having a diverse set of negative samples, which is unique in our approach.
191
+
192
+ Comparisons with SOTA. Table 4 shows our approach outperforms various self-supervised approaches on action recognition. For fair comparisons, we group the SOTA approaches by different pretraining dataset sizes, i.e. small-scale (UCF/HMDB), medium-scale (Kinetics), and large-scale (AudioSet). Our gains are calculated according to this grouping. As we can see, our approach outperforms SOTA approaches across all groups. Compared with GDT (Patrick et al., 2020), the current top performing model on cross-modal self-supervised learning, our model outperforms it by $1 . 6 \%$ on UCF101 and $1 . 1 \ \%$ on HMDB51. Table 5 shows audio classification transfer results. For Kinetics and AudioSet (240K), our model outperforms the current state-of-the-art, AVID $( 7 9 . 1 \% )$ by $0 . 1 \%$ and $1 . 8 \%$ on Kinetics and AudioSet 240K, respectively. Our approach also outperforms AVID $( 8 9 . 2 \% )$ pretrained on AudioSet (1.8M) by $1 . 6 \%$ .
193
+
194
+ Table 4: Comparison of SOTA approaches on action recognition. We specify pretraining dataset and the number of samples used if they are reported in the original papers (N/A: not available).
195
+
196
+ <table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=3>Architecture Pretrained on (size)</td><td rowspan=1 colspan=1>UCF101 HMDB51</td></tr><tr><td rowspan=1 colspan=1>ScratchSupervised (Patrick et al., 2020)</td><td rowspan=1 colspan=3>3D-ResNet18 1R(2+1)D-18 Kinetics400 (N/A)</td><td rowspan=1 colspan=1>46.5 17.195.0 70.4</td></tr><tr><td rowspan=2 colspan=1>ShufflAL (Misra et al.,2016)DRL (Buchler et al., 2018)OPN (Lee et al., 2017)DPC (Han et al., 2019)</td><td rowspan=2 colspan=3>CaffeNet UCF/HMDBCaffeNet UCF/HMDBVGG UCF/HMDB3D-ResNet18 UCF101</td><td rowspan=1 colspan=1>50.2 18.158.6 25.0</td></tr><tr><td rowspan=1 colspan=1>59.8 23.860.6 -</td></tr><tr><td rowspan=11 colspan=1>MotionPred (Wang et al., 2019a)RotNet3D (Jing&amp; Tian,2018)ST-Puzzle (Kim et al.,2019)ClipOrder (Xu et al.,2019)CBT (Sun et al., 2019a)DPC (Han et al., 2019)SeLaVi (Asano et al.,2020)AVTS (Korbar et al.,2018)XDC (Alwassel et al., 2019)AVID (Morgado et al., 2020)GDT (Patrick et al., 2020)</td><td rowspan=7 colspan=3>C3D Kinetics400 (N/A)3D-ResNet18 Kinetics400 (N/A)3D-ResNet18 Kinetics400 (N/A)R(2+1)D-18 Kinetics400 (N/A)S3D&amp;BERT Kinetics600 (500K)3D-ResNet34 Kinetics400 (306K)R(2+1)D-18 Kinetics400 (240K)</td><td rowspan=1 colspan=1>61.2 33.4</td></tr><tr><td rowspan=1 colspan=1>62.9 33.7</td></tr><tr><td rowspan=1 colspan=1>65.8 33.7</td></tr><tr><td rowspan=1 colspan=1>72.4 30.9</td></tr><tr><td rowspan=1 colspan=1>79.5 44.6</td></tr><tr><td rowspan=1 colspan=1>75.7 35.7</td></tr><tr><td rowspan=1 colspan=1>R(2+1)D-18</td><td rowspan=1 colspan=1>83.1 47.1</td></tr><tr><td rowspan=1 colspan=1>MC3</td><td></td><td rowspan=1 colspan=1>Kinetics400 (240K)</td><td rowspan=1 colspan=1>85.8 56.9</td></tr><tr><td rowspan=3 colspan=3>R(2+1)D-18 Kinetics400 (240K)R(2+1)D-18 Kinetics400 (240K)R(2+1)D-18 Kinetics400 (N/A)</td><td rowspan=1 colspan=1>Kinetics400 (240K)</td><td rowspan=1 colspan=1>84.2 47.1</td></tr><tr><td rowspan=1 colspan=1>87.5 60.8</td></tr><tr><td rowspan=1 colspan=1>89.3 60.0</td></tr><tr><td rowspan=5 colspan=1>AVTS (Korbar et al.,2018)AVTS (Korbar et al.,2018)XDC (Alwassel et al., 2019)AVID (Morgado et al., 2020)GDT (Patrick et al., 2020)</td><td rowspan=2 colspan=3>MC3 AudioSet (240K)MC3 AudioSet (1.8M)</td><td rowspan=1 colspan=1>86.4 1</td></tr><tr><td rowspan=1 colspan=1>89.0 61.6</td></tr><tr><td rowspan=3 colspan=3>R(2+1)D-18 AudioSet (1.8M)R(2+1)D-18 AudioSet (1.8M)R(2+1)D-18 AudioSet (1.8M)</td><td rowspan=1 colspan=1>91.2 61.0</td></tr><tr><td rowspan=1 colspan=1>91.5 64.7</td></tr><tr><td rowspan=1 colspan=1>92.5 66.1</td></tr><tr><td rowspan=5 colspan=1>Ours</td><td rowspan=1 colspan=3>3D-ResNet18 UCF1013D-ResNet18 Kine.-Sound (14K)</td><td rowspan=1 colspan=1>69.1 (+8.5) 33.3 (+8.3)77.2 (+16.6) 40.6 (+15.6)</td></tr><tr><td rowspan=3 colspan=3>3D-ResNet18 Kinetics700 (240K)3D-ResNet18 AudioSet (240K)3D-ResNet18 AudioSet (1.8M)</td><td rowspan=1 colspan=1>90.2 (+0.9) 61.8 (+1.0)</td></tr><tr><td rowspan=1 colspan=1>90.7 (+1.4) 62.3 (+1.5)</td></tr><tr><td rowspan=1 colspan=1>94.1 (+1.6) 66.8 (+0.7)</td></tr><tr><td rowspan=1 colspan=3>R(2+1)D-18 AudioSet (1.8M)</td><td rowspan=1 colspan=1>93.5 (+1.0) 67.2 (+1.1)</td></tr></table>
197
+
198
+ Table 5: Comparision of SOTA approaches on audio event classification.
199
+
200
+ <table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Architecture Pretrained on (size)</td><td rowspan=1 colspan=1>ESC50</td></tr><tr><td rowspan=3 colspan=1>RandomForest (Piczak,2015b)Piczak ConvNet (Piczak, 2015a)ConvRBM (Sailor et al.,2017)</td><td rowspan=3 colspan=1>MLP ESC50ConvNet-4 ESC50ConvNet-4 ESC50</td><td rowspan=1 colspan=1>44.3</td></tr><tr><td rowspan=1 colspan=1>64.5</td></tr><tr><td rowspan=1 colspan=1>86.5</td></tr><tr><td rowspan=1 colspan=1>SoundNet (Aytar et al.,2016)L3-Net (Arandjelovic &amp; Zisserman, 2017)</td><td rowspan=1 colspan=1>ConvNet-8 SoundNet (2M+)ConvNet-8 SoundNet (500K)</td><td rowspan=1 colspan=1>74.279.3</td></tr><tr><td rowspan=1 colspan=1>AVTS(Korbar et al.,2018)XDC (Alwassel et al., 2019)AVID (Morgado et al., 2020)</td><td rowspan=1 colspan=1>VGG-8 Kinetics (240K)ResNet-18 Kinetics (240K)ConvNet-9 Kinetics (240K)</td><td rowspan=1 colspan=1>76.778.079.1</td></tr><tr><td rowspan=1 colspan=1>AVTS (Korbar et al.,2018)XDC (Alwassel et al., 2019)AVID (Morgado et al., 2020)GDT (Patrick et al.,2020)</td><td rowspan=1 colspan=1>VGG-8 AudioSet (1.8M)ResNet-18 AudioSet (1.8M)ConvNet-9 AudioSet (1.8M)ResNet-9 AudioSet (1.8M)</td><td rowspan=1 colspan=1>80.684.889.288.5</td></tr><tr><td rowspan=1 colspan=1>Ours</td><td rowspan=1 colspan=1>Kinetics700 (240K)ResNet-18 AudioSet (240K)AudioSet (1.8M)</td><td rowspan=1 colspan=1>80.2 (+1.1)80.9 (+1.8)90.8 (+1.6)</td></tr></table>
201
+
202
+ # 6 CONCLUSION
203
+
204
+ We have shown that random sampling could be detrimental to contrastive learning due to the redundancy in negative samples, especially when the sample size is large, and have proposed an active sampling approach that yields diverse and informative negative samples. We demonstrated this on learning audio-visual representations from unlabeled videos. When pretrained on AudioSet, our approach outperforms previous state-of-the-art self-supervised approaches on various audio and visual downstream benchmarks. We also show that our active sampling approach significantly improves the performance of contrastive learning over random and online hard negative sampling approaches.
205
+
206
+ # REFERENCES
207
+
208
+ Humam Alwassel, Dhruv Mahajan, Lorenzo Torresani, Bernard Ghanem, and Du Tran. Selfsupervised learning by cross-modal audio-video clustering. arXiv preprint arXiv:1911.12667, 2019.
209
+
210
+ Relja Arandjelovic and Andrew Zisserman. Look, listen and learn. In ICCV, 2017.
211
+
212
+ Relja Arandjelovic and Andrew Zisserman. Objects that sound. In ECCV, 2018.
213
+
214
+ Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. In ICML, 2019.
215
+
216
+ David Arthur and Sergei Vassilvitskii. K-means $^ { + + }$ : The advantages of careful seeding. In SODA, 2007.
217
+
218
+ Yuki M Asano, Mandela Patrick, Christian Rupprecht, and Andrea Vedaldi. Labelling unlabelled videos from scratch with multi-modal self-supervision. arXiv preprint arXiv:2006.13662, 2020.
219
+
220
+ Jordan T Ash, Chicheng Zhang, Akshay Krishnamurthy, John Langford, and Alekh Agarwal. Deep batch active learning by diverse, uncertain gradient lower bounds. In ICLR, 2020.
221
+
222
+ Yusuf Aytar, Carl Vondrick, and Antonio Torralba. Soundnet: Learning sound representations from unlabeled video. In Advances in neural information processing systems, 2016.
223
+
224
+ Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeshwar, Sherjil Ozair, Yoshua Bengio, Aaron Courville, and Devon Hjelm. Mutual information neural estimation. In ICML, 2018.
225
+
226
+ Uta Buchler, Biagio Brattoli, and Bjorn Ommer. Improving spatiotemporal self-supervision by deep reinforcement learning. In ECCV, 2018.
227
+
228
+ Yue Cao, Zhenda Xie, Bin Liu, Yutong Lin, Zheng Zhang, and Han Hu. Parametric instance classification for unsupervised visual feature learning. Advances in Neural Information Processing Systems, 33, 2020.
229
+
230
+ Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017.
231
+
232
+ Joao Carreira, Eric Noland, Chloe Hillier, and Andrew Zisserman. A short note on the kinetics-700 human action dataset. arXiv preprint arXiv:1907.06987, 2019.
233
+
234
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020.
235
+
236
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In ACL, 2019.
237
+
238
+ Debidatta Dwibedi, Yusuf Aytar, Jonathan Tompson, Pierre Sermanet, and Andrew Zisserman. Temporal cycle-consistency learning. In CVPR, 2019.
239
+
240
+ Ariel Ephrat, Inbar Mosseri, Oran Lang, Tali Dekel, Kevin Wilson, Avinatan Hassidim, William T Freeman, and Michael Rubinstein. Looking to listen at the cocktail party: A speaker-independent audio-visual model for speech separation. ACM Transactions on Graphics, 2018.
241
+
242
+ Fartash Faghri, David J Fleet, Jamie Ryan Kiros, and Sanja Fidler. ${ \mathrm { V S E } } { + } { + }$ : Improving visualsemantic embeddings with hard negatives. In BMVC, 2017.
243
+
244
+ Satoru Fujishige. Submodular functions and optimization. 2005.
245
+
246
+ Chuang Gan, Deng Huang, Hang Zhao, Joshua B Tenenbaum, and Antonio Torralba. Music gesture for visual sound separation. In CVPR, 2020.
247
+
248
+ Ruohan Gao and Kristen Grauman. 2.5D visual sound. In CVPR, 2019a.
249
+
250
+ Ruohan Gao and Kristen Grauman. Co-separating sounds of visual objects. In ICCV, 2019b.
251
+
252
+ Ruohan Gao, Rogerio Feris, and Kristen Grauman. Learning to separate object sounds by watching unlabeled video. In ECCV, 2018.
253
+
254
+ Jort F Gemmeke, Daniel PW Ellis, Dylan Freedman, Aren Jansen, Wade Lawrence, R Channing Moore, Manoj Plakal, and Marvin Ritter. Audio set: An ontology and human-labeled dataset for audio events. In ICASSP, 2017.
255
+
256
+ Walter R Gilks, Sylvia Richardson, and David Spiegelhalter. Markov chain Monte Carlo in practice. Chapman and Hall/CRC, 1995.
257
+
258
+ Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle¨ for unnormalized statistical models. In AISTATS, 2010.
259
+
260
+ Tengda Han, Weidi Xie, and Andrew Zisserman. Video representation learning by dense predictive coding. In ICCV, 2019.
261
+
262
+ Wangli Hao, Zhaoxiang Zhang, and He Guan. Cmcgan: A uniform framework for cross-modal visual-audio mutual generation. In AAAI, 2018.
263
+
264
+ Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Can spatiotemporal 3d cnns retrace the history of 2d cnns and imagenet? In CVPR, 2018.
265
+
266
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
267
+
268
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
269
+
270
+ Olivier J Henaff, Ali Razavi, Carl Doersch, SM Eslami, and Aaron van den Oord. Data-efficient ´ image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019.
271
+
272
+ R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2018.
273
+
274
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
275
+
276
+ Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondˇrej Chum. Mining on manifolds: Metric learning without labels. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7642–7651, 2018.
277
+
278
+ Longlong Jing and Yingli Tian. Self-supervised spatiotemporal feature learning by video geometric transformations. arXiv preprint arXiv:1811.11387, 2018.
279
+
280
+ Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017.
281
+
282
+ Dahun Kim, Donghyeon Cho, and In So Kweon. Self-supervised video representation learning with space-time cubic puzzles. In AAAI, 2019.
283
+
284
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
285
+
286
+ Bruno Korbar, Du Tran, and Lorenzo Torresani. Cooperative learning of audio and video models from self-supervised synchronization. In Advances in Neural Information Processing Systems, 2018.
287
+
288
+ Hildegard Kuehne, Hueihan Jhuang, Est´ıbaliz Garrote, Tomaso Poggio, and Thomas Serre. Hmdb: a large video database for human motion recognition. In ICCV, 2011.
289
+
290
+ Alex Kulesza and Ben Taskar. k-dpps: Fixed-size determinantal point processes. In ICML, 2011.
291
+
292
+ Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
293
+
294
+ Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Unsupervised representation learning by sorting sequences. In ICCV, 2017.
295
+
296
+ Gen Li, Nan Duan, Yuejian Fang, Ming Gong, Daxin Jiang, and Ming Zhou. Unicoder-vl: A universal encoder for vision and language by cross-modal pre-training. In AAAI, 2020.
297
+
298
+ Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. VisualBERT: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019.
299
+
300
+ 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.
301
+
302
+ Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks. In Advances in neural information processing systems, 2019.
303
+
304
+ Odile Macchi. The coincidence approach to stochastic point processes. Advances in Applied Probability, 7(1), 1975.
305
+
306
+ David McAllester and Karl Stratos. Formal limitations on the measurement of mutual information. In AISTATS, 2020.
307
+
308
+ Ishan Misra, C. Lawrence Zitnick, and Martial Hebert. Shuffle and learn: Unsupervised learning using temporal order verification. In ECCV, 2016.
309
+
310
+ Pedro Morgado, Nuno Vasconcelos, and Ishan Misra. Audio-visual instance discrimination with cross-modal agreement. arXiv preprint arXiv:2004.12943, 2020.
311
+
312
+ Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, 2016.
313
+
314
+ George L Nemhauser, Laurence A Wolsey, and Marshall L Fisher. An analysis of approximations for maximizing submodular set functions—i. Mathematical programming, 14(1), 1978.
315
+
316
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predic- ¨ tive coding. arXiv preprint arXiv:1807.03748, 2018.
317
+
318
+ Andrew Owens and Alexei A Efros. Audio-visual scene analysis with self-supervised multisensory features. In ECCV, 2018.
319
+
320
+ Andrew Owens, Jiajun Wu, Josh H McDermott, William T Freeman, and Antonio Torralba. Ambient sound provides supervision for visual learning. In ECCV, 2016.
321
+
322
+ Sherjil Ozair, Corey Lynch, Yoshua Bengio, Aaron Van den Oord, Sergey Levine, and Pierre Sermanet. Wasserstein dependency measure for representation learning. In Advances in Neural Information Processing Systems, 2019.
323
+
324
+ Jiangmiao Pang, Kai Chen, Jianping Shi, Huajun Feng, Wanli Ouyang, and Dahua Lin. Libra RCNN: Towards balanced learning for object detection. In CVPR, 2019.
325
+
326
+ Mandela Patrick, Yuki M Asano, Ruth Fong, Joao F Henriques, Geoffrey Zweig, and Andrea ˜ Vedaldi. Multi-modal self-supervision from generalized data transformations. arXiv preprint arXiv:2003.04298, 2020.
327
+
328
+ Karol J Piczak. Environmental sound classification with convolutional neural networks. In International Workshop on Machine Learning for Signal Processing (MLSP), 2015a.
329
+
330
+ Karol J Piczak. ESC: Dataset for environmental sound classification. In Proceedings of the $2 3 r d$ ACM international conference on Multimedia, 2015b.
331
+
332
+ Hardik B Sailor, Dharmesh M Agrawal, and Hemant A Patil. Unsupervised filterbank learning using convolutional restricted boltzmann machine for environmental sound classification. In INTERSPEECH, 2017.
333
+
334
+ Steffen Schneider, Alexei Baevski, Ronan Collobert, and Michael Auli. wav2vec: Unsupervised pre-training for speech recognition. arXiv preprint arXiv:1904.05862, 2019.
335
+
336
+ Pierre Sermanet, Corey Lynch, Jasmine Hsu, and Sergey Levine. Time-contrastive networks: Selfsupervised learning from multi-view observation. In CVPRW, 2017.
337
+
338
+ Burr Settles. Active learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences, 2009.
339
+
340
+ Abhinav Shrivastava, Abhinav Gupta, and Ross Girshick. Training region-based object detectors with online hard example mining. In CVPR, 2016.
341
+
342
+ Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
343
+
344
+ Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530, 2019.
345
+
346
+ Chen Sun, Fabien Baradel, Kevin Murphy, and Cordelia Schmid. Contrastive bidirectional transformer for temporal representation learning. arXiv preprint arXiv:1906.05743, 2019a.
347
+
348
+ Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid. Videobert: A joint model for video and language representation learning. In ICCV, 2019b.
349
+
350
+ Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490, 2019.
351
+
352
+ Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
353
+
354
+ Du Tran, Heng Wang, Lorenzo Torresani, Jamie Ray, Yann LeCun, and Manohar Paluri. A closer look at spatiotemporal convolutions for action recognition. In CVPR, 2018.
355
+
356
+ Jiangliu Wang, Jianbo Jiao, Linchao Bao, Shengfeng He, Yunhui Liu, and Wei Liu. Self-supervised spatio-temporal representation learning for videos by predicting motion and appearance statistics. In CVPR, 2019a.
357
+
358
+ Xiaolong Wang, Allan Jabri, and Alexei A Efros. Learning correspondence from the cycleconsistency of time. In CVPR, 2019b.
359
+
360
+ Mike Wu, Chengxu Zhuang, Milan Mosse, Daniel Yamins, and Noah Goodman. On mutual information in contrastive learning for visual representations. arXiv preprint arXiv:2005.13149, 2020.
361
+
362
+ Dejing Xu, Jun Xiao, Zhou Zhao, Jian Shao, Di Xie, and Yueting Zhuang. Self-supervised spatiotemporal learning via video clip order prediction. In CVPR, 2019.
363
+
364
+ Karren Yang, Bryan Russell, and Justin Salamon. Telling left from right: Learning spatial correspondence of sight and sound. In CVPR, 2020.
365
+
366
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in neural information processing systems, 2019.
367
+
368
+ Hang Zhao, Chuang Gan, Andrew Rouditchenko, Carl Vondrick, Josh McDermott, and Antonio Torralba. The sound of pixels. In ECCV, 2018.
369
+
370
+ Hang Zhao, Chuang Gan, Wei-Chiu Ma, and Antonio Torralba. The sound of motions. In ICCV, 2019.
371
+
372
+ Yipin Zhou, Zhaowen Wang, Chen Fang, Trung Bui, and Tamara L Berg. Visual to sound: Generating natural sound for videos in the wild. In CVPR, 2018.
373
+
374
+ # A DETAILS ON DATA PROCESSING
375
+
376
+ We preprocess video frames by sampling at 10 FPS and applying random cropping, horizontal flipping, gray-scaling, and temporal jittering. We resize video frames to 3-channel images of $2 2 4 \times 2 2 4$ ; we set the clip length to 16 frames during pretraining, and 32 frames during finetuning on downstream tasks. For audio channel, we extract mel-spectrograms from the raw waveform using the LibROSA library and get a $8 0 \times T$ matrix with 80 frequency bands; T is proportionate to the length of an audio clip. We then segment the mel-spectrogram according to the corresponding video clips to ensure temporal synchrony. We treat the mel-spectrograms as an 80-channel 1D signal.
377
+
378
+ As for downstream tasks, we evaluate our models on action recognition using UCF101 (Soomro et al., 2012) and HMDB51 (Kuehne et al., 2011), and on sound classification using ESC50 (Piczak, 2015b). UCF101 contains 13K video clips from 101 action categories, HMDB51 contains 7K video clips from 51 categories, and ESC50 has 2K audio clips from 50 categories. UCF101 and HMDB51 have 3 official train/test splits, while ESC50 has 5 splits. We conduct our ablation study using split-1 of each dataset. We report our average performance over all splits when we compare with prior work.
379
+
380
+ # B ADDITIONAL EXPERIMENTS
381
+
382
+ Effect of mutual information. We investigate the impact of the amount of MI on contrastive learning using the Spatial-MultiOmniglot dataset (Ozair et al., 2019). It contains paired images $( x , y )$ of Omniglot characters (Lake et al., 2015) with each image arranged in an $m \times n$ grid (each grid cell is $3 2 \times 3 2$ pixels). Let $l _ { i }$ be the alphabet size for the $\bar { \mathbf { \chi } } _ { i ^ { t h } }$ character in each image, then the MI $\begin{array} { r } { I ( x , y ) = \sum _ { i = 1 } ^ { m \hat { n } } l o g l _ { i } } \end{array}$ . This way, we can easily control the MI by adding or removing characters. We follow the experimental protocol of Ozair et al. (Ozair et al., 2019), keeping the training dataset size fixed at 50K and using the same alphabet sets: Tifinagh (55 characters), Hiragana (52), Gujarati (48), Katakana (47), Bengali (46), Grantha (43), Sanskrit (42), Armenian (41), and Mkhedruli (41).
383
+
384
+ ![](images/6c71a9385514f24ac7d1c6f0d48013c633363b8e1e872b1d3c43dafc93730213.jpg)
385
+ Figure 3: The effect of a) mutual information (Spatial-MultiOmniglot) and b) dictionary size on the accuracy of classification (UCF101).
386
+
387
+ Fig. 3(a) shows the results as the number of characters (and thus the MI) increases. We see that all approaches achieve nearly $9 9 \%$ accuracy with less than 3 characters; this is the case when the exponent of the MI is smaller than the dataset size (50K), i.e., $e ^ { I ( x , y ) } = 5 5$ with one character, $e ^ { I ( x , y ) } = 2 , 8 6 0$ with 2 characters. However, starting from 3 characters, the performance of the regular MoCo (SMoCo) drops significantly; this is because the exponent of the MI $( = 1 3 7 { , } 2 8 0$ $( 5 5 \times 5 2 \times 4 8 )$ ) is much larger than the dataset size. Although our model also drops performance when the MI is increased, it outperforms the other approaches by a large margin. We also observe that XMoCo outperforms SMoCo in mild conditions (1-5 characters) but performs nearly the same as SMoCo with severe conditions (6-9 characters). This suggests that, while cross-modal prediction helps to learn good representations, it also suffers with the same issue when the MI is large, thus adopting active sampling is beneficial.
388
+
389
+ Effect of dictionary size. Fig. 3 (b) shows how the dictionary size affects downstream task performance. Here we pretrain our model on Kinetics-700 and finetune it on UCF-101. Overall, all three approaches benefit from large dictionaries up to a threshold (at about $1 0 ^ { 3 }$ ), which is consistent with previous empirical findings (He et al., 2020). However, both XMoCo and SMoCo starts deteriorating performance after about $1 0 ^ { 4 }$ (which is consistent with previous theoretical claims of Arora et. al (Arora et al., 2019)), whereas ours do not suffer even after $1 0 ^ { 4 }$ . This suggests that there are performance limits by simply increasing the size of a randomly-sampled dictionary, and also shows the benefit of our active sampling approach.
390
+
391
+ Effect of pretraining dataset sizes. We investigate the effects of the size of pretraining datasets, using Kinetics-Sound (22k), Kinetics (240K), and AudioSet (1.8M). We vary pretraining conditions while using the same protocol to finetune the models end-to-end on downstream tasks.
392
+
393
+ Table 6 shows that our model benefits from pretraining on video data, and that the performance improves as we use a large pretraining video dataset (Kinetics and AudioSet) than the relatively smaller dataset (Kinetics-Sound). Notably, our approach even outperforms the fully-supervised pretraining approaches by pretraining on a larger video dataset ( $1 . 0 \%$ , $3 . 6 \%$ , and $8 . 5 \%$ improvement on UCF101, HMDB51, and ESC50, respectively.)
394
+
395
+ <table><tr><td>Approach</td><td>Dataset</td><td>UCF101</td><td>HMDB51</td><td>ESC50</td></tr><tr><td rowspan="3">Supervised</td><td>ImageNet (1.2M)</td><td>82.8</td><td>46.7†</td><td>1</td></tr><tr><td>Kinetics-Sound (22K)</td><td>86.9*</td><td>53.1*</td><td>78.3*</td></tr><tr><td>Kinetics400 (240K)</td><td>93.1†</td><td>63.6†</td><td>82.3*</td></tr><tr><td rowspan="3">CM-ACC</td><td>Kinetics-Sound (22K)</td><td>77.2</td><td>40.6</td><td>77.3</td></tr><tr><td>Kinetics700 (240K)</td><td>90.2 (-2.9)</td><td>61.8 (-1.8)</td><td>79.2 (-3.1)</td></tr><tr><td>AudioSet (1.8M)</td><td>94.1 (+1.0)</td><td>67.2 (+3.6)</td><td>90.8 (+8.5)</td></tr></table>
396
+
397
+ Table 6: Top-1 accuracy of CM-ACC pretrained on different datasets vs. fully-supervised counterparts (Supervised). $^ \dagger$ : the results are excerpted from Patrick et al. (2020), ∗: our results.
398
+
399
+ Diversity of random vs. active sampling. To compare the diversity of the chosen negatives by random vs. active sampling, we plot the probability of them on sampling of unique negatives (instances from different categories). The more categories the samples come from, we get more diverse and less redundant samples. We train these on UCF-101 over 300 iterations with different mini-batch sizes, $M \in \{ 3 2 , 6 4 , 1 2 8 \}$ . As shown in Figure 4, the active sampling selects more categories than random sampling across all three mini-batch sizes. At $M = 1 2 8$ , active sampling (with gradient embedding) covers $60 \%$ of categories on UCF101, which is substantially more diverse than random sampling $( 3 0 - 4 0 \% )$ .
400
+
401
+ ![](images/6f6218c433131524f7951846996fc7079ce0317f44aa92f2eb59fef8fa28dd45.jpg)
402
+ Figure 4: Probability of sampling unique negatives (instances from different categories) in the random vs. active sampling conditions. We compute the probabilities by averaging the number of unique categories across iterations and dividing them by their batch size.
403
+ Figure 5 shows negative instances selected by active sampling and random sampling when we use audio clips as the query. We visualize the center frames of the selected video clips. We can see that our approach selects more challenging examples than the random sampling approach. For instance,
404
+
405
+ given a query opening bottle, our approach selected video clips from the same or similar semantic categories, e.g. drinking shot and opening bottle. Given snowboarding, our approach selected more video clips related to categories containing the snow scene, e.g. ice fishing, snow kiting, and tobogganing.
406
+
407
+ ![](images/993801e955562f9657b69789fe7158fa3c941e570d0169d36afe9424ca9f6efc.jpg)
408
+ Figure 5: Center frames of video clips and their gradient norms selected by active sampling and random sampling.
409
+
410
+ Furthermore, we also find that our approach selects more diverse negative samples. For example, given a query snowboarding, active sampling selected video clips from 4 different categories related to the snow scene: (ice fishing, playing ice hockey, snow kiting, and tobogganing). In comparison, the random sampling approach yields fewer semantic categories in general. This suggests that our active sampling approach produces more ‘challenging’ and ‘diverse’ negative instances than the random sampling approach.
411
+
412
+ To clearly investigate the relationship between negative samples and their gradient magnitudes, we show the gradient norm of each visualized sample in Figure 5. We can see that hard negatives tend to have larger gradient norms than easy negatives. Given a query Playing guitar, video clips containing the concept of “playing instruments” yield the higher gradient norms, i.e. playing violin (333.87) and tapping guitar (301.35), while concepts that are easy to discriminate, e.g., riding a camel yield a significantly smaller gradient norm (5.92). This provides evidence showing the gradient magnitude is effective in measuring the uncertainty of the current model, i.e., highly-uncertain samples (hard negatives) tend to yield gradients with larger magnitudes, while highly-confident samples (easy negatives) tend to have smaller gradient magnitudes.
413
+
414
+ # D WHEN WOULD CROSS-MODAL CONTRASTIVE LEARNING FAIL?
415
+
416
+ In general, cross-modal video representation learning is based on an assumption that the natural correspondence between audio and visual channels could serve as a useful source of supervision. While intuitive, this assumption may not hold for certain videos in-the-wild, which may cause the model to learn suboptimal representations. To investigate when our approach succeeds and fails, we conduct a post-hoc analysis by using thehttps://www.overleaf.com/project/5ded2abe1c17bc00011e5da8 ground-truth semantic category labels provided in Kinetics-700 (Carreira et al., 2019) (which is not used during pretraining). Specifically, we use our pretrained model to solve the audio-visual contrastive pretext task (Eqn.(7) in the main paper) and keep track of the prediction results (correct/incorrect). We then average the pretext task accuracy over 100 randomly chosen samples for each action category.
417
+
418
+ ![](images/b9494fa649b44a6295d5309bb380e0821ecc14069f93564738fca1daff820be8.jpg)
419
+ Figure 6: Distribution of Kinetics-700 (Carreira et al., 2019) categories sorted by the prediction accuracy.
420
+
421
+ Figure 6 shows the top-10 and bottom-5 classes by using both audio (left) and video (right) as the query. We observe that, the top ranked classes for both audio and video are the activities that have highly correlated visual-audio signals. For instance, playing bass guitar, play piano, and play violin are all activities related to music. The correlation of audio-visual signals for these activities are obvious; such highly correlated signals are easier to be learned in a cross-modal manner. On the contrary, the bottom ranked classes are those that have subtle audio-visual correlation, e.g. tossing coin, shaking hand, looking at phone, and hugging. We also investigate the distribution of hard-easy classes with that reported in Kinetics-700 (Carreira et al., 2019) learned by the I3D-RGB model (Carreira & Zisserman, 2017). Interestingly, we find that some hard classes (e.g. karaoke and recording music) are listed in our top ranked classes. We suspect that, when only learned within visual modality, some classes with cluttered or complected spatial information will bring difficulties for classification. While, as our cross-modal approach can leverage information from both auditory and visual information, so our model does not limited by such problems.
422
+
423
+ # Algorithm 2 Cross-Modal Active Contrastive Coding (Detailed version of Algorithm 1)
424
+
425
+ 1: Require: Audio-visual clips $A , V$ ; encoders $f _ { v }$ , $f _ { a }$ , $h _ { v } , h _ { a }$ ; dictionary size $K$ ; pool size $N$ ; batch size $M$
426
+ 2: Initialize parameters, $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a } \sim U n i f o r m ( 0 , 1 )$
427
+ 3: Draw random dictionary, $D _ { v } \gets \{ v _ { 1 } , \cdot \cdot \cdot , v _ { K } \} \setminus$ Random $( V )$ , $D _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { K } \} \setminus R a n d o m ( A )$
428
+ 4: Encode dictionary samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in D _ { v }$ , $k _ { i } ^ { a } \gets h _ { a } ( a _ { i } ) , \forall a _ { i } \in D _ { a }$
429
+ 5: for $e p o c h = 1$ to #epochs: do
430
+ 6: Draw random pool, $U _ { v } \gets \{ v _ { 1 } , \cdot \cdot \cdot , v _ { N } \} \setminus R a n d o m ( V )$ , $U _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { N } \} \setminus R a n d o m ( A )$
431
+ 7: Encode pool samples, $k _ { n } ^ { v } h _ { v } ( v _ { n } ) , \forall v _ { n } \in U _ { v }$ , $k _ { n } ^ { a } h _ { a } ( a _ { n } ) , \forall a _ { n } \in U _ { a }$
432
+ 8: for $t = 1$ to #mini-batches: do
433
+ 9: Draw mini-batch, $B _ { v } \{ v _ { 1 } , \cdot \cdot \cdot , v _ { M } \} \sim V$ , $B _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { M } \} \sim A$
434
+ 10: . Active sampling of negative video keys for $D _ { v }$
435
+ 11: Encode mini-batch samples, $q _ { i } ^ { a } \gets f _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
436
+ 12: for $\forall v _ { n } \in U _ { v } \backslash D _ { v }$ : do
437
+ 13: Compute pseudo-posterior, $\begin{array} { r } { p ( \widehat { y } _ { n } ^ { v } | v _ { n } , B _ { a } ) \gets \frac { \exp ( k _ { n } ^ { v } \cdot q _ { j } ^ { a } ) } { \sum _ { i = 1 } ^ { M } \exp ( k _ { n } ^ { v } \cdot q _ { i } ^ { a } ) } , \forall j \in [ 1 , M ] } \end{array}$
438
+ 14: Compute pseudo-label, $\tilde { y } _ { n } ^ { v } \gets \arg \operatorname* { m a x } p ( \hat { y } _ { n } ^ { v } | \cdot \Big )$
439
+ 15: end for
440
+ 16: Compute gradient, gvn ← ∂∂θlast $\begin{array} { r } { g _ { v _ { n } } \gets \frac { \partial } { \partial \theta _ { l a s t } } \mathcal { L } _ { C E } ( p ( \hat { y } _ { n } ^ { v } | \cdot ) , \tilde { y } _ { n } ^ { v } ) \big | _ { \theta = \theta _ { q } ^ { a } } , \forall n \in [ 1 , N ] } \end{array}$
441
+ 17: Obtain $S _ { v } \gets k \mathrm { - M E A N S _ { I N I I } ^ { + + } }$ $ { ' } \{ g _ { v _ { n } } : v _ { n } \in U _ { v } \backslash D _ { v } \}$ , #seeds $= M$ )
442
+ 18: Update $D _ { v } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( D _ { v } ) , S _ { v } \big )$
443
+ 19: . Active sampling of negative audio keys for $D _ { a }$
444
+ 20: Encode mini-batch samples, $q _ { i } ^ { v } f _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$
445
+ 21: for $\forall a _ { n } \in U _ { a } \backslash D _ { a }$ : do
446
+ 22: Compute pseudo-posterior, $\begin{array} { r } { p ( \widehat { y } _ { n } ^ { a } | a _ { n } , B _ { v } ) \longleftarrow \frac { \exp ( k _ { n } ^ { a } \cdot q _ { j } ^ { v } ) } { \sum _ { i = 1 } ^ { M } \exp ( k _ { n } ^ { a } \cdot q _ { i } ^ { v } ) } , \forall j \in [ 1 , M ] } \end{array}$
447
+ 23: Compute pseudo-label, $\tilde { y } _ { n } ^ { a } \gets \arg \operatorname* { m a x } p ( \hat { y } _ { n } ^ { a } | \cdot )$
448
+ 24: end for
449
+ 25: Compute gradient, gan ← ∂∂θlast $\begin{array} { r } { g _ { a _ { n } } \gets \frac { \partial } { \partial \theta _ { l a s t } } \mathcal { L } _ { C E } \left( p ( \hat { y } _ { n } ^ { a } | \cdot ) , \tilde { y } _ { n } ^ { a } \right) | _ { \theta = \theta _ { q } ^ { v } } , \forall n \in [ 1 , N ] } \end{array}$
450
+ 26: Obtain $S _ { a } \gets k$ -MEANS++INIT $( \{ g _ { a _ { n } } : a _ { n } \in U _ { a } \backslash D _ { a } \}$ , #seeds = M )
451
+ 27: Update ${ \cal D } _ { a } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( { \cal D } _ { a } ) , { \cal S } _ { a } \big )$
452
+ 28: $\triangleright$ Cross-modal contrastive predictive coding
453
+ 29: Encode mini-batch samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$ , $k _ { i } ^ { a } \gets h _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
454
+ 30: Compute $\begin{array} { r } { p ( y _ { i } ^ { v } | \cdot ) = \frac { \exp ( q _ { i } ^ { v } \cdot k _ { i } ^ { a } / \tau ) } { \sum _ { j = 0 } ^ { K } \exp ( q _ { i } ^ { v } \cdot k _ { j } ^ { a } / \tau ) } , p ( y _ { i } ^ { a } | \cdot ) = \frac { \exp ( q _ { i } ^ { a } \cdot k _ { i } ^ { v } / \tau ) } { \sum _ { j = 0 } ^ { K } \exp ( q _ { i } ^ { a } \cdot k _ { j } ^ { v } / \tau ) } , \forall i \in [ 1 , M ] } \end{array}$
455
+ 31: . Update model parameters
456
+ 32: Update $\theta _ { q } ^ { v } \theta _ { q } ^ { \overline { { v } } } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( p ( y ^ { v } | \cdot ) , y _ { g t } ^ { v } ) | _ { \theta = \theta _ { q } ^ { v } } , \theta _ { q } ^ { a } \theta _ { q } ^ { a } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( p ( y ^ { a } | \cdot ) , y _ { g t } ^ { a } ) | _ { \theta = \theta _ { q } ^ { a } }$
457
+ 33: Momentum update $\theta _ { k } ^ { v } \gets m \theta _ { k } ^ { v } + ( 1 - m ) \theta _ { q } ^ { v }$ , $\theta _ { k } ^ { a } m \theta _ { k } ^ { a } + ( 1 - m ) \theta _ { q } ^ { a }$
458
+ 34: end for
459
+ 35: end for
460
+ 36: return Optimal solution $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a }$
461
+
462
+ # Algorithm 3 k- $\mathbf { M E A N S _ { I N I T } ^ { + + } }$ Seed Cluster Initialization
463
+
464
+ 1: Require: Data $X$ of $N$ samples; number of centroids $K$
465
+ 2: Choose one centroid uniformly at random, $C [ 0 ] \gets x \setminus R a n d o m ( X )$
466
+ 3: for $k = 1$ to $K - 1$ : do
467
+ 4: $\triangleright$ Compute a cumulative probability distribution with a probability in proportion to their squared dis
468
+ tances from the nearest centroid that has already been chosen
469
+ 5: for $n = 0$ to $N - 1$ : do
470
+ 6: Compute the squared distance, $D [ n ] \gets ( m i n \_ d i s t ( X [ n ] , C ) ) ^ { : 2 }$
471
+ 7: end for
472
+ 8: Compute the cumulative probability distribution, P ← cumsum(D)sum(D)
473
+ 9: . The next centroid is chosen using $P ( X )$ as a weighted probability distribution
474
+ 10: Choose one centroid at random, $C [ k ] \gets x \setminus P ( X )$
475
+ 11: end for
476
+ 12: return $C$ containing $K$ centroids
477
+
478
+ # Algorithm 4 Cross-Modal Contrastive Coding without Active Sampling
479
+
480
+ 1: Require: Audio-visual clips $A , V$ ; dictionary $D _ { v }$ ; encoders $f _ { v } , f _ { a } , h _ { v } , h _ { a }$ ;
481
+ dictionary size $K$ ; mini-batch size $M$ ; learning rate $\gamma$ ; momentum $m$
482
+ 2: Initialize parameters, $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a } \sim U n i f o r m ( 0 , 1 )$
483
+ 3: Load a dictionary at random, $D _ { a } \gets \{ v _ { 1 } , \cdot \cdot \cdot , v _ { K } \} \\setminus R a n d o m ( V )$
484
+ 4: Load a dictionary at random, $D _ { v } \gets \{ a _ { 1 } , \cdots , a _ { K } \} \setminus R a n d o m ( A )$
485
+ 5: Encode dictionary samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in D _ { a }$ , $k _ { i } ^ { a } h _ { a } ( a _ { i } ) , \forall a _ { i } \in D _ { v }$
486
+ 6: for epoch $= 1$ to #epochs: do
487
+ 7: for $t = 1$ to #mini-batches: do
488
+ 8: Load a mini-batch of visual clips, $B _ { v } \{ v _ { 1 } , \cdot \cdot \cdot , v _ { M } \} \sim V$
489
+ 9: Load a mini-batch of audio clips, $B _ { a } \gets \{ a _ { 1 } , \cdot \cdot \cdot , a _ { M } \} \sim A$
490
+ 10: $\triangleright$ Update dictionaries
491
+ 11: Encode mini-batch samples, $k _ { i } ^ { v } h _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$
492
+ 12: Encode mini-batch samples, $k _ { i } ^ { a } \gets h _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
493
+ 13: Update $D _ { v } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( D _ { v } ) , B _ { v } \big )$
494
+ 14: Update $D _ { a } \gets \mathrm { E N Q U E U E } \big ( \mathtt { D E Q U E U E } ( D _ { a } ) , B _ { a } \big )$
495
+ 15: . Cross-modal contrastive predictive coding
496
+ 16: Encode mini-batch samples, $q _ { i } ^ { v } f _ { v } ( v _ { i } ) , \forall v _ { i } \in B _ { v }$
497
+ 17: Encode mini-batch samples, $q _ { i } ^ { a } \gets f _ { a } ( a _ { i } ) , \forall a _ { i } \in B _ { a }$
498
+ 18: Compute the posterior, $\begin{array} { r } { p ( y _ { i } ^ { v } | v _ { i } , a _ { i } , D _ { v } ) = \frac { \exp ( q _ { i } ^ { v } \cdot k _ { i } ^ { a } / \tau ) } { \sum _ { j = 0 } ^ { K } \exp ( q _ { i } ^ { v } \cdot k _ { j } ^ { a } / \tau ) } , \forall i \in [ 1 , M ] } \end{array}$
499
+ 19: Compute the posterior, $\begin{array} { r } { p ( y _ { i } ^ { a } | a _ { i } , v _ { i } , D _ { v } ) = \frac { \exp ( q _ { i } ^ { a } \cdot k _ { i } ^ { v } / \tau ) } { \sum _ { j = 0 } ^ { K } \exp ( q _ { i } ^ { a } \cdot k _ { j } ^ { v } / \tau ) } , \forall i \in [ 1 , M ] } \end{array}$
500
+ 20: . Update model parameters
501
+ 21: Update $\theta _ { q } ^ { v } \theta _ { q } ^ { v } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( - \log p ( y ^ { v } | \cdot ) , y _ { g t } ^ { v } ) | _ { \theta = \theta _ { a } ^ { v } }$
502
+ 22: Update $\theta _ { q } ^ { a } \theta _ { q } ^ { a } - \gamma \nabla _ { \theta } \mathcal { L } _ { C E } ( - \log p ( y ^ { a } | \cdot ) , y _ { g t } ^ { a } ) | _ { \theta = \theta _ { q } ^ { a } }$
503
+ 23: Momentum update $\theta _ { k } ^ { v } \gets m \theta _ { k } ^ { v } + ( 1 - m ) \theta _ { q } ^ { v }$
504
+ 24: Momentum update $\theta _ { k } ^ { a } m \theta _ { k } ^ { a } + ( 1 - m ) \theta _ { q } ^ { a }$
505
+ 25: end for
506
+ 26: end for
507
+ 27: return Optimal solution $\theta _ { q } ^ { v } , \theta _ { k } ^ { v } , \theta _ { q } ^ { a } , \theta _ { k } ^ { a }$
parse/train/OMizHuea_HB/OMizHuea_HB_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/OMizHuea_HB/OMizHuea_HB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/OMizHuea_HB/OMizHuea_HB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1esMkHYPr/S1esMkHYPr.md ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GRAPHAF: A FLOW-BASED AUTOREGRESSIVE MODEL FOR MOLECULAR GRAPH GENERATION
2
+
3
+ Chence $\mathbf { S h i ^ { * 1 } }$ , Minkai $\mathbf { X } \mathbf { u } ^ { * 2 }$ , Zhaocheng $\mathbf { Z } \mathbf { h } \mathbf { u } ^ { 3 , 4 }$ , Weinan Zhang2, Ming Zhang1, Jian Tang3,5,6
4
+
5
+ 1Department of Computer Science, Peking University, Chi
6
+ 2Shanghai Jiao Tong University, China
7
+ 3Mila - Quebec AI Institute, Canada ´
8
+ 4Universite de Montr ´ eal, Canada ´
9
+ 5HEC Montreal, Canada ´
10
+ 6CIFAR AI Research Chair
11
+ {chenceshi,mzhang cs}@pku.edu.cn
12
+ {mkxu,wnzhang}@apex.sjtu.edu.cn
13
+ zhaocheng.zhu@umontreal.ca
14
+ jian.tang@hec.ca
15
+
16
+ # ABSTRACT
17
+
18
+ Molecular graph generation is a fundamental problem for drug discovery and has been attracting growing attention. The problem is challenging since it requires not only generating chemically valid molecular structures but also optimizing their chemical properties in the meantime. Inspired by the recent progress in deep generative models, in this paper we propose a flow-based autoregressive model for graph generation called GraphAF. GraphAF combines the advantages of both autoregressive and flow-based approaches and enjoys: (1) high model flexibility for data density estimation; (2) efficient parallel computation for training; (3) an iterative sampling process, which allows leveraging chemical domain knowledge for valency checking. Experimental results show that GraphAF is able to generate $68 \%$ chemically valid molecules even without chemical knowledge rules and $100 \%$ valid molecules with chemical rules. The training process of GraphAF is two times faster than the existing state-of-the-art approach GCPN. After fine-tuning the model for goal-directed property optimization with reinforcement learning, GraphAF achieves state-of-the-art performance on both chemical property optimization and constrained property optimization.1
19
+
20
+ # 1 INTRODUCTION
21
+
22
+ Designing novel molecular structures with desired properties is a fundamental problem in a variety of applications such as drug discovery and material science. The problem is very challenging, since the chemical space is discrete by nature, and the entire search space is huge, which is believed to be as large as $1 0 ^ { 3 \mathbf { \hat { 3 } } }$ (Polishchuk et al., 2013). Machine learning techniques have seen a big opportunity in molecular design thanks to the large amount of data in these domains. Recently, there are increasing efforts in developing machine learning algorithms that can automatically generate chemically valid molecular structures and meanwhile optimize their properties.
23
+
24
+ Specifically, significant progress has been achieved by representing molecular structures as graphs and generating graph structures with deep generative models, e.g., Variational Autoencoders (VAEs) (Kingma & Welling, 2013), Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) and Autoregressive Models (Van Oord et al., 2016). For example, Jin et al. (2018) proposed a Junction Tree VAE (JT-VAE) for molecular structure encoding and decoding. De Cao & Kipf (2018) studied how to use GANs for molecular graph generation. You et al. (2018a) proposed an approach called Graph Convolutional Policy Network (GCPN), which formulated molecular graph generation as a sequential decision process and dynamically generates the nodes and edges based on the existing graph substructures. They used reinforcement learning to optimize the properties of generated graph structures. Recently, another very related work called MolecularRNN (MRNN) (Popova et al., 2019) proposed to use an autoregressive model for molecular graph generation. The autoregressive based approaches including both GCPN and MRNN have demonstrated very competitive performance in a variety of tasks on molecular graph generation.
25
+
26
+ Table 1: Previous state-of-the-art algorithms for molecular graph generation. The comparison of training is only conducted between autoregressive models.
27
+
28
+ <table><tr><td rowspan="2">Name</td><td colspan="4">GenerativeModel</td><td colspan="2">Sampling Process</td><td colspan="2">Training Process</td></tr><tr><td>VAE</td><td>GAN</td><td>RNN</td><td>Flow</td><td>One-shot</td><td>Iterative</td><td>Sequential</td><td>Parallel</td></tr><tr><td>JT-VAE</td><td>√</td><td>-</td><td>-</td><td>-</td><td>1</td><td>√</td><td></td><td>=</td></tr><tr><td>RVAE</td><td>√</td><td>-</td><td>-</td><td>-</td><td>√</td><td>-</td><td></td><td></td></tr><tr><td>GCPN</td><td>1</td><td>√</td><td>-</td><td>-</td><td></td><td>√</td><td>√</td><td></td></tr><tr><td>MRNN</td><td></td><td></td><td>√</td><td>-</td><td></td><td>√</td><td>√</td><td></td></tr><tr><td>GraphNVP</td><td>-</td><td>-</td><td></td><td>√</td><td>√</td><td>-</td><td>1</td><td>=</td></tr><tr><td>GraphAF</td><td>1</td><td>-</td><td>-</td><td>√</td><td>-</td><td>√</td><td>-</td><td>√</td></tr></table>
29
+
30
+ Recently, besides the aforementioned three types of generative models, normalizing flows have made significant progress and have been successfully applied to a variety of tasks including density estimation (Dinh et al., 2016; Papamakarios et al., 2017), variational inference (Kingma et al., 2016; Louizos & Welling, 2017; Rezende & Mohamed, 2015), and image generation (Kingma & Dhariwal, 2018). Flow-based approaches define invertible transformations between a latent base distribution (e.g. Gaussian distribution) and real-world high-dimensional data (e.g. images and speech). Such an invertible mapping allows the calculation of the exact data likelihood. Meanwhile, by using multiple layers of non-linear transformation between the hidden space and observation space, flows have a high capacity to model the data density. Moreover, different architectures can be designed to promote fast training (Papamakarios et al., 2017) or fast sampling (Kingma et al., 2016) depending on the requirement of different applications.
31
+
32
+ Inspired by existing work on autoregressive models and recent progress of deep generative models with normalizing flows, we propose a flow-based autoregressive model called GraphAF for molecular graph generation. GraphAF effectively combines the advantages of autoregressive and flow-based approaches. It has a high model capacity and hence is capable of modeling the density of real-world molecule data. The sampling process of GraphAF is designed as an autoregressive model, which dynamically generates the nodes and edges based on existing sub-graph structures. Similar to existing models such as GCPN and MRNN, such a sequential generation process allows leveraging chemical domain knowledge and valency checking in each generation step, which guarantees the validity of generated molecular structures. Meanwhile, different from GCPN and MRNN as an autoregressive model during training, GraphAF defines a feedforward neural network from molecular graph structures to the base distribution and is therefore able to compute the exact data likelihood in parallel. As a result, the training process of GraphAF is very efficient.
33
+
34
+ We conduct extensive experiments on the standard ZINC (Irwin et al., 2012) dataset. Results show that the training of GraphAF is significantly efficient, which is two times faster than the state-of-theart model GCPN. The generated molecules are $100 \%$ valid by incorporating the chemical rules during generation. We are also surprised to find that even without using the chemical rules for valency checking during generation, the percentage of valid molecules generated by GraphAF can be still as high as $68 \%$ , which is significantly higher than existing state-of-the-art GCPN. This shows that GraphAF indeed has the high model capability to learn the data distribution of molecule structures. We further fine-tune the generation process with reinforcement learning to optimize the chemical properties of generated molecules. Results show that GraphAF significantly outperforms previous state-of-the-art GCPN on both property optimization and constrained property optimization tasks.
35
+
36
+ # 2 RELATED WORK
37
+
38
+ A variety of deep generative models have been proposed for molecular graph generation recently (Segler et al., 2017; Olivecrona et al., 2017; Samanta et al., 2018; Neil et al., 2018). The RVAE model (Ma et al., 2018) used a variational autoencoder for molecule generation, and proposed a novel regularization framework to ensure semantic validity. Jin et al. (2018) proposed to represent a molecule as a junction tree of chemical scaffolds and proposed the JT-VAE model for molecule generation. For the VAE-based approaches, the optimization of chemical properties is usually done by searching in the latent space with Bayesian Optimization (Jin et al., 2018). De Cao & Kipf (2018) used Generative Adversarial Networks for molecule generation. The state-of-the-art models are built on autoregressive based approaches (You et al., 2018a; Popova et al., 2019). (You et al., 2018a) formulated the problem as a sequential decision process by dynamically adding new nodes and edges based on current sub-graph structures, and the generation policy network is trained by a reinforcement learning framework. Recently, Popova et al. (2019) proposed an autoregressive model called MolecularRNN to generate new nodes and edges based on the generated nodes and edge sequences. The iterative nature of autoregressive model allows effectively leveraging chemical rules for valency checking during generation and hence the proportion of valid molecules generated by these models is very high. However, due to the sequential generation nature, the training process is usually slow. Our GraphAF approach enjoys the advantage of iterative generation process like autoregressive models (the mapping from latent space to observation space) and meanwhile calculates the exact likelihood corresponding to a feedforward neural network (the mapping from observation space to latent space), which can be implemented efficiently through parallel computation.
39
+
40
+ Two recent work—Graph Normalizing Flows (GNF) (Liu et al., 2019) and GraphNVP (Madhawa et al., 2019)—are also flow-based approaches for graph generation. However, our work is fundamentally different from their work. GNF defines a normalizing flow from a base distribution to the hidden node representations of a pretrained Graph Autoencoders. The generation scheme is done through two separate stages by first generating the node embeddings with the normalizing flow and then generate the graphs based on the generated node embeddings in the first stage. By contrast, in GraphAF, we define an autoregressive flow from a base distribution directly to the molecular graph structures, which can be trained end-to-end. GraphNVP also defines a normalizing flow from a base distribution to the molecular graph structures. However, the generation process of GraphNVP is one-shot, which cannot effectively capture graph structures and also cannot guarantee the validity of generated molecules. In our GraphAF, we formulate the generation process as a sequential decision process and effectively capture the sub-graph structures via graph neural networks, based on which we define a policy function to generate the nodes and edges. The sequential generation process also allows incorporating the chemical rules. As a result, the validity of the generated molecules can be guaranteed. We summarize existing approaches in Table 1.
41
+
42
+ # 3 PRELIMINARIES
43
+
44
+ # 3.1 AUTOREGRESSIVE FLOW
45
+
46
+ A normalizing flow (Kobyzev et al., 2019) defines a parameterized invertible deterministic transformation from a base distribution $\mathcal { E }$ (the latent space, e.g., Gaussian distribution) to real-world observational space $\mathcal { Z }$ (e.g. images and speech). Let $f : \mathcal { E } \mathcal { Z }$ be an invertible transformation where $\epsilon \sim p \varepsilon ( \epsilon )$ is the base distribution, then we can compute the density function of real-world data $z$ , i.e., $p _ { Z } ( z )$ , via the change-of-variables formula:
47
+
48
+ $$
49
+ p _ { Z } ( z ) = p _ { \mathcal { E } } \left( f _ { \theta } ^ { - 1 } ( z ) \right) \left| \operatorname* { d e t } \frac { \partial f _ { \theta } ^ { - 1 } ( z ) } { \partial z } \right| .
50
+ $$
51
+
52
+ Now considering two key processes of normalizing flows as a generative model: (1) Calculating Data Likelihood: given a datapoint $z$ , the exact density $p _ { Z } ( z )$ can be calculated by inverting the transformation $f$ , $\epsilon = f _ { \theta } ^ { - 1 } ( z )$ ; (2) Sampling: $z$ can be sampled from the distribution $p _ { Z } ( z )$ by first sample $\epsilon \sim p _ { \mathcal { E } } ( \epsilon )$ and then perform the feedforward transformation $z = f _ { \theta } ( \epsilon )$ . To efficiently perform the above mentioned operations, $f _ { \theta }$ is required to be invertible with an easily computable Jacobian determinant. Autoregressive flows (AF), originally proposed in Papamakarios et al. (2017), is a variant that satisfies these criteria, which holds a triangular Jacobian matrix, and the determinant can be computed linearly. Formally, given $z \in \mathbb { R } ^ { D }$ $D$ is the dimension of observation data), the autoregressive conditional probabilities can be parameterized as Gaussian distributions:
53
+
54
+ where $g _ { \mu }$ and $g _ { \alpha }$ are unconstrained and positive scalar functions of $z _ { 1 : d - 1 }$ respectively to compute the mean and deviation. In practice, these functions can be implemented as neural networks. The
55
+
56
+ affine transformation of AF can be written as:
57
+
58
+ $$
59
+ f _ { \theta } ( \epsilon _ { d } ) = z _ { d } = \mu _ { d } + \alpha _ { d } \cdot \epsilon _ { d } ; f _ { \theta } ^ { - 1 } ( z _ { d } ) = \epsilon _ { d } = \frac { z _ { d } - \mu _ { d } } { \alpha _ { d } } .
60
+ $$
61
+
62
+ The Jacobian matrix in AF is triangular, since $\frac { \partial z _ { i } } { \partial \epsilon _ { j } }$ is non-zero only for $j \le i$ . Therefore, the determinant can be efficiently computed through $\Pi _ { d = 1 } ^ { D } \alpha _ { d }$ . Specifically, to perform density estimation, we can apply all individual scalar affine transformations in parallel to compute the base density, each of which depends on previous variables $z _ { 1 : d - 1 }$ ; to sample $z$ , we can first sample $\boldsymbol { \epsilon } \in \mathbb { R } ^ { D }$ and compute $z _ { 1 }$ through the affine transformation, and then each subsequent $z _ { d }$ can be computed sequentially based on previously observed $z _ { 1 : d - 1 }$ .
63
+
64
+ # 3.2 GRAPH REPRESENTATION LEARNING
65
+
66
+ Following existing work, we also represent a molecule as a graph $G = ( A , X )$ , where $A$ is the adjacency tensor and $X$ is the node feature matrix. Assuming there are $n$ nodes in the graph, $d$ and $b$ are the number of different types of nodes and edges respectively, then $A \in \{ 0 , 1 \} ^ { n \times n \times \dot { b } }$ and $X \in \{ 0 , 1 \} ^ { n \times d }$ . $A _ { i j k } = 1$ if there exists a bond with type $k$ between $i ^ { \dot { t } h }$ and $j ^ { t h }$ nodes.
67
+
68
+ Graph Convolutional Networks (GCN) (Duvenaud et al., 2015; Gilmer et al., 2017; Kearnes et al., 2016; Kipf & Welling, 2016; Schutt et al., 2017) are a family of neural network architectures ¨ for learning representations of graphs. In this paper, we use a variant of Relational GCN (RGCN) (Schlichtkrull et al., 2018) to learn the node representations (i.e., atoms) of graphs with categorical edge types. Let $k$ denote the embedding dimension. We compute the node embeddings $\breve { H } ^ { l } \in \mathbb { R } ^ { n \times k }$ at the $l ^ { t h }$ layer of R-GCN by aggregating messages from different edge types:
69
+
70
+ $$
71
+ H ^ { l } = \mathrm { A g g } \left( \mathrm { R e L U } \left( \{ \tilde { D } _ { i } ^ { - \frac { 1 } { 2 } } \tilde { E } _ { i } \tilde { D } _ { i } ^ { - \frac { 1 } { 2 } } H ^ { l - 1 } W _ { i } ^ { l } \} \big | i \in ( 1 , \ldots , b ) \right) \right) ,
72
+ $$
73
+
74
+ where $E _ { i } = A _ { [ : , : , i ] }$ denotes the $i ^ { t h }$ slice of edge-conditioned adjacency tensor, ${ \tilde { E } } _ { i } = E _ { i } + I$ , and $\begin{array} { r } { \tilde { D } _ { i } = \sum _ { k } \tilde { E } _ { i } [ j , k ] } \end{array}$ . $W _ { i } ^ { ( l ) }$ is a trainable weight matrix for the $i ^ { \mathrm { { t h } } }$ edge type. $\mathrm { A g g ( \cdot ) }$ denotes an aggregation function such as mean pooling or summation. The initial hidden node representation $\breve { H } ^ { \widetilde { 0 } }$ is set as the original node feature matrix $X$ . After $L$ message passing layers, we use the the final hidden representation $H ^ { L }$ as the node representations. Meanwhile, the whole graph representations can be defined by aggregating the whole node representations using a readout function (Hamilton et al., 2017), e.g., summation.
75
+
76
+ # 4 PROPOSED METHOD
77
+
78
+ # 4.1 GRAPHAF FRAMEWORK
79
+
80
+ Similar to existing works like GCPN (You et al., 2018a) and MolecularRNN (Popova et al., 2019), we formalize the problem of molecular graph generation as a sequential decision process. Let $G =$ $( A , X )$ denote a molecular graph structure. Starting from an empty graph $G _ { 1 }$ , in each step a new node $X _ { i }$ is generated based on the current sub-graph structure $G _ { i }$ , i.e., $p ( X _ { i } | G _ { i } )$ . Afterwards, the edges between this new node and existing nodes are sequentially generated according to the current graph structure, i.e., $p ( A _ { i j } | G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } )$ . This process is repeated until all the nodes and edges are generated. An illustrative example is given in Fig. 1(a).
81
+
82
+ GraphAF is aimed at defining an invertible transformation from a base distribution (e.g. multivariate Gaussian) to a molecular graph structure $G = ( A , X )$ . Note that we add one additional type of edge between two nodes, which corresponds to no edge between two nodes, i.e., $A \in \{ 0 , 1 \} ^ { n \times n \times ( b + 1 ) }$ . Since both the node type $X _ { i }$ and the edge type $A _ { i j }$ are discrete, which do not fit into a flow-based model, a standard approach is to use Dequantization technique (Dinh et al., 2016; Kingma $\&$ Dhariwal, 2018) to convert discrete data into continuous data by adding real-valued noise. We follow this approach to preprocess a discrete graph $G = ( A , X )$ into continuous data $\boldsymbol { z } = ( z ^ { A } , z ^ { X } )$ :
83
+
84
+ $$
85
+ z _ { i } ^ { X } = X _ { i } + u , u \sim U [ 0 , 1 ) ^ { d } ; z _ { i j } ^ { A } = A _ { i j } + u , u \sim U [ 0 , 1 ) ^ { b + 1 } .
86
+ $$
87
+
88
+ ![](images/976217a5e01bd1d6d1ad404b9fd13d85813507703e8e0c8a5ddc8843af1d57d1.jpg)
89
+ Figure 1: Overview of the proposed GraphAF model. (a) Illustration of the generative procedure. New nodes or edges are marked in red. Starting from an empty graph and iteratively sample random variables to map them to atom/bond features. The numbered first three steps correspond to the maps in the bottom figure of Fig. 1(b). (b) Computation graph of GraphAF. The left side are the nodes and edges and the right are latent variables.
90
+
91
+ We present further discussions on dequantization techniques in Appendix A. Formally, we define the conditional distributions for the generation as:
92
+
93
+ $$
94
+ p ( z _ { i } ^ { X } | G _ { i } ) = N ( \mu _ { i } ^ { X } , ( \alpha _ { i } ^ { X } ) ^ { 2 } ) ,
95
+ $$
96
+
97
+ $$
98
+ p ( z _ { i j } ^ { A } | G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } ) = { \cal N } ( \mu _ { i j } ^ { A } , ( \alpha _ { i j } ^ { A } ) ^ { 2 } ) , j \in \{ 1 , 2 , \ldots , i - 1 \} ,
99
+ $$
100
+
101
+ $$
102
+ \mathrm { w h e r e } \ \mu _ { i j } ^ { A } = g _ { \mu ^ { A } } ( G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } ) , \alpha _ { i j } ^ { A } = g _ { \alpha ^ { A } } ( G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } ) ,
103
+ $$
104
+
105
+ where $g _ { \mu ^ { X } } , g _ { \mu ^ { A } }$ and $g _ { \alpha } x , g _ { \alpha ^ { A } }$ are parameterized neural networks for defining the mean and standard deviation of a Gaussian distribution. More specifically, given the current sub-graph structure $G _ { i }$ , we use a $L$ -layer of Relational GCN (defined in Section 3.2) to learn the node embeddings $H _ { i } ^ { L } \in \mathbb { R } ^ { n \times k }$ , and the embedding of entire sub-graph $\tilde { h _ { i } } \in \mathbb { R } ^ { k }$ , based on which we define the mean and standard deviations of Gaussian distributions to generate the nodes and edges respectively:
106
+
107
+ $$
108
+ \begin{array} { r l } & { \mathrm { R \mathrm { - } G C N } ; H _ { i } ^ { L } = \mathrm { R } \mathrm { - } G \mathrm { C N } ( G _ { i } ) , \tilde { h _ { i } } = \mathrm { s u m } ( H _ { i } ^ { L } ) ; } \\ & { \mathrm { N o d e } \mathrm { - } \mathrm { M L P s } ; g _ { \mu ^ { X } } = m _ { \mu ^ { X } } ( \tilde { h _ { i } } ) , g _ { \alpha ^ { X } } = m _ { \alpha ^ { X } } ( \tilde { h _ { i } } ) ; } \\ & { \mathrm { E d g e } \mathrm { - } \mathrm { M L P s } ; g _ { \mu ^ { A } } = m _ { \mu ^ { A } } ( \tilde { h _ { i } } , H _ { i , i } ^ { L } , H _ { i , j } ^ { L } ) , g _ { \alpha ^ { A } } = m _ { \alpha ^ { A } } ( \tilde { h _ { i } } , H _ { i , i } ^ { L } , H _ { i , j } ^ { L } ) , } \end{array}
109
+ $$
110
+
111
+ where sum denotes the sum-pooling operation, and $H _ { i , j } ^ { L } \in \mathbb { R } ^ { k }$ denotes the embedding of the $j$ -th node in the embeddings $H _ { i } ^ { L }$ . $m _ { \mu ^ { X } } , m _ { \alpha ^ { X } }$ are Multi-Layer Perceptrons (MLP) that predict the node types according to the current sub-graph embedding. and $m _ { \mu ^ { A } } , m _ { \alpha ^ { A } }$ are MLPs that predict the types of edges according to the current sub-graph embedding and node embeddings.
112
+
113
+ To generate a new node $X _ { i }$ and its edges connected to existing nodes, we just sample random variables $\epsilon _ { i }$ and $\epsilon _ { i j }$ from the base Gaussian distribution and convert it to discrete features. More specifically,
114
+
115
+ $$
116
+ \begin{array} { r l } & { z _ { i } ^ { X } = \epsilon _ { i } \odot \alpha _ { i } ^ { X } + \mu _ { i } ^ { X } , \epsilon _ { i } \in \mathbb { R } ^ { d } ; } \\ & { z _ { i j } ^ { A } = \epsilon _ { i j } \odot \alpha _ { i j } ^ { A } + \mu _ { i j } ^ { A } , j \in \{ 1 , 2 , . . . , i - 1 \} , \epsilon _ { i j } \in \mathbb { R } ^ { b + 1 } , } \end{array}
117
+ $$
118
+
119
+ where $\odot$ is the element-wise multiplication. In practice, a real molecular graph is generated by taking the argmax of generated continuous vectors, i.e., vdargmax(zXi ) and Aij = vb+1argm , where $v _ { q } ^ { p }$ denotes a $p$ dimensional one-hot vector with $q ^ { \mathrm { t h } }$ dimension equal to 1.
120
+
121
+ Let $\epsilon = \{ \epsilon _ { 1 } , \epsilon _ { 2 } , \epsilon _ { 2 1 } , \epsilon _ { 3 } , \epsilon _ { 3 1 } , \epsilon _ { 3 2 } , \ldots , \epsilon _ { n } , \epsilon _ { n 1 } , \ldots , \epsilon _ { n , n - 1 } \}$ , where $n$ is the number of atoms in the given molecule, GraphAF defines an invertible mapping between the base Gaussian distribution $\epsilon$
122
+
123
+ and the molecule structures $z ~ = ~ ( z ^ { A } , z ^ { X } )$ . According to Eq. 9, the inverse process from $z =$ $( z ^ { A } , z ^ { X } )$ to $\epsilon$ can be easily calculated as:
124
+
125
+ $$
126
+ \epsilon _ { i } = \left( z _ { i } ^ { X } - \mu _ { i } ^ { X } \right) \odot \frac { 1 } { \alpha _ { i } ^ { X } } ; \quad \epsilon _ { i j } = \left( z _ { i j } ^ { A } - \mu _ { i j } ^ { A } \right) \odot \frac { 1 } { \alpha _ { i j } ^ { A } } , j \in \{ 1 , 2 , \ldots , i - 1 \} ,
127
+ $$
128
+
129
+ $\frac { 1 } { \alpha _ { i } ^ { X } }$ and $\frac { 1 } { \alpha _ { i j } ^ { A } }$ denote element-wise reciprocals of $\alpha _ { i } ^ { X }$ and $\alpha _ { i j } ^ { A }$ respectively.
130
+
131
+ # 4.2 EFFICIENT PARALLEL TRAINING
132
+
133
+ In GraphAF, since $f : \mathcal { E } \mathcal { Z }$ is autoregressive, the Jacobian matrix of the inverse process $f ^ { - 1 }$ : $\mathcal { Z } \mathcal { E }$ is a triangular matrix, and its determinant can be calculated very efficiently. Given a minibatch of training data $G$ , the exact density of each molecule under a given order can be efficiently computed by the change-of-variables formula in Eq. 1. Our objective is to maximize the likelihood of training data.
134
+
135
+ During training, we are able to perform parallel computation by defining a feedforward neural network between the input molecule graph $G$ and the output latent variable $\epsilon$ by using masking. The mask drops out some connections from inputs to ensure that R-GCN is only connected to the sub-graph $G _ { i }$ when inferring the hidden variable of node $i$ , i.e., $\epsilon _ { i }$ , and connected to sub-graph $G _ { i } , X _ { i } , A _ { i , 1 : j - 1 }$ when inferring the hidden variable of edge $A _ { i j }$ , i.e., $\epsilon _ { i j }$ . This is similar to the approaches used in MADE (Germain et al., 2015) and MAF (Papamakarios et al., 2017). With the masking technique, GraphAF satisfies the autoregressive property, and at the same time $p ( G )$ can be efficiently calculated in just one forward pass by computing all the conditionals in parallel.
136
+
137
+ To further accelerate the training process, the nodes and edges of a training graph are re-ordered according to the breadth-first search (BFS) order, which is widely adopted by existing approaches for graph generation (You et al., 2018b; Popova et al., 2019). Due to the nature of BFS, bonds can only be present between nodes within the same or consecutive BFS depths. Therefore, the maximum dependency distance between nodes is bounded by the largest number of nodes in a single BFS depth. In our data sets, any single BFS depth contains no more than 12 nodes, which means we only need to model the edges between current atom and the latest generated 12 atoms.
138
+
139
+ Due to space limitation, we summarize the detailed training algorithm into Appendix B.
140
+
141
+ # 4.3 VALIDITY CONSTRAINED SAMPLING
142
+
143
+ In chemistry, there exist many chemical rules, which can help to generate valid molecules. Thanks to the sequential generation process, GraphAF can leverage these rules in each generation step. Specifically, we can explicitly apply a valency constraint during sampling to check whether current bonds have exceeded the allowed valency, which has been widely adopted in previous models (You et al., 2018a; Popova et al., 2019). Let $| A _ { i j } |$ denote the order of the chemical bond $A _ { i j }$ . In each edge generation step of $A _ { i j }$ , we check the following valency constraint for the $i ^ { t h }$ and $j ^ { t h }$ atoms:
144
+
145
+ $$
146
+ \sum _ { j } | A _ { i j } | \leq \operatorname { V a l e n c y } ( X _ { i } ) { \mathrm { ~ a n d ~ } } \sum _ { i } | A _ { i j } | \leq \operatorname { V a l e n c y } ( X _ { j } ) .
147
+ $$
148
+
149
+ If the newly added bond breaks the valency constraint, we just reject the bond $A _ { i j }$ , sample a new $\epsilon _ { i j }$ in the latent space and generate another new bond type. The generation process will terminate if one of the following conditions is satisfied: 1) the graph size reaches the max-size $n , 2$ ) no bond is generated between the newly generated atom and previous sub-graph. Finally, hydrogens are added to the atoms that have not filled up their valencies.
150
+
151
+ # 4.4 GOAL-DIRECTED MOLECULE GENERATION WITH REINFORCEMENT LEARNING
152
+
153
+ So far, we have introduced how to use GraphAF to model the data density of molecular graph structures and generate valid molecules. Nonetheless, for drug discovery, we also need to optimize the chemical properties of generated molecules. In this part, we introduce how to fine-tune our generation process with reinforcement learning to optimize the properties of generated molecules.
154
+
155
+ State and Policy Network. The state is the current sub-graph, and the initial state is an empty graph. The policy network is the same as the autoregressive model defined in Section 4.1, which includes the process of generating a new atom based on the current sub-graph and generating the edges between the new atom and existing atoms, i.e., $p \left( { { X } _ { i } } | { { G } _ { i } } \right)$ and $p \left( { A _ { i j } | G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } } \right)$ . The policy network itself defines a distribution $p _ { \theta }$ of molecular graphs $G$ . If there are no edges between the newly generated atom and current sub-graph, the generation process terminates. For the state transition dynamics, we also incorporate the valency check constraint.
156
+
157
+ Reward design. Similar to GCPN You et al. (2018a), we also incorporate both intermediate and final rewards for training the policy network. A small penalization will be introduced as the intermediate reward if the edge predictions violate the valency check. The final rewards include both the score of targeted-properties of generated molecules such as octanol-water partition coefficient (logP) or drug-likeness (QED) (Bickerton et al., 2012) and the chemical validity reward such as penalties for molecules with excessive steric strain and or functional groups that violate ZINC functional group filters (Irwin et al., 2012). The final reward is distributed to all intermediate steps with a discounting factor to stabilize the training.
158
+
159
+ In practice, we adopt Proximal Policy Optimization (PPO) (Schulman et al., 2017), an advanced policy gradient algorithm to train GraphAF in the above defined environment. Let $G _ { i j }$ be the shorthand notation of sub-graph $G _ { i } \cup X _ { i } \cup A _ { i , 1 : j - 1 }$ . Formally,
160
+
161
+ $$
162
+ \begin{array} { r l r } & { } & { L ( \theta ) = - E _ { G \sim p _ { \theta } } \Big \{ E _ { i } \Big [ \operatorname* { m i n } \big ( r _ { i } ( \theta ) V ( G _ { i } , X _ { i } ) , \mathrm { c l i p } ( r _ { i } ( \theta ) , 1 - \epsilon , 1 + \epsilon ) V ( G _ { i } , X _ { i } ) \big ) } \\ & { } & { + E _ { j } \big [ \operatorname* { m i n } \big ( r _ { i j } ( \theta ) V ( G _ { i j } , A _ { i j } ) , \mathrm { c l i p } ( r _ { i j } ( \theta ) , 1 - \epsilon , 1 + \epsilon ) V ( G _ { i j } , A _ { i j } ) \big ) \big ] \Big \} , } \end{array}
163
+ $$
164
+
165
+ where $\begin{array} { r } { r _ { i } ( { \boldsymbol { \theta } } ) ~ = ~ \frac { p _ { \boldsymbol { \theta } } ( { \boldsymbol { X } } _ { i } | G _ { i } ) } { p _ { \boldsymbol { \theta } _ { o l d } } ( { \boldsymbol { X } } _ { i } | G _ { i } ) } } \end{array}$ and $\begin{array} { r } { r _ { i j } ( { \theta } ) = \frac { p _ { \theta } \left( A _ { i j } | G _ { i j } \right) } { p _ { \theta _ { o l d } } \left( A _ { i j } | G _ { i j } \right) } } \end{array}$ are ratios of probabilities output by old and new policies, and $V ( s t a t e , a c t i o n )$ is the estimated advantage function with a moving average baseline to reduce the variance. More specifically, we treat generating a node and all its edges with existing nodes as one step and maintain a moving average baseline for each step. The clipped surrogate objective prevents the policy from being updated to collapse for some extreme rewards.
166
+
167
+ # 5 EXPERIMENTS
168
+
169
+ # 5.1 EXPERIMENT SETUP
170
+
171
+ Evaluation Tasks. Following existing works on molecule generation (Jin et al., 2018; You et al., 2018a; Popova et al., 2019), we conduct experiments by comparing with the state-of-the-art approaches on three standard tasks. Density Modeling and Generation evaluates the model’s capacity to learn the data distribution and generate realistic and diverse molecules. Property Optimization concentrates on generating novel molecules with optimized chemical properties. For this task, we fine-tune our network pretrained from the density modeling task to maximize the desired properties. Constrained Property Optimization is first proposed in Jin et al. (2018), which is aimed at modifying the given molecule to improve desired properties while satisfying a similarity constraint.
172
+
173
+ Data. We use the ZINC250k molecular dataset (Irwin et al., 2012) for training. The dataset contains 250, 000 drug-like molecules with a maximum atom number of 38. It has 9 atom types and 3 edge types. We use the open-source chemical software RDkit (Landrum, 2016) to preprocess molecules. All molecules are presented in kekulized form with hydrogen removed.
174
+
175
+ Baselines. We compare GraphAF with the following state-of-the-art approaches for molecule generation. JT-VAE (Jin et al., 2018) is a VAE-based model which generates molecules by first decoding a tree structure of scaffolds and then assembling them into molecules. JT-VAE has been shown to outperform other previous VAE-based models (Kusner et al., 2017; Gomez-Bombarelli et al., ´ 2018; Simonovsky & Komodakis, 2018). GCPN is a state-of-the-art approach which combines reinforcement learning and graph representation learning methods to explore the vast chemical space. MolecularRNN (MRNN), another autoregressive model, uses RNN to generate molecules in a sequential manner. We also compare our model with GraphNVP (Madhawa et al., 2019), a recently proposed flow-based model. Results of baselines are taken from original papers unless stated.
176
+
177
+ Implementation Details. GraphAF is implemented in PyTorch (Paszke et al., 2017). The R-GCN is implemented with 3 layers, and the embedding dimension is set as 128. The max graph size is set as 48 empirically. For density modeling, we train our model for 10 epochs with a batch size of 32 and a learning rate of 0.001. For property optimization, we perform a grid search on the hyperparameters and select the best setting according to the chemical scoring performance. We use Adam (Kingma & Ba, 2014) to optimize our model. Full training details can be found in Appendix C.
178
+
179
+ Table 2: Comparison of different models on density modeling and generation. Reconstruction is only evaluated on latent variable models. Validity w/o check is only evaluated on models with valency constraints. Result with $^ \dagger$ is obtained by running GCPN’s open-source code. Results with $^ \ddag$ are taken from Popova et al. (2019).
180
+
181
+ <table><tr><td>Method</td><td>Validity</td><td>Validity w/o check</td><td>Uniqueness</td><td>Novelty</td><td>Reconstruction</td></tr><tr><td>JT-VAE</td><td>100%</td><td></td><td>100%</td><td>100%</td><td>76.7%</td></tr><tr><td>GCPN</td><td>100%</td><td>20%t</td><td>99.97%</td><td>100%t</td><td></td></tr><tr><td>MRNN</td><td>100%</td><td>65%</td><td>99.89%</td><td>100%</td><td></td></tr><tr><td>GraphNVP</td><td>42.60%</td><td>一</td><td>94.80%</td><td>100%</td><td>100%</td></tr><tr><td>GraphAF</td><td>100%</td><td>68%</td><td>99.10%</td><td>100%</td><td>100%</td></tr></table>
182
+
183
+ Table 3: Results of density modeling and generation on three different datasets.
184
+
185
+ <table><tr><td>Method</td><td>Validity</td><td>Validity w/o check</td><td>Uniqueness</td><td>Novelty</td><td>Reconstruction</td></tr><tr><td>ZINC250k</td><td>100%</td><td>68%</td><td>99.10%</td><td>100%</td><td>100%</td></tr><tr><td>QM9</td><td>100%</td><td>67%</td><td>94.51%</td><td>88.83%</td><td>100%</td></tr><tr><td>MOSES</td><td>100%</td><td>71%</td><td>99.99%</td><td>100%</td><td>100%</td></tr></table>
186
+
187
+ # 5.2 NUMERICAL RESULTS
188
+
189
+ Density Modeling and Generation. We evaluate the ability of the proposed method to model real molecules by utilizing the widely-used metrics: Validity is the percentage of valid molecules among all the generated graphs. Uniqueness is the percentage of unique molecules among all the generated molecules. Novelty is the percentage of generated molecules not appearing in training set. Reconstruction is the percentage of the molecules that can be reconstructed from latent vectors. We calculate the above metrics from 10,000 randomly generated molecules.
190
+
191
+ Table 2 shows that GraphAF achieves competitive results on all four metrics. As a flow-based model, GraphAF holds perfect reconstruction ability compared with VAE approaches. Our model also achieves a $100 \%$ validity rate since we can leverage the valency check during sequential generation. By contrast, the validity rate of another flow-based approach GraphNVP is only $4 2 . 6 0 \%$ due to its one-shot sampling process. An interesting result is that even without the valency check during generation, GraphAF can still achieve a validity rate as high as $68 \%$ , while previous state-of-the-art approach GCPN only achieves $20 \%$ . This indicates the strong flexibility of GraphAF to model the data density and capture the domain knowledge from unsupervised training on the large chemical dataset. We also compare the efficiency of different methods on the same computation environment, a machine with 1 Tesla V100 GPU and 32 CPU cores. To achieve the results in Table 2, JT-VAE and GCPN take around 24 and 8 hours, respectively, while GraphAF only takes 4 hours.
192
+
193
+ To show that GraphAF is not overfitted to the specific dataset ZINC250k, we also conduct experiments on two other molecule datasets, QM9 (Ramakrishnan et al., 2014) and MOSES (Polykovskiy et al., 2018). QM9 contains $1 3 4 \mathrm { k }$ molecules with 9 heavy atoms, and MOSES is much larger and more challenging, which contains 1.9M molecules with up to 30 heavy atoms. Table 3 shows that GraphAF can always generate valid and novel molecules even on the more complicated dataset.
194
+
195
+ Furthermore, though GraphAF is originally designed for molecular graph generation, it is actually very general and can be used to model different types of graphs by simply modifying the node and edge generating functions Edge-MLPs and Node-MLPs (Eq. 8). Following the experimental setup of Graph Normalizing Flows (GNF) (Liu et al., 2019), we test GraphAF on two generic graph datasets: COMMUNITY-SMALL, which is a synthetic data set containing 100 2-community graphs, and EGO-SMALL, which is a set of graphs extracted from Citeseer dataset (Sen et al., 2008). In practice, we use one-hot indicator vectors as node features for R-GCN. We borrow open source scripts from GraphRNN (You et al., 2018b) to generate datasets and evaluate different models. For evaluation, we report the Maximum Mean Discrepancy (MMD) (Gretton et al., 2012) between generated and training graphs using some specific metrics on graphs proposed by You et al. (2018b). The results in Table 4 demonstrate that when applied to generic graphs, GraphAF can still consistently yield comparable or better results compared with GraphRNN and GNF. We give the visualization of generated generic graphs in Appendix D.
196
+
197
+ Table 4: Comparison between different graph generative models on general graphs with MMD metrics. We follow the evaluation scheme of GNF (Liu et al., 2019). Results of baselines are also taken from GNF.
198
+
199
+ <table><tr><td rowspan="2">Method</td><td colspan="3">COMMUNITY-SMALL</td><td colspan="3">EGO-SMALL</td></tr><tr><td>Degree</td><td>Cluster</td><td>Orbit</td><td>Degree</td><td>Cluster</td><td>Orbit</td></tr><tr><td>GraphVAE</td><td>0.35</td><td>0.98</td><td>0.54</td><td>0.13</td><td>0.17</td><td>0.05</td></tr><tr><td>DEEPGMG</td><td>0.22</td><td>0.95</td><td>0.4</td><td>0.04</td><td>0.10</td><td>0.02</td></tr><tr><td>GraphRNN</td><td>0.08</td><td>0.12</td><td>0.04</td><td>0.09</td><td>0.22</td><td>0.003</td></tr><tr><td>GNF</td><td>0.20</td><td>0.20</td><td>0.11</td><td>0.03</td><td>0.10</td><td>0.001</td></tr><tr><td>GraphAF</td><td>0.18</td><td>0.20</td><td>0.02</td><td>0.03</td><td>0.11</td><td>0.001</td></tr><tr><td>GraphRNN(1024)</td><td>0.03</td><td>0.01</td><td>0.01</td><td>0.04</td><td>0.05</td><td>0.06</td></tr><tr><td>GNF(1024)</td><td>0.12</td><td>0.15</td><td>0.02</td><td>0.01</td><td>0.03</td><td>0.0008</td></tr><tr><td>GraphAF(1024)</td><td>0.06</td><td>0.10</td><td>0.015</td><td>0.04</td><td>0.04</td><td>0.008</td></tr></table>
200
+
201
+ Table 5: Comparison of the top 3 property scores of generated molecules.
202
+
203
+ <table><tr><td rowspan="2">Method</td><td colspan="4">Penalized logP</td><td colspan="4">QED</td></tr><tr><td>1st</td><td>2nd</td><td>3rd</td><td>Validity</td><td>1st</td><td>2nd</td><td>3rd</td><td>Validity</td></tr><tr><td>ZINC (Dataset)</td><td>4.52</td><td>4.30</td><td>4.23</td><td>100.0%</td><td>0.948</td><td>0.948</td><td>0.948</td><td>100.0%</td></tr><tr><td>JT-VAE (Jin et al., 2018)</td><td>5.30</td><td>4.93</td><td>4.49</td><td>100.0%</td><td>0.925</td><td>0.911</td><td>0.910</td><td>100.0%</td></tr><tr><td>GCPN(You et al.,2018a)</td><td>7.98</td><td>7.85</td><td>7.80</td><td>100.0%</td><td>0.948</td><td>0.947</td><td>0.946</td><td>100.0%</td></tr><tr><td>MRNN1 (Popova et al., 2019)</td><td>8.63</td><td>6.08</td><td>4.73</td><td>100.0%</td><td>0.844</td><td>0.796</td><td>0.736</td><td>100.0%</td></tr><tr><td>GraphAF</td><td>12.23</td><td>11.29</td><td>11.05</td><td>100.0%</td><td>0.948</td><td>0.948</td><td>0.947</td><td>100.0%</td></tr></table>
204
+
205
+ ![](images/5481be86181308dc3b3cca052c27e75ce0aeecedbedd217c1c394089525e5cbb.jpg)
206
+ Figure 2: Molecules generated in property optimization and constrained property optimization tasks. (a) Molecules with high penalized logP scores. (b) Molecules with high QED scores. (c) Two pairs of molecules in constrained property optimization for penalized logP with similarity 0.71(top) and 0.64(bottom).
207
+
208
+ Property Optimization. In this task, we aim at generating molecules with desired properties. Specifically, we choose penalized logP and QED as our target property. The former score is logP score penalized by ring size and synthetic accessibility, while the latter one measures the druglikeness of the molecules. Note that both scores are calculated using empirical prediction models and we adopt the script used in (You et al., 2018a) to make results comparable. To perform this task, we pretrain the GraphAF network for 300 epochs for likelihood modeling, and then apply the RL process described in section 4.4 to fine-tune the network towards desired chemical properties. Detailed reward design and hyper-parameters setting can be found in Appendix C. Following existing works, we report the top-3 scores found by each model.
209
+
210
+ Table 6: Comparison of results on constrained property optimization.
211
+
212
+ <table><tr><td rowspan="2">8</td><td colspan="3">JT-VAE</td><td colspan="3">GCPN</td><td colspan="3">GraphAF</td></tr><tr><td>Improvement</td><td>Similarity</td><td>Success</td><td>Improvement</td><td>Similarity</td><td>Success</td><td>Improvement</td><td>Similarity</td><td>Success</td></tr><tr><td>0.0</td><td>1.91 ± 2.04</td><td>0.28±0.15</td><td>97.5%</td><td>4.20 ± 1.28</td><td>0.32 ±0.12</td><td>100%</td><td>13.13±6.89</td><td>0.29± 0.15</td><td>100%</td></tr><tr><td>0.2</td><td>1.68 ± 1.85</td><td>0.33 ±0.13</td><td>97.1%</td><td>4.12 ± 1.19</td><td>0.34± 0.11</td><td>100%</td><td>11.90 ±6.86</td><td>0.33 ±0.12</td><td>100%</td></tr><tr><td>0.4</td><td>0.84 ± 1.45</td><td>0.51 ± 0.10</td><td>83.6%</td><td>2.49 ± 1.30</td><td>0.47± 0.08</td><td>100%</td><td>8.21 ±6.51</td><td>0.49 ± 0.09</td><td>99.88%</td></tr><tr><td>0.6</td><td>0.21 ± 0.71</td><td>0.69 ±0.06</td><td>46.4%</td><td>0.79 ± 0.63</td><td>0.68±0.08</td><td>100%</td><td>4.98± 6.49</td><td>0.66 ± 0.05</td><td>96.88%</td></tr></table>
213
+
214
+ As shown in Table 5, GraphAF outperforms all baselines by a large margin for penalized logP score and achieves comparable results for QED. This phenomenon indicates that combined with RL process, GraphAF successfully captures the distribution of desired molecules. Note that we re-evaluate the properties of the top-3 molecules found by MolecularRNN, which turn out to be lower than the results reported in the original paper. Figure 2(a) and 2(b) show the molecules with the highest score discovered by our model. More realistic molecules generated by GraphAF with penalized logP score ranging from 5 to 10 are presented in Figure 6 in Appendix E.
215
+
216
+ One should note that, as defined in Sec 4.4, our RL process is close to the one used in previous work GCPN (You et al., 2018a). Therefore, the good property optimization performance is believed to come from the flexibility of flow. Compared with the GAN model used in GCPN, which is known to suffer from the mode collapse problem, flow is flexible at modeling complex distribution and generating diverse data (as shown in Table 2 and Table 3). This allows GraphAF to explore a variety of molecule structures in the RL process for molecule properties optimization.
217
+
218
+ Constrained Property Optimization. The goal of the last task is to modify the given molecule to improve specified property with the constraint that the similarity between the original and modified molecule is above a threshold $\delta$ . Following Jin et al. (2018) and You et al. (2018a), we choose to optimize penalized logP for 800 molecules in ZINC250k with the lowest scores and adopt Tanimoto similarity with Morgan fingerprint (Rogers & Hahn, 2010) as the similarity metric.
219
+
220
+ Similar to the property optimization task, we pretrain GraphAF via density modeling and then finetune the model with RL. During generation, we set the initial states as sub-graphs randomly sampled from 800 molecules to be optimized. For evaluation, we report the mean and standard deviation of the highest improvement and the corresponding similarity between the original and modified molecules in Table 6. Experiment results show that GraphAF significantly outperforms all previous approaches and almost always succeeds in improving the target property. Figure 2(c) visualizes two optimization examples, showing that our model is able to improve the penalized logP score by a large margin while maintaining a high similarity between the original and modified molecule.
221
+
222
+ # 6 CONCLUSION
223
+
224
+ We proposed GraphAF, the first flow-based autoregressive model for generating realistic and diverse molecular graphs. GraphAF is capable to model the complex molecular distribution thanks to the flexibility of normalizing flow, as well as generate novel and $100 \%$ valid molecules in empirical experiments. Moreover, the training of GraphAF is very efficient. To optimize the properties of generated molecules, we fine-tuned the generative process with reinforcement learning. Experimental results show that GraphAF outperforms all previous state-of-the-art baselines on the standard tasks. In the future, we plan to train our GraphAF model on larger datasets and also extend it to generate other types of graph structures (e.g., social networks).
225
+
226
+ # ACKNOWLEDGEMENT
227
+
228
+ We would like to thank Min Lin, Meng Qu, Andreea Deac, Laurent Dinh, Louis-Pascal A. C. Xhonneux and Vikas Verma for the extremely helpful discussions and comments. This project is supported by the Natural Sciences and Engineering Research Council of Canada, the Canada CIFAR AI Chair Program, and a collaboration grant between Microsoft Research and Mila. Ming Zhang is supported by National Key Research and Development Program of China with Grant No. 2018AAA0101900/2018AAA0101902 as well as Beijing Municipal Commission of Science and Technology under Grant No. Z181100008918005. Weinan Zhang is supported by National Natural Science Foundation of China (61702327, 61772333, 61632017, 81771937) and Shanghai Sailing Program (17YF1428200).
229
+
230
+ # REFERENCES
231
+
232
+ G Richard Bickerton, Gaia V Paolini, Jer´ emy Besnard, Sorel Muresan, and Andrew L Hopkins.´ Quantifying the chemical beauty of drugs. Nature chemistry, 4(2):90, 2012.
233
+
234
+ Nicola De Cao and Thomas Kipf. Molgan: An implicit generative model for small molecular graphs. arXiv preprint arXiv:1805.11973, 2018.
235
+
236
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
237
+
238
+ David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alan´ Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, pp. 2224–2232, 2015.
239
+
240
+ Mathieu Germain, Karol Gregor, Iain Murray, and Hugo Larochelle. Made: Masked autoencoder for distribution estimation. In International Conference on Machine Learning, pp. 881–889, 2015.
241
+
242
+ Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1263–1272. JMLR. org, 2017.
243
+
244
+ Rafael Gomez-Bombarelli, Jennifer N Wei, David Duvenaud, Jos ´ e Miguel Hern ´ andez-Lobato, ´ Benjam´ın Sanchez-Lengeling, Dennis Sheberla, Jorge Aguilera-Iparraguirre, Timothy D Hirzel, ´ Ryan P Adams, and Alan Aspuru-Guzik. Automatic chemical design using a data-driven contin- ´ uous representation of molecules. ACS central science, 4(2):268–276, 2018.
245
+
246
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
247
+
248
+ Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Scholkopf, and Alexander Smola. ¨ A kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773, 2012.
249
+
250
+ Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024–1034, 2017.
251
+
252
+ Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flow-based generative models with variational dequantization and architecture design. In Proceedings of the 36th International Conference on Machine Learning. PMLR, 2019. URL http://proceedings.mlr.press/v97/ho19a.html.
253
+
254
+ John J Irwin, Teague Sterling, Michael M Mysinger, Erin S Bolstad, and Ryan G Coleman. Zinc: a free tool to discover chemistry for biology. Journal of chemical information and modeling, 52 (7):1757–1768, 2012.
255
+
256
+ Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. arXiv preprint arXiv:1802.04364, 2018.
257
+
258
+ Steven Kearnes, Kevin McCloskey, Marc Berndl, Vijay Pande, and Patrick Riley. Molecular graph convolutions: moving beyond fingerprints. Journal of computer-aided molecular design, 30(8): 595–608, 2016.
259
+
260
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3nd International Conference on Learning Representations, 2014.
261
+
262
+ Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, 2013.
263
+
264
+ Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pp. 10215–10224, 2018.
265
+
266
+ Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in neural information processing systems, pp. 4743–4751, 2016.
267
+
268
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
269
+
270
+ Ivan Kobyzev, Simon Prince, and Marcus A. Brubaker. Normalizing flows: Introduction and ideas. arXiv preprint arXiv:1908.09257, 2019.
271
+
272
+ Matt J Kusner, Brooks Paige, and Jose Miguel Hern ´ andez-Lobato. Grammar variational autoen- ´ coder. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1945–1954. JMLR. org, 2017.
273
+
274
+ Greg Landrum. Rdkit: Open-source cheminformatics software. 2016.
275
+
276
+ Jenny Liu, Aviral Kumar, Jimmy Ba, Jamie Kiros, and Kevin Swersky. Graph normalizing flows. arXiv preprint arXiv:1905.13177, 2019.
277
+
278
+ Christos Louizos and Max Welling. Multiplicative normalizing flows for variational bayesian neural networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2218–2227. JMLR. org, 2017.
279
+
280
+ Tengfei Ma, Jie Chen, and Cao Xiao. Constrained generation of semantically valid graphs via regularizing variational autoencoders. In Advances in Neural Information Processing Systems, pp. 7113–7124, 2018.
281
+
282
+ Kaushalya Madhawa, Katushiko Ishiguro, Kosuke Nakago, and Motoki Abe. Graphnvp: An invertible flow model for generating molecular graphs. arXiv preprint arXiv:1905.11600, 2019.
283
+
284
+ Daniel Neil, Marwin H. S. Segler, Laura Guasch, Mohamed Ahmed, Dean Plumbley, Matthew Sellwood, and Nathan Brown. Exploring deep recurrent models with reinforcement learning for molecule design. In 6th International Conference on Learning Representations, Workshop Track Proceedings, 2018.
285
+
286
+ Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de-novo design through deep reinforcement learning. Journal of cheminformatics, 9(1):48, 2017.
287
+
288
+ George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017.
289
+
290
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
291
+
292
+ P. G. Polishchuk, T. I. Madzhidov, and A. Varnek. Estimation of the size of drug-like chemical space based on gdb-17 data. Journal of Computer-Aided Molecular Design, 27(8):675–679, Aug 2013.
293
+
294
+ Daniil Polykovskiy, Alexander Zhebrak, Benjamin Sanchez-Lengeling, Sergey Golovanov, Oktai Tatanov, Stanislav Belyaev, Rauf Kurbanov, Aleksey Artamonov, Vladimir Aladinskiy, Mark Veselov, Artur Kadurin, Sergey Nikolenko, Alan Aspuru-Guzik, and Alex Zhavoronkov. Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models. arXiv preprint arXiv:1811.12823, 2018.
295
+
296
+ Mariya Popova, Mykhailo Shvets, Junier Oliva, and Olexandr Isayev. Molecularrnn: Generating realistic molecular graphs with optimized properties. arXiv preprint arXiv:1905.13372, 2019.
297
+
298
+ Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1, 2014.
299
+
300
+ Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
301
+
302
+ David Rogers and Mathew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50:742–754, 2010.
303
+
304
+ Bidisha Samanta, Abir De, Niloy Ganguly, and Manuel Gomez-Rodriguez. Designing random graph models using variational autoencoders with applications to chemical design. arXiv preprint arXiv:1802.05283, 2018.
305
+
306
+ Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pp. 593–607. Springer, 2018.
307
+
308
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
309
+
310
+ Kristof T Schutt, Farhad Arbabzadah, Stefan Chmiela, Klaus R M ¨ uller, and Alexandre Tkatchenko. ¨ Quantum-chemical insights from deep tensor neural networks. Nature communications, 8:13890, 2017.
311
+
312
+ Marwin HS Segler, Thierry Kogej, Christian Tyrchan, and Mark P Waller. Generating focused molecule libraries for drug discovery with recurrent neural networks. ACS central science, 4(1): 120–131, 2017.
313
+
314
+ Prithviraj Sen, Galileo Mark Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina Eliassi-Rad. Collective classification in network data. AI Magazine, 29(3):93–106, 2008. URL http://www.cs.iit.edu/˜ml/pdfs/sen-aimag08.pdf.
315
+
316
+ Martin Simonovsky and Nikos Komodakis. Graphvae: Towards generation of small graphs using variational autoencoders. In International Conference on Artificial Neural Networks, pp. 412– 422. Springer, 2018.
317
+
318
+ L. Theis, A. van den Oord, and M. Bethge. A note on the evaluation of generative models. In International Conference on Learning Representations, 2016. URL http://arxiv.org/ abs/1511.01844. arXiv:1511.01844.
319
+
320
+ Aaron Van Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In International Conference on Machine Learning, pp. 1747–1756, 2016.
321
+
322
+ Jiaxuan You, Bowen Liu, Zhitao Ying, Vijay Pande, and Jure Leskovec. Graph convolutional policy network for goal-directed molecular graph generation. In Advances in Neural Information Processing Systems, pp. 6410–6421, 2018a.
323
+
324
+ Jiaxuan You, Rex Ying, Xiang Ren, William L Hamilton, and Jure Leskovec. Graphrnn: Generating realistic graphs with deep auto-regressive models. arXiv preprint arXiv:1802.08773, 2018b.
325
+
326
+ # Appendix
327
+
328
+ # A DISCCUSIONS ON DEQUANTIZATION TECHNIQUES
329
+
330
+ The dequantization techniques allow mapping the discrete data into the continuous one by adding a small noise to each dimension. By adding noise from $U [ 0 , 1 )$ , we can ensure that the range of different categories will not overlap. For example, after dequantization, the value of 1-entry in the one-hot vector lies in $[ 1 , 2 )$ while the 0-entry lies in $[ 0 , 1 )$ . Therefore, we can map the dequantized continuous data back to the discrete one-hot data by easily performing the argmax operation in the generation process. Theoretically, as shown in Theis et al. (2016); Ho et al. (2019), training a continuous density model on uniform dequantized data can be interpreted as maximizing a lower bound on the log-likelihood for the original discrete data. Mathematically, this statement holds for both image data and binary/categorical data.
331
+
332
+ Furthermore, as suggested in Ho et al. (2019), instead of adding random uniform noise to each discrete data for dequantization, a more advanced dequantization technique is to treat the noise as a hidden variable and use variational inference to infer the optimum noise added to each discrete data, which we would like to explore in our future work.
333
+
334
+ # B PARALLEL TRAINING ALGORITHM
335
+
336
+ # Algorithm 1 Parallel Training Algorithm of GraphAF
337
+
338
+ Input: $\eta$ learning rate, $M$ batch size, $P$ maximum dependency distance in BFS, Adam hyperparameters $\beta _ { 1 } , \beta _ { 2 }$ , use $\mathrm { P r o d } ( \cdot )$ as the product of elements across dimensions of a tensor
339
+
340
+ Initial: Parameters $\theta$ of GraphAF (R-GCN, Node-MLP and Edge-MLP)
341
+
342
+ 1: while $\theta$ is not converged do
343
+ 2: for $m = 1 , . . . , M$ do
344
+ 3: Sample a molecule mol from dataset and get the graph size $N$
345
+ 4: Convert mol to $G = ( A , X )$ with BFS re-ordering
346
+ 5: for $i = 1 , . . . , N$ do
347
+ 6: $\begin{array} { r l } & \begin{array} { r l } & { \dot { \mathrm { { ~ \cal ~ z ~ } } } _ { i } ^ { \mathrm { ~ ~ \tiny { ~ \scriptstyle ~ { \chi ~ } ~ } } } , \quad \cdots , \ \Psi , u \sim U [ 0 , 1 ] ^ { d } } \\ & { \dot { z } _ { i } ^ { \mathrm { ~ \tiny { ~ \chi ~ } ~ } } = X _ { i } + u , \ \omega , \ \omega ^ { X } = g _ { \alpha } x \left( G _ { i } \right) } \\ & { \dot { \mu } _ { i } ^ { \mathrm { ~ \tiny { ~ \chi ~ } ~ } } = g _ { \mu } \kappa \left( G _ { i } \right) , \ \alpha _ { i } ^ { X } = g _ { \alpha } \kappa \left( G _ { i } \right) } \\ & { \dot { \epsilon } _ { i } ^ { \mathrm { ~ \tiny { ~ \chi ~ } ~ } } = \left( z _ { i } ^ { X } - \mu _ { i } ^ { X } \right) \odot \frac { 1 } { \alpha _ { i } ^ { X } } } \\ & { \dot { \cal { \cal { L } } } _ { \mathrm { { ~ \tiny { ~ \chi ~ } ~ } } } ^ { X } = - \log ( \mathrm { P r o d } ( p \varepsilon ( \epsilon _ { i } ) ) ) - \log ( \mathrm { P r o d } ( \frac { 1 } { \alpha _ { i } ^ { X } } ) ) } \\ & \quad \mathrm { ~ f o r ~ } j = \operatorname* { m a x } \{ 1 , i - p \} _ { \mathrm { ~ \tiny { ~ \chi ~ } , ~ \ldots , ~ i ~ - 1 ~ } \} + \mathbf { d o } } \\ & { \quad \mathrm { ~ \quad } z _ { i , j } ^ { \dot { \alpha } } = A _ { i j } + u , \ u \sim U [ 0 , 1 ) ^ { b + 1 } } \\ & { \quad \mu _ { i j } ^ { \dot { \alpha } } = g _ { \mu } \big ( G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } \big ) , \ \alpha _ { i j } ^ { A } = g _ { \alpha } \mathcal { A } \left( G _ { i } , X _ { i } , A _ { i , 1 : j - 1 } \right) } \\ & { \quad \epsilon _ { i j } ^ { \dot { \alpha } } = \left( z _ { i } ^ { \dot { \alpha } } - \mu _ { i j } ^ { \dot { \alpha } } \right) \odot \frac { 1 } { \alpha _ { i } ^ { X } } } \\ & \quad \mathcal { L } _ { i j } ^ { A } = - \log ( \mathrm { P r o d } ( p \varepsilon ( i , j ) ) ) - \log ( \mathrm { P r o d } ( \frac { 1 } \end{array} \end{array}$
348
+ 7:
349
+ 8:
350
+ 9:
351
+ 10:
352
+ 11:
353
+ 12:
354
+ 13:
355
+ 14:
356
+ 15: end for
357
+ 16: 17: $\begin{array} { r } { \mathcal { L } _ { m } ^ { G } = \sum _ { i = 1 } ^ { n } \left( \mathcal { L } _ { i } ^ { X } + \sum _ { j = 1 } ^ { P } \mathcal { L } _ { i j } ^ { A } \right) } \end{array}$
358
+ 18: end for
359
+ 19: $\begin{array} { r } { \theta \gets \mathrm { A D A M } ( \frac { 1 } { M } \sum _ { m = 1 } ^ { m } \mathcal { L } _ { m } ^ { G } , \theta , \eta , \beta _ { 1 } , \beta _ { 2 } ) } \end{array}$
360
+ 20: end while
361
+
362
+ # C EXPERIMENT DETAILS
363
+
364
+ Network architecture. The network architecture is fixed among all three tasks. More specifically, the R-GCN is implemented with 3 layers and the embedding dimension is set as 128. We use batch normalization before graph pooling to accelerate the convergence and choose sum-pooling as the readout function for graph representations. Both node MLPs and edge MLPs have two fullyconnected layers equipped with tanh non-linearity.
365
+
366
+ Density Modeling and Generation. To achieve the results in Table 2, we train GraphAF on ZINC250K with a batch size of 32 on 1 Tesla V100 GPU and 32 CPU cores for 10 epochs. We optimize our model with Adam with a fixed learning rate of 0.001.
367
+
368
+ Property Optimization. For both property optimization and constrained property optimization, we first pretrain a GraphAF network via the density modeling task for 300 epochs, and then finetune the network toward desired molecular distribution through RL process. Following are details about the reward design for property optimization. The reward of each step consists of step-wise validity rewards and the final rewards discounted by a fixed factor $\gamma$ . The step-wise validity penalty is fixed as -1. The final reward of a molecule $m$ includes both property-targeted reward and chemical validation reward. We adopt the same chemical validation rewards as GCPN. We define propertytargeted reward as follows:
369
+
370
+ $$
371
+ \begin{array} { l } { r ( m ) = t _ { 1 } \cdot Q E D ( m ) } \\ { r ( m ) = \exp \left( \frac { l o g P _ { p e n } ( m o l ) } { t _ { 2 } } \right) } \end{array}
372
+ $$
373
+
374
+ $\gamma$ is set to 0.97 for QED optimization and 0.9 for penalized logP optimization respectively. We fine-tune the pretrained model for 200 iterations with a fixed batch size of 64 using Adam optimizer. We also adopt a linear learning rate warm-up to stabilize the training. We perform the grid search to determine the optimal hyperparameters according to the chemical scoring performance. The search space is summarised in Table 7.
375
+
376
+ Table 7: Tuned-parameters for policy gradient and their search space.
377
+
378
+ <table><tr><td>PARAM</td><td>Description</td><td>Search space</td></tr><tr><td>lr</td><td>Learning rate</td><td>{0.001,0.0005,0.0001}</td></tr><tr><td>t1</td><td>Coefficient for QED score</td><td>{2,3,4,5}</td></tr><tr><td>t2</td><td>Temperature for exponential function</td><td>{3,4,5}</td></tr><tr><td>wm</td><td>Number of warm up iterations</td><td>{12,24,36}</td></tr></table>
379
+
380
+ Constrained Property Optimization. We first introduce the way we sample sub-graphs from 800 ZINC molecules. Given a molecule, we first randomly sample a BFS order and then drop the last $m$ nodes in BFS order as well as edges induced by these nodes, where $m$ is randomly chosen from $\{ 0 , 1 , 2 , 3 , 4 , 5 \}$ each time. Finally, we reconstruct the sub-graph from the remaining nodes in the BFS sequence. Note that the final sub-graph is connected due to the nature of BFS order. For reward design, we set it as the improvement of the target score. We fine-tune the pretrained model for 200 iterations with a batch size of 64. We also use Adam with a learning rate of 0.0001 to optimize the model. Finally, each molecule is optimized for 200 times by the tuned model.
381
+
382
+ # D VISUALIZATION OF GENERATED GENERIC GRAPHS
383
+
384
+ We present visualizations of graphs from both the training set and generated graphs by GraphAF in Figure 3 and Figure 4. The visualizations demonstrate that GraphAF has strong ability to model different graph structures in the generic graph datasets.
385
+
386
+ # E MORE MOLECULE SAMPLES
387
+
388
+ We present more molecule samples generated by GraphAF in the following pages. Figure 5 presents 50 molecules randomly sampled from multivariate Gaussian, which justify the ability of our model to generate novel, realistic and unique molecules. From Figure 6 we can see that our model is able to generate molecules with high and diverse penalized logP scores ranging from 5 to 10. For constrained property optimization of penalized logP score, as shown by Figure 7, our model can either reduce the ring size, remove the big ring or grow carbon chains from the original molecule, improving the penalized logP score by a large margin.
389
+
390
+ ![](images/8f212ba38799b3c24e97039f8b9c3007b94c5a095a305ef5c511680e69ae21f6.jpg)
391
+ Figure 3: Visualizations of training graphs and generated graphs of EGO-SMALL.
392
+
393
+ ![](images/b38036cc13be47a9a76770402b2bcaf6f3dec48377506e889e9d7e030347c1a1.jpg)
394
+ Figure 4: Visualizations of training graphs and generated graphs of COMMUNITY-SMALL.
395
+
396
+ ![](images/51df71bc163b291b6dfec8b5f79066ecdb3eb28549ad26aec8fc615669c4caa8.jpg)
397
+ Figure 5: 50 molecules sampled from prior.
398
+
399
+ ![](images/b5e766796aa66c752505b9a5a4c4eab15b55ef2a9828f902f9985c40f1e53ae8.jpg)
400
+ Figure 6: Molecule samples with high penalized logp score generated by GraphAF.
401
+
402
+ ![](images/3008e41f6b149a131ee50f3dbc6db40d6bafc6d3cf95f12bfd9cb480a66a2f33.jpg)
403
+ Figure 7: More results on constrained property optimization for penalized logP score. Numbers beside the arrow denote similarity and improvement of the given molecule pair respectively.
parse/train/S1esMkHYPr/S1esMkHYPr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1esMkHYPr/S1esMkHYPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1esMkHYPr/S1esMkHYPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1xcx3C5FX/S1xcx3C5FX.md ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A STATISTICAL APPROACH TO ASSESSING NEURAL NETWORK ROBUSTNESS
2
+
3
+ Stefan Webb∗
4
+ Department of Engineering Science
5
+ University of Oxford
6
+
7
+ Tom Rainforth, Yee Whye Teh Department of Statistics University of Oxford
8
+
9
+ M. Pawan Kumar
10
+ Department of Engineering Science
11
+ University of Oxford,
12
+ Alan Turing Institute
13
+
14
+ # ABSTRACT
15
+
16
+ We present a new approach to assessing the robustness of neural networks based on estimating the proportion of inputs for which a property is violated. Specifically, we estimate the probability of the event that the property is violated under an input model. Our approach critically varies from the formal verification framework in that when the property can be violated, it provides an informative notion of how robust the network is, rather than just the conventional assertion that the network is not verifiable. Furthermore, it provides an ability to scale to larger networks than formal verification approaches. Though the framework still provides a formal guarantee of satisfiability whenever it successfully finds one or more violations, these advantages do come at the cost of only providing a statistical estimate of unsatisfiability whenever no violation is found. Key to the practical success of our approach is an adaptation of multi-level splitting, a Monte Carlo approach for estimating the probability of rare events, to our statistical robustness framework. We demonstrate that our approach is able to emulate formal verification procedures on benchmark problems, while scaling to larger networks and providing reliable additional information in the form of accurate estimates of the violation probability.
17
+
18
+ # 1 INTRODUCTION
19
+
20
+ The robustness of deep neural networks must be guaranteed in mission-critical applications where their failure could have severe real-world implications. This motivates the study of neural network verification, in which one wishes to assert whether certain inputs in a given subdomain of the network might lead to important properties being violated (Zakrzewski, 2001; Bunel et al., 2018). For example, in a classification task, one might want to ensure that small perturbations of the inputs do not lead to incorrect class labels being predicted (Szegedy et al., 2013; Goodfellow et al., 2015).
21
+
22
+ The classic approach to such verification has focused on answering the binary question of whether there exist any counterexamples that violate the property of interest. We argue that this approach has two major drawbacks. Firstly, it provides no notion of how robust a network is whenever a counterexample can be found. Secondly, it creates a computational problem whenever no counterexamples exist, as formally verifying this can be very costly and does not currently scale to the size of networks used in many applications.
23
+
24
+ To give a demonstrative example, consider a neural network for classifying objects in the path of an autonomous vehicle. It will almost certainly be infeasible to train such a network that is perfectly robust to misclassification. Furthermore, because the network will most likely need to be of significant size to be effective, it is unlikely to be tractable to formally verify the network is perfectly robust, even if such a network exists. Despite this, it is still critically important to assess the robustness of the network, so that manufacturers can decide whether it is safe to deploy.
25
+
26
+ To address the shortfalls of the classic approach, we develop a new measure of intrinsic robustness of neural networks based on the probability that a property is violated under an input distribution model. Our measure is based on two key insights. The first is that for many, if not most, applications, full formal verification is neither necessary nor realistically achievable, such that one actually desires a notion of how robust a network is to a set of inputs, not just a binary answer as to whether it is robust or not. The second is that most practical applications have some acceptable level of risk, such that it is sufficient to show that the probability of a violation is below a certain threshold, rather than confirm that this probability is exactly zero.
27
+
28
+ By providing a probability of violation, our approach is able to address the needs of applications such as our autonomous vehicle example. If the network is not perfectly robust, it provides an explicit measure of exactly how robust the network is. If the network is perfectly robust, it is still able to tractability assert that a violation event is “probably-unsatisfiable”. That is it is able to statistically conclude that the violation probability is below some tolerance threshold to true zero, even for large networks for which formal verification would not be possible.
29
+
30
+ Calculating the probability of violation is still itself a computationally challenging task, corresponding to estimating the value of an intractable integral. In particular, in most cases, violations of the target property constitute (potentially extremely) rare events. Consequently, the simple approach of constructing a direct Monte Carlo estimate by sampling from the input model and evaluating the property will be expensive and only viable when the event is relatively common. To address this, we adapt an algorithm from the Monte Carlo literature, adaptive multi-level splitting (AMLS) (Guyader et al., 2011; Nowozin, 2015), to our network verification setting. AMLS is explicitly designed for prediction of rare events and our adaptation means that we are able to reliably estimate the probability of violation, even when the true value is extremely small.
31
+
32
+ Our resulting framework is easy to implement, scales linearly in the cost of the forward operation of the neural network, and is agnostic both to the network architecture and input model. Assumptions such as piecewise linearity, Lipschitz continuity, or a specific network form are not required. Furthermore, it produces a diversity of samples which violate the property as a side-product. To summarize, our main contributions are:
33
+
34
+ • Reframing neural network verification as the estimation of the probability of a violation, thereby providing a more informative robustness metric for non-verifiable networks; • Adaptation of the AMLS method to our verification framework to allow the tractable estimation of our metric for large networks and rare events; • Validation of our approach on several models and datasets from the literature.
35
+
36
+ # 2 RELATED WORK
37
+
38
+ The literature on neural network robustness follows two main threads. In the optimization community, researchers seek to formally prove that a property holds for a neural network by framing it as a satisfiability problem (Zakrzewski, 2001), which we refer to as the classical approach to verification. Such methods have only been successfully scaled beyond one hidden layer networks for piecewise linear networks (Cheng et al., 2017; Katz et al., 2017), and even then these solutions do not scale to, for example, common image classification architectures with input dimensions in the hundreds, or apply to networks with nonlinear activation functions (Bunel et al., 2018). Other work has sought approximate solutions in the same general framework but still does not scale to larger networks (Pulina & Tacchella, 2010; Xiang et al., 2018; Huang et al., 2017c). As the problem is NP-hard (Katz et al., 2017), it is unlikely that an algorithm exists with runtime scaling polynomially in the number of network nodes.
39
+
40
+ In the deep learning community, research has focused on constructing and defending against adversarial attacks, and by estimating the robustness of networks to such attacks. Weng et al. (2018b) recently constructed a measure for robustness to adversarial attacks estimating a lower bound on the minimum adversarial distortion, that is the smallest perturbation required to create an adversarial example. Though the approach scales to large networks, the estimate of the lower bound is often demonstratively incorrect: it is often higher than an upper bound on the minimum adversarial distortion (Goodfellow, 2018). Other drawbacks of the method are that it cannot be applied to networks that are not Lipschitz continuous, it requires an expensive gradient computation for each class per sample, does not produce adversarial examples, and cannot be applied to non-adversarial properties. The minimum adversarial distortion is also itself a somewhat unsatisfying metric for many applications, as it conveys little information about the prevalence of adversarial examples.
41
+
42
+ In other work spanning both communities (Gehr et al., 2018; Weng et al., 2018a; Wong & Kolter, 2018), researchers have relaxed the satisfiability problem of classical verification, and are able to produce certificates-of-robustness for some samples (but not all that are robust) by giving a lowerbound on the minimal adversarial distortion. Despite these methods scaling beyond formal verification, we note that this is still a binary measure of robustness with limited informativeness.
43
+
44
+ An orthogonal track of research investigates the robustness of reinforcement learning agents to failure (Huang et al., 2017b; Lin et al., 2017). For instance, concurrent work to ours (Uesato et al., 2019) takes a continuation approach to efficiently estimating the probability that an agent fails when this may be a rare event.
45
+
46
+ # 3 MOTIVATING EXAMPLES
47
+
48
+ To help elucidate our problem setting, we consider the ACASXU dataset (Katz et al., 2017) from the formal verification literature. A neural network is trained to predict one of five correct steering decisions, such as “hard left,” “soft left,” etc., for an unmanned aircraft to avoid collision with a second aircraft. The inputs $\mathbf { x }$ describe the positions, orientations, velocities, etc. of the two aircraft. Ten interpretable properties are specified along with corresponding constraints on the inputs, for which violations correspond to events causing collisions. Each of these properties is encoded in a function, $s$ , such that it is violated when $s ( \mathbf { x } ) \geq 0$ . The formal verification problem asks the question, “Does there exist an input $\mathbf { x } \in \mathcal { E } \subseteq \mathcal { X }$ in a constrained subset, $\mathcal { E }$ , of the domain such that the property is violated?” If there exists a counterexample violating the property, we say that the property is satisfiable (SAT), and otherwise, unsatisfiable (UNSAT).
49
+
50
+ Another example is provided by adversarial properties from the deep learning literature on datasets such as MNIST. Consider a neural network $\bar { f } _ { \theta } ( \bar { \bf x } ) = \mathrm { S o f t m a x } ( { \bf z } ( { \bf x } ) \bar { ) }$ that classifies images, $\mathbf { x }$ , into $C$ classes, where the output of $f$ gives the probability of each class. Let $\delta$ be a small perturbation in an $l _ { p }$ -ball of radius $\epsilon$ , that is, $\| \delta \| _ { p } < \epsilon$ . Then $\mathbf { x } = \mathbf { x } ^ { \prime } + \boldsymbol { \delta }$ is an adversarial example for $\mathbf { x } ^ { \prime }$ if arg $\mathrm { m a x } _ { i } \mathbf { z } ( \mathbf { x } ) _ { i } \neq \mathrm { a r g m a x } _ { i } \mathbf { z } ( \mathbf { x } ^ { \prime } ) _ { i }$ , i.e. the perturbation changes the prediction. Here, the property function is $s ( \mathbf { x } ) = \mathrm { m a x } _ { i \neq c } \left( \mathbf { z } ( \mathbf { x } ) _ { i } - \mathbf { z } ( \mathbf { x } ) _ { c } \right)$ , where $c = \arg \operatorname* { m a x } _ { j } \mathbf { z } ( \mathbf { x } ^ { \prime } ) _ { j }$ and $s ( \mathbf { x } ) \geq 0$ indicates that $\mathbf { x }$ is an adversarial example. Our approach subsumes adversarial properties as a specific case.
51
+
52
+ # 4 ROBUSTNESS METRIC
53
+
54
+ The framework for our robustness metric is very general, requiring only a) a neural network $f _ { \theta }$ , b) a property function $s ( \mathbf { x } ; f , \phi )$ , and c) an input model $p ( \mathbf { x } )$ . Together these define an integration problem, with the main practical challenge being the estimation of this integral. Consequently, the method can be used for any neural network. The only requirement is that we can evaluate the property function, which typically involves a forward pass of the neural network.
55
+
56
+ The property function, $s ( \mathbf { x } ; f _ { \theta } , \phi )$ , is a deterministic function of the input $\mathbf { x }$ , the trained network $f _ { \theta }$ , and problem specific parameters $\phi$ . For instance, in the MNIST example, $\phi = \arg \operatorname* { m a x } _ { i } f _ { \theta } ( \mathbf { x } ^ { \prime } ) _ { i }$ is the true output of the unperturbed input. Informally, the property reflects how badly the network is performing with respect to a particular property. More precisely, the event
57
+
58
+ $$
59
+ E \triangleq \{ s ( \mathbf { x } ; f _ { \theta } , \phi ) \geq 0 \}
60
+ $$
61
+
62
+ represents the property being violated. Predicting the occurrence of these, typically rare, events will be the focus of our work. We will omit the dependency on $f _ { \theta }$ and $\phi$ from here on for notional conciseness, noting that these are assumed to be fixed and known for verification problems.
63
+
64
+ The input model, $p ( \mathbf { x } )$ , is a distribution over the subset of the input domain that we are considering for counterexamples. For instance, for the MNIST example we could use $p ( \mathbf { x } ; \mathbf { x } ^ { \prime } ) ~ \propto ~$ $\mathbb { 1 } \left( \lVert \mathbf { x } - \mathbf { x } ^ { \prime } \rVert _ { p } \leq \epsilon \right)$ to consider uniform perturbations to the input around an $l _ { p }$ -norm ball with radius $\epsilon$ . More generally, the input model can be used to place restrictions on the input domain and potentially also to reflect that certain violations might be more damaging than others.
65
+
66
+ Together, the property function and input model specify the probability of failure through the integral
67
+
68
+ $$
69
+ \mathcal { T } \left[ p , s \right] \triangleq P _ { X \sim p ( \cdot ) } \left( s ( X ) \geq 0 \right) = \int _ { \mathcal { X } } \mathbb { 1 } _ { \left\{ s ( \mathbf { x } ) \geq 0 \right\} } p ( \mathbf { x } ) d \mathbf { x } .
70
+ $$
71
+
72
+ This integral forms our measure of robustness. The integral being equal to exactly zero corresponds to the classical notion of a formally verifiable network. Critically though, it also provides a measure for how robust a non-formally-verifiable network is.
73
+
74
+ # 5 METRIC ESTIMATION
75
+
76
+ Our primary goal is to estimate (2) in order to obtain a measure of robustness. Ideally, we also wish to generate example inputs which violate the property. Unfortunately, the event $E$ is typically very rare in verification scenarios. Consequently, the estimating the integral directly using Monte Carlo,
77
+
78
+ $$
79
+ \hat { P } _ { X \sim p ( \cdot ) } \left( s ( X ) \geq 0 \right) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathbb { 1 } _ { \{ s ( \mathbf { x } _ { n } ) \geq 0 \} } , \quad \mathrm { w h e r e } \quad \mathbf { x } _ { n } \overset { \mathrm { i . i . d . } } { \sim } p ( \cdot )
80
+ $$
81
+
82
+ is typically not feasible for real problems, requiring an impractically large number of samples to achieve a reasonable accuracy. Even when $E$ is not a rare event, we desire to estimate the probability using as few forward passes of the neural network as possible to reduce computation. Furthermore, the dimensionality of $\mathbf { x }$ is typically large for practical problems, such that it is essential to employ a method that scales well in dimensionality. Consequently many of the methods commonly employed for such problems, such as the cross-entropy method (Rubinstein, 1997; De Boer et al., 2005), are inappropriate due to relying on importance sampling, which is well known to scale poorly.
83
+
84
+ As we will demonstrate empirically, a less well known but highly effective method from the statistics literature, adaptive multi-level splitting (AMLS) (Kahn & Harris, 1951; Guyader et al., 2011), can be readily adapted to address all the aforementioned computational challenges. Specifically, AMLS is explicitly designed for estimating the probability of rare events and our adaptation is able to give highly accurate estimates even when the $E$ is very rare. Furthermore, as will be explained later, AMLS also allows the use of MCMC transitions, meaning that our approach is able to scale effectively in the dimensionality of $\mathbf { x }$ . A further desirable property of AMLS is that it produces property-violating examples as a side product, namely, it produces samples from the distribution
85
+
86
+ $$
87
+ \pi ( \mathbf { x } ) \triangleq p ( \mathbf { x } \mid E ) = p ( \mathbf { x } ) \mathbb { 1 } _ { \left\{ s ( \mathbf { x } ) \geq 0 \right\} } / \mathbb { Z } \left[ p , s \right] .
88
+ $$
89
+
90
+ Such samples could, in theory, be used to perform robust learning, in a similar spirit to Goodfellow et al. (2015) and Madry et al. (2017).
91
+
92
+ # 5.1 MULTI-LEVEL SPLITTING
93
+
94
+ Multi-level splitting (Kahn & Harris, 1951) divides the problem of predicting the probability of a rare event into several simpler ones. Specifically, we construct a sequence of intermediate targets,
95
+
96
+ $$
97
+ \pi _ { k } ( \mathbf { x } ) \triangleq p ( \mathbf { x } \mid \{ s ( \mathbf { x } ) \geq L _ { k } \} ) \propto p ( \mathbf { x } ) \mathbb { 1 } _ { \{ s ( \mathbf { x } ) \geq L _ { k } \} } , \ k = 0 , 1 , 2 , \ldots , K ,
98
+ $$
99
+
100
+ for levels, $- \infty = L _ { 0 } < L _ { 1 } < L _ { 2 } < \cdots < L _ { K } = 0$ , to bridge the gap between the input model $p ( \mathbf { x } )$ and the target $\pi ( \mathbf { x } )$ . For any choice of the intermediate levels, we can now represent equation (2) through the following factorization,
101
+
102
+ $$
103
+ \begin{array} { r } { P _ { X \sim p \left( \cdot \right) } \left( s ( X ) \geq 0 \right) = \prod _ { k = 1 } ^ { K } P \left( s ( X ) \geq L _ { k } \mid s ( X ) \geq L _ { k - 1 } \right) = \prod _ { k = 1 } ^ { K } P _ { k } , } \\ { \mathrm { w h e r e } \quad P _ { k } \triangleq \mathbb { E } _ { X \sim \pi _ { k - 1 } \left( \cdot \right) } \left[ \mathbb { 1 } _ { \left\{ s ( X ) \geq L _ { k } \right\} } \right] . \qquad } \end{array}
104
+ $$
105
+
106
+ Provided consecutive levels are sufficiently close, we will be able to reliably estimate each $P _ { k }$ by making use of the samples from one level to initialize the estimation of the next.
107
+
108
+ Our approach starts by first drawing $N$ samples, $\{ \mathbf { x } _ { n } ^ { ( 0 ) } \} _ { n = 1 } ^ { N }$ , from $\pi _ { 0 } ( \cdot ) = p ( \cdot )$ , noting that this can be done exactly because the perturbation model is known. These samples can then be used to estimate $P _ { 1 }$ using simple Monte Carlo,
109
+
110
+ $$
111
+ P _ { 1 } \approx \hat { P } _ { 1 } \triangleq \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathbb { 1 } _ { \{ s ( \mathbf { x } _ { n } ^ { ( 0 ) } ) \geq L _ { 1 } \} } \quad \mathrm { w h e r e } \quad \mathbf { x } _ { n } ^ { ( 0 ) } \sim \pi _ { 0 } ( \cdot ) .
112
+ $$
113
+
114
+ In other words, $P _ { 1 }$ is the fraction of these samples whose property is greater than $L _ { 1 }$ . Critically, by ensuring the value of $L _ { 1 }$ is sufficiently small for $\{ s ( \mathbf { x } _ { n } ) \} \geq \mathbf { \bar { \cal L } } _ { 1 } \}$ to be a common event, we can ensure $\hat { P } _ { 1 }$ is a reliable estimate for moderate numbers of samples $N$ .
115
+
116
+ # Algorithm 1 Adaptive multi-level splitting with termination criterion
117
+
118
+ 1: Input: Input model $p ( \mathbf { x } )$ , sample quantile $\rho$ , MH proposal $g ( \mathbf { x } ^ { \prime } | \mathbf { x } )$ , number of MH steps $M$ , termination
119
+ threshold $\log ( P _ { \operatorname* { m i n } } )$
120
+ 2: Sample $\{ \mathbf { x } _ { n } ^ { ( 0 ) } \} _ { n = 1 } ^ { N }$ i.i.d. from $p ( \cdot )$
121
+ 3: Initialize $L \gets - \infty , \quad L _ { \mathrm { p r e v } } \gets - \infty , \quad \log ( \mathcal { T } ) \gets 0 , \quad k \gets 0$
122
+ 4: while $L < 0$ do
123
+ 5: $k \gets k + 1$
124
+ 6: 7: $\{ s ( \mathbf { x } _ { n } ^ { ( k - 1 ) } ) \} _ { n = 1 } ^ { N }$ in descending order
125
+ $\begin{array} { r l } & { L _ { k } \operatorname* { m i n } \{ 0 , s ( \mathbf { x } _ { \lfloor \rho N \rfloor } ^ { ( k - 1 ) } ) \} } \\ & { \hat { P } _ { k } \# \{ \mathbf { x } _ { n } ^ { ( k - 1 ) } \mid s ( \mathbf { x } _ { n } ^ { ( k - 1 ) } ) \geq L \} / N } \\ & { \log ( \mathbb { Z } ) \log ( \mathbb { Z } ) + \log ( \hat { P } _ { k } ) } \end{array}$ . Updating the level
126
+ 8:
127
+ 9: . Updating integral estimate
128
+ 10: if $\log ( \mathbb { Z } ) < \log ( P _ { \operatorname* { m i n } } )$ then return $( \varnothing , - \infty )$ end if $\triangleright$ Final estimate will be less than $\log ( P _ { \operatorname* { m i n } } )$
129
+ 11: Initialize $\{ \mathbf { x } _ { n } ^ { ( k ) } \} _ { n = 1 } ^ { N }$ by resampling with replacement $N$ times from $\{ \mathbf { x } _ { n } ^ { ( k - 1 ) } \mid s ( \mathbf { x } _ { n } ^ { ( k - 1 ) } ) \geq L \}$
130
+ 12: Apply $M \mathbf { M H }$ updates separately to each $\mathbf { x } _ { n } ^ { ( k ) }$ using $g ( \mathbf { x } ^ { \prime } | \mathbf { x } )$
131
+ 13: [Optional] Adapt $g ( \mathbf { x } ^ { \prime } | \mathbf { x } )$ based on MH acceptance rates
132
+ 14: end while
133
+ 15: return $( \{ \mathbf { x } _ { n } ^ { ( k ) } \} _ { n = 1 } ^ { N } , \log ( \mathcal { T } ) )$
134
+
135
+ To estimate the other $P _ { k }$ , we need to be able to draw samples from $\pi _ { k - 1 } ( \cdot )$ . For this we note that if $\{ \mathbf { x } _ { n } ^ { ( k - 2 ) } \} _ { n = 1 } ^ { N }$ are distributed according to $\pi _ { k - 2 } ( \cdot )$ , then the subset of these samples for which s(x(k−2)n ) $s ( \mathbf { x } _ { n } ^ { ( k - 2 ) } ) \geq L _ { k - 1 }$ are distributed according to $\pi _ { k - 1 } ( \cdot )$ . Furthermore, setting $L _ { k - 1 }$ up to ensure this event is not rare means a significant proportion of the samples will satisfy this property.
136
+
137
+ To avoid our set of samples shrinking from one level to the next, it is necessary to carry out a rejuvenation step to convert this smaller set of starting samples to a full set of size $N$ for the next level. To do this, we first carry out a uniform resampling with replacement from the set of samples satisfying $s ( \mathbf { x } _ { n } ^ { ( k - 1 ) } ) \geq L _ { k }$ to generate a new set of $N$ samples which are distributed according to $\pi _ { k } ( \cdot )$ , but with a large number of duplicated samples. Starting with these samples, we then successively apply $M$ Metropolis–Hastingssh new set of samples itions targeting (see Appendix $\pi _ { k } ( \cdot )$ separately to each sample to produce a full details). These samples can then in $\{ \mathbf { x } _ { n } ^ { ( k ) } \} _ { n = 1 } ^ { N }$
138
+ turn be used to form a Monte Carlo estimate for ,
139
+
140
+ $$
141
+ P _ { k } \approx \hat { P } _ { k } \triangleq \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathbb { 1 } _ { \{ s ( \mathbf { x } _ { n } ^ { ( k - 1 ) } ) \geq L _ { k } \} } \quad \mathrm { w h e r e } \quad \mathbf { x } _ { n } ^ { ( k - 1 ) } \sim \pi _ { k - 1 } ( \cdot ) ,
142
+ $$
143
+
144
+ along with providing the initializations for the next level. Running more MH transitions decreases the correlations between the set of samples, improving the performance of the estimator.
145
+
146
+ We have thus far omitted to discuss how the levels $L _ { k }$ are set, other than asserting the need for the levels to be sufficiently close to allow reliable estimation of each $P _ { k }$ . Presuming that we are also free to choose the number of levels $K$ , there is inevitably a trade-off between ensuring that each $\{ s ( X ) \geq L _ { k } \}$ is not rare given $\{ s ( X ) \geq L _ { k - 1 } \}$ , and keeping the number of levels small to reduce computational costs and avoid the build-up of errors. AMLS (Guyader et al., 2011) builds on the basic multi-level splitting process, providing an elegant way of controlling this trade-off by adaptively selecting the level to be the minimum of 0 and some quantile of the property under the current samples. The approach terminates when the level reaches zero, such that $L _ { K } = 0$ and $K$ is a dynamic parameter chosen implicitly by the adaptive process.
147
+
148
+ Choosing the $\rho$ th quantile of the values of the property results in discarding a fraction $( 1 - \rho )$ of the chains at each step of the algorithm. This allows explicit control of the rarity of the events to keep them at a manageable level. We note that if all the sample property values are distinct, then this approach gives $P _ { k } = \rho$ , $\forall k < K$ . To give intuition to this, we can think about splitting up $\log ( \mathcal { T } )$ into chunks of size $\log ( \rho )$ . For any value of $\log ( \mathcal { T } )$ , there is always a unique pair of values $\{ K , P _ { K } \}$ such that $\log ( \mathbb { Z } ) = K \log ( \rho ) + \log ( P _ { K } ) .$ , $K \geq 0$ and $P _ { K } < \rho$ . Therefore the problem of estimating $\mathcal { T }$ is equivalent to that of estimating $K$ and $P _ { K }$ .
149
+
150
+ # 5.2 TERMINATION CRITERION
151
+
152
+ The application of AMLS to our verification problem presents a significant complicating factor in that the true probability of our rare event might be exactly zero. Whenever this is the case, the basic AMLS approach outlined in (Guyader et al., 2011) will never terminate as the quantile of the property will never rise above zero; the algorithm simply produces closer and closer intermediate levels as it waits for the event to occur.
153
+
154
+ To deal with this, we introduce a termination criterion based on the observation that AMLS’s running estimate for $\mathcal { T }$ monotonically decreases during running. Namely, we introduce a threshold probability, $P _ { \mathrm { m i n } }$ , below which the estimates will be treated as being numerically zero. We then terminate the algorithm if $\mathcal { T } < P _ { \operatorname* { m i n } }$ and return $\mathcal { T } = 0$ , safe in the knowledge that even if the algorithm would eventually generate a finite estimate for $\mathcal { T }$ , this estimate is guaranteed to be less than $P _ { \mathrm { m i n } }$ .
155
+
156
+ Putting everything together, gives the complete method as shown in Algorithm 1. See Appendix B for low-level implementation details.
157
+
158
+ # 6 EXPERIMENTS
159
+
160
+ # 6.1 EMULATION OF FORMAL VERIFICATION
161
+
162
+ In our first experiment1, we aim to test whether our robustness estimation framework is able to effectively emulate formal verification approaches, while providing additional robustness information for SAT properties. In particular, we want to test whether it reliably identifies properties as being UNSAT, for which $\mathcal { T } = 0$ , or SAT, for which $\mathcal { T } > 0$ . We note that the method still provides a formal demonstration for SAT properties because having a non-zero estimate for $\mathcal { T }$ indicates that at least one counterexample has been found. Critically, it further provides a measure for how robust SAT properties are, through its estimate for $\mathcal { T }$ .
163
+
164
+ We used the COLLISIONDETECTION dataset introduced in the formal verification literature by (Ehlers, 2017). It consists of a neural network with six inputs that has been trained to classify two car trajectories as colliding or non-colliding. The architecture has 40 linear nodes in the first layer, followed by a layer of max pooling, a ReLU layer with 19 hidden units, and an output layer with 2 hidden units. Along with the dataset, 500 properties are specified for verification, of which 172 are SAT and 328 UNSAT. This dataset was chosen because the model is small enough so that the properties can be formally verified. These formal verification methods do not calculate the value of $\mathcal { T }$ , but rather confirm the existence of a counterexample for which $s ( \mathbf { x } ) > 0$ .
165
+
166
+ We ran our approach on all 500 properties, setting $\rho = 0 . 1$ , $N = 1 0 ^ { 4 }$ , $M = 1 0 0 0$ (the choice of these hyperparameters will be justified in the next subsection), and using a uniform distribution over the input constraints as the perturbation model, along with a uniform random walk proposal. We compared our metric estimation approach against the naive Monte Carlo estimate using $1 0 ^ { 1 0 }$ samples. The generated estimates of $\mathcal { T }$ for all SAT properties are shown in Figure 1a.
167
+
168
+ Both our approach and the naive MC baseline correctly identified all of the UNSAT properties by estimating $\mathcal { T }$ as exactly zero. However, despite using substantially more samples, naive MC failed to find a counterexample for 8 of the rarest SAT properties, thereby identifying them as UNSAT, whereas our approach found a counterexample for all the SAT properties. As shown in Figure 1a, the variances in the estimates for $\mathcal { T }$ of our approach were also very low and matched the unbiased MC baseline estimates for the more commonly violated properties, for which the latter approach still gives reliable, albeit less efficient, estimates. Along with the improved ability to predict rare events, our approach was also significantly faster than naive MC throughout, with a speed up of several orders of magnitude for properties where the event is not rare—a single run with naive MC took about 3 minutes, whereas a typical run of ours took around 3 seconds.
169
+
170
+ # 6.2 SENSITIVITY TO PARAMETER SETTINGS
171
+
172
+ As demonstrated by Brehier et al. (2015), AMLS is unbiased under the assumption that perfect sam- ´ pling from the targets, $\{ \pi _ { k } \} _ { k = 1 } ^ { K - 1 }$ , is possible, and that the cumulative distribution function of $s ( X )$ is continuous. In practice, finite mixing rates of the Markov chains and the dependence between the initialization points for each target means that sampling is less than perfect, but improves with larger values of $M$ and $N$ . The variance, on the other hand, theoretically strictly decreases with larger values of $N$ and $\rho$ (Brehier et al., 2015). ´
173
+
174
+ ![](images/91513f347ec2cf31b0a6f22246102991a12bbc154e6d294aa7c7e7d03c9e4118.jpg)
175
+ Figure 1: (a) Estimate of $\mathcal { T }$ for all SAT properties of COLLISIONDETECTION problem. Error bars indicating $\pm$ three standard errors from 30 runs are included here and throughout, but the variance of the estimates was so small that these are barely visible. We can further conclude low bias of our method for the properties where naive MC estimation was feasible, due to the fact that naive MC produces unbiased (but potentially high variance) estimates. (b) Mean AMLS estimate relative to naive MC estimate for different $\rho$ holding $M = 1 0 0 0$ fixed, for those properties with $\log _ { 1 0 } \mathcal { T } > - 6 . 5$ such that they could be estimated accurately. The bias decreases both as $\rho$ and the rareness of the event decrease. (c) As per (b) but with varying $M$ and holding $\rho = 0 . 1$ fixed.
176
+
177
+ In practice, we found that while larger values of $M$ and $N$ were always beneficial, setting $\rho$ too high introduced biases into the estimate, with $\rho = 0 . 1$ empirically providing a good trade-off between bias and variance. Furthermore, this provides faster run times than large values of $\rho$ , noting that the smaller values of $\rho$ lead to larger gaps in the levels.
178
+
179
+ To investigate the effect of the parameters more formally, we further ran AMLS on the SAT properties of COLLISIONDETECTION, varying $\rho \in \{ 0 . 1 , 0 . 2 5 , 0 . 5 \}$ , $N \in \{ 1 0 ^ { 3 } , 1 0 ^ { 4 } , 1 0 ^ { 5 } \}$ and $\mathsf { \bar { M } } \bar { \in } \{ 1 0 0 , 2 5 0 , 1 0 0 0 \}$ , again comparing to the naive MC estimate for $1 0 ^ { 1 0 }$ samples. We found that the value of $N$ did not make a discernible difference in this range regardless of the values for $\rho$ and $M$ , and thus all presented results correspond to setting $N = \overline { { 1 0 ^ { 4 } } }$ . As shown in Figure 1b, we found that the setting of $\rho$ made a noticeable difference to the estimates for the relatively rarer events. All the same, these differences were small relative to the differences between properties. As shown in Figure 1c, the value of $M$ made little difference when $\rho = 0 . 1$ ,. Interesting though, we found that the value of $M$ was important for different values of $\rho$ , as shown in Appendix C.1, with larger values of $M$ giving better results as expected.
180
+
181
+ # 6.3 CONVERGENCE WITH HIGHER-DIMENSIONAL INPUTS AND LARGER NETWORKS
182
+
183
+ To validate the algorithm on a higher-dimensional problem, we first tested adversarial properties on the MNIST and CIFAR–10 datasets using a dense ReLU network with two hidden-layer of size 256. An $l _ { \infty }$ -norm ball perturbation around the data point with width $\epsilon$ was used as the uniform input model, with $\epsilon = 1$ representing an $l _ { \infty }$ -ball filling the entire space (the pixels are scaled to $[ 0 , 1 ] \rangle$ , together with a uniform random walk MH proposal. After training the classifiers, multilevel splitting was run on ten samples from the test set at multiple values of $\epsilon$ , with $N = 1 0 0 0 0$ and $\rho = 0 . 1$ , and $M \in \{ 1 0 0 , 2 5 0 , 1 0 0 0 \}$ for MNIST and $M \in \{ 1 0 0 , 2 5 0 , 5 0 0 , 1 0 0 0 , 2 0 0 0 \}$ for CIFAR–10. The results for naive MC were also evaluated using $5 \times 1 0 ^ { 9 }$ samples—less than the previous experiment as the larger network made estimation more expensive—in the cases where the event was not too rare. This took around twenty minutes per naive MC estimate, versus a few minutes for each AMLS estimate.
184
+
185
+ As the results were similar across datapoints, we present the result for a single example in the top two rows of Figure 2. As desired, a smooth curve is traced out as $\epsilon$ decreases, for which the event $E$ becomes rarer. For MNIST, acceptable accuracy is obtained for $M = 2 5 0$ and high accuracy results for $M = 1 0 0 0$ . For CIFAR–10, which has about four times the input dimension of MNIST, larger values of $M$ were required to achieve comparable accuracy. The magnitude of $\epsilon$ required to give a certain value of $\log ( \mathcal { T } )$ is smaller for CIFAR–10 than MNIST, reflecting that adversarial examples for the former are typically more perceptually similar to the datapoint.
186
+
187
+ ![](images/f1c93372546a0b2c3f4aa86b07ea649f365549350084e5a6c78717032e819855.jpg)
188
+ Figure 2: [Left] Estimates for $\mathcal { T }$ on adversarial properties of a single datapoint with $\rho = 0 . 1$ , and $N ^ { ^ { - } } \in \{ 1 0 0 0 0 , 1 0 0 0 0 , 3 0 0 \}$ for MNIST/CIFAR–10/CIFAR–100 respectively. As in Figure 1, the error bars from 30 runs are barely visible, highlighting a very low variance in the estimates, while the close matching to the naive MC estimates when $\epsilon$ is large enough to make the latter viable, indicate a very low bias. For CIFAR–100 the error bars are shown for the naive estimates, as well, from 10 runs. [Right] The difference in the estimate for the other values of $M$ from $M \in \{ 1 0 0 0 , 2 0 0 0 , 2 0 0 0 \}$ for MNIST/CIFAR–10/CIFAR–100, respectively. The estimate steadily converges as $M$ increases, with larger $M$ more important for rarer events.
189
+
190
+ To demonstrate that our approach can be employed on large networks, we tested adversarial properties on the CIFAR–100 dataset and a much larger DenseNet architecture (Huang et al., 2017a), with depth and growth-rate 40 (approximately $2 \times 1 0 ^ { 6 }$ parameters). Due to the larger model size, we set $N = 3 0 0$ , the largest minibatch that could be held in memory (a larger $N$ could be used by looping over minibatches). The naive Monte Carlo estimates used $5 \times 1 0 ^ { \bar { 6 } }$ samples for about an hour of computation time per estimate, compared to between five to fifteen minutes for each AMLS estimate. The results are presented in the bottom row of Figure 2, showing that our algorithm agrees with the naive Monte Carlo estimate.
191
+
192
+ # 6.4 ROBUSTNESS OF PROVABLE DEFENSES DURING TRAINING
193
+
194
+ We now examine how our robustness metric varies for a ReLU network as that network is trained to be more robust against norm bounded perturbations to the inputs using the method of Wong & Kolter (2018). Roughly speaking, their method works by approximating the set of outputs resulting from perturbations to an input with a convex outer bound, and minimizing the worst case loss over this set. The motivation for this experiment is twofold. Firstly, this training provides a series of networks with ostensibly increasing robustness, allowing us to check if our approach produces robustness estimates consistent with this improvement. Secondly, it allows us to investigate whether the training to improve robustness for one type of adversarial attack helps to protect against others. Specifically, whether training for small perturbation sizes improves robustness to larger perturbations.
195
+
196
+ ![](images/6bd9d43ef3cf2db172db1dce702caec2377b98c7c98cc1c7000f19a4874c4053.jpg)
197
+ (a) Variation in $\mathcal { T }$ during robustness training
198
+
199
+ ![](images/333e09f2c4bfdfe7850938524282bc5f8274a38bb1d37674b16c0e999bf2a78b.jpg)
200
+ (b) Fraction of datapoints declared UNSAT
201
+ Figure 3: (a) Variation in $\mathcal { T }$ during the robustness training of on a CNN model for MNIST for three different perturbation sizes $\epsilon$ . Epoch 0 corresponds to the network after conventional training, with further epochs corresponding to iterations of robustness training. The solid line indicates the median over 50 datapoints, and the limits of the shaded regions the 25 and 75 percentiles. Our measure is capped at $P _ { \mathrm { m i n } } = \exp ( - 2 5 0 )$ . We see that while training improves robustness for $\epsilon = 0 . 2$ , the initial network is already predominantly robust to perturbations of size $\epsilon = 0 . 1$ , while the robustness to perturbations of size $\epsilon = 0 . 3$ actually starts to decrease after around 20 epochs. (b) Comparing the fraction of 50 datapoints for which Wong & Kolter (2018) produces a certificate-of-robustness for $\epsilon = 0 . 1$ (“W&K”), versus the fraction of those samples for which ${ \mathcal { T } } = P _ { \operatorname* { m i n } }$ for $\epsilon \in \{ 0 . 1 , 0 . 2 , 0 . 3 \}$ (“AMLS”). Due to very heavy memory requirements, it was computationally infeasible to calculate certificates-of-robustness for $\dot { \epsilon } = \{ 0 . 2 , 0 . 3 \bar { \} }$ , and $\epsilon = 0 . 1$ before epoch 32 with the method of Wong & Kolter (2018). Our metric, however, suffers no such memory issues.
202
+
203
+ We train a CNN model on MNIST for 100 epochs with the standard cross-entropy loss, then train the network for a further 100 epochs using the robust loss of Wong & Kolter (2018), saving a snapshot of the model at each epoch. The architecture is the same as in (Wong & Kolter, 2018), containing two strided convolutional layers with 16 and 32 channels, followed by two fully connected layers with 100 and 10 hidden units, and ReLU activations throughout. The robustification phase trains the classifier to be robust in an $l _ { \infty }$ $\epsilon$ -ball around the inputs, where $\epsilon$ is annealed from 0.01 to 0.1 over the first 50 epochs. At a number of epochs during the robust training, we calculate our robustness metric with $\epsilon \in \{ 0 . 1 , 0 . 2 , 0 . 3 \}$ on 50 samples from the test set. The results are summarized in Figure 3a with additional per-sample results in Appendix C.2. We see that our approach is able to capture variations in the robustnesses of the network.
204
+
205
+ As the method of Wong & Kolter (2018) returns the maximum value of the property for each sample over a convex outer bound on the perturbations, it is able to produce certificates-of-robustness for some datapoints. If the result returned is less than 0 then no adversarial examples exist in an $l _ { \infty }$ ball of radius $\epsilon$ around that datapoint. If the result returned is greater than 0, then the datapoint may or may not be robust in that $l _ { \infty }$ ball, due to fact that it optimizes over an outer bound.
206
+
207
+ Though we emphasize that the core aim of our approach is in providing richer information for SAT properties, this provides an opportunity to see how well it performs at establishing UNSAT properties relative to a more classical approach. To this end, we compared the fraction of the 50 samples from the test set that are verified by the method of Wong & Kolter (2018), to the fraction that have a negligible volume of adversarial examples, $\mathcal { T } = P _ { \operatorname* { m i n } }$ , in their $l _ { \infty }$ $\epsilon$ -ball neighbourhood. The results are presented in Figure 3b.
208
+
209
+ Our method forms an upper bound on the fraction of robust samples, which can be made arbitrarily tighter by taking $P _ { \operatorname* { m i n } } \to 0$ . Wong & Kolter (2018), on the other hand, forms a lower bound on the fraction of robust samples, where the tightness of the bound depends on the tightness of the convex outer bound, which is unknown and cannot be controlled. Though the true value must lie somewhere between the two bounds, our bound still holds physical meaning it its own right in a way that Wong & Kolter (2018) does not: it is the proportion of samples for which the prevalence of violations is less than an a given acceptable threshold $P _ { \mathrm { m i n } }$ .
210
+
211
+ This experiment also highlights an important shortcoming of Wong & Kolter (2018). The memory usage of their procedure depends on how many ReLU activations cross their threshold over perturbations. This is high during initial training for $\epsilon = 0 . 1$ and indeed the reason why the training procedure starts from $\epsilon = 0 . 0 1$ and gradually anneals to $\epsilon = 0 . 1$ . The result is that it is infeasible (the GPU memory is exhausted)—even for this relatively small model—to calculate the maximum value of the property on the convex outer bound for $\epsilon \in \{ 0 . 2 , 0 . 3 \}$ at all epochs, and $\epsilon = 0 . 1$ for epochs before 32. Even in this restricted setting where our metric has been reduced to a binary one, it appears to be more informative than that of Wong & Kolter (2018) for this reason.
212
+
213
+ # 7 DISCUSSION
214
+
215
+ We have introduced a new measure for the intrinsic robustness of a neural network, and have validated its utility on several datasets from the formal verification and deep learning literatures. Our approach was able to exactly emulate formal verification approaches for satisfiable properties and provide high confidence, accurate predictions for properties which were not. The two key advantages it provides over previous approaches are: a) providing an explicit and intuitive measure for how robust networks are to satisfiable properties; and b) providing improved scaling over classical approaches for identifying unsatisfiable properties.
216
+
217
+ Despite providing a more informative measure of how robust a neural network is, our approach may not be appropriate in all circumstances. In situations where there is an explicit and effective adversary, instead of inputs being generated by chance, we may care more about how far away the single closest counterexample is to the input, rather than the general prevalence of counterexamples. Here our method may fail to find counterexamples because they reside on a subset with probability less than $P _ { \mathrm { m i n } }$ ; the counterexamples may even reside on a subset of the input space with measure zero with respect to the input distribution. On the other hand, there are many practical scenarios, such as those discussed in the introduction, where either it is unrealistic for there to be no counterexamples close to the input, the network (or input space) is too large to realistically permit formal verification, or where potential counterexamples are generated by chance rather than by an adversary. We believe that for these scenarios our approach offers significant advantages to formal verification approaches.
218
+
219
+ Going forward, one way the efficiency of our approach could be improved further is by using a more efficient base MCMC kernel in our AMLS estimator, that is, replace line 12 in Algorithm 1 with a more efficient base inference scheme. The current MH scheme was chosen on the basis of simplicity and the fact it already gave effective empirical performance. However, using more advanced inference approaches, such as gradient-based approaches like Langevin Monte Carlo (LMC) (Rossky et al., 1978) and Hamiltonian Monte Carlo (Neal, 2011), could provide significant speedups by improving the mixing of the Markov chains, thereby reducing the number of required MCMC transitions.
220
+
221
+ # ACKNOWLEDGMENTS
222
+
223
+ We gratefully acknowledge Sebastian Nowozin for suggesting to us to apply multilevel splitting to the problem of estimating neural network robustness. We also thank Rudy Bunel for his help with the COLLISIONDETECTION dataset, and Leonard Berrada for supplying a pretrained DenseNet model.
224
+
225
+ SW gratefully acknowledges support from the EPSRC AIMS CDT through grant EP/L015987/2. TR and YWT are supported in part by the European Research Council under the European Unions Seventh Framework Programme (FP7/20072013) / ERC grant agreement no. 617071. TR further acknowledges support of the ERC StG IDIU. MPK is supported by EPSRC grants EP/P020658/1 and TU/B/000048.
226
+
227
+ # REFERENCES
228
+
229
+ Charles-Edouard Brehier, Tony Leli ´ evre, and Mathias Rousset. Analysis of adaptive multilevel \` splitting algorithms in an idealized case. ESAIM: Probability and Statistics, 19:361–394, 2015.
230
+
231
+ Rudy Bunel, Ilker Turkaslan, Philip H.S. Torr, Pushmeet Kohli, and M. Pawan Kumar. A unified view of piecewise linear neural network verification. arXiv preprint arXiv:1711.00455v3 [cs.AI], 2018.
232
+
233
+ Chih-Hong Cheng, Georg Nuhrenberg, and Harald Ruess. Verification of binarized neural networks. ¨ arXiv preprint arXiv:1710.03107, 2017.
234
+
235
+ Pieter-Tjerk De Boer, Dirk P Kroese, Shie Mannor, and Reuven Y Rubinstein. A tutorial on the cross-entropy method. Annals of operations research, 134(1):19–67, 2005.
236
+
237
+ Ruediger Ehlers. Formal verification of piece-wise linear feed-forward neural networks. In International Symposium on Automated Technology for Verification and Analysis, pp. 269–286. Springer, 2017.
238
+
239
+ Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin Vechev. Ai 2: Safety and robustness certification of neural networks with abstract interpretation. In Security and Privacy (SP), 2018 IEEE Symposium on, 2018.
240
+
241
+ Walter R Gilks, Sylvia Richardson, and David Spiegelhalter. Markov chain Monte Carlo in practice. Chapman and Hall/CRC, 1995.
242
+
243
+ Ian Goodfellow. Gradient masking causes clever to overestimate adversarial perturbation size. arXiv preprint arXiv:1804.07870, 2018.
244
+
245
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2015.
246
+
247
+ Arnaud Guyader, Nicolas Hengartner, and Eric Matzner-Løber. Simulation and estimation of extreme quantiles and extreme probabilities. Applied Mathematics & Optimization, 64(2):171–196, 2011.
248
+
249
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017a.
250
+
251
+ Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. arXiv preprint arXiv:1702.02284, 2017b.
252
+
253
+ Xiaowei Huang, Marta Kwiatkowska, Sen Wang, and Min Wu. Safety verification of deep neural networks. In International Conference on Computer Aided Verification, pp. 3–29. Springer, 2017c.
254
+
255
+ H. Kahn and T.E. Harris. Estimation of particle transmission by random sampling. National Bureau of Standards applied mathematics series, 12:27–30, 1951.
256
+
257
+ Guy Katz, Clark Barrett, David L Dill, Kyle Julian, and Mykel J Kochenderfer. Reluplex: An efficient smt solver for verifying deep neural networks. In International Conference on Computer Aided Verification, pp. 97–117. Springer, 2017.
258
+
259
+ Yen-Chen Lin, Zhang-Wei Hong, Yuan-Hong Liao, Meng-Li Shih, Ming-Yu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. arXiv preprint arXiv:1703.06748, 2017.
260
+
261
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
262
+
263
+ Radford M Neal. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011.
264
+
265
+ Sebastian Nowozin. Multilevel splitting. http://www.nowozin.net/sebastian/blog/ multilevel-splitting.html, 2015.
266
+
267
+ Luca Pulina and Armando Tacchella. An abstraction-refinement approach to verification of artificial neural networks. In International Conference on Computer Aided Verification, pp. 243–257. Springer, 2010.
268
+
269
+ Gareth O Roberts, Andrew Gelman, Walter R Gilks, et al. Weak convergence and optimal scaling of random walk metropolis algorithms. The annals of applied probability, 7(1):110–120, 1997.
270
+
271
+ PJ Rossky, JD Doll, and HL Friedman. Brownian dynamics as smart monte carlo simulation. The Journal of Chemical Physics, 69(10):4628–4633, 1978.
272
+
273
+ Reuven Y Rubinstein. Optimization of computer simulation models with rare events. European Journal of Operational Research, 99(1):89–112, 1997.
274
+
275
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
276
+
277
+ Jonathan Uesato, Ananya Kumar, Csaba Szepesvari, Tom Erez, Avraham Ruderman, Keith Anderson, Krishnamurthy (Dj) Dvijotham, Nicolas Heess, and Pushmeet Kohli. Rigorous agent evaluation: An adversarial approach to uncover catastrophic failures. In International Conference on Learning Representations, 2019.
278
+
279
+ Tsui-Wei Weng, Huan Zhang, Hongge Chen, Zhao Song, Cho-Jui Hsieh, Duane Boning, Inderjit S Dhillon, and Luca Daniel. Towards fast computation of certified robustness for relu networks. arXiv preprint arXiv:1804.09699, 2018a.
280
+
281
+ Tsui-Wei Weng, Huan Zhang, Pin-Yu Chen, Jinfeng Yi, Dong Su, Yupeng Gao, Cho-Jui Hsieh, and Luca Daniel. Evaluating the robustness of neural networks: An extreme value theory approach. arXiv preprint arXiv:1801.10578, 2018b.
282
+
283
+ Eric Wong and Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. In International Conference on Machine Learning, pp. 5283–5292, 2018.
284
+
285
+ Weiming Xiang, Hoang-Dung Tran, and Taylor T Johnson. Output reachable set estimation and verification for multilayer neural networks. IEEE transactions on neural networks and learning systems, (99):1–7, 2018.
286
+
287
+ Radosiaw R Zakrzewski. Verification of a trained neural network accuracy. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on, volume 3, pp. 1657–1662. IEEE, 2001.
288
+
289
+ # APPENDIX
290
+
291
+ # A METROPOLIS–HASTINGS
292
+
293
+ Metropolis–Hastings (MH) is an MCMC method that allows for sampling when one only has access to an unnormalized version of the target distribution (Gilks et al., 1995). At a high-level, one attempts iteratively proposes local moves from the current location of a sampler and then accepts or rejects this move based on the unnormalized density. Each iteration of this process is known as a MH transition.
294
+
295
+ The unnormalized targets distributions of interest for our problem are $\gamma _ { k } ( { \bf x } )$ where
296
+
297
+ $$
298
+ \pi _ { k } ( \mathbf { x } ) \propto \gamma _ { k } ( \mathbf { x } ) = p ( \mathbf { x } ) \mathbb { 1 } _ { \{ s ( \mathbf { x } ) \geq L _ { k } \} } , \quad k = 1 , 2 , \ldots , K .
299
+ $$
300
+
301
+ A MH transition now consists of proposing a new sample using a proposal $\mathbf { x } ^ { \prime } \sim g ( \mathbf { x } ^ { \prime } \mid \mathbf { x } )$ , where $\mathbf { x }$ indicates the current state of the sampler and $\mathbf { x } ^ { \prime }$ the proposed state, calculating an acceptance probability,
302
+
303
+ $$
304
+ A _ { k } ( \mathbf { x } ^ { \prime } \mid \mathbf { x } ) \triangleq \operatorname* { m i n } \left\{ 1 , { \frac { \gamma _ { k } ( \mathbf { x } ^ { \prime } ) g ( \mathbf { x } \mid \mathbf { x } ^ { \prime } ) } { \gamma _ { k } ( \mathbf { x } ) g ( \mathbf { x } ^ { \prime } \mid \mathbf { x } ) } } \right\} ,
305
+ $$
306
+
307
+ and accepting the new sample with probability $A _ { k } ( \mathbf { x } ^ { \prime } \mid \mathbf { x } )$ , returning the old sample if the new one is rejected. The proposal, $g ( \mathbf { x } ^ { \prime } \mid \mathbf { x } )$ , is a conditional distribution, such as a normal distribution centred at $\mathbf { x }$ with fixed covariance matrix. Successive applications of this transition process generates samples which converge in distribution to the target $\pi _ { k } ( { \bf x } )$ and whose correlation with the starting sample diminishes to zero.
308
+
309
+ In our approach, these MH steps are applied independently to each sample in the set, while the only samples used for the AMLS algorithm are the final samples produced from the resulting Markov chains.
310
+
311
+ # B IMPLEMENTATION DETAILS
312
+
313
+ Algorithm 1 has computational cost $O ( N M K )$ , where the number of levels $K$ will depend on the rareness of the event, with more computation required for rarer ones. Parallelization over $N$ is possible provided that the batches fit into memory, whereas the loops over $M$ and $K$ must be performed sequentially.
314
+
315
+ One additional change we make from the approach outlined by Guyader et al. (2011) is that we perform MH updates on all chains in Lines 12, rather than only those that were previously killed off. This helps reduce the build up of correlations over multiple levels, improving performance.
316
+
317
+ Another is that we used an adaptive scheme for $g ( \mathbf { x } ^ { \prime } | \mathbf { x } )$ to aid efficiency. Specifically, our proposal takes the form of a random walk, the radius of which, $\epsilon ^ { \prime }$ , is adapted to keep the acceptance ratio roughly around 0.234 (see Roberts et al. (1997)). Each chain has a separate acceptance ratio that is average across MH steps, and after $M$ MH steps, for those chains whose acceptance ratio is below 0.234 it is halved, and conversely for those above 0.234, multiplied by 1.02.
318
+
319
+ # C ADDITIONAL RESULTS
320
+
321
+ # C.1 VARYING $M$ FOR FIXED $\rho$ ON COLLISIONDETECTION
322
+
323
+ Whereas the exact value of $M$ within the range considered proved to not be especially important when $\rho = 0 . 1$ , it transpires to have a large impact in the quality of the results for larger values of $\rho$ as shown in Figure 4.
324
+
325
+ # C.2 PER-SAMPLE ROBUSTNESS MEASURE DURING ROBUST TRAINING
326
+
327
+ Figure 5 illustrates the diverse forms that the per-sample robustness measure can take on the 40 datapoints averaged over in Experiment $\ S 5 . 3$ . We see that different datapoints have quite varying initial levels of robustness, and that the training helps with some points more than others. In one case, the datapoint was still not robust add the end of training for the target perturbation size $\epsilon = 0 . 1$ .
328
+
329
+ ![](images/6568e0428774ba5c2f2a3ea350da24301a3337f4f571146783a9fe5d1f54a75d.jpg)
330
+ Figure 4: Mean AMLS estimate relative to naive (unbiased) MC estimate for different $M =$ holding $\rho$ fixed to 0.25 (left) and 0.5 (right), for those properties whose naive MC estimate was greater than $\log _ { 1 0 } \mathcal { T } = - 6 . 5$ such that they could be estimated accurately.
331
+
332
+ ![](images/2b16c5f2276b7f993a087c8054a28c33b20f273cb4548f4a62e36fa107baf5eb.jpg)
333
+ Figure 5: Convergence of individual datapoints used in forming Figure 3.
parse/train/S1xcx3C5FX/S1xcx3C5FX_content_list.json ADDED
@@ -0,0 +1,1688 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "A STATISTICAL APPROACH TO ASSESSING NEURAL NETWORK ROBUSTNESS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Stefan Webb∗ \nDepartment of Engineering Science \nUniversity of Oxford ",
17
+ "bbox": [
18
+ 183,
19
+ 166,
20
+ 419,
21
+ 209
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Tom Rainforth, Yee Whye Teh Department of Statistics University of Oxford ",
28
+ "bbox": [
29
+ 601,
30
+ 166,
31
+ 813,
32
+ 209
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "M. Pawan Kumar \nDepartment of Engineering Science \nUniversity of Oxford, \nAlan Turing Institute ",
39
+ "bbox": [
40
+ 183,
41
+ 231,
42
+ 419,
43
+ 286
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 324,
54
+ 544,
55
+ 338
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "We present a new approach to assessing the robustness of neural networks based on estimating the proportion of inputs for which a property is violated. Specifically, we estimate the probability of the event that the property is violated under an input model. Our approach critically varies from the formal verification framework in that when the property can be violated, it provides an informative notion of how robust the network is, rather than just the conventional assertion that the network is not verifiable. Furthermore, it provides an ability to scale to larger networks than formal verification approaches. Though the framework still provides a formal guarantee of satisfiability whenever it successfully finds one or more violations, these advantages do come at the cost of only providing a statistical estimate of unsatisfiability whenever no violation is found. Key to the practical success of our approach is an adaptation of multi-level splitting, a Monte Carlo approach for estimating the probability of rare events, to our statistical robustness framework. We demonstrate that our approach is able to emulate formal verification procedures on benchmark problems, while scaling to larger networks and providing reliable additional information in the form of accurate estimates of the violation probability. ",
62
+ "bbox": [
63
+ 233,
64
+ 348,
65
+ 764,
66
+ 583
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 609,
77
+ 336,
78
+ 626
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The robustness of deep neural networks must be guaranteed in mission-critical applications where their failure could have severe real-world implications. This motivates the study of neural network verification, in which one wishes to assert whether certain inputs in a given subdomain of the network might lead to important properties being violated (Zakrzewski, 2001; Bunel et al., 2018). For example, in a classification task, one might want to ensure that small perturbations of the inputs do not lead to incorrect class labels being predicted (Szegedy et al., 2013; Goodfellow et al., 2015). ",
85
+ "bbox": [
86
+ 174,
87
+ 640,
88
+ 825,
89
+ 723
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The classic approach to such verification has focused on answering the binary question of whether there exist any counterexamples that violate the property of interest. We argue that this approach has two major drawbacks. Firstly, it provides no notion of how robust a network is whenever a counterexample can be found. Secondly, it creates a computational problem whenever no counterexamples exist, as formally verifying this can be very costly and does not currently scale to the size of networks used in many applications. ",
96
+ "bbox": [
97
+ 174,
98
+ 728,
99
+ 825,
100
+ 811
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "To give a demonstrative example, consider a neural network for classifying objects in the path of an autonomous vehicle. It will almost certainly be infeasible to train such a network that is perfectly robust to misclassification. Furthermore, because the network will most likely need to be of significant size to be effective, it is unlikely to be tractable to formally verify the network is perfectly robust, even if such a network exists. Despite this, it is still critically important to assess the robustness of the network, so that manufacturers can decide whether it is safe to deploy. ",
107
+ "bbox": [
108
+ 174,
109
+ 815,
110
+ 825,
111
+ 900
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "To address the shortfalls of the classic approach, we develop a new measure of intrinsic robustness of neural networks based on the probability that a property is violated under an input distribution model. Our measure is based on two key insights. The first is that for many, if not most, applications, full formal verification is neither necessary nor realistically achievable, such that one actually desires a notion of how robust a network is to a set of inputs, not just a binary answer as to whether it is robust or not. The second is that most practical applications have some acceptable level of risk, such that it is sufficient to show that the probability of a violation is below a certain threshold, rather than confirm that this probability is exactly zero. ",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 215
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "By providing a probability of violation, our approach is able to address the needs of applications such as our autonomous vehicle example. If the network is not perfectly robust, it provides an explicit measure of exactly how robust the network is. If the network is perfectly robust, it is still able to tractability assert that a violation event is “probably-unsatisfiable”. That is it is able to statistically conclude that the violation probability is below some tolerance threshold to true zero, even for large networks for which formal verification would not be possible. ",
129
+ "bbox": [
130
+ 174,
131
+ 219,
132
+ 825,
133
+ 303
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Calculating the probability of violation is still itself a computationally challenging task, corresponding to estimating the value of an intractable integral. In particular, in most cases, violations of the target property constitute (potentially extremely) rare events. Consequently, the simple approach of constructing a direct Monte Carlo estimate by sampling from the input model and evaluating the property will be expensive and only viable when the event is relatively common. To address this, we adapt an algorithm from the Monte Carlo literature, adaptive multi-level splitting (AMLS) (Guyader et al., 2011; Nowozin, 2015), to our network verification setting. AMLS is explicitly designed for prediction of rare events and our adaptation means that we are able to reliably estimate the probability of violation, even when the true value is extremely small. ",
140
+ "bbox": [
141
+ 174,
142
+ 306,
143
+ 825,
144
+ 433
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Our resulting framework is easy to implement, scales linearly in the cost of the forward operation of the neural network, and is agnostic both to the network architecture and input model. Assumptions such as piecewise linearity, Lipschitz continuity, or a specific network form are not required. Furthermore, it produces a diversity of samples which violate the property as a side-product. To summarize, our main contributions are: ",
151
+ "bbox": [
152
+ 176,
153
+ 436,
154
+ 825,
155
+ 507
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "• Reframing neural network verification as the estimation of the probability of a violation, thereby providing a more informative robustness metric for non-verifiable networks; • Adaptation of the AMLS method to our verification framework to allow the tractable estimation of our metric for large networks and rare events; • Validation of our approach on several models and datasets from the literature. ",
162
+ "bbox": [
163
+ 215,
164
+ 513,
165
+ 825,
166
+ 594
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "2 RELATED WORK ",
173
+ "text_level": 1,
174
+ "bbox": [
175
+ 174,
176
+ 614,
177
+ 341,
178
+ 631
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "The literature on neural network robustness follows two main threads. In the optimization community, researchers seek to formally prove that a property holds for a neural network by framing it as a satisfiability problem (Zakrzewski, 2001), which we refer to as the classical approach to verification. Such methods have only been successfully scaled beyond one hidden layer networks for piecewise linear networks (Cheng et al., 2017; Katz et al., 2017), and even then these solutions do not scale to, for example, common image classification architectures with input dimensions in the hundreds, or apply to networks with nonlinear activation functions (Bunel et al., 2018). Other work has sought approximate solutions in the same general framework but still does not scale to larger networks (Pulina & Tacchella, 2010; Xiang et al., 2018; Huang et al., 2017c). As the problem is NP-hard (Katz et al., 2017), it is unlikely that an algorithm exists with runtime scaling polynomially in the number of network nodes. ",
185
+ "bbox": [
186
+ 174,
187
+ 641,
188
+ 825,
189
+ 794
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "In the deep learning community, research has focused on constructing and defending against adversarial attacks, and by estimating the robustness of networks to such attacks. Weng et al. (2018b) recently constructed a measure for robustness to adversarial attacks estimating a lower bound on the minimum adversarial distortion, that is the smallest perturbation required to create an adversarial example. Though the approach scales to large networks, the estimate of the lower bound is often demonstratively incorrect: it is often higher than an upper bound on the minimum adversarial distortion (Goodfellow, 2018). Other drawbacks of the method are that it cannot be applied to networks that are not Lipschitz continuous, it requires an expensive gradient computation for each class per sample, does not produce adversarial examples, and cannot be applied to non-adversarial properties. The minimum adversarial distortion is also itself a somewhat unsatisfying metric for many applications, as it conveys little information about the prevalence of adversarial examples. ",
196
+ "bbox": [
197
+ 174,
198
+ 799,
199
+ 825,
200
+ 924
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "",
207
+ "bbox": [
208
+ 173,
209
+ 103,
210
+ 821,
211
+ 132
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "In other work spanning both communities (Gehr et al., 2018; Weng et al., 2018a; Wong & Kolter, 2018), researchers have relaxed the satisfiability problem of classical verification, and are able to produce certificates-of-robustness for some samples (but not all that are robust) by giving a lowerbound on the minimal adversarial distortion. Despite these methods scaling beyond formal verification, we note that this is still a binary measure of robustness with limited informativeness. ",
218
+ "bbox": [
219
+ 174,
220
+ 136,
221
+ 823,
222
+ 207
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "An orthogonal track of research investigates the robustness of reinforcement learning agents to failure (Huang et al., 2017b; Lin et al., 2017). For instance, concurrent work to ours (Uesato et al., 2019) takes a continuation approach to efficiently estimating the probability that an agent fails when this may be a rare event. ",
229
+ "bbox": [
230
+ 174,
231
+ 210,
232
+ 823,
233
+ 267
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "3 MOTIVATING EXAMPLES ",
240
+ "text_level": 1,
241
+ "bbox": [
242
+ 176,
243
+ 284,
244
+ 411,
245
+ 300
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "To help elucidate our problem setting, we consider the ACASXU dataset (Katz et al., 2017) from the formal verification literature. A neural network is trained to predict one of five correct steering decisions, such as “hard left,” “soft left,” etc., for an unmanned aircraft to avoid collision with a second aircraft. The inputs $\\mathbf { x }$ describe the positions, orientations, velocities, etc. of the two aircraft. Ten interpretable properties are specified along with corresponding constraints on the inputs, for which violations correspond to events causing collisions. Each of these properties is encoded in a function, $s$ , such that it is violated when $s ( \\mathbf { x } ) \\geq 0$ . The formal verification problem asks the question, “Does there exist an input $\\mathbf { x } \\in \\mathcal { E } \\subseteq \\mathcal { X }$ in a constrained subset, $\\mathcal { E }$ , of the domain such that the property is violated?” If there exists a counterexample violating the property, we say that the property is satisfiable (SAT), and otherwise, unsatisfiable (UNSAT). ",
252
+ "bbox": [
253
+ 173,
254
+ 308,
255
+ 825,
256
+ 446
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "Another example is provided by adversarial properties from the deep learning literature on datasets such as MNIST. Consider a neural network $\\bar { f } _ { \\theta } ( \\bar { \\bf x } ) = \\mathrm { S o f t m a x } ( { \\bf z } ( { \\bf x } ) \\bar { ) }$ that classifies images, $\\mathbf { x }$ , into $C$ classes, where the output of $f$ gives the probability of each class. Let $\\delta$ be a small perturbation in an $l _ { p }$ -ball of radius $\\epsilon$ , that is, $\\| \\delta \\| _ { p } < \\epsilon$ . Then $\\mathbf { x } = \\mathbf { x } ^ { \\prime } + \\boldsymbol { \\delta }$ is an adversarial example for $\\mathbf { x } ^ { \\prime }$ if arg $\\mathrm { m a x } _ { i } \\mathbf { z } ( \\mathbf { x } ) _ { i } \\neq \\mathrm { a r g m a x } _ { i } \\mathbf { z } ( \\mathbf { x } ^ { \\prime } ) _ { i }$ , i.e. the perturbation changes the prediction. Here, the property function is $s ( \\mathbf { x } ) = \\mathrm { m a x } _ { i \\neq c } \\left( \\mathbf { z } ( \\mathbf { x } ) _ { i } - \\mathbf { z } ( \\mathbf { x } ) _ { c } \\right)$ , where $c = \\arg \\operatorname* { m a x } _ { j } \\mathbf { z } ( \\mathbf { x } ^ { \\prime } ) _ { j }$ and $s ( \\mathbf { x } ) \\geq 0$ indicates that $\\mathbf { x }$ is an adversarial example. Our approach subsumes adversarial properties as a specific case. ",
263
+ "bbox": [
264
+ 173,
265
+ 450,
266
+ 825,
267
+ 549
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "4 ROBUSTNESS METRIC ",
274
+ "text_level": 1,
275
+ "bbox": [
276
+ 174,
277
+ 565,
278
+ 392,
279
+ 582
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "The framework for our robustness metric is very general, requiring only a) a neural network $f _ { \\theta }$ , b) a property function $s ( \\mathbf { x } ; f , \\phi )$ , and c) an input model $p ( \\mathbf { x } )$ . Together these define an integration problem, with the main practical challenge being the estimation of this integral. Consequently, the method can be used for any neural network. The only requirement is that we can evaluate the property function, which typically involves a forward pass of the neural network. ",
286
+ "bbox": [
287
+ 173,
288
+ 590,
289
+ 825,
290
+ 660
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "The property function, $s ( \\mathbf { x } ; f _ { \\theta } , \\phi )$ , is a deterministic function of the input $\\mathbf { x }$ , the trained network $f _ { \\theta }$ , and problem specific parameters $\\phi$ . For instance, in the MNIST example, $\\phi = \\arg \\operatorname* { m a x } _ { i } f _ { \\theta } ( \\mathbf { x } ^ { \\prime } ) _ { i }$ is the true output of the unperturbed input. Informally, the property reflects how badly the network is performing with respect to a particular property. More precisely, the event ",
297
+ "bbox": [
298
+ 173,
299
+ 664,
300
+ 823,
301
+ 720
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "equation",
307
+ "img_path": "images/e6b79d5cdbf41291e6e0c755441802d3716aa158949ba795eb9e79c77ffb5bfb.jpg",
308
+ "text": "$$\nE \\triangleq \\{ s ( \\mathbf { x } ; f _ { \\theta } , \\phi ) \\geq 0 \\}\n$$",
309
+ "text_format": "latex",
310
+ "bbox": [
311
+ 421,
312
+ 726,
313
+ 576,
314
+ 744
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "represents the property being violated. Predicting the occurrence of these, typically rare, events will be the focus of our work. We will omit the dependency on $f _ { \\theta }$ and $\\phi$ from here on for notional conciseness, noting that these are assumed to be fixed and known for verification problems. ",
321
+ "bbox": [
322
+ 173,
323
+ 750,
324
+ 825,
325
+ 791
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "The input model, $p ( \\mathbf { x } )$ , is a distribution over the subset of the input domain that we are considering for counterexamples. For instance, for the MNIST example we could use $p ( \\mathbf { x } ; \\mathbf { x } ^ { \\prime } ) ~ \\propto ~$ $\\mathbb { 1 } \\left( \\lVert \\mathbf { x } - \\mathbf { x } ^ { \\prime } \\rVert _ { p } \\leq \\epsilon \\right)$ to consider uniform perturbations to the input around an $l _ { p }$ -norm ball with radius $\\epsilon$ . More generally, the input model can be used to place restrictions on the input domain and potentially also to reflect that certain violations might be more damaging than others. ",
332
+ "bbox": [
333
+ 174,
334
+ 795,
335
+ 823,
336
+ 866
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Together, the property function and input model specify the probability of failure through the integral ",
343
+ "bbox": [
344
+ 174,
345
+ 869,
346
+ 823,
347
+ 885
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "equation",
353
+ "img_path": "images/2379988b4abaa8ac1c75836e1fa0ccaf304f675d5568104790af6c526b43fa3b.jpg",
354
+ "text": "$$\n\\mathcal { T } \\left[ p , s \\right] \\triangleq P _ { X \\sim p ( \\cdot ) } \\left( s ( X ) \\geq 0 \\right) = \\int _ { \\mathcal { X } } \\mathbb { 1 } _ { \\left\\{ s ( \\mathbf { x } ) \\geq 0 \\right\\} } p ( \\mathbf { x } ) d \\mathbf { x } .\n$$",
355
+ "text_format": "latex",
356
+ "bbox": [
357
+ 313,
358
+ 888,
359
+ 683,
360
+ 921
361
+ ],
362
+ "page_idx": 2
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "This integral forms our measure of robustness. The integral being equal to exactly zero corresponds to the classical notion of a formally verifiable network. Critically though, it also provides a measure for how robust a non-formally-verifiable network is. ",
367
+ "bbox": [
368
+ 174,
369
+ 103,
370
+ 825,
371
+ 146
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "5 METRIC ESTIMATION ",
378
+ "text_level": 1,
379
+ "bbox": [
380
+ 174,
381
+ 165,
382
+ 385,
383
+ 181
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "text",
389
+ "text": "Our primary goal is to estimate (2) in order to obtain a measure of robustness. Ideally, we also wish to generate example inputs which violate the property. Unfortunately, the event $E$ is typically very rare in verification scenarios. Consequently, the estimating the integral directly using Monte Carlo, ",
390
+ "bbox": [
391
+ 173,
392
+ 189,
393
+ 825,
394
+ 232
395
+ ],
396
+ "page_idx": 3
397
+ },
398
+ {
399
+ "type": "equation",
400
+ "img_path": "images/d3db2c4ab334b7d4fe0de68aba529986c882c765291c39307c7bfb0509cc4825.jpg",
401
+ "text": "$$\n\\hat { P } _ { X \\sim p ( \\cdot ) } \\left( s ( X ) \\geq 0 \\right) = \\frac { 1 } { N } \\sum _ { n = 1 } ^ { N } \\mathbb { 1 } _ { \\{ s ( \\mathbf { x } _ { n } ) \\geq 0 \\} } , \\quad \\mathrm { w h e r e } \\quad \\mathbf { x } _ { n } \\overset { \\mathrm { i . i . d . } } { \\sim } p ( \\cdot )\n$$",
402
+ "text_format": "latex",
403
+ "bbox": [
404
+ 269,
405
+ 238,
406
+ 728,
407
+ 268
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "is typically not feasible for real problems, requiring an impractically large number of samples to achieve a reasonable accuracy. Even when $E$ is not a rare event, we desire to estimate the probability using as few forward passes of the neural network as possible to reduce computation. Furthermore, the dimensionality of $\\mathbf { x }$ is typically large for practical problems, such that it is essential to employ a method that scales well in dimensionality. Consequently many of the methods commonly employed for such problems, such as the cross-entropy method (Rubinstein, 1997; De Boer et al., 2005), are inappropriate due to relying on importance sampling, which is well known to scale poorly. ",
414
+ "bbox": [
415
+ 173,
416
+ 273,
417
+ 825,
418
+ 373
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "As we will demonstrate empirically, a less well known but highly effective method from the statistics literature, adaptive multi-level splitting (AMLS) (Kahn & Harris, 1951; Guyader et al., 2011), can be readily adapted to address all the aforementioned computational challenges. Specifically, AMLS is explicitly designed for estimating the probability of rare events and our adaptation is able to give highly accurate estimates even when the $E$ is very rare. Furthermore, as will be explained later, AMLS also allows the use of MCMC transitions, meaning that our approach is able to scale effectively in the dimensionality of $\\mathbf { x }$ . A further desirable property of AMLS is that it produces property-violating examples as a side product, namely, it produces samples from the distribution ",
425
+ "bbox": [
426
+ 173,
427
+ 376,
428
+ 825,
429
+ 489
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "equation",
435
+ "img_path": "images/d4d13d542c86056ad5fd9404ae667d8973494a44dc95edffb4946301ca2d780e.jpg",
436
+ "text": "$$\n\\pi ( \\mathbf { x } ) \\triangleq p ( \\mathbf { x } \\mid E ) = p ( \\mathbf { x } ) \\mathbb { 1 } _ { \\left\\{ s ( \\mathbf { x } ) \\geq 0 \\right\\} } / \\mathbb { Z } \\left[ p , s \\right] .\n$$",
437
+ "text_format": "latex",
438
+ "bbox": [
439
+ 351,
440
+ 496,
441
+ 647,
442
+ 516
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Such samples could, in theory, be used to perform robust learning, in a similar spirit to Goodfellow et al. (2015) and Madry et al. (2017). ",
449
+ "bbox": [
450
+ 174,
451
+ 521,
452
+ 825,
453
+ 551
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "5.1 MULTI-LEVEL SPLITTING ",
460
+ "text_level": 1,
461
+ "bbox": [
462
+ 174,
463
+ 565,
464
+ 392,
465
+ 580
466
+ ],
467
+ "page_idx": 3
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "Multi-level splitting (Kahn & Harris, 1951) divides the problem of predicting the probability of a rare event into several simpler ones. Specifically, we construct a sequence of intermediate targets, ",
472
+ "bbox": [
473
+ 171,
474
+ 588,
475
+ 825,
476
+ 618
477
+ ],
478
+ "page_idx": 3
479
+ },
480
+ {
481
+ "type": "equation",
482
+ "img_path": "images/607a17a4c53e088c2556dbe6548132950b8e9ff0aa4e4123c886c89276891582.jpg",
483
+ "text": "$$\n\\pi _ { k } ( \\mathbf { x } ) \\triangleq p ( \\mathbf { x } \\mid \\{ s ( \\mathbf { x } ) \\geq L _ { k } \\} ) \\propto p ( \\mathbf { x } ) \\mathbb { 1 } _ { \\{ s ( \\mathbf { x } ) \\geq L _ { k } \\} } , \\ k = 0 , 1 , 2 , \\ldots , K ,\n$$",
484
+ "text_format": "latex",
485
+ "bbox": [
486
+ 266,
487
+ 626,
488
+ 728,
489
+ 645
490
+ ],
491
+ "page_idx": 3
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "for levels, $- \\infty = L _ { 0 } < L _ { 1 } < L _ { 2 } < \\cdots < L _ { K } = 0$ , to bridge the gap between the input model $p ( \\mathbf { x } )$ and the target $\\pi ( \\mathbf { x } )$ . For any choice of the intermediate levels, we can now represent equation (2) through the following factorization, ",
496
+ "bbox": [
497
+ 174,
498
+ 651,
499
+ 821,
500
+ 694
501
+ ],
502
+ "page_idx": 3
503
+ },
504
+ {
505
+ "type": "equation",
506
+ "img_path": "images/9a2fa8d36feea61d6e520710070082e48918cd5769559018690919b1b2b952d4.jpg",
507
+ "text": "$$\n\\begin{array} { r } { P _ { X \\sim p \\left( \\cdot \\right) } \\left( s ( X ) \\geq 0 \\right) = \\prod _ { k = 1 } ^ { K } P \\left( s ( X ) \\geq L _ { k } \\mid s ( X ) \\geq L _ { k - 1 } \\right) = \\prod _ { k = 1 } ^ { K } P _ { k } , } \\\\ { \\mathrm { w h e r e } \\quad P _ { k } \\triangleq \\mathbb { E } _ { X \\sim \\pi _ { k - 1 } \\left( \\cdot \\right) } \\left[ \\mathbb { 1 } _ { \\left\\{ s ( X ) \\geq L _ { k } \\right\\} } \\right] . \\qquad } \\end{array}\n$$",
508
+ "text_format": "latex",
509
+ "bbox": [
510
+ 241,
511
+ 700,
512
+ 754,
513
+ 753
514
+ ],
515
+ "page_idx": 3
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "Provided consecutive levels are sufficiently close, we will be able to reliably estimate each $P _ { k }$ by making use of the samples from one level to initialize the estimation of the next. ",
520
+ "bbox": [
521
+ 174,
522
+ 757,
523
+ 823,
524
+ 786
525
+ ],
526
+ "page_idx": 3
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "Our approach starts by first drawing $N$ samples, $\\{ \\mathbf { x } _ { n } ^ { ( 0 ) } \\} _ { n = 1 } ^ { N }$ , from $\\pi _ { 0 } ( \\cdot ) = p ( \\cdot )$ , noting that this can be done exactly because the perturbation model is known. These samples can then be used to estimate $P _ { 1 }$ using simple Monte Carlo, ",
531
+ "bbox": [
532
+ 174,
533
+ 790,
534
+ 823,
535
+ 835
536
+ ],
537
+ "page_idx": 3
538
+ },
539
+ {
540
+ "type": "equation",
541
+ "img_path": "images/1bb3f9f8dfa3ae432b6af626ea97c0a97a8a333ecd1f0b3e0b0d43c589129e90.jpg",
542
+ "text": "$$\nP _ { 1 } \\approx \\hat { P } _ { 1 } \\triangleq \\frac { 1 } { N } \\sum _ { n = 1 } ^ { N } \\mathbb { 1 } _ { \\{ s ( \\mathbf { x } _ { n } ^ { ( 0 ) } ) \\geq L _ { 1 } \\} } \\quad \\mathrm { w h e r e } \\quad \\mathbf { x } _ { n } ^ { ( 0 ) } \\sim \\pi _ { 0 } ( \\cdot ) .\n$$",
543
+ "text_format": "latex",
544
+ "bbox": [
545
+ 297,
546
+ 842,
547
+ 700,
548
+ 872
549
+ ],
550
+ "page_idx": 3
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "In other words, $P _ { 1 }$ is the fraction of these samples whose property is greater than $L _ { 1 }$ . Critically, by ensuring the value of $L _ { 1 }$ is sufficiently small for $\\{ s ( \\mathbf { x } _ { n } ) \\} \\geq \\mathbf { \\bar { \\cal L } } _ { 1 } \\}$ to be a common event, we can ensure $\\hat { P } _ { 1 }$ is a reliable estimate for moderate numbers of samples $N$ . ",
555
+ "bbox": [
556
+ 174,
557
+ 878,
558
+ 823,
559
+ 924
560
+ ],
561
+ "page_idx": 3
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Algorithm 1 Adaptive multi-level splitting with termination criterion ",
566
+ "text_level": 1,
567
+ "bbox": [
568
+ 174,
569
+ 103,
570
+ 629,
571
+ 118
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "1: Input: Input model $p ( \\mathbf { x } )$ , sample quantile $\\rho$ , MH proposal $g ( \\mathbf { x } ^ { \\prime } | \\mathbf { x } )$ , number of MH steps $M$ , termination \nthreshold $\\log ( P _ { \\operatorname* { m i n } } )$ \n2: Sample $\\{ \\mathbf { x } _ { n } ^ { ( 0 ) } \\} _ { n = 1 } ^ { N }$ i.i.d. from $p ( \\cdot )$ \n3: Initialize $L \\gets - \\infty , \\quad L _ { \\mathrm { p r e v } } \\gets - \\infty , \\quad \\log ( \\mathcal { T } ) \\gets 0 , \\quad k \\gets 0$ \n4: while $L < 0$ do \n5: $k \\gets k + 1$ \n6: 7: $\\{ s ( \\mathbf { x } _ { n } ^ { ( k - 1 ) } ) \\} _ { n = 1 } ^ { N }$ in descending order \n$\\begin{array} { r l } & { L _ { k } \\operatorname* { m i n } \\{ 0 , s ( \\mathbf { x } _ { \\lfloor \\rho N \\rfloor } ^ { ( k - 1 ) } ) \\} } \\\\ & { \\hat { P } _ { k } \\# \\{ \\mathbf { x } _ { n } ^ { ( k - 1 ) } \\mid s ( \\mathbf { x } _ { n } ^ { ( k - 1 ) } ) \\geq L \\} / N } \\\\ & { \\log ( \\mathbb { Z } ) \\log ( \\mathbb { Z } ) + \\log ( \\hat { P } _ { k } ) } \\end{array}$ . Updating the level \n8: \n9: . Updating integral estimate \n10: if $\\log ( \\mathbb { Z } ) < \\log ( P _ { \\operatorname* { m i n } } )$ then return $( \\varnothing , - \\infty )$ end if $\\triangleright$ Final estimate will be less than $\\log ( P _ { \\operatorname* { m i n } } )$ \n11: Initialize $\\{ \\mathbf { x } _ { n } ^ { ( k ) } \\} _ { n = 1 } ^ { N }$ by resampling with replacement $N$ times from $\\{ \\mathbf { x } _ { n } ^ { ( k - 1 ) } \\mid s ( \\mathbf { x } _ { n } ^ { ( k - 1 ) } ) \\geq L \\}$ \n12: Apply $M \\mathbf { M H }$ updates separately to each $\\mathbf { x } _ { n } ^ { ( k ) }$ using $g ( \\mathbf { x } ^ { \\prime } | \\mathbf { x } )$ \n13: [Optional] Adapt $g ( \\mathbf { x } ^ { \\prime } | \\mathbf { x } )$ based on MH acceptance rates \n14: end while \n15: return $( \\{ \\mathbf { x } _ { n } ^ { ( k ) } \\} _ { n = 1 } ^ { N } , \\log ( \\mathcal { T } ) )$ ",
578
+ "bbox": [
579
+ 176,
580
+ 123,
581
+ 826,
582
+ 381
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "To estimate the other $P _ { k }$ , we need to be able to draw samples from $\\pi _ { k - 1 } ( \\cdot )$ . For this we note that if $\\{ \\mathbf { x } _ { n } ^ { ( k - 2 ) } \\} _ { n = 1 } ^ { N }$ are distributed according to $\\pi _ { k - 2 } ( \\cdot )$ , then the subset of these samples for which s(x(k−2)n ) $s ( \\mathbf { x } _ { n } ^ { ( k - 2 ) } ) \\geq L _ { k - 1 }$ are distributed according to $\\pi _ { k - 1 } ( \\cdot )$ . Furthermore, setting $L _ { k - 1 }$ up to ensure this event is not rare means a significant proportion of the samples will satisfy this property. ",
589
+ "bbox": [
590
+ 173,
591
+ 391,
592
+ 825,
593
+ 455
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "To avoid our set of samples shrinking from one level to the next, it is necessary to carry out a rejuvenation step to convert this smaller set of starting samples to a full set of size $N$ for the next level. To do this, we first carry out a uniform resampling with replacement from the set of samples satisfying $s ( \\mathbf { x } _ { n } ^ { ( k - 1 ) } ) \\geq L _ { k }$ to generate a new set of $N$ samples which are distributed according to $\\pi _ { k } ( \\cdot )$ , but with a large number of duplicated samples. Starting with these samples, we then successively apply $M$ Metropolis–Hastingssh new set of samples itions targeting (see Appendix $\\pi _ { k } ( \\cdot )$ separately to each sample to produce a full details). These samples can then in $\\{ \\mathbf { x } _ { n } ^ { ( k ) } \\} _ { n = 1 } ^ { N }$ \nturn be used to form a Monte Carlo estimate for , ",
600
+ "bbox": [
601
+ 173,
602
+ 459,
603
+ 825,
604
+ 579
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "equation",
610
+ "img_path": "images/52b646502ec36ee715d1048153dc8b8976704256e2dce78be7427a03a796dd29.jpg",
611
+ "text": "$$\nP _ { k } \\approx \\hat { P } _ { k } \\triangleq \\frac { 1 } { N } \\sum _ { n = 1 } ^ { N } \\mathbb { 1 } _ { \\{ s ( \\mathbf { x } _ { n } ^ { ( k - 1 ) } ) \\geq L _ { k } \\} } \\quad \\mathrm { w h e r e } \\quad \\mathbf { x } _ { n } ^ { ( k - 1 ) } \\sim \\pi _ { k - 1 } ( \\cdot ) ,\n$$",
612
+ "text_format": "latex",
613
+ "bbox": [
614
+ 269,
615
+ 606,
616
+ 725,
617
+ 637
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "along with providing the initializations for the next level. Running more MH transitions decreases the correlations between the set of samples, improving the performance of the estimator. ",
624
+ "bbox": [
625
+ 173,
626
+ 664,
627
+ 823,
628
+ 693
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "We have thus far omitted to discuss how the levels $L _ { k }$ are set, other than asserting the need for the levels to be sufficiently close to allow reliable estimation of each $P _ { k }$ . Presuming that we are also free to choose the number of levels $K$ , there is inevitably a trade-off between ensuring that each $\\{ s ( X ) \\geq L _ { k } \\}$ is not rare given $\\{ s ( X ) \\geq L _ { k - 1 } \\}$ , and keeping the number of levels small to reduce computational costs and avoid the build-up of errors. AMLS (Guyader et al., 2011) builds on the basic multi-level splitting process, providing an elegant way of controlling this trade-off by adaptively selecting the level to be the minimum of 0 and some quantile of the property under the current samples. The approach terminates when the level reaches zero, such that $L _ { K } = 0$ and $K$ is a dynamic parameter chosen implicitly by the adaptive process. ",
635
+ "bbox": [
636
+ 173,
637
+ 696,
638
+ 825,
639
+ 821
640
+ ],
641
+ "page_idx": 4
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "Choosing the $\\rho$ th quantile of the values of the property results in discarding a fraction $( 1 - \\rho )$ of the chains at each step of the algorithm. This allows explicit control of the rarity of the events to keep them at a manageable level. We note that if all the sample property values are distinct, then this approach gives $P _ { k } = \\rho$ , $\\forall k < K$ . To give intuition to this, we can think about splitting up $\\log ( \\mathcal { T } )$ into chunks of size $\\log ( \\rho )$ . For any value of $\\log ( \\mathcal { T } )$ , there is always a unique pair of values $\\{ K , P _ { K } \\}$ such that $\\log ( \\mathbb { Z } ) = K \\log ( \\rho ) + \\log ( P _ { K } ) .$ , $K \\geq 0$ and $P _ { K } < \\rho$ . Therefore the problem of estimating $\\mathcal { T }$ is equivalent to that of estimating $K$ and $P _ { K }$ . ",
646
+ "bbox": [
647
+ 173,
648
+ 825,
649
+ 825,
650
+ 924
651
+ ],
652
+ "page_idx": 4
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "5.2 TERMINATION CRITERION ",
657
+ "text_level": 1,
658
+ "bbox": [
659
+ 174,
660
+ 103,
661
+ 397,
662
+ 117
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "The application of AMLS to our verification problem presents a significant complicating factor in that the true probability of our rare event might be exactly zero. Whenever this is the case, the basic AMLS approach outlined in (Guyader et al., 2011) will never terminate as the quantile of the property will never rise above zero; the algorithm simply produces closer and closer intermediate levels as it waits for the event to occur. ",
669
+ "bbox": [
670
+ 174,
671
+ 127,
672
+ 825,
673
+ 196
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "To deal with this, we introduce a termination criterion based on the observation that AMLS’s running estimate for $\\mathcal { T }$ monotonically decreases during running. Namely, we introduce a threshold probability, $P _ { \\mathrm { m i n } }$ , below which the estimates will be treated as being numerically zero. We then terminate the algorithm if $\\mathcal { T } < P _ { \\operatorname* { m i n } }$ and return $\\mathcal { T } = 0$ , safe in the knowledge that even if the algorithm would eventually generate a finite estimate for $\\mathcal { T }$ , this estimate is guaranteed to be less than $P _ { \\mathrm { m i n } }$ . ",
680
+ "bbox": [
681
+ 174,
682
+ 202,
683
+ 825,
684
+ 272
685
+ ],
686
+ "page_idx": 5
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Putting everything together, gives the complete method as shown in Algorithm 1. See Appendix B for low-level implementation details. ",
691
+ "bbox": [
692
+ 173,
693
+ 276,
694
+ 823,
695
+ 304
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "6 EXPERIMENTS ",
702
+ "text_level": 1,
703
+ "bbox": [
704
+ 174,
705
+ 324,
706
+ 326,
707
+ 340
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "6.1 EMULATION OF FORMAL VERIFICATION ",
714
+ "text_level": 1,
715
+ "bbox": [
716
+ 178,
717
+ 349,
718
+ 486,
719
+ 363
720
+ ],
721
+ "page_idx": 5
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "In our first experiment1, we aim to test whether our robustness estimation framework is able to effectively emulate formal verification approaches, while providing additional robustness information for SAT properties. In particular, we want to test whether it reliably identifies properties as being UNSAT, for which $\\mathcal { T } = 0$ , or SAT, for which $\\mathcal { T } > 0$ . We note that the method still provides a formal demonstration for SAT properties because having a non-zero estimate for $\\mathcal { T }$ indicates that at least one counterexample has been found. Critically, it further provides a measure for how robust SAT properties are, through its estimate for $\\mathcal { T }$ . ",
726
+ "bbox": [
727
+ 174,
728
+ 368,
729
+ 825,
730
+ 465
731
+ ],
732
+ "page_idx": 5
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "We used the COLLISIONDETECTION dataset introduced in the formal verification literature by (Ehlers, 2017). It consists of a neural network with six inputs that has been trained to classify two car trajectories as colliding or non-colliding. The architecture has 40 linear nodes in the first layer, followed by a layer of max pooling, a ReLU layer with 19 hidden units, and an output layer with 2 hidden units. Along with the dataset, 500 properties are specified for verification, of which 172 are SAT and 328 UNSAT. This dataset was chosen because the model is small enough so that the properties can be formally verified. These formal verification methods do not calculate the value of $\\mathcal { T }$ , but rather confirm the existence of a counterexample for which $s ( \\mathbf { x } ) > 0$ . ",
737
+ "bbox": [
738
+ 174,
739
+ 470,
740
+ 825,
741
+ 582
742
+ ],
743
+ "page_idx": 5
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "We ran our approach on all 500 properties, setting $\\rho = 0 . 1$ , $N = 1 0 ^ { 4 }$ , $M = 1 0 0 0$ (the choice of these hyperparameters will be justified in the next subsection), and using a uniform distribution over the input constraints as the perturbation model, along with a uniform random walk proposal. We compared our metric estimation approach against the naive Monte Carlo estimate using $1 0 ^ { 1 0 }$ samples. The generated estimates of $\\mathcal { T }$ for all SAT properties are shown in Figure 1a. ",
748
+ "bbox": [
749
+ 174,
750
+ 585,
751
+ 823,
752
+ 656
753
+ ],
754
+ "page_idx": 5
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "Both our approach and the naive MC baseline correctly identified all of the UNSAT properties by estimating $\\mathcal { T }$ as exactly zero. However, despite using substantially more samples, naive MC failed to find a counterexample for 8 of the rarest SAT properties, thereby identifying them as UNSAT, whereas our approach found a counterexample for all the SAT properties. As shown in Figure 1a, the variances in the estimates for $\\mathcal { T }$ of our approach were also very low and matched the unbiased MC baseline estimates for the more commonly violated properties, for which the latter approach still gives reliable, albeit less efficient, estimates. Along with the improved ability to predict rare events, our approach was also significantly faster than naive MC throughout, with a speed up of several orders of magnitude for properties where the event is not rare—a single run with naive MC took about 3 minutes, whereas a typical run of ours took around 3 seconds. ",
759
+ "bbox": [
760
+ 173,
761
+ 660,
762
+ 825,
763
+ 799
764
+ ],
765
+ "page_idx": 5
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "6.2 SENSITIVITY TO PARAMETER SETTINGS ",
770
+ "text_level": 1,
771
+ "bbox": [
772
+ 174,
773
+ 815,
774
+ 493,
775
+ 830
776
+ ],
777
+ "page_idx": 5
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "As demonstrated by Brehier et al. (2015), AMLS is unbiased under the assumption that perfect sam- ´ pling from the targets, $\\{ \\pi _ { k } \\} _ { k = 1 } ^ { K - 1 }$ , is possible, and that the cumulative distribution function of $s ( X )$ is continuous. In practice, finite mixing rates of the Markov chains and the dependence between the initialization points for each target means that sampling is less than perfect, but improves with larger values of $M$ and $N$ . The variance, on the other hand, theoretically strictly decreases with larger values of $N$ and $\\rho$ (Brehier et al., 2015). ´ ",
782
+ "bbox": [
783
+ 178,
784
+ 839,
785
+ 823,
786
+ 883
787
+ ],
788
+ "page_idx": 5
789
+ },
790
+ {
791
+ "type": "image",
792
+ "img_path": "images/91513f347ec2cf31b0a6f22246102991a12bbc154e6d294aa7c7e7d03c9e4118.jpg",
793
+ "image_caption": [
794
+ "Figure 1: (a) Estimate of $\\mathcal { T }$ for all SAT properties of COLLISIONDETECTION problem. Error bars indicating $\\pm$ three standard errors from 30 runs are included here and throughout, but the variance of the estimates was so small that these are barely visible. We can further conclude low bias of our method for the properties where naive MC estimation was feasible, due to the fact that naive MC produces unbiased (but potentially high variance) estimates. (b) Mean AMLS estimate relative to naive MC estimate for different $\\rho$ holding $M = 1 0 0 0$ fixed, for those properties with $\\log _ { 1 0 } \\mathcal { T } > - 6 . 5$ such that they could be estimated accurately. The bias decreases both as $\\rho$ and the rareness of the event decrease. (c) As per (b) but with varying $M$ and holding $\\rho = 0 . 1$ fixed. "
795
+ ],
796
+ "image_footnote": [],
797
+ "bbox": [
798
+ 181,
799
+ 104,
800
+ 810,
801
+ 266
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "",
808
+ "bbox": [
809
+ 174,
810
+ 397,
811
+ 825,
812
+ 439
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "In practice, we found that while larger values of $M$ and $N$ were always beneficial, setting $\\rho$ too high introduced biases into the estimate, with $\\rho = 0 . 1$ empirically providing a good trade-off between bias and variance. Furthermore, this provides faster run times than large values of $\\rho$ , noting that the smaller values of $\\rho$ lead to larger gaps in the levels. ",
819
+ "bbox": [
820
+ 174,
821
+ 444,
822
+ 825,
823
+ 500
824
+ ],
825
+ "page_idx": 6
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "To investigate the effect of the parameters more formally, we further ran AMLS on the SAT properties of COLLISIONDETECTION, varying $\\rho \\in \\{ 0 . 1 , 0 . 2 5 , 0 . 5 \\}$ , $N \\in \\{ 1 0 ^ { 3 } , 1 0 ^ { 4 } , 1 0 ^ { 5 } \\}$ and $\\mathsf { \\bar { M } } \\bar { \\in } \\{ 1 0 0 , 2 5 0 , 1 0 0 0 \\}$ , again comparing to the naive MC estimate for $1 0 ^ { 1 0 }$ samples. We found that the value of $N$ did not make a discernible difference in this range regardless of the values for $\\rho$ and $M$ , and thus all presented results correspond to setting $N = \\overline { { 1 0 ^ { 4 } } }$ . As shown in Figure 1b, we found that the setting of $\\rho$ made a noticeable difference to the estimates for the relatively rarer events. All the same, these differences were small relative to the differences between properties. As shown in Figure 1c, the value of $M$ made little difference when $\\rho = 0 . 1$ ,. Interesting though, we found that the value of $M$ was important for different values of $\\rho$ , as shown in Appendix C.1, with larger values of $M$ giving better results as expected. ",
830
+ "bbox": [
831
+ 174,
832
+ 505,
833
+ 825,
834
+ 643
835
+ ],
836
+ "page_idx": 6
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "6.3 CONVERGENCE WITH HIGHER-DIMENSIONAL INPUTS AND LARGER NETWORKS ",
841
+ "text_level": 1,
842
+ "bbox": [
843
+ 174,
844
+ 660,
845
+ 759,
846
+ 672
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "To validate the algorithm on a higher-dimensional problem, we first tested adversarial properties on the MNIST and CIFAR–10 datasets using a dense ReLU network with two hidden-layer of size 256. An $l _ { \\infty }$ -norm ball perturbation around the data point with width $\\epsilon$ was used as the uniform input model, with $\\epsilon = 1$ representing an $l _ { \\infty }$ -ball filling the entire space (the pixels are scaled to $[ 0 , 1 ] \\rangle$ , together with a uniform random walk MH proposal. After training the classifiers, multilevel splitting was run on ten samples from the test set at multiple values of $\\epsilon$ , with $N = 1 0 0 0 0$ and $\\rho = 0 . 1$ , and $M \\in \\{ 1 0 0 , 2 5 0 , 1 0 0 0 \\}$ for MNIST and $M \\in \\{ 1 0 0 , 2 5 0 , 5 0 0 , 1 0 0 0 , 2 0 0 0 \\}$ for CIFAR–10. The results for naive MC were also evaluated using $5 \\times 1 0 ^ { 9 }$ samples—less than the previous experiment as the larger network made estimation more expensive—in the cases where the event was not too rare. This took around twenty minutes per naive MC estimate, versus a few minutes for each AMLS estimate. ",
853
+ "bbox": [
854
+ 174,
855
+ 683,
856
+ 825,
857
+ 821
858
+ ],
859
+ "page_idx": 6
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "As the results were similar across datapoints, we present the result for a single example in the top two rows of Figure 2. As desired, a smooth curve is traced out as $\\epsilon$ decreases, for which the event $E$ becomes rarer. For MNIST, acceptable accuracy is obtained for $M = 2 5 0$ and high accuracy results for $M = 1 0 0 0$ . For CIFAR–10, which has about four times the input dimension of MNIST, larger values of $M$ were required to achieve comparable accuracy. The magnitude of $\\epsilon$ required to give a certain value of $\\log ( \\mathcal { T } )$ is smaller for CIFAR–10 than MNIST, reflecting that adversarial examples for the former are typically more perceptually similar to the datapoint. ",
864
+ "bbox": [
865
+ 174,
866
+ 827,
867
+ 825,
868
+ 924
869
+ ],
870
+ "page_idx": 6
871
+ },
872
+ {
873
+ "type": "image",
874
+ "img_path": "images/f1c93372546a0b2c3f4aa86b07ea649f365549350084e5a6c78717032e819855.jpg",
875
+ "image_caption": [
876
+ "Figure 2: [Left] Estimates for $\\mathcal { T }$ on adversarial properties of a single datapoint with $\\rho = 0 . 1$ , and $N ^ { ^ { - } } \\in \\{ 1 0 0 0 0 , 1 0 0 0 0 , 3 0 0 \\}$ for MNIST/CIFAR–10/CIFAR–100 respectively. As in Figure 1, the error bars from 30 runs are barely visible, highlighting a very low variance in the estimates, while the close matching to the naive MC estimates when $\\epsilon$ is large enough to make the latter viable, indicate a very low bias. For CIFAR–100 the error bars are shown for the naive estimates, as well, from 10 runs. [Right] The difference in the estimate for the other values of $M$ from $M \\in \\{ 1 0 0 0 , 2 0 0 0 , 2 0 0 0 \\}$ for MNIST/CIFAR–10/CIFAR–100, respectively. The estimate steadily converges as $M$ increases, with larger $M$ more important for rarer events. "
877
+ ],
878
+ "image_footnote": [],
879
+ "bbox": [
880
+ 187,
881
+ 103,
882
+ 821,
883
+ 583
884
+ ],
885
+ "page_idx": 7
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "To demonstrate that our approach can be employed on large networks, we tested adversarial properties on the CIFAR–100 dataset and a much larger DenseNet architecture (Huang et al., 2017a), with depth and growth-rate 40 (approximately $2 \\times 1 0 ^ { 6 }$ parameters). Due to the larger model size, we set $N = 3 0 0$ , the largest minibatch that could be held in memory (a larger $N$ could be used by looping over minibatches). The naive Monte Carlo estimates used $5 \\times 1 0 ^ { \\bar { 6 } }$ samples for about an hour of computation time per estimate, compared to between five to fifteen minutes for each AMLS estimate. The results are presented in the bottom row of Figure 2, showing that our algorithm agrees with the naive Monte Carlo estimate. ",
890
+ "bbox": [
891
+ 174,
892
+ 719,
893
+ 825,
894
+ 830
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "6.4 ROBUSTNESS OF PROVABLE DEFENSES DURING TRAINING ",
901
+ "text_level": 1,
902
+ "bbox": [
903
+ 174,
904
+ 845,
905
+ 614,
906
+ 858
907
+ ],
908
+ "page_idx": 7
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "We now examine how our robustness metric varies for a ReLU network as that network is trained to be more robust against norm bounded perturbations to the inputs using the method of Wong & Kolter (2018). Roughly speaking, their method works by approximating the set of outputs resulting from perturbations to an input with a convex outer bound, and minimizing the worst case loss over this set. The motivation for this experiment is twofold. Firstly, this training provides a series of networks with ostensibly increasing robustness, allowing us to check if our approach produces robustness estimates consistent with this improvement. Secondly, it allows us to investigate whether the training to improve robustness for one type of adversarial attack helps to protect against others. Specifically, whether training for small perturbation sizes improves robustness to larger perturbations. ",
913
+ "bbox": [
914
+ 174,
915
+ 867,
916
+ 823,
917
+ 924
918
+ ],
919
+ "page_idx": 7
920
+ },
921
+ {
922
+ "type": "image",
923
+ "img_path": "images/6bd9d43ef3cf2db172db1dce702caec2377b98c7c98cc1c7000f19a4874c4053.jpg",
924
+ "image_caption": [
925
+ "(a) Variation in $\\mathcal { T }$ during robustness training "
926
+ ],
927
+ "image_footnote": [],
928
+ "bbox": [
929
+ 191,
930
+ 116,
931
+ 467,
932
+ 275
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "image",
938
+ "img_path": "images/333e09f2c4bfdfe7850938524282bc5f8274a38bb1d37674b16c0e999bf2a78b.jpg",
939
+ "image_caption": [
940
+ "(b) Fraction of datapoints declared UNSAT ",
941
+ "Figure 3: (a) Variation in $\\mathcal { T }$ during the robustness training of on a CNN model for MNIST for three different perturbation sizes $\\epsilon$ . Epoch 0 corresponds to the network after conventional training, with further epochs corresponding to iterations of robustness training. The solid line indicates the median over 50 datapoints, and the limits of the shaded regions the 25 and 75 percentiles. Our measure is capped at $P _ { \\mathrm { m i n } } = \\exp ( - 2 5 0 )$ . We see that while training improves robustness for $\\epsilon = 0 . 2$ , the initial network is already predominantly robust to perturbations of size $\\epsilon = 0 . 1$ , while the robustness to perturbations of size $\\epsilon = 0 . 3$ actually starts to decrease after around 20 epochs. (b) Comparing the fraction of 50 datapoints for which Wong & Kolter (2018) produces a certificate-of-robustness for $\\epsilon = 0 . 1$ (“W&K”), versus the fraction of those samples for which ${ \\mathcal { T } } = P _ { \\operatorname* { m i n } }$ for $\\epsilon \\in \\{ 0 . 1 , 0 . 2 , 0 . 3 \\}$ (“AMLS”). Due to very heavy memory requirements, it was computationally infeasible to calculate certificates-of-robustness for $\\dot { \\epsilon } = \\{ 0 . 2 , 0 . 3 \\bar { \\} }$ , and $\\epsilon = 0 . 1$ before epoch 32 with the method of Wong & Kolter (2018). Our metric, however, suffers no such memory issues. "
942
+ ],
943
+ "image_footnote": [],
944
+ "bbox": [
945
+ 524,
946
+ 109,
947
+ 797,
948
+ 273
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "",
955
+ "bbox": [
956
+ 174,
957
+ 484,
958
+ 825,
959
+ 554
960
+ ],
961
+ "page_idx": 8
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "We train a CNN model on MNIST for 100 epochs with the standard cross-entropy loss, then train the network for a further 100 epochs using the robust loss of Wong & Kolter (2018), saving a snapshot of the model at each epoch. The architecture is the same as in (Wong & Kolter, 2018), containing two strided convolutional layers with 16 and 32 channels, followed by two fully connected layers with 100 and 10 hidden units, and ReLU activations throughout. The robustification phase trains the classifier to be robust in an $l _ { \\infty }$ $\\epsilon$ -ball around the inputs, where $\\epsilon$ is annealed from 0.01 to 0.1 over the first 50 epochs. At a number of epochs during the robust training, we calculate our robustness metric with $\\epsilon \\in \\{ 0 . 1 , 0 . 2 , 0 . 3 \\}$ on 50 samples from the test set. The results are summarized in Figure 3a with additional per-sample results in Appendix C.2. We see that our approach is able to capture variations in the robustnesses of the network. ",
966
+ "bbox": [
967
+ 173,
968
+ 559,
969
+ 825,
970
+ 696
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "As the method of Wong & Kolter (2018) returns the maximum value of the property for each sample over a convex outer bound on the perturbations, it is able to produce certificates-of-robustness for some datapoints. If the result returned is less than 0 then no adversarial examples exist in an $l _ { \\infty }$ ball of radius $\\epsilon$ around that datapoint. If the result returned is greater than 0, then the datapoint may or may not be robust in that $l _ { \\infty }$ ball, due to fact that it optimizes over an outer bound. ",
977
+ "bbox": [
978
+ 174,
979
+ 702,
980
+ 825,
981
+ 772
982
+ ],
983
+ "page_idx": 8
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Though we emphasize that the core aim of our approach is in providing richer information for SAT properties, this provides an opportunity to see how well it performs at establishing UNSAT properties relative to a more classical approach. To this end, we compared the fraction of the 50 samples from the test set that are verified by the method of Wong & Kolter (2018), to the fraction that have a negligible volume of adversarial examples, $\\mathcal { T } = P _ { \\operatorname* { m i n } }$ , in their $l _ { \\infty }$ $\\epsilon$ -ball neighbourhood. The results are presented in Figure 3b. ",
988
+ "bbox": [
989
+ 174,
990
+ 776,
991
+ 825,
992
+ 861
993
+ ],
994
+ "page_idx": 8
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "Our method forms an upper bound on the fraction of robust samples, which can be made arbitrarily tighter by taking $P _ { \\operatorname* { m i n } } \\to 0$ . Wong & Kolter (2018), on the other hand, forms a lower bound on the fraction of robust samples, where the tightness of the bound depends on the tightness of the convex outer bound, which is unknown and cannot be controlled. Though the true value must lie somewhere between the two bounds, our bound still holds physical meaning it its own right in a way that Wong & Kolter (2018) does not: it is the proportion of samples for which the prevalence of violations is less than an a given acceptable threshold $P _ { \\mathrm { m i n } }$ . ",
999
+ "bbox": [
1000
+ 174,
1001
+ 864,
1002
+ 823,
1003
+ 920
1004
+ ],
1005
+ "page_idx": 8
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "",
1010
+ "bbox": [
1011
+ 176,
1012
+ 103,
1013
+ 823,
1014
+ 146
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "This experiment also highlights an important shortcoming of Wong & Kolter (2018). The memory usage of their procedure depends on how many ReLU activations cross their threshold over perturbations. This is high during initial training for $\\epsilon = 0 . 1$ and indeed the reason why the training procedure starts from $\\epsilon = 0 . 0 1$ and gradually anneals to $\\epsilon = 0 . 1$ . The result is that it is infeasible (the GPU memory is exhausted)—even for this relatively small model—to calculate the maximum value of the property on the convex outer bound for $\\epsilon \\in \\{ 0 . 2 , 0 . 3 \\}$ at all epochs, and $\\epsilon = 0 . 1$ for epochs before 32. Even in this restricted setting where our metric has been reduced to a binary one, it appears to be more informative than that of Wong & Kolter (2018) for this reason. ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 150,
1024
+ 825,
1025
+ 261
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "7 DISCUSSION ",
1032
+ "text_level": 1,
1033
+ "bbox": [
1034
+ 174,
1035
+ 273,
1036
+ 310,
1037
+ 290
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "We have introduced a new measure for the intrinsic robustness of a neural network, and have validated its utility on several datasets from the formal verification and deep learning literatures. Our approach was able to exactly emulate formal verification approaches for satisfiable properties and provide high confidence, accurate predictions for properties which were not. The two key advantages it provides over previous approaches are: a) providing an explicit and intuitive measure for how robust networks are to satisfiable properties; and b) providing improved scaling over classical approaches for identifying unsatisfiable properties. ",
1044
+ "bbox": [
1045
+ 174,
1046
+ 297,
1047
+ 825,
1048
+ 396
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "Despite providing a more informative measure of how robust a neural network is, our approach may not be appropriate in all circumstances. In situations where there is an explicit and effective adversary, instead of inputs being generated by chance, we may care more about how far away the single closest counterexample is to the input, rather than the general prevalence of counterexamples. Here our method may fail to find counterexamples because they reside on a subset with probability less than $P _ { \\mathrm { m i n } }$ ; the counterexamples may even reside on a subset of the input space with measure zero with respect to the input distribution. On the other hand, there are many practical scenarios, such as those discussed in the introduction, where either it is unrealistic for there to be no counterexamples close to the input, the network (or input space) is too large to realistically permit formal verification, or where potential counterexamples are generated by chance rather than by an adversary. We believe that for these scenarios our approach offers significant advantages to formal verification approaches. ",
1055
+ "bbox": [
1056
+ 174,
1057
+ 400,
1058
+ 825,
1059
+ 553
1060
+ ],
1061
+ "page_idx": 9
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "Going forward, one way the efficiency of our approach could be improved further is by using a more efficient base MCMC kernel in our AMLS estimator, that is, replace line 12 in Algorithm 1 with a more efficient base inference scheme. The current MH scheme was chosen on the basis of simplicity and the fact it already gave effective empirical performance. However, using more advanced inference approaches, such as gradient-based approaches like Langevin Monte Carlo (LMC) (Rossky et al., 1978) and Hamiltonian Monte Carlo (Neal, 2011), could provide significant speedups by improving the mixing of the Markov chains, thereby reducing the number of required MCMC transitions. ",
1066
+ "bbox": [
1067
+ 174,
1068
+ 558,
1069
+ 823,
1070
+ 667
1071
+ ],
1072
+ "page_idx": 9
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "ACKNOWLEDGMENTS ",
1077
+ "text_level": 1,
1078
+ "bbox": [
1079
+ 176,
1080
+ 683,
1081
+ 326,
1082
+ 695
1083
+ ],
1084
+ "page_idx": 9
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "We gratefully acknowledge Sebastian Nowozin for suggesting to us to apply multilevel splitting to the problem of estimating neural network robustness. We also thank Rudy Bunel for his help with the COLLISIONDETECTION dataset, and Leonard Berrada for supplying a pretrained DenseNet model. ",
1089
+ "bbox": [
1090
+ 176,
1091
+ 703,
1092
+ 821,
1093
+ 746
1094
+ ],
1095
+ "page_idx": 9
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "SW gratefully acknowledges support from the EPSRC AIMS CDT through grant EP/L015987/2. TR and YWT are supported in part by the European Research Council under the European Unions Seventh Framework Programme (FP7/20072013) / ERC grant agreement no. 617071. TR further acknowledges support of the ERC StG IDIU. MPK is supported by EPSRC grants EP/P020658/1 and TU/B/000048. ",
1100
+ "bbox": [
1101
+ 174,
1102
+ 750,
1103
+ 825,
1104
+ 819
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "REFERENCES ",
1111
+ "text_level": 1,
1112
+ "bbox": [
1113
+ 176,
1114
+ 102,
1115
+ 287,
1116
+ 118
1117
+ ],
1118
+ "page_idx": 10
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Charles-Edouard Brehier, Tony Leli ´ evre, and Mathias Rousset. Analysis of adaptive multilevel \\` splitting algorithms in an idealized case. ESAIM: Probability and Statistics, 19:361–394, 2015. ",
1123
+ "bbox": [
1124
+ 173,
1125
+ 126,
1126
+ 823,
1127
+ 155
1128
+ ],
1129
+ "page_idx": 10
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Rudy Bunel, Ilker Turkaslan, Philip H.S. Torr, Pushmeet Kohli, and M. Pawan Kumar. A unified view of piecewise linear neural network verification. arXiv preprint arXiv:1711.00455v3 [cs.AI], 2018. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 164,
1137
+ 823,
1138
+ 207
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Chih-Hong Cheng, Georg Nuhrenberg, and Harald Ruess. Verification of binarized neural networks. ¨ arXiv preprint arXiv:1710.03107, 2017. ",
1145
+ "bbox": [
1146
+ 171,
1147
+ 217,
1148
+ 823,
1149
+ 246
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Pieter-Tjerk De Boer, Dirk P Kroese, Shie Mannor, and Reuven Y Rubinstein. A tutorial on the cross-entropy method. Annals of operations research, 134(1):19–67, 2005. ",
1156
+ "bbox": [
1157
+ 171,
1158
+ 256,
1159
+ 823,
1160
+ 285
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Ruediger Ehlers. Formal verification of piece-wise linear feed-forward neural networks. In International Symposium on Automated Technology for Verification and Analysis, pp. 269–286. Springer, 2017. ",
1167
+ "bbox": [
1168
+ 173,
1169
+ 294,
1170
+ 825,
1171
+ 337
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin Vechev. Ai 2: Safety and robustness certification of neural networks with abstract interpretation. In Security and Privacy (SP), 2018 IEEE Symposium on, 2018. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 347,
1181
+ 825,
1182
+ 390
1183
+ ],
1184
+ "page_idx": 10
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Walter R Gilks, Sylvia Richardson, and David Spiegelhalter. Markov chain Monte Carlo in practice. Chapman and Hall/CRC, 1995. ",
1189
+ "bbox": [
1190
+ 174,
1191
+ 398,
1192
+ 823,
1193
+ 429
1194
+ ],
1195
+ "page_idx": 10
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Ian Goodfellow. Gradient masking causes clever to overestimate adversarial perturbation size. arXiv preprint arXiv:1804.07870, 2018. ",
1200
+ "bbox": [
1201
+ 171,
1202
+ 439,
1203
+ 823,
1204
+ 468
1205
+ ],
1206
+ "page_idx": 10
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2015. ",
1211
+ "bbox": [
1212
+ 169,
1213
+ 477,
1214
+ 825,
1215
+ 507
1216
+ ],
1217
+ "page_idx": 10
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Arnaud Guyader, Nicolas Hengartner, and Eric Matzner-Løber. Simulation and estimation of extreme quantiles and extreme probabilities. Applied Mathematics & Optimization, 64(2):171–196, 2011. ",
1222
+ "bbox": [
1223
+ 173,
1224
+ 515,
1225
+ 825,
1226
+ 559
1227
+ ],
1228
+ "page_idx": 10
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017a. ",
1233
+ "bbox": [
1234
+ 173,
1235
+ 568,
1236
+ 823,
1237
+ 598
1238
+ ],
1239
+ "page_idx": 10
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. arXiv preprint arXiv:1702.02284, 2017b. ",
1244
+ "bbox": [
1245
+ 174,
1246
+ 607,
1247
+ 821,
1248
+ 637
1249
+ ],
1250
+ "page_idx": 10
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Xiaowei Huang, Marta Kwiatkowska, Sen Wang, and Min Wu. Safety verification of deep neural networks. In International Conference on Computer Aided Verification, pp. 3–29. Springer, 2017c. ",
1255
+ "bbox": [
1256
+ 174,
1257
+ 645,
1258
+ 825,
1259
+ 689
1260
+ ],
1261
+ "page_idx": 10
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "H. Kahn and T.E. Harris. Estimation of particle transmission by random sampling. National Bureau of Standards applied mathematics series, 12:27–30, 1951. ",
1266
+ "bbox": [
1267
+ 173,
1268
+ 699,
1269
+ 825,
1270
+ 728
1271
+ ],
1272
+ "page_idx": 10
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Guy Katz, Clark Barrett, David L Dill, Kyle Julian, and Mykel J Kochenderfer. Reluplex: An efficient smt solver for verifying deep neural networks. In International Conference on Computer Aided Verification, pp. 97–117. Springer, 2017. ",
1277
+ "bbox": [
1278
+ 173,
1279
+ 737,
1280
+ 825,
1281
+ 781
1282
+ ],
1283
+ "page_idx": 10
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Yen-Chen Lin, Zhang-Wei Hong, Yuan-Hong Liao, Meng-Li Shih, Ming-Yu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. arXiv preprint arXiv:1703.06748, 2017. ",
1288
+ "bbox": [
1289
+ 174,
1290
+ 790,
1291
+ 823,
1292
+ 833
1293
+ ],
1294
+ "page_idx": 10
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. ",
1299
+ "bbox": [
1300
+ 174,
1301
+ 842,
1302
+ 823,
1303
+ 885
1304
+ ],
1305
+ "page_idx": 10
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Radford M Neal. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011. ",
1310
+ "bbox": [
1311
+ 174,
1312
+ 895,
1313
+ 821,
1314
+ 924
1315
+ ],
1316
+ "page_idx": 10
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Sebastian Nowozin. Multilevel splitting. http://www.nowozin.net/sebastian/blog/ multilevel-splitting.html, 2015. ",
1321
+ "bbox": [
1322
+ 173,
1323
+ 103,
1324
+ 823,
1325
+ 132
1326
+ ],
1327
+ "page_idx": 11
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Luca Pulina and Armando Tacchella. An abstraction-refinement approach to verification of artificial neural networks. In International Conference on Computer Aided Verification, pp. 243–257. Springer, 2010. ",
1332
+ "bbox": [
1333
+ 176,
1334
+ 141,
1335
+ 823,
1336
+ 184
1337
+ ],
1338
+ "page_idx": 11
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "Gareth O Roberts, Andrew Gelman, Walter R Gilks, et al. Weak convergence and optimal scaling of random walk metropolis algorithms. The annals of applied probability, 7(1):110–120, 1997. ",
1343
+ "bbox": [
1344
+ 171,
1345
+ 193,
1346
+ 823,
1347
+ 222
1348
+ ],
1349
+ "page_idx": 11
1350
+ },
1351
+ {
1352
+ "type": "text",
1353
+ "text": "PJ Rossky, JD Doll, and HL Friedman. Brownian dynamics as smart monte carlo simulation. The Journal of Chemical Physics, 69(10):4628–4633, 1978. ",
1354
+ "bbox": [
1355
+ 173,
1356
+ 231,
1357
+ 823,
1358
+ 260
1359
+ ],
1360
+ "page_idx": 11
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "Reuven Y Rubinstein. Optimization of computer simulation models with rare events. European Journal of Operational Research, 99(1):89–112, 1997. ",
1365
+ "bbox": [
1366
+ 171,
1367
+ 268,
1368
+ 823,
1369
+ 297
1370
+ ],
1371
+ "page_idx": 11
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. ",
1376
+ "bbox": [
1377
+ 171,
1378
+ 305,
1379
+ 823,
1380
+ 335
1381
+ ],
1382
+ "page_idx": 11
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "Jonathan Uesato, Ananya Kumar, Csaba Szepesvari, Tom Erez, Avraham Ruderman, Keith Anderson, Krishnamurthy (Dj) Dvijotham, Nicolas Heess, and Pushmeet Kohli. Rigorous agent evaluation: An adversarial approach to uncover catastrophic failures. In International Conference on Learning Representations, 2019. ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 343,
1390
+ 825,
1391
+ 400
1392
+ ],
1393
+ "page_idx": 11
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "Tsui-Wei Weng, Huan Zhang, Hongge Chen, Zhao Song, Cho-Jui Hsieh, Duane Boning, Inderjit S Dhillon, and Luca Daniel. Towards fast computation of certified robustness for relu networks. arXiv preprint arXiv:1804.09699, 2018a. ",
1398
+ "bbox": [
1399
+ 174,
1400
+ 409,
1401
+ 825,
1402
+ 452
1403
+ ],
1404
+ "page_idx": 11
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "Tsui-Wei Weng, Huan Zhang, Pin-Yu Chen, Jinfeng Yi, Dong Su, Yupeng Gao, Cho-Jui Hsieh, and Luca Daniel. Evaluating the robustness of neural networks: An extreme value theory approach. arXiv preprint arXiv:1801.10578, 2018b. ",
1409
+ "bbox": [
1410
+ 174,
1411
+ 460,
1412
+ 825,
1413
+ 503
1414
+ ],
1415
+ "page_idx": 11
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "Eric Wong and Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. In International Conference on Machine Learning, pp. 5283–5292, 2018. ",
1420
+ "bbox": [
1421
+ 171,
1422
+ 511,
1423
+ 825,
1424
+ 541
1425
+ ],
1426
+ "page_idx": 11
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "Weiming Xiang, Hoang-Dung Tran, and Taylor T Johnson. Output reachable set estimation and verification for multilayer neural networks. IEEE transactions on neural networks and learning systems, (99):1–7, 2018. ",
1431
+ "bbox": [
1432
+ 173,
1433
+ 549,
1434
+ 825,
1435
+ 592
1436
+ ],
1437
+ "page_idx": 11
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "Radosiaw R Zakrzewski. Verification of a trained neural network accuracy. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on, volume 3, pp. 1657–1662. IEEE, 2001. ",
1442
+ "bbox": [
1443
+ 173,
1444
+ 602,
1445
+ 823,
1446
+ 645
1447
+ ],
1448
+ "page_idx": 11
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "APPENDIX ",
1453
+ "text_level": 1,
1454
+ "bbox": [
1455
+ 176,
1456
+ 103,
1457
+ 263,
1458
+ 117
1459
+ ],
1460
+ "page_idx": 12
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "A METROPOLIS–HASTINGS ",
1465
+ "text_level": 1,
1466
+ "bbox": [
1467
+ 176,
1468
+ 130,
1469
+ 379,
1470
+ 145
1471
+ ],
1472
+ "page_idx": 12
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Metropolis–Hastings (MH) is an MCMC method that allows for sampling when one only has access to an unnormalized version of the target distribution (Gilks et al., 1995). At a high-level, one attempts iteratively proposes local moves from the current location of a sampler and then accepts or rejects this move based on the unnormalized density. Each iteration of this process is known as a MH transition. ",
1477
+ "bbox": [
1478
+ 173,
1479
+ 154,
1480
+ 825,
1481
+ 224
1482
+ ],
1483
+ "page_idx": 12
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "The unnormalized targets distributions of interest for our problem are $\\gamma _ { k } ( { \\bf x } )$ where ",
1488
+ "bbox": [
1489
+ 178,
1490
+ 228,
1491
+ 717,
1492
+ 243
1493
+ ],
1494
+ "page_idx": 12
1495
+ },
1496
+ {
1497
+ "type": "equation",
1498
+ "img_path": "images/4065acd2c67839128b60e9e168d0ac71169201bb3745fbe1f678de7d326185c8.jpg",
1499
+ "text": "$$\n\\pi _ { k } ( \\mathbf { x } ) \\propto \\gamma _ { k } ( \\mathbf { x } ) = p ( \\mathbf { x } ) \\mathbb { 1 } _ { \\{ s ( \\mathbf { x } ) \\geq L _ { k } \\} } , \\quad k = 1 , 2 , \\ldots , K .\n$$",
1500
+ "text_format": "latex",
1501
+ "bbox": [
1502
+ 316,
1503
+ 250,
1504
+ 681,
1505
+ 268
1506
+ ],
1507
+ "page_idx": 12
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "A MH transition now consists of proposing a new sample using a proposal $\\mathbf { x } ^ { \\prime } \\sim g ( \\mathbf { x } ^ { \\prime } \\mid \\mathbf { x } )$ , where $\\mathbf { x }$ indicates the current state of the sampler and $\\mathbf { x } ^ { \\prime }$ the proposed state, calculating an acceptance probability, ",
1512
+ "bbox": [
1513
+ 174,
1514
+ 275,
1515
+ 826,
1516
+ 318
1517
+ ],
1518
+ "page_idx": 12
1519
+ },
1520
+ {
1521
+ "type": "equation",
1522
+ "img_path": "images/cd7e3a803a07b7347e19be42ce25137d5b4eba6f1eb47943a6af2e8ef5f7e5b0.jpg",
1523
+ "text": "$$\nA _ { k } ( \\mathbf { x } ^ { \\prime } \\mid \\mathbf { x } ) \\triangleq \\operatorname* { m i n } \\left\\{ 1 , { \\frac { \\gamma _ { k } ( \\mathbf { x } ^ { \\prime } ) g ( \\mathbf { x } \\mid \\mathbf { x } ^ { \\prime } ) } { \\gamma _ { k } ( \\mathbf { x } ) g ( \\mathbf { x } ^ { \\prime } \\mid \\mathbf { x } ) } } \\right\\} ,\n$$",
1524
+ "text_format": "latex",
1525
+ "bbox": [
1526
+ 357,
1527
+ 324,
1528
+ 637,
1529
+ 359
1530
+ ],
1531
+ "page_idx": 12
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "and accepting the new sample with probability $A _ { k } ( \\mathbf { x } ^ { \\prime } \\mid \\mathbf { x } )$ , returning the old sample if the new one is rejected. The proposal, $g ( \\mathbf { x } ^ { \\prime } \\mid \\mathbf { x } )$ , is a conditional distribution, such as a normal distribution centred at $\\mathbf { x }$ with fixed covariance matrix. Successive applications of this transition process generates samples which converge in distribution to the target $\\pi _ { k } ( { \\bf x } )$ and whose correlation with the starting sample diminishes to zero. ",
1536
+ "bbox": [
1537
+ 174,
1538
+ 364,
1539
+ 825,
1540
+ 435
1541
+ ],
1542
+ "page_idx": 12
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "In our approach, these MH steps are applied independently to each sample in the set, while the only samples used for the AMLS algorithm are the final samples produced from the resulting Markov chains. ",
1547
+ "bbox": [
1548
+ 176,
1549
+ 439,
1550
+ 823,
1551
+ 481
1552
+ ],
1553
+ "page_idx": 12
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "B IMPLEMENTATION DETAILS ",
1558
+ "text_level": 1,
1559
+ "bbox": [
1560
+ 176,
1561
+ 496,
1562
+ 395,
1563
+ 511
1564
+ ],
1565
+ "page_idx": 12
1566
+ },
1567
+ {
1568
+ "type": "text",
1569
+ "text": "Algorithm 1 has computational cost $O ( N M K )$ , where the number of levels $K$ will depend on the rareness of the event, with more computation required for rarer ones. Parallelization over $N$ is possible provided that the batches fit into memory, whereas the loops over $M$ and $K$ must be performed sequentially. ",
1570
+ "bbox": [
1571
+ 174,
1572
+ 518,
1573
+ 825,
1574
+ 575
1575
+ ],
1576
+ "page_idx": 12
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "One additional change we make from the approach outlined by Guyader et al. (2011) is that we perform MH updates on all chains in Lines 12, rather than only those that were previously killed off. This helps reduce the build up of correlations over multiple levels, improving performance. ",
1581
+ "bbox": [
1582
+ 176,
1583
+ 580,
1584
+ 823,
1585
+ 622
1586
+ ],
1587
+ "page_idx": 12
1588
+ },
1589
+ {
1590
+ "type": "text",
1591
+ "text": "Another is that we used an adaptive scheme for $g ( \\mathbf { x } ^ { \\prime } | \\mathbf { x } )$ to aid efficiency. Specifically, our proposal takes the form of a random walk, the radius of which, $\\epsilon ^ { \\prime }$ , is adapted to keep the acceptance ratio roughly around 0.234 (see Roberts et al. (1997)). Each chain has a separate acceptance ratio that is average across MH steps, and after $M$ MH steps, for those chains whose acceptance ratio is below 0.234 it is halved, and conversely for those above 0.234, multiplied by 1.02. ",
1592
+ "bbox": [
1593
+ 174,
1594
+ 626,
1595
+ 825,
1596
+ 696
1597
+ ],
1598
+ "page_idx": 12
1599
+ },
1600
+ {
1601
+ "type": "text",
1602
+ "text": "C ADDITIONAL RESULTS ",
1603
+ "text_level": 1,
1604
+ "bbox": [
1605
+ 174,
1606
+ 710,
1607
+ 359,
1608
+ 724
1609
+ ],
1610
+ "page_idx": 12
1611
+ },
1612
+ {
1613
+ "type": "text",
1614
+ "text": "C.1 VARYING $M$ FOR FIXED $\\rho$ ON COLLISIONDETECTION ",
1615
+ "text_level": 1,
1616
+ "bbox": [
1617
+ 174,
1618
+ 734,
1619
+ 583,
1620
+ 750
1621
+ ],
1622
+ "page_idx": 12
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "Whereas the exact value of $M$ within the range considered proved to not be especially important when $\\rho = 0 . 1$ , it transpires to have a large impact in the quality of the results for larger values of $\\rho$ as shown in Figure 4. ",
1627
+ "bbox": [
1628
+ 176,
1629
+ 756,
1630
+ 825,
1631
+ 799
1632
+ ],
1633
+ "page_idx": 12
1634
+ },
1635
+ {
1636
+ "type": "text",
1637
+ "text": "C.2 PER-SAMPLE ROBUSTNESS MEASURE DURING ROBUST TRAINING ",
1638
+ "text_level": 1,
1639
+ "bbox": [
1640
+ 176,
1641
+ 811,
1642
+ 668,
1643
+ 825
1644
+ ],
1645
+ "page_idx": 12
1646
+ },
1647
+ {
1648
+ "type": "text",
1649
+ "text": "Figure 5 illustrates the diverse forms that the per-sample robustness measure can take on the 40 datapoints averaged over in Experiment $\\ S 5 . 3$ . We see that different datapoints have quite varying initial levels of robustness, and that the training helps with some points more than others. In one case, the datapoint was still not robust add the end of training for the target perturbation size $\\epsilon = 0 . 1$ . ",
1650
+ "bbox": [
1651
+ 174,
1652
+ 833,
1653
+ 825,
1654
+ 888
1655
+ ],
1656
+ "page_idx": 12
1657
+ },
1658
+ {
1659
+ "type": "image",
1660
+ "img_path": "images/6568e0428774ba5c2f2a3ea350da24301a3337f4f571146783a9fe5d1f54a75d.jpg",
1661
+ "image_caption": [
1662
+ "Figure 4: Mean AMLS estimate relative to naive (unbiased) MC estimate for different $M =$ holding $\\rho$ fixed to 0.25 (left) and 0.5 (right), for those properties whose naive MC estimate was greater than $\\log _ { 1 0 } \\mathcal { T } = - 6 . 5$ such that they could be estimated accurately. "
1663
+ ],
1664
+ "image_footnote": [],
1665
+ "bbox": [
1666
+ 178,
1667
+ 381,
1668
+ 805,
1669
+ 587
1670
+ ],
1671
+ "page_idx": 13
1672
+ },
1673
+ {
1674
+ "type": "image",
1675
+ "img_path": "images/2b16c5f2276b7f993a087c8054a28c33b20f273cb4548f4a62e36fa107baf5eb.jpg",
1676
+ "image_caption": [
1677
+ "Figure 5: Convergence of individual datapoints used in forming Figure 3. "
1678
+ ],
1679
+ "image_footnote": [],
1680
+ "bbox": [
1681
+ 178,
1682
+ 200,
1683
+ 818,
1684
+ 795
1685
+ ],
1686
+ "page_idx": 14
1687
+ }
1688
+ ]
parse/train/S1xcx3C5FX/S1xcx3C5FX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1xcx3C5FX/S1xcx3C5FX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJe3HiC5KX/SJe3HiC5KX.md ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING FACTORIZED REPRESENTATIONS FOR OPEN-SET DOMAIN ADAPTATION
2
+
3
+ Mahsa Baktashmotlagh Masoud Faraki∗ University of Queensland Monash University
4
+
5
+ Tom Drummond\* Monash University
6
+
7
+ Mathieu Salzmann EPFL
8
+
9
+ # ABSTRACT
10
+
11
+ Domain adaptation for visual recognition has undergone great progress in the past few years. Nevertheless, most existing methods work in the so-called closed-set scenario, assuming that the classes depicted by the target images are exactly the same as those of the source domain. In this paper, we tackle the more challenging, yet more realistic case of open-set domain adaptation, where new, unknown classes can be present in the target data. While, in the unsupervised scenario, one cannot expect to be able to identify each specific new class, we aim to automatically detect which samples belong to these new classes and discard them from the recognition process. To this end, we rely on the intuition that the source and target samples depicting the known classes can be generated by a shared subspace, whereas the target samples from unknown classes come from a different, private subspace. We therefore introduce a framework that factorizes the data into shared and private parts, while encouraging the shared representation to be discriminative. Our experiments on standard benchmarks evidence that our approach outperforms the state of the art in open-set domain adaptation.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ In many practical machine learning scenarios, the test samples are drawn from a different distribution from the training ones, due to varying acquisition conditions, such as different data sources, illumination conditions and cameras, in the context of visual recognition. Over the years, great progress has been achieved to tackle this problem, known has the domain shift. In particular, many methods aim to align the source (i.e., training) and target (i.e., test) distributions by learning domaininvariant embeddings (Pan et al., 2011; Gong et al., 2012; Fernando et al., 2013; Sun et al., 2016), the most recent approaches relying on deep networks (Ganin & Lempitsky, 2014; Long et al., 2015; Bousmalis et al., 2016; Tzeng et al., 2017; Long et al., 2016a; Yan et al., 2017).
16
+
17
+ While effective, these methods work under the assumption that the source and target data contain exactly the same classes. In practice, however, this assumption may easily be violated, as the target data will often contain additional classes that were not present within the source data. For example, when training a model to recognize office objects from images, as with the popular Office dataset (Saenko et al., 2010), one should still expect to see new objects, unobserved during training, when deploying the model in the real world. While one should not expect the model to recognize the specific class of such objects, at least in unsupervised domain adaptation where no target labels are provided, it would nonetheless be beneficial to identify these objects as unknown instead of misclassifying them. This was the task addressed by Busto & Gall (2017) in their so-called open-set domain adaptation approach. This method aims to learn a mapping from the source samples to a subset of the target ones corresponding to those identified as coming from known classes. While reasonably effective, this procedure involves alternatively solving for the mapping and the assignment of the samples to known/unknown classes, which, as shown in our experiments, can be costly. Recently, Saito et al. (2018) introduced a deep learning framework for open-set domain adaptation, relying on adversarial training to separate the samples from the known classes from the unknown ones.
18
+
19
+ In this paper, we introduce a novel approach to open-set domain adaptation based on learning a factorized representation of the source and target data. In essence, we seek to model the samples from the known classes with a low-dimensional subspace, shared by the source and target domains, and the target samples from unknown classes with another subspace, specific to the target domain. We then make use of group sparsity to encourage each target sample to be reconstructed by only one of these subspaces, which in turns lets us identify if this sample corresponds to a known or unknown class. We further show that we can obtain a more discriminative shared representation by jointly learning a linear classifier within our framework. Ultimately, our approach therefore allows us to jointly separate the target samples between known and unknown classes and represent the source and target samples within a consistent, shared latent space. Note that our approach is more intuitive than (Bousmalis et al., 2016) for the open-set DA scenario in the sense that we model each target sample as being generated by either the shared subspace or the private one, which is crucial to identify the target samples depicting unknown classes. By contrast, in (Bousmalis et al., 2016), each sample is encoded as a mixture of shared and private representations, which does not provide information to discriminate samples from unknown classes.
20
+
21
+ We demonstrate the effectiveness of our approach on several open-set domain adaptation benchmarks for visual object recognition. Our method consistently and significantly outperforms the technique of Busto & Gall (2017) on all benchmarks, as well as the end-to-end learning approach of Saito et al. (2018) on the Office dataset, thus showing the benefits of learning shared and private representations corresponding to the known and unknown classes, respectively. Furthermore, it is faster than the algorithm of Busto & Gall (2017) by an order of magnitude.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Domain adaptation for visual recognition has become increasingly popular over the past few years, in large part thanks to the benchmark Office dataset of Saenko et al. (2010). A natural approach to tackling the domain shift consists of learning a transformation of the data such that the distributions of the source and target samples are as similar as possible in the resulting space (Baktashmotlagh et al., 2014; 2013; Sun et al., 2016). Instead of learning a transformation of the data, other methods have been proposed to re-weight the source samples, so as to rely more strongly on those that look similar to the target ones (Quiñonero C. et al., 2009; Gong et al., 2013).
26
+
27
+ With the advent of deep learning for visual recognition, domain adaptation research also eventually turned to exploiting deep networks. While it was initially shown that deep features were more robust than handcrafted ones to the domain shift (Donahue et al., 2013), translating the abovementioned distribution-matching ideas to end-to-end learning proved even more effective (Tzeng et al., 2014; Long et al., 2015; 2016b; Rozantsev et al., 2018; Sun & Saenko, 2016). In this context, other ideas were introduced, such as learning intermediate representations to interpolate between the source and target domains (Chopra S. & R., 2013; Tzeng et al., 2015), the use of adversarial domain classifiers (Ganin & Lempitsky, 2014; Tzeng et al., 2017), and additional reconstruction loss terms (Ghifary et al., 2016).
28
+
29
+ Despite achieving great progress to tackle the domain shift, all the aforementioned methods are designed for the closed-set scenario, where the source and target data depict the exact same set of classes. Inspired by recent advances in open-set recognition (Bendale & Boult, 2015; Scheirer et al., 2014), the work of Busto & Gall (2017) constitutes the first attempt to address the more realistic case where the target data contains samples from new, unknown classes. To achieve this, Busto & Gall (2017) proposed to jointly learn the assignments of the target samples to known/unknown classes and a mapping from the source data to the target samples depicting known classes. The resulting learning problem was solved by alternatively optimizing for the assignments and for the mapping, which can be costly. Very recently, a deep learning approach was proposed for open-set domain adaptation (Saito et al., 2018), relying on adversarial training to separate the unknown target samples from the known ones.
30
+
31
+ Here, we introduce a new solution to the open-set domain adaptation problem, where we model the source and target data with subspaces. Subspace-based representations have proven effective for domain adaptation (Gong et al., 2012; Gopalan et al., 2014; Fernando et al., 2013). Here, however, we exploit them in a different manner, based on the intuition that source samples and target samples from the known classes can be generated by a shared subspace, whereas target samples from unknown classes come from a private subspace. While the notion of shared-private representations has been exploited in the past, e.g., for multiview learning (Jia et al., 2010) and for closed-set domain adaptation (Bousmalis et al., 2016), the resulting techniques all use them to encode each sample as a mixture of shared and private information. By contrast, here, we aim to model each target sample as being generated by either the shared subspace or the private one, which is crucial to identify the target samples depicting unknown classes.
32
+
33
+ Our experiments evidence that our open-set domain adaptation approach, based on shared-private representations, is more effective than the one of Busto & Gall (2017), consistently outperforming it on several datasets, and also faster by an order of magnitude. We also outperform the recent deep learning open-set domain adaptation framework of Saito et al. (2018) on the Office benchmark.
34
+
35
+ # 3 OUR APPROACH
36
+
37
+ The key idea behind our formulation is to find low-dimensional representations of the data, factorized into a subspace shared by the source samples and the target ones coming from known classes and another subspace specific to the target samples from unknown classes. Note that, when referring to target samples from known classes, we do not mean that these samples are labeled, but rather that they belong to the same set of classes as the source data. As a matter of fact, throughout the paper, we focus on the unsupervised domain adaptation scenario, where no target annotations are provided. In the remainder of this section, we first introduce the optimization problem at the heart of our approach, and then discuss two extensions of this basic formulation.
38
+
39
+ # 3.1 FRODA: FACTORIZED REPRESENTATIONS FOR OPEN-SET DOMAIN ADAPTATION
40
+
41
+ Given $n _ { s }$ source samples, grouped in a matrix $\pmb { X } _ { s } \in \mathbb { R } ^ { D \times n _ { s } }$ and $n _ { t }$ target samples represented by $\pmb { X } _ { t } \in \mathbb { R } ^ { D \times n _ { t } }$ , our goal is to estimate a low-dimensional representation of each sample, such that the source and target samples coming from the same classes are generated by a shared subspace, whereas the target data from new, unknown classes are generated by a different, specific subspace. To this end, let $V \in \mathbb { R } ^ { D \times d }$ be the matrix encoding the shared subspace, with $d \ll D$ , and $\boldsymbol { U } \in$ $\mathbb { R } ^ { D \times d }$ the one representing the private subspace. A naive approach to finding the low-dimensional representations of the data would involve solving
42
+
43
+ $$
44
+ \operatorname* { m i n } _ { U , T , V , S } \quad \| X _ { t } - B T \| _ { F } ^ { 2 } + \alpha \| X _ { s } - V S \| _ { F } ^ { 2 } \ ,
45
+ $$
46
+
47
+ where $\alpha$ sets the relative influence of both terms, $B = [ V , U ] \in \mathbb { R } ^ { D \times 2 d }$ , and $_ { \mathbf { T } }$ and $_ { s }$ encode the low-dimensional representations of the target and source data, respectively. This simple formulation, however, does not aim to separate the target samples belonging to known classes from the unknown ones, and thus will represent each target sample as a mixture of shared and private information.
48
+
49
+ Intuitively, we would rather like each target sample to be generated by either the shared subspace $V$ , or the private one $U$ . To address this, we propose to make use of a group sparsity regularizer on the coefficients of the target samples. Specifically, we split the coefficient vector $\mathbf { \delta } _ { \mathbf { \mathcal { T } } _ { i } }$ for target sample $i$ into a part $\mathbf { \mathscr { T } } _ { i } ^ { v }$ that corresponds to the shared subspace and a part $\mathbf { \mathcal { T } } _ { i } ^ { u }$ that corresponds to the private one. We then encourage that either of these two parts goes to zero for each sample. To this end, we therefore write the optimization problem
50
+
51
+ $$
52
+ \begin{array} { r l } { \displaystyle \underset { U , T , V , S } { \operatorname* { m i n } } } & { \| X _ { t } - B T \| _ { F } ^ { 2 } + \alpha \| X _ { s } - V S \| _ { F } ^ { 2 } + \lambda _ { 1 } \displaystyle \sum _ { i = 1 } ^ { n _ { t } } \left( \| T _ { i } ^ { v } \| + \| T _ { i } ^ { u } \| \right) } \\ { s . t . } & { \displaystyle \displaystyle \sum _ { j = 1 } ^ { d } \| U _ { j } \| ^ { 2 } \leq 1 , \displaystyle \sum _ { j = 1 } ^ { d } \| V _ { j } \| ^ { 2 } \leq 1 , } \end{array}
53
+ $$
54
+
55
+ where the constraints prevent the basis vectors of the subspaces from growing while the coefficients decrease (Lee et al., 2007), and where $\lambda _ { 1 }$ is a scalar controlling the strength of the group sparsity regularizer. In essence, this formulation allows each target sample to be reconstructed from either the shared subspace or the private one, which reduces the influence of the samples from unknown classes on learning the shared representation.
56
+
57
+ Optimization. To solve equation 2 efficiently, we alternatively update one variable at a time while keeping the other ones fixed. Below, we describe the different updates.
58
+
59
+ # Algorithm 1 : FRODA: Factorized Representations for Open-set Domain Adaptation
60
+
61
+ #
62
+
63
+ $\pmb { X } _ { s } \in \mathbb { R } ^ { D \times n _ { s } }$ : the source samples $\pmb { X } _ { t } \in \mathbb { R } ^ { D \times n _ { t } }$ : the target samples $d \ll D$ : the dimensionality of the subspaces
64
+
65
+ Output: $\pmb { \zeta } \in \mathbb { R } ^ { d \times n _ { s } } , \pmb { T } \in \mathbb { R } ^ { 2 d \times n _ { t } }$
66
+
67
+ # Initialize:
68
+
69
+ $V P C A ( X _ { s } )$ $U \gets N u l l ( V )$ (i.e., truncated null space of $V$ )
70
+
71
+ 1: Compute $\mathbf { T }$ from equation 5 by proximal gradient descent
72
+ 2: Compute $_ { s }$ by solving the linear least-squares problem $\mathrm { m i n } _ { S } \| X _ { s } - V S \| _ { F } ^ { 2 }$
73
+ 3: repeat
74
+ 4: Compute $U$ from equation 3 by the Lagrange dual method of (Lee et al., 2007)
75
+ 5: Compute $V$ from equation 4 by the Lagrange dual method of (Lee et al., 2007)
76
+ 6: Compute $_ { \mathbf { T } }$ from equation 5 by proximal gradient descent
77
+ 7: Compute $_ { s }$ by solving the linear least-squares problem $\operatorname* { m i n } _ { S } \| X _ { s } - V S \| _ { F } ^ { 2 }$
78
+ 8: until convergence
79
+
80
+ $\textbf { { B } }$ -minimization: Given the coefficients $_ { s }$ and $_ { \mathbf { T } }$ , we update the tuple $( U , V )$ by solving
81
+
82
+ $$
83
+ \operatorname* { m i n } _ { U } \quad \lVert A - U T ^ { u } \rVert _ { F } ^ { 2 } \quad s . t . \sum _ { j = 1 } ^ { d } \lVert U _ { j } \rVert ^ { 2 } \leq 1 ,
84
+ $$
85
+
86
+ with $A = X _ { t } - V T ^ { v }$ , and
87
+
88
+ $$
89
+ \operatorname* { m i n } _ { \pmb { V } } \quad \| \pmb { A } ^ { \prime } - \pmb { V T } ^ { v } \| _ { F } ^ { 2 } + \alpha \| \pmb { X } _ { s } - \pmb { V S } \| _ { F } ^ { 2 } \quad s . t . \sum _ { j = 1 } ^ { d } \| \pmb { V } _ { j } \| ^ { 2 } \leq 1 ,
90
+ $$
91
+
92
+ with $A ^ { \prime } = X _ { t } - U T ^ { u } $ . These two sub-problems can be solved efficiently using the Lagrange dual formulation introduced in (Lee et al., 2007) to update the basis in a standard sparse coding context.
93
+
94
+ $_ { \mathbf { T } }$ -minimization: Minimizing equation 2 with respect to $\mathbf { T }$ , with all other parameters fixed, yields
95
+
96
+ $$
97
+ \operatorname* { m i n } _ { \pmb { T } } \| \pmb { X } _ { t } - \pmb { B } \pmb { T } \| _ { F } ^ { 2 } + \lambda _ { 1 } \sum _ { i = 1 } ^ { n _ { t } } ( \| \pmb { T } _ { i } ^ { v } \| + \| \pmb { T } _ { i } ^ { u } \| ) ~ ,
98
+ $$
99
+
100
+ which can be solved efficiently via the proximal gradient method (Mairal et al., 2014). In other words, for each target sample, we obtain $_ { \mathbf { T } }$ using group sparse coding to determine to which representation, shared or private, each target sample belongs.
101
+
102
+ $_ { s }$ -minimization: Solving equation 2 with respect to $_ { s }$ , with all the other parameters fixed, reduces to a linear least-squares problem, which has a closed-form solution.
103
+
104
+ To start optimization, we initialize $V$ as the PCA subspace of the source data, and take $U$ as its truncated null space. We then obtain the corresponding $_ { \mathbf { T } }$ and $_ { s }$ as described above and start iterating. The pseudo-code of FRODA is provided in Algorithm 1. The steps are repeated until convergence, which typically occurs around 50 iterations, with each iteration taking roughly 0.05s.
105
+
106
+ Inference. After obtaining the final $2 d$ -dimensional representation of $_ { \mathbf { T } }$ for the target samples, we determine if each sample $i$ belongs to known classes or unknown ones based on the coefficients $\mathbf { \mathcal { T } } _ { i } ^ { u }$ and $\mathbf { \mathit { T } } _ { i } ^ { v }$ . More specifically, given a threshold $\varepsilon$ , a target sample is assigned to the unknown classes if $\| \mathbfcal { T } _ { i } ^ { \dot { v } } \| / \| \mathbfcal { T } _ { i } ^ { u } \| \leq \varepsilon$ , which suggests that it can be well-reconstructed by the private subspace. In the presence of $C$ known classes, we then train a $( C + 1 )$ -way classifier by augmenting the $d$ - dimensional source data $_ { s }$ , i.e. $S \in \mathbb { R } ^ { d \times n _ { s } }$ , with the target samples $\mathbf { T } ^ { u }$ identified as unknown.
107
+
108
+ # 3.2 D-FRODA: DISCRIMINATIVE FRODA
109
+
110
+ The formulation above does not make use of the source labels at all during the representation learning stage. As such, it does not encourage the representation to be discriminative. To overcome this, we extend our basic formulation to further account for the classification task at hand. Specifically, let $\pmb { L } = [ l _ { 1 } \dots l _ { n _ { s } } ] \in \mathbb { R } ^ { C \times n _ { s } }$ be the matrix containing the source labels, where $\boldsymbol { l } _ { i } \in \mathbb { R } ^ { C }$ represents the one-hot encoding of the label of sample $i$ . We then write our D-FRODA formulation as
111
+
112
+ $$
113
+ \begin{array} { r l } { \displaystyle \underset { U , T , V , S , W } { \operatorname* { m i n } } } & { \| X _ { t } - B T \| _ { F } ^ { 2 } + \alpha \| X _ { s } - V S \| _ { F } ^ { 2 } + \beta \| L - W S \| _ { F } ^ { 2 } + \lambda _ { 1 } \displaystyle \sum _ { i = 1 } ^ { n _ { t } } ( \| T _ { i } ^ { v } \| + \| T _ { i } ^ { u } \| ) ) } \\ { \displaystyle s . t . } & { \displaystyle \displaystyle \sum _ { j = 1 } ^ { d } \| U _ { j } \| ^ { 2 } \leq 1 , \displaystyle \sum _ { j = 1 } ^ { d } \| V _ { j } \| ^ { 2 } \leq 1 , } \end{array}
114
+ $$
115
+
116
+ where $W \in \mathbb { R } ^ { C \times d }$ is the matrix containing the parameters of a linear classifier for the source data.
117
+
118
+ Optimization. To optimize equation 6, we follow a similar alternating strategy as before. The $\textbf { { B } }$ minimization and $_ { \mathbf { T } }$ -minimization steps are unchanged, but the $\pmb { S }$ -minimization now incorporates a new term and we further need to solve for the classifier parameters $W$ . This translates to:
119
+
120
+ $\pmb { S }$ -minimization: Minimizing equation 6 with respect to $_ { s }$ , with all the other parameters fixed, still reduces to a linear least-squares problem. The two terms involving $_ { s }$ can be grouped into a single one of the form $\| X _ { n e w } - V _ { n e w } S \| _ { F } ^ { 2 }$ , where $X _ { n e w } = \binom { \sqrt { \alpha } X _ { s } } { \sqrt { \beta } L }$ and $V _ { n e w } = \overset { \overline { { { \rho } } } } { \left( \overset { \overline { { { \alpha } } } } { \sqrt { \beta } } W \right) }$ , and thus $_ { s }$ can be obtained in closed form.
121
+
122
+ $W$ -minimization: With all the other parameters fixed, finding $W$ corresponds to a linear leastsquares problem, with a closed-form solution.
123
+
124
+ Inference. The same inference strategy as before can be followed to label the target samples. Another option here is to make use of $W$ to classify the samples identified as belonging to known classes. We compare these two strategies in our experiments.
125
+
126
+ # 3.3 D-FRODA-U: D-FRODA WITH UNKNOWN SOURCE CLASSES
127
+
128
+ Until now, we have tackled the scenario where there are no unknown classes in the source data, which we believe corresponds to the typical application scenario, since the source data can in general be fully annotated. Nevertheless, to match the scenario of Busto & Gall (2017), who assume to have access to additional source samples from unknown classes, yet different from the target unknown classes, we introduce a modified version of our approach that takes such auxiliary data into account. Note that, since one knows which source samples are from unknown classes, it is also possible to simply discard them from training. To nonetheless handle them, we re-write equation 6 as
129
+
130
+ $$
131
+ \begin{array} { r l } { \underset { U , T , V , U ^ { \prime } , S ^ { \prime } , W ^ { \prime } } { \operatorname* { m i n } } } & { \| X _ { t } - B \pmb { T } \| _ { F } ^ { 2 } + \alpha \| X ^ { \prime } _ { s } - B ^ { \prime } S ^ { \prime } \| _ { F } ^ { 2 } + \beta \| \pmb { L } - W ^ { \prime } S ^ { \prime } \| _ { F } ^ { 2 } } \\ & { + \lambda _ { 1 } \displaystyle \sum _ { i = 1 } ^ { n _ { t } } ( \| \pmb { T } _ { i } ^ { v } \| + \| \pmb { T } _ { i } ^ { u } \| ) + \lambda _ { 2 } \displaystyle \sum _ { i = 1 } ^ { n _ { s } } \big ( \| \pmb { S } ^ { \prime } _ { i } ^ { v } \| + \| \pmb { S } ^ { \prime } _ { i } ^ { u } \| \big ) } \\ & { \qquad \quad \ : s . t . \quad \displaystyle \sum _ { j = 1 } ^ { 2 d } \| \pmb { B } _ { j } \| ^ { 2 } \leq 1 , \displaystyle \sum _ { j = 1 } ^ { 2 d } \| \pmb { B } ^ { \prime } _ { j } \| ^ { 2 } \leq 1 , } \end{array}
132
+ $$
133
+
134
+ where $X ^ { \prime } { } _ { s }$ contains the source samples from both known and unknown classes, and $\mathbf { { } \delta } B ^ { \prime } \mathbf { \delta } =$ $[ V , U ^ { \prime } ] \in \mathbb { R } ^ { D \times 2 d }$ denotes the source transformation matrix with $U ^ { \prime } \in \mathbb { R } ^ { D \times d }$ the private subspace for the source data. Note that, similarly to the target coefficients, we have now separated the source coefficients for each sample ${ \mathbf { } } S _ { \mathrm { ~ } { i } } ^ { \prime }$ into a part corresponding to the shared subspace ${ \mathbf { } } S _ { \textit { i } } ^ { \prime \ v }$ and a part corresponding to the private one ${ S ^ { \prime } } _ { i } ^ { u }$ . Note also that the classifier parameters $W ^ { \prime }$ now account for $C + 1$ classes, the additional class corresponding to the unknown samples.
135
+
136
+ Optimization. We follow a similar iterative procedure to the one used before, with modifications to update $B ^ { \prime }$ and $S ^ { \prime }$ , as discussed below.
137
+
138
+ Table 1: Recognition accuracies on the 12 source/target pairs of the BCIS dataset (Tommasi & Tuytelaars, 2014) using a linear SVM classifier. B: Bing, C: Caltech256, I: ImageNet, S: SUN.
139
+
140
+ <table><tr><td>Method</td><td>B→C</td><td>B→I</td><td>B→S</td><td>C→B</td><td>C→I</td><td>C→S</td></tr><tr><td colspan="2">TCA (Pan et al.,2011) GFK (Gong et al., 2012)</td><td>62.8±3.8 56.6± 4.5 66.2 ± 4.0 58.3 ±3.1</td><td>29.6± 4.2 23.8 ±2.0</td><td>38.9±1.9 40.2 ± 1.8</td><td>60.2 ± 1.4 62.2 ± 1.5</td><td>29.7± 1.6 28.5 ± 1.0</td></tr><tr><td colspan="2">SA (Fernando et al.,2013) CORAL (Sun et al., 2016)</td><td>66.0±3.4 57.8±3.2</td><td>24.3 ± 2.6</td><td>40.3 ± 1.7</td><td>62.5 ± 0.8</td><td>29.0 ± 1.5</td></tr><tr><td colspan="2">ATI (Busto &amp; Gall, 2017)</td><td>68.8 ±3.3 60.9 ± 2.6</td><td>27.2 ±3.9</td><td>40.7 ± 1.5</td><td>64.0 ± 2.6</td><td>31.4±0.8</td></tr><tr><td colspan="2">AODA (Saito et al., 2018)</td><td>71.4 ± 2.3 69.0±2.8 76.2 ±1.7 70.9 ±3.2</td><td>37.4± 2.6 57.3 ± 1.1</td><td>45.7 ± 3.0 63.5 ± 2.1</td><td>67.9 ± 4.2 73.5 ± 0.8</td><td>37.5 ± 2.7 60.5±0.8</td></tr><tr><td colspan="2">FRODA D-FRODA</td><td>73.8±6.1 71.0± 2.0 74.6 ± 5.5 71.4± 2.0</td><td>54.7 ± 2.9 55.4± 2.7</td><td>67.5 ± 1.4 67.6 ± 1.2</td><td>74.5 ± 1.7 75.0±1.8</td><td>61.6±2.2 61.7 ± 2.1</td></tr><tr><td colspan="2">Method TCA (Pan et al.,2011)</td><td>I→B I→C 40.9±2.9 68.6±1.8</td><td>I→S 34.5±3.8</td><td>S→B 19.4 ± 2.1</td><td>S→C 32.0±3.9</td><td>S→I Avg. 31.1 ± 4.6 42±3.04</td></tr><tr><td colspan="2">GFK(Gong et al.,2012) SA (Fernando et al.,2013) CORAL (Sun et al.,2016)</td><td>42.6 ± 2.4 73.3± 3.6 43.1 ± 1.6 72.8 ± 3.1 44.6 ± 2.5</td><td>32.7± 3.6 32.2±3.7</td><td>16.9 ± 1.5 17.5 ± 1.6</td><td>28.6±3.8 26.4± 1.1 29.2 ± 4.2 27.1 ± 1.3</td><td>41.6 ± 2.5 41.8 ± 2.4</td></tr><tr><td colspan="2">ATI (Busto &amp; Gall,2017) AODA (Saito et al., 2018)</td><td>74.5 ± 3.4 48.8±2.3 77.5 ± 2.2 66.3± 0.9 78.1± 0.9</td><td>35.4 ± 4.4 43.4± 4.8</td><td>18.7 ± 1.2 23.2 ±3.2</td><td>33.6 ± 5.3 31.3 ± 1.3 47.3±2.9</td><td>44.3 ± 2.7 50.2 ± 2.8</td></tr><tr><td colspan="2">FRODA D-FRODA</td><td>66.0±1.9 79.9 ± 1.7 66.4±1.7 80.5 ± 1.6</td><td>59.4± 1.4 59.2± 2.1 55.7 ± 2.5 59.8 ±2.0 55.5 ± 2.4</td><td>56.5 ± 2.6</td><td>33.0 ±1.1 59.6 ±3.1 63.2 ± 1.3 61.2 ± 1.8 59.4± 1.9</td><td>65.4 ±1.7 65.4± 2.3</td></tr></table>
141
+
142
+ $S ^ { \prime }$ -minimization: To minimize equation 7 w.r.t. $S ^ { \prime }$ , with all other parameters fixed, we write
143
+
144
+ $$
145
+ \operatorname* { m i n } _ { { \boldsymbol { S } } ^ { \prime } } \quad \alpha \| { \boldsymbol { X } } ^ { \prime } { \boldsymbol { s } } - { \boldsymbol { B } } ^ { \prime } { \boldsymbol { S } } ^ { \prime } \| _ { F } ^ { 2 } + \beta \| { \boldsymbol { L } } - { \boldsymbol { W } } ^ { \prime } { \boldsymbol { S } } ^ { \prime } \| _ { F } ^ { 2 } + \lambda _ { 2 } \sum _ { i = 1 } ^ { n _ { s } } \left( \| { \boldsymbol { S } } ^ { \prime } { \boldsymbol { s } } ^ { \prime } \| + \| { \boldsymbol { S } } ^ { \prime } { \boldsymbol { u } } \| \right) ~ .
146
+ $$
147
+
148
+ The first two terms can be grouped into a single squared Frobenius norm, thus resulting in a sparse group lasso problem, which, as when updating $\mathbf { T }$ in FRODA, can be solved via proximal gradient descent (Mairal et al., 2014).
149
+
150
+ $B ^ { \prime }$ -minimization: Given the coefficients $S ^ { \prime ^ { v } }$ and $S ^ { \prime } { } ^ { u }$ , we can update $U ^ { \prime }$ by solving
151
+
152
+ $$
153
+ \operatorname* { m i n } _ { U ^ { \prime } } \quad \| A - U ^ { \prime } S ^ { \prime ^ { \# } } \| _ { F } ^ { 2 } \quad s . t . \sum _ { j = 1 } ^ { d } \| U ^ { \prime } { } _ { j } \| ^ { 2 } \leq 1 ,
154
+ $$
155
+
156
+ with $A = { X ^ { \prime } } _ { s } - V { S ^ { \prime } } ^ { v }$ , and $V$ by solving
157
+
158
+ $$
159
+ \operatorname* { m i n } _ { V } \quad \| A ^ { \prime } - V C \| _ { F } ^ { 2 } \quad s . t . \sum _ { j = 1 } ^ { d } \| V _ { j } \| ^ { 2 } \leq 1 ,
160
+ $$
161
+
162
+ with $A ^ { \prime } = \binom { X _ { t } - U T ^ { u } } { \sqrt { \alpha } ( X ^ { \prime } { } _ { s } - U ^ { \prime } S ^ { \prime } { } ^ { u } ) }$ and $C = \left( \underset { \sqrt { \alpha } S ^ { \prime } } { \mathbf { \nabla } } \right)$ . As in FRODA, these two sub-problems can be solved efficiently using the Lagrange dual formulation of Lee et al. (2007).
163
+
164
+ # 4 EXPERIMENTS
165
+
166
+ We evaluate our approach on the task of open-set visual domain adaptation using two benchmark datasets, and compare its performance against the state-of-the-art open-set domain adaptation methods on each dataset.1 Note that we also report the results of the methods used as baselines in (Busto & Gall, 2017). For a dataset with $C$ source classes, we report the accuracy on $C + 1$ classes, the additional one corresponding to the unknown case.
167
+
168
+ Implementation details. Following Busto & Gall (2017), we represent the source and target samples with 4096-dimensional $D e C A F _ { 7 }$ features (Donahue et al., 2013) and first reduce their dimensionality by performing PCA jointly on the source and target data and keeping the components encoding $9 9 \%$ of the data variance. To then determine the dimensionality $d$ of our shared and private subspaces, we make use of the subspace disagreement measure of (Gong et al., 2012). For all our experiments, the hyperparameters of our approach were set as follows: $\alpha = 0 . 1$ , $\beta = 0 . 0 1$ , $\lambda _ { 1 } = 0 . 0 0 1$ , $\lambda _ { 2 } = 0 . 0 0 1$ and $\varepsilon = 0 . 2$ . For recognition, for the comparison with (Busto & Gall, 2017) to be fair, we employ a linear SVM classifier in a one-vs-one fashion. Nevertheless, we also report results obtained with a $k$ −Nearest-Neighbor classifier (with $k = 3$ ) and with our linear classifier with parameters $W$ learnt during training.
169
+
170
+ Table 2: Recognition accuracies of variants of our approach using linear SVM, nearest neighbor (NN) and our linear classifier $( W )$ on the 12 source/target pairs of the BCIS dataset (Tommasi & Tuytelaars, 2014). B: Bing, C: Caltech256, I: ImageNet, S: SUN.
171
+
172
+ <table><tr><td>Method</td><td>B→C</td><td>B→I</td><td>B→S</td><td>C→B</td><td>C→I</td><td></td><td>C→S</td></tr><tr><td>FRODA-SVM</td><td>73.8±6.1</td><td>71.0±2.0 64.1 ± 2.4</td><td>54.7±2.9 54.4 ±3.5</td><td>67.5 ± 1.4 65.1 ± 2.9</td><td>74.5 ± 1.7 72.9 ±1.7</td><td></td><td>61.6± 2.2</td></tr><tr><td>FRODA-NN D-FRODA-SVM D-FRODA-W</td><td>67.7 ±2.8 74.6± 5.5 61.2 ± 1.2</td><td>71.4± 2.0 59.3 ± 1.1</td><td>55.4± 2.7 53.3 ± 3.0</td><td>67.6±1.2 63.1±0.9</td><td>75.0±1.8 66.2 ± 1.7</td><td></td><td>60.5 ± 2.0 61.7± 2.1 60.2 ± 2.1</td></tr><tr><td>D-FRODA-NN D-FRODA-U-SVM D-FRODA-U-W</td><td>67.7 ± 3.3 71.9±3.8 55.9 ± 3.6</td><td>63.3 ± 2.8 69.2± 2.7 55.5± 4.5</td><td>54.0 ± 3.5 56.7± 3.3 41.7 ± 4.8</td><td>65.4± 2.8 64.8±1.8 52.6 ± 4.7</td><td>73.4 ± 1.5 72.8±2.7 61.4 ± 3.6</td><td></td><td>60.3 ± 2.4 59.4± 2.3 49.5 ± 4.1</td></tr><tr><td>D-FRODA-U-NN</td><td>57.6 ± 9.1</td><td>52.2 ± 5.0</td><td>47.5 ± 6.5</td><td>51.8±5.7</td><td>64.0±5.7</td><td></td><td>57.7 ± 5.6</td></tr><tr><td>Method</td><td>I→B</td><td>I→C</td><td>I→S</td><td>S→B</td><td>S→C</td><td>S→I</td><td>Avg.</td></tr><tr><td>FRODA-SVM FRODA-NN</td><td>66.0±1.9 60.9 ± 3.7</td><td>79.9 ± 1.7 77.7 ± 2.8</td><td>59.2 ± 2.1 58.0± 2.2</td><td>55.7± 2.5 53.4 ± 2.2</td><td>61.2 ± 1.8</td><td>59.4 ± 1.9</td><td>65.4</td></tr><tr><td>D-FRODA-SVM</td><td>66.4±1.7</td><td>80.5±1.6</td><td>59.8± 2.0</td><td>55.5± 2.4</td><td>61.2 ± 1.4 61.2 ± 1.9</td><td>58.1 ± 1.5 59.6±2.2</td><td>62.8 65.7</td></tr><tr><td>D-FRODA-W</td><td>62.2 ± 1.6</td><td>70.5 ± 2.5</td><td>58.1 ± 1.7</td><td>56.4 ±1.9</td><td>58.9 ± 1.5</td><td>58.5±0.7</td><td>60.7</td></tr><tr><td>D-FRODA-NN D-FRODA-U-SVM</td><td>60.9 ± 4.1</td><td>78.7± 2.8</td><td>57.7± 2.0</td><td>53.0±2.3</td><td>61.2 ±1.2</td><td>57.9 ± 1.6</td><td>62.8</td></tr><tr><td></td><td>66.0± 1.2</td><td>76.8± 1.9</td><td>57.2 ± 4.5</td><td>56.3±1.9</td><td>61.8± 3.0</td><td>59.9±1.7</td><td>64.4</td></tr><tr><td>D-FRODA-U-W</td><td>54.6 ± 4.4</td><td>66.2 ±3.8</td><td>43.9 ± 5.4</td><td>47.6 ± 3.8</td><td></td><td>51.3 ±3.7</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>53.5 ± 4.9</td><td></td><td>52.8</td></tr><tr><td></td><td>58.4±6.1</td><td>70.9 ± 4.5</td><td>52.8 ±9.0</td><td>55.4 ± 2.0</td><td></td><td></td><td></td></tr><tr><td>D-FRODA-U-NN</td><td></td><td></td><td></td><td></td><td>61.5 ± 2.0</td><td>60.1 ±1.7</td><td>57.5</td></tr></table>
173
+
174
+ Results on the dense cross-dataset benchmark. We first evaluate our approach on the challenging cross-dataset benchmark of Tommasi & Tuytelaars (2014). This dataset was built using images depicting 40 object categories and coming from four datasets, namely Bing (B), Caltech256 (C), ImageNet (I) and SUN (S), hence referred to as BCIS. Following Busto & Gall (2017), we consider the samples from the first 10 classes as known instances, while the samples with class labels $1 1 , 1 2 , \cdots , 2 5$ and $2 6 , 2 7 , \cdots , 4 0$ are taken to be the unknown samples in the source and target domains, respectively. We follow the unsupervised protocol of Tommasi & Tuytelaars (2014), which relies on 50 source samples per class and 30 target images per class, except when the target data is coming from SUN, in which case only 20 images per class are employed. Note that only the $D e C A F _ { 7 }$ features are publicly available. To nonetheless evaluate the AODA method of Saito et al. (2018), we made use of a network taking the $D e C A F _ { 7 }$ features as input and processing them with two fully-connected layers, with 1024 and 128 units, respectively, and a final classification layer.
175
+
176
+ In Table 1, we compare the results of our methods with those of the baselines on all 12 domain pairs of this dataset. Note that our algorithms (both with and without the discriminative term) outperform all the baselines, and in particular the state-of-the-art one of Busto & Gall (2017) by a large margin. For instance, the margin exceeds 32, resp. 26, percentage points when going from SUN to Bing and ImageNet, respectively. This, we believe, clearly evidences the benefits of our factorized representations, which allow us to separate the unknown target samples from the ones coming from known classes, thus yielding a better representation for the known classes.
177
+
178
+ In Table 2, we compare different versions of our method, corresponding to using different classifiers and to using additional unknown source data. Note that the linear SVM classifier, when used with our framework, tends to perform the best, followed by the NN one and finally the learnt linear classifier. This, we believe, can be explained by the fact that, while the linear classifier helps to learn a more discriminative representation, it remains less powerful than the other two classifiers to label the target samples. Note also that the use of unknown source data does not consistently help in our framework. Nevertheless, the corresponding results still outperform those of Busto & Gall (2017).
179
+
180
+ We further evaluate the robustness of our approach to the choice of threshold $\varepsilon$ to separate the target samples from known/unknown classes. In
181
+
182
+ ![](images/f6e8307a91cba11a9779b2312f183596f19aa74ded692c38ca1f932f398ec5fb.jpg)
183
+ Figure 1: Sensitivity to $\varepsilon$
184
+
185
+ Table 3: Recognition accuracies on the 6 source/target pairs of the Office dataset (Saenko et al., 2010) using a linear SVM classifier. A: Amazon, W: Webcam, D: DSLR.
186
+
187
+ <table><tr><td>Method</td><td>A→D A→W</td><td></td><td>W→A</td><td>W→D</td><td>D→A</td><td>D →W</td><td>Avg.</td></tr><tr><td>LSVM</td><td>72.6</td><td>57.5</td><td>49.2</td><td>98.8</td><td>45.1</td><td>88.5</td><td>68.6</td></tr><tr><td>DAN (Long et al.,2016a)</td><td>77.6</td><td>72.5</td><td>60.8</td><td>98.3</td><td>57</td><td>88.4</td><td>75.8</td></tr><tr><td>RTN (Long et al., 2016b)</td><td>76.6</td><td>73</td><td>62.4</td><td>98.8</td><td>57.2</td><td>89</td><td>76.2</td></tr><tr><td>BP(Ganin &amp; Lempitsky,2014)</td><td>78.3</td><td>75.9</td><td>64</td><td>98.7</td><td>57.6</td><td>89.8</td><td>77.4</td></tr><tr><td>ADDA (Tzeng et al.,2017)</td><td>52.5</td><td>58.3</td><td>54.1</td><td>89.1</td><td>45.3</td><td>79.1</td><td>63.1</td></tr><tr><td>DSN (Bousmalis et al.,2016)</td><td>58.3</td><td>57.2</td><td>55.1</td><td>79.3</td><td>58.1</td><td>70.2</td><td>63.0</td></tr><tr><td>ATI (Busto &amp; Gall,2017)</td><td>79.8</td><td>78.4</td><td>76.7</td><td>98.8</td><td>71.3</td><td>94.4</td><td>83.2</td></tr><tr><td>AODA (Saito et al.,2018)</td><td>76.6</td><td>74.9</td><td>81.2</td><td>96.9</td><td>62.3</td><td>94.6</td><td>81.1</td></tr><tr><td>FRODA</td><td>88.0</td><td>78.7</td><td>76.5</td><td>98.0</td><td>73.7</td><td>94.6</td><td>84.9</td></tr><tr><td>D-FRODA</td><td>87.4</td><td>78.1</td><td>77.1</td><td>98.5</td><td>73.6</td><td>94.4</td><td>84.9</td></tr></table>
188
+
189
+ Table 4: Recognition accuracies of variants of our approaches using a linear SVM, nearest neighbor (NN) and our linear classifier $( W )$ on the 6 source/target pairs of the Office dataset (Saenko et al., 2010).
190
+
191
+ <table><tr><td>Method</td><td colspan="6">A→D A→W W→A W→D D→A</td><td>D→W Avg.</td></tr><tr><td>FRODA-SVM FRODA-NN</td><td>88.0 83.9</td><td>78.7 69.5</td><td>76.5 75.0</td><td>98.0 97.7</td><td>73.7 69.0</td><td>94.6 83.9</td><td>84.9 79.8</td></tr><tr><td>D-FRODA-SVM D-FRODA-NN</td><td>87.4</td><td>78.1 70.1</td><td>77.1 75.1</td><td>98.5 96.8</td><td>73.6 69.2</td><td>94.4 84.5</td><td>84.9 79.9</td></tr><tr><td>D-FRODA-W</td><td>83.9 71.1</td><td>65.3</td><td>68.1</td><td>83.0</td><td>67.3</td><td>79.1</td><td>72.3</td></tr><tr><td>D-FRODA-U-SVM</td><td>81.9</td><td>83.5</td><td>75.5</td><td>96.2</td><td>70.6</td><td>94.2</td><td>83.7</td></tr><tr><td>D-FRODA-U-NN</td><td>78.1</td><td>72.1</td><td>69.1</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>93.6</td><td>67.0</td><td>75.7</td><td>75.9</td></tr><tr><td>D-FRODA-U-W</td><td>73.4</td><td>65.9</td><td>62.8</td><td>88.0</td><td>61.7</td><td>65.1</td><td>69.5</td></tr></table>
192
+
193
+ Fig. 1, we plot the average accuracy over all 12 pairs of the BCIS dataset as a function of the value of ε. Note that, once a sufficiently large threshold is reached, the results are quite stable. This indicates that our algorithm is robust to the specific value of this hyperparameter.
194
+
195
+ Results on the Office dataset. We further evaluate our approach on the slightly less challenging, although standard Office benchmark (Saenko et al., 2010). This dataset contains three different domains, namely Amazon (A), DSLR (D) and Webcam (W), sharing 31 object categories, but differing in data acquisition process. As in (Busto & Gall, 2017), we take all the samples from the first 10 classes to represent the known ones, and all the samples with class labels $1 1 , 1 2 , \cdots , 2 0$ and $2 1 , 2 2 , \cdots , 3 1$ as unknown source and target data, respectively.
196
+
197
+ We report the results of our algorithms and of the baselines for all 6 domain pairs of this dataset in Table 3. As before, note that we outperform the baselines in this open-set scenario. This includes the end-to-end AlexNet-based approach of Saito et al. (2018) for open-set domain adaptation, as well as the state-of-the-art UDA methods of Tzeng et al. (2017) and Bousmalis et al. (2016), the latter of which is closest in spirit to our approach. In Table 4, we compare the different variants of our approach. The conclusions that one can draw from these results are similar to those for the BCIS dataset, thus showing that our method generalizes well across different domain adaptation datasets.
198
+
199
+ To evaluate the robustness of our method to the hyper-parameters $\alpha , \beta$ , and $\lambda _ { 1 }$ , in Fig. 2, we plot the average accuracy of D-FRODA-NN (with $k = 3$ ) over all 6 pairs of the Office dataset as a function of the value of $\alpha$ , $\beta$ , and $\lambda _ { 1 }$ . Note that our results are stable for large ranges of these values.
200
+
201
+ Runtimes. As mentioned in Section 3, one iteration of our approach takes on average 0.05 second, and our algorithm typically takes around 50 iterations to converge. This yields a total runtime of roughly 2.5 seconds. By contrast, the publicly available implementation of the method of Busto & Gall (2017) takes on average 8 seconds per iteration and typically converges in 4 iterations, leading to a total runtime of roughly 32 seconds. Note that these runtimes were measured on the same computer and that both methods rely on the same input features. Therefore, our approach is not only significantly more accurate than (Busto & Gall, 2017), but also faster by an order of magnitude.
202
+
203
+ ![](images/7d2f29cf4001d94a3f3885b5178acbf97ec3cb8dc7e43ac7475f30850d87875b.jpg)
204
+ Figure 2: Sensitivity to $\alpha$ , $\beta$ , and $\lambda _ { 1 }$ .
205
+
206
+ Further discussion: The experimental setup used in (Saito et al., 2018; Busto & Gall, 2017) and our work for open-set DA relies on features extracted using a network pre-trained on ImageNet, which in fact can be argued to already contain semantic information about some of the unknown classes. To evidence that our approach does not crucially depend on this information, and thus validate our results, we observed that 4 of the unknown classes in the Office dataset, namely Tape dispenser, Stapler, Scissors, Punchers, do not appear in ImageNet. We therefore performed additional experiments with only these classes as unknown ones and the same 10 known classes as before. We compared the accuracy of our formulations against the SVM baseline and the open-set ATI method of Busto & Gall (2017). The gap with respect to both baselines remains large: SVM: $7 6 . 0 1 \%$ , ATI: $7 7 . 4 \%$ , D-FRODA: $78 . 2 \%$ , and FRODA: $78 . 5 \%$ . This confirms that our method applies to truly never-seen-before classes.
207
+
208
+ Note that among the 15 unknown classes in the setup for BCIS, 8 of them are not shared with ImageNet, namely Windmill, Steering wheel, Can-soda, Sneaker, Skyscraper, Ladder, Motorcycle, and Palm tree. This further confirms that our method handles the cases where no categorical or semantic information is available in the extracted features.
209
+
210
+ # 5 CONCLUSION
211
+
212
+ We have introduced a novel approach to open-set domain adaptation, based on the intuition that source and target samples coming from the same, known classes can be represented by a shared subspace, while target samples from unknown classes should be modeled with a private subspace. Each step of the resulting algorithms can be solved efficiently. As demonstrated by our experiments, our method outperforms the state of the art in open-set domain adaptation and is one order of magnitude faster than the technique of Busto & Gall (2017). We believe that this clearly evidences the benefits of learning factorized representations, which allows us to jointly discard the unknown target samples and learn a better shared representation. In the future, we will investigate ways to make better use of unknown source data, and to exploit more effective classifiers, such as SVM, directly within our D-FRODA formulation.
213
+
214
+ # REFERENCES
215
+
216
+ M. Baktashmotlagh, M. Harandi, B. Lovell, and M. Salzmann. Unsupervised domain adaptation by domain invariant projection. In Proc. Int. Conference on Computer Vision, 2013.
217
+ M. Baktashmotlagh, M. Harandi, B. Lovell, and M. Salzmann. Domain adaptation on statistical manifold. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2014.
218
+ A. Bendale and T. Boult. Towards open world recognition. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2015.
219
+ K. Bousmalis, G. Trigeorgis, N. Silberman, D. Krishnan, and D. Erhan. Domain separation networks. In Proc. Advances in Neural Information Processing Systems, 2016.
220
+ P. Busto and J. Gall. Open set domain adaptation. In Proc. Int. Conference on Computer Vision, 2017.
221
+ Balakrishnan S. Chopra S. and Gopalan R. Dlid: Deep learning for domain adaptation by interpolating between domains. In ICML workshop on Challenges in Representation Learning, 2013.
222
+ J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Proc. Int. Conference on Machine Learning, 2013.
223
+ B. Fernando, A. Habrard, M. Sebban, and T. Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In Proc. Int. Conference on Computer Vision, 2013.
224
+ Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014.
225
+ M. Ghifary, Bastiaan W. Kleijn, M. Zhang, D. Balduzzi, and W. Li. Deep reconstructionclassification networks for unsupervised domain adaptation. In Proc. European Conference on Computer Vision, 2016.
226
+ B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2012.
227
+ B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In Proc. Int. Conference on Machine Learning, 2013.
228
+ R. Gopalan, R. Li, and R. Chellappa. Unsupervised adaptation across domain shifts by generating intermediate data representations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014.
229
+ Y. Jia, M. Salzmann, and T. Darrell. Factorized latent spaces with structured sparsity. In Proc. Advances in Neural Information Processing Systems, 2010.
230
+ H. Lee, A. Battle, R. Raina, and A. Ng. Efficient sparse coding algorithms. In Proc. Advances in Neural Information Processing Systems, 2007.
231
+ M. Long, Y. Cao, J. Wang, and M. Jordan. Learning transferable features with deep adaptation networks. arXiv preprint arXiv:1502.02791, 2015.
232
+ M. Long, J. Wang, and M. Jordan. Deep transfer learning with joint adaptation networks. corr, vol. arXiv preprint arXiv:1605.06636, 2016a.
233
+ M. Long, H. Zhu, J. Wang, and M. Jordan. Unsupervised domain adaptation with residual transfer networks. In Proc. Advances in Neural Information Processing Systems, 2016b.
234
+ J. Mairal, F. Bach, J. Ponce, G. Sapiro, R. Jenatton, and G. Obozinski. Spams: A sparse modeling software, v2. 3. URL http://spams-devel. gforge. inria. fr/downloads.html, 2014.
235
+ S. Pan, I. Tsang, J. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. IEEE Transactions on Neural Networks, 2011.
236
+ J Quiñonero C., M. Sugiyama, A. Schwaighofer, and N. Lawrence. Covariate shift by kernel mean matching. Dataset Shift in Machine Learning, 2009.
237
+ A. Rozantsev, M. Salzmann, and P. Fua. Beyond sharing weights for deep domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018.
238
+ K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In Proc. European Conference on Computer Vision, 2010.
239
+ K. Saito, S. Yamamoto, Y. Ushiku, and T. Harada. Open set domain adaptation by backpropagation. Proc. European Conference on Computer Vision, 2018.
240
+ W. J Scheirer, L. Jain, and T. Boult. Probability models for open set recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014.
241
+ B. Sun and K. Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Proc. European Conference on Computer Vision, 2016.
242
+ B. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI Conference on Artificial Intelligence, 2016.
243
+ T. Tommasi and T. Tuytelaars. A testbed for cross-dataset analysis. In Proc. European Conference on Computer Vision, 2014.
244
+ E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014.
245
+ E. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In Proc. Int. Conference on Computer Vision, 2015.
246
+ E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2017.
247
+ H. Yan, Y. Ding, P. Li, Q. Wang, Y. Xu, and W. Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. arXiv preprint arXiv:1705.00609, 2017.
parse/train/SJe3HiC5KX/SJe3HiC5KX_content_list.json ADDED
@@ -0,0 +1,1098 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING FACTORIZED REPRESENTATIONS FOR OPEN-SET DOMAIN ADAPTATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 99,
9
+ 704,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Mahsa Baktashmotlagh Masoud Faraki∗ University of Queensland Monash University ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 500,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Tom Drummond\\* Monash University ",
28
+ "bbox": [
29
+ 526,
30
+ 170,
31
+ 650,
32
+ 198
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Mathieu Salzmann EPFL ",
39
+ "bbox": [
40
+ 674,
41
+ 170,
42
+ 808,
43
+ 196
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 234,
54
+ 544,
55
+ 250
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Domain adaptation for visual recognition has undergone great progress in the past few years. Nevertheless, most existing methods work in the so-called closed-set scenario, assuming that the classes depicted by the target images are exactly the same as those of the source domain. In this paper, we tackle the more challenging, yet more realistic case of open-set domain adaptation, where new, unknown classes can be present in the target data. While, in the unsupervised scenario, one cannot expect to be able to identify each specific new class, we aim to automatically detect which samples belong to these new classes and discard them from the recognition process. To this end, we rely on the intuition that the source and target samples depicting the known classes can be generated by a shared subspace, whereas the target samples from unknown classes come from a different, private subspace. We therefore introduce a framework that factorizes the data into shared and private parts, while encouraging the shared representation to be discriminative. Our experiments on standard benchmarks evidence that our approach outperforms the state of the art in open-set domain adaptation. ",
62
+ "bbox": [
63
+ 233,
64
+ 265,
65
+ 764,
66
+ 473
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 497,
77
+ 336,
78
+ 513
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In many practical machine learning scenarios, the test samples are drawn from a different distribution from the training ones, due to varying acquisition conditions, such as different data sources, illumination conditions and cameras, in the context of visual recognition. Over the years, great progress has been achieved to tackle this problem, known has the domain shift. In particular, many methods aim to align the source (i.e., training) and target (i.e., test) distributions by learning domaininvariant embeddings (Pan et al., 2011; Gong et al., 2012; Fernando et al., 2013; Sun et al., 2016), the most recent approaches relying on deep networks (Ganin & Lempitsky, 2014; Long et al., 2015; Bousmalis et al., 2016; Tzeng et al., 2017; Long et al., 2016a; Yan et al., 2017). ",
85
+ "bbox": [
86
+ 174,
87
+ 529,
88
+ 825,
89
+ 640
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "While effective, these methods work under the assumption that the source and target data contain exactly the same classes. In practice, however, this assumption may easily be violated, as the target data will often contain additional classes that were not present within the source data. For example, when training a model to recognize office objects from images, as with the popular Office dataset (Saenko et al., 2010), one should still expect to see new objects, unobserved during training, when deploying the model in the real world. While one should not expect the model to recognize the specific class of such objects, at least in unsupervised domain adaptation where no target labels are provided, it would nonetheless be beneficial to identify these objects as unknown instead of misclassifying them. This was the task addressed by Busto & Gall (2017) in their so-called open-set domain adaptation approach. This method aims to learn a mapping from the source samples to a subset of the target ones corresponding to those identified as coming from known classes. While reasonably effective, this procedure involves alternatively solving for the mapping and the assignment of the samples to known/unknown classes, which, as shown in our experiments, can be costly. Recently, Saito et al. (2018) introduced a deep learning framework for open-set domain adaptation, relying on adversarial training to separate the samples from the known classes from the unknown ones. ",
96
+ "bbox": [
97
+ 174,
98
+ 647,
99
+ 825,
100
+ 854
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper, we introduce a novel approach to open-set domain adaptation based on learning a factorized representation of the source and target data. In essence, we seek to model the samples from the known classes with a low-dimensional subspace, shared by the source and target domains, and the target samples from unknown classes with another subspace, specific to the target domain. We then make use of group sparsity to encourage each target sample to be reconstructed by only one of these subspaces, which in turns lets us identify if this sample corresponds to a known or unknown class. We further show that we can obtain a more discriminative shared representation by jointly learning a linear classifier within our framework. Ultimately, our approach therefore allows us to jointly separate the target samples between known and unknown classes and represent the source and target samples within a consistent, shared latent space. Note that our approach is more intuitive than (Bousmalis et al., 2016) for the open-set DA scenario in the sense that we model each target sample as being generated by either the shared subspace or the private one, which is crucial to identify the target samples depicting unknown classes. By contrast, in (Bousmalis et al., 2016), each sample is encoded as a mixture of shared and private representations, which does not provide information to discriminate samples from unknown classes. ",
107
+ "bbox": [
108
+ 176,
109
+ 862,
110
+ 820,
111
+ 890
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 284
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "We demonstrate the effectiveness of our approach on several open-set domain adaptation benchmarks for visual object recognition. Our method consistently and significantly outperforms the technique of Busto & Gall (2017) on all benchmarks, as well as the end-to-end learning approach of Saito et al. (2018) on the Office dataset, thus showing the benefits of learning shared and private representations corresponding to the known and unknown classes, respectively. Furthermore, it is faster than the algorithm of Busto & Gall (2017) by an order of magnitude. ",
129
+ "bbox": [
130
+ 174,
131
+ 291,
132
+ 825,
133
+ 375
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 RELATED WORK ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 176,
143
+ 391,
144
+ 344,
145
+ 407
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Domain adaptation for visual recognition has become increasingly popular over the past few years, in large part thanks to the benchmark Office dataset of Saenko et al. (2010). A natural approach to tackling the domain shift consists of learning a transformation of the data such that the distributions of the source and target samples are as similar as possible in the resulting space (Baktashmotlagh et al., 2014; 2013; Sun et al., 2016). Instead of learning a transformation of the data, other methods have been proposed to re-weight the source samples, so as to rely more strongly on those that look similar to the target ones (Quiñonero C. et al., 2009; Gong et al., 2013). ",
152
+ "bbox": [
153
+ 174,
154
+ 416,
155
+ 825,
156
+ 513
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "With the advent of deep learning for visual recognition, domain adaptation research also eventually turned to exploiting deep networks. While it was initially shown that deep features were more robust than handcrafted ones to the domain shift (Donahue et al., 2013), translating the abovementioned distribution-matching ideas to end-to-end learning proved even more effective (Tzeng et al., 2014; Long et al., 2015; 2016b; Rozantsev et al., 2018; Sun & Saenko, 2016). In this context, other ideas were introduced, such as learning intermediate representations to interpolate between the source and target domains (Chopra S. & R., 2013; Tzeng et al., 2015), the use of adversarial domain classifiers (Ganin & Lempitsky, 2014; Tzeng et al., 2017), and additional reconstruction loss terms (Ghifary et al., 2016). ",
163
+ "bbox": [
164
+ 174,
165
+ 520,
166
+ 825,
167
+ 645
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Despite achieving great progress to tackle the domain shift, all the aforementioned methods are designed for the closed-set scenario, where the source and target data depict the exact same set of classes. Inspired by recent advances in open-set recognition (Bendale & Boult, 2015; Scheirer et al., 2014), the work of Busto & Gall (2017) constitutes the first attempt to address the more realistic case where the target data contains samples from new, unknown classes. To achieve this, Busto & Gall (2017) proposed to jointly learn the assignments of the target samples to known/unknown classes and a mapping from the source data to the target samples depicting known classes. The resulting learning problem was solved by alternatively optimizing for the assignments and for the mapping, which can be costly. Very recently, a deep learning approach was proposed for open-set domain adaptation (Saito et al., 2018), relying on adversarial training to separate the unknown target samples from the known ones. ",
174
+ "bbox": [
175
+ 174,
176
+ 652,
177
+ 825,
178
+ 805
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Here, we introduce a new solution to the open-set domain adaptation problem, where we model the source and target data with subspaces. Subspace-based representations have proven effective for domain adaptation (Gong et al., 2012; Gopalan et al., 2014; Fernando et al., 2013). Here, however, we exploit them in a different manner, based on the intuition that source samples and target samples from the known classes can be generated by a shared subspace, whereas target samples from unknown classes come from a private subspace. While the notion of shared-private representations has been exploited in the past, e.g., for multiview learning (Jia et al., 2010) and for closed-set domain adaptation (Bousmalis et al., 2016), the resulting techniques all use them to encode each sample as a mixture of shared and private information. By contrast, here, we aim to model each target sample as being generated by either the shared subspace or the private one, which is crucial to identify the target samples depicting unknown classes. ",
185
+ "bbox": [
186
+ 174,
187
+ 813,
188
+ 823,
189
+ 924
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "",
196
+ "bbox": [
197
+ 174,
198
+ 103,
199
+ 823,
200
+ 146
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Our experiments evidence that our open-set domain adaptation approach, based on shared-private representations, is more effective than the one of Busto & Gall (2017), consistently outperforming it on several datasets, and also faster by an order of magnitude. We also outperform the recent deep learning open-set domain adaptation framework of Saito et al. (2018) on the Office benchmark. ",
207
+ "bbox": [
208
+ 174,
209
+ 152,
210
+ 825,
211
+ 208
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "3 OUR APPROACH",
218
+ "text_level": 1,
219
+ "bbox": [
220
+ 176,
221
+ 231,
222
+ 341,
223
+ 247
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "The key idea behind our formulation is to find low-dimensional representations of the data, factorized into a subspace shared by the source samples and the target ones coming from known classes and another subspace specific to the target samples from unknown classes. Note that, when referring to target samples from known classes, we do not mean that these samples are labeled, but rather that they belong to the same set of classes as the source data. As a matter of fact, throughout the paper, we focus on the unsupervised domain adaptation scenario, where no target annotations are provided. In the remainder of this section, we first introduce the optimization problem at the heart of our approach, and then discuss two extensions of this basic formulation. ",
230
+ "bbox": [
231
+ 173,
232
+ 263,
233
+ 825,
234
+ 376
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "3.1 FRODA: FACTORIZED REPRESENTATIONS FOR OPEN-SET DOMAIN ADAPTATION ",
241
+ "text_level": 1,
242
+ "bbox": [
243
+ 173,
244
+ 395,
245
+ 774,
246
+ 410
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "Given $n _ { s }$ source samples, grouped in a matrix $\\pmb { X } _ { s } \\in \\mathbb { R } ^ { D \\times n _ { s } }$ and $n _ { t }$ target samples represented by $\\pmb { X } _ { t } \\in \\mathbb { R } ^ { D \\times n _ { t } }$ , our goal is to estimate a low-dimensional representation of each sample, such that the source and target samples coming from the same classes are generated by a shared subspace, whereas the target data from new, unknown classes are generated by a different, specific subspace. To this end, let $V \\in \\mathbb { R } ^ { D \\times d }$ be the matrix encoding the shared subspace, with $d \\ll D$ , and $\\boldsymbol { U } \\in$ $\\mathbb { R } ^ { D \\times d }$ the one representing the private subspace. A naive approach to finding the low-dimensional representations of the data would involve solving ",
253
+ "bbox": [
254
+ 173,
255
+ 420,
256
+ 825,
257
+ 520
258
+ ],
259
+ "page_idx": 2
260
+ },
261
+ {
262
+ "type": "equation",
263
+ "img_path": "images/ccf432ea8a26c6aba8fb50180e084bef065608157fc15cbad90443853971b9f0.jpg",
264
+ "text": "$$\n\\operatorname* { m i n } _ { U , T , V , S } \\quad \\| X _ { t } - B T \\| _ { F } ^ { 2 } + \\alpha \\| X _ { s } - V S \\| _ { F } ^ { 2 } \\ ,\n$$",
265
+ "text_format": "latex",
266
+ "bbox": [
267
+ 344,
268
+ 527,
269
+ 650,
270
+ 553
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "where $\\alpha$ sets the relative influence of both terms, $B = [ V , U ] \\in \\mathbb { R } ^ { D \\times 2 d }$ , and $_ { \\mathbf { T } }$ and $_ { s }$ encode the low-dimensional representations of the target and source data, respectively. This simple formulation, however, does not aim to separate the target samples belonging to known classes from the unknown ones, and thus will represent each target sample as a mixture of shared and private information. ",
277
+ "bbox": [
278
+ 174,
279
+ 563,
280
+ 825,
281
+ 621
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "Intuitively, we would rather like each target sample to be generated by either the shared subspace $V$ , or the private one $U$ . To address this, we propose to make use of a group sparsity regularizer on the coefficients of the target samples. Specifically, we split the coefficient vector $\\mathbf { \\delta } _ { \\mathbf { \\mathcal { T } } _ { i } }$ for target sample $i$ into a part $\\mathbf { \\mathscr { T } } _ { i } ^ { v }$ that corresponds to the shared subspace and a part $\\mathbf { \\mathcal { T } } _ { i } ^ { u }$ that corresponds to the private one. We then encourage that either of these two parts goes to zero for each sample. To this end, we therefore write the optimization problem ",
288
+ "bbox": [
289
+ 174,
290
+ 627,
291
+ 823,
292
+ 712
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "equation",
298
+ "img_path": "images/4eee80a340c3f3f33eae0d8c1930637e0924fdfa84202e223380c9d35fe39e64.jpg",
299
+ "text": "$$\n\\begin{array} { r l } { \\displaystyle \\underset { U , T , V , S } { \\operatorname* { m i n } } } & { \\| X _ { t } - B T \\| _ { F } ^ { 2 } + \\alpha \\| X _ { s } - V S \\| _ { F } ^ { 2 } + \\lambda _ { 1 } \\displaystyle \\sum _ { i = 1 } ^ { n _ { t } } \\left( \\| T _ { i } ^ { v } \\| + \\| T _ { i } ^ { u } \\| \\right) } \\\\ { s . t . } & { \\displaystyle \\displaystyle \\sum _ { j = 1 } ^ { d } \\| U _ { j } \\| ^ { 2 } \\leq 1 , \\displaystyle \\sum _ { j = 1 } ^ { d } \\| V _ { j } \\| ^ { 2 } \\leq 1 , } \\end{array}\n$$",
300
+ "text_format": "latex",
301
+ "bbox": [
302
+ 232,
303
+ 719,
304
+ 702,
305
+ 808
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "where the constraints prevent the basis vectors of the subspaces from growing while the coefficients decrease (Lee et al., 2007), and where $\\lambda _ { 1 }$ is a scalar controlling the strength of the group sparsity regularizer. In essence, this formulation allows each target sample to be reconstructed from either the shared subspace or the private one, which reduces the influence of the samples from unknown classes on learning the shared representation. ",
312
+ "bbox": [
313
+ 174,
314
+ 814,
315
+ 825,
316
+ 886
317
+ ],
318
+ "page_idx": 2
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "Optimization. To solve equation 2 efficiently, we alternatively update one variable at a time while keeping the other ones fixed. Below, we describe the different updates. ",
323
+ "bbox": [
324
+ 173,
325
+ 895,
326
+ 821,
327
+ 924
328
+ ],
329
+ "page_idx": 2
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Algorithm 1 : FRODA: Factorized Representations for Open-set Domain Adaptation ",
334
+ "text_level": 1,
335
+ "bbox": [
336
+ 173,
337
+ 103,
338
+ 732,
339
+ 118
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "",
346
+ "text_level": 1,
347
+ "bbox": [
348
+ 174,
349
+ 127,
350
+ 220,
351
+ 140
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "$\\pmb { X } _ { s } \\in \\mathbb { R } ^ { D \\times n _ { s } }$ : the source samples $\\pmb { X } _ { t } \\in \\mathbb { R } ^ { D \\times n _ { t } }$ : the target samples $d \\ll D$ : the dimensionality of the subspaces ",
358
+ "bbox": [
359
+ 200,
360
+ 140,
361
+ 493,
362
+ 183
363
+ ],
364
+ "page_idx": 3
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "Output: $\\pmb { \\zeta } \\in \\mathbb { R } ^ { d \\times n _ { s } } , \\pmb { T } \\in \\mathbb { R } ^ { 2 d \\times n _ { t } }$ ",
369
+ "bbox": [
370
+ 173,
371
+ 185,
372
+ 369,
373
+ 214
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "Initialize: ",
380
+ "text_level": 1,
381
+ "bbox": [
382
+ 179,
383
+ 227,
384
+ 250,
385
+ 239
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "$V P C A ( X _ { s } )$ $U \\gets N u l l ( V )$ (i.e., truncated null space of $V$ ) ",
392
+ "bbox": [
393
+ 200,
394
+ 241,
395
+ 517,
396
+ 270
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "1: Compute $\\mathbf { T }$ from equation 5 by proximal gradient descent \n2: Compute $_ { s }$ by solving the linear least-squares problem $\\mathrm { m i n } _ { S } \\| X _ { s } - V S \\| _ { F } ^ { 2 }$ \n3: repeat \n4: Compute $U$ from equation 3 by the Lagrange dual method of (Lee et al., 2007) \n5: Compute $V$ from equation 4 by the Lagrange dual method of (Lee et al., 2007) \n6: Compute $_ { \\mathbf { T } }$ from equation 5 by proximal gradient descent \n7: Compute $_ { s }$ by solving the linear least-squares problem $\\operatorname* { m i n } _ { S } \\| X _ { s } - V S \\| _ { F } ^ { 2 }$ \n8: until convergence ",
403
+ "bbox": [
404
+ 181,
405
+ 281,
406
+ 738,
407
+ 393
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "$\\textbf { { B } }$ -minimization: Given the coefficients $_ { s }$ and $_ { \\mathbf { T } }$ , we update the tuple $( U , V )$ by solving ",
414
+ "bbox": [
415
+ 171,
416
+ 426,
417
+ 758,
418
+ 443
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "equation",
424
+ "img_path": "images/5a9a0aa985c90f4dd588532c6b7ffad64001c89dca70529fb6eafbbff051f83d.jpg",
425
+ "text": "$$\n\\operatorname* { m i n } _ { U } \\quad \\lVert A - U T ^ { u } \\rVert _ { F } ^ { 2 } \\quad s . t . \\sum _ { j = 1 } ^ { d } \\lVert U _ { j } \\rVert ^ { 2 } \\leq 1 ,\n$$",
426
+ "text_format": "latex",
427
+ "bbox": [
428
+ 351,
429
+ 450,
430
+ 643,
431
+ 496
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "with $A = X _ { t } - V T ^ { v }$ , and ",
438
+ "bbox": [
439
+ 174,
440
+ 503,
441
+ 356,
442
+ 518
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "equation",
448
+ "img_path": "images/606708df43996c4c3ee16011056478d696446a214d52ff399281d4c293088779.jpg",
449
+ "text": "$$\n\\operatorname* { m i n } _ { \\pmb { V } } \\quad \\| \\pmb { A } ^ { \\prime } - \\pmb { V T } ^ { v } \\| _ { F } ^ { 2 } + \\alpha \\| \\pmb { X } _ { s } - \\pmb { V S } \\| _ { F } ^ { 2 } \\quad s . t . \\sum _ { j = 1 } ^ { d } \\| \\pmb { V } _ { j } \\| ^ { 2 } \\leq 1 ,\n$$",
450
+ "text_format": "latex",
451
+ "bbox": [
452
+ 284,
453
+ 526,
454
+ 709,
455
+ 571
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "with $A ^ { \\prime } = X _ { t } - U T ^ { u } $ . These two sub-problems can be solved efficiently using the Lagrange dual formulation introduced in (Lee et al., 2007) to update the basis in a standard sparse coding context. ",
462
+ "bbox": [
463
+ 171,
464
+ 580,
465
+ 823,
466
+ 609
467
+ ],
468
+ "page_idx": 3
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "$_ { \\mathbf { T } }$ -minimization: Minimizing equation 2 with respect to $\\mathbf { T }$ , with all other parameters fixed, yields ",
473
+ "bbox": [
474
+ 173,
475
+ 616,
476
+ 813,
477
+ 632
478
+ ],
479
+ "page_idx": 3
480
+ },
481
+ {
482
+ "type": "equation",
483
+ "img_path": "images/06955a667ea2ca0823275ef5c34c9e6f612d7e3b425b334e8688f43b6b265c89.jpg",
484
+ "text": "$$\n\\operatorname* { m i n } _ { \\pmb { T } } \\| \\pmb { X } _ { t } - \\pmb { B } \\pmb { T } \\| _ { F } ^ { 2 } + \\lambda _ { 1 } \\sum _ { i = 1 } ^ { n _ { t } } ( \\| \\pmb { T } _ { i } ^ { v } \\| + \\| \\pmb { T } _ { i } ^ { u } \\| ) ~ ,\n$$",
485
+ "text_format": "latex",
486
+ "bbox": [
487
+ 333,
488
+ 640,
489
+ 661,
490
+ 681
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "which can be solved efficiently via the proximal gradient method (Mairal et al., 2014). In other words, for each target sample, we obtain $_ { \\mathbf { T } }$ using group sparse coding to determine to which representation, shared or private, each target sample belongs. ",
497
+ "bbox": [
498
+ 174,
499
+ 689,
500
+ 823,
501
+ 732
502
+ ],
503
+ "page_idx": 3
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "$_ { s }$ -minimization: Solving equation 2 with respect to $_ { s }$ , with all the other parameters fixed, reduces to a linear least-squares problem, which has a closed-form solution. ",
508
+ "bbox": [
509
+ 173,
510
+ 738,
511
+ 821,
512
+ 766
513
+ ],
514
+ "page_idx": 3
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "To start optimization, we initialize $V$ as the PCA subspace of the source data, and take $U$ as its truncated null space. We then obtain the corresponding $_ { \\mathbf { T } }$ and $_ { s }$ as described above and start iterating. The pseudo-code of FRODA is provided in Algorithm 1. The steps are repeated until convergence, which typically occurs around 50 iterations, with each iteration taking roughly 0.05s. ",
519
+ "bbox": [
520
+ 173,
521
+ 772,
522
+ 825,
523
+ 830
524
+ ],
525
+ "page_idx": 3
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Inference. After obtaining the final $2 d$ -dimensional representation of $_ { \\mathbf { T } }$ for the target samples, we determine if each sample $i$ belongs to known classes or unknown ones based on the coefficients $\\mathbf { \\mathcal { T } } _ { i } ^ { u }$ and $\\mathbf { \\mathit { T } } _ { i } ^ { v }$ . More specifically, given a threshold $\\varepsilon$ , a target sample is assigned to the unknown classes if $\\| \\mathbfcal { T } _ { i } ^ { \\dot { v } } \\| / \\| \\mathbfcal { T } _ { i } ^ { u } \\| \\leq \\varepsilon$ , which suggests that it can be well-reconstructed by the private subspace. In the presence of $C$ known classes, we then train a $( C + 1 )$ -way classifier by augmenting the $d$ - dimensional source data $_ { s }$ , i.e. $S \\in \\mathbb { R } ^ { d \\times n _ { s } }$ , with the target samples $\\mathbf { T } ^ { u }$ identified as unknown. ",
530
+ "bbox": [
531
+ 173,
532
+ 839,
533
+ 825,
534
+ 924
535
+ ],
536
+ "page_idx": 3
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "3.2 D-FRODA: DISCRIMINATIVE FRODA ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 176,
544
+ 103,
545
+ 480,
546
+ 118
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "The formulation above does not make use of the source labels at all during the representation learning stage. As such, it does not encourage the representation to be discriminative. To overcome this, we extend our basic formulation to further account for the classification task at hand. Specifically, let $\\pmb { L } = [ l _ { 1 } \\dots l _ { n _ { s } } ] \\in \\mathbb { R } ^ { C \\times n _ { s } }$ be the matrix containing the source labels, where $\\boldsymbol { l } _ { i } \\in \\mathbb { R } ^ { C }$ represents the one-hot encoding of the label of sample $i$ . We then write our D-FRODA formulation as ",
553
+ "bbox": [
554
+ 173,
555
+ 128,
556
+ 825,
557
+ 200
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "equation",
563
+ "img_path": "images/a4cec1062f3cabe4da7a316f96ab8b73126525037273f676a43ae2a72aa32461.jpg",
564
+ "text": "$$\n\\begin{array} { r l } { \\displaystyle \\underset { U , T , V , S , W } { \\operatorname* { m i n } } } & { \\| X _ { t } - B T \\| _ { F } ^ { 2 } + \\alpha \\| X _ { s } - V S \\| _ { F } ^ { 2 } + \\beta \\| L - W S \\| _ { F } ^ { 2 } + \\lambda _ { 1 } \\displaystyle \\sum _ { i = 1 } ^ { n _ { t } } ( \\| T _ { i } ^ { v } \\| + \\| T _ { i } ^ { u } \\| ) ) } \\\\ { \\displaystyle s . t . } & { \\displaystyle \\displaystyle \\sum _ { j = 1 } ^ { d } \\| U _ { j } \\| ^ { 2 } \\leq 1 , \\displaystyle \\sum _ { j = 1 } ^ { d } \\| V _ { j } \\| ^ { 2 } \\leq 1 , } \\end{array}\n$$",
565
+ "text_format": "latex",
566
+ "bbox": [
567
+ 183,
568
+ 207,
569
+ 797,
570
+ 295
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "where $W \\in \\mathbb { R } ^ { C \\times d }$ is the matrix containing the parameters of a linear classifier for the source data. ",
577
+ "bbox": [
578
+ 169,
579
+ 301,
580
+ 820,
581
+ 318
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Optimization. To optimize equation 6, we follow a similar alternating strategy as before. The $\\textbf { { B } }$ minimization and $_ { \\mathbf { T } }$ -minimization steps are unchanged, but the $\\pmb { S }$ -minimization now incorporates a new term and we further need to solve for the classifier parameters $W$ . This translates to: ",
588
+ "bbox": [
589
+ 174,
590
+ 325,
591
+ 821,
592
+ 368
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "$\\pmb { S }$ -minimization: Minimizing equation 6 with respect to $_ { s }$ , with all the other parameters fixed, still reduces to a linear least-squares problem. The two terms involving $_ { s }$ can be grouped into a single one of the form $\\| X _ { n e w } - V _ { n e w } S \\| _ { F } ^ { 2 }$ , where $X _ { n e w } = \\binom { \\sqrt { \\alpha } X _ { s } } { \\sqrt { \\beta } L }$ and $V _ { n e w } = \\overset { \\overline { { { \\rho } } } } { \\left( \\overset { \\overline { { { \\alpha } } } } { \\sqrt { \\beta } } W \\right) }$ , and thus $_ { s }$ can be obtained in closed form. ",
599
+ "bbox": [
600
+ 173,
601
+ 375,
602
+ 825,
603
+ 448
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "$W$ -minimization: With all the other parameters fixed, finding $W$ corresponds to a linear leastsquares problem, with a closed-form solution. ",
610
+ "bbox": [
611
+ 173,
612
+ 454,
613
+ 823,
614
+ 483
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "Inference. The same inference strategy as before can be followed to label the target samples. Another option here is to make use of $W$ to classify the samples identified as belonging to known classes. We compare these two strategies in our experiments. ",
621
+ "bbox": [
622
+ 173,
623
+ 491,
624
+ 825,
625
+ 535
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "3.3 D-FRODA-U: D-FRODA WITH UNKNOWN SOURCE CLASSES ",
632
+ "text_level": 1,
633
+ "bbox": [
634
+ 174,
635
+ 550,
636
+ 648,
637
+ 565
638
+ ],
639
+ "page_idx": 4
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "Until now, we have tackled the scenario where there are no unknown classes in the source data, which we believe corresponds to the typical application scenario, since the source data can in general be fully annotated. Nevertheless, to match the scenario of Busto & Gall (2017), who assume to have access to additional source samples from unknown classes, yet different from the target unknown classes, we introduce a modified version of our approach that takes such auxiliary data into account. Note that, since one knows which source samples are from unknown classes, it is also possible to simply discard them from training. To nonetheless handle them, we re-write equation 6 as ",
644
+ "bbox": [
645
+ 173,
646
+ 577,
647
+ 826,
648
+ 675
649
+ ],
650
+ "page_idx": 4
651
+ },
652
+ {
653
+ "type": "equation",
654
+ "img_path": "images/a26dca4589c4287166db7102109a80b7876b04b5045729b931a2134125559640.jpg",
655
+ "text": "$$\n\\begin{array} { r l } { \\underset { U , T , V , U ^ { \\prime } , S ^ { \\prime } , W ^ { \\prime } } { \\operatorname* { m i n } } } & { \\| X _ { t } - B \\pmb { T } \\| _ { F } ^ { 2 } + \\alpha \\| X ^ { \\prime } _ { s } - B ^ { \\prime } S ^ { \\prime } \\| _ { F } ^ { 2 } + \\beta \\| \\pmb { L } - W ^ { \\prime } S ^ { \\prime } \\| _ { F } ^ { 2 } } \\\\ & { + \\lambda _ { 1 } \\displaystyle \\sum _ { i = 1 } ^ { n _ { t } } ( \\| \\pmb { T } _ { i } ^ { v } \\| + \\| \\pmb { T } _ { i } ^ { u } \\| ) + \\lambda _ { 2 } \\displaystyle \\sum _ { i = 1 } ^ { n _ { s } } \\big ( \\| \\pmb { S } ^ { \\prime } _ { i } ^ { v } \\| + \\| \\pmb { S } ^ { \\prime } _ { i } ^ { u } \\| \\big ) } \\\\ & { \\qquad \\quad \\ : s . t . \\quad \\displaystyle \\sum _ { j = 1 } ^ { 2 d } \\| \\pmb { B } _ { j } \\| ^ { 2 } \\leq 1 , \\displaystyle \\sum _ { j = 1 } ^ { 2 d } \\| \\pmb { B } ^ { \\prime } _ { j } \\| ^ { 2 } \\leq 1 , } \\end{array}\n$$",
656
+ "text_format": "latex",
657
+ "bbox": [
658
+ 223,
659
+ 679,
660
+ 722,
661
+ 796
662
+ ],
663
+ "page_idx": 4
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "where $X ^ { \\prime } { } _ { s }$ contains the source samples from both known and unknown classes, and $\\mathbf { { } \\delta } B ^ { \\prime } \\mathbf { \\delta } =$ $[ V , U ^ { \\prime } ] \\in \\mathbb { R } ^ { D \\times 2 d }$ denotes the source transformation matrix with $U ^ { \\prime } \\in \\mathbb { R } ^ { D \\times d }$ the private subspace for the source data. Note that, similarly to the target coefficients, we have now separated the source coefficients for each sample ${ \\mathbf { } } S _ { \\mathrm { ~ } { i } } ^ { \\prime }$ into a part corresponding to the shared subspace ${ \\mathbf { } } S _ { \\textit { i } } ^ { \\prime \\ v }$ and a part corresponding to the private one ${ S ^ { \\prime } } _ { i } ^ { u }$ . Note also that the classifier parameters $W ^ { \\prime }$ now account for $C + 1$ classes, the additional class corresponding to the unknown samples. ",
668
+ "bbox": [
669
+ 173,
670
+ 801,
671
+ 825,
672
+ 887
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Optimization. We follow a similar iterative procedure to the one used before, with modifications to update $B ^ { \\prime }$ and $S ^ { \\prime }$ , as discussed below. ",
679
+ "bbox": [
680
+ 173,
681
+ 895,
682
+ 823,
683
+ 924
684
+ ],
685
+ "page_idx": 4
686
+ },
687
+ {
688
+ "type": "table",
689
+ "img_path": "images/8ee7e9346a61f58f347d8877435cc5a9ffe24cc2ce8caac2212b2230efb43686.jpg",
690
+ "table_caption": [
691
+ "Table 1: Recognition accuracies on the 12 source/target pairs of the BCIS dataset (Tommasi & Tuytelaars, 2014) using a linear SVM classifier. B: Bing, C: Caltech256, I: ImageNet, S: SUN. "
692
+ ],
693
+ "table_footnote": [],
694
+ "table_body": "<table><tr><td>Method</td><td>B→C</td><td>B→I</td><td>B→S</td><td>C→B</td><td>C→I</td><td>C→S</td></tr><tr><td colspan=\"2\">TCA (Pan et al.,2011) GFK (Gong et al., 2012)</td><td>62.8±3.8 56.6± 4.5 66.2 ± 4.0 58.3 ±3.1</td><td>29.6± 4.2 23.8 ±2.0</td><td>38.9±1.9 40.2 ± 1.8</td><td>60.2 ± 1.4 62.2 ± 1.5</td><td>29.7± 1.6 28.5 ± 1.0</td></tr><tr><td colspan=\"2\">SA (Fernando et al.,2013) CORAL (Sun et al., 2016)</td><td>66.0±3.4 57.8±3.2</td><td>24.3 ± 2.6</td><td>40.3 ± 1.7</td><td>62.5 ± 0.8</td><td>29.0 ± 1.5</td></tr><tr><td colspan=\"2\">ATI (Busto &amp; Gall, 2017)</td><td>68.8 ±3.3 60.9 ± 2.6</td><td>27.2 ±3.9</td><td>40.7 ± 1.5</td><td>64.0 ± 2.6</td><td>31.4±0.8</td></tr><tr><td colspan=\"2\">AODA (Saito et al., 2018)</td><td>71.4 ± 2.3 69.0±2.8 76.2 ±1.7 70.9 ±3.2</td><td>37.4± 2.6 57.3 ± 1.1</td><td>45.7 ± 3.0 63.5 ± 2.1</td><td>67.9 ± 4.2 73.5 ± 0.8</td><td>37.5 ± 2.7 60.5±0.8</td></tr><tr><td colspan=\"2\">FRODA D-FRODA</td><td>73.8±6.1 71.0± 2.0 74.6 ± 5.5 71.4± 2.0</td><td>54.7 ± 2.9 55.4± 2.7</td><td>67.5 ± 1.4 67.6 ± 1.2</td><td>74.5 ± 1.7 75.0±1.8</td><td>61.6±2.2 61.7 ± 2.1</td></tr><tr><td colspan=\"2\">Method TCA (Pan et al.,2011)</td><td>I→B I→C 40.9±2.9 68.6±1.8</td><td>I→S 34.5±3.8</td><td>S→B 19.4 ± 2.1</td><td>S→C 32.0±3.9</td><td>S→I Avg. 31.1 ± 4.6 42±3.04</td></tr><tr><td colspan=\"2\">GFK(Gong et al.,2012) SA (Fernando et al.,2013) CORAL (Sun et al.,2016)</td><td>42.6 ± 2.4 73.3± 3.6 43.1 ± 1.6 72.8 ± 3.1 44.6 ± 2.5</td><td>32.7± 3.6 32.2±3.7</td><td>16.9 ± 1.5 17.5 ± 1.6</td><td>28.6±3.8 26.4± 1.1 29.2 ± 4.2 27.1 ± 1.3</td><td>41.6 ± 2.5 41.8 ± 2.4</td></tr><tr><td colspan=\"2\">ATI (Busto &amp; Gall,2017) AODA (Saito et al., 2018)</td><td>74.5 ± 3.4 48.8±2.3 77.5 ± 2.2 66.3± 0.9 78.1± 0.9</td><td>35.4 ± 4.4 43.4± 4.8</td><td>18.7 ± 1.2 23.2 ±3.2</td><td>33.6 ± 5.3 31.3 ± 1.3 47.3±2.9</td><td>44.3 ± 2.7 50.2 ± 2.8</td></tr><tr><td colspan=\"2\">FRODA D-FRODA</td><td>66.0±1.9 79.9 ± 1.7 66.4±1.7 80.5 ± 1.6</td><td>59.4± 1.4 59.2± 2.1 55.7 ± 2.5 59.8 ±2.0 55.5 ± 2.4</td><td>56.5 ± 2.6</td><td>33.0 ±1.1 59.6 ±3.1 63.2 ± 1.3 61.2 ± 1.8 59.4± 1.9</td><td>65.4 ±1.7 65.4± 2.3</td></tr></table>",
695
+ "bbox": [
696
+ 176,
697
+ 132,
698
+ 833,
699
+ 348
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "$S ^ { \\prime }$ -minimization: To minimize equation 7 w.r.t. $S ^ { \\prime }$ , with all other parameters fixed, we write ",
706
+ "bbox": [
707
+ 173,
708
+ 361,
709
+ 782,
710
+ 376
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "equation",
716
+ "img_path": "images/83aa450125b6ed8ad171484ca199a1b14a521bc1902386d2cdec09b3ef04749a.jpg",
717
+ "text": "$$\n\\operatorname* { m i n } _ { { \\boldsymbol { S } } ^ { \\prime } } \\quad \\alpha \\| { \\boldsymbol { X } } ^ { \\prime } { \\boldsymbol { s } } - { \\boldsymbol { B } } ^ { \\prime } { \\boldsymbol { S } } ^ { \\prime } \\| _ { F } ^ { 2 } + \\beta \\| { \\boldsymbol { L } } - { \\boldsymbol { W } } ^ { \\prime } { \\boldsymbol { S } } ^ { \\prime } \\| _ { F } ^ { 2 } + \\lambda _ { 2 } \\sum _ { i = 1 } ^ { n _ { s } } \\left( \\| { \\boldsymbol { S } } ^ { \\prime } { \\boldsymbol { s } } ^ { \\prime } \\| + \\| { \\boldsymbol { S } } ^ { \\prime } { \\boldsymbol { u } } \\| \\right) ~ .\n$$",
718
+ "text_format": "latex",
719
+ "bbox": [
720
+ 246,
721
+ 378,
722
+ 746,
723
+ 420
724
+ ],
725
+ "page_idx": 5
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "The first two terms can be grouped into a single squared Frobenius norm, thus resulting in a sparse group lasso problem, which, as when updating $\\mathbf { T }$ in FRODA, can be solved via proximal gradient descent (Mairal et al., 2014). ",
730
+ "bbox": [
731
+ 173,
732
+ 421,
733
+ 825,
734
+ 464
735
+ ],
736
+ "page_idx": 5
737
+ },
738
+ {
739
+ "type": "text",
740
+ "text": "$B ^ { \\prime }$ -minimization: Given the coefficients $S ^ { \\prime ^ { v } }$ and $S ^ { \\prime } { } ^ { u }$ , we can update $U ^ { \\prime }$ by solving ",
741
+ "bbox": [
742
+ 176,
743
+ 469,
744
+ 725,
745
+ 486
746
+ ],
747
+ "page_idx": 5
748
+ },
749
+ {
750
+ "type": "equation",
751
+ "img_path": "images/e064d3974e5e9c0fb0c605063d71cb08f06bd13e992196deb75d0d3a0109b414.jpg",
752
+ "text": "$$\n\\operatorname* { m i n } _ { U ^ { \\prime } } \\quad \\| A - U ^ { \\prime } S ^ { \\prime ^ { \\# } } \\| _ { F } ^ { 2 } \\quad s . t . \\sum _ { j = 1 } ^ { d } \\| U ^ { \\prime } { } _ { j } \\| ^ { 2 } \\leq 1 ,\n$$",
753
+ "text_format": "latex",
754
+ "bbox": [
755
+ 343,
756
+ 488,
757
+ 651,
758
+ 534
759
+ ],
760
+ "page_idx": 5
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "with $A = { X ^ { \\prime } } _ { s } - V { S ^ { \\prime } } ^ { v }$ , and $V$ by solving ",
765
+ "bbox": [
766
+ 173,
767
+ 536,
768
+ 459,
769
+ 553
770
+ ],
771
+ "page_idx": 5
772
+ },
773
+ {
774
+ "type": "equation",
775
+ "img_path": "images/e11cb5d6fcdf5370381a318c998557aef3776053c73c21d1ac6ad328e9b12fe8.jpg",
776
+ "text": "$$\n\\operatorname* { m i n } _ { V } \\quad \\| A ^ { \\prime } - V C \\| _ { F } ^ { 2 } \\quad s . t . \\sum _ { j = 1 } ^ { d } \\| V _ { j } \\| ^ { 2 } \\leq 1 ,\n$$",
777
+ "text_format": "latex",
778
+ "bbox": [
779
+ 352,
780
+ 555,
781
+ 642,
782
+ 599
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "with $A ^ { \\prime } = \\binom { X _ { t } - U T ^ { u } } { \\sqrt { \\alpha } ( X ^ { \\prime } { } _ { s } - U ^ { \\prime } S ^ { \\prime } { } ^ { u } ) }$ and $C = \\left( \\underset { \\sqrt { \\alpha } S ^ { \\prime } } { \\mathbf { \\nabla } } \\right)$ . As in FRODA, these two sub-problems can be solved efficiently using the Lagrange dual formulation of Lee et al. (2007). ",
789
+ "bbox": [
790
+ 174,
791
+ 603,
792
+ 825,
793
+ 650
794
+ ],
795
+ "page_idx": 5
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "4 EXPERIMENTS ",
800
+ "text_level": 1,
801
+ "bbox": [
802
+ 174,
803
+ 665,
804
+ 328,
805
+ 681
806
+ ],
807
+ "page_idx": 5
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "We evaluate our approach on the task of open-set visual domain adaptation using two benchmark datasets, and compare its performance against the state-of-the-art open-set domain adaptation methods on each dataset.1 Note that we also report the results of the methods used as baselines in (Busto & Gall, 2017). For a dataset with $C$ source classes, we report the accuracy on $C + 1$ classes, the additional one corresponding to the unknown case. ",
812
+ "bbox": [
813
+ 173,
814
+ 688,
815
+ 825,
816
+ 758
817
+ ],
818
+ "page_idx": 5
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Implementation details. Following Busto & Gall (2017), we represent the source and target samples with 4096-dimensional $D e C A F _ { 7 }$ features (Donahue et al., 2013) and first reduce their dimensionality by performing PCA jointly on the source and target data and keeping the components encoding $9 9 \\%$ of the data variance. To then determine the dimensionality $d$ of our shared and private subspaces, we make use of the subspace disagreement measure of (Gong et al., 2012). For all our experiments, the hyperparameters of our approach were set as follows: $\\alpha = 0 . 1$ , $\\beta = 0 . 0 1$ , $\\lambda _ { 1 } = 0 . 0 0 1$ , $\\lambda _ { 2 } = 0 . 0 0 1$ and $\\varepsilon = 0 . 2$ . For recognition, for the comparison with (Busto & Gall, 2017) to be fair, we employ a linear SVM classifier in a one-vs-one fashion. Nevertheless, we also report results obtained with a $k$ −Nearest-Neighbor classifier (with $k = 3$ ) and with our linear classifier with parameters $W$ learnt during training. ",
823
+ "bbox": [
824
+ 173,
825
+ 761,
826
+ 825,
827
+ 901
828
+ ],
829
+ "page_idx": 5
830
+ },
831
+ {
832
+ "type": "table",
833
+ "img_path": "images/a518c73202ee86aca28c5911a774c9336b156fd29f7e95cc8643bf18110f8ee9.jpg",
834
+ "table_caption": [
835
+ "Table 2: Recognition accuracies of variants of our approach using linear SVM, nearest neighbor (NN) and our linear classifier $( W )$ on the 12 source/target pairs of the BCIS dataset (Tommasi & Tuytelaars, 2014). B: Bing, C: Caltech256, I: ImageNet, S: SUN. "
836
+ ],
837
+ "table_footnote": [],
838
+ "table_body": "<table><tr><td>Method</td><td>B→C</td><td>B→I</td><td>B→S</td><td>C→B</td><td>C→I</td><td></td><td>C→S</td></tr><tr><td>FRODA-SVM</td><td>73.8±6.1</td><td>71.0±2.0 64.1 ± 2.4</td><td>54.7±2.9 54.4 ±3.5</td><td>67.5 ± 1.4 65.1 ± 2.9</td><td>74.5 ± 1.7 72.9 ±1.7</td><td></td><td>61.6± 2.2</td></tr><tr><td>FRODA-NN D-FRODA-SVM D-FRODA-W</td><td>67.7 ±2.8 74.6± 5.5 61.2 ± 1.2</td><td>71.4± 2.0 59.3 ± 1.1</td><td>55.4± 2.7 53.3 ± 3.0</td><td>67.6±1.2 63.1±0.9</td><td>75.0±1.8 66.2 ± 1.7</td><td></td><td>60.5 ± 2.0 61.7± 2.1 60.2 ± 2.1</td></tr><tr><td>D-FRODA-NN D-FRODA-U-SVM D-FRODA-U-W</td><td>67.7 ± 3.3 71.9±3.8 55.9 ± 3.6</td><td>63.3 ± 2.8 69.2± 2.7 55.5± 4.5</td><td>54.0 ± 3.5 56.7± 3.3 41.7 ± 4.8</td><td>65.4± 2.8 64.8±1.8 52.6 ± 4.7</td><td>73.4 ± 1.5 72.8±2.7 61.4 ± 3.6</td><td></td><td>60.3 ± 2.4 59.4± 2.3 49.5 ± 4.1</td></tr><tr><td>D-FRODA-U-NN</td><td>57.6 ± 9.1</td><td>52.2 ± 5.0</td><td>47.5 ± 6.5</td><td>51.8±5.7</td><td>64.0±5.7</td><td></td><td>57.7 ± 5.6</td></tr><tr><td>Method</td><td>I→B</td><td>I→C</td><td>I→S</td><td>S→B</td><td>S→C</td><td>S→I</td><td>Avg.</td></tr><tr><td>FRODA-SVM FRODA-NN</td><td>66.0±1.9 60.9 ± 3.7</td><td>79.9 ± 1.7 77.7 ± 2.8</td><td>59.2 ± 2.1 58.0± 2.2</td><td>55.7± 2.5 53.4 ± 2.2</td><td>61.2 ± 1.8</td><td>59.4 ± 1.9</td><td>65.4</td></tr><tr><td>D-FRODA-SVM</td><td>66.4±1.7</td><td>80.5±1.6</td><td>59.8± 2.0</td><td>55.5± 2.4</td><td>61.2 ± 1.4 61.2 ± 1.9</td><td>58.1 ± 1.5 59.6±2.2</td><td>62.8 65.7</td></tr><tr><td>D-FRODA-W</td><td>62.2 ± 1.6</td><td>70.5 ± 2.5</td><td>58.1 ± 1.7</td><td>56.4 ±1.9</td><td>58.9 ± 1.5</td><td>58.5±0.7</td><td>60.7</td></tr><tr><td>D-FRODA-NN D-FRODA-U-SVM</td><td>60.9 ± 4.1</td><td>78.7± 2.8</td><td>57.7± 2.0</td><td>53.0±2.3</td><td>61.2 ±1.2</td><td>57.9 ± 1.6</td><td>62.8</td></tr><tr><td></td><td>66.0± 1.2</td><td>76.8± 1.9</td><td>57.2 ± 4.5</td><td>56.3±1.9</td><td>61.8± 3.0</td><td>59.9±1.7</td><td>64.4</td></tr><tr><td>D-FRODA-U-W</td><td>54.6 ± 4.4</td><td>66.2 ±3.8</td><td>43.9 ± 5.4</td><td>47.6 ± 3.8</td><td></td><td>51.3 ±3.7</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>53.5 ± 4.9</td><td></td><td>52.8</td></tr><tr><td></td><td>58.4±6.1</td><td>70.9 ± 4.5</td><td>52.8 ±9.0</td><td>55.4 ± 2.0</td><td></td><td></td><td></td></tr><tr><td>D-FRODA-U-NN</td><td></td><td></td><td></td><td></td><td>61.5 ± 2.0</td><td>60.1 ±1.7</td><td>57.5</td></tr></table>",
839
+ "bbox": [
840
+ 176,
841
+ 143,
842
+ 831,
843
+ 383
844
+ ],
845
+ "page_idx": 6
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "Results on the dense cross-dataset benchmark. We first evaluate our approach on the challenging cross-dataset benchmark of Tommasi & Tuytelaars (2014). This dataset was built using images depicting 40 object categories and coming from four datasets, namely Bing (B), Caltech256 (C), ImageNet (I) and SUN (S), hence referred to as BCIS. Following Busto & Gall (2017), we consider the samples from the first 10 classes as known instances, while the samples with class labels $1 1 , 1 2 , \\cdots , 2 5$ and $2 6 , 2 7 , \\cdots , 4 0$ are taken to be the unknown samples in the source and target domains, respectively. We follow the unsupervised protocol of Tommasi & Tuytelaars (2014), which relies on 50 source samples per class and 30 target images per class, except when the target data is coming from SUN, in which case only 20 images per class are employed. Note that only the $D e C A F _ { 7 }$ features are publicly available. To nonetheless evaluate the AODA method of Saito et al. (2018), we made use of a network taking the $D e C A F _ { 7 }$ features as input and processing them with two fully-connected layers, with 1024 and 128 units, respectively, and a final classification layer. ",
850
+ "bbox": [
851
+ 173,
852
+ 402,
853
+ 825,
854
+ 569
855
+ ],
856
+ "page_idx": 6
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "In Table 1, we compare the results of our methods with those of the baselines on all 12 domain pairs of this dataset. Note that our algorithms (both with and without the discriminative term) outperform all the baselines, and in particular the state-of-the-art one of Busto & Gall (2017) by a large margin. For instance, the margin exceeds 32, resp. 26, percentage points when going from SUN to Bing and ImageNet, respectively. This, we believe, clearly evidences the benefits of our factorized representations, which allow us to separate the unknown target samples from the ones coming from known classes, thus yielding a better representation for the known classes. ",
861
+ "bbox": [
862
+ 173,
863
+ 575,
864
+ 825,
865
+ 674
866
+ ],
867
+ "page_idx": 6
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "In Table 2, we compare different versions of our method, corresponding to using different classifiers and to using additional unknown source data. Note that the linear SVM classifier, when used with our framework, tends to perform the best, followed by the NN one and finally the learnt linear classifier. This, we believe, can be explained by the fact that, while the linear classifier helps to learn a more discriminative representation, it remains less powerful than the other two classifiers to label the target samples. Note also that the use of unknown source data does not consistently help in our framework. Nevertheless, the corresponding results still outperform those of Busto & Gall (2017). ",
872
+ "bbox": [
873
+ 174,
874
+ 681,
875
+ 485,
876
+ 888
877
+ ],
878
+ "page_idx": 6
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "We further evaluate the robustness of our approach to the choice of threshold $\\varepsilon$ to separate the target samples from known/unknown classes. In ",
883
+ "bbox": [
884
+ 173,
885
+ 896,
886
+ 826,
887
+ 924
888
+ ],
889
+ "page_idx": 6
890
+ },
891
+ {
892
+ "type": "image",
893
+ "img_path": "images/f6e8307a91cba11a9779b2312f183596f19aa74ded692c38ca1f932f398ec5fb.jpg",
894
+ "image_caption": [
895
+ "Figure 1: Sensitivity to $\\varepsilon$ "
896
+ ],
897
+ "image_footnote": [],
898
+ "bbox": [
899
+ 500,
900
+ 681,
901
+ 818,
902
+ 878
903
+ ],
904
+ "page_idx": 6
905
+ },
906
+ {
907
+ "type": "table",
908
+ "img_path": "images/6af5dcaeacd2773b50d2e1e0ede51fb7a086b5fe46272a7400190bc2ae5d4a5d.jpg",
909
+ "table_caption": [
910
+ "Table 3: Recognition accuracies on the 6 source/target pairs of the Office dataset (Saenko et al., 2010) using a linear SVM classifier. A: Amazon, W: Webcam, D: DSLR. "
911
+ ],
912
+ "table_footnote": [],
913
+ "table_body": "<table><tr><td>Method</td><td>A→D A→W</td><td></td><td>W→A</td><td>W→D</td><td>D→A</td><td>D →W</td><td>Avg.</td></tr><tr><td>LSVM</td><td>72.6</td><td>57.5</td><td>49.2</td><td>98.8</td><td>45.1</td><td>88.5</td><td>68.6</td></tr><tr><td>DAN (Long et al.,2016a)</td><td>77.6</td><td>72.5</td><td>60.8</td><td>98.3</td><td>57</td><td>88.4</td><td>75.8</td></tr><tr><td>RTN (Long et al., 2016b)</td><td>76.6</td><td>73</td><td>62.4</td><td>98.8</td><td>57.2</td><td>89</td><td>76.2</td></tr><tr><td>BP(Ganin &amp; Lempitsky,2014)</td><td>78.3</td><td>75.9</td><td>64</td><td>98.7</td><td>57.6</td><td>89.8</td><td>77.4</td></tr><tr><td>ADDA (Tzeng et al.,2017)</td><td>52.5</td><td>58.3</td><td>54.1</td><td>89.1</td><td>45.3</td><td>79.1</td><td>63.1</td></tr><tr><td>DSN (Bousmalis et al.,2016)</td><td>58.3</td><td>57.2</td><td>55.1</td><td>79.3</td><td>58.1</td><td>70.2</td><td>63.0</td></tr><tr><td>ATI (Busto &amp; Gall,2017)</td><td>79.8</td><td>78.4</td><td>76.7</td><td>98.8</td><td>71.3</td><td>94.4</td><td>83.2</td></tr><tr><td>AODA (Saito et al.,2018)</td><td>76.6</td><td>74.9</td><td>81.2</td><td>96.9</td><td>62.3</td><td>94.6</td><td>81.1</td></tr><tr><td>FRODA</td><td>88.0</td><td>78.7</td><td>76.5</td><td>98.0</td><td>73.7</td><td>94.6</td><td>84.9</td></tr><tr><td>D-FRODA</td><td>87.4</td><td>78.1</td><td>77.1</td><td>98.5</td><td>73.6</td><td>94.4</td><td>84.9</td></tr></table>",
914
+ "bbox": [
915
+ 176,
916
+ 132,
917
+ 825,
918
+ 275
919
+ ],
920
+ "page_idx": 7
921
+ },
922
+ {
923
+ "type": "table",
924
+ "img_path": "images/7371dcf571c6a2370810a973499090f8b06cbfba572289f2e1864fba2a9e6a42.jpg",
925
+ "table_caption": [
926
+ "Table 4: Recognition accuracies of variants of our approaches using a linear SVM, nearest neighbor (NN) and our linear classifier $( W )$ on the 6 source/target pairs of the Office dataset (Saenko et al., 2010). "
927
+ ],
928
+ "table_footnote": [],
929
+ "table_body": "<table><tr><td>Method</td><td colspan=\"6\">A→D A→W W→A W→D D→A</td><td>D→W Avg.</td></tr><tr><td>FRODA-SVM FRODA-NN</td><td>88.0 83.9</td><td>78.7 69.5</td><td>76.5 75.0</td><td>98.0 97.7</td><td>73.7 69.0</td><td>94.6 83.9</td><td>84.9 79.8</td></tr><tr><td>D-FRODA-SVM D-FRODA-NN</td><td>87.4</td><td>78.1 70.1</td><td>77.1 75.1</td><td>98.5 96.8</td><td>73.6 69.2</td><td>94.4 84.5</td><td>84.9 79.9</td></tr><tr><td>D-FRODA-W</td><td>83.9 71.1</td><td>65.3</td><td>68.1</td><td>83.0</td><td>67.3</td><td>79.1</td><td>72.3</td></tr><tr><td>D-FRODA-U-SVM</td><td>81.9</td><td>83.5</td><td>75.5</td><td>96.2</td><td>70.6</td><td>94.2</td><td>83.7</td></tr><tr><td>D-FRODA-U-NN</td><td>78.1</td><td>72.1</td><td>69.1</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>93.6</td><td>67.0</td><td>75.7</td><td>75.9</td></tr><tr><td>D-FRODA-U-W</td><td>73.4</td><td>65.9</td><td>62.8</td><td>88.0</td><td>61.7</td><td>65.1</td><td>69.5</td></tr></table>",
930
+ "bbox": [
931
+ 179,
932
+ 328,
933
+ 821,
934
+ 463
935
+ ],
936
+ "page_idx": 7
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "Fig. 1, we plot the average accuracy over all 12 pairs of the BCIS dataset as a function of the value of ε. Note that, once a sufficiently large threshold is reached, the results are quite stable. This indicates that our algorithm is robust to the specific value of this hyperparameter. ",
941
+ "bbox": [
942
+ 173,
943
+ 496,
944
+ 825,
945
+ 539
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Results on the Office dataset. We further evaluate our approach on the slightly less challenging, although standard Office benchmark (Saenko et al., 2010). This dataset contains three different domains, namely Amazon (A), DSLR (D) and Webcam (W), sharing 31 object categories, but differing in data acquisition process. As in (Busto & Gall, 2017), we take all the samples from the first 10 classes to represent the known ones, and all the samples with class labels $1 1 , 1 2 , \\cdots , 2 0$ and $2 1 , 2 2 , \\cdots , 3 1$ as unknown source and target data, respectively. ",
952
+ "bbox": [
953
+ 173,
954
+ 563,
955
+ 825,
956
+ 647
957
+ ],
958
+ "page_idx": 7
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "We report the results of our algorithms and of the baselines for all 6 domain pairs of this dataset in Table 3. As before, note that we outperform the baselines in this open-set scenario. This includes the end-to-end AlexNet-based approach of Saito et al. (2018) for open-set domain adaptation, as well as the state-of-the-art UDA methods of Tzeng et al. (2017) and Bousmalis et al. (2016), the latter of which is closest in spirit to our approach. In Table 4, we compare the different variants of our approach. The conclusions that one can draw from these results are similar to those for the BCIS dataset, thus showing that our method generalizes well across different domain adaptation datasets. ",
963
+ "bbox": [
964
+ 174,
965
+ 654,
966
+ 825,
967
+ 752
968
+ ],
969
+ "page_idx": 7
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "To evaluate the robustness of our method to the hyper-parameters $\\alpha , \\beta$ , and $\\lambda _ { 1 }$ , in Fig. 2, we plot the average accuracy of D-FRODA-NN (with $k = 3$ ) over all 6 pairs of the Office dataset as a function of the value of $\\alpha$ , $\\beta$ , and $\\lambda _ { 1 }$ . Note that our results are stable for large ranges of these values. ",
974
+ "bbox": [
975
+ 174,
976
+ 758,
977
+ 825,
978
+ 801
979
+ ],
980
+ "page_idx": 7
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "Runtimes. As mentioned in Section 3, one iteration of our approach takes on average 0.05 second, and our algorithm typically takes around 50 iterations to converge. This yields a total runtime of roughly 2.5 seconds. By contrast, the publicly available implementation of the method of Busto & Gall (2017) takes on average 8 seconds per iteration and typically converges in 4 iterations, leading to a total runtime of roughly 32 seconds. Note that these runtimes were measured on the same computer and that both methods rely on the same input features. Therefore, our approach is not only significantly more accurate than (Busto & Gall, 2017), but also faster by an order of magnitude. ",
985
+ "bbox": [
986
+ 174,
987
+ 825,
988
+ 825,
989
+ 924
990
+ ],
991
+ "page_idx": 7
992
+ },
993
+ {
994
+ "type": "image",
995
+ "img_path": "images/7d2f29cf4001d94a3f3885b5178acbf97ec3cb8dc7e43ac7475f30850d87875b.jpg",
996
+ "image_caption": [
997
+ "Figure 2: Sensitivity to $\\alpha$ , $\\beta$ , and $\\lambda _ { 1 }$ . "
998
+ ],
999
+ "image_footnote": [],
1000
+ "bbox": [
1001
+ 174,
1002
+ 98,
1003
+ 820,
1004
+ 229
1005
+ ],
1006
+ "page_idx": 8
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Further discussion: The experimental setup used in (Saito et al., 2018; Busto & Gall, 2017) and our work for open-set DA relies on features extracted using a network pre-trained on ImageNet, which in fact can be argued to already contain semantic information about some of the unknown classes. To evidence that our approach does not crucially depend on this information, and thus validate our results, we observed that 4 of the unknown classes in the Office dataset, namely Tape dispenser, Stapler, Scissors, Punchers, do not appear in ImageNet. We therefore performed additional experiments with only these classes as unknown ones and the same 10 known classes as before. We compared the accuracy of our formulations against the SVM baseline and the open-set ATI method of Busto & Gall (2017). The gap with respect to both baselines remains large: SVM: $7 6 . 0 1 \\%$ , ATI: $7 7 . 4 \\%$ , D-FRODA: $78 . 2 \\%$ , and FRODA: $78 . 5 \\%$ . This confirms that our method applies to truly never-seen-before classes. ",
1011
+ "bbox": [
1012
+ 173,
1013
+ 279,
1014
+ 825,
1015
+ 431
1016
+ ],
1017
+ "page_idx": 8
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "Note that among the 15 unknown classes in the setup for BCIS, 8 of them are not shared with ImageNet, namely Windmill, Steering wheel, Can-soda, Sneaker, Skyscraper, Ladder, Motorcycle, and Palm tree. This further confirms that our method handles the cases where no categorical or semantic information is available in the extracted features. ",
1022
+ "bbox": [
1023
+ 174,
1024
+ 439,
1025
+ 825,
1026
+ 494
1027
+ ],
1028
+ "page_idx": 8
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "5 CONCLUSION ",
1033
+ "text_level": 1,
1034
+ "bbox": [
1035
+ 176,
1036
+ 516,
1037
+ 318,
1038
+ 532
1039
+ ],
1040
+ "page_idx": 8
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "We have introduced a novel approach to open-set domain adaptation, based on the intuition that source and target samples coming from the same, known classes can be represented by a shared subspace, while target samples from unknown classes should be modeled with a private subspace. Each step of the resulting algorithms can be solved efficiently. As demonstrated by our experiments, our method outperforms the state of the art in open-set domain adaptation and is one order of magnitude faster than the technique of Busto & Gall (2017). We believe that this clearly evidences the benefits of learning factorized representations, which allows us to jointly discard the unknown target samples and learn a better shared representation. In the future, we will investigate ways to make better use of unknown source data, and to exploit more effective classifiers, such as SVM, directly within our D-FRODA formulation. ",
1045
+ "bbox": [
1046
+ 174,
1047
+ 549,
1048
+ 825,
1049
+ 688
1050
+ ],
1051
+ "page_idx": 8
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "REFERENCES ",
1056
+ "text_level": 1,
1057
+ "bbox": [
1058
+ 174,
1059
+ 710,
1060
+ 285,
1061
+ 726
1062
+ ],
1063
+ "page_idx": 8
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "M. Baktashmotlagh, M. Harandi, B. Lovell, and M. Salzmann. Unsupervised domain adaptation by domain invariant projection. In Proc. Int. Conference on Computer Vision, 2013. \nM. Baktashmotlagh, M. Harandi, B. Lovell, and M. Salzmann. Domain adaptation on statistical manifold. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2014. \nA. Bendale and T. Boult. Towards open world recognition. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2015. \nK. Bousmalis, G. Trigeorgis, N. Silberman, D. Krishnan, and D. Erhan. Domain separation networks. In Proc. Advances in Neural Information Processing Systems, 2016. \nP. Busto and J. Gall. Open set domain adaptation. In Proc. Int. Conference on Computer Vision, 2017. \nBalakrishnan S. Chopra S. and Gopalan R. Dlid: Deep learning for domain adaptation by interpolating between domains. In ICML workshop on Challenges in Representation Learning, 2013. \nJ. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Proc. Int. Conference on Machine Learning, 2013. \nB. Fernando, A. Habrard, M. Sebban, and T. Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In Proc. Int. Conference on Computer Vision, 2013. \nY. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. \nM. Ghifary, Bastiaan W. Kleijn, M. Zhang, D. Balduzzi, and W. Li. Deep reconstructionclassification networks for unsupervised domain adaptation. In Proc. European Conference on Computer Vision, 2016. \nB. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2012. \nB. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In Proc. Int. Conference on Machine Learning, 2013. \nR. Gopalan, R. Li, and R. Chellappa. Unsupervised adaptation across domain shifts by generating intermediate data representations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014. \nY. Jia, M. Salzmann, and T. Darrell. Factorized latent spaces with structured sparsity. In Proc. Advances in Neural Information Processing Systems, 2010. \nH. Lee, A. Battle, R. Raina, and A. Ng. Efficient sparse coding algorithms. In Proc. Advances in Neural Information Processing Systems, 2007. \nM. Long, Y. Cao, J. Wang, and M. Jordan. Learning transferable features with deep adaptation networks. arXiv preprint arXiv:1502.02791, 2015. \nM. Long, J. Wang, and M. Jordan. Deep transfer learning with joint adaptation networks. corr, vol. arXiv preprint arXiv:1605.06636, 2016a. \nM. Long, H. Zhu, J. Wang, and M. Jordan. Unsupervised domain adaptation with residual transfer networks. In Proc. Advances in Neural Information Processing Systems, 2016b. \nJ. Mairal, F. Bach, J. Ponce, G. Sapiro, R. Jenatton, and G. Obozinski. Spams: A sparse modeling software, v2. 3. URL http://spams-devel. gforge. inria. fr/downloads.html, 2014. \nS. Pan, I. Tsang, J. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. IEEE Transactions on Neural Networks, 2011. \nJ Quiñonero C., M. Sugiyama, A. Schwaighofer, and N. Lawrence. Covariate shift by kernel mean matching. Dataset Shift in Machine Learning, 2009. \nA. Rozantsev, M. Salzmann, and P. Fua. Beyond sharing weights for deep domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018. \nK. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In Proc. European Conference on Computer Vision, 2010. \nK. Saito, S. Yamamoto, Y. Ushiku, and T. Harada. Open set domain adaptation by backpropagation. Proc. European Conference on Computer Vision, 2018. \nW. J Scheirer, L. Jain, and T. Boult. Probability models for open set recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014. \nB. Sun and K. Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Proc. European Conference on Computer Vision, 2016. \nB. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI Conference on Artificial Intelligence, 2016. \nT. Tommasi and T. Tuytelaars. A testbed for cross-dataset analysis. In Proc. European Conference on Computer Vision, 2014. \nE. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. \nE. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In Proc. Int. Conference on Computer Vision, 2015. \nE. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2017. \nH. Yan, Y. Ding, P. Li, Q. Wang, Y. Xu, and W. Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. arXiv preprint arXiv:1705.00609, 2017. ",
1068
+ "bbox": [
1069
+ 169,
1070
+ 734,
1071
+ 826,
1072
+ 922
1073
+ ],
1074
+ "page_idx": 8
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "",
1079
+ "bbox": [
1080
+ 169,
1081
+ 85,
1082
+ 828,
1083
+ 928
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "",
1090
+ "bbox": [
1091
+ 171,
1092
+ 102,
1093
+ 828,
1094
+ 361
1095
+ ],
1096
+ "page_idx": 10
1097
+ }
1098
+ ]
parse/train/SJe3HiC5KX/SJe3HiC5KX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJe3HiC5KX/SJe3HiC5KX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgC6TNFvr/SkgC6TNFvr.md ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REINFORCED ACTIVE LEARNING FOR IMAGE SEGMENTATION
2
+
3
+ Arantxa Casanova∗
4
+ École Polytechnique de Montréal
5
+ Mila, Quebec Artificial Intelligence Institute
6
+ ElementAI
7
+
8
+ Pedro O. Pinheiro ElementAI
9
+
10
+ Negar Rostamzadeh ElementAI
11
+
12
+ Christopher J. Pal
13
+ École Polytechnique de Montréal
14
+ Mila, Quebec Artificial Intelligence Institute
15
+ ElementAI
16
+
17
+ # ABSTRACT
18
+
19
+ Learning-based approaches for semantic segmentation have two inherent challenges. First, acquiring pixel-wise labels is expensive and time-consuming. Second, realistic segmentation datasets are highly unbalanced: some categories are much more abundant than others, biasing the performance to the most represented ones. In this paper, we are interested in focusing human labelling effort on a small subset of a larger pool of data, minimizing this effort while maximizing performance of a segmentation model on a hold-out set. We present a new active learning strategy for semantic segmentation based on deep reinforcement learning (RL). An agent learns a policy to select a subset of small informative image regions – opposed to entire images – to be labeled, from a pool of unlabeled data. The region selection decision is made based on predictions and uncertainties of the segmentation model being trained. Our method proposes a new modification of the deep Q-network (DQN) formulation for active learning, adapting it to the large-scale nature of semantic segmentation problems. We test the proof of concept in CamVid and provide results in the large-scale dataset Cityscapes. On Cityscapes, our deep RL region-based DQN approach requires roughly $30 \%$ less additional labeled data than our most competitive baseline to reach the same performance. Moreover, we find that our method asks for more labels of under-represented categories compared to the baselines, improving their performance and helping to mitigate class imbalance.
20
+
21
+ # 1 INTRODUCTION
22
+
23
+ Semantic segmentation, the task of labelling an image pixel-by-pixel with the category it belongs to, is critical for a variety of applications such as autonomous driving (Müller et al., 2018; Wang & Pan, 2018), robot manipulation (Schwarz et al., 2018), embodied question answering (Yu et al., 2019) and biomedical image analysis (Ronneberger et al., 2015). Convolutional neural networks (Lecun et al., 1998)-based methods have achieved excellent results on large-scale supervised semantic segmentation, in which we assume pixel-level annotations are available (Farabet et al., 2013; Pinheiro & Collobert, 2014; Long et al., 2015). For such models to work, however, they need a large amount of pixel-level annotations that may require costly human labor (Cordts et al., 2016; Bearman et al., 2016).
24
+
25
+ Current semantic segmentation datasets have pixel-wise annotations for each image. This standard approach has two important issues: (i) pixel-level labelling is extremely time consuming. For example, annotation and quality control required more than $1 . 5 \mathrm { h }$ per image (on average) on Cityscapes (Cordts et al., 2016), a popular dataset used for benchmarking semantic segmentation methods. (ii) Class imbalance in the data is typically extreme. Certain categories (such as ‘building’ or ‘sky’) can appear with two orders of magnitude more frequently than others (e.g. ‘pedestrian’ or ‘bicycle’). This can lead to undesired biases and performance properties for learned models.
26
+
27
+ ![](images/019c005408e6ebec987244e1d6a537172ea85946059cd775443d3f29074dde5f.jpg)
28
+ Figure 1: (Left) Input image from Cityscapes dataset (Cordts et al., 2016), with selected regions by our method to be labeled. (Right) Retrieved ground truth annotation for the selected regions. Our method focuses on small objects and under-represented classes, such as bicycles, pedestrians and poles. Best viewed in color.
29
+
30
+ This is specially relevant when we want to collect annotated data with a human in the loop to create a new dataset or to add more labeled data to an existing one. We can tackle the aforementioned problems by selecting, in an efficient and effective way, which regions of the images should be labeled next. Active learning (AL) is a well-established field that studies precisely this: selecting the most informative samples to label so that a learning algorithm will perform better with less data than a non-selective approach, such as labelling the entire collection of data. Active learning methods can be roughly divided in two groups: (i) methods that combine different manually-designed AL strategies (Roy & McCallum, 2001; Osugi et al., 2005; Gal et al., 2017; Baram et al., 2004; Chu & Lin, 2016; Hsu & Lin, 2015; Ebert et al., 2012; Long & Hua, 2015) and (ii) data-driven AL approaches (Bachman et al., 2017; Fang et al., 2017; Konyushkova et al., 2017; Woodward & Finn, 2016; Ravi & Larochelle, 2018; Konyushkova et al., 2018), that learn which samples are most informative to train a model using information of the model itself. Although label acquisition for semantic segmentation is more costly and time consuming than image classification, there has been considerably less work in active learning for semantic segmentation (Dutt Jain & Grauman, 2016; Mackowiak et al., 2018; Vezhnevets et al., 2012; Konyushkova et al., 2015; Gorriz et al., 2017; Yang et al., 2017), and they focus on hand-crafted strategies.
31
+
32
+ Current AL techniques that use reinforcement learning (Konyushkova et al., 2018; Fang et al., 2017; Woodward & Finn, 2016; Pang et al., 2018; Padmakumar et al., 2018; Bachman et al., 2017) focus on labelling one sample per step until a budget of labels is met. In semantic segmentation, this would translate into labelling a single region per step. This is highly inefficient, since each step involves updating the segmentation network and computing the rewards. In this work, we propose an end-to-end method to learn an active learning strategy for semantic segmentation with reinforcement learning by directly maximizing the performance metric we care about, Intersection over Union (IoU). We aim at learning a policy from the data that finds the most informative regions on a set of unlabeled images and asks for its labels, such that a segmentation network can achieve high-quality performance with a minimum number of labeled pixels. Selecting regions, instead of entire images, allows the algorithm to focus on the most relevant parts of the images, as shown in Figure 1. Although class imbalance in segmentation datasets has been previously addressed in (Badrinarayanan et al., 2017; Chan et al., 2019; Sudre et al., 2017), among others, they try to solve a problem that arises from the data collection process. We show that our proposed method can help mitigate the problem at its source, i.e. in the data annotation itself. Because our method maximizes the mean IoU per class, it indirectly learns to ask for more labels of regions with under-represented classes, compared to the baselines. Moreover, we propose and explore a batch-mode active learning approach that uses an adapted DQN to efficiently chose batches of regions for labelling at each step.
33
+
34
+ To the best of our knowledge, all current approaches for active learning in semantic segmentation rely on hand-crafted active learning heuristics. However, learning a labelling policy from the data could allow the query agent to ask for labeled data as a function of the data characteristics and class imbalances, that may vary between datasets. Our main contributions can be summarized as follows: (i) we learn a RL-based acquisition function for region-based active learning for segmentation, (ii) we formulate our active learning framework with a batch-mode DQN, which labels multiple regions in parallel at each active learning iteration (a more efficient strategy for large-scale datasets that is compatible with standard mini-batch gradient descent), and (iii) we test the proof of concept in CamVid (Brostow et al., 2008) dataset and provide results in Cityscapes (Cordts et al., 2016) dataset, beating a recent state-of-the-art technique known as BALD (Gal et al., 2017), a widely used entropy-based selection criterion and uniform sampling baselines.
35
+
36
+ # 2 RELATED WORK
37
+
38
+ Active learning. Traditional active learning techniques focus on estimating the sample informativeness using hand-crafted heuristics derived from sample uncertainty: employing entropy (Shannon, 1948), query-by-committee (Dagan & Engelson, 1995; Shannon, 1948; Freund et al., 1993), maximizing the error reduction (Roy & McCallum, 2001), disagreement between experts (Dagan & Engelson, 1995; Freund et al., 1993) or Bayesian methods that need to estimate the posterior distribution (Houlsby et al., 2011a; Gal et al., 2017). Some approaches combine different techniques to improve AL performance. For instance, relying on exploration-exploitation trade-offs (Osugi et al., 2005), on a bandit formulation (Baram et al., 2004; Chu & Lin, 2016; Hsu & Lin, 2015) and on reinforcement learning (Ebert et al., 2012; Long & Hua, 2015). However, these methods are still limited in the sense that they combine hand-crafted strategies instead of learning new ones. More recent active learning methods rely on an acquisition function that estimates the sample informativeness with a learned metric. Konyushkova et al. (2017) estimate the error reduction of labelling a particular sample, choosing the ones that maximize the error reduction. Wang et al. (2017) introduce a cost-effective approach that also uses confident predictions as pseudo ground truth labels.
39
+
40
+ AL with reinforcement learning. Recently, reinforcement learning has gained attention as a method to learn a labelling policy that directly maximizes the learning algorithm performance. For instance, Liu et al. (2018); Bachman et al. (2017) leverage expert knowledge from oracle policies to learn a labelling policy, and Pang et al. (2018); Padmakumar et al. (2018) rely on policy gradient methods to learn the acquisition function. In a different approach, some methods gather all labeled data in one big step. In Contardo et al. (2017), all samples are chosen in one step with a bi-directional RNN for the task of one-shot learning. In Sener & Savarese (2018), they propose to select a batch of representative samples that maximize the coverage of the entire unlabeled set. However, the bounded core-set loss used tends to perform worse when the number of classes grows.
41
+
42
+ More similar to our approach, some prior works propose to learn the acquisition function with a Deep Q-Network (DQN) (Mnih et al., 2013) formulation. These works have examined both stream-based active learning (Fang et al., 2017; Woodward & Finn, 2016), where unlabeled samples are provided one by one, and the decision is to label it or not, and pool-based active learning (Konyushkova et al., 2018), where all the unlabeled data is provided beforehand, and the decision is later taken on which samples to choose. The work of Konyushkova et al. (2018) is the closest to ours. Similar to them, our method also leverages the benefits of Q-learning (Watkins & Dayan, 1992) to tackle pool-based AL. Contrary to them, we deal with a much more complex problem: semantic segmentation versus simple classification on UCI repository (Dua & Graff, 2017). The large-scale nature of the problem requires us to use a very different definition of actions, states and rewards. Moreover, we need to adapt the DQN formulation to allow the problem to be computationally feasible.
43
+
44
+ AL for semantic segmentation. Active learning for semantic segmentation has been relatively less explored than other tasks, potentially due to its large-scale nature. For instance, Dutt Jain & Grauman (2016) combine metrics (defined on hand-crafted heuristics) that encourage the diversity and representativeness of labeled samples. Some rely on unsupervised superpixel-based oversegmentation (Vezhnevets et al., 2012; Konyushkova et al., 2015) – and highly depend on the quality of the super-pixel segmentation. Others focus on foreground-background segmentation of biomedical images (Gorriz et al., 2017; Yang et al., 2017), also using hand-crafted heuristics. Settles et al. (2008); Vijayanarasimhan & Grauman (2009); Mackowiak et al. (2018) focus on cost-effective approaches, proposing manually-designed acquisition functions based on the cost of labeling images or regions of images. However, this information is not always given, restricting their applicability.
45
+
46
+ Mackowiak et al. (2018) focus on cost-effective approaches, where the cost of labeling an image is not considered equal for all images. Similar to our work, they use a region-based approach to cope with the large number of samples on a segmentation dataset. Contrary to us, their labelling strategy is based on manually defined heuristics, limiting the representability of the acquisition function. To the best of our knowledge, our work is the first to apply data-driven RL-based approach to the problem of active learning for semantic segmentation.
47
+
48
+ # 3 METHOD
49
+
50
+ We are interested in selecting a small number of regions1(cropped from images in the original dataset) from a large unlabeled set to maximize the performance of a segmentation network $f$ , parameterized by $\theta$ . This process is done iteratively until a given budget $B$ of labeled samples is achieved. At each iteration $t$ , a query network $\pi$ , parameterized by $\phi$ , selects $K$ regions to be labeled by an oracle from a large unlabeled set $\mathcal { U } _ { t }$ . These samples are added to the labeled set $\mathcal { L } _ { t }$ , that is used to train the segmentation network $f$ . The performance is measured with a standard semantic segmentation metric, Intersection-over-Union (IoU).
51
+
52
+ We cast the AL problem within a Markov decision process (MDP) formulation, inspired by other work such as (Padmakumar et al., 2018; Fang et al., 2017; Bachman et al., 2017; Pang et al., 2018; Konyushkova et al., 2018). We model the query network $\pi$ as a reinforcement learning agent, specifically a deep Q-network (Mnih et al., 2013). This data-driven approach allows the model to learn selection strategies based solely on prior AL experience. Our formulation differs from other approaches by the task we address, the definitions of states, actions and rewards, and the reinforcement learning algorithm we use to find the optimal policy.
53
+
54
+ # 3.1 ACTIVE LEARNING WITH REINFORCEMENT LEARNING FOR SEGMENTATION
55
+
56
+ In our setting, we use four different data splits. To train $\pi$ , we define a subset of labeled data $\mathcal { D } _ { T }$ to play the active learning game for several episodes and learn a good acquisition function that maximizes performance with a budget of $B$ regions. The query network is evaluated on a different split $\mathcal { D } _ { V }$ . We use a separate subset $\mathcal { D } _ { R }$ to obtain the reward signal by evaluating the segmentation network on it. The set $\mathcal { D } _ { S }$ $\langle \left| \mathcal { D } _ { S } \right| \ll \left| \mathcal { D } _ { T } \right| )$ is used to construct the state representation.
57
+
58
+ The MDP is defined with the sequence of transitions $\left\{ \left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \right) \right\}$ . For every state $s _ { t } \in S$ (function of the segmentation network at timestep $t$ ), the agent can perform actions $a _ { t } \in \mathcal A$ to choose which samples from $\mathcal { U } _ { t }$ to annotate. The action $\grave { a } _ { t } = \{ \breve { a } _ { t } ^ { k } \} _ { k = 1 } ^ { K }$ , composed of $K$ sub-actions, is a function of the segmentation network, the labeled and the unlabeled set. Each sub-action asks for a specific region to be labeled. Then, it receives a reward $r _ { t + 1 }$ based on the improvement in mean IoU per class after training the segmentation network with the selected samples. Note that states and actions do not depend on the specific architecture of the segmentation network. We are interested in finding a policy to select samples that maximize the segmentation performance. We use deep Q-network (Mnih et al., 2013) and samples from an experience buffer $\mathcal { E }$ to train the query network $\pi$ .
59
+
60
+ Each episode $e$ elapses a total of $T$ steps. We start by setting the segmentation network $f$ to a set of initial weights $\theta _ { 0 }$ and with no annotated data, i.e., $\mathcal { L } _ { 0 } = \emptyset$ and $\mathcal { U } _ { 0 } = \mathcal { D } _ { T }$ . At each iteration $t$ , the following steps are done:
61
+
62
+ 1. The state $s _ { t }$ is computed as function of $f _ { t }$ and $\mathcal { D } _ { S }$ .
63
+ 2. A restricted action space is built with $K$ pools $\mathcal { P } _ { t } ^ { k }$ with $N$ regions, sampled uniformly from the unlabeled set $\mathcal { U } _ { t }$ . For each region in each pool, we compute its sub-action representation
64
+ 3. The query agent selects k,n at $K$ sub-actions $\{ a _ { t } ^ { k } \} _ { k = 1 } ^ { K }$ w ith $\epsilon$ -greedy policy. Each sub-action $a _ { t } ^ { k }$ is defined as selecting one region $x _ { k }$ (out of $N$ ) to annotate from a pool $\mathcal { P } _ { t } ^ { k }$ .
65
+ 4. An oracle labels the regions and the sets are updated: $\mathcal { L } _ { t + 1 } = \mathcal { L } _ { t } \cup \{ ( x _ { k } , y _ { k } ) \} _ { k = 1 } ^ { K }$ and $\mathcal { U } _ { t + 1 } = \mathcal { U } _ { t } \setminus \{ x _ { k } \} _ { k = 1 } ^ { K }$ .
66
+ 5. The segmentation network $f _ { t + 1 }$ is trained one iteration on the recently added regions $\{ \boldsymbol { x } _ { k } \} _ { k = 1 } ^ { K }$ .
67
+ 6. The agent receives the reward $r _ { t + 1 }$ as the difference of performance between $f _ { t + 1 }$ and $f _ { t }$ on $\mathcal { D } _ { R }$ .
68
+
69
+ Figure 2 depicts this training algorithm. We consider the termination of each episode when the budget $B$ of labeled regions is met, i.e., $| \mathcal { L } _ { t } | = B$ . Once the episode is terminated, we restart the weights of the segmentation network $f$ to the initial weights $\theta _ { 0 }$ , set $\mathcal { L } _ { 0 } = \emptyset$ and $\mathcal { U } _ { 0 } = \mathcal { D } _ { T }$ , and restart the episode. We train the query policy $\pi$ by simulating several episodes and updating its weights at each timestep by sampling transitions $\left\{ \left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \right) \right\}$ from the experience replay buffer $\mathcal { E }$ . More details in Section 3.2.
70
+
71
+ ![](images/97599a01622a8beb5c6e72a5a916d832ba85563d43f410aed308835e5de73da9.jpg)
72
+ Figure 2: The query network $\pi$ is trained during several episodes $e$ with MDP transitions $\left\{ \left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \right) \right\}$ . 1) The state $s _ { t }$ is computed as a function of segmentation network $f$ and state set $\mathcal { D } _ { S }$ . 2) $K$ unlabeled pools $\mathcal { P } _ { t } ^ { k }$ are sampled uniformly from the unlabeled set $\mathcal { U } _ { t }$ . The representation of their possible sub-actions are computed using $f$ , labeled set $\scriptstyle { \mathcal { L } } _ { t }$ and unlabeled set $\mathcal { U } _ { t }$ . 3) Query network $\pi$ selects action $a _ { t }$ , composed of $K$ sub-actions $a _ { t } ^ { k }$ . Each of them is chosen from its corresponding pool. 4) Selected regions are labeled and added to $\scriptstyle { \mathcal { L } } _ { t }$ (and removed from $\mathcal { U } _ { t }$ ). 5) Segmentation network $f$ is trained with those new labeled samples. 6) Reward $r _ { t + 1 }$ is obtained from $\mathcal { D } _ { R }$ . This loop continues until a budget $B$ of labeled regions is achieved.
73
+
74
+ State representation. We would like to use the state of the segmentation network $f$ as the MDP state. Unfortunately, it is not straightforward to embed $f$ into a state representation. Following Konyushkova et al. (2017), we represent the state space $s$ with the help of a set-aside set $\mathcal { D } _ { S }$ . We use a small subset of data from the train set, making sure it contains a significant representation of all classes. We consider it to be a representative set of the dataset, and that any improvement in the segmentation performance on subset $\mathcal { D } _ { S }$ will translate into an improvement over the full dataset2. We use the predictions of the segmentation network $f _ { t }$ on $\mathcal { D } _ { S }$ to create a global representation of state $s _ { t }$ (step 1 in Figure 2).
75
+
76
+ We need a compact representation to avoid intensive memory usage due to the pixel-wise predictions. The samples in $\mathcal { D } _ { S }$ are split in patches, and compact feature vectors are computed for all of them. Then, each region is encoded by the concatenation of two sets of features: one is based on class predictions of $f _ { t }$ and the other on its prediction uncertainty, represented as the Shannon entropy (Shannon, 1948). The first set of features (i) is a (normalized) count of the number of pixels that are predicted to each category. This feature encodes the segmentation prediction on a given patch while dismissing the spatial information, less important for small patches. Moreover, we measure the uncertainty of the predictor with the entropy over the probability of predicted classes. For each region, we compute the entropy of each pixel location to obtain a spatial entropy map. To compress this representation, we apply min, average and max-poolings to the entropy map to obtain downsampled feature maps. The second set of features (ii) is thus obtained by flattening these entropy features and concatenating them.
77
+
78
+ Finally, the state $s _ { t }$ is represented by an ensemble of the feature representation of each region in $\mathcal { D } _ { S }$ .
79
+ Figure A.1a illustrates how $s _ { t }$ is computed from each region.
80
+
81
+ Action representation. In our setting, taking an action means asking for the pixel-wise annotation of an unlabeled region. Due to the large-scale nature of semantic segmentation, it would be prohibitively expensive to compute features for each region in the unlabeled set at each step. For this reason, instead, at each step $t$ , we approximate the whole unlabeled set by sampling $K$ pools of unlabeled regions $\mathcal { P } _ { t } ^ { k }$ , each containing $N$ (uniformly) sampled regions. For each region, we compute its sub-action representation $a _ { t } ^ { k , n }$ (step 2 in Figure 2).
82
+
83
+ Each sub-action $a _ { t } ^ { k , n }$ is a concatenation of four different features: the entropy and class distribution features (as in the state representation), a measure of similarity between the region $x _ { k }$ and the labeled set and another between the region and the unlabeled set. The intuition is that the query network could learn to build a more class-balanced labeled set while still taking representative samples from the unlabeled set. This could help mitigate the hard imbalance of the segmentation datasets and improve overall performance.
84
+
85
+ For each candidate region, $x$ in a pool $\mathcal { P } _ { t } ^ { k }$ , we compute the KL divergence between the class distributions of the prediction map of region $x$ (estimated as normalized counts of predicted pixels in each category) and the class distributions of each labeled and unlabeled regions (using the groundtruth annotations and network predictions, respectively). For the labeled set, we compute a KL divergence score between each of the labeled regions’ class distribution and the one of region $x$ . Summarizing all these KL divergences could be done by taking the maximum or summing them. However, to obtain more informative features, we compute a normalized histogram of KL divergence scores, resulting in a distribution of similarities. As an example, if we were to sum all the scores, having half of the labeled regions with a KL divergence of zero and the other half with a value $c$ , would be equivalent to have all labeled regions with a KL divergence of $c / 2$ . The latter could be more interesting, since it means there are no labeled regions with the same class distribution as $x$ . For the unlabeled set we follow the same procedure, resulting in another distribution of KL divergences. Both of them are concatenated and added to the action representation. Figure A.1b illustrates how we represent each possible action in a pool.
86
+
87
+ Based on early experimentation, learning the state and action representations directly with a CNN does not provide strong enough features for the reinforcement learning framework to converge to a good solution. An ablation study on the state and action components can be found in Appendix E.1.
88
+
89
+ # 3.2 BATCH MODE DQN
90
+
91
+ The desired query agent should follow an optimal policy. This policy maps each state to an action that maximizes the expected sum of future rewards. We rely on a DQN (Mnih et al., 2013), parameterized by $\phi$ , to find an optimal policy.
92
+
93
+ We train our DQN with a labeled set $\mathcal { D } _ { T }$ and compute the rewards in a held-out split $\mathcal { D } _ { R }$ . As mentioned above, the query agent in our method selects $K$ regions before transitioning to the next state. We assume that each region is selectedone region in parallel. In this case, the action each with a restricted action space, avoiding dependently, asis composed of combinatorial the case where independent sulosion of the ac $K$ annotaactions n spac $a _ { t }$ $K$ $\{ a _ { t } ^ { k } \} _ { k = 1 } ^ { K }$ computation and avoid selecting repeated regions in the same time-step, we restrict each sub-action $a _ { t } ^ { k }$ to select a region $x _ { k }$ in $\mathcal { P } _ { t } ^ { k }$ defined as:
94
+
95
+ $$
96
+ a _ { t } ^ { k } = \underset { a _ { t } ^ { k , n } \in \mathcal { P } _ { t } ^ { k } } { \operatorname { a r g m a x } } ~ Q ( s _ { t } , a _ { t } ^ { k , n } ; \phi ) ~ ,
97
+ $$
98
+
99
+ for each $k \in \{ 1 , . . . , K \}$ action take in timestep $t$ .
100
+
101
+ The network is trained by optimizing a loss based on temporal difference (TD) error (Sutton, 1988). The loss is defined as the expectation over decomposed transitions $\mathcal { T } _ { k } = \{ ( s _ { t } , a _ { t } ^ { k } , r _ { t + 1 } ^ { k } , s _ { t + 1 } ) \}$ , obtained from the standard transitions $\left\{ \left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \right) \right\}$ , by approximating $r _ { t + 1 } ^ { k } \approx r _ { t + 1 }$ :
102
+
103
+ $$
104
+ \mathbb { E } _ { \mathcal { T } _ { k } \sim \mathcal { E } } \left[ ( y _ { t } ^ { k } - Q ( s _ { t } , a _ { t } ^ { k } ; \phi ) ) ^ { 2 } \right] ,
105
+ $$
106
+
107
+ where $\mathcal { E }$ is the experience replay buffer and $y _ { t } ^ { k }$ the TD target for each sub-action.
108
+
109
+ To stabilize the training, we used a target network with weights $\phi ^ { \prime }$ and the double DQN (Van Hasselt et al., 2016) formulation. The action selection and evaluation is decoupled; the action is selected with the target network and is evaluated with the query network. The TD target for each sub-action is represented as:
110
+
111
+ $$
112
+ y _ { t } ^ { k } = r _ { t + 1 } + \gamma Q ( s _ { t + 1 } , \ \underset { a _ { t + 1 } ^ { k , n } \in \mathcal { P } _ { t + 1 } ^ { k } } { \mathrm { a r g m a x } } \ Q ( s _ { t + 1 } , a _ { t + 1 } ^ { k , n } ; \boldsymbol { \phi } ^ { \prime } ) ; \boldsymbol { \phi } ) .
113
+ $$
114
+
115
+ where $\gamma$ is a discount factor. 3
116
+
117
+ This formulation is valid under the approximation that the sub-actions are independent of each other, conditioned on the state. We observed that increasing the number of sub-actions $K$ per step eases computation and does not hinder segmentation performance. We provide an ablation study on the effect of $K$ in Appendix E.3.
118
+
119
+ # 4 EXPERIMENTS
120
+
121
+ We start this section by describing the datasets that we use to evaluate our method, the experimental setup, and the baselines. We evaluate the algorithm in Camvid as a proof of concept and we show large-scale results on Cityscapes.
122
+
123
+ # 4.1 EXPERIMENTAL SETUP
124
+
125
+ Although we can apply active learning in a setting with unlabeled data with a human in the loop that labels selected regions, we test our approach in fully labeled datasets, where it is easier to mask out the labels of a part of the data and reveal them when the active learning algorithm selects them.
126
+
127
+ CamVid (Brostow et al., 2008). This dataset consists of street scene view images, with the resolution of $3 6 0 \times 4 8 0$ and 11 categories. It has 370, 104 and 234 images for train, validation and test set, respectively. We split the train set with uniform sampling in 110 labeled images (from where we get 10 images to represent the state set $\mathcal { D } _ { S }$ and the rest for $\mathcal { D } _ { T }$ ), and 260 images to build $\mathcal { D } _ { V }$ , where we evaluate and compare our acquisition function to the baselines. The state set is chosen to be representative of $\mathcal { D } _ { T }$ , by restricting the sampling of $\mathcal { D } _ { S }$ to have a similar class distribution to the one of $\mathcal { D } _ { T }$ . Each image is split into 24 regions of dimension $8 0 \times 9 0$ . We use the dataset’s validation set for $\mathcal { D } _ { R }$ . We report the final segmentation results on the test set. In our experiments, we chose $K = 2 4$ regions per step. Our model is quite robust to the number of regions selected at each time step (see Appendix E.3).
128
+
129
+ Cityscapes (Cordts et al., 2016). It is also composed of real street scene views, with image resolution of $2 0 4 8 \times 1 0 2 4$ and 19 semantic categories. The train set with fine-grained segmentation labels has 2975 images and the validation dataset of 500 images. We uniformly sampled 360 labeled images from the train set. Out of these, 10 images represent $\mathcal { D } _ { S }$ , 150 build $\mathcal { D } _ { T }$ and 200, $\mathcal { D } _ { R }$ , where we get our rewards. The remaining 2615 images of train set are used for $\mathcal { D } _ { V }$ , as if they were unlabeled. We report the results in the validation set (test set not available). Each image is split in 128 regions of dimension $1 2 8 \times 1 2 8$ . We chose $K = 2 5 6$ regions per step.
130
+
131
+ Implementation details. The split $\mathcal { D } _ { R }$ is used to get the rewards for the DQN and also for hyperparameter selection, that are chosen according to the best setup for both baselines and our method. We report the average and standard deviation of the 5 different runs (5 random seeds). As data augmentation, we use random horizontal flips and random crops of $2 2 4 \times 2 2 4$ . For more details, please refer to Appendix $\mathbf { B }$ on supplementary material.
132
+
133
+ Evaluation. The query network $\pi$ is trained on $\mathcal { D } _ { T }$ with a small, fixed budget $( 0 . 5 \mathrm { k }$ regions for Camvid and $4 \mathrm { k \Omega }$ regions for Cityscapes) to encourage picking regions that will boost the performance in an heavily scarce data regime. The learned acquisition function, as well as the baselines, is evaluated on $\mathcal { D } _ { V }$ , where we ask for labels until the budget is met, for different budgets. Note that the baselines do not have any learnable component.
134
+
135
+ Once the budget is reached, we train the segmentation network $f$ with $\mathcal { L } _ { T }$ until convergence (with early stopping in $\mathcal { D } _ { R }$ ). For a fair comparison, all methods’ segmentation network has been pre-trained (initial $f$ weights $\theta _ { 0 }$ ) on GTA dataset (Richter et al., 2016), a synthetic dataset where high amounts of labeled data can be obtained without human effort, and $\mathcal { D } _ { T }$ (where we had labels to train the DQN). We evaluate the final segmentation performance (measured in mean IoU) on the test set of CamVid and on the validation set of Cityscapes.
136
+
137
+ # 4.2 RESULTS
138
+
139
+ ![](images/04b67ac28c5a652a557d086ebf99cc4067ce968989b526c6895ca6bd368e8393.jpg)
140
+ Figure 4: Performance of several methods with increasing active learning budget, expressed as the number of $1 2 8 \times 1 2 8$ pixel regions labeled and the $\%$ of additional labeled data. All methods have been pretrained with GTAV and a small subset of their target datasets. Budget indicates additional number of regions labeled (and the percentage of unlabeled data used). The dashed line represents the $96 \%$ of the total performance achieved by the segmentation network with fully-supervised training (having access to all labels). We report the mean and standard deviation of 5 runs.
141
+
142
+ Results in CamVid. We compare our results against three distinct baselines: (i) U is the uniform random sampling of the regions to label at each step out of all possible regions in the pool, (ii) $\mathbf { H }$ is an uncertainty sampling method that selects the regions with maximum cumulative pixel-wise Shannon entropy, (iii) B picks regions with maximum cumulative pixel-wise BALD (Houlsby et al., 2011b; Gal et al., 2017) metric. We use 20 iterations of MC-Dropout (Gal & Ghahramani, 2016) (instead of 100, as in (Gal et al., 2017)) for computational reasons. In preliminary experiments, we did not observe any improvement using over 20 iterations. In Camvid, we use a pool size of 10 for our method, H, B and 50 for U. In Cityscapes, we have access to more data so we use pool sizes of 500, 200, 200 and 100 respectively for U, H, $\mathbf { B }$ and our method. Pool sizes were selected according to the best validation mean IoU.
143
+
144
+ ![](images/c49abc9a0b68205a8fcf0fc323330ed2d1c1e47f9b6a90236bf94ac40ee70f77.jpg)
145
+ Figure 3: Entropy of class distributions obtained from pixels of selected regions.
146
+
147
+ performs the baselines for every fixed budget, except for $1 . 5 \mathrm { k }$ regions, where we achieve similar performance as H. We argue that the dataset has a small number of images and selecting $1 . 5 \mathrm { k }$ regions already reaches past $98 \%$ of maximum performance, where differences between our method and H are negligible. Surprisingly, $\mathbf { B }$ is worse than U, specially for small budgets, where training with the newly acquired labels does not provide any additional information. It overfits quickly to the training, getting a worst result that with the initial weights. In general, all results have a high variance due to the low regime of data we are working in. In Appendix E.2 we show the advantages of labeling small regions instead of full images.
148
+
149
+ Results in Cityscapes. Figure 4b shows results on Cityscapes for different budgets. Here, we also observe that our method outperforms the baselines for all budgets points. Labelling 20k regions, corresponding to only $6 \%$ of the total pixels (additional to the labeled data in $\mathcal { D } _ { T }$ ), we obtain a performance of $6 4 . 5 \%$ mean IoU. This is $96 \%$ of the performance of the segmentation network if it had access to all labeled pixels. To reach the same performance, $\mathbf { H }$ requires an additional $^ \mathrm { 6 k }$ labeled regions (around $30 \%$ more pixels, equivalent to an extra 45 images). In this larger dataset, B performs better than random, showing that for the task of segmentation, B might start to show its benefits only for considerably large budgets. Table 1 shows the per-class IoU for the evaluated methods (with a fixed budget). Our method works specially well for under-represented classes, such as Person, Motorcycle or Bicycle, among others. Indeed, our method selects more pixels belonging to under-represented classes than baselines. Note that this is a side effect of directly optimizing for the mean IoU and defining class-aware representations for states and actions. Figure 3 shows the entropy of the distribution of selected pixels of the final labeled set (for a budget of 12k regions) for Cityscapes. The higher the entropy means closer to uniform distribution over classes, and our method
150
+
151
+ <table><tr><td>Method</td><td>Road</td><td>Side- Walk</td><td>Build- ing</td><td>Wall</td><td>Fence</td><td>Pole</td><td>Traffic Light</td><td>Traffic Sign</td><td>Vege- tation</td><td>Terrain</td></tr><tr><td>U</td><td>96.67</td><td>76.63</td><td>88.48</td><td>33.89</td><td>36.00</td><td>52.80</td><td>54.27</td><td>60.84</td><td>90.27</td><td>52.34</td></tr><tr><td>H</td><td>95.60</td><td>72.08</td><td>88.06</td><td>35.30</td><td>44.59</td><td>52.43</td><td>53.70</td><td>61.38</td><td>90.08</td><td>51.87</td></tr><tr><td>B</td><td>95.25</td><td>69.37</td><td>88.75</td><td>32.28</td><td>44.36</td><td>53.81</td><td>58.84</td><td>64.79</td><td>90.27</td><td>50.51</td></tr><tr><td>Ours</td><td>96.19</td><td>74.24</td><td>88.46</td><td>33.56</td><td>42.28</td><td>53.28</td><td>57.18</td><td>63.61</td><td>90.20</td><td>51.84</td></tr><tr><td></td><td>Sky</td><td>Person</td><td>Rider</td><td>Car</td><td>Truck</td><td>Bus</td><td>Train</td><td>Motor- cycle</td><td>Bicycle</td><td>mIoU</td></tr><tr><td>U</td><td>92.57</td><td>69.66</td><td>31.82</td><td>90.13</td><td>27.04</td><td>43.41</td><td>23.30</td><td>32.98</td><td>63.64</td><td>58.78</td></tr><tr><td>H</td><td>88.27</td><td>72.69</td><td>40.85</td><td>90.46</td><td>42.40</td><td>58.88</td><td>33.63</td><td>43.17</td><td>68.08</td><td>62.29</td></tr><tr><td>B</td><td>93.33</td><td>71.16</td><td>39.08</td><td>88.38</td><td>34.23</td><td>43.41</td><td>30.35</td><td>37.37</td><td>66.67</td><td>60.64</td></tr><tr><td>Ours</td><td>91.32</td><td>73.30</td><td>45.22</td><td>90.91</td><td>42.14</td><td>58.84</td><td>35.97</td><td>45.14</td><td>69.35</td><td>63.32</td></tr></table>
152
+
153
+ Table 1: Per category IoU and mean IoU $[ \% ]$ on Cityscapes validation set, for a budget of $1 2 \mathrm { k }$ regions. For clarity, only the mean of 5 runs is reported. Results with standard deviations in Table C.1.
154
+
155
+ has the highest entropy. Appendix C shows the distribution from which the entropy is computed and Appendix D presents some qualitative results, showing what each method decides to label for some images.
156
+
157
+ # 5 CONCLUSION
158
+
159
+ We propose a data-driven, region-based method for active learning for semantic segmentation, based on reinforcement learning. The goal is to alleviate the costly process of obtaining pixel-wise labels with a human in the loop. We propose a new modification of DQN formulation to learn the acquisition function, adapted to the large-scale nature of semantic segmentation. This provides a computationally efficient solution that uses less labeled data than competitive baselines, while achieving the same performance. Moreover, by directly optimizing for the per-class mean IoU and defining class-aware representations for states and actions, our method asks for more labels of under-represented classes compared to baselines. This improves the performance and helps to mitigate class imbalance. As future work, we highlight the possibility of designing a better region definition, that could help improve the overall results, and adding domain adaptation for the learnt policy, to transfer it between datasets.
160
+
161
+ # ACKNOWLEDGEMENTS
162
+
163
+ We thank NSERC and PROMPT. We would also like to thank the team at ElementAI for supporting this research and providing useful feedback.
164
+
165
+ # REFERENCES
166
+
167
+ Philip Bachman, Alessandro Sordoni, and Adam Trischler. Learning algorithms for active learning. In ICML, 2017.
168
+
169
+ Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoderdecoder architecture for image segmentation. PAMI, 2017.
170
+
171
+ Yoram Baram, Ran El Yaniv, and Kobi Luz. Online choice of active learning algorithms. JMLR, 2004.
172
+
173
+ Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What’s the point: Semantic segmentation with point supervision. In ECCV, 2016.
174
+
175
+ Gabriel J. Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In ECCV, 2008.
176
+
177
+ Robin Chan, Matthias Rottmann, Fabian Hüger, Peter Schlicht, and Hanno Gottschalk. Application of decision rules for handling class imbalance in semantic segmentation. arXiv preprint arXiv:1901.08394, 2019.
178
+
179
+ Hong-Min Chu and Hsuan-Tien Lin. Can active learning experience be transferred? In ICMD, 2016.
180
+
181
+ Gabriella Contardo, Ludovic Denoyer, and Thierry Artières. A meta-learning approach to one-step active-learning. In International Workshop on Automatic Selection, Configuration and Composition of Machine Learning Algorithms. CEUR, 2017.
182
+
183
+ Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016.
184
+
185
+ Ido Dagan and Sean P. Engelson. Committee-based sampling for training probabilistic classifiers. In ICML, 1995.
186
+
187
+ J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR, 2009.
188
+
189
+ Dheeru Dua and Casey Graff. UCI machine learning repository, 2017. URL http://archive. ics.uci.edu/ml.
190
+
191
+ Suyog Dutt Jain and Kristen Grauman. Active image segmentation propagation. In CVPR, 2016.
192
+
193
+ Sandra Ebert, Mario Fritz, and Bernt Schiele. Ralf: A reinforced active learning formulation for object class recognition. In CVPR, 2012.
194
+
195
+ Meng Fang, Yuan Li, and Trevor Cohn. Learning how to active learn: A deep reinforcement learning approach. In EMNLP, 2017.
196
+
197
+ Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical features for scene labeling. PAMI, 2013.
198
+
199
+ Yoav Freund, H Sebastian Seung, Eli Shamir, and Naftali Tishby. Information, Prediction, and Query by Committee. In NIPS, 1993.
200
+
201
+ Y Gal, R Islam, and Z Ghahramani. Deep bayesian active learning with image data. ICML, 2017.
202
+
203
+ Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In ICML, 2016.
204
+
205
+ Marc Gorriz, Axel Carlier, Emmanuel Faure, and Xavier Giró i Nieto. Cost-effective active learning for melanoma segmentation. ML4H: Machine Learning for Health Workshop, NIPS, 2017.
206
+
207
+ Ji He, Mari Ostendorf, Xiaodong He, Jianshu Chen, Jianfeng Gao, Lihong Li, and Li Deng. Deep reinforcement learning with a combinatorial action space for predicting popular reddit threads. In EMNLP, 2016.
208
+
209
+ Neil Houlsby, Ferenc Huszár, Zoubin Ghahramani, and Máté Lengyel. Bayesian active learning for classification and preference learning. arXiv preprint arXiv:1112.5745, 2011a.
210
+
211
+ Neil Houlsby, Ferenc Huszar, Zoubin Ghahramani, and Máté Lengyel. Bayesian active learning for classification and preference learning. arXiv, 2011b.
212
+
213
+ Wei-Ning Hsu and Hsuan-Tien Lin. Active learning by learning. In AAAI, 2015.
214
+
215
+ Alexander Kirillov, Ross B. Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. CVPR, 2019.
216
+
217
+ Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Introducing geometry in active learning for image segmentation. In ICCV, 2015.
218
+
219
+ Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Learning active learning from data. In NIPS, 2017.
220
+
221
+ Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Discovering general-purpose active learning strategies. arXiv preprint arXiv:1810.04114, 2018.
222
+
223
+ Yann Lecun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998.
224
+
225
+ Tsung-Yi Lin, Piotr Dollár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In CVPR, 2017.
226
+
227
+ Ming Liu, Wray Buntine, and Gholamreza Haffari. Learning how to actively learn: A deep imitation learning approach. In ACL, 2018.
228
+
229
+ Chengjiang Long and Gang Hua. Multi-class multi-annotator active learning with robust gaussian process for visual recognition. In ICCV, 2015.
230
+
231
+ Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015.
232
+
233
+ Radek Mackowiak, Philip Lenz, Omair Ghori, Ferran Diego, Oliver Lange, and Carsten Rother. Cereals-cost-effective region-based active learning for semantic segmentation. BMVC, 2018.
234
+
235
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. NIPS Deep Learning Workshop, 2013.
236
+
237
+ Matthias Müller, Alexey Dosovitskiy, Bernard Ghanem, and Vladen Koltun. Driving policy transfer via modularity and abstraction. CoRL, 2018.
238
+
239
+ Thomas Osugi, Deng Kim, and Stephen Scott. Balancing exploration and exploitation: A new algorithm for active machine learning. In ICDM, 2005.
240
+
241
+ Aishwarya Padmakumar, Peter Stone, and Raymond Mooney. Learning a policy for opportunistic active learning. In EMNLP, 2018.
242
+
243
+ Kunkun Pang, Mingzhi Dong, Yang Wu, and Timothy Hospedales. Meta-learning transferable active learning policies by deep reinforcement learning. arXiv preprint arXiv:1806.04798, 2018.
244
+
245
+ Pedro O. Pinheiro and Ronan Collobert. Recurrent convolutional neural networks for scene labeling. In ICML, 2014.
246
+
247
+ Sachin Ravi and Hugo Larochelle. Meta-learning for batch mode active learning. In ICLR Workshop, 2018.
248
+
249
+ Stephan R. Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In ECCV, 2016.
250
+
251
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015.
252
+
253
+ Nicholas Roy and Andrew McCallum. Toward optimal active learning through monte carlo estimation of error reduction. ICML, 2001.
254
+
255
+ Max Schwarz, Anton Milan, Arul Selvam Periyasamy, and Sven Behnke. Rgb-d object detection and semantic segmentation for autonomous manipulation in clutter. IJRR, 2018.
256
+
257
+ Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. ICLR, 2018.
258
+
259
+ Burr Settles, Mark Craven, and Lewis Friedland. Active learning with real annotation costs. In NIPS, 2008.
260
+
261
+ Claude Elwood Shannon. A mathematical theory of communication. Bell system technical journal, 1948.
262
+
263
+ Carole H Sudre, Wenqi Li, Tom Vercauteren, Sebastien Ourselin, and M Jorge Cardoso. Generalised dice overlap as a deep learning loss function for highly unbalanced segmentations. In Deep learning in medical image analysis and multimodal learning for clinical decision support. Springer, 2017.
264
+
265
+ Richard S. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 1988.
266
+
267
+ Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In AAAI, 2016.
268
+
269
+ Alexander Vezhnevets, Joachim M Buhmann, and Vittorio Ferrari. Active learning for semantic segmentation with expected change. In CVPR, 2012.
270
+
271
+ Sudheendra Vijayanarasimhan and Kristen Grauman. What’s it going to cost you?: Predicting effort vs. informativeness for multi-label image annotations. In CVPR, 2009.
272
+
273
+ Keze Wang, Dongyu Zhang, Ya Li, Ruimao Zhang, and Liang Lin. Cost-effective active learning for deep image classification. IEEE Transactions on Circuits and Systems for Video Technology, 2017.
274
+
275
+ Wenfu Wang and Zhijie Pan. Dsnet for real-time driving scene semantic segmentation. arXiv preprint arXiv:1812.07049, 2018.
276
+
277
+ Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 1992.
278
+
279
+ Mark Woodward and Chelsea Finn. Active one-shot learning. NIPS Deep RL Workshop, 2016.
280
+
281
+ Lin Yang, Yizhe Zhang, Jianxu Chen, Siyuan Zhang, and Danny Z Chen. Suggestive annotation: A deep active learning framework for biomedical image segmentation. In MICCAI, 2017.
282
+
283
+ Licheng Yu, Xinlei Chen, Georgia Gkioxari, Mohit Bansal, Tamara L. Berg, and Dhruv Batra. Multi-target embodied question answering. In CVPR, 2019.
284
+
285
+ # A STATE AND ACTION REPRESENTATION DETAILS
286
+
287
+ In this section, we provide illustrations that show more details on how the state and action are built. Figure A.1a shows how to build the state representation and Figure A.1b how to compute the action representation of a particular region.
288
+
289
+ ![](images/a3f9bf9173e3bc56b54ea0cbae3e08b4846b0e38036fc1d324bef0d0a1d2fa95.jpg)
290
+ Figure A.1: (a) Each region $x _ { i }$ in $\mathcal { D } _ { S }$ is represented as a concatenation of two features, one based on entropy and the other on class predictions. The final state $s _ { t }$ is the concatenation of the features for all regions. (b) Each region $x _ { k }$ in pool $\mathcal { P } _ { k }$ is represented as a concatenation of four features: entropy-based features, class predictions and two KL divergence distributions, comparing each region $x _ { k }$ with the labeled and unlabeled set.
291
+
292
+ # B EXTENDED EXPERIMENTAL SETUP
293
+
294
+ The segmentation network $f$ is an adaptation of feature pyramid network (Lin et al., 2017) for semantic segmentation (similar to the segmentation branch of (Kirillov et al., 2019)), with a ResNet50 backbone (He et al., 2016), pretrained on ImageNet (Deng et al., 2009). The network is pretrained on the full train set of a large-scale synthetic dataset, GTAV (Richter et al., 2016), therefore not requiring much human labelling effort. Moreover, this dataset has the advantage of possessing the same categories as real datasets we experiment with.
295
+
296
+ The query network $\pi$ , depicted in Figure B.1, is composed of two paths, one to compute state features and another to compute action features, fusing them at the end. Each of the layers are composed of Batch Normalization, ReLU activation and a fully-connected layer. The state path and action path are composed of 4 and 3 layers, respectively, with a final layer that fuses them together to get the global features; these are gated with a sigmoid, controlled by the KL distance distributions in the action representation. The weights are updated at each step of the active learning loop, by sampling batches of 16 experience tuples from an experience replay buffer, sized 600 and 3200 for Camvid and Cityscapes, respectively.
297
+
298
+ We train both networks with stochastic gradient descent (SGD) with momentum. We use the same learning rate for both the segmentation and query networks; $1 0 ^ { - 4 }$ and $1 0 ^ { - 3 }$ for Cityscapes and Camvid respectively. Weight decay is set to $\mathrm { 1 0 ^ { - 4 } }$ for the segmentation network and $\mathrm { i 0 ^ { - 3 } }$ for the query network. We used a training batch size of 32 for Camvid and 16 for Cityscapes.
299
+
300
+ ![](images/a4e54814eb9de81352c6274e854d6500883df78773da4f79a52ff553811c005b.jpg)
301
+ Figure B.1: The DQN takes a state representation $s _ { t }$ and an action representation for a possible action (labeling region $x _ { k }$ in an unlabeled pool $\mathcal { P } _ { t } ^ { k }$ ). $N _ { F }$ are the number of state and action features (class distributions and entropy-based features), and $N _ { S I M }$ the number of features for the KL divergence distributions. Features are computed for both representations separately with layers composed of Batch Normalization, ReLU activation and fully connected layers. Both feature vectors are flattened and concatenated, to apply a final linear layer that obtains a score as a single scalar. The $\mathrm { Q }$ -values are computed as the gated score, where the gate is controlled by a feature representation from the KL distance distributions of the action representation.
302
+
303
+ # C CLASS FREQUENCIES AND PERFORMANCE PER CLASS
304
+
305
+ We show in Figure C.1 a more detailed plot for the class frequencies of regions that each of the methods chooses for labeling. As the entropy of the class distributions in Figure 3 show, our method picks more regions containing under-represented classes. Specially, it asks labels for more Person, Rider, Train, Motorcycle and Bicycle pixels.
306
+
307
+ We observe that our B baseline picks more than $50 \%$ of pixels for only 3 classes that are overrepresented or have a medium representation: Building, Vegetation and Sky. This could explain why the performance is worse than the H baseline.
308
+
309
+ Moreover, in table C.1, we extend Table 1 by adding the standard deviation for each result.
310
+
311
+ # D QUALITATIVE RESULTS
312
+
313
+ We compare our method qualitatively with the baselines in Figure D.1. Baseline U asks for random patches. Our method tends to pick more regions with the under-represented classes and small objects. For instance, in the first image in the left, our method asks for several regions of a Train, that almost has no samples in the training data. In the second image, it focuses on Person, Bicycle and Poles. In the third image, it asks for labels of the traffic lights and a pedestrian on a bicycle. Baselines B and $\mathbf { H }$ select some of those relevant regions, but miss a lot of them.
314
+
315
+ # E ABLATION STUDIES
316
+
317
+ In this section, we provide an ablation study on the state and action representation, the effect of labeling small regions versus full images, and the comparison of taking different regions per step.
318
+
319
+ ![](images/64faba326ae8f09ec41e220352db37da0a6f3519a7400c031f0c1307bcb5df8c.jpg)
320
+ Figure C.1: Class frequencies $[ \% ]$ in Cityscapes for the selected regions to label after the active learning acquisition for different methods. "Data split" frequencies refer to the proportion of classes in the unlabeled data split, where we reveal the masks for the purpose of showing the underlying class frequencies. In this split is where all methods perform active learning, in the setting where we mask out the labels $( \mathcal { D } _ { v } )$ . Budget used: 12k regions. For ease of visualization, we only plot the mean of 5 runs. Void label represents all pixels for which we do not assign any labels.
321
+
322
+ <table><tr><td>Method</td><td>Road</td><td>Sidewalk</td><td>Building</td><td>Wall</td><td>Fence</td></tr><tr><td>U</td><td>96.67 ± 0.09</td><td>76.63 ± 0.51</td><td>88.48 ± 0.12</td><td>33.89 ± 1.11</td><td>36.00 ± 2.12</td></tr><tr><td>H(Shannon,1948)</td><td>95.60 ± 0.33</td><td>72.08 ± 1.28</td><td>88.06 ± 0.42</td><td>35.30 ± 1.73</td><td>44.59 ± 1.62</td></tr><tr><td>B (Gal et al., 2017)</td><td>95.25 ± 0.28</td><td>69.37 ± 0.94</td><td>88.75 ± 0.18</td><td>32.28 ± 0.88</td><td>44.36 ± 1.12</td></tr><tr><td>Ours</td><td>96.19 ± 0.23</td><td>74.24 ± 1.50</td><td>88.46 ± 0.23</td><td>33.56 ± 2.30</td><td>42.28 ± 1.40</td></tr><tr><td></td><td>Pole</td><td>Traffic Light</td><td>Traffic Sign</td><td>Vegetation</td><td>Terrain</td></tr><tr><td>U</td><td>52.80 ± 0.41</td><td>54.27 ± 1.34</td><td>60.84 ± 0.99</td><td>90.27 ± 0.14</td><td>52.34 ± 1.38</td></tr><tr><td>H(Shannon, 1948)</td><td>52.43± 0.31</td><td>53.70 ±1.48</td><td>61.38 ± 0.81</td><td>90.08 ± 0.16</td><td>51.87 ± 0.79</td></tr><tr><td>B (Gal et al., 2017)</td><td>53.81 ± 0.30</td><td>58.84 ± 0.50</td><td>64.79 ± 0.34</td><td>90.27 ± 0.15</td><td>50.51 ± 0.94</td></tr><tr><td>Ours</td><td>53.28 ± 0.51</td><td>57.18 ± 1.92</td><td>63.61 ± 1.47</td><td>90.20 ± 0.26</td><td>51.84 ± 1.62</td></tr><tr><td></td><td>Sky</td><td>Person</td><td>Rider</td><td>Car</td><td>Truck</td></tr><tr><td>U</td><td>92.57 ± 0.30</td><td>69.66 ± 0.62</td><td>31.82 ± 2.66</td><td>90.13 ± 0.01</td><td>27.04 ± 2.16</td></tr><tr><td>H(Shannon,1948)</td><td>88.27 ± 3.26</td><td>72.69 ± 0.53</td><td>40.85 ± 1.85</td><td>90.46 ±0.38</td><td>42.40 ± 1.96</td></tr><tr><td>B (Gal et al., 2017)</td><td>93.33 ± 0.24</td><td>71.16 ± 0.47</td><td>39.08 ± 1.26</td><td>88.38 ± 0.29</td><td>34.23 ±1.24</td></tr><tr><td>Ours</td><td>91.32 ± 1.06</td><td>73.30 ± 0.43</td><td>45.22 ± 2.75</td><td>90.91 ± 0.23</td><td>42.14 ± 1.41</td></tr><tr><td></td><td>Bus</td><td>Train</td><td>Motorcycle</td><td>Bicycle</td><td>mIoU</td></tr><tr><td>U</td><td>43.41 ± 2.80</td><td>23.30 ± 2.52</td><td>32.98 ± 3.81</td><td>63.64 ± 0.33</td><td>58.78 ±0.29</td></tr><tr><td>H(Shannon,1948)</td><td>58.88 ± 2.97</td><td>33.63 ± 4.76</td><td>43.17 ±1.37</td><td>68.08 ± 0.38</td><td>62.29 ± 0.55</td></tr><tr><td>B (Gal et al., 2017)</td><td>43.41 ±4.34</td><td>30.35 ± 3.18</td><td>37.37 ± 0.79</td><td>66.67 ± 0.67</td><td>60.64 ± 0.49</td></tr><tr><td>Ours</td><td>58.84 ± 4.15</td><td>35.97 ± 3.50</td><td>45.14 ± 2.34</td><td>69.35 ± 0.90</td><td>63.32 ± 0.93</td></tr></table>
323
+
324
+ Table C.1: Per category IoU and mean IoU $[ \% ]$ , on Cityscapes validation set, for a budget of 12k regions. Both the mean and standard deviation of 5 runs is reported.
325
+
326
+ # E.1 STATE AND ACTION REPRESENTATION
327
+
328
+ Here, we analyze the incremental effect of our design choices for the state and action representation on Cityscapes. We use 3 pooling operations – min, average, max – to compress the entropy map of the region and use it in the state and action representation. Also, KL divergences are added to the latter. As seen in Table E.1, using only the max-pooled entropy map (Ours - 1H), the performance is slightly worse than H. When we combine the information of the 3 pooled entropy maps (Ours - 3H), we outperform $\mathbf { H }$ baseline. Moreover, when adding the two distribution of KL distances to our action representation $( \mathbf { O u r s } - 3 \mathbf { H } + \mathbf { K L } )$ : between possible regions to label and the labeled set and between the region and the unlabeled set, we further increase the performance, getting our best state and action representations.
329
+
330
+ ![](images/569ce9f506eecf6f50ededaec76c14f0980114b549f3f65795fa3f12c03ace54.jpg)
331
+ Figure D.1: Qualitative results in Cityscapes after running the active learning algorithm with a budget of 2k regions. The first row consists on input images, the second shows the what U picks, the third, B, the fourth $\mathbf { H }$ , and the last row shows what our method picks. Best viewed in color.
332
+
333
+ Table E.1: Contribution to the validation mean IoU performance $[ \% ]$ of Cityscapes dataset, for a budget of 4K and for each of the components of our state representation, compared to the baselines. Mean and standard deviation of 5 runs is reported.
334
+
335
+ <table><tr><td rowspan="2">State</td><td colspan="3">Pool size</td></tr><tr><td>20</td><td>100</td><td>200</td></tr><tr><td>U</td><td>54.62 ± 0.60</td><td>54.92 ± 0.59</td><td>55.15 ± 0.64</td></tr><tr><td>H(Shannon,1948)</td><td>57.41 ± 0.17</td><td>57.55 ± 0.60</td><td>57.48 ± 0.96</td></tr><tr><td>B (Gal et al., 2017)</td><td>56.73 ± 0.20</td><td>56.99 ± 0.32</td><td>56.44 ± 0.77</td></tr><tr><td>Ours - 1H</td><td>56.89 ± 1.22</td><td>57.29 ± 0.67</td><td>57.62 ± 0.96</td></tr><tr><td>Ours - 3H</td><td>57.65 ± 0.74</td><td>58.10 ± 1.16</td><td>57.65 ± 1.30</td></tr><tr><td>Ours - 3H+KL</td><td>57.67 ± 0.92</td><td>58.95 ± 0.59</td><td>59.18 ± 0.62</td></tr></table>
336
+
337
+ # E.2 REGION VS. FULL IMAGE ANNOTATION
338
+
339
+ In this subsection, we analyze the effect of asking for labels in regions instead of full images and the effect of the number of regions per step. We compare the validation IoU when asking for pixel-wise labels for entire images versus pixel-wise labels for small regions. In the first case, we ask for one image at each step and, for the latter, we ask for 24 regions per step (pixel-wise, equivalent to one image). As it is shown in Table E.2, asking for entire image labels has similar performance for all methods, that resemble Uniform performance when asking for region labels. This indicates that, in order to select more informative samples, it is useful to split the images into patches (crops) and be able to disregard regions that only contain over-represented classes of the dataset.
340
+
341
+ # E.3 INFLUENCE OF STEP REGIONS
342
+
343
+ Empirically, our selector network is quite robust to the number of regions per step, as seen in Table E.3. Therefore, we select 24 regions for CamVid, the one that yielded best results. This is more efficient to train than taking one region per step.
344
+
345
+ <table><tr><td></td><td>U</td><td>H</td><td>B</td><td>Ours</td></tr><tr><td>Full im.</td><td>69.64 ± 0.33</td><td>69.46 ± 0.15</td><td>69.66 ± 0.21</td><td>69.44 ± 0.22</td></tr><tr><td>24R</td><td>70.35 ± 0.71</td><td>70.40 ± 0.65</td><td>70.63 ± 0.77</td><td>71.85 ± 0.68</td></tr></table>
346
+
347
+ Table E.2: Comparison between labeling a full image and 24 non-overlapping square regions (pixel-wise, equivalent to a full image), for different methods. Performance is measured in terms of validation mean IoU performance $[ \% ]$ in CamVid dataset, for a budget of $0 . 5 \mathrm { k }$ . In the first row, results for “full im.”, one entire image is labeled at each step (region size equal to the size of the image). In the second row, $\mathbf { \ddot { \Gamma } } 2 4 \mathbf { R } ^ { \mathbf { \vec { \nu } } }$ results for labeling 24 regions at each step. Pool size selected as the one that performed better, out of 10, 20, 50 and 100. Results are reported with the mean and standard deviation of 5 runs.
348
+
349
+ <table><tr><td>Regions per step</td><td>Val IoU [%]</td></tr><tr><td>1</td><td>71.10 ± 0.75</td></tr><tr><td>12</td><td>70.93 ± 0.70</td></tr><tr><td>24</td><td>71.85 ± 0.68</td></tr><tr><td>36</td><td>71.24 ± 0.49</td></tr><tr><td>48</td><td>71.25 ± 1.17</td></tr><tr><td>72</td><td>71.20 ± 0.53</td></tr></table>
350
+
351
+ Table E.3: Results of varying the number of regions to be labeled at each step by our method. Performance is measured in terms of validation mean IoU performance $[ \% ]$ in CamVid dataset, for a budget of $0 . 5 \mathrm { k }$ Results are reported with the mean and standard deviation of 5 runs.
parse/train/SkgC6TNFvr/SkgC6TNFvr_content_list.json ADDED
@@ -0,0 +1,1866 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "REINFORCED ACTIVE LEARNING FOR IMAGE SEGMENTATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 571,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Arantxa Casanova∗ \nÉcole Polytechnique de Montréal \nMila, Quebec Artificial Intelligence Institute \nElementAI ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 477,
21
+ 227
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Pedro O. Pinheiro ElementAI ",
28
+ "bbox": [
29
+ 509,
30
+ 170,
31
+ 637,
32
+ 198
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Negar Rostamzadeh ElementAI ",
39
+ "bbox": [
40
+ 671,
41
+ 170,
42
+ 813,
43
+ 198
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Christopher J. Pal \nÉcole Polytechnique de Montréal \nMila, Quebec Artificial Intelligence Institute \nElementAI ",
50
+ "bbox": [
51
+ 183,
52
+ 248,
53
+ 475,
54
+ 306
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 343,
65
+ 544,
66
+ 358
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Learning-based approaches for semantic segmentation have two inherent challenges. First, acquiring pixel-wise labels is expensive and time-consuming. Second, realistic segmentation datasets are highly unbalanced: some categories are much more abundant than others, biasing the performance to the most represented ones. In this paper, we are interested in focusing human labelling effort on a small subset of a larger pool of data, minimizing this effort while maximizing performance of a segmentation model on a hold-out set. We present a new active learning strategy for semantic segmentation based on deep reinforcement learning (RL). An agent learns a policy to select a subset of small informative image regions – opposed to entire images – to be labeled, from a pool of unlabeled data. The region selection decision is made based on predictions and uncertainties of the segmentation model being trained. Our method proposes a new modification of the deep Q-network (DQN) formulation for active learning, adapting it to the large-scale nature of semantic segmentation problems. We test the proof of concept in CamVid and provide results in the large-scale dataset Cityscapes. On Cityscapes, our deep RL region-based DQN approach requires roughly $30 \\%$ less additional labeled data than our most competitive baseline to reach the same performance. Moreover, we find that our method asks for more labels of under-represented categories compared to the baselines, improving their performance and helping to mitigate class imbalance. ",
73
+ "bbox": [
74
+ 232,
75
+ 377,
76
+ 766,
77
+ 641
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 672,
88
+ 336,
89
+ 689
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Semantic segmentation, the task of labelling an image pixel-by-pixel with the category it belongs to, is critical for a variety of applications such as autonomous driving (Müller et al., 2018; Wang & Pan, 2018), robot manipulation (Schwarz et al., 2018), embodied question answering (Yu et al., 2019) and biomedical image analysis (Ronneberger et al., 2015). Convolutional neural networks (Lecun et al., 1998)-based methods have achieved excellent results on large-scale supervised semantic segmentation, in which we assume pixel-level annotations are available (Farabet et al., 2013; Pinheiro & Collobert, 2014; Long et al., 2015). For such models to work, however, they need a large amount of pixel-level annotations that may require costly human labor (Cordts et al., 2016; Bearman et al., 2016). ",
96
+ "bbox": [
97
+ 174,
98
+ 707,
99
+ 826,
100
+ 818
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Current semantic segmentation datasets have pixel-wise annotations for each image. This standard approach has two important issues: (i) pixel-level labelling is extremely time consuming. For example, annotation and quality control required more than $1 . 5 \\mathrm { h }$ per image (on average) on Cityscapes (Cordts et al., 2016), a popular dataset used for benchmarking semantic segmentation methods. (ii) Class imbalance in the data is typically extreme. Certain categories (such as ‘building’ or ‘sky’) can appear with two orders of magnitude more frequently than others (e.g. ‘pedestrian’ or ‘bicycle’). This can lead to undesired biases and performance properties for learned models. ",
107
+ "bbox": [
108
+ 174,
109
+ 825,
110
+ 825,
111
+ 895
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/019c005408e6ebec987244e1d6a537172ea85946059cd775443d3f29074dde5f.jpg",
118
+ "image_caption": [
119
+ "Figure 1: (Left) Input image from Cityscapes dataset (Cordts et al., 2016), with selected regions by our method to be labeled. (Right) Retrieved ground truth annotation for the selected regions. Our method focuses on small objects and under-represented classes, such as bicycles, pedestrians and poles. Best viewed in color. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 246,
124
+ 101,
125
+ 750,
126
+ 208
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 174,
135
+ 295,
136
+ 820,
137
+ 324
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "This is specially relevant when we want to collect annotated data with a human in the loop to create a new dataset or to add more labeled data to an existing one. We can tackle the aforementioned problems by selecting, in an efficient and effective way, which regions of the images should be labeled next. Active learning (AL) is a well-established field that studies precisely this: selecting the most informative samples to label so that a learning algorithm will perform better with less data than a non-selective approach, such as labelling the entire collection of data. Active learning methods can be roughly divided in two groups: (i) methods that combine different manually-designed AL strategies (Roy & McCallum, 2001; Osugi et al., 2005; Gal et al., 2017; Baram et al., 2004; Chu & Lin, 2016; Hsu & Lin, 2015; Ebert et al., 2012; Long & Hua, 2015) and (ii) data-driven AL approaches (Bachman et al., 2017; Fang et al., 2017; Konyushkova et al., 2017; Woodward & Finn, 2016; Ravi & Larochelle, 2018; Konyushkova et al., 2018), that learn which samples are most informative to train a model using information of the model itself. Although label acquisition for semantic segmentation is more costly and time consuming than image classification, there has been considerably less work in active learning for semantic segmentation (Dutt Jain & Grauman, 2016; Mackowiak et al., 2018; Vezhnevets et al., 2012; Konyushkova et al., 2015; Gorriz et al., 2017; Yang et al., 2017), and they focus on hand-crafted strategies. ",
144
+ "bbox": [
145
+ 174,
146
+ 328,
147
+ 825,
148
+ 549
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Current AL techniques that use reinforcement learning (Konyushkova et al., 2018; Fang et al., 2017; Woodward & Finn, 2016; Pang et al., 2018; Padmakumar et al., 2018; Bachman et al., 2017) focus on labelling one sample per step until a budget of labels is met. In semantic segmentation, this would translate into labelling a single region per step. This is highly inefficient, since each step involves updating the segmentation network and computing the rewards. In this work, we propose an end-to-end method to learn an active learning strategy for semantic segmentation with reinforcement learning by directly maximizing the performance metric we care about, Intersection over Union (IoU). We aim at learning a policy from the data that finds the most informative regions on a set of unlabeled images and asks for its labels, such that a segmentation network can achieve high-quality performance with a minimum number of labeled pixels. Selecting regions, instead of entire images, allows the algorithm to focus on the most relevant parts of the images, as shown in Figure 1. Although class imbalance in segmentation datasets has been previously addressed in (Badrinarayanan et al., 2017; Chan et al., 2019; Sudre et al., 2017), among others, they try to solve a problem that arises from the data collection process. We show that our proposed method can help mitigate the problem at its source, i.e. in the data annotation itself. Because our method maximizes the mean IoU per class, it indirectly learns to ask for more labels of regions with under-represented classes, compared to the baselines. Moreover, we propose and explore a batch-mode active learning approach that uses an adapted DQN to efficiently chose batches of regions for labelling at each step. ",
155
+ "bbox": [
156
+ 174,
157
+ 556,
158
+ 825,
159
+ 805
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "To the best of our knowledge, all current approaches for active learning in semantic segmentation rely on hand-crafted active learning heuristics. However, learning a labelling policy from the data could allow the query agent to ask for labeled data as a function of the data characteristics and class imbalances, that may vary between datasets. Our main contributions can be summarized as follows: (i) we learn a RL-based acquisition function for region-based active learning for segmentation, (ii) we formulate our active learning framework with a batch-mode DQN, which labels multiple regions in parallel at each active learning iteration (a more efficient strategy for large-scale datasets that is compatible with standard mini-batch gradient descent), and (iii) we test the proof of concept in CamVid (Brostow et al., 2008) dataset and provide results in Cityscapes (Cordts et al., 2016) dataset, beating a recent state-of-the-art technique known as BALD (Gal et al., 2017), a widely used entropy-based selection criterion and uniform sampling baselines. ",
166
+ "bbox": [
167
+ 174,
168
+ 813,
169
+ 825,
170
+ 924
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "",
177
+ "bbox": [
178
+ 174,
179
+ 103,
180
+ 825,
181
+ 146
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2 RELATED WORK ",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 176,
191
+ 165,
192
+ 344,
193
+ 183
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Active learning. Traditional active learning techniques focus on estimating the sample informativeness using hand-crafted heuristics derived from sample uncertainty: employing entropy (Shannon, 1948), query-by-committee (Dagan & Engelson, 1995; Shannon, 1948; Freund et al., 1993), maximizing the error reduction (Roy & McCallum, 2001), disagreement between experts (Dagan & Engelson, 1995; Freund et al., 1993) or Bayesian methods that need to estimate the posterior distribution (Houlsby et al., 2011a; Gal et al., 2017). Some approaches combine different techniques to improve AL performance. For instance, relying on exploration-exploitation trade-offs (Osugi et al., 2005), on a bandit formulation (Baram et al., 2004; Chu & Lin, 2016; Hsu & Lin, 2015) and on reinforcement learning (Ebert et al., 2012; Long & Hua, 2015). However, these methods are still limited in the sense that they combine hand-crafted strategies instead of learning new ones. More recent active learning methods rely on an acquisition function that estimates the sample informativeness with a learned metric. Konyushkova et al. (2017) estimate the error reduction of labelling a particular sample, choosing the ones that maximize the error reduction. Wang et al. (2017) introduce a cost-effective approach that also uses confident predictions as pseudo ground truth labels. ",
200
+ "bbox": [
201
+ 174,
202
+ 198,
203
+ 826,
204
+ 392
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "AL with reinforcement learning. Recently, reinforcement learning has gained attention as a method to learn a labelling policy that directly maximizes the learning algorithm performance. For instance, Liu et al. (2018); Bachman et al. (2017) leverage expert knowledge from oracle policies to learn a labelling policy, and Pang et al. (2018); Padmakumar et al. (2018) rely on policy gradient methods to learn the acquisition function. In a different approach, some methods gather all labeled data in one big step. In Contardo et al. (2017), all samples are chosen in one step with a bi-directional RNN for the task of one-shot learning. In Sener & Savarese (2018), they propose to select a batch of representative samples that maximize the coverage of the entire unlabeled set. However, the bounded core-set loss used tends to perform worse when the number of classes grows. ",
211
+ "bbox": [
212
+ 174,
213
+ 398,
214
+ 825,
215
+ 523
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "More similar to our approach, some prior works propose to learn the acquisition function with a Deep Q-Network (DQN) (Mnih et al., 2013) formulation. These works have examined both stream-based active learning (Fang et al., 2017; Woodward & Finn, 2016), where unlabeled samples are provided one by one, and the decision is to label it or not, and pool-based active learning (Konyushkova et al., 2018), where all the unlabeled data is provided beforehand, and the decision is later taken on which samples to choose. The work of Konyushkova et al. (2018) is the closest to ours. Similar to them, our method also leverages the benefits of Q-learning (Watkins & Dayan, 1992) to tackle pool-based AL. Contrary to them, we deal with a much more complex problem: semantic segmentation versus simple classification on UCI repository (Dua & Graff, 2017). The large-scale nature of the problem requires us to use a very different definition of actions, states and rewards. Moreover, we need to adapt the DQN formulation to allow the problem to be computationally feasible. ",
222
+ "bbox": [
223
+ 174,
224
+ 531,
225
+ 825,
226
+ 684
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "AL for semantic segmentation. Active learning for semantic segmentation has been relatively less explored than other tasks, potentially due to its large-scale nature. For instance, Dutt Jain & Grauman (2016) combine metrics (defined on hand-crafted heuristics) that encourage the diversity and representativeness of labeled samples. Some rely on unsupervised superpixel-based oversegmentation (Vezhnevets et al., 2012; Konyushkova et al., 2015) – and highly depend on the quality of the super-pixel segmentation. Others focus on foreground-background segmentation of biomedical images (Gorriz et al., 2017; Yang et al., 2017), also using hand-crafted heuristics. Settles et al. (2008); Vijayanarasimhan & Grauman (2009); Mackowiak et al. (2018) focus on cost-effective approaches, proposing manually-designed acquisition functions based on the cost of labeling images or regions of images. However, this information is not always given, restricting their applicability. ",
233
+ "bbox": [
234
+ 174,
235
+ 690,
236
+ 825,
237
+ 830
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Mackowiak et al. (2018) focus on cost-effective approaches, where the cost of labeling an image is not considered equal for all images. Similar to our work, they use a region-based approach to cope with the large number of samples on a segmentation dataset. Contrary to us, their labelling strategy is based on manually defined heuristics, limiting the representability of the acquisition function. To the best of our knowledge, our work is the first to apply data-driven RL-based approach to the problem of active learning for semantic segmentation. ",
244
+ "bbox": [
245
+ 174,
246
+ 837,
247
+ 823,
248
+ 920
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 METHOD ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 174,
258
+ 102,
259
+ 282,
260
+ 117
261
+ ],
262
+ "page_idx": 3
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "We are interested in selecting a small number of regions1(cropped from images in the original dataset) from a large unlabeled set to maximize the performance of a segmentation network $f$ , parameterized by $\\theta$ . This process is done iteratively until a given budget $B$ of labeled samples is achieved. At each iteration $t$ , a query network $\\pi$ , parameterized by $\\phi$ , selects $K$ regions to be labeled by an oracle from a large unlabeled set $\\mathcal { U } _ { t }$ . These samples are added to the labeled set $\\mathcal { L } _ { t }$ , that is used to train the segmentation network $f$ . The performance is measured with a standard semantic segmentation metric, Intersection-over-Union (IoU). ",
267
+ "bbox": [
268
+ 174,
269
+ 133,
270
+ 825,
271
+ 231
272
+ ],
273
+ "page_idx": 3
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "We cast the AL problem within a Markov decision process (MDP) formulation, inspired by other work such as (Padmakumar et al., 2018; Fang et al., 2017; Bachman et al., 2017; Pang et al., 2018; Konyushkova et al., 2018). We model the query network $\\pi$ as a reinforcement learning agent, specifically a deep Q-network (Mnih et al., 2013). This data-driven approach allows the model to learn selection strategies based solely on prior AL experience. Our formulation differs from other approaches by the task we address, the definitions of states, actions and rewards, and the reinforcement learning algorithm we use to find the optimal policy. ",
278
+ "bbox": [
279
+ 174,
280
+ 238,
281
+ 825,
282
+ 335
283
+ ],
284
+ "page_idx": 3
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "3.1 ACTIVE LEARNING WITH REINFORCEMENT LEARNING FOR SEGMENTATION ",
289
+ "text_level": 1,
290
+ "bbox": [
291
+ 178,
292
+ 353,
293
+ 740,
294
+ 367
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "In our setting, we use four different data splits. To train $\\pi$ , we define a subset of labeled data $\\mathcal { D } _ { T }$ to play the active learning game for several episodes and learn a good acquisition function that maximizes performance with a budget of $B$ regions. The query network is evaluated on a different split $\\mathcal { D } _ { V }$ . We use a separate subset $\\mathcal { D } _ { R }$ to obtain the reward signal by evaluating the segmentation network on it. The set $\\mathcal { D } _ { S }$ $\\langle \\left| \\mathcal { D } _ { S } \\right| \\ll \\left| \\mathcal { D } _ { T } \\right| )$ is used to construct the state representation. ",
301
+ "bbox": [
302
+ 174,
303
+ 378,
304
+ 825,
305
+ 449
306
+ ],
307
+ "page_idx": 3
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "The MDP is defined with the sequence of transitions $\\left\\{ \\left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \\right) \\right\\}$ . For every state $s _ { t } \\in S$ (function of the segmentation network at timestep $t$ ), the agent can perform actions $a _ { t } \\in \\mathcal A$ to choose which samples from $\\mathcal { U } _ { t }$ to annotate. The action $\\grave { a } _ { t } = \\{ \\breve { a } _ { t } ^ { k } \\} _ { k = 1 } ^ { K }$ , composed of $K$ sub-actions, is a function of the segmentation network, the labeled and the unlabeled set. Each sub-action asks for a specific region to be labeled. Then, it receives a reward $r _ { t + 1 }$ based on the improvement in mean IoU per class after training the segmentation network with the selected samples. Note that states and actions do not depend on the specific architecture of the segmentation network. We are interested in finding a policy to select samples that maximize the segmentation performance. We use deep Q-network (Mnih et al., 2013) and samples from an experience buffer $\\mathcal { E }$ to train the query network $\\pi$ . ",
312
+ "bbox": [
313
+ 173,
314
+ 455,
315
+ 825,
316
+ 582
317
+ ],
318
+ "page_idx": 3
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "Each episode $e$ elapses a total of $T$ steps. We start by setting the segmentation network $f$ to a set of initial weights $\\theta _ { 0 }$ and with no annotated data, i.e., $\\mathcal { L } _ { 0 } = \\emptyset$ and $\\mathcal { U } _ { 0 } = \\mathcal { D } _ { T }$ . At each iteration $t$ , the following steps are done: ",
323
+ "bbox": [
324
+ 176,
325
+ 588,
326
+ 825,
327
+ 630
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "1. The state $s _ { t }$ is computed as function of $f _ { t }$ and $\\mathcal { D } _ { S }$ . \n2. A restricted action space is built with $K$ pools $\\mathcal { P } _ { t } ^ { k }$ with $N$ regions, sampled uniformly from the unlabeled set $\\mathcal { U } _ { t }$ . For each region in each pool, we compute its sub-action representation \n3. The query agent selects k,n at $K$ sub-actions $\\{ a _ { t } ^ { k } \\} _ { k = 1 } ^ { K }$ w ith $\\epsilon$ -greedy policy. Each sub-action $a _ { t } ^ { k }$ is defined as selecting one region $x _ { k }$ (out of $N$ ) to annotate from a pool $\\mathcal { P } _ { t } ^ { k }$ . \n4. An oracle labels the regions and the sets are updated: $\\mathcal { L } _ { t + 1 } = \\mathcal { L } _ { t } \\cup \\{ ( x _ { k } , y _ { k } ) \\} _ { k = 1 } ^ { K }$ and $\\mathcal { U } _ { t + 1 } = \\mathcal { U } _ { t } \\setminus \\{ x _ { k } \\} _ { k = 1 } ^ { K }$ . \n5. The segmentation network $f _ { t + 1 }$ is trained one iteration on the recently added regions $\\{ \\boldsymbol { x } _ { k } \\} _ { k = 1 } ^ { K }$ . \n6. The agent receives the reward $r _ { t + 1 }$ as the difference of performance between $f _ { t + 1 }$ and $f _ { t }$ on $\\mathcal { D } _ { R }$ . ",
334
+ "bbox": [
335
+ 210,
336
+ 638,
337
+ 825,
338
+ 820
339
+ ],
340
+ "page_idx": 3
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "Figure 2 depicts this training algorithm. We consider the termination of each episode when the budget $B$ of labeled regions is met, i.e., $| \\mathcal { L } _ { t } | = B$ . Once the episode is terminated, we restart the weights of the segmentation network $f$ to the initial weights $\\theta _ { 0 }$ , set $\\mathcal { L } _ { 0 } = \\emptyset$ and $\\mathcal { U } _ { 0 } = \\mathcal { D } _ { T }$ , and restart the episode. We train the query policy $\\pi$ by simulating several episodes and updating its weights at each timestep by sampling transitions $\\left\\{ \\left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \\right) \\right\\}$ from the experience replay buffer $\\mathcal { E }$ . More details in Section 3.2. ",
345
+ "bbox": [
346
+ 173,
347
+ 830,
348
+ 825,
349
+ 887
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "image",
355
+ "img_path": "images/97599a01622a8beb5c6e72a5a916d832ba85563d43f410aed308835e5de73da9.jpg",
356
+ "image_caption": [
357
+ "Figure 2: The query network $\\pi$ is trained during several episodes $e$ with MDP transitions $\\left\\{ \\left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \\right) \\right\\}$ . 1) The state $s _ { t }$ is computed as a function of segmentation network $f$ and state set $\\mathcal { D } _ { S }$ . 2) $K$ unlabeled pools $\\mathcal { P } _ { t } ^ { k }$ are sampled uniformly from the unlabeled set $\\mathcal { U } _ { t }$ . The representation of their possible sub-actions are computed using $f$ , labeled set $\\scriptstyle { \\mathcal { L } } _ { t }$ and unlabeled set $\\mathcal { U } _ { t }$ . 3) Query network $\\pi$ selects action $a _ { t }$ , composed of $K$ sub-actions $a _ { t } ^ { k }$ . Each of them is chosen from its corresponding pool. 4) Selected regions are labeled and added to $\\scriptstyle { \\mathcal { L } } _ { t }$ (and removed from $\\mathcal { U } _ { t }$ ). 5) Segmentation network $f$ is trained with those new labeled samples. 6) Reward $r _ { t + 1 }$ is obtained from $\\mathcal { D } _ { R }$ . This loop continues until a budget $B$ of labeled regions is achieved. "
358
+ ],
359
+ "image_footnote": [],
360
+ "bbox": [
361
+ 209,
362
+ 113,
363
+ 787,
364
+ 320
365
+ ],
366
+ "page_idx": 4
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "",
371
+ "bbox": [
372
+ 176,
373
+ 429,
374
+ 823,
375
+ 458
376
+ ],
377
+ "page_idx": 4
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "State representation. We would like to use the state of the segmentation network $f$ as the MDP state. Unfortunately, it is not straightforward to embed $f$ into a state representation. Following Konyushkova et al. (2017), we represent the state space $s$ with the help of a set-aside set $\\mathcal { D } _ { S }$ . We use a small subset of data from the train set, making sure it contains a significant representation of all classes. We consider it to be a representative set of the dataset, and that any improvement in the segmentation performance on subset $\\mathcal { D } _ { S }$ will translate into an improvement over the full dataset2. We use the predictions of the segmentation network $f _ { t }$ on $\\mathcal { D } _ { S }$ to create a global representation of state $s _ { t }$ (step 1 in Figure 2). ",
382
+ "bbox": [
383
+ 173,
384
+ 474,
385
+ 826,
386
+ 587
387
+ ],
388
+ "page_idx": 4
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "We need a compact representation to avoid intensive memory usage due to the pixel-wise predictions. The samples in $\\mathcal { D } _ { S }$ are split in patches, and compact feature vectors are computed for all of them. Then, each region is encoded by the concatenation of two sets of features: one is based on class predictions of $f _ { t }$ and the other on its prediction uncertainty, represented as the Shannon entropy (Shannon, 1948). The first set of features (i) is a (normalized) count of the number of pixels that are predicted to each category. This feature encodes the segmentation prediction on a given patch while dismissing the spatial information, less important for small patches. Moreover, we measure the uncertainty of the predictor with the entropy over the probability of predicted classes. For each region, we compute the entropy of each pixel location to obtain a spatial entropy map. To compress this representation, we apply min, average and max-poolings to the entropy map to obtain downsampled feature maps. The second set of features (ii) is thus obtained by flattening these entropy features and concatenating them. ",
393
+ "bbox": [
394
+ 173,
395
+ 593,
396
+ 826,
397
+ 760
398
+ ],
399
+ "page_idx": 4
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "Finally, the state $s _ { t }$ is represented by an ensemble of the feature representation of each region in $\\mathcal { D } _ { S }$ . \nFigure A.1a illustrates how $s _ { t }$ is computed from each region. ",
404
+ "bbox": [
405
+ 171,
406
+ 767,
407
+ 825,
408
+ 795
409
+ ],
410
+ "page_idx": 4
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "Action representation. In our setting, taking an action means asking for the pixel-wise annotation of an unlabeled region. Due to the large-scale nature of semantic segmentation, it would be prohibitively expensive to compute features for each region in the unlabeled set at each step. For this reason, instead, at each step $t$ , we approximate the whole unlabeled set by sampling $K$ pools of unlabeled regions $\\mathcal { P } _ { t } ^ { k }$ , each containing $N$ (uniformly) sampled regions. For each region, we compute its sub-action representation $a _ { t } ^ { k , n }$ (step 2 in Figure 2). ",
415
+ "bbox": [
416
+ 174,
417
+ 811,
418
+ 825,
419
+ 898
420
+ ],
421
+ "page_idx": 4
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "Each sub-action $a _ { t } ^ { k , n }$ is a concatenation of four different features: the entropy and class distribution features (as in the state representation), a measure of similarity between the region $x _ { k }$ and the labeled set and another between the region and the unlabeled set. The intuition is that the query network could learn to build a more class-balanced labeled set while still taking representative samples from the unlabeled set. This could help mitigate the hard imbalance of the segmentation datasets and improve overall performance. ",
426
+ "bbox": [
427
+ 174,
428
+ 102,
429
+ 825,
430
+ 188
431
+ ],
432
+ "page_idx": 5
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "For each candidate region, $x$ in a pool $\\mathcal { P } _ { t } ^ { k }$ , we compute the KL divergence between the class distributions of the prediction map of region $x$ (estimated as normalized counts of predicted pixels in each category) and the class distributions of each labeled and unlabeled regions (using the groundtruth annotations and network predictions, respectively). For the labeled set, we compute a KL divergence score between each of the labeled regions’ class distribution and the one of region $x$ . Summarizing all these KL divergences could be done by taking the maximum or summing them. However, to obtain more informative features, we compute a normalized histogram of KL divergence scores, resulting in a distribution of similarities. As an example, if we were to sum all the scores, having half of the labeled regions with a KL divergence of zero and the other half with a value $c$ , would be equivalent to have all labeled regions with a KL divergence of $c / 2$ . The latter could be more interesting, since it means there are no labeled regions with the same class distribution as $x$ . For the unlabeled set we follow the same procedure, resulting in another distribution of KL divergences. Both of them are concatenated and added to the action representation. Figure A.1b illustrates how we represent each possible action in a pool. ",
437
+ "bbox": [
438
+ 174,
439
+ 193,
440
+ 826,
441
+ 388
442
+ ],
443
+ "page_idx": 5
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "Based on early experimentation, learning the state and action representations directly with a CNN does not provide strong enough features for the reinforcement learning framework to converge to a good solution. An ablation study on the state and action components can be found in Appendix E.1. ",
448
+ "bbox": [
449
+ 176,
450
+ 395,
451
+ 825,
452
+ 438
453
+ ],
454
+ "page_idx": 5
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "3.2 BATCH MODE DQN ",
459
+ "text_level": 1,
460
+ "bbox": [
461
+ 176,
462
+ 454,
463
+ 351,
464
+ 468
465
+ ],
466
+ "page_idx": 5
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "The desired query agent should follow an optimal policy. This policy maps each state to an action that maximizes the expected sum of future rewards. We rely on a DQN (Mnih et al., 2013), parameterized by $\\phi$ , to find an optimal policy. ",
471
+ "bbox": [
472
+ 176,
473
+ 479,
474
+ 823,
475
+ 522
476
+ ],
477
+ "page_idx": 5
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "We train our DQN with a labeled set $\\mathcal { D } _ { T }$ and compute the rewards in a held-out split $\\mathcal { D } _ { R }$ . As mentioned above, the query agent in our method selects $K$ regions before transitioning to the next state. We assume that each region is selectedone region in parallel. In this case, the action each with a restricted action space, avoiding dependently, asis composed of combinatorial the case where independent sulosion of the ac $K$ annotaactions n spac $a _ { t }$ $K$ $\\{ a _ { t } ^ { k } \\} _ { k = 1 } ^ { K }$ computation and avoid selecting repeated regions in the same time-step, we restrict each sub-action $a _ { t } ^ { k }$ to select a region $x _ { k }$ in $\\mathcal { P } _ { t } ^ { k }$ defined as: ",
482
+ "bbox": [
483
+ 173,
484
+ 529,
485
+ 825,
486
+ 627
487
+ ],
488
+ "page_idx": 5
489
+ },
490
+ {
491
+ "type": "equation",
492
+ "img_path": "images/8337d9a96cb14857c33a3b828c2e86e6ecc47aab5071754921c5c30c7f0db782.jpg",
493
+ "text": "$$\na _ { t } ^ { k } = \\underset { a _ { t } ^ { k , n } \\in \\mathcal { P } _ { t } ^ { k } } { \\operatorname { a r g m a x } } ~ Q ( s _ { t } , a _ { t } ^ { k , n } ; \\phi ) ~ ,\n$$",
494
+ "text_format": "latex",
495
+ "bbox": [
496
+ 397,
497
+ 628,
498
+ 599,
499
+ 661
500
+ ],
501
+ "page_idx": 5
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "for each $k \\in \\{ 1 , . . . , K \\}$ action take in timestep $t$ . ",
506
+ "bbox": [
507
+ 173,
508
+ 662,
509
+ 495,
510
+ 679
511
+ ],
512
+ "page_idx": 5
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "The network is trained by optimizing a loss based on temporal difference (TD) error (Sutton, 1988). The loss is defined as the expectation over decomposed transitions $\\mathcal { T } _ { k } = \\{ ( s _ { t } , a _ { t } ^ { k } , r _ { t + 1 } ^ { k } , s _ { t + 1 } ) \\}$ , obtained from the standard transitions $\\left\\{ \\left( s _ { t } , a _ { t } , r _ { t + 1 } , s _ { t + 1 } \\right) \\right\\}$ , by approximating $r _ { t + 1 } ^ { k } \\approx r _ { t + 1 }$ : ",
517
+ "bbox": [
518
+ 174,
519
+ 685,
520
+ 826,
521
+ 731
522
+ ],
523
+ "page_idx": 5
524
+ },
525
+ {
526
+ "type": "equation",
527
+ "img_path": "images/157cb863bc53fa0501b39cc603bd48c18c162643aca4a103df1d9c26c9af047b.jpg",
528
+ "text": "$$\n\\mathbb { E } _ { \\mathcal { T } _ { k } \\sim \\mathcal { E } } \\left[ ( y _ { t } ^ { k } - Q ( s _ { t } , a _ { t } ^ { k } ; \\phi ) ) ^ { 2 } \\right] ,\n$$",
529
+ "text_format": "latex",
530
+ "bbox": [
531
+ 393,
532
+ 734,
533
+ 601,
534
+ 761
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "where $\\mathcal { E }$ is the experience replay buffer and $y _ { t } ^ { k }$ the TD target for each sub-action. ",
541
+ "bbox": [
542
+ 173,
543
+ 762,
544
+ 700,
545
+ 779
546
+ ],
547
+ "page_idx": 5
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "To stabilize the training, we used a target network with weights $\\phi ^ { \\prime }$ and the double DQN (Van Hasselt et al., 2016) formulation. The action selection and evaluation is decoupled; the action is selected with the target network and is evaluated with the query network. The TD target for each sub-action is represented as: ",
552
+ "bbox": [
553
+ 174,
554
+ 785,
555
+ 825,
556
+ 840
557
+ ],
558
+ "page_idx": 5
559
+ },
560
+ {
561
+ "type": "equation",
562
+ "img_path": "images/e75325e9e68273a4e78cc62e0c3b8ff13f0475c2729371d333b211099f32e9fd.jpg",
563
+ "text": "$$\ny _ { t } ^ { k } = r _ { t + 1 } + \\gamma Q ( s _ { t + 1 } , \\ \\underset { a _ { t + 1 } ^ { k , n } \\in \\mathcal { P } _ { t + 1 } ^ { k } } { \\mathrm { a r g m a x } } \\ Q ( s _ { t + 1 } , a _ { t + 1 } ^ { k , n } ; \\boldsymbol { \\phi } ^ { \\prime } ) ; \\boldsymbol { \\phi } ) .\n$$",
564
+ "text_format": "latex",
565
+ "bbox": [
566
+ 312,
567
+ 838,
568
+ 684,
569
+ 872
570
+ ],
571
+ "page_idx": 5
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "where $\\gamma$ is a discount factor. 3 ",
576
+ "bbox": [
577
+ 174,
578
+ 875,
579
+ 370,
580
+ 890
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "This formulation is valid under the approximation that the sub-actions are independent of each other, conditioned on the state. We observed that increasing the number of sub-actions $K$ per step eases computation and does not hinder segmentation performance. We provide an ablation study on the effect of $K$ in Appendix E.3. ",
587
+ "bbox": [
588
+ 174,
589
+ 103,
590
+ 825,
591
+ 160
592
+ ],
593
+ "page_idx": 6
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "4 EXPERIMENTS ",
598
+ "text_level": 1,
599
+ "bbox": [
600
+ 176,
601
+ 184,
602
+ 326,
603
+ 199
604
+ ],
605
+ "page_idx": 6
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "We start this section by describing the datasets that we use to evaluate our method, the experimental setup, and the baselines. We evaluate the algorithm in Camvid as a proof of concept and we show large-scale results on Cityscapes. ",
610
+ "bbox": [
611
+ 174,
612
+ 218,
613
+ 825,
614
+ 260
615
+ ],
616
+ "page_idx": 6
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "4.1 EXPERIMENTAL SETUP ",
621
+ "text_level": 1,
622
+ "bbox": [
623
+ 174,
624
+ 280,
625
+ 375,
626
+ 295
627
+ ],
628
+ "page_idx": 6
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "Although we can apply active learning in a setting with unlabeled data with a human in the loop that labels selected regions, we test our approach in fully labeled datasets, where it is easier to mask out the labels of a part of the data and reveal them when the active learning algorithm selects them. ",
633
+ "bbox": [
634
+ 174,
635
+ 309,
636
+ 825,
637
+ 349
638
+ ],
639
+ "page_idx": 6
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "CamVid (Brostow et al., 2008). This dataset consists of street scene view images, with the resolution of $3 6 0 \\times 4 8 0$ and 11 categories. It has 370, 104 and 234 images for train, validation and test set, respectively. We split the train set with uniform sampling in 110 labeled images (from where we get 10 images to represent the state set $\\mathcal { D } _ { S }$ and the rest for $\\mathcal { D } _ { T }$ ), and 260 images to build $\\mathcal { D } _ { V }$ , where we evaluate and compare our acquisition function to the baselines. The state set is chosen to be representative of $\\mathcal { D } _ { T }$ , by restricting the sampling of $\\mathcal { D } _ { S }$ to have a similar class distribution to the one of $\\mathcal { D } _ { T }$ . Each image is split into 24 regions of dimension $8 0 \\times 9 0$ . We use the dataset’s validation set for $\\mathcal { D } _ { R }$ . We report the final segmentation results on the test set. In our experiments, we chose $K = 2 4$ regions per step. Our model is quite robust to the number of regions selected at each time step (see Appendix E.3). ",
644
+ "bbox": [
645
+ 174,
646
+ 369,
647
+ 825,
648
+ 508
649
+ ],
650
+ "page_idx": 6
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "Cityscapes (Cordts et al., 2016). It is also composed of real street scene views, with image resolution of $2 0 4 8 \\times 1 0 2 4$ and 19 semantic categories. The train set with fine-grained segmentation labels has 2975 images and the validation dataset of 500 images. We uniformly sampled 360 labeled images from the train set. Out of these, 10 images represent $\\mathcal { D } _ { S }$ , 150 build $\\mathcal { D } _ { T }$ and 200, $\\mathcal { D } _ { R }$ , where we get our rewards. The remaining 2615 images of train set are used for $\\mathcal { D } _ { V }$ , as if they were unlabeled. We report the results in the validation set (test set not available). Each image is split in 128 regions of dimension $1 2 8 \\times 1 2 8$ . We chose $K = 2 5 6$ regions per step. ",
655
+ "bbox": [
656
+ 174,
657
+ 527,
658
+ 825,
659
+ 626
660
+ ],
661
+ "page_idx": 6
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "Implementation details. The split $\\mathcal { D } _ { R }$ is used to get the rewards for the DQN and also for hyperparameter selection, that are chosen according to the best setup for both baselines and our method. We report the average and standard deviation of the 5 different runs (5 random seeds). As data augmentation, we use random horizontal flips and random crops of $2 2 4 \\times 2 2 4$ . For more details, please refer to Appendix $\\mathbf { B }$ on supplementary material. ",
666
+ "bbox": [
667
+ 174,
668
+ 645,
669
+ 826,
670
+ 715
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "Evaluation. The query network $\\pi$ is trained on $\\mathcal { D } _ { T }$ with a small, fixed budget $( 0 . 5 \\mathrm { k }$ regions for Camvid and $4 \\mathrm { k \\Omega }$ regions for Cityscapes) to encourage picking regions that will boost the performance in an heavily scarce data regime. The learned acquisition function, as well as the baselines, is evaluated on $\\mathcal { D } _ { V }$ , where we ask for labels until the budget is met, for different budgets. Note that the baselines do not have any learnable component. ",
677
+ "bbox": [
678
+ 174,
679
+ 734,
680
+ 825,
681
+ 804
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "Once the budget is reached, we train the segmentation network $f$ with $\\mathcal { L } _ { T }$ until convergence (with early stopping in $\\mathcal { D } _ { R }$ ). For a fair comparison, all methods’ segmentation network has been pre-trained (initial $f$ weights $\\theta _ { 0 }$ ) on GTA dataset (Richter et al., 2016), a synthetic dataset where high amounts of labeled data can be obtained without human effort, and $\\mathcal { D } _ { T }$ (where we had labels to train the DQN). We evaluate the final segmentation performance (measured in mean IoU) on the test set of CamVid and on the validation set of Cityscapes. ",
688
+ "bbox": [
689
+ 174,
690
+ 805,
691
+ 825,
692
+ 888
693
+ ],
694
+ "page_idx": 6
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "4.2 RESULTS ",
699
+ "text_level": 1,
700
+ "bbox": [
701
+ 174,
702
+ 910,
703
+ 277,
704
+ 922
705
+ ],
706
+ "page_idx": 6
707
+ },
708
+ {
709
+ "type": "image",
710
+ "img_path": "images/04b67ac28c5a652a557d086ebf99cc4067ce968989b526c6895ca6bd368e8393.jpg",
711
+ "image_caption": [
712
+ "Figure 4: Performance of several methods with increasing active learning budget, expressed as the number of $1 2 8 \\times 1 2 8$ pixel regions labeled and the $\\%$ of additional labeled data. All methods have been pretrained with GTAV and a small subset of their target datasets. Budget indicates additional number of regions labeled (and the percentage of unlabeled data used). The dashed line represents the $96 \\%$ of the total performance achieved by the segmentation network with fully-supervised training (having access to all labels). We report the mean and standard deviation of 5 runs. "
713
+ ],
714
+ "image_footnote": [],
715
+ "bbox": [
716
+ 202,
717
+ 99,
718
+ 790,
719
+ 299
720
+ ],
721
+ "page_idx": 7
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Results in CamVid. We compare our results against three distinct baselines: (i) U is the uniform random sampling of the regions to label at each step out of all possible regions in the pool, (ii) $\\mathbf { H }$ is an uncertainty sampling method that selects the regions with maximum cumulative pixel-wise Shannon entropy, (iii) B picks regions with maximum cumulative pixel-wise BALD (Houlsby et al., 2011b; Gal et al., 2017) metric. We use 20 iterations of MC-Dropout (Gal & Ghahramani, 2016) (instead of 100, as in (Gal et al., 2017)) for computational reasons. In preliminary experiments, we did not observe any improvement using over 20 iterations. In Camvid, we use a pool size of 10 for our method, H, B and 50 for U. In Cityscapes, we have access to more data so we use pool sizes of 500, 200, 200 and 100 respectively for U, H, $\\mathbf { B }$ and our method. Pool sizes were selected according to the best validation mean IoU. ",
726
+ "bbox": [
727
+ 174,
728
+ 414,
729
+ 712,
730
+ 580
731
+ ],
732
+ "page_idx": 7
733
+ },
734
+ {
735
+ "type": "image",
736
+ "img_path": "images/c49abc9a0b68205a8fcf0fc323330ed2d1c1e47f9b6a90236bf94ac40ee70f77.jpg",
737
+ "image_caption": [
738
+ "Figure 3: Entropy of class distributions obtained from pixels of selected regions. "
739
+ ],
740
+ "image_footnote": [],
741
+ "bbox": [
742
+ 736,
743
+ 400,
744
+ 810,
745
+ 515
746
+ ],
747
+ "page_idx": 7
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "performs the baselines for every fixed budget, except for $1 . 5 \\mathrm { k }$ regions, where we achieve similar performance as H. We argue that the dataset has a small number of images and selecting $1 . 5 \\mathrm { k }$ regions already reaches past $98 \\%$ of maximum performance, where differences between our method and H are negligible. Surprisingly, $\\mathbf { B }$ is worse than U, specially for small budgets, where training with the newly acquired labels does not provide any additional information. It overfits quickly to the training, getting a worst result that with the initial weights. In general, all results have a high variance due to the low regime of data we are working in. In Appendix E.2 we show the advantages of labeling small regions instead of full images. ",
752
+ "bbox": [
753
+ 174,
754
+ 607,
755
+ 825,
756
+ 713
757
+ ],
758
+ "page_idx": 7
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Results in Cityscapes. Figure 4b shows results on Cityscapes for different budgets. Here, we also observe that our method outperforms the baselines for all budgets points. Labelling 20k regions, corresponding to only $6 \\%$ of the total pixels (additional to the labeled data in $\\mathcal { D } _ { T }$ ), we obtain a performance of $6 4 . 5 \\%$ mean IoU. This is $96 \\%$ of the performance of the segmentation network if it had access to all labeled pixels. To reach the same performance, $\\mathbf { H }$ requires an additional $^ \\mathrm { 6 k }$ labeled regions (around $30 \\%$ more pixels, equivalent to an extra 45 images). In this larger dataset, B performs better than random, showing that for the task of segmentation, B might start to show its benefits only for considerably large budgets. Table 1 shows the per-class IoU for the evaluated methods (with a fixed budget). Our method works specially well for under-represented classes, such as Person, Motorcycle or Bicycle, among others. Indeed, our method selects more pixels belonging to under-represented classes than baselines. Note that this is a side effect of directly optimizing for the mean IoU and defining class-aware representations for states and actions. Figure 3 shows the entropy of the distribution of selected pixels of the final labeled set (for a budget of 12k regions) for Cityscapes. The higher the entropy means closer to uniform distribution over classes, and our method ",
763
+ "bbox": [
764
+ 174,
765
+ 729,
766
+ 825,
767
+ 924
768
+ ],
769
+ "page_idx": 7
770
+ },
771
+ {
772
+ "type": "table",
773
+ "img_path": "images/c2582ac7d7dac6b40fb7499f678a27945b6a55db17f63bec16fa397fb67a71ee.jpg",
774
+ "table_caption": [],
775
+ "table_footnote": [],
776
+ "table_body": "<table><tr><td>Method</td><td>Road</td><td>Side- Walk</td><td>Build- ing</td><td>Wall</td><td>Fence</td><td>Pole</td><td>Traffic Light</td><td>Traffic Sign</td><td>Vege- tation</td><td>Terrain</td></tr><tr><td>U</td><td>96.67</td><td>76.63</td><td>88.48</td><td>33.89</td><td>36.00</td><td>52.80</td><td>54.27</td><td>60.84</td><td>90.27</td><td>52.34</td></tr><tr><td>H</td><td>95.60</td><td>72.08</td><td>88.06</td><td>35.30</td><td>44.59</td><td>52.43</td><td>53.70</td><td>61.38</td><td>90.08</td><td>51.87</td></tr><tr><td>B</td><td>95.25</td><td>69.37</td><td>88.75</td><td>32.28</td><td>44.36</td><td>53.81</td><td>58.84</td><td>64.79</td><td>90.27</td><td>50.51</td></tr><tr><td>Ours</td><td>96.19</td><td>74.24</td><td>88.46</td><td>33.56</td><td>42.28</td><td>53.28</td><td>57.18</td><td>63.61</td><td>90.20</td><td>51.84</td></tr><tr><td></td><td>Sky</td><td>Person</td><td>Rider</td><td>Car</td><td>Truck</td><td>Bus</td><td>Train</td><td>Motor- cycle</td><td>Bicycle</td><td>mIoU</td></tr><tr><td>U</td><td>92.57</td><td>69.66</td><td>31.82</td><td>90.13</td><td>27.04</td><td>43.41</td><td>23.30</td><td>32.98</td><td>63.64</td><td>58.78</td></tr><tr><td>H</td><td>88.27</td><td>72.69</td><td>40.85</td><td>90.46</td><td>42.40</td><td>58.88</td><td>33.63</td><td>43.17</td><td>68.08</td><td>62.29</td></tr><tr><td>B</td><td>93.33</td><td>71.16</td><td>39.08</td><td>88.38</td><td>34.23</td><td>43.41</td><td>30.35</td><td>37.37</td><td>66.67</td><td>60.64</td></tr><tr><td>Ours</td><td>91.32</td><td>73.30</td><td>45.22</td><td>90.91</td><td>42.14</td><td>58.84</td><td>35.97</td><td>45.14</td><td>69.35</td><td>63.32</td></tr></table>",
777
+ "bbox": [
778
+ 204,
779
+ 101,
780
+ 790,
781
+ 263
782
+ ],
783
+ "page_idx": 8
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Table 1: Per category IoU and mean IoU $[ \\% ]$ on Cityscapes validation set, for a budget of $1 2 \\mathrm { k }$ regions. For clarity, only the mean of 5 runs is reported. Results with standard deviations in Table C.1. ",
788
+ "bbox": [
789
+ 174,
790
+ 273,
791
+ 823,
792
+ 299
793
+ ],
794
+ "page_idx": 8
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "has the highest entropy. Appendix C shows the distribution from which the entropy is computed and Appendix D presents some qualitative results, showing what each method decides to label for some images. ",
799
+ "bbox": [
800
+ 174,
801
+ 308,
802
+ 825,
803
+ 349
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "5 CONCLUSION ",
810
+ "text_level": 1,
811
+ "bbox": [
812
+ 174,
813
+ 358,
814
+ 318,
815
+ 375
816
+ ],
817
+ "page_idx": 8
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "We propose a data-driven, region-based method for active learning for semantic segmentation, based on reinforcement learning. The goal is to alleviate the costly process of obtaining pixel-wise labels with a human in the loop. We propose a new modification of DQN formulation to learn the acquisition function, adapted to the large-scale nature of semantic segmentation. This provides a computationally efficient solution that uses less labeled data than competitive baselines, while achieving the same performance. Moreover, by directly optimizing for the per-class mean IoU and defining class-aware representations for states and actions, our method asks for more labels of under-represented classes compared to baselines. This improves the performance and helps to mitigate class imbalance. As future work, we highlight the possibility of designing a better region definition, that could help improve the overall results, and adding domain adaptation for the learnt policy, to transfer it between datasets. ",
822
+ "bbox": [
823
+ 174,
824
+ 388,
825
+ 825,
826
+ 541
827
+ ],
828
+ "page_idx": 8
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "ACKNOWLEDGEMENTS ",
833
+ "text_level": 1,
834
+ "bbox": [
835
+ 176,
836
+ 564,
837
+ 367,
838
+ 579
839
+ ],
840
+ "page_idx": 8
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "We thank NSERC and PROMPT. We would also like to thank the team at ElementAI for supporting this research and providing useful feedback. ",
845
+ "bbox": [
846
+ 173,
847
+ 594,
848
+ 823,
849
+ 622
850
+ ],
851
+ "page_idx": 8
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "REFERENCES ",
856
+ "text_level": 1,
857
+ "bbox": [
858
+ 176,
859
+ 643,
860
+ 285,
861
+ 659
862
+ ],
863
+ "page_idx": 8
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "Philip Bachman, Alessandro Sordoni, and Adam Trischler. Learning algorithms for active learning. In ICML, 2017. ",
868
+ "bbox": [
869
+ 176,
870
+ 667,
871
+ 825,
872
+ 695
873
+ ],
874
+ "page_idx": 8
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoderdecoder architecture for image segmentation. PAMI, 2017. ",
879
+ "bbox": [
880
+ 173,
881
+ 705,
882
+ 825,
883
+ 733
884
+ ],
885
+ "page_idx": 8
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "Yoram Baram, Ran El Yaniv, and Kobi Luz. Online choice of active learning algorithms. JMLR, 2004. ",
890
+ "bbox": [
891
+ 171,
892
+ 742,
893
+ 825,
894
+ 771
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What’s the point: Semantic segmentation with point supervision. In ECCV, 2016. ",
901
+ "bbox": [
902
+ 173,
903
+ 781,
904
+ 823,
905
+ 810
906
+ ],
907
+ "page_idx": 8
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Gabriel J. Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In ECCV, 2008. ",
912
+ "bbox": [
913
+ 174,
914
+ 819,
915
+ 823,
916
+ 848
917
+ ],
918
+ "page_idx": 8
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "Robin Chan, Matthias Rottmann, Fabian Hüger, Peter Schlicht, and Hanno Gottschalk. Application of decision rules for handling class imbalance in semantic segmentation. arXiv preprint arXiv:1901.08394, 2019. ",
923
+ "bbox": [
924
+ 174,
925
+ 857,
926
+ 825,
927
+ 898
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "Hong-Min Chu and Hsuan-Tien Lin. Can active learning experience be transferred? In ICMD, 2016. ",
934
+ "bbox": [
935
+ 171,
936
+ 909,
937
+ 823,
938
+ 924
939
+ ],
940
+ "page_idx": 8
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Gabriella Contardo, Ludovic Denoyer, and Thierry Artières. A meta-learning approach to one-step active-learning. In International Workshop on Automatic Selection, Configuration and Composition of Machine Learning Algorithms. CEUR, 2017. ",
945
+ "bbox": [
946
+ 176,
947
+ 103,
948
+ 823,
949
+ 146
950
+ ],
951
+ "page_idx": 9
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. ",
956
+ "bbox": [
957
+ 176,
958
+ 155,
959
+ 823,
960
+ 198
961
+ ],
962
+ "page_idx": 9
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Ido Dagan and Sean P. Engelson. Committee-based sampling for training probabilistic classifiers. In ICML, 1995. ",
967
+ "bbox": [
968
+ 174,
969
+ 205,
970
+ 821,
971
+ 236
972
+ ],
973
+ "page_idx": 9
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR, 2009. ",
978
+ "bbox": [
979
+ 173,
980
+ 243,
981
+ 821,
982
+ 273
983
+ ],
984
+ "page_idx": 9
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "Dheeru Dua and Casey Graff. UCI machine learning repository, 2017. URL http://archive. ics.uci.edu/ml. ",
989
+ "bbox": [
990
+ 174,
991
+ 281,
992
+ 821,
993
+ 310
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Suyog Dutt Jain and Kristen Grauman. Active image segmentation propagation. In CVPR, 2016. ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 319,
1003
+ 808,
1004
+ 335
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Sandra Ebert, Mario Fritz, and Bernt Schiele. Ralf: A reinforced active learning formulation for object class recognition. In CVPR, 2012. ",
1011
+ "bbox": [
1012
+ 173,
1013
+ 343,
1014
+ 823,
1015
+ 372
1016
+ ],
1017
+ "page_idx": 9
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "Meng Fang, Yuan Li, and Trevor Cohn. Learning how to active learn: A deep reinforcement learning approach. In EMNLP, 2017. ",
1022
+ "bbox": [
1023
+ 171,
1024
+ 381,
1025
+ 825,
1026
+ 410
1027
+ ],
1028
+ "page_idx": 9
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical features for scene labeling. PAMI, 2013. ",
1033
+ "bbox": [
1034
+ 171,
1035
+ 417,
1036
+ 823,
1037
+ 448
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "Yoav Freund, H Sebastian Seung, Eli Shamir, and Naftali Tishby. Information, Prediction, and Query by Committee. In NIPS, 1993. ",
1044
+ "bbox": [
1045
+ 171,
1046
+ 455,
1047
+ 823,
1048
+ 486
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "Y Gal, R Islam, and Z Ghahramani. Deep bayesian active learning with image data. ICML, 2017. ",
1055
+ "bbox": [
1056
+ 173,
1057
+ 493,
1058
+ 812,
1059
+ 510
1060
+ ],
1061
+ "page_idx": 9
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In ICML, 2016. ",
1066
+ "bbox": [
1067
+ 171,
1068
+ 517,
1069
+ 823,
1070
+ 547
1071
+ ],
1072
+ "page_idx": 9
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Marc Gorriz, Axel Carlier, Emmanuel Faure, and Xavier Giró i Nieto. Cost-effective active learning for melanoma segmentation. ML4H: Machine Learning for Health Workshop, NIPS, 2017. ",
1077
+ "bbox": [
1078
+ 173,
1079
+ 555,
1080
+ 825,
1081
+ 585
1082
+ ],
1083
+ "page_idx": 9
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Ji He, Mari Ostendorf, Xiaodong He, Jianshu Chen, Jianfeng Gao, Lihong Li, and Li Deng. Deep reinforcement learning with a combinatorial action space for predicting popular reddit threads. In EMNLP, 2016. ",
1088
+ "bbox": [
1089
+ 173,
1090
+ 593,
1091
+ 825,
1092
+ 636
1093
+ ],
1094
+ "page_idx": 9
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Neil Houlsby, Ferenc Huszár, Zoubin Ghahramani, and Máté Lengyel. Bayesian active learning for classification and preference learning. arXiv preprint arXiv:1112.5745, 2011a. ",
1099
+ "bbox": [
1100
+ 173,
1101
+ 645,
1102
+ 821,
1103
+ 674
1104
+ ],
1105
+ "page_idx": 9
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "Neil Houlsby, Ferenc Huszar, Zoubin Ghahramani, and Máté Lengyel. Bayesian active learning for classification and preference learning. arXiv, 2011b. ",
1110
+ "bbox": [
1111
+ 174,
1112
+ 683,
1113
+ 821,
1114
+ 712
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Wei-Ning Hsu and Hsuan-Tien Lin. Active learning by learning. In AAAI, 2015. ",
1121
+ "bbox": [
1122
+ 173,
1123
+ 719,
1124
+ 702,
1125
+ 736
1126
+ ],
1127
+ "page_idx": 9
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Alexander Kirillov, Ross B. Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. CVPR, 2019. ",
1132
+ "bbox": [
1133
+ 173,
1134
+ 743,
1135
+ 820,
1136
+ 773
1137
+ ],
1138
+ "page_idx": 9
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Introducing geometry in active learning for image segmentation. In ICCV, 2015. ",
1143
+ "bbox": [
1144
+ 173,
1145
+ 781,
1146
+ 823,
1147
+ 811
1148
+ ],
1149
+ "page_idx": 9
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Learning active learning from data. In NIPS, 2017. ",
1154
+ "bbox": [
1155
+ 174,
1156
+ 819,
1157
+ 821,
1158
+ 849
1159
+ ],
1160
+ "page_idx": 9
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "Ksenia Konyushkova, Raphael Sznitman, and Pascal Fua. Discovering general-purpose active learning strategies. arXiv preprint arXiv:1810.04114, 2018. ",
1165
+ "bbox": [
1166
+ 174,
1167
+ 857,
1168
+ 821,
1169
+ 886
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Yann Lecun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998. ",
1176
+ "bbox": [
1177
+ 174,
1178
+ 895,
1179
+ 821,
1180
+ 924
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Tsung-Yi Lin, Piotr Dollár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. ",
1187
+ "bbox": [
1188
+ 169,
1189
+ 103,
1190
+ 825,
1191
+ 132
1192
+ ],
1193
+ "page_idx": 10
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Ming Liu, Wray Buntine, and Gholamreza Haffari. Learning how to actively learn: A deep imitation learning approach. In ACL, 2018. ",
1198
+ "bbox": [
1199
+ 173,
1200
+ 140,
1201
+ 823,
1202
+ 170
1203
+ ],
1204
+ "page_idx": 10
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "Chengjiang Long and Gang Hua. Multi-class multi-annotator active learning with robust gaussian process for visual recognition. In ICCV, 2015. ",
1209
+ "bbox": [
1210
+ 173,
1211
+ 178,
1212
+ 823,
1213
+ 208
1214
+ ],
1215
+ "page_idx": 10
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. ",
1220
+ "bbox": [
1221
+ 173,
1222
+ 215,
1223
+ 823,
1224
+ 244
1225
+ ],
1226
+ "page_idx": 10
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Radek Mackowiak, Philip Lenz, Omair Ghori, Ferran Diego, Oliver Lange, and Carsten Rother. Cereals-cost-effective region-based active learning for semantic segmentation. BMVC, 2018. ",
1231
+ "bbox": [
1232
+ 171,
1233
+ 252,
1234
+ 825,
1235
+ 284
1236
+ ],
1237
+ "page_idx": 10
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. NIPS Deep Learning Workshop, 2013. ",
1242
+ "bbox": [
1243
+ 178,
1244
+ 290,
1245
+ 823,
1246
+ 334
1247
+ ],
1248
+ "page_idx": 10
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "Matthias Müller, Alexey Dosovitskiy, Bernard Ghanem, and Vladen Koltun. Driving policy transfer via modularity and abstraction. CoRL, 2018. ",
1253
+ "bbox": [
1254
+ 171,
1255
+ 342,
1256
+ 825,
1257
+ 372
1258
+ ],
1259
+ "page_idx": 10
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Thomas Osugi, Deng Kim, and Stephen Scott. Balancing exploration and exploitation: A new algorithm for active machine learning. In ICDM, 2005. ",
1264
+ "bbox": [
1265
+ 174,
1266
+ 378,
1267
+ 823,
1268
+ 410
1269
+ ],
1270
+ "page_idx": 10
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Aishwarya Padmakumar, Peter Stone, and Raymond Mooney. Learning a policy for opportunistic active learning. In EMNLP, 2018. ",
1275
+ "bbox": [
1276
+ 173,
1277
+ 416,
1278
+ 823,
1279
+ 446
1280
+ ],
1281
+ "page_idx": 10
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Kunkun Pang, Mingzhi Dong, Yang Wu, and Timothy Hospedales. Meta-learning transferable active learning policies by deep reinforcement learning. arXiv preprint arXiv:1806.04798, 2018. ",
1286
+ "bbox": [
1287
+ 173,
1288
+ 454,
1289
+ 823,
1290
+ 484
1291
+ ],
1292
+ "page_idx": 10
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Pedro O. Pinheiro and Ronan Collobert. Recurrent convolutional neural networks for scene labeling. In ICML, 2014. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 492,
1300
+ 825,
1301
+ 521
1302
+ ],
1303
+ "page_idx": 10
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Sachin Ravi and Hugo Larochelle. Meta-learning for batch mode active learning. In ICLR Workshop, 2018. ",
1308
+ "bbox": [
1309
+ 173,
1310
+ 529,
1311
+ 825,
1312
+ 559
1313
+ ],
1314
+ "page_idx": 10
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Stephan R. Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In ECCV, 2016. ",
1319
+ "bbox": [
1320
+ 171,
1321
+ 566,
1322
+ 825,
1323
+ 597
1324
+ ],
1325
+ "page_idx": 10
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. ",
1330
+ "bbox": [
1331
+ 174,
1332
+ 604,
1333
+ 823,
1334
+ 633
1335
+ ],
1336
+ "page_idx": 10
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Nicholas Roy and Andrew McCallum. Toward optimal active learning through monte carlo estimation of error reduction. ICML, 2001. ",
1341
+ "bbox": [
1342
+ 173,
1343
+ 642,
1344
+ 823,
1345
+ 671
1346
+ ],
1347
+ "page_idx": 10
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Max Schwarz, Anton Milan, Arul Selvam Periyasamy, and Sven Behnke. Rgb-d object detection and semantic segmentation for autonomous manipulation in clutter. IJRR, 2018. ",
1352
+ "bbox": [
1353
+ 173,
1354
+ 679,
1355
+ 823,
1356
+ 709
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. ICLR, 2018. ",
1363
+ "bbox": [
1364
+ 173,
1365
+ 717,
1366
+ 825,
1367
+ 746
1368
+ ],
1369
+ "page_idx": 10
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Burr Settles, Mark Craven, and Lewis Friedland. Active learning with real annotation costs. In NIPS, 2008. ",
1374
+ "bbox": [
1375
+ 174,
1376
+ 753,
1377
+ 825,
1378
+ 784
1379
+ ],
1380
+ "page_idx": 10
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Claude Elwood Shannon. A mathematical theory of communication. Bell system technical journal, 1948. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 791,
1388
+ 825,
1389
+ 821
1390
+ ],
1391
+ "page_idx": 10
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Carole H Sudre, Wenqi Li, Tom Vercauteren, Sebastien Ourselin, and M Jorge Cardoso. Generalised dice overlap as a deep learning loss function for highly unbalanced segmentations. In Deep learning in medical image analysis and multimodal learning for clinical decision support. Springer, 2017. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 829,
1399
+ 826,
1400
+ 886
1401
+ ],
1402
+ "page_idx": 10
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Richard S. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 1988. ",
1407
+ "bbox": [
1408
+ 174,
1409
+ 895,
1410
+ 823,
1411
+ 924
1412
+ ],
1413
+ "page_idx": 10
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In AAAI, 2016. ",
1418
+ "bbox": [
1419
+ 171,
1420
+ 103,
1421
+ 825,
1422
+ 132
1423
+ ],
1424
+ "page_idx": 11
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Alexander Vezhnevets, Joachim M Buhmann, and Vittorio Ferrari. Active learning for semantic segmentation with expected change. In CVPR, 2012. ",
1429
+ "bbox": [
1430
+ 173,
1431
+ 140,
1432
+ 823,
1433
+ 170
1434
+ ],
1435
+ "page_idx": 11
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Sudheendra Vijayanarasimhan and Kristen Grauman. What’s it going to cost you?: Predicting effort vs. informativeness for multi-label image annotations. In CVPR, 2009. ",
1440
+ "bbox": [
1441
+ 173,
1442
+ 178,
1443
+ 825,
1444
+ 208
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "Keze Wang, Dongyu Zhang, Ya Li, Ruimao Zhang, and Liang Lin. Cost-effective active learning for deep image classification. IEEE Transactions on Circuits and Systems for Video Technology, 2017. ",
1451
+ "bbox": [
1452
+ 173,
1453
+ 215,
1454
+ 825,
1455
+ 246
1456
+ ],
1457
+ "page_idx": 11
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Wenfu Wang and Zhijie Pan. Dsnet for real-time driving scene semantic segmentation. arXiv preprint arXiv:1812.07049, 2018. ",
1462
+ "bbox": [
1463
+ 173,
1464
+ 253,
1465
+ 823,
1466
+ 284
1467
+ ],
1468
+ "page_idx": 11
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 1992. ",
1473
+ "bbox": [
1474
+ 173,
1475
+ 291,
1476
+ 712,
1477
+ 308
1478
+ ],
1479
+ "page_idx": 11
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "Mark Woodward and Chelsea Finn. Active one-shot learning. NIPS Deep RL Workshop, 2016. ",
1484
+ "bbox": [
1485
+ 173,
1486
+ 315,
1487
+ 795,
1488
+ 332
1489
+ ],
1490
+ "page_idx": 11
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Lin Yang, Yizhe Zhang, Jianxu Chen, Siyuan Zhang, and Danny Z Chen. Suggestive annotation: A deep active learning framework for biomedical image segmentation. In MICCAI, 2017. ",
1495
+ "bbox": [
1496
+ 171,
1497
+ 339,
1498
+ 823,
1499
+ 369
1500
+ ],
1501
+ "page_idx": 11
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Licheng Yu, Xinlei Chen, Georgia Gkioxari, Mohit Bansal, Tamara L. Berg, and Dhruv Batra. Multi-target embodied question answering. In CVPR, 2019. ",
1506
+ "bbox": [
1507
+ 171,
1508
+ 377,
1509
+ 825,
1510
+ 407
1511
+ ],
1512
+ "page_idx": 11
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "A STATE AND ACTION REPRESENTATION DETAILS ",
1517
+ "text_level": 1,
1518
+ "bbox": [
1519
+ 174,
1520
+ 103,
1521
+ 601,
1522
+ 117
1523
+ ],
1524
+ "page_idx": 12
1525
+ },
1526
+ {
1527
+ "type": "text",
1528
+ "text": "In this section, we provide illustrations that show more details on how the state and action are built. Figure A.1a shows how to build the state representation and Figure A.1b how to compute the action representation of a particular region. ",
1529
+ "bbox": [
1530
+ 174,
1531
+ 133,
1532
+ 826,
1533
+ 176
1534
+ ],
1535
+ "page_idx": 12
1536
+ },
1537
+ {
1538
+ "type": "image",
1539
+ "img_path": "images/a3f9bf9173e3bc56b54ea0cbae3e08b4846b0e38036fc1d324bef0d0a1d2fa95.jpg",
1540
+ "image_caption": [
1541
+ "Figure A.1: (a) Each region $x _ { i }$ in $\\mathcal { D } _ { S }$ is represented as a concatenation of two features, one based on entropy and the other on class predictions. The final state $s _ { t }$ is the concatenation of the features for all regions. (b) Each region $x _ { k }$ in pool $\\mathcal { P } _ { k }$ is represented as a concatenation of four features: entropy-based features, class predictions and two KL divergence distributions, comparing each region $x _ { k }$ with the labeled and unlabeled set. "
1542
+ ],
1543
+ "image_footnote": [],
1544
+ "bbox": [
1545
+ 276,
1546
+ 204,
1547
+ 725,
1548
+ 535
1549
+ ],
1550
+ "page_idx": 12
1551
+ },
1552
+ {
1553
+ "type": "text",
1554
+ "text": "B EXTENDED EXPERIMENTAL SETUP ",
1555
+ "text_level": 1,
1556
+ "bbox": [
1557
+ 176,
1558
+ 627,
1559
+ 493,
1560
+ 643
1561
+ ],
1562
+ "page_idx": 12
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "The segmentation network $f$ is an adaptation of feature pyramid network (Lin et al., 2017) for semantic segmentation (similar to the segmentation branch of (Kirillov et al., 2019)), with a ResNet50 backbone (He et al., 2016), pretrained on ImageNet (Deng et al., 2009). The network is pretrained on the full train set of a large-scale synthetic dataset, GTAV (Richter et al., 2016), therefore not requiring much human labelling effort. Moreover, this dataset has the advantage of possessing the same categories as real datasets we experiment with. ",
1567
+ "bbox": [
1568
+ 174,
1569
+ 659,
1570
+ 825,
1571
+ 742
1572
+ ],
1573
+ "page_idx": 12
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "The query network $\\pi$ , depicted in Figure B.1, is composed of two paths, one to compute state features and another to compute action features, fusing them at the end. Each of the layers are composed of Batch Normalization, ReLU activation and a fully-connected layer. The state path and action path are composed of 4 and 3 layers, respectively, with a final layer that fuses them together to get the global features; these are gated with a sigmoid, controlled by the KL distance distributions in the action representation. The weights are updated at each step of the active learning loop, by sampling batches of 16 experience tuples from an experience replay buffer, sized 600 and 3200 for Camvid and Cityscapes, respectively. ",
1578
+ "bbox": [
1579
+ 174,
1580
+ 750,
1581
+ 825,
1582
+ 861
1583
+ ],
1584
+ "page_idx": 12
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "We train both networks with stochastic gradient descent (SGD) with momentum. We use the same learning rate for both the segmentation and query networks; $1 0 ^ { - 4 }$ and $1 0 ^ { - 3 }$ for Cityscapes and Camvid respectively. Weight decay is set to $\\mathrm { 1 0 ^ { - 4 } }$ for the segmentation network and $\\mathrm { i 0 ^ { - 3 } }$ for the query network. We used a training batch size of 32 for Camvid and 16 for Cityscapes. ",
1589
+ "bbox": [
1590
+ 174,
1591
+ 867,
1592
+ 825,
1593
+ 924
1594
+ ],
1595
+ "page_idx": 12
1596
+ },
1597
+ {
1598
+ "type": "image",
1599
+ "img_path": "images/a4e54814eb9de81352c6274e854d6500883df78773da4f79a52ff553811c005b.jpg",
1600
+ "image_caption": [
1601
+ "Figure B.1: The DQN takes a state representation $s _ { t }$ and an action representation for a possible action (labeling region $x _ { k }$ in an unlabeled pool $\\mathcal { P } _ { t } ^ { k }$ ). $N _ { F }$ are the number of state and action features (class distributions and entropy-based features), and $N _ { S I M }$ the number of features for the KL divergence distributions. Features are computed for both representations separately with layers composed of Batch Normalization, ReLU activation and fully connected layers. Both feature vectors are flattened and concatenated, to apply a final linear layer that obtains a score as a single scalar. The $\\mathrm { Q }$ -values are computed as the gated score, where the gate is controlled by a feature representation from the KL distance distributions of the action representation. "
1602
+ ],
1603
+ "image_footnote": [],
1604
+ "bbox": [
1605
+ 310,
1606
+ 114,
1607
+ 684,
1608
+ 361
1609
+ ],
1610
+ "page_idx": 13
1611
+ },
1612
+ {
1613
+ "type": "text",
1614
+ "text": "C CLASS FREQUENCIES AND PERFORMANCE PER CLASS ",
1615
+ "text_level": 1,
1616
+ "bbox": [
1617
+ 174,
1618
+ 502,
1619
+ 655,
1620
+ 517
1621
+ ],
1622
+ "page_idx": 13
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "We show in Figure C.1 a more detailed plot for the class frequencies of regions that each of the methods chooses for labeling. As the entropy of the class distributions in Figure 3 show, our method picks more regions containing under-represented classes. Specially, it asks labels for more Person, Rider, Train, Motorcycle and Bicycle pixels. ",
1627
+ "bbox": [
1628
+ 174,
1629
+ 540,
1630
+ 826,
1631
+ 597
1632
+ ],
1633
+ "page_idx": 13
1634
+ },
1635
+ {
1636
+ "type": "text",
1637
+ "text": "We observe that our B baseline picks more than $50 \\%$ of pixels for only 3 classes that are overrepresented or have a medium representation: Building, Vegetation and Sky. This could explain why the performance is worse than the H baseline. ",
1638
+ "bbox": [
1639
+ 174,
1640
+ 603,
1641
+ 823,
1642
+ 646
1643
+ ],
1644
+ "page_idx": 13
1645
+ },
1646
+ {
1647
+ "type": "text",
1648
+ "text": "Moreover, in table C.1, we extend Table 1 by adding the standard deviation for each result. ",
1649
+ "bbox": [
1650
+ 171,
1651
+ 652,
1652
+ 766,
1653
+ 667
1654
+ ],
1655
+ "page_idx": 13
1656
+ },
1657
+ {
1658
+ "type": "text",
1659
+ "text": "D QUALITATIVE RESULTS ",
1660
+ "text_level": 1,
1661
+ "bbox": [
1662
+ 176,
1663
+ 700,
1664
+ 401,
1665
+ 717
1666
+ ],
1667
+ "page_idx": 13
1668
+ },
1669
+ {
1670
+ "type": "text",
1671
+ "text": "We compare our method qualitatively with the baselines in Figure D.1. Baseline U asks for random patches. Our method tends to pick more regions with the under-represented classes and small objects. For instance, in the first image in the left, our method asks for several regions of a Train, that almost has no samples in the training data. In the second image, it focuses on Person, Bicycle and Poles. In the third image, it asks for labels of the traffic lights and a pedestrian on a bicycle. Baselines B and $\\mathbf { H }$ select some of those relevant regions, but miss a lot of them. ",
1672
+ "bbox": [
1673
+ 174,
1674
+ 739,
1675
+ 825,
1676
+ 823
1677
+ ],
1678
+ "page_idx": 13
1679
+ },
1680
+ {
1681
+ "type": "text",
1682
+ "text": "E ABLATION STUDIES ",
1683
+ "text_level": 1,
1684
+ "bbox": [
1685
+ 176,
1686
+ 856,
1687
+ 375,
1688
+ 872
1689
+ ],
1690
+ "page_idx": 13
1691
+ },
1692
+ {
1693
+ "type": "text",
1694
+ "text": "In this section, we provide an ablation study on the state and action representation, the effect of labeling small regions versus full images, and the comparison of taking different regions per step. ",
1695
+ "bbox": [
1696
+ 173,
1697
+ 895,
1698
+ 825,
1699
+ 924
1700
+ ],
1701
+ "page_idx": 13
1702
+ },
1703
+ {
1704
+ "type": "image",
1705
+ "img_path": "images/64faba326ae8f09ec41e220352db37da0a6f3519a7400c031f0c1307bcb5df8c.jpg",
1706
+ "image_caption": [
1707
+ "Figure C.1: Class frequencies $[ \\% ]$ in Cityscapes for the selected regions to label after the active learning acquisition for different methods. \"Data split\" frequencies refer to the proportion of classes in the unlabeled data split, where we reveal the masks for the purpose of showing the underlying class frequencies. In this split is where all methods perform active learning, in the setting where we mask out the labels $( \\mathcal { D } _ { v } )$ . Budget used: 12k regions. For ease of visualization, we only plot the mean of 5 runs. Void label represents all pixels for which we do not assign any labels. "
1708
+ ],
1709
+ "image_footnote": [],
1710
+ "bbox": [
1711
+ 176,
1712
+ 104,
1713
+ 820,
1714
+ 280
1715
+ ],
1716
+ "page_idx": 14
1717
+ },
1718
+ {
1719
+ "type": "table",
1720
+ "img_path": "images/ac2b81f4e4b95b2145d33d67171de96120dc4a9fe838c9c5f6be340a70ce866f.jpg",
1721
+ "table_caption": [],
1722
+ "table_footnote": [
1723
+ "Table C.1: Per category IoU and mean IoU $[ \\% ]$ , on Cityscapes validation set, for a budget of 12k regions. Both the mean and standard deviation of 5 runs is reported. "
1724
+ ],
1725
+ "table_body": "<table><tr><td>Method</td><td>Road</td><td>Sidewalk</td><td>Building</td><td>Wall</td><td>Fence</td></tr><tr><td>U</td><td>96.67 ± 0.09</td><td>76.63 ± 0.51</td><td>88.48 ± 0.12</td><td>33.89 ± 1.11</td><td>36.00 ± 2.12</td></tr><tr><td>H(Shannon,1948)</td><td>95.60 ± 0.33</td><td>72.08 ± 1.28</td><td>88.06 ± 0.42</td><td>35.30 ± 1.73</td><td>44.59 ± 1.62</td></tr><tr><td>B (Gal et al., 2017)</td><td>95.25 ± 0.28</td><td>69.37 ± 0.94</td><td>88.75 ± 0.18</td><td>32.28 ± 0.88</td><td>44.36 ± 1.12</td></tr><tr><td>Ours</td><td>96.19 ± 0.23</td><td>74.24 ± 1.50</td><td>88.46 ± 0.23</td><td>33.56 ± 2.30</td><td>42.28 ± 1.40</td></tr><tr><td></td><td>Pole</td><td>Traffic Light</td><td>Traffic Sign</td><td>Vegetation</td><td>Terrain</td></tr><tr><td>U</td><td>52.80 ± 0.41</td><td>54.27 ± 1.34</td><td>60.84 ± 0.99</td><td>90.27 ± 0.14</td><td>52.34 ± 1.38</td></tr><tr><td>H(Shannon, 1948)</td><td>52.43± 0.31</td><td>53.70 ±1.48</td><td>61.38 ± 0.81</td><td>90.08 ± 0.16</td><td>51.87 ± 0.79</td></tr><tr><td>B (Gal et al., 2017)</td><td>53.81 ± 0.30</td><td>58.84 ± 0.50</td><td>64.79 ± 0.34</td><td>90.27 ± 0.15</td><td>50.51 ± 0.94</td></tr><tr><td>Ours</td><td>53.28 ± 0.51</td><td>57.18 ± 1.92</td><td>63.61 ± 1.47</td><td>90.20 ± 0.26</td><td>51.84 ± 1.62</td></tr><tr><td></td><td>Sky</td><td>Person</td><td>Rider</td><td>Car</td><td>Truck</td></tr><tr><td>U</td><td>92.57 ± 0.30</td><td>69.66 ± 0.62</td><td>31.82 ± 2.66</td><td>90.13 ± 0.01</td><td>27.04 ± 2.16</td></tr><tr><td>H(Shannon,1948)</td><td>88.27 ± 3.26</td><td>72.69 ± 0.53</td><td>40.85 ± 1.85</td><td>90.46 ±0.38</td><td>42.40 ± 1.96</td></tr><tr><td>B (Gal et al., 2017)</td><td>93.33 ± 0.24</td><td>71.16 ± 0.47</td><td>39.08 ± 1.26</td><td>88.38 ± 0.29</td><td>34.23 ±1.24</td></tr><tr><td>Ours</td><td>91.32 ± 1.06</td><td>73.30 ± 0.43</td><td>45.22 ± 2.75</td><td>90.91 ± 0.23</td><td>42.14 ± 1.41</td></tr><tr><td></td><td>Bus</td><td>Train</td><td>Motorcycle</td><td>Bicycle</td><td>mIoU</td></tr><tr><td>U</td><td>43.41 ± 2.80</td><td>23.30 ± 2.52</td><td>32.98 ± 3.81</td><td>63.64 ± 0.33</td><td>58.78 ±0.29</td></tr><tr><td>H(Shannon,1948)</td><td>58.88 ± 2.97</td><td>33.63 ± 4.76</td><td>43.17 ±1.37</td><td>68.08 ± 0.38</td><td>62.29 ± 0.55</td></tr><tr><td>B (Gal et al., 2017)</td><td>43.41 ±4.34</td><td>30.35 ± 3.18</td><td>37.37 ± 0.79</td><td>66.67 ± 0.67</td><td>60.64 ± 0.49</td></tr><tr><td>Ours</td><td>58.84 ± 4.15</td><td>35.97 ± 3.50</td><td>45.14 ± 2.34</td><td>69.35 ± 0.90</td><td>63.32 ± 0.93</td></tr></table>",
1726
+ "bbox": [
1727
+ 192,
1728
+ 391,
1729
+ 805,
1730
+ 698
1731
+ ],
1732
+ "page_idx": 14
1733
+ },
1734
+ {
1735
+ "type": "text",
1736
+ "text": "E.1 STATE AND ACTION REPRESENTATION ",
1737
+ "text_level": 1,
1738
+ "bbox": [
1739
+ 176,
1740
+ 768,
1741
+ 482,
1742
+ 784
1743
+ ],
1744
+ "page_idx": 14
1745
+ },
1746
+ {
1747
+ "type": "text",
1748
+ "text": "Here, we analyze the incremental effect of our design choices for the state and action representation on Cityscapes. We use 3 pooling operations – min, average, max – to compress the entropy map of the region and use it in the state and action representation. Also, KL divergences are added to the latter. As seen in Table E.1, using only the max-pooled entropy map (Ours - 1H), the performance is slightly worse than H. When we combine the information of the 3 pooled entropy maps (Ours - 3H), we outperform $\\mathbf { H }$ baseline. Moreover, when adding the two distribution of KL distances to our action representation $( \\mathbf { O u r s } - 3 \\mathbf { H } + \\mathbf { K L } )$ : between possible regions to label and the labeled set and between the region and the unlabeled set, we further increase the performance, getting our best state and action representations. ",
1749
+ "bbox": [
1750
+ 173,
1751
+ 797,
1752
+ 826,
1753
+ 924
1754
+ ],
1755
+ "page_idx": 14
1756
+ },
1757
+ {
1758
+ "type": "image",
1759
+ "img_path": "images/569ce9f506eecf6f50ededaec76c14f0980114b549f3f65795fa3f12c03ace54.jpg",
1760
+ "image_caption": [
1761
+ "Figure D.1: Qualitative results in Cityscapes after running the active learning algorithm with a budget of 2k regions. The first row consists on input images, the second shows the what U picks, the third, B, the fourth $\\mathbf { H }$ , and the last row shows what our method picks. Best viewed in color. "
1762
+ ],
1763
+ "image_footnote": [],
1764
+ "bbox": [
1765
+ 183,
1766
+ 102,
1767
+ 823,
1768
+ 486
1769
+ ],
1770
+ "page_idx": 15
1771
+ },
1772
+ {
1773
+ "type": "table",
1774
+ "img_path": "images/d012cafdad02bae560a810cb1f412d8c57946e28e0cd701c49531a18ee2e6703.jpg",
1775
+ "table_caption": [
1776
+ "Table E.1: Contribution to the validation mean IoU performance $[ \\% ]$ of Cityscapes dataset, for a budget of 4K and for each of the components of our state representation, compared to the baselines. Mean and standard deviation of 5 runs is reported. "
1777
+ ],
1778
+ "table_footnote": [],
1779
+ "table_body": "<table><tr><td rowspan=\"2\">State</td><td colspan=\"3\">Pool size</td></tr><tr><td>20</td><td>100</td><td>200</td></tr><tr><td>U</td><td>54.62 ± 0.60</td><td>54.92 ± 0.59</td><td>55.15 ± 0.64</td></tr><tr><td>H(Shannon,1948)</td><td>57.41 ± 0.17</td><td>57.55 ± 0.60</td><td>57.48 ± 0.96</td></tr><tr><td>B (Gal et al., 2017)</td><td>56.73 ± 0.20</td><td>56.99 ± 0.32</td><td>56.44 ± 0.77</td></tr><tr><td>Ours - 1H</td><td>56.89 ± 1.22</td><td>57.29 ± 0.67</td><td>57.62 ± 0.96</td></tr><tr><td>Ours - 3H</td><td>57.65 ± 0.74</td><td>58.10 ± 1.16</td><td>57.65 ± 1.30</td></tr><tr><td>Ours - 3H+KL</td><td>57.67 ± 0.92</td><td>58.95 ± 0.59</td><td>59.18 ± 0.62</td></tr></table>",
1780
+ "bbox": [
1781
+ 294,
1782
+ 561,
1783
+ 704,
1784
+ 693
1785
+ ],
1786
+ "page_idx": 15
1787
+ },
1788
+ {
1789
+ "type": "text",
1790
+ "text": "E.2 REGION VS. FULL IMAGE ANNOTATION ",
1791
+ "text_level": 1,
1792
+ "bbox": [
1793
+ 176,
1794
+ 781,
1795
+ 485,
1796
+ 795
1797
+ ],
1798
+ "page_idx": 15
1799
+ },
1800
+ {
1801
+ "type": "text",
1802
+ "text": "In this subsection, we analyze the effect of asking for labels in regions instead of full images and the effect of the number of regions per step. We compare the validation IoU when asking for pixel-wise labels for entire images versus pixel-wise labels for small regions. In the first case, we ask for one image at each step and, for the latter, we ask for 24 regions per step (pixel-wise, equivalent to one image). As it is shown in Table E.2, asking for entire image labels has similar performance for all methods, that resemble Uniform performance when asking for region labels. This indicates that, in order to select more informative samples, it is useful to split the images into patches (crops) and be able to disregard regions that only contain over-represented classes of the dataset. ",
1803
+ "bbox": [
1804
+ 174,
1805
+ 811,
1806
+ 825,
1807
+ 924
1808
+ ],
1809
+ "page_idx": 15
1810
+ },
1811
+ {
1812
+ "type": "text",
1813
+ "text": "E.3 INFLUENCE OF STEP REGIONS ",
1814
+ "text_level": 1,
1815
+ "bbox": [
1816
+ 176,
1817
+ 103,
1818
+ 423,
1819
+ 117
1820
+ ],
1821
+ "page_idx": 16
1822
+ },
1823
+ {
1824
+ "type": "table",
1825
+ "img_path": "images/cd695bc69edc0e4d86e52895a51017a2de68f0f2a6f9a0c8d0de8cc90dcc4a69.jpg",
1826
+ "table_caption": [
1827
+ "Empirically, our selector network is quite robust to the number of regions per step, as seen in Table E.3. Therefore, we select 24 regions for CamVid, the one that yielded best results. This is more efficient to train than taking one region per step. "
1828
+ ],
1829
+ "table_footnote": [],
1830
+ "table_body": "<table><tr><td></td><td>U</td><td>H</td><td>B</td><td>Ours</td></tr><tr><td>Full im.</td><td>69.64 ± 0.33</td><td>69.46 ± 0.15</td><td>69.66 ± 0.21</td><td>69.44 ± 0.22</td></tr><tr><td>24R</td><td>70.35 ± 0.71</td><td>70.40 ± 0.65</td><td>70.63 ± 0.77</td><td>71.85 ± 0.68</td></tr></table>",
1831
+ "bbox": [
1832
+ 272,
1833
+ 185,
1834
+ 723,
1835
+ 239
1836
+ ],
1837
+ "page_idx": 16
1838
+ },
1839
+ {
1840
+ "type": "table",
1841
+ "img_path": "images/dea64fe0b04ddff679237bc9e2c1967b82f363d3eba77a7d648013ebce7e3c48.jpg",
1842
+ "table_caption": [
1843
+ "Table E.2: Comparison between labeling a full image and 24 non-overlapping square regions (pixel-wise, equivalent to a full image), for different methods. Performance is measured in terms of validation mean IoU performance $[ \\% ]$ in CamVid dataset, for a budget of $0 . 5 \\mathrm { k }$ . In the first row, results for “full im.”, one entire image is labeled at each step (region size equal to the size of the image). In the second row, $\\mathbf { \\ddot { \\Gamma } } 2 4 \\mathbf { R } ^ { \\mathbf { \\vec { \\nu } } }$ results for labeling 24 regions at each step. Pool size selected as the one that performed better, out of 10, 20, 50 and 100. Results are reported with the mean and standard deviation of 5 runs. "
1844
+ ],
1845
+ "table_footnote": [],
1846
+ "table_body": "<table><tr><td>Regions per step</td><td>Val IoU [%]</td></tr><tr><td>1</td><td>71.10 ± 0.75</td></tr><tr><td>12</td><td>70.93 ± 0.70</td></tr><tr><td>24</td><td>71.85 ± 0.68</td></tr><tr><td>36</td><td>71.24 ± 0.49</td></tr><tr><td>48</td><td>71.25 ± 1.17</td></tr><tr><td>72</td><td>71.20 ± 0.53</td></tr></table>",
1847
+ "bbox": [
1848
+ 423,
1849
+ 347,
1850
+ 576,
1851
+ 464
1852
+ ],
1853
+ "page_idx": 16
1854
+ },
1855
+ {
1856
+ "type": "text",
1857
+ "text": "Table E.3: Results of varying the number of regions to be labeled at each step by our method. Performance is measured in terms of validation mean IoU performance $[ \\% ]$ in CamVid dataset, for a budget of $0 . 5 \\mathrm { k }$ Results are reported with the mean and standard deviation of 5 runs. ",
1858
+ "bbox": [
1859
+ 174,
1860
+ 474,
1861
+ 826,
1862
+ 513
1863
+ ],
1864
+ "page_idx": 16
1865
+ }
1866
+ ]