ZHANGYUXUAN-zR commited on
Commit
d26fccd
·
verified ·
1 Parent(s): 62b8e8b

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/HkzZBi0cFQ/HkzZBi0cFQ.md +164 -0
  2. parse/train/HkzZBi0cFQ/HkzZBi0cFQ_content_list.json +873 -0
  3. parse/train/HkzZBi0cFQ/HkzZBi0cFQ_middle.json +0 -0
  4. parse/train/HkzZBi0cFQ/HkzZBi0cFQ_model.json +0 -0
  5. parse/train/dUk5Foj5CLf/dUk5Foj5CLf.md +248 -0
  6. parse/train/dUk5Foj5CLf/dUk5Foj5CLf_content_list.json +1045 -0
  7. parse/train/dUk5Foj5CLf/dUk5Foj5CLf_middle.json +0 -0
  8. parse/train/dUk5Foj5CLf/dUk5Foj5CLf_model.json +0 -0
  9. parse/train/r6cNUjS8cm0/r6cNUjS8cm0.md +487 -0
  10. parse/train/r6cNUjS8cm0/r6cNUjS8cm0_content_list.json +0 -0
  11. parse/train/r6cNUjS8cm0/r6cNUjS8cm0_middle.json +0 -0
  12. parse/train/r6cNUjS8cm0/r6cNUjS8cm0_model.json +0 -0
  13. parse/train/rJeZS3RcYm/rJeZS3RcYm.md +239 -0
  14. parse/train/rJeZS3RcYm/rJeZS3RcYm_content_list.json +1322 -0
  15. parse/train/rJeZS3RcYm/rJeZS3RcYm_middle.json +0 -0
  16. parse/train/rJeZS3RcYm/rJeZS3RcYm_model.json +0 -0
  17. parse/train/ryxepo0cFX/ryxepo0cFX.md +394 -0
  18. parse/train/ryxepo0cFX/ryxepo0cFX_content_list.json +1835 -0
  19. parse/train/ryxepo0cFX/ryxepo0cFX_middle.json +0 -0
  20. parse/train/ryxepo0cFX/ryxepo0cFX_model.json +0 -0
  21. vlm/train/5qsptDcsdEj/0.png +3 -0
  22. vlm/train/5qsptDcsdEj/1.png +3 -0
  23. vlm/train/5qsptDcsdEj/10.png +3 -0
  24. vlm/train/5qsptDcsdEj/11.png +3 -0
  25. vlm/train/5qsptDcsdEj/12.png +3 -0
  26. vlm/train/5qsptDcsdEj/13.png +3 -0
  27. vlm/train/5qsptDcsdEj/14.png +3 -0
  28. vlm/train/5qsptDcsdEj/2.png +3 -0
  29. vlm/train/5qsptDcsdEj/3.png +3 -0
  30. vlm/train/5qsptDcsdEj/4.png +3 -0
  31. vlm/train/5qsptDcsdEj/5.png +3 -0
  32. vlm/train/5qsptDcsdEj/6.png +3 -0
  33. vlm/train/5qsptDcsdEj/7.png +3 -0
  34. vlm/train/5qsptDcsdEj/8.png +3 -0
  35. vlm/train/5qsptDcsdEj/9.png +3 -0
  36. vlm/train/7Yhok3vJpU/0.png +3 -0
  37. vlm/train/7Yhok3vJpU/1.png +3 -0
  38. vlm/train/7Yhok3vJpU/10.png +3 -0
  39. vlm/train/7Yhok3vJpU/11.png +3 -0
  40. vlm/train/7Yhok3vJpU/12.png +3 -0
  41. vlm/train/7Yhok3vJpU/13.png +3 -0
  42. vlm/train/7Yhok3vJpU/14.png +3 -0
  43. vlm/train/7Yhok3vJpU/15.png +3 -0
  44. vlm/train/7Yhok3vJpU/2.png +3 -0
  45. vlm/train/7Yhok3vJpU/3.png +3 -0
  46. vlm/train/7Yhok3vJpU/4.png +3 -0
  47. vlm/train/7Yhok3vJpU/5.png +3 -0
  48. vlm/train/7Yhok3vJpU/6.png +3 -0
  49. vlm/train/7Yhok3vJpU/7.png +3 -0
  50. vlm/train/7Yhok3vJpU/8.png +3 -0
parse/train/HkzZBi0cFQ/HkzZBi0cFQ.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # QUANTIZATION FOR RAPID DEPLOYMENT OF DEEP NEURAL NETWORKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ This paper aims at rapid deployment of the state-of-the-art deep neural networks (DNNs) to energy efficient accelerators without time-consuming fine tuning or the availability of the full datasets. Converting DNNs in full precision to limited precision is essential in taking advantage of the accelerators with reduced memory footprint and computation power. However, such a task is not trivial since it often requires the full training and validation datasets for profiling the network statistics and fine tuning the networks to recover the accuracy lost after quantization. To address these issues, we propose a simple method recognizing channel-level distribution to reduce the quantization-induced accuracy loss and minimize the required image samples for profiling. We evaluated our method on eleven networks trained on the ImageNet classification benchmark and a network trained on the Pascal VOC object detection benchmark. The results prove that the networks can be quantized into 8-bit integer precision without fine tuning.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deploying state-of-the-art deep neural networks (DNNs) to embedded systems is a challenging task due to the inherent nature of huge number of computations and large memory requirements. These impediments are partly caused by the considerable amount of the redundancies found in the network parameters intended for ease of training. Thus, the parameters encompasses abundant opportunities for trimming strategies, namely pruning and quantizing to low precision (Choi et al., 2017; Courbariaux et al., 2015b; Han et al., 2015). However, running DNN inference on accelerators equipped with fixed-point arithmetic units in an energy efficient manner also requires limiting the precision of the feature maps (Lin & Annapureddy, 2016; Migacz, 2017; Mishra et al., 2017).
12
+
13
+ Previous works (Courbariaux et al., 2015b; Gysel, 2016; Lin & Annapureddy, 2016; Migacz, 2017) have exhibited converting pretrained DNNs to 8-bit precision does not induce any accuracy loss. The feature maps and the network parameters were quantized at the granularity of layers to accommodate for large diversities in the dynamic range across the layers. Even though they showed good results for a few popular DNNs like AlexNet, VGG-Net, or GoogLeNet, it is not clear whether it would still work for many other recent DNNs with compact architectures.
14
+
15
+ From our experiments, we were able to observe that this was not the case for some of the recent stateof-the-art DNNs. For example, applying 8-bit quantization to the individual layers of the MobileNet series as done in the previous works showed large accuracy degradations. The excessive accuracy loss could be mitigated by fine tuning the quantized networks (Gysel, 2016; Lin & Annapureddy, 2016). However, in order to reach a competitive level of accuracy for each network with fine tuning, full-size training and validation datasets were needed to be incorporated along with painstakingly long periods of optimization. As many DNN developers only provide the pretrained networks in full precision without the training or the validation datasets from reasons such as privacy or the outright massiveness of the data size, such obstacles hinder rapid and easy deployment of DNNs in full precision to embedded accelerators designed for low precision.
16
+
17
+ Instead of converting a full precision pretrained network to lower precision suitable for embedded accelerators, it is also possible to train one from scratch by constraining the weights and the activations (Hubara et al., 2016; Mishra et al., 2017; Zhou et al., 2016; Zhuang et al., 2017). However, achieving state-of-the-art accuracy on large benchmarks such as ImageNet classification, increase in the network size in terms of connections (Mishra et al., 2017) or integrating complicated training process (Zhuang et al., 2017) is required. Nevertheless, these methods have not been proven for various types of network architectures. Considering the fact that GPUs are the most popular devices for training, it is more practical to convert DNNs into lower precision after utilizing the GPUs’ full precision data path for training.
18
+
19
+ In this paper, we introduce a novel technique in which fine tuning is not necessary for 8-bit linear quantization which quantizes the feature maps and the parameters for individual channels instead of layers to accommodate for the inter-channel variations in the dynamic range. We propose manipulating the kernel weights prior to inference for HW-friendly implementation of channel-wise quantization. Our method significantly reduces the accuracy loss caused by quantizing to lower precision without increasing the inference computation cost. The results show that various state-of-the-art DNNs trained on the ImageNet dataset can readily be converted for 8-bit fixed-point accelerators without fine tuning by using a few training samples for profiling.
20
+
21
+ # 2 LOW PRECISION QUANTIZATION
22
+
23
+ It is common practice to quantize the activations and the network parameters for each layer to account for the differences in the dynamic range across the layers (Gysel, 2016; Lin & Annapureddy, 2016; Migacz, 2017). Previous implementations such as Ristretto(Gysel, 2016), a fixed-point quantization simulator based on Caffe, reserves three placeholders for the fractional lengths (defined as the number of required bits for the fractional part of a fixed-point number) per layer, one each for the input and output feature maps (IFM and OFM respectively) and for the layer parameters (weights and biases). At every layer, IFM, OFM, and the weights are polled separately for max values and the fractional lengths are calculated accordingly. During run-time, the MSBs and LSBs of the parameters and the activations of each layer are clipped to be containable within the given bit-width and the fractional lengths in order to emulate a generic fixed-point H/W implementation. We will use the term layer-wise quantization hereafter to describe this scheme in contrast with channel-wise quantization proposed in this paper.
24
+
25
+ A major down-side of the layer-wise quantization is that the inter-channel variations of the feature maps and the weights are not fully accounted for. Since the fractional length is usually selected to cover the maximum value in a layer, the layer-wise quantization tends to cause excessive information loss in channels with a smaller dynamic range. Therefore, accuracy may be degraded significantly and sometimes never recovered even after exhaustive retraining.
26
+
27
+ # 2.1 CHANNEL-WISE QUANTIZATION
28
+
29
+ In the channel-wise quantization, the fractional lengths for the feature maps and the weights can be customized for each channel to minimize the impact of low-precision rounding. Each channel of the IFMs and the OFMs has an independent fractional length based on its expected dynamic range while each channel of the kernels has a fractional length which tightly fits its known values.
30
+
31
+ Figure 1 demonstrates how the IFMs and the kernels from different channels having different fractional lengths in the channel-wise quantization scheme are computed through a convolution layer compared to the layer-wise scheme. In this example, the input and the output of the convolution layer and weights are all bound to 8 bits while the partial sums are allowed to be accumulated in 32 bits as to avoid data loss. The traversal in the layer-wise scheme is straight-forward as there aren’t any discrepancies while adding up the partial sums. On the other hand, the channel-wise method must cope with adding partial sums of varying fractional lengths. A naive solution would be to place a shifter in front of the partial sum adder to adjust all the partial sums to have the same fractional length. However, this scheme is not practical since too many shift operations are required. We resolve this complication by pre-coordinating the fractional lengths of the weights.
32
+
33
+ The fractional length of a partial sum is determined by adding those of the IFM and the kernel being multiplied together. As the partial sums resulting from different input channels will have different fractional lengths, the smallest fractional length across all partial sums is selected as the reference. The red box in Figure 1 depicts this step. Then, the fractional lengths of the kernels in all the other channels are adjusted during the pre-processing stage to produce this reference fractional length when multiplied with their corresponding IFMs. Limitation was set on the amount adjusted so that the minimum value of the modified fractional lengths of the kernels would not be smaller than the layer-wise quantization. The overall procedure to determining the channel-wise fractional length is summarized in Algorithm 1.
34
+
35
+ ![](images/a24a4dbf4d2d8b14edde7d555977a425eb6715861096bfb923a265f86e32fd6c.jpg)
36
+ Figure 1: Comparison between layer-wise and channel-wise quantization in a simple convolution layer with 2 IFM channels and 1 OFM channel. $\mathbf { Q } n . m$ represents a fixed point integer format with $n$ bits for integer part, $m$ bits for fractional part, and 1 bit for the sign. Total bit-width is equal to $( n + m + 1 )$ bits. min fl(A, B) returns a format with the minimum fractional length. For layer-wise quantization in (a), all the channels of both the inputs and the kernels are forced to share the biggest integer part length across all channels in order to retain the most significant bits. Thus, the number of bits for fractional parts are identical for all paths at the partial sum stage. Channel-wise quantization methods in (b) and (c) could spare more bits for fractional part in accumulator and adder due to channel level granularity, thereby reducing the low precision rounding error during summation. However, the naive approach shown in (b) is not practical since it requires large number of extra bit shifters in front of the partial sum adder to adjust the format of its inputs before adding them. On the contrary, the proposed channel-wise quantization method in (c) does not require such HW cost by considering the bit shifts in the kernel weights in advance.
37
+
38
+ The channel-wise quantization can be applied to a fully-connected (FC) layer by considering each unit as a channel. However, for simplicity, we use the layer-wise quantization for the activations of fully-connected (FC) layers. Notwithstanding, the weights of FC layers still needs to be adapted to the preceding layer. Figure 2 shows three such scenarios where we fallback to the layer-wise quantization. In scenario (b) and (d), the activations quantized channel-wise from the previous convolution layer are multiplied with the channel-wise quantized weights of an FC layer which are pre-adjusted to yield the activations having an identical fractional length, hence, the layer-wise quantization for the activations. For scenario (c) where two FCs are stacked consecutively, the layer-wise quantization is utilized throughout the path.
39
+
40
+ # 2.2 FRACTIONAL LENGTH DETERMINATION
41
+
42
+ Determining the fractional length (placing the dot in between the integer and fractional part within the given bit-width) is easier said than done. Previous works (Gysel, 2016; Migacz, 2017) profiled the target dataset to look for the max value which became the max representable value in the dynamic range. Profiling, running a network in forward path and collecting statistics, provides either an estimation of the dynamic range when executed during pre-processing stage on a subset of the training dataset or an exact fit when performed during run-time on the actual data being processed.
43
+
44
+ <table><tr><td>Algorithm1 HW-friendly channel-wise quantization. Profiling dataset is a subset of training data set. fl stands for fractional length (flker: kernel fl, kernel and one input, flgdder: adder fl, flbias: bias fl, shiftj: layer output bit-wise shift amount).</td></tr><tr><td>Require: network architecture, network parameters,profiling dataset Ensure: flker,flbias, flifm, flofm,shift,quantized network parameters</td></tr><tr><td>1. Profile weights and activations Calculate statistics of weights and activations of each channel on profiling dataset 2.Calculate channel-wise fractional lengths</td></tr><tr><td>For each layer,</td></tr><tr><td>calculate fiker from statistics for each channel of kernels calculate flifm,flofm from statistics of activations for each channel</td></tr><tr><td>flpSum &#x27;ji fiadder := min ( (frpsum) for each j</td></tr><tr><td>flbias := flgdder</td></tr><tr><td>fier←flger (fpsum-fbias) shiftj := flbias f1ofm 3. Quantize network parameters with flker, flbias</td></tr></table>
45
+
46
+ ![](images/945490064c65a80f2a49e942569b7efce801cbd01761c17afdda7c421cf77446.jpg)
47
+ Figure 2: Quantization policy varies with network configurations. $a$ and $w$ represent activation and weights, respectively. (cw: channel-wise quantization, $l w$ : layer-wise quantization)
48
+
49
+ ![](images/735e4ddb664408b8796860238b6c6cb067e076dfc9a01d8f059ab801eac17dc3.jpg)
50
+ Figure 3: Superpositioned PDFs of pre-activation values of each channel (GoogLeNet w/ ImageNet dataset). Every distribution is normalized to have unit variance. Y-axis is in log scale. Mean dist. represents the averaged PDF of all channels.
51
+
52
+ The obvious side effect is that selecting just the right size of the dataset to profile is not trivial. A large dataset will increase the chance of electing an outlier as the max value which will overestimate the dynamic range. This will consequently penalize the fractional part of the fixed-point representation. On the other extreme where insufficient size of the profiling dataset is used, the values overflowing the determined fixed-point notation during inference will cause severe performance degradation.
53
+
54
+ Lin proposed to use the $n$ -th moments of the distribution instead of the max value to identify the optimal fixed-point bit-width and the fractional length (Lin & Annapureddy, 2016). The dynamic range of the activation is determined so that the signal-to-quantization-noise-ratio (SQNR) caused by quantization would be minimized. In this case, two factors contribute to the quantization noise. The first is the quantization error found within the dynamic range and the latter is the overload error where the values beyond the range are clipped to either the upper or the lower bound. When the number of the quantization levels is fixed, there exists an optimum interval between the levels which makes these two errors balanced. This method is much less sensitive to the size of the profiling dataset since the $n$ -th moments of a distribution are more stable measures than the max value. A positive side effect is that optimum interval can be found even with a small dataset as shown in Section 3.1.
55
+
56
+ Figure 3 illustrates the superpositioned probability density functions (PDFs) of the pre-activation values of the individual OFM channels measured on GoogLeNet(Szegedy et al., 2014) trained with the ImageNet dataset. All PDFs were normalized and shifted to have an unit variance and a mean of zero prior to compositing the functions. As can be seen from the graph, there is a large variation in the distribution of the pre-activation values. In Lin & Annapureddy (2016), normal distribution was used to approximate them. However, the mean distribution over all the channels, shown in Figure 3, suggests Laplace distribution rather than normal distribution. We also found that the fractional length obtained by either normal or Laplace distribution tends to underestimate the dynamic range due to the heavy tails of the actual distribution in many channels. In those cases, truncated super Cauchy distribution, defined as follows, provides smaller quantization-induced noise by appropriately considering the tails.
57
+
58
+ $$
59
+ f ( x ) = { \left\{ \begin{array} { l l } { { \frac { \sqrt { 2 } } { \pi { \gamma } \left[ 1 + \left( { \frac { x - x _ { 0 } } { \gamma } } \right) ^ { 4 } \right] } } , } & { { \mathrm { i f } } - 1 5 < x - x _ { 0 } < 1 5 } \\ { 0 , \quad { \mathrm { o t h e r w i s e } } } \end{array} \right. }
60
+ $$
61
+
62
+ Here, $x _ { 0 }$ is the location parameter and $\gamma$ is the scale parameter.
63
+
64
+ # 2.3 EXPLOITING CHANNEL-WISE PDF
65
+
66
+ Large variations in distributions across the OFM channels naturally led us to search for the optimal PDF for each channel in determining the fractional length. For this purpose, we constructed a dataset consisting of the best-fit PDFs producing the highest SQNR for the individual OFM channels in GoogLeNet, Inception-v3(Szegedy et al., 2015), and MobileNet(Howard et al., 2017). A simple classifier was trained to select the best-fit PDF during quantization by taking a vector of n-th moments of activation values in each channel. The classifier was trained to choose from truncated super Cauchy or Laplace distribution. We obtained $83 \%$ classification accuracy by using the k-nearest neighbors classifier with $k = 1 2$ (Samworth, 2013).
67
+
68
+ # 3 BENCHMARK RESULTS
69
+
70
+ # 3.1 IMAGENET CLASSIFICATION TASK
71
+
72
+ The proposed quantization method was evaluated on various state-of-the-art deep networks trained on the ImageNet dataset containing 1.2M training and 50k validation examples. Pretrained networks were quantized into 8-bit fixed point format by using the profiling dataset sampled from the training set and evaluated on the whole validation dataset (50k examples). Uniform linear quantization was used for all the cases. Batch normalization(Ioffe & Szegedy, 2015) layers were fused into convolution layers before the quantization process. Unsigned integer format was employed for the activation values with the ReLU nonlinearity.
73
+
74
+ A comparison against the layer-wise quantization is summarized in Table 1. Conventional method with the layer-wise quantization based on the max value provided good quantization results for GoogLeNet, VGG16(Simonyan & Zisserman, 2014), and Inception-v3 which were the most popular networks in the previous quantization and pruning papers. With more recent networks such as MobileNet, MobileNet2(Sandler et al., 2018), ResNet(He et al., 2015), Inception-v4(Szegedy et al., 2016), and Xception(Chollet, 2016), severe accuracy loss was observed. We figured out that the outliers were the major source of accuracy degradation after layer-wise quantization. For example, using the max value of a parameter could significantly overestimate its dynamic range when there are outliers with extraordinarily large values which cannot be seen in the validation set or when deployed. Carefully removing those outliers will significantly improve the quality of quantization even if layer-wise max-based method is used. Thus, there are previous papers showing better results than our baseline layer-wise quantization. However, we did not consider such improvement in the baseline because it requires extra effort and the process itself might taint the dataset since there’s no explicitly clear boundary of the outliers.
75
+
76
+ We evaluated the channel-wise quantization in four modes depending on the method to determine the fractional lengths: MAX, Laplace, S.Cauchy, and PDF-aware. In MAX mode, the max values of the activation tensors were used to decide the factional lengths of the feature maps. As for the Laplace or S.Cauchy modes, the optimal fractional lengths were estimated from the $n$ -th moments of the activations by assuming PDF as either Laplace or truncated super Cauchy distribution.
77
+
78
+ Regardless of the modes, the channel-wise quantization exhibited significantly improved accuracy losses for all the mentioned networks. In the MAX mode, we still observed a large accuracy degradation in the Inception-v4 network. We discovered that there were extremely large outliers in the activations of a few layers causing significant overestimation of their dynamic ranges. This problem can be resolved by applying other modes (Laplace, S.Cauchy, or PDF-aware). The Laplace and S.Cauchy modes showed similar performance overall but different behavior depending on the network. The best result came with the PDF-aware mode which selects the best-fit PDF for each channel.
79
+
80
+ Figure 4 illustrates the required size of the profiling dataset for the MAX and the OPT methods when measured on Inception-v3. Fractional lengths were calculated based on randomly selected images from the ImageNet training dataset. The MAX method required a large number of samples $( \romannumeral 1 0 0 )$ to reach a stable accuracy, whereas a few samples were enough to stabilize the accuracy for the OPT method. Since most of the published networks are trained in full precision while accelerators mandate low-precision representation, being able to readily port a network with just a few training samples is a huge advantage for easy deployment of pretrained full-precision DNNs. Accordingly, the proposed quantization method is able to reach a competitive accuracy without the need for profiling a large number of samples or fine tuning.
81
+
82
+ Table 1: Top-1 accuracy loss after 8-bit quantization in various large scale networks trained on the ImageNet dataset. No retraining is performed. Reference (Float32) lists baseline accuracies while all other figures are accuracy losses. Modes for determining the fractional length: MAX (reserve integer length to include at least the max value), Laplace (optimal fraction length based on Laplace distribution), S.Cauchy (optimal fraction length based on truncated super Cauchy distribution), $P D F$ - aware (optimal fractional length based on optimum PDF for each channel). Accuracy losses above $1 . 0 \%$ point are in bold face.
83
+
84
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Reference (Float32)</td><td colspan="2">Layer-wise</td><td colspan="4">Channel-wise</td></tr><tr><td>MAX</td><td>Laplace</td><td>MAX</td><td>Laplace</td><td>S.Cauchy</td><td>PDF-aware</td></tr><tr><td>GoogLeNet [1]</td><td>68.93%</td><td>0.23%</td><td>0.23%</td><td>0.13%</td><td>0.15%</td><td>0.08%</td><td>0.05%</td></tr><tr><td>SqueezeNet [2]</td><td>58.39%</td><td>2.02%</td><td>0.68%</td><td>0.22%</td><td>0.23%</td><td>0.43%</td><td>0.27%</td></tr><tr><td>MobileNet [3]</td><td>69.50%</td><td>5.48%</td><td>4.02%</td><td>1.17%</td><td>0.66%</td><td>0.66%</td><td>0.73%</td></tr><tr><td>MobileNet2 [4]</td><td>71.23%</td><td>71.13%</td><td>71.13%</td><td>1.73%</td><td>1.81%</td><td>3.09%</td><td>1.68 %</td></tr><tr><td>VGG16 [5]</td><td>68.34%</td><td>0.29%</td><td>0.19%</td><td>-0.01%</td><td>-0.04%</td><td>0.01%</td><td>-0.06%</td></tr><tr><td>ResNet101-v2 [6]</td><td>78.04%</td><td>9.52%</td><td>5.17%</td><td>1.01%</td><td>0.74%</td><td>1.58%</td><td>0.83%</td></tr><tr><td>ResNeXt50-32x4d [7]</td><td>76.84%</td><td>1.13%</td><td>0.65%</td><td>0.51%</td><td>0.65%</td><td>0.78%</td><td>0.32%</td></tr><tr><td>Inception-v3 [8]</td><td>77.97%</td><td>0.99%</td><td>0.66%</td><td>0.23%</td><td>0.09%</td><td>0.18%</td><td>0.24%</td></tr><tr><td>Inception-v4 [9]</td><td>79.90%</td><td>74.65%</td><td>0.61%</td><td>26.07%</td><td>-0.06%</td><td>0.07%</td><td>0.13%</td></tr><tr><td>Incep.-ResNet-v2 [10]</td><td>80.19%</td><td>1.45%</td><td>0.71%</td><td>0.18%</td><td>1.11%</td><td>0.64%</td><td>0.36%</td></tr><tr><td>Xception [11]</td><td>78.72%</td><td>54.72%</td><td>0.57%</td><td>1.11%</td><td>0.60%</td><td>0.48%</td><td>0.33%</td></tr></table>
85
+
86
+ [1] Szegedy et al. (2014), [2] Iandola et al. (2016), [3] Howard et al. (2017), [4] Sandler et al. (2018), [5] Simonyan & Zisserman (2014), [6] He et al. (2015), [7] Xie et al. (2016), [8] Szegedy et al. (2015), [9] Szegedy et al. (2016), [10] Szegedy et al. (2016), [11] Chollet (2016)
87
+
88
+ ![](images/d58db48be461b76b32bf54c3ebba5af4e8eaddf17b292ada409938090dc83777.jpg)
89
+ Figure 4: Effect of profiling dataset size on accuracy with quantization for Inception-v3. MAX method requires large number of samples for profiling to reach a stable accuracy. Laplace method stabilizes quickly with a few samples.
90
+
91
+ # 3.2 OBJECT DETECTION
92
+
93
+ We performed network quantization on YOLO-v2(Redmon & Farhadi, 2016), a state-of-the-art object detection network. The network was trained and tested on the Pascal VOC dataset (Everingham et al., 2015).
94
+
95
+ Table 2 shows the loss in mean AP after quantization using our method in comparison with the layer-wise quantization. The layer-wise quantization caused $2 . 5 \%$ point drop in mean AP after
96
+
97
+ Table 2: Loss in mean AP after 8-bit quantization in YOLO-v2 (Redmon & Farhadi, 2016). No retraining performed. ’Reference (Float32)’ lists baseline accuracy while all other figures are accuracy losses. Loss above $1 . 0 \%$ point is in bold face.
98
+
99
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Reference (Float32)</td><td colspan="2">Layer-wise</td><td colspan="4">Channel-wise</td></tr><tr><td>MAX</td><td>Laplace</td><td>MAX</td><td>Laplace</td><td>S.Cauchy</td><td>PDF-aware</td></tr><tr><td>Y0L0-v2</td><td>72.64%</td><td>2.50%</td><td>2.25%</td><td>0.14%</td><td>0.22%</td><td>0.70%</td><td>0.38%</td></tr></table>
100
+
101
+ quantization. However, our method did not suffer from such a problem by selecting the fractional lengths adapted to the individual channels.
102
+
103
+ # 4 RELATED WORKS
104
+
105
+ Han quantized the network parameters after pruning for compression in Han et al. (2015). Kim proposed on using Hessian-weighted clustering to achieve a better compression ratio in quantization (Choi et al., 2017). However, in those works, only the network parameters were quantized to save storage space leaving the feature maps in full-precision. Both the activations and the network parameters were quantized layer-wise to accommodate the large variations in the dynamic range across the layers in Courbariaux et al. (2015b); Gysel (2016). The max values found in activations were used to decide on the fractional lengths, and intensive fine tuning were required to recover accuracies degraded by quantization in some networks. Lin used SQNR instead of the max value to minimize the bit-width for each layer and optimized DNNs for fixed-point operation (Lin & Annapureddy, 2016). Migacz achieved linear quantization for 8-bit integer operation without fine tuning by minimizing the information loss with Kullback-Leibler (KL) divergence (Migacz, 2017). Unfortunately, collection of the activation histograms were required from a large number of samples. All in all, these methods used the layer-wise quantization scheme.
106
+
107
+ Aggressively lowering the precision to be under 4 bits for both the weights and the activations have been actively explored (Courbariaux et al., 2015a; Rastegariy et al., 2016; Hubara et al., 2016; Li et al., 2016; Zhou et al., 2016; Leng et al., 2017; Lin et al., 2017). Although they revealed impressive results on small benchmarks, there is still a huge gap in accuracy on large benchmarks such as the ImageNet classification using state-of-the-art networks trained in full precision. Recent progress shows that it is possible to reduce the precision of DNNs to 4 bits without sacrificing accuracy by increasing the network size (Mishra et al., 2017) or training the networks in multiple stages with guided training (Zhuang et al., 2017). These work focus on training DNNs for low-precision inference from scratch rather than quantizing pretrained full-precision networks.
108
+
109
+ # 5 CONCLUSION
110
+
111
+ In this paper, we proposed a set of methods for rapid deployment of DNNs trained in full precision to fixed point accelerators with limited precision computation units. The channel-wise quantization recognizes the inter-channel diversities in the dynamic range of the feature maps. HW cost for implementation is minimized by adjusting the fractional lengths of the kernel parameters. We evaluated our method on eleven state-of-the-art DNNs trained on the ImageNet dataset and an object detection network trained on Pascal VOC dataset. In comparison to the previous method (i.e the layer-wise quantization), the channel-wise quantization can reduce the accuracy loss caused by quantization substantially.
112
+
113
+ We also showed that quantization requires just a few image samples if we utilize the $n$ -th moments of the activations instead of the maximum value. In this way, deployment is possible even when just a few training samples are available for the trained network model. We further improved our method by considering the variations in distribution across the channels. A simple classifier was used for selecting the best-fit PDF for each channel from the statistical features. We were able to accomplish negligible accuracy loss (less than $1 \%$ point in eleven networks out of twelve) after quantization without fine tuning.
114
+
115
+ # REFERENCES
116
+
117
+ Yoojin Choi, Mostafa El-Khamy, and Jungwon Lee. Towards the limit of network quantization. arXiv preprint arXiv:1612.01543v2, 2017.
118
+
119
+ Franc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. CoRR, abs/1610.02357, 2016.
120
+
121
+ Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. Advances in Neural Information Processing Systems (NIPS), pp. 3123–3131, 2015a.
122
+
123
+ Matthieu Courbariaux, Jean-Pierre David, and Yoshua Bengio. Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024v4, 2015b.
124
+
125
+ M. Everingham, S. M. A. Eslami, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 111(1):98–136, January 2015.
126
+
127
+ Philipp Gysel. Ristretto: Hardware-oriented approximation of convolutional neural networks. arXiv preprint arXiv:1605.06402, 2016.
128
+
129
+ Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
130
+
131
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015.
132
+
133
+ Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017.
134
+
135
+ Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:609.07061, 2016.
136
+
137
+ Forrest N. Iandola, Matthew W. Moskewicz, Khalid Ashraf, Song Han, William J. Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and ${ < } 0 . 5 \mathrm { m b }$ model size. CoRR, abs/1602.07360, 2016.
138
+
139
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
140
+
141
+ Cong Leng, Hao Li, Shenghuo Zhu, and Rong Jin. Extremely low bit neural network: Squeeze the last bit out with admm. arXiv preprint arXiv:1707.09870, 2017.
142
+
143
+ Fengfu Li, Bo Zhang, and Bin Liu. Ternary weight networks. arXiv preprint arXiv:1605.04711, 2016.
144
+
145
+ Sachin Lin, Darryl smf Talathi and Sreekanth Annapureddy. Fixed point quantization of deep convolutional networks. International Conference on Machine Learning (ICML), pp. 344–352, 2016.
146
+
147
+ Xiaofan Lin, Cong Zhao, and Wei Pan. Towards accurate binary convolutional neural network. Advances in Neural Information Processing Systems (NIPS), pp. 344–352, 2017.
148
+
149
+ Szymon Migacz. 8-bit inference with tensorrt. In NVIDIA GPU Technology Conference (GTC), 2017.
150
+
151
+ Asit Mishra, Eriko Nurvitadhi, J Jeffrey Cook, and Debbie Marr. Wrpn: Wide reduced-precision networks. arXiv preprint arXiv:170901134, 2017.
152
+
153
+ Mohammad Rastegariy, Vicente Ordonezy, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. arXiv preprint arXiv:1605.06402, 2016.
154
+
155
+ Joseph Redmon and Ali Farhadi. Yolo9000: Better, faster, stronger. arXiv preprint arXiv:1612.08242, 2016.
156
+ Richard J. Samworth. Optimal weighted nearest neighbour classifiers. arXiv preprint arXiv:11015783v3, 2013.
157
+ Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. CoRR, abs/1801.04381, 2018.
158
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014.
159
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014.
160
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. CoRR, abs/1512.00567, 2015.
161
+ Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. CoRR, abs/1602.07261, 2016.
162
+ Saining Xie, Ross B. Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual ´ transformations for deep neural networks. CoRR, abs/1611.05431, 2016.
163
+ Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1605.06402, 2016.
164
+ Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Towards effective lowbitwidth convolutional neural networks. arXiv preprint arXiv:1711.00205, 2017.
parse/train/HkzZBi0cFQ/HkzZBi0cFQ_content_list.json ADDED
@@ -0,0 +1,873 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "QUANTIZATION FOR RAPID DEPLOYMENT OF DEEP NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
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
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "This paper aims at rapid deployment of the state-of-the-art deep neural networks (DNNs) to energy efficient accelerators without time-consuming fine tuning or the availability of the full datasets. Converting DNNs in full precision to limited precision is essential in taking advantage of the accelerators with reduced memory footprint and computation power. However, such a task is not trivial since it often requires the full training and validation datasets for profiling the network statistics and fine tuning the networks to recover the accuracy lost after quantization. To address these issues, we propose a simple method recognizing channel-level distribution to reduce the quantization-induced accuracy loss and minimize the required image samples for profiling. We evaluated our method on eleven networks trained on the ImageNet classification benchmark and a network trained on the Pascal VOC object detection benchmark. The results prove that the networks can be quantized into 8-bit integer precision without fine tuning. ",
40
+ "bbox": [
41
+ 233,
42
+ 265,
43
+ 766,
44
+ 444
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 468,
55
+ 336,
56
+ 484
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deploying state-of-the-art deep neural networks (DNNs) to embedded systems is a challenging task due to the inherent nature of huge number of computations and large memory requirements. These impediments are partly caused by the considerable amount of the redundancies found in the network parameters intended for ease of training. Thus, the parameters encompasses abundant opportunities for trimming strategies, namely pruning and quantizing to low precision (Choi et al., 2017; Courbariaux et al., 2015b; Han et al., 2015). However, running DNN inference on accelerators equipped with fixed-point arithmetic units in an energy efficient manner also requires limiting the precision of the feature maps (Lin & Annapureddy, 2016; Migacz, 2017; Mishra et al., 2017). ",
63
+ "bbox": [
64
+ 174,
65
+ 498,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Previous works (Courbariaux et al., 2015b; Gysel, 2016; Lin & Annapureddy, 2016; Migacz, 2017) have exhibited converting pretrained DNNs to 8-bit precision does not induce any accuracy loss. The feature maps and the network parameters were quantized at the granularity of layers to accommodate for large diversities in the dynamic range across the layers. Even though they showed good results for a few popular DNNs like AlexNet, VGG-Net, or GoogLeNet, it is not clear whether it would still work for many other recent DNNs with compact architectures. ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 700
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "From our experiments, we were able to observe that this was not the case for some of the recent stateof-the-art DNNs. For example, applying 8-bit quantization to the individual layers of the MobileNet series as done in the previous works showed large accuracy degradations. The excessive accuracy loss could be mitigated by fine tuning the quantized networks (Gysel, 2016; Lin & Annapureddy, 2016). However, in order to reach a competitive level of accuracy for each network with fine tuning, full-size training and validation datasets were needed to be incorporated along with painstakingly long periods of optimization. As many DNN developers only provide the pretrained networks in full precision without the training or the validation datasets from reasons such as privacy or the outright massiveness of the data size, such obstacles hinder rapid and easy deployment of DNNs in full precision to embedded accelerators designed for low precision. ",
85
+ "bbox": [
86
+ 174,
87
+ 708,
88
+ 825,
89
+ 847
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Instead of converting a full precision pretrained network to lower precision suitable for embedded accelerators, it is also possible to train one from scratch by constraining the weights and the activations (Hubara et al., 2016; Mishra et al., 2017; Zhou et al., 2016; Zhuang et al., 2017). However, achieving state-of-the-art accuracy on large benchmarks such as ImageNet classification, increase in the network size in terms of connections (Mishra et al., 2017) or integrating complicated training process (Zhuang et al., 2017) is required. Nevertheless, these methods have not been proven for various types of network architectures. Considering the fact that GPUs are the most popular devices for training, it is more practical to convert DNNs into lower precision after utilizing the GPUs’ full precision data path for training. ",
96
+ "bbox": [
97
+ 174,
98
+ 854,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 825,
111
+ 160
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this paper, we introduce a novel technique in which fine tuning is not necessary for 8-bit linear quantization which quantizes the feature maps and the parameters for individual channels instead of layers to accommodate for the inter-channel variations in the dynamic range. We propose manipulating the kernel weights prior to inference for HW-friendly implementation of channel-wise quantization. Our method significantly reduces the accuracy loss caused by quantizing to lower precision without increasing the inference computation cost. The results show that various state-of-the-art DNNs trained on the ImageNet dataset can readily be converted for 8-bit fixed-point accelerators without fine tuning by using a few training samples for profiling. ",
118
+ "bbox": [
119
+ 174,
120
+ 166,
121
+ 825,
122
+ 279
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 LOW PRECISION QUANTIZATION ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 299,
133
+ 472,
134
+ 314
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "It is common practice to quantize the activations and the network parameters for each layer to account for the differences in the dynamic range across the layers (Gysel, 2016; Lin & Annapureddy, 2016; Migacz, 2017). Previous implementations such as Ristretto(Gysel, 2016), a fixed-point quantization simulator based on Caffe, reserves three placeholders for the fractional lengths (defined as the number of required bits for the fractional part of a fixed-point number) per layer, one each for the input and output feature maps (IFM and OFM respectively) and for the layer parameters (weights and biases). At every layer, IFM, OFM, and the weights are polled separately for max values and the fractional lengths are calculated accordingly. During run-time, the MSBs and LSBs of the parameters and the activations of each layer are clipped to be containable within the given bit-width and the fractional lengths in order to emulate a generic fixed-point H/W implementation. We will use the term layer-wise quantization hereafter to describe this scheme in contrast with channel-wise quantization proposed in this paper. ",
141
+ "bbox": [
142
+ 174,
143
+ 330,
144
+ 825,
145
+ 497
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "A major down-side of the layer-wise quantization is that the inter-channel variations of the feature maps and the weights are not fully accounted for. Since the fractional length is usually selected to cover the maximum value in a layer, the layer-wise quantization tends to cause excessive information loss in channels with a smaller dynamic range. Therefore, accuracy may be degraded significantly and sometimes never recovered even after exhaustive retraining. ",
152
+ "bbox": [
153
+ 174,
154
+ 503,
155
+ 825,
156
+ 574
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 CHANNEL-WISE QUANTIZATION ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 176,
166
+ 592,
167
+ 436,
168
+ 606
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "In the channel-wise quantization, the fractional lengths for the feature maps and the weights can be customized for each channel to minimize the impact of low-precision rounding. Each channel of the IFMs and the OFMs has an independent fractional length based on its expected dynamic range while each channel of the kernels has a fractional length which tightly fits its known values. ",
175
+ "bbox": [
176
+ 174,
177
+ 617,
178
+ 823,
179
+ 672
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Figure 1 demonstrates how the IFMs and the kernels from different channels having different fractional lengths in the channel-wise quantization scheme are computed through a convolution layer compared to the layer-wise scheme. In this example, the input and the output of the convolution layer and weights are all bound to 8 bits while the partial sums are allowed to be accumulated in 32 bits as to avoid data loss. The traversal in the layer-wise scheme is straight-forward as there aren’t any discrepancies while adding up the partial sums. On the other hand, the channel-wise method must cope with adding partial sums of varying fractional lengths. A naive solution would be to place a shifter in front of the partial sum adder to adjust all the partial sums to have the same fractional length. However, this scheme is not practical since too many shift operations are required. We resolve this complication by pre-coordinating the fractional lengths of the weights. ",
186
+ "bbox": [
187
+ 174,
188
+ 680,
189
+ 825,
190
+ 819
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "The fractional length of a partial sum is determined by adding those of the IFM and the kernel being multiplied together. As the partial sums resulting from different input channels will have different fractional lengths, the smallest fractional length across all partial sums is selected as the reference. The red box in Figure 1 depicts this step. Then, the fractional lengths of the kernels in all the other channels are adjusted during the pre-processing stage to produce this reference fractional length when multiplied with their corresponding IFMs. Limitation was set on the amount adjusted so that the minimum value of the modified fractional lengths of the kernels would not be smaller than the layer-wise quantization. The overall procedure to determining the channel-wise fractional length is summarized in Algorithm 1. ",
197
+ "bbox": [
198
+ 174,
199
+ 825,
200
+ 825,
201
+ 924
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "image",
207
+ "img_path": "images/a24a4dbf4d2d8b14edde7d555977a425eb6715861096bfb923a265f86e32fd6c.jpg",
208
+ "image_caption": [
209
+ "Figure 1: Comparison between layer-wise and channel-wise quantization in a simple convolution layer with 2 IFM channels and 1 OFM channel. $\\mathbf { Q } n . m$ represents a fixed point integer format with $n$ bits for integer part, $m$ bits for fractional part, and 1 bit for the sign. Total bit-width is equal to $( n + m + 1 )$ bits. min fl(A, B) returns a format with the minimum fractional length. For layer-wise quantization in (a), all the channels of both the inputs and the kernels are forced to share the biggest integer part length across all channels in order to retain the most significant bits. Thus, the number of bits for fractional parts are identical for all paths at the partial sum stage. Channel-wise quantization methods in (b) and (c) could spare more bits for fractional part in accumulator and adder due to channel level granularity, thereby reducing the low precision rounding error during summation. However, the naive approach shown in (b) is not practical since it requires large number of extra bit shifters in front of the partial sum adder to adjust the format of its inputs before adding them. On the contrary, the proposed channel-wise quantization method in (c) does not require such HW cost by considering the bit shifts in the kernel weights in advance. "
210
+ ],
211
+ "image_footnote": [],
212
+ "bbox": [
213
+ 222,
214
+ 104,
215
+ 777,
216
+ 405
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "",
223
+ "bbox": [
224
+ 174,
225
+ 631,
226
+ 823,
227
+ 659
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "The channel-wise quantization can be applied to a fully-connected (FC) layer by considering each unit as a channel. However, for simplicity, we use the layer-wise quantization for the activations of fully-connected (FC) layers. Notwithstanding, the weights of FC layers still needs to be adapted to the preceding layer. Figure 2 shows three such scenarios where we fallback to the layer-wise quantization. In scenario (b) and (d), the activations quantized channel-wise from the previous convolution layer are multiplied with the channel-wise quantized weights of an FC layer which are pre-adjusted to yield the activations having an identical fractional length, hence, the layer-wise quantization for the activations. For scenario (c) where two FCs are stacked consecutively, the layer-wise quantization is utilized throughout the path. ",
234
+ "bbox": [
235
+ 174,
236
+ 666,
237
+ 825,
238
+ 791
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "2.2 FRACTIONAL LENGTH DETERMINATION ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 176,
248
+ 813,
249
+ 486,
250
+ 827
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "Determining the fractional length (placing the dot in between the integer and fractional part within the given bit-width) is easier said than done. Previous works (Gysel, 2016; Migacz, 2017) profiled the target dataset to look for the max value which became the max representable value in the dynamic range. Profiling, running a network in forward path and collecting statistics, provides either an estimation of the dynamic range when executed during pre-processing stage on a subset of the training dataset or an exact fit when performed during run-time on the actual data being processed. ",
257
+ "bbox": [
258
+ 174,
259
+ 840,
260
+ 825,
261
+ 924
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "table",
267
+ "img_path": "images/71687d5431735510340d94c090022d96d69329a88f0368d6b551cf9799c81c98.jpg",
268
+ "table_caption": [],
269
+ "table_footnote": [],
270
+ "table_body": "<table><tr><td>Algorithm1 HW-friendly channel-wise quantization. Profiling dataset is a subset of training data set. fl stands for fractional length (flker: kernel fl, kernel and one input, flgdder: adder fl, flbias: bias fl, shiftj: layer output bit-wise shift amount).</td></tr><tr><td>Require: network architecture, network parameters,profiling dataset Ensure: flker,flbias, flifm, flofm,shift,quantized network parameters</td></tr><tr><td>1. Profile weights and activations Calculate statistics of weights and activations of each channel on profiling dataset 2.Calculate channel-wise fractional lengths</td></tr><tr><td>For each layer,</td></tr><tr><td>calculate fiker from statistics for each channel of kernels calculate flifm,flofm from statistics of activations for each channel</td></tr><tr><td>flpSum &#x27;ji fiadder := min ( (frpsum) for each j</td></tr><tr><td>flbias := flgdder</td></tr><tr><td>fier←flger (fpsum-fbias) shiftj := flbias f1ofm 3. Quantize network parameters with flker, flbias</td></tr></table>",
271
+ "bbox": [
272
+ 174,
273
+ 179,
274
+ 839,
275
+ 478
276
+ ],
277
+ "page_idx": 3
278
+ },
279
+ {
280
+ "type": "image",
281
+ "img_path": "images/945490064c65a80f2a49e942569b7efce801cbd01761c17afdda7c421cf77446.jpg",
282
+ "image_caption": [
283
+ "Figure 2: Quantization policy varies with network configurations. $a$ and $w$ represent activation and weights, respectively. (cw: channel-wise quantization, $l w$ : layer-wise quantization) "
284
+ ],
285
+ "image_footnote": [],
286
+ "bbox": [
287
+ 199,
288
+ 646,
289
+ 799,
290
+ 799
291
+ ],
292
+ "page_idx": 3
293
+ },
294
+ {
295
+ "type": "image",
296
+ "img_path": "images/735e4ddb664408b8796860238b6c6cb067e076dfc9a01d8f059ab801eac17dc3.jpg",
297
+ "image_caption": [
298
+ "Figure 3: Superpositioned PDFs of pre-activation values of each channel (GoogLeNet w/ ImageNet dataset). Every distribution is normalized to have unit variance. Y-axis is in log scale. Mean dist. represents the averaged PDF of all channels. "
299
+ ],
300
+ "image_footnote": [],
301
+ "bbox": [
302
+ 295,
303
+ 102,
304
+ 704,
305
+ 332
306
+ ],
307
+ "page_idx": 4
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "The obvious side effect is that selecting just the right size of the dataset to profile is not trivial. A large dataset will increase the chance of electing an outlier as the max value which will overestimate the dynamic range. This will consequently penalize the fractional part of the fixed-point representation. On the other extreme where insufficient size of the profiling dataset is used, the values overflowing the determined fixed-point notation during inference will cause severe performance degradation. ",
312
+ "bbox": [
313
+ 173,
314
+ 426,
315
+ 825,
316
+ 497
317
+ ],
318
+ "page_idx": 4
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "Lin proposed to use the $n$ -th moments of the distribution instead of the max value to identify the optimal fixed-point bit-width and the fractional length (Lin & Annapureddy, 2016). The dynamic range of the activation is determined so that the signal-to-quantization-noise-ratio (SQNR) caused by quantization would be minimized. In this case, two factors contribute to the quantization noise. The first is the quantization error found within the dynamic range and the latter is the overload error where the values beyond the range are clipped to either the upper or the lower bound. When the number of the quantization levels is fixed, there exists an optimum interval between the levels which makes these two errors balanced. This method is much less sensitive to the size of the profiling dataset since the $n$ -th moments of a distribution are more stable measures than the max value. A positive side effect is that optimum interval can be found even with a small dataset as shown in Section 3.1. ",
323
+ "bbox": [
324
+ 173,
325
+ 503,
326
+ 825,
327
+ 643
328
+ ],
329
+ "page_idx": 4
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Figure 3 illustrates the superpositioned probability density functions (PDFs) of the pre-activation values of the individual OFM channels measured on GoogLeNet(Szegedy et al., 2014) trained with the ImageNet dataset. All PDFs were normalized and shifted to have an unit variance and a mean of zero prior to compositing the functions. As can be seen from the graph, there is a large variation in the distribution of the pre-activation values. In Lin & Annapureddy (2016), normal distribution was used to approximate them. However, the mean distribution over all the channels, shown in Figure 3, suggests Laplace distribution rather than normal distribution. We also found that the fractional length obtained by either normal or Laplace distribution tends to underestimate the dynamic range due to the heavy tails of the actual distribution in many channels. In those cases, truncated super Cauchy distribution, defined as follows, provides smaller quantization-induced noise by appropriately considering the tails. ",
334
+ "bbox": [
335
+ 173,
336
+ 648,
337
+ 825,
338
+ 803
339
+ ],
340
+ "page_idx": 4
341
+ },
342
+ {
343
+ "type": "equation",
344
+ "img_path": "images/63d6301afb68999d79e7c4f536c1038a6f145254b80859fe11f8039b6a034831.jpg",
345
+ "text": "$$\nf ( x ) = { \\left\\{ \\begin{array} { l l } { { \\frac { \\sqrt { 2 } } { \\pi { \\gamma } \\left[ 1 + \\left( { \\frac { x - x _ { 0 } } { \\gamma } } \\right) ^ { 4 } \\right] } } , } & { { \\mathrm { i f } } - 1 5 < x - x _ { 0 } < 1 5 } \\\\ { 0 , \\quad { \\mathrm { o t h e r w i s e } } } \\end{array} \\right. }\n$$",
346
+ "text_format": "latex",
347
+ "bbox": [
348
+ 315,
349
+ 834,
350
+ 665,
351
+ 885
352
+ ],
353
+ "page_idx": 4
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "Here, $x _ { 0 }$ is the location parameter and $\\gamma$ is the scale parameter. ",
358
+ "bbox": [
359
+ 173,
360
+ 909,
361
+ 586,
362
+ 924
363
+ ],
364
+ "page_idx": 4
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "2.3 EXPLOITING CHANNEL-WISE PDF ",
369
+ "text_level": 1,
370
+ "bbox": [
371
+ 176,
372
+ 103,
373
+ 450,
374
+ 117
375
+ ],
376
+ "page_idx": 5
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "Large variations in distributions across the OFM channels naturally led us to search for the optimal PDF for each channel in determining the fractional length. For this purpose, we constructed a dataset consisting of the best-fit PDFs producing the highest SQNR for the individual OFM channels in GoogLeNet, Inception-v3(Szegedy et al., 2015), and MobileNet(Howard et al., 2017). A simple classifier was trained to select the best-fit PDF during quantization by taking a vector of n-th moments of activation values in each channel. The classifier was trained to choose from truncated super Cauchy or Laplace distribution. We obtained $83 \\%$ classification accuracy by using the k-nearest neighbors classifier with $k = 1 2$ (Samworth, 2013). ",
381
+ "bbox": [
382
+ 173,
383
+ 131,
384
+ 825,
385
+ 242
386
+ ],
387
+ "page_idx": 5
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "3 BENCHMARK RESULTS ",
392
+ "text_level": 1,
393
+ "bbox": [
394
+ 176,
395
+ 265,
396
+ 395,
397
+ 281
398
+ ],
399
+ "page_idx": 5
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "3.1 IMAGENET CLASSIFICATION TASK ",
404
+ "text_level": 1,
405
+ "bbox": [
406
+ 176,
407
+ 299,
408
+ 450,
409
+ 313
410
+ ],
411
+ "page_idx": 5
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "The proposed quantization method was evaluated on various state-of-the-art deep networks trained on the ImageNet dataset containing 1.2M training and 50k validation examples. Pretrained networks were quantized into 8-bit fixed point format by using the profiling dataset sampled from the training set and evaluated on the whole validation dataset (50k examples). Uniform linear quantization was used for all the cases. Batch normalization(Ioffe & Szegedy, 2015) layers were fused into convolution layers before the quantization process. Unsigned integer format was employed for the activation values with the ReLU nonlinearity. ",
416
+ "bbox": [
417
+ 174,
418
+ 325,
419
+ 825,
420
+ 422
421
+ ],
422
+ "page_idx": 5
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "A comparison against the layer-wise quantization is summarized in Table 1. Conventional method with the layer-wise quantization based on the max value provided good quantization results for GoogLeNet, VGG16(Simonyan & Zisserman, 2014), and Inception-v3 which were the most popular networks in the previous quantization and pruning papers. With more recent networks such as MobileNet, MobileNet2(Sandler et al., 2018), ResNet(He et al., 2015), Inception-v4(Szegedy et al., 2016), and Xception(Chollet, 2016), severe accuracy loss was observed. We figured out that the outliers were the major source of accuracy degradation after layer-wise quantization. For example, using the max value of a parameter could significantly overestimate its dynamic range when there are outliers with extraordinarily large values which cannot be seen in the validation set or when deployed. Carefully removing those outliers will significantly improve the quality of quantization even if layer-wise max-based method is used. Thus, there are previous papers showing better results than our baseline layer-wise quantization. However, we did not consider such improvement in the baseline because it requires extra effort and the process itself might taint the dataset since there’s no explicitly clear boundary of the outliers. ",
427
+ "bbox": [
428
+ 174,
429
+ 430,
430
+ 825,
431
+ 625
432
+ ],
433
+ "page_idx": 5
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "We evaluated the channel-wise quantization in four modes depending on the method to determine the fractional lengths: MAX, Laplace, S.Cauchy, and PDF-aware. In MAX mode, the max values of the activation tensors were used to decide the factional lengths of the feature maps. As for the Laplace or S.Cauchy modes, the optimal fractional lengths were estimated from the $n$ -th moments of the activations by assuming PDF as either Laplace or truncated super Cauchy distribution. ",
438
+ "bbox": [
439
+ 174,
440
+ 631,
441
+ 825,
442
+ 702
443
+ ],
444
+ "page_idx": 5
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Regardless of the modes, the channel-wise quantization exhibited significantly improved accuracy losses for all the mentioned networks. In the MAX mode, we still observed a large accuracy degradation in the Inception-v4 network. We discovered that there were extremely large outliers in the activations of a few layers causing significant overestimation of their dynamic ranges. This problem can be resolved by applying other modes (Laplace, S.Cauchy, or PDF-aware). The Laplace and S.Cauchy modes showed similar performance overall but different behavior depending on the network. The best result came with the PDF-aware mode which selects the best-fit PDF for each channel. ",
449
+ "bbox": [
450
+ 174,
451
+ 708,
452
+ 823,
453
+ 819
454
+ ],
455
+ "page_idx": 5
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Figure 4 illustrates the required size of the profiling dataset for the MAX and the OPT methods when measured on Inception-v3. Fractional lengths were calculated based on randomly selected images from the ImageNet training dataset. The MAX method required a large number of samples $( \\romannumeral 1 0 0 )$ to reach a stable accuracy, whereas a few samples were enough to stabilize the accuracy for the OPT method. Since most of the published networks are trained in full precision while accelerators mandate low-precision representation, being able to readily port a network with just a few training samples is a huge advantage for easy deployment of pretrained full-precision DNNs. Accordingly, the proposed quantization method is able to reach a competitive accuracy without the need for profiling a large number of samples or fine tuning. ",
460
+ "bbox": [
461
+ 174,
462
+ 825,
463
+ 823,
464
+ 924
465
+ ],
466
+ "page_idx": 5
467
+ },
468
+ {
469
+ "type": "table",
470
+ "img_path": "images/1c4c66c9af43150f522a5c595ce0a3dbbffd0285354a003268aa6fc60ce5e959.jpg",
471
+ "table_caption": [
472
+ "Table 1: Top-1 accuracy loss after 8-bit quantization in various large scale networks trained on the ImageNet dataset. No retraining is performed. Reference (Float32) lists baseline accuracies while all other figures are accuracy losses. Modes for determining the fractional length: MAX (reserve integer length to include at least the max value), Laplace (optimal fraction length based on Laplace distribution), S.Cauchy (optimal fraction length based on truncated super Cauchy distribution), $P D F$ - aware (optimal fractional length based on optimum PDF for each channel). Accuracy losses above $1 . 0 \\%$ point are in bold face. "
473
+ ],
474
+ "table_footnote": [
475
+ "[1] Szegedy et al. (2014), [2] Iandola et al. (2016), [3] Howard et al. (2017), [4] Sandler et al. (2018), [5] Simonyan & Zisserman (2014), [6] He et al. (2015), [7] Xie et al. (2016), [8] Szegedy et al. (2015), [9] Szegedy et al. (2016), [10] Szegedy et al. (2016), [11] Chollet (2016) "
476
+ ],
477
+ "table_body": "<table><tr><td rowspan=\"2\">Network</td><td rowspan=\"2\">Reference (Float32)</td><td colspan=\"2\">Layer-wise</td><td colspan=\"4\">Channel-wise</td></tr><tr><td>MAX</td><td>Laplace</td><td>MAX</td><td>Laplace</td><td>S.Cauchy</td><td>PDF-aware</td></tr><tr><td>GoogLeNet [1]</td><td>68.93%</td><td>0.23%</td><td>0.23%</td><td>0.13%</td><td>0.15%</td><td>0.08%</td><td>0.05%</td></tr><tr><td>SqueezeNet [2]</td><td>58.39%</td><td>2.02%</td><td>0.68%</td><td>0.22%</td><td>0.23%</td><td>0.43%</td><td>0.27%</td></tr><tr><td>MobileNet [3]</td><td>69.50%</td><td>5.48%</td><td>4.02%</td><td>1.17%</td><td>0.66%</td><td>0.66%</td><td>0.73%</td></tr><tr><td>MobileNet2 [4]</td><td>71.23%</td><td>71.13%</td><td>71.13%</td><td>1.73%</td><td>1.81%</td><td>3.09%</td><td>1.68 %</td></tr><tr><td>VGG16 [5]</td><td>68.34%</td><td>0.29%</td><td>0.19%</td><td>-0.01%</td><td>-0.04%</td><td>0.01%</td><td>-0.06%</td></tr><tr><td>ResNet101-v2 [6]</td><td>78.04%</td><td>9.52%</td><td>5.17%</td><td>1.01%</td><td>0.74%</td><td>1.58%</td><td>0.83%</td></tr><tr><td>ResNeXt50-32x4d [7]</td><td>76.84%</td><td>1.13%</td><td>0.65%</td><td>0.51%</td><td>0.65%</td><td>0.78%</td><td>0.32%</td></tr><tr><td>Inception-v3 [8]</td><td>77.97%</td><td>0.99%</td><td>0.66%</td><td>0.23%</td><td>0.09%</td><td>0.18%</td><td>0.24%</td></tr><tr><td>Inception-v4 [9]</td><td>79.90%</td><td>74.65%</td><td>0.61%</td><td>26.07%</td><td>-0.06%</td><td>0.07%</td><td>0.13%</td></tr><tr><td>Incep.-ResNet-v2 [10]</td><td>80.19%</td><td>1.45%</td><td>0.71%</td><td>0.18%</td><td>1.11%</td><td>0.64%</td><td>0.36%</td></tr><tr><td>Xception [11]</td><td>78.72%</td><td>54.72%</td><td>0.57%</td><td>1.11%</td><td>0.60%</td><td>0.48%</td><td>0.33%</td></tr></table>",
478
+ "bbox": [
479
+ 173,
480
+ 209,
481
+ 883,
482
+ 409
483
+ ],
484
+ "page_idx": 6
485
+ },
486
+ {
487
+ "type": "image",
488
+ "img_path": "images/d58db48be461b76b32bf54c3ebba5af4e8eaddf17b292ada409938090dc83777.jpg",
489
+ "image_caption": [
490
+ "Figure 4: Effect of profiling dataset size on accuracy with quantization for Inception-v3. MAX method requires large number of samples for profiling to reach a stable accuracy. Laplace method stabilizes quickly with a few samples. "
491
+ ],
492
+ "image_footnote": [],
493
+ "bbox": [
494
+ 245,
495
+ 449,
496
+ 753,
497
+ 683
498
+ ],
499
+ "page_idx": 6
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "",
504
+ "bbox": [
505
+ 174,
506
+ 768,
507
+ 821,
508
+ 799
509
+ ],
510
+ "page_idx": 6
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "3.2 OBJECT DETECTION ",
515
+ "text_level": 1,
516
+ "bbox": [
517
+ 176,
518
+ 819,
519
+ 354,
520
+ 833
521
+ ],
522
+ "page_idx": 6
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "We performed network quantization on YOLO-v2(Redmon & Farhadi, 2016), a state-of-the-art object detection network. The network was trained and tested on the Pascal VOC dataset (Everingham et al., 2015). ",
527
+ "bbox": [
528
+ 174,
529
+ 845,
530
+ 825,
531
+ 888
532
+ ],
533
+ "page_idx": 6
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "Table 2 shows the loss in mean AP after quantization using our method in comparison with the layer-wise quantization. The layer-wise quantization caused $2 . 5 \\%$ point drop in mean AP after ",
538
+ "bbox": [
539
+ 174,
540
+ 895,
541
+ 823,
542
+ 924
543
+ ],
544
+ "page_idx": 6
545
+ },
546
+ {
547
+ "type": "table",
548
+ "img_path": "images/a92f185814d2dcf2c70805de777d6d1584c04eced5fa62fcfa50a2e6b3e01202.jpg",
549
+ "table_caption": [
550
+ "Table 2: Loss in mean AP after 8-bit quantization in YOLO-v2 (Redmon & Farhadi, 2016). No retraining performed. ’Reference (Float32)’ lists baseline accuracy while all other figures are accuracy losses. Loss above $1 . 0 \\%$ point is in bold face. "
551
+ ],
552
+ "table_footnote": [],
553
+ "table_body": "<table><tr><td rowspan=\"2\">Network</td><td rowspan=\"2\">Reference (Float32)</td><td colspan=\"2\">Layer-wise</td><td colspan=\"4\">Channel-wise</td></tr><tr><td>MAX</td><td>Laplace</td><td>MAX</td><td>Laplace</td><td>S.Cauchy</td><td>PDF-aware</td></tr><tr><td>Y0L0-v2</td><td>72.64%</td><td>2.50%</td><td>2.25%</td><td>0.14%</td><td>0.22%</td><td>0.70%</td><td>0.38%</td></tr></table>",
554
+ "bbox": [
555
+ 186,
556
+ 155,
557
+ 812,
558
+ 218
559
+ ],
560
+ "page_idx": 7
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "quantization. However, our method did not suffer from such a problem by selecting the fractional lengths adapted to the individual channels. ",
565
+ "bbox": [
566
+ 176,
567
+ 247,
568
+ 825,
569
+ 275
570
+ ],
571
+ "page_idx": 7
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "4 RELATED WORKS ",
576
+ "text_level": 1,
577
+ "bbox": [
578
+ 176,
579
+ 301,
580
+ 351,
581
+ 316
582
+ ],
583
+ "page_idx": 7
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Han quantized the network parameters after pruning for compression in Han et al. (2015). Kim proposed on using Hessian-weighted clustering to achieve a better compression ratio in quantization (Choi et al., 2017). However, in those works, only the network parameters were quantized to save storage space leaving the feature maps in full-precision. Both the activations and the network parameters were quantized layer-wise to accommodate the large variations in the dynamic range across the layers in Courbariaux et al. (2015b); Gysel (2016). The max values found in activations were used to decide on the fractional lengths, and intensive fine tuning were required to recover accuracies degraded by quantization in some networks. Lin used SQNR instead of the max value to minimize the bit-width for each layer and optimized DNNs for fixed-point operation (Lin & Annapureddy, 2016). Migacz achieved linear quantization for 8-bit integer operation without fine tuning by minimizing the information loss with Kullback-Leibler (KL) divergence (Migacz, 2017). Unfortunately, collection of the activation histograms were required from a large number of samples. All in all, these methods used the layer-wise quantization scheme. ",
588
+ "bbox": [
589
+ 173,
590
+ 335,
591
+ 825,
592
+ 516
593
+ ],
594
+ "page_idx": 7
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "Aggressively lowering the precision to be under 4 bits for both the weights and the activations have been actively explored (Courbariaux et al., 2015a; Rastegariy et al., 2016; Hubara et al., 2016; Li et al., 2016; Zhou et al., 2016; Leng et al., 2017; Lin et al., 2017). Although they revealed impressive results on small benchmarks, there is still a huge gap in accuracy on large benchmarks such as the ImageNet classification using state-of-the-art networks trained in full precision. Recent progress shows that it is possible to reduce the precision of DNNs to 4 bits without sacrificing accuracy by increasing the network size (Mishra et al., 2017) or training the networks in multiple stages with guided training (Zhuang et al., 2017). These work focus on training DNNs for low-precision inference from scratch rather than quantizing pretrained full-precision networks. ",
599
+ "bbox": [
600
+ 173,
601
+ 522,
602
+ 825,
603
+ 648
604
+ ],
605
+ "page_idx": 7
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "5 CONCLUSION ",
610
+ "text_level": 1,
611
+ "bbox": [
612
+ 176,
613
+ 672,
614
+ 318,
615
+ 689
616
+ ],
617
+ "page_idx": 7
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "In this paper, we proposed a set of methods for rapid deployment of DNNs trained in full precision to fixed point accelerators with limited precision computation units. The channel-wise quantization recognizes the inter-channel diversities in the dynamic range of the feature maps. HW cost for implementation is minimized by adjusting the fractional lengths of the kernel parameters. We evaluated our method on eleven state-of-the-art DNNs trained on the ImageNet dataset and an object detection network trained on Pascal VOC dataset. In comparison to the previous method (i.e the layer-wise quantization), the channel-wise quantization can reduce the accuracy loss caused by quantization substantially. ",
622
+ "bbox": [
623
+ 174,
624
+ 708,
625
+ 825,
626
+ 819
627
+ ],
628
+ "page_idx": 7
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "We also showed that quantization requires just a few image samples if we utilize the $n$ -th moments of the activations instead of the maximum value. In this way, deployment is possible even when just a few training samples are available for the trained network model. We further improved our method by considering the variations in distribution across the channels. A simple classifier was used for selecting the best-fit PDF for each channel from the statistical features. We were able to accomplish negligible accuracy loss (less than $1 \\%$ point in eleven networks out of twelve) after quantization without fine tuning. ",
633
+ "bbox": [
634
+ 174,
635
+ 825,
636
+ 825,
637
+ 924
638
+ ],
639
+ "page_idx": 7
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "REFERENCES ",
644
+ "text_level": 1,
645
+ "bbox": [
646
+ 176,
647
+ 102,
648
+ 287,
649
+ 118
650
+ ],
651
+ "page_idx": 8
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "Yoojin Choi, Mostafa El-Khamy, and Jungwon Lee. Towards the limit of network quantization. arXiv preprint arXiv:1612.01543v2, 2017. ",
656
+ "bbox": [
657
+ 173,
658
+ 126,
659
+ 825,
660
+ 155
661
+ ],
662
+ "page_idx": 8
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Franc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. CoRR, abs/1610.02357, 2016. ",
667
+ "bbox": [
668
+ 169,
669
+ 165,
670
+ 825,
671
+ 194
672
+ ],
673
+ "page_idx": 8
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. Advances in Neural Information Processing Systems (NIPS), pp. 3123–3131, 2015a. ",
678
+ "bbox": [
679
+ 174,
680
+ 203,
681
+ 823,
682
+ 247
683
+ ],
684
+ "page_idx": 8
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "Matthieu Courbariaux, Jean-Pierre David, and Yoshua Bengio. Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024v4, 2015b. ",
689
+ "bbox": [
690
+ 171,
691
+ 256,
692
+ 821,
693
+ 286
694
+ ],
695
+ "page_idx": 8
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "M. Everingham, S. M. A. Eslami, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 111(1):98–136, January 2015. ",
700
+ "bbox": [
701
+ 171,
702
+ 295,
703
+ 825,
704
+ 338
705
+ ],
706
+ "page_idx": 8
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "Philipp Gysel. Ristretto: Hardware-oriented approximation of convolutional neural networks. arXiv preprint arXiv:1605.06402, 2016. ",
711
+ "bbox": [
712
+ 173,
713
+ 348,
714
+ 823,
715
+ 377
716
+ ],
717
+ "page_idx": 8
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. ",
722
+ "bbox": [
723
+ 173,
724
+ 386,
725
+ 823,
726
+ 416
727
+ ],
728
+ "page_idx": 8
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. ",
733
+ "bbox": [
734
+ 171,
735
+ 425,
736
+ 825,
737
+ 455
738
+ ],
739
+ "page_idx": 8
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017. ",
744
+ "bbox": [
745
+ 173,
746
+ 464,
747
+ 825,
748
+ 507
749
+ ],
750
+ "page_idx": 8
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:609.07061, 2016. ",
755
+ "bbox": [
756
+ 174,
757
+ 517,
758
+ 825,
759
+ 560
760
+ ],
761
+ "page_idx": 8
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Forrest N. Iandola, Matthew W. Moskewicz, Khalid Ashraf, Song Han, William J. Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and ${ < } 0 . 5 \\mathrm { m b }$ model size. CoRR, abs/1602.07360, 2016. ",
766
+ "bbox": [
767
+ 173,
768
+ 569,
769
+ 826,
770
+ 613
771
+ ],
772
+ "page_idx": 8
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. ",
777
+ "bbox": [
778
+ 174,
779
+ 622,
780
+ 823,
781
+ 652
782
+ ],
783
+ "page_idx": 8
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Cong Leng, Hao Li, Shenghuo Zhu, and Rong Jin. Extremely low bit neural network: Squeeze the last bit out with admm. arXiv preprint arXiv:1707.09870, 2017. ",
788
+ "bbox": [
789
+ 174,
790
+ 661,
791
+ 823,
792
+ 690
793
+ ],
794
+ "page_idx": 8
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Fengfu Li, Bo Zhang, and Bin Liu. Ternary weight networks. arXiv preprint arXiv:1605.04711, 2016. ",
799
+ "bbox": [
800
+ 173,
801
+ 700,
802
+ 825,
803
+ 729
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Sachin Lin, Darryl smf Talathi and Sreekanth Annapureddy. Fixed point quantization of deep convolutional networks. International Conference on Machine Learning (ICML), pp. 344–352, 2016. ",
810
+ "bbox": [
811
+ 176,
812
+ 739,
813
+ 825,
814
+ 782
815
+ ],
816
+ "page_idx": 8
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "Xiaofan Lin, Cong Zhao, and Wei Pan. Towards accurate binary convolutional neural network. Advances in Neural Information Processing Systems (NIPS), pp. 344–352, 2017. ",
821
+ "bbox": [
822
+ 171,
823
+ 791,
824
+ 825,
825
+ 821
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "Szymon Migacz. 8-bit inference with tensorrt. In NVIDIA GPU Technology Conference (GTC), 2017. ",
832
+ "bbox": [
833
+ 173,
834
+ 830,
835
+ 825,
836
+ 847
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "Asit Mishra, Eriko Nurvitadhi, J Jeffrey Cook, and Debbie Marr. Wrpn: Wide reduced-precision networks. arXiv preprint arXiv:170901134, 2017. ",
843
+ "bbox": [
844
+ 171,
845
+ 856,
846
+ 825,
847
+ 886
848
+ ],
849
+ "page_idx": 8
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Mohammad Rastegariy, Vicente Ordonezy, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. arXiv preprint arXiv:1605.06402, 2016. ",
854
+ "bbox": [
855
+ 174,
856
+ 895,
857
+ 823,
858
+ 924
859
+ ],
860
+ "page_idx": 8
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "Joseph Redmon and Ali Farhadi. Yolo9000: Better, faster, stronger. arXiv preprint arXiv:1612.08242, 2016. \nRichard J. Samworth. Optimal weighted nearest neighbour classifiers. arXiv preprint arXiv:11015783v3, 2013. \nMark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. CoRR, abs/1801.04381, 2018. \nKaren Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. \nChristian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. \nChristian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. CoRR, abs/1512.00567, 2015. \nChristian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. CoRR, abs/1602.07261, 2016. \nSaining Xie, Ross B. Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual ´ transformations for deep neural networks. CoRR, abs/1611.05431, 2016. \nShuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1605.06402, 2016. \nBohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Towards effective lowbitwidth convolutional neural networks. arXiv preprint arXiv:1711.00205, 2017. ",
865
+ "bbox": [
866
+ 171,
867
+ 103,
868
+ 828,
869
+ 506
870
+ ],
871
+ "page_idx": 9
872
+ }
873
+ ]
parse/train/HkzZBi0cFQ/HkzZBi0cFQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkzZBi0cFQ/HkzZBi0cFQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/dUk5Foj5CLf/dUk5Foj5CLf.md ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CoAtNet: Marrying Convolution and Attention for All Data Sizes
2
+
3
+ Zihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing Tan Google Research, Brain Team {zihangd,hanxiaol,qvl,tanmingxing}@google.com
4
+
5
+ # Abstract
6
+
7
+ Transformers have attracted increasing interests in computer vision, but they still fall behind state-of-the-art convolutional networks. In this work, we show that while Transformers tend to have larger model capacity, their generalization can be worse than convolutional networks due to the lack of the right inductive bias. To effectively combine the strengths from both architectures, we present CoAtNets (pronounced “coat” nets), a family of hybrid models built from two key insights: (1) depthwise Convolution and self-Attention can be naturally unified via simple relative attention; (2) vertically stacking convolution layers and attention layers in a principled way is surprisingly effective in improving generalization, capacity and efficiency. Experiments show that our CoAtNets achieve state-of-the-art performance under different resource constraints across various datasets: Without extra data, CoAtNet achieves $8 6 . 0 \%$ ImageNet top-1 accuracy; When pre-trained with 13M images from ImageNet-21K, our CoAtNet achieves $8 8 . 5 6 \%$ top-1 accuracy, matching ViT-huge pre-trained with 300M images from JFT-300M while using $2 3 \mathrm { x }$ less data; Notably, when we further scale up CoAtNet with JFT-3B, it achieves $9 0 . 8 8 \%$ top-1 accuracy on ImageNet, establishing a new state-of-the-art result.
8
+
9
+ # 1 Introduction
10
+
11
+ Since the breakthrough of AlexNet [1], Convolutional Neural Networks (ConvNets) have been the dominating model architecture for computer vision [2, 3, 4, 5]. Meanwhile, with the success of self-attention models like Transformers [6] in natural language processing [7, 8], many previous works have attempted to bring in the power of attention into computer vision [9, 10, 11, 12]. More recently, Vision Transformer (ViT) [13] has shown that with almost1 only vanilla Transformer layers, one could obtain reasonable performance on ImageNet-1K [14] alone. More importantly, when pre-trained on large-scale weakly labeled JFT-300M dataset [15], ViT achieves comparable results to state-of-the-art (SOTA) ConvNets, indicating that Transformer models potentially have higher capacity at scale than ConvNets.
12
+
13
+ While ViT has shown impressive results with enormous JFT 300M training images, its performance still falls behind ConvNets in the low data regime. For example, without extra JFT-300M pre-training, the ImageNet accuracy of ViT is still significantly lower than ConvNets with comparable model size [5] (see Table 13). Subsequent works use special regularization and stronger data augmentation to improve the vanilla ViT [16, 17, 18], yet none of these ViT variants could outperform the SOTA convolution-only models on ImageNet classification given the same amount of data and computation [19, 20]. This suggests that vanilla Transformer layers may lack certain desirable inductive biases possessed by ConvNets, and thus require significant amount of data and computational resource to compensate. Not surprisingly, many recent works have been trying to incorporate the inductive biases of ConvNets into Transformer models, by imposing local receptive fields for attention layers [21, 22] or augmenting the attention and FFN layers with implicit or explicit convolutional operations [23, 24, 25]. However, these approaches are either ad-hoc or focused on injecting a particular property, lacking a systematic understanding of the respective roles of convolution and attention when combined.
14
+
15
+ In this work, we systematically study the problem of hybridizing convolution and attention from two fundamental aspects in machine learning – generalization and model capacity. Our study shows that convolutional layers tend to have better generalization with faster converging speed thanks to their strong prior of inductive bias, while attention layers have higher model capacity that can benefit from larger datasets. Combining convolutional and attention layers can achieve better generalization and capacity; however, a key challenge here is how to effectively combine them to achieve better trade-offs between accuracy and efficiency. In this paper, we investigate two key insights: First, we observe that the commonly used depthwise convolution can be effectively merged into attention layers with simple relative attention; Second, simply stacking convolutional and attention layers, in a proper way, could be surprisingly effective to achieve better generalization and capacity. Based on these insights, we propose a simple yet effective network architecture named CoAtNet, which enjoys the strengths from both ConvNets and Transformers.
16
+
17
+ Our CoAtNet achieves SOTA performances under comparable resource constraints across different data sizes. Specifically, under the low-data regime, CoAtNet inherits the great generalization property of ConvNets thanks to the favorable inductive biases. Moreover, given abundant data, CoAtNet not only enjoys the superior scalability of Transformer models, but also achieves faster convergence and thus improved efficiency. When only ImageNet-1K is used for training, CoAtNet achieves $8 6 . 0 \%$ top-1 accuracy, matching the prior art NFNet [20] under similar computation resource and training conditions. Further, when pre-trained on ImageNet-21K with about 10M images, CoAtNet reaches $8 8 . 5 6 \%$ top-1 accuracy when finetuned on ImageNet-1K, matching the ViT-Huge pre-trained on JFT-300M, a $2 3 \times$ larger dataset. Finally, when JFT-3B is used for pre-training, CoAtNet exhibits better efficiency compared to ViT, and pushes the ImageNet-1K top-1 accuracy to $9 0 . 8 8 \%$ while using $1 . 5 \mathrm { x }$ less computation of the prior art set by ViT-G/14 [26].
18
+
19
+ # 2 Model
20
+
21
+ In the section, we focus on the question of how to “optimally” combine the convolution and transformer. Roughly speaking, we decompose the question into two parts:
22
+
23
+ 1. How to combine the convolution and self-attention within one basic computational block? 2. How to vertically stack different types of computational blocks together to form a complete network?
24
+
25
+ The rationale of the decomposition will become clearer as we gradually reveal our design choices.
26
+
27
+ # 2.1 Merging Convolution and Self-Attention
28
+
29
+ For convolution, we mainly focus on the MBConv block [27] which employs depthwise convolution [28] to capture the spatial interaction. A key reason of this choice is that both the FFN module in Transformer and MBConv employ the design of “inverted bottleneck”, which first expands the channel size of the input by $4 \mathbf { x }$ and later project the the $4 \mathbf { x }$ -wide hidden state back to the original channel size to enable residual connection.
30
+
31
+ Besides the similarity of inverted bottleneck, we also notice that both depthwise convolution and self-attention can be expressed as a per-dimension weighted sum of values in a pre-defined receptive field. Specifically, convolution relies on a fixed kernel to gather information from a local receptive field
32
+
33
+ $$
34
+ y _ { i } = \sum _ { j \in \mathcal { L } ( i ) } w _ { i - j } \odot x _ { j } \quad \mathrm { ( d e p t h w i s e c o n v o l u t i o n ) } ,
35
+ $$
36
+
37
+ where $x _ { i } , y _ { i } \in \mathbb { R } ^ { D }$ are the input and output at position $i$ respectively, and $\mathcal { L } ( i )$ denotes a local neighborhood of $i$ , e.g., a 3x3 grid centered at $i$ in image processing.
38
+
39
+ In comparison, self-attention allows the receptive field to be the entire spatial locations and computes the weights based on the re-normalized pairwise similarity between the pair $( x _ { i } , x _ { j } )$ : 2
40
+
41
+ $$
42
+ y _ { i } = \sum _ { j \in \mathcal { G } } \underbrace { \frac { \exp { \left( x _ { i } ^ { \top } x _ { j } \right) } } { \sum _ { k \in \mathcal { G } } \exp { \left( x _ { i } ^ { \top } x _ { k } \right) } } } _ { A _ { i , j } } x _ { j } \quad \mathrm { ( s e l f - a t t e n t i o n ) } ,
43
+ $$
44
+
45
+ where $\mathcal { G }$ indicates the global spatial space. Before getting into the question of how to best combine them, it is worthwhile to compare their relative strengths and weaknesses, which helps to figure out the good properties we hope to retain.
46
+
47
+ • First of all, the depthwise convolution kernel $w _ { i - j }$ is an input-independent parameter of static value, while the attention weight $A _ { i , j }$ dynamically depends on the representation of the input. Hence, it is much easier for the self-attention to capture complicated relational interactions between different spatial positions, a property that we desire most when processing high-level concepts. However, the flexibility comes with a risk of easier overfitting, especially when data is limited. • Secondly, notice that given any position pair $( i , j )$ , the corresponding convolution weight $w _ { i - j }$ only cares about the relative shift between them, i.e. $i - j$ , rather than the specific values of $i$ or $j$ . This property is often referred to translation equivalence, which has been found to improve generalization under datasets of limited size [29]. Due to the usage of absolution positional embeddings, standard Transformer (ViT) lacks this property. This partially explains why ConvNets are usually better than Transformers when the dataset is not enormously large. • Finally, the size of the receptive field is one of the most crucial differences between self-attention and convolution. Generally speaking, a larger receptive field provides more contextual information, which could lead to higher model capacity. Hence, the global receptive field has been a key motivation to employ self-attention in vision. However, a large receptive field requires significantly more computation. In the case of global attention, the complexity is quadratic w.r.t. spatial size, which has been a fundamental trade-off in applying self-attention models.
48
+
49
+ Table 1: Desirable properties found in convolution or self-attention.
50
+
51
+ <table><tr><td>Properties</td><td>Convolution</td><td>Self-Attention</td></tr><tr><td>Translation Equivariance</td><td>√</td><td></td></tr><tr><td>Input-adaptive Weighting</td><td></td><td>√</td></tr><tr><td>Global Receptive Field</td><td></td><td></td></tr></table>
52
+
53
+ Given the comparison above, an ideal model should be able to combine the 3 desirable properties in Table 1. With the similar form of depthwise convolution in Eqn. (1) and self-attention in Eqn. (2), a straightforward idea that could achieve this is simply to sum a global static convolution kernel with the adaptive attention matrix, either after or before the Softmax normalization, i.e.,
54
+
55
+ $$
56
+ y _ { i } ^ { \mathrm { p o s t } } = \sum _ { j \in \mathcal { G } } \left( \frac { \exp \left( x _ { i } ^ { \top } x _ { j } \right) } { \sum _ { k \in \mathcal { G } } \exp \left( x _ { i } ^ { \top } x _ { k } \right) } + w _ { i - j } \right) x _ { j } \ \mathrm { ~ o r ~ } \ y _ { i } ^ { \mathrm { p e } } = \sum _ { j \in \mathcal { G } } \frac { \exp \left( x _ { i } ^ { \top } x _ { j } + w _ { i - j } \right) } { \sum _ { k \in \mathcal { G } } \exp \left( x _ { i } ^ { \top } x _ { k } + w _ { i - k } \right) } x _ { j } .
57
+ $$
58
+
59
+ Interestingly, while the idea seems overly simplified, the pre-normalization version $y ^ { \mathrm { p r e } }$ corresponds to a particular variant of relative self-attention [30, 31]. In this case, the attention weight $A _ { i , j }$ is decided jointly by the $w _ { i - j }$ of translation equivariance and the input-adaptive $x _ { i } ^ { \top } x _ { j }$ , which can enjoy both effects depending on their relative magnitudes. Importantly, note that in order to enable the global convolution kernel without blowing up the number of parameters, we have reloaded the notation of $w _ { i - j }$ as a scalar (i.e., $w \in \mathbb { R } ^ { O ( | \mathcal { G } | ) }$ ) rather than a vector in Eqn. (1). Another advantage of the scalar formulation of $w$ is that retrieving $w _ { i - j }$ for all $( i , j )$ is clearly subsumed by computing the pairwise dot-product attention, hence resulting in minimum additional cost (see Appendix A.1). Given the benefits, we will use the Transformer block with the pre-normalization relative attention variant in Eqn. (3) as the key component of the proposed CoAtNet model.
60
+
61
+ # 2.2 Vertical Layout Design
62
+
63
+ After figuring out a neat way to combine convolution and attention, we next consider how to utilize it to stack an entire network.
64
+
65
+ As we have discuss above, the global context has a quadratic complexity w.r.t. the spatial size. Hence, if we directly apply the relative attention in Eqn. (3) to the raw image input, the computation will be excessively slow due to the large number of pixels in any image of common sizes. Hence, to construct a network that is feasible in practice, we have mainly three options:
66
+
67
+ (A) Perform some down-sampling to reduce the spatial size and employ the global relative attention after the feature map reaches manageable level.
68
+ (B) Enforce local attention, which restricts the global receptive field $\mathcal { G }$ in attention to a local field $\mathcal { L }$ just like in convolution [22, 21].
69
+ (C) Replace the quadratic Softmax attention with certain linear attention variant which only has a linear complexity w.r.t. the spatial size [12, 32, 33].
70
+
71
+ We briefly experimented with option (C) without getting a reasonably good result. For option (B), we found that implementing local attention involves many non-trivial shape formatting operations that requires intensive memory access. On our accelerator of choice (TPU), such operation turns out to be extremely slow [34], which not only defeats the original purpose of speeding up global attention, but also hurts the model capacity. Hence, as some recent work has studied this variant [22, 21], we will focus on option (A) and compare our results with theirs in our empirical study (Section 4).
72
+
73
+ For option (A), the down-sampling can be achieved by either (1) a convolution stem with aggressive stride (e.g., stride 16x16) as in ViT or (2) a multi-stage network with gradual pooling as in ConvNets. With these choices, we derive a search space of 5 variants and compare them in controlled experiments.
74
+
75
+ • When the ViT Stem is used, we directly stack $L$ Transformer blocks with relative attention, which we denote as $\mathrm { V I T } _ { \mathrm { R E L } }$ .
76
+ • When the multi-stage layout is used, we mimic ConvNets to construct a network of 5 stages (S0, S1, S2, S3 & S4), with spatial resolution gradually decreased from S0 to S4. At the beginning of each stage, we always reduce the spatial size by $2 \mathbf { x }$ and increase the number of channels (see Appendix A.1 for the detailed down-sampling implementation). The first stage S0 is a simple 2-layer convolutional Stem and S1 always employs MBConv blocks with squeeze-excitation (SE), as the spatial size is too large for global attention. Starting from S2 through S4, we consider either the MBConv or the Transformer block, with a constraint that convolution stages must appear before Transformer stages. The constraint is based on the prior that convolution is better at processing local patterns that are more common in early stages. This leads to 4 variants with increasingly more Transformer stages, C-C-C-C, C-C-C-T, C-C-T-T and C-T-T-T, where C and T denote Convolution and Transformer respectively.
77
+
78
+ To systematically study the design choices, we consider two fundamental aspects generalization capability and model capacity: For generalization, we are interested in the gap between the training loss and the evaluation accuracy. If two models have the same training loss, then the model with higher evaluation accuracy has better generalization capability, since it can generalize better to unseen evaluation dataset. Generalization capability is particularly important to data efficiency when training data size is limited. For model capacity, we measure the ability to fit large training datasets. When training data is abundant and overfitting is not an issue, the model with higher capacity will achieve better final performance after reasonable training steps. Note that, since simply increasing the model size can lead to higher model capacity, to perform a meaningful comparison, we make sure the model sizes of the 5 variants are comparable.
79
+
80
+ To compare the generalization and model capacity, we train different variants of hybrid models on ImageNet-1K (1.3M) and JFT $\left( > 3 0 0 \mathbf { M } \right)$ dataset for 300 and 3 epochs respectively, both without any regularization or augmentation. The training loss and evaluation accuracy on both datasets are summarized in Figure 1.
81
+
82
+ • From the ImageNet-1K results, a key observation is that, in terms of generalization capability (i.e., gap between train and evaluation metrics), we have
83
+
84
+ $$
85
+ \mathrm { C \mathrm { - } C \mathrm { - } C \mathrm { - } C \approx C \mathrm { - } C \mathrm { - } C \mathrm { - } T \ge C \mathrm { - } C \mathrm { - } T \mathrm { - } T > C \mathrm { - } T \mathrm { - } T \mathrm { - } T \gg V \mathrm { I } \mathrm { T } _ { \mathrm { R E L } } . }
86
+ $$
87
+
88
+ ![](images/8e4cc944c4e098b4c2962d8c1e585910035ad5a220c25df539ba8f057d9c47df.jpg)
89
+ Figure 1: Comparison for model generalization and capacity under different data size. For fair comparison, all models have similar parameter size and computational cost.
90
+
91
+ Particularly, $\mathrm { V I T } _ { \mathrm { R E L } }$ is significantly worse than variants by a large margin, which we conjecture is related to the lack of proper low-level information processing in its aggressive down-sampling Stem. Among the multi-stage variants, the overall trend is that the more convolution stages the model has, the smaller the generalization gap is.
92
+
93
+ • As for model capacity, from the JFT comparison, both the train and evaluation metrics at the end of the training suggest the following ranking:
94
+
95
+ $$
96
+ \mathrm { C - C \mathrm { - } T \mathrm { - } T \approx C \mathrm { - } T \mathrm { - } T \mathrm { - } T > V I T _ { R E L } > C \mathrm { - } C \mathrm { - } C \mathrm { - } T > C \mathrm { - } C \mathrm { - } C \mathrm { - } C \mathrm { - } C \mathrm { . } }
97
+ $$
98
+
99
+ Importantly, this suggests that simply having more Transformer blocks does NOT necessarily mean higher capacity for visual processing. On one hand, while initially worse, $\mathrm { V I T } _ { \mathrm { R E L } }$ ultimately catch up with the two variants with more MBConv stages, indicating the capacity advantage of Transformer blocks. On the other hand, both C-C-T-T and C-T-T-T clearly outperforming $\mathrm { V I T } _ { \mathrm { R E L } }$ suggest that the ViT stem with an aggressive stride may have lost too much information and hence limit the model capacity. More interestingly, the fact that C-C-T-T $\approx \mathbf { C }$ -T-T-T indicates the for processing low-level information, static local operations like convolution could be as capable as adaptive global attention mechanism, while saving computation and memory usage substantially.
100
+
101
+ Finally, to decide between C-C-T-T and C-T-T-T, we conduct another transferability test3 — we finetune the two JFT pre-trained models above on ImageNet-1K for 30 epochs and compare their transfer performances. From Table 2, it turns out that C-C-T-T achieves a clearly better transfer accuracy than C-T-T-T, despite the same pre-training performance.
102
+
103
+ Table 2: Transferability test results.
104
+
105
+ <table><tr><td>Metric</td><td>C-C-T-T</td><td>C-T-T-T</td></tr><tr><td>Pre-training Precision@1 (JFT)</td><td>34.40</td><td>34.36</td></tr><tr><td>Transfer Accuracy 224x224</td><td>82.39</td><td>81.78</td></tr><tr><td>Transfer Accuracy 384x384</td><td>84.23</td><td>84.02</td></tr></table>
106
+
107
+ Taking generalization, model capacity, transferability and efficiency into consideration, we adapt the C-C-T-T multi-stage layout for CoAtNet. More model details are included in Appendix A.1.
108
+
109
+ # 3 Related Work
110
+
111
+ Convolutional network building blocks. Convolutional Networks (ConvNets) have been the dominating neural architectures for many computer vision tasks. Traditionally, regular convolutions, such as ResNet blocks [3], are popular in large-scale ConvNets; in contrast, depthwise convolutions [28] are popular in mobile platforms due to its lower computational cost and smaller parameter size [27]. Recent works show that an improved inverted residual bottlenecks (MBConv [27, 35]), which is built upon depthwise convolutions, can achieve both high accuracy and better efficiency [5, 19]. As discussed in Section 2, due to the strong connection between MBConv and Transformer blocks , this paper mostly employs MBConv as convolution building blocks.
112
+
113
+ Self-attention and Transformers. With the key ingredients of self-attention, Transformers have been widely adopted for neural language processing and speech understanding. As an early work, stand-alone self-attention network [34] shows self-attention alone can work well for different vision tasks, though with some practical difficulties. Recently, ViT [13] applies a vanilla Transformer to ImageNet classification, and achieves impressive results after pre-training on a large-scale JFT dataset. However, ViT still largely lags behind state-of-the-art ConvNets when training data is limited. Following that, many recent works have been focused on improving vision Transformers for data efficiency and model efficiency. For a more comprehensive review of vision Transformers, we refer readers to the dedicated surveys [36, 37].
114
+
115
+ Relative attention. Under the general name of relative attention, there have been various variants in literature [30, 38, 39, 34, 40, 31]. Generally speaking, we can separate them into two categories: (a) the input-dependent version where the extra relative attention score is a function of the input states $f ( \bar { x } _ { i } , x _ { j } , \bar { i } - j )$ , and (b) the input-independent version $f ( i - j )$ . The variant in CoAtNet belongs to the input-independent version, and is similar to the one used in T5 [31], but unlike T5, we neither share the relative attention parameters across layers nor use the bucketing mechanism. As a benefit of the input independence, obtaining $f ( i - j )$ for all $( i , j )$ pairs is computationally much cheaper than the input-dependent version on TPU. In addition, at inference time, this only needs to be computed once and cached for future use. A recent work [22] also utilizes such an input-independent parameterization, but it restricts the receptive field to a local window.
116
+
117
+ Combining convolution and self-attention. The idea of combining convolution and self-attention for vision recognition is not new. A common approach is to augment the ConvNet backbone with explicit self-attention or non-local modules [9, 10, 11, 12], or to replace certain convolution layers with standard self-attention [11] or a more flexible mix of linear attention and convolution [41]. While self-attention usually improves the accuracy, they often come with extra computational cost and hence are often regarded as an add-on to the ConvNets, similar to squeeze-and-excitation [42] module. In comparison, after the success of ViT and ResNet-ViT [13], another popular line of research starts with a Transformer backbone and tries to incorporate explicit convolution or some desirable properties of convolution into the Transformer backbone [25, 24, 23, 22, 21, 43, 44].
118
+
119
+ While our work also belongs to this category, we show that our relative attention instantiation is a natural mixture of depthwise convolution and content-based attention with minimum additional cost. More importantly, starting from the perspectives of generalization and model capacity, we take a systematic approach to the vertical layout design and show how and why different network stages prefer different types of layers. Therefore, compared to models that simply use an off-the-shelf ConvNet as the stem layer, such as ResNet-ViT [13], CoAtNet also scales the Convolution stage (S2) when the overall size increases. On the other hand, compared to models employing local attention [22, 21], CoAtNet consistently uses full attention for S3 & S4 to ensure the model capacity, as S3 occupies the majority of the computation and parameters.
120
+
121
+ # 4 Experiments
122
+
123
+ In this section, we compare CoAtNet with previous results under comparable settings. For completeness, all the hyper-parameters not mentioned here are included in Appendix A.2.
124
+
125
+ # 4.1 Experiment Setting
126
+
127
+ CoAtNet model family. To compare with existing models of different sizes, we also design a family of CoAtNet models as summarized in Table 3. Overall, we always double the number of channels from S1 to S4, while ensuring the width of the Stem S0 to be smaller or equal to that of S1. Also, for simplicity, when increasing the depth of the network, we only scale the number of blocks in S2 and S3.
128
+
129
+ Evaluation Protocol. Our experiments focus on image classification. To evaluate the performance of the model across different data sizes, we utilize three datasets of increasingly larger sizes, namely ImageNet-1K (1.28M images), ImageNet-21K (12.7M images) and JFT (300M images). Following previous works, we first pre-train our models on each of the three datasets at resolution 224 for 300, 90 and 14 epochs respectively. Then, we finetune the pre-trained models on ImageNet-1K at the desired resolutions for 30 epochs and obtain the corresponding evaluation accuracy. One exception is the ImageNet-1K performance at resolution 224, which can be directly obtained at the end of pre-training. Note that similar to other models utilizing Transformer blocks, directly evaluating models pre-trained on ImageNet-1K at a larger resolution without finetuning usually leads to performance drop. Hence, finetuning is always employed whenever input resolution changes.
130
+
131
+ Table 3: L denotes the number of blocks and D denotes the hidden dimension (#channels). For all Conv and MBConv blocks, we always use the kernel size 3. For all Transformer blocks, we set the size of each attention head to 32, following [22]. The expansion rate for the inverted bottleneck is always 4 and the expansion (shrink) rate for the SE is always 0.25.
132
+
133
+ <table><tr><td> Stages</td><td>Size</td><td>CoAtNet-0</td><td></td><td>CoAtNet-1</td><td>CoAtNet-2</td><td></td><td>CoAtNet-3</td><td>CoAtNet-4</td></tr><tr><td>S0-Conv</td><td>1/2</td><td>L=2 D=64</td><td>L=2</td><td>D=64</td><td>L=2</td><td>D=128 L=2</td><td>D=192</td><td>L=2 D=192</td></tr><tr><td>S1-MbConv</td><td>1/4</td><td>L=2 D=96</td><td>L=2</td><td>D=96</td><td>L=2 D=128</td><td>L=2</td><td>D=192</td><td>L=2 D=192</td></tr><tr><td>S2-MBConv</td><td>1/8</td><td>L=3 D=192</td><td>L=6</td><td>D=192</td><td>L=6 D=256</td><td>L=6</td><td>D=384</td><td>L=12 D=384</td></tr><tr><td>S3-TFMRel</td><td>1/16</td><td>L=5 D=384</td><td>L=14</td><td>D=384</td><td>L=14 D=512</td><td>L=14</td><td>D=768</td><td>L=28 D=768</td></tr><tr><td>S4-TFMRel</td><td>1/32</td><td>L=2 D=768</td><td>L=2</td><td>D=768</td><td>L=2 D=1024</td><td>L=2</td><td>D=1536</td><td>L=2 D=1536</td></tr></table>
134
+
135
+ Data Augmentation & Regularization. In this work, we only consider two widely used data augmentations, namely RandAugment [45] and MixUp [46], and three common techniques, including stochastic depth [47], label smoothing [48] and weight decay [49], to regularize the model. Intuitively, the specific hyper-parameters of the augmentation and regularization methods depend on model size and data scale, where strong regularization is usually applied for larger models and smaller dataset.
136
+
137
+ Under the general principle, a complication under the current paradigm is how to adjust the regularization for pre-training and finetuning as data size can change. Specifically, we have an interesting observation that if a certain type of augmentation is entirely disabled during pre-training, simply turning it on during fine-tuning would most likely harm the performance rather than improving. We conjecture this could be related to data distribution shift. As a result, for certain runs of the proposed model, we deliberately apply RandAugment and stochastic depth of a small degree when pre-training on the two larger datasets, ImageNet21-K and JFT. Although such regularization can harm the pre-training metrics, this allows more versatile regularization and augmentation during finetuning, leading to improved down-stream performances.
138
+
139
+ # 4.2 Main Results
140
+
141
+ ![](images/cf1567b93b834a38bb5d149ee37f969799ca7bcd6b3f63af756a7cd673e8c469.jpg)
142
+ Figure 2: Accuracy-to-FLOPs scaling curve under ImageNet-1K only setting at $2 2 4 \mathbf { x } 2 2 4$ .
143
+
144
+ ![](images/f8c09d4a039db4e8c22000a3a3a66bae5de7e541a68ec3f2c6a6234546bf4ac2.jpg)
145
+ Figure 3: Accuracy-to-Params scaling curve under ImageNet- $2 1 \mathrm { K } \Rightarrow$ ImageNet-1K setting.
146
+
147
+ ImageNet-1K The experiment results with only the ImageNet-1K dataset are shown in Table 4. Under similar conditions, the proposed CoAtNet models not only outperform ViT variants, but also match the best convolution-only architectures, i.e., EfficientNet-V2 and NFNets. Additionally, we also visualize the all results at resolution $2 2 4 \mathbf { x } 2 2 4$ in Fig. 2. As we can see, CoAtNet scales much better than previous model with attention modules.
148
+
149
+ Table 4: Model performance on ImageNet. 1K only denotes training on ImageNet-1K only; $2 1 \mathtt { K } + 1 \mathtt { K }$ denotes pre-training on ImageNet-21K and finetuning on ImageNet-1K; PT-RA denotes applying RandAugment during 21K pre-training, and E150 means 150 epochs of 21K pre-training, which is longer than the standard 90 epochs. More results are in Appendix A.3.
150
+
151
+ <table><tr><td colspan="2">Models</td><td>Eval Size</td><td>#Params</td><td>#FLOPs</td><td colspan="2">ImageNet Top-1 Accuracy</td></tr><tr><td rowspan="5">Conv Only</td><td></td><td></td><td></td><td></td><td>1K only</td><td>21K+1K</td></tr><tr><td>EfficientNet-B7</td><td>600²</td><td>66M</td><td>37B</td><td>84.7</td><td>-</td></tr><tr><td>EfficientNetV2-L</td><td>480²</td><td>121M</td><td>53B</td><td>85.7</td><td>86.8</td></tr><tr><td>NFNet-F3</td><td>4162²</td><td>255M</td><td>114.8B</td><td>85.7</td><td>=</td></tr><tr><td>NFNet-F5</td><td>5442</td><td>377M</td><td>289.8B</td><td>86.0</td><td>1</td></tr><tr><td rowspan="4">ViT-Stem TFM</td><td>DeiT-B</td><td>3842</td><td>86M</td><td>55.4B</td><td>83.1</td><td>-</td></tr><tr><td>ViT-L/16</td><td>384²</td><td>304M</td><td>190.7B</td><td>-</td><td>85.3</td></tr><tr><td>CaiT-S-36</td><td>384²</td><td>68M</td><td>48.0B</td><td>85.0</td><td></td></tr><tr><td>DeepViT-L</td><td>224²</td><td>55M</td><td>12.5B</td><td>83.1</td><td>-</td></tr><tr><td rowspan="2">Multi-stage TFM</td><td>Swin-B</td><td>384²</td><td>88M</td><td>47.0B</td><td>84.2</td><td>86.0</td></tr><tr><td>Swin-L</td><td>384²</td><td>197M</td><td>103.9B</td><td>-</td><td>86.4</td></tr><tr><td rowspan="5">Conv+TFM</td><td>BotNet-T7</td><td>3842</td><td>75.1M</td><td>45.8B</td><td>84.7</td><td>-</td></tr><tr><td>LambdaResNet-420</td><td>320²</td><td>-</td><td>=</td><td>84.8</td><td></td></tr><tr><td>T2T-ViT-24</td><td>224²</td><td>64.1M</td><td>15.0B</td><td>82.6</td><td>=</td></tr><tr><td>CvT-21</td><td>384²</td><td>32M</td><td>24.9B</td><td>83.3</td><td>-</td></tr><tr><td>CvT-W24</td><td>3842</td><td>277M</td><td>193.2B</td><td>-</td><td>87.7</td></tr><tr><td rowspan="19">Conv+TFM (ours)</td><td>CoAtNet-0 CoAtNet-1</td><td>224²</td><td>25M</td><td>4.2B</td><td>81.6</td><td>=</td></tr><tr><td></td><td>224²</td><td>42M</td><td>8.4B</td><td>83.3</td><td>-</td></tr><tr><td>CoAtNet-2 CoAtNet-3</td><td>224²</td><td>75M</td><td>15.7B</td><td>84.1</td><td>87.1</td></tr><tr><td></td><td>2242</td><td>168M</td><td>34.7B</td><td>84.5</td><td>87.6</td></tr><tr><td>CoAtNet-0</td><td>384²</td><td>25M</td><td>13.4B</td><td>83.9</td><td>-</td></tr><tr><td>CoAtNet-1</td><td>3842</td><td>42M</td><td>27.4B</td><td>85.1</td><td>-</td></tr><tr><td>CoAtNet-2</td><td>384²</td><td>75M</td><td>49.8B</td><td>85.7</td><td>87.1</td></tr><tr><td>CoAtNet-3</td><td>384²</td><td>168M</td><td>107.4B</td><td>85.8</td><td>87.6</td></tr><tr><td>CoAtNet-4</td><td>384²</td><td>275M</td><td>189.5B</td><td>-</td><td>87.9</td></tr><tr><td>+ PT-RA</td><td>384²</td><td>275M</td><td>189.5B</td><td></td><td>88.3</td></tr><tr><td>+ PT-RA-E150</td><td>3842</td><td>275M</td><td>189.5B</td><td></td><td>88.4</td></tr><tr><td>CoAtNet-2</td><td>5122</td><td>75M</td><td>96.7B</td><td>85.9</td><td>87.3</td></tr><tr><td>CoAtNet-3</td><td>512²</td><td>168M</td><td>203.1B</td><td>86.0</td><td>87.9</td></tr><tr><td>CoAtNet-4</td><td>512²</td><td>275M</td><td>360.9B</td><td>-</td><td>88.1</td></tr><tr><td>+ PT-RA</td><td>512²</td><td>275M</td><td>360.9B</td><td>=</td><td>88.4</td></tr><tr><td>+ PT-RA-E150</td><td>5122</td><td>275M</td><td>360.9B</td><td>=</td><td>88.56</td></tr></table>
152
+
153
+ ImageNet-21K As we can see from Table 4 and Fig. 3, when ImageNet-21K is used for pretraining, the advantage of CoAtNet becomes more obvious, substantially outperforming all previous models. Notably, the best CoAtNet variant achieves a top-1 accuracy of $8 8 . 5 6 \%$ , matching the ViTH/14 performance of $8 8 . 5 5 \%$ , which requires pre-training the $2 . 3 \mathbf { x }$ larger ViT model on a $2 3 \mathrm { x }$ larger proprietary weakly labeled dataset (JFT) for $2 . 2 \mathbf { x }$ more steps. This marks a dramatic improvement in both data efficiency and computation efficiency.
154
+
155
+ JFT Finally, in Table 5, we further evaluate CoAtNet under the large-scale data regime with JFT300M and JFT-3B. Encouragingly, our CoAtNet-4 can almost match the best previous performance with JFT-300M set by NFNet- $\mathrm { F 4 + }$ , while being $2 \mathbf { x }$ more efficient in terms of both TPU training time and parameter count. When we scale up the model to consume similar training resource as NFNet- $. \mathrm { F 4 + }$ , CoAtNet-5 reaches $8 9 . 7 7 \%$ on top-1 accuracy, outperforming previous results under comparable settings.
156
+
157
+ Moreover, as we further push the training resource towards the level used by ViT-G/14 and utilize the same JFT-3B dataset of an even larger size [26], with over $4 \mathbf { x }$ less computation, CoAtNet-6 is able to match the performance of $\mathrm { V i T - G } / 1 4$ of $9 0 . 4 5 \%$ , and with $1 . 5 \mathrm { x }$ less computation, CoAtNet-7 achieves $8 9 . 7 7 \%$ on top-1 accuracy $9 0 . 8 8 \%$ , achieving the new state-of-the-art performance.
158
+
159
+ Table 5: Performance Comparison on large-scale JFT dataset. TPUv3-core-days denotes the pretraining time, Top-1 Accuracy denotes the finetuned accuracy on ImageNet. Note that the last 3 rows use a larger dataset JFT-3B [26] for pre-training, while others use JFT-300M [15]. See Appendix A.2 for the size details of CoAtNet-5/6/7. †: Down-sampling in the MBConv block is achieved by stride-2 Depthwise Convolution. ⇧: ViT-G/14 computation consumption is read from Fig. 1 of the paper [26].
160
+
161
+ <table><tr><td>Models</td><td>Eval Size</td><td>#Params</td><td>#FLOPs</td><td>TPUv3-core-days</td><td>Top-1 Accuracy</td></tr><tr><td>ResNet + ViT-L/16</td><td>3842</td><td>330M</td><td>=</td><td>1</td><td>87.12</td></tr><tr><td>ViT-L/16</td><td>5122</td><td>307M</td><td>364B</td><td>0.68K</td><td>87.76</td></tr><tr><td>ViT-H/14</td><td>5182</td><td>632M</td><td>1021B</td><td>2.5K</td><td>88.55</td></tr><tr><td>NFNet-F4+</td><td>5122</td><td>527M</td><td>367B</td><td>1.86K</td><td>89.2</td></tr><tr><td>CoAtNet-3t</td><td>3842</td><td>168M</td><td>114B</td><td>0.58K</td><td>88.52</td></tr><tr><td>CoAtNet-3t</td><td>5122</td><td>168M</td><td>214B</td><td>0.58K</td><td>88.81</td></tr><tr><td>CoAtNet-4</td><td>5122</td><td>275M</td><td>361B</td><td>0.95K</td><td>89.11</td></tr><tr><td>CoAtNet-5</td><td>5122</td><td>688M</td><td>812B</td><td>1.82K</td><td>89.77</td></tr><tr><td>ViT-G/14</td><td>5182</td><td>1.84B</td><td>5160B</td><td>&gt;30K</td><td>90.45</td></tr><tr><td>CoAtNet-6</td><td>5122</td><td>1.47B</td><td>1521B</td><td>6.6K</td><td>90.45</td></tr><tr><td>CoAtNet-7</td><td>5122</td><td>2.44B</td><td>2586B</td><td>20.1K</td><td>90.88</td></tr></table>
162
+
163
+ # 4.3 Ablation Studies
164
+
165
+ In this section, we will ablate our design choices for CoAtNet.
166
+
167
+ Firstly, we study the importance of the relative attention from combining convolution and attention into a single computation unit. Specifically, we compare two models, one with the relative attention and the other without, under both the ImageNet-1K alone and ImageNet-21K transfer setting. As we can see from Table 6, when only the ImageNet-1K is used, relative attention clearly outperforms the standard attention, indicating a better generalization. In addition, under the ImageNet-21K transfer setting, the relative attention variant achieves a substantially better transfer accuracy, despite their very close pre-training performances. This suggests the main advantage of relative attention in visual processing is not in higher capacity but in better generalization.
168
+
169
+ Table 6: Ablation on relative attention.
170
+
171
+ <table><tr><td>Seting</td><td>Metric</td><td>With Rel-Attn</td><td>Without Rel-Attn</td></tr><tr><td rowspan="2">ImageNet-1K</td><td>Accuracy (2242)</td><td>84.1</td><td>83.8</td></tr><tr><td>Accuracy (3842)</td><td>85.7</td><td>85.3</td></tr><tr><td rowspan="2">ImageNet-21K →ImageNet-1K</td><td>Pre-train Precision@1 (224²)</td><td>53.0</td><td>52.8</td></tr><tr><td>Finetune Accuracy (384²)</td><td>87.9</td><td>87.4</td></tr></table>
172
+
173
+ Table 7: Ablation on architecture layout.
174
+
175
+ <table><tr><td>Setting</td><td>Models</td><td>Layout</td><td>Top-1 Accuracy</td></tr><tr><td rowspan="3">ImageNet-1K</td><td>VO: CoAtNet-2</td><td>[2,2,6,14,2]</td><td>84.1</td></tr><tr><td>V1: S2← S3</td><td>[2,2, 2,18,2]</td><td>83.4</td></tr><tr><td>V2: S2→ S3</td><td>[2,2,8,12,2]</td><td>84.0</td></tr><tr><td>ImageNet-21K</td><td>VO: CoAtNet-3</td><td>[2,2,6,14,2]</td><td>53.0 -→87.6</td></tr><tr><td>⇒ImageNet-1K</td><td>V1: S2 ← S3</td><td>[2,2,2,18,2]</td><td>53.0 -→87.4</td></tr></table>
176
+
177
+ Secondly, as S2 with MBConv blocks and S3 with relative Transformer blocks occupy most of the computation of the CoAtNet, a question to ask is how to split the computation between S2 (MBConv) and S3 (Transformer) to achieve a good performance. In practice, it boils down to deciding the number of blocks to have in each stage, which we will refer to as “layout” design. For this purpose, we compare a few different layouts that we experimented with in Table 7.
178
+
179
+ Table 8: Ablation on head size and normalization type.
180
+
181
+ <table><tr><td>Setting</td><td>Models</td><td>Image Size</td><td>Top-1 Accuracy</td></tr><tr><td rowspan="3">ImageNet-1K</td><td>CoAtNet-2</td><td>2242</td><td>84.1</td></tr><tr><td>Head size: 32 → 64</td><td>2242</td><td>83.9</td></tr><tr><td>Norm type: 1 BN →LN</td><td>2242</td><td>84.1</td></tr><tr><td rowspan="2">ImageNet-21K ⇒ ImageNet-1K</td><td>CoAtNet-3</td><td>3842</td><td>87.9</td></tr><tr><td>Norm type: BN →→ LN</td><td>384²</td><td>87.8</td></tr></table>
182
+
183
+ • If we keep the total number of blocks in S2 and S3 fixed and vary the number in each stage, we observe that V0 is a sweet spot between V1 and V2. Basically, having more Transformer blocks in S3 generally leads to better performance until the number of MBConv blocks in S2 is too small to generalize well.
184
+
185
+ • To further evaluate whether the sweet spot also holds in the transfer setting, where a higher capacity is often regarded more important, we further compare V0 and V1 under the ImageNet21K transferring to ImageNet-1K setup. Interestingly, despite that V1 and V0 have the same performance during ImageNet-21K pre-training, the transfer accuracy of V1 clearly falls behind V0. Again, this suggests the importance of convolution in achieving good transferability and generalization.
186
+
187
+ Lastly, we study two choices of model details, namely the dimension of each attention (default to 32) head as well as the type of normalization (default to BatchNorm) used in MBConv blocks. From Table 8, we can see increasing head size from 32 to 64 can slightly hurt performance, though it actually improves the TPU speed by a significant amount. In practice, this will be a quality-speed trade-off one can make. On the other hand, BatchNorm and LayerNorm have almost the same performance, while BatchNorm is $10 - 2 0 \%$ faster on TPU depending on the per-core batch size.
188
+
189
+ # 5 Conclusion
190
+
191
+ In this paper, we systematically study the properties of convolutions and Transformers, which leads to a principled way to combine them into a new family of models named CoAtNet. Extensive experiments show that CoAtNet enjoys both good generalization like ConvNets and superior model capacity like Transformers, achieving state-of-the-art performances under different data sizes and computation budgets.
192
+
193
+ Note that this paper currently focuses on ImageNet classification for model development. However, we believe our approach is applicable to broader applications like object detection and semantic segmentation. We will leave them for future work.
194
+
195
+ # References
196
+
197
+ [1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097–1105, 2012.
198
+ [2] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
199
+ [3] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
200
+ [4] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015.
201
+ [5] Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. ICML, 2019.
202
+ [6] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
203
+ [7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
204
+ [8] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
205
+ [9] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803, 2018.
206
+ [10] Irwan Bello, Barret Zoph, Ashish Vaswani, Jonathon Shlens, and Quoc V Le. Attention augmented convolutional networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3286–3295, 2019.
207
+ [11] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021.
208
+ [12] Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, and Hongsheng Li. Efficient attention: Attention with linear complexities. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 3531–3539, 2021.
209
+ [13] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
210
+ [14] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A largescale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
211
+ [15] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843–852, 2017.
212
+ [16] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020.
213
+ [17] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021.
214
+ [18] Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer. arXiv preprint arXiv:2103.11886, 2021.
215
+ [19] Mingxing Tan and Quoc V Le. Efficientnetv2: Smaller models and faster training. ICML, 2021.
216
+ [20] Andrew Brock, Soham De, Samuel L Smith, and Karen Simonyan. High-performance largescale image recognition without normalization. arXiv preprint arXiv:2102.06171, 2021.
217
+ [21] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. arXiv preprint arXiv:2103.12731, 2021.
218
+ [22] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021.
219
+ [23] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. arXiv preprint arXiv:2103.15808, 2021.
220
+ [24] Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, and Matthijs Douze. Levit: a vision transformer in convnet’s clothing for faster inference. arXiv preprint arXiv:2104.01136, 2021.
221
+ [25] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021.
222
+ [26] Xiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, and Lucas Beyer. Scaling vision transformers. arXiv preprint arXiv:2106.04560, 2021.
223
+ [27] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520, 2018.
224
+ [28] Laurent Sifre. Rigid-motion scattering for image classification. Ph.D. thesis section 6.2, 2014.
225
+ [29] Mirgahney Mohamed, Gabriele Cesa, Taco S Cohen, and Max Welling. A data and compute efficient design for limited-resources deep learning. arXiv preprint arXiv:2004.09691, 2020.
226
+ [30] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018.
227
+ [31] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019.
228
+ [32] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International Conference on Machine Learning, pages 5156–5165. PMLR, 2020.
229
+ [33] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020.
230
+ [34] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019.
231
+ [35] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2820–2828, 2019.
232
+ [36] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on visual transformer. arXiv preprint arXiv:2012.12556, 2020.
233
+ [37] Salman Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir, Fahad Shahbaz Khan, and Mubarak Shah. Transformers in vision: A survey. arXiv preprint arXiv:2101.01169, 2021.
234
+ [38] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Ian Simon, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer. arXiv preprint arXiv:1809.04281, 2018.
235
+ [39] Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019.
236
+ [40] Yao-Hung Hubert Tsai, Shaojie Bai, Makoto Yamada, Louis-Philippe Morency, and Ruslan Salakhutdinov. Transformer dissection: A unified understanding of transformer’s attention via the lens of kernel. arXiv preprint arXiv:1908.11775, 2019.
237
+ [41] Irwan Bello. Lambdanetworks: Modeling long-range interactions without attention. arXiv preprint arXiv:2102.08602, 2021.
238
+ [42] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132–7141, 2018.
239
+ [43] Kun Yuan, Shaopeng Guo, Ziwei Liu, Aojun Zhou, Fengwei Yu, and Wei Wu. Incorporating convolution designs into visual transformers. arXiv preprint arXiv:2103.11816, 2021.
240
+ [44] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021.
241
+ [45] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 702–703, 2020.
242
+ [46] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
243
+ [47] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016.
244
+ [48] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016.
245
+ [49] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
246
+ [50] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016.
247
+ [51] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016.
248
+ [52] Zihang Dai, Guokun Lai, Yiming Yang, and Quoc V Le. Funnel-transformer: Filtering out sequential redundancy for efficient language processing. arXiv preprint arXiv:2006.03236, 2020.
parse/train/dUk5Foj5CLf/dUk5Foj5CLf_content_list.json ADDED
@@ -0,0 +1,1045 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CoAtNet: Marrying Convolution and Attention for All Data Sizes ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 214,
8
+ 122,
9
+ 785,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Zihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing Tan Google Research, Brain Team {zihangd,hanxiaol,qvl,tanmingxing}@google.com ",
17
+ "bbox": [
18
+ 307,
19
+ 220,
20
+ 691,
21
+ 263
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 299,
32
+ 535,
33
+ 315
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Transformers have attracted increasing interests in computer vision, but they still fall behind state-of-the-art convolutional networks. In this work, we show that while Transformers tend to have larger model capacity, their generalization can be worse than convolutional networks due to the lack of the right inductive bias. To effectively combine the strengths from both architectures, we present CoAtNets (pronounced “coat” nets), a family of hybrid models built from two key insights: (1) depthwise Convolution and self-Attention can be naturally unified via simple relative attention; (2) vertically stacking convolution layers and attention layers in a principled way is surprisingly effective in improving generalization, capacity and efficiency. Experiments show that our CoAtNets achieve state-of-the-art performance under different resource constraints across various datasets: Without extra data, CoAtNet achieves $8 6 . 0 \\%$ ImageNet top-1 accuracy; When pre-trained with 13M images from ImageNet-21K, our CoAtNet achieves $8 8 . 5 6 \\%$ top-1 accuracy, matching ViT-huge pre-trained with 300M images from JFT-300M while using $2 3 \\mathrm { x }$ less data; Notably, when we further scale up CoAtNet with JFT-3B, it achieves $9 0 . 8 8 \\%$ top-1 accuracy on ImageNet, establishing a new state-of-the-art result. ",
40
+ "bbox": [
41
+ 233,
42
+ 332,
43
+ 766,
44
+ 551
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 575,
55
+ 310,
56
+ 593
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Since the breakthrough of AlexNet [1], Convolutional Neural Networks (ConvNets) have been the dominating model architecture for computer vision [2, 3, 4, 5]. Meanwhile, with the success of self-attention models like Transformers [6] in natural language processing [7, 8], many previous works have attempted to bring in the power of attention into computer vision [9, 10, 11, 12]. More recently, Vision Transformer (ViT) [13] has shown that with almost1 only vanilla Transformer layers, one could obtain reasonable performance on ImageNet-1K [14] alone. More importantly, when pre-trained on large-scale weakly labeled JFT-300M dataset [15], ViT achieves comparable results to state-of-the-art (SOTA) ConvNets, indicating that Transformer models potentially have higher capacity at scale than ConvNets. ",
63
+ "bbox": [
64
+ 174,
65
+ 607,
66
+ 825,
67
+ 732
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "While ViT has shown impressive results with enormous JFT 300M training images, its performance still falls behind ConvNets in the low data regime. For example, without extra JFT-300M pre-training, the ImageNet accuracy of ViT is still significantly lower than ConvNets with comparable model size [5] (see Table 13). Subsequent works use special regularization and stronger data augmentation to improve the vanilla ViT [16, 17, 18], yet none of these ViT variants could outperform the SOTA convolution-only models on ImageNet classification given the same amount of data and computation [19, 20]. This suggests that vanilla Transformer layers may lack certain desirable inductive biases possessed by ConvNets, and thus require significant amount of data and computational resource to compensate. Not surprisingly, many recent works have been trying to incorporate the inductive biases of ConvNets into Transformer models, by imposing local receptive fields for attention layers [21, 22] or augmenting the attention and FFN layers with implicit or explicit convolutional operations [23, 24, 25]. However, these approaches are either ad-hoc or focused on injecting a particular property, lacking a systematic understanding of the respective roles of convolution and attention when combined. ",
74
+ "bbox": [
75
+ 174,
76
+ 738,
77
+ 826,
78
+ 877
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 174,
87
+ 90,
88
+ 825,
89
+ 147
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this work, we systematically study the problem of hybridizing convolution and attention from two fundamental aspects in machine learning – generalization and model capacity. Our study shows that convolutional layers tend to have better generalization with faster converging speed thanks to their strong prior of inductive bias, while attention layers have higher model capacity that can benefit from larger datasets. Combining convolutional and attention layers can achieve better generalization and capacity; however, a key challenge here is how to effectively combine them to achieve better trade-offs between accuracy and efficiency. In this paper, we investigate two key insights: First, we observe that the commonly used depthwise convolution can be effectively merged into attention layers with simple relative attention; Second, simply stacking convolutional and attention layers, in a proper way, could be surprisingly effective to achieve better generalization and capacity. Based on these insights, we propose a simple yet effective network architecture named CoAtNet, which enjoys the strengths from both ConvNets and Transformers. ",
96
+ "bbox": [
97
+ 174,
98
+ 154,
99
+ 825,
100
+ 319
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Our CoAtNet achieves SOTA performances under comparable resource constraints across different data sizes. Specifically, under the low-data regime, CoAtNet inherits the great generalization property of ConvNets thanks to the favorable inductive biases. Moreover, given abundant data, CoAtNet not only enjoys the superior scalability of Transformer models, but also achieves faster convergence and thus improved efficiency. When only ImageNet-1K is used for training, CoAtNet achieves $8 6 . 0 \\%$ top-1 accuracy, matching the prior art NFNet [20] under similar computation resource and training conditions. Further, when pre-trained on ImageNet-21K with about 10M images, CoAtNet reaches $8 8 . 5 6 \\%$ top-1 accuracy when finetuned on ImageNet-1K, matching the ViT-Huge pre-trained on JFT-300M, a $2 3 \\times$ larger dataset. Finally, when JFT-3B is used for pre-training, CoAtNet exhibits better efficiency compared to ViT, and pushes the ImageNet-1K top-1 accuracy to $9 0 . 8 8 \\%$ while using $1 . 5 \\mathrm { x }$ less computation of the prior art set by ViT-G/14 [26]. ",
107
+ "bbox": [
108
+ 173,
109
+ 325,
110
+ 825,
111
+ 478
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 Model ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 174,
121
+ 505,
122
+ 259,
123
+ 521
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "In the section, we focus on the question of how to “optimally” combine the convolution and transformer. Roughly speaking, we decompose the question into two parts: ",
130
+ "bbox": [
131
+ 173,
132
+ 540,
133
+ 823,
134
+ 569
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "1. How to combine the convolution and self-attention within one basic computational block? 2. How to vertically stack different types of computational blocks together to form a complete network? ",
141
+ "bbox": [
142
+ 200,
143
+ 574,
144
+ 825,
145
+ 622
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "The rationale of the decomposition will become clearer as we gradually reveal our design choices. ",
152
+ "bbox": [
153
+ 169,
154
+ 628,
155
+ 816,
156
+ 645
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 Merging Convolution and Self-Attention ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 176,
166
+ 667,
167
+ 493,
168
+ 683
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "For convolution, we mainly focus on the MBConv block [27] which employs depthwise convolution [28] to capture the spatial interaction. A key reason of this choice is that both the FFN module in Transformer and MBConv employ the design of “inverted bottleneck”, which first expands the channel size of the input by $4 \\mathbf { x }$ and later project the the $4 \\mathbf { x }$ -wide hidden state back to the original channel size to enable residual connection. ",
175
+ "bbox": [
176
+ 173,
177
+ 695,
178
+ 825,
179
+ 765
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Besides the similarity of inverted bottleneck, we also notice that both depthwise convolution and self-attention can be expressed as a per-dimension weighted sum of values in a pre-defined receptive field. Specifically, convolution relies on a fixed kernel to gather information from a local receptive field ",
186
+ "bbox": [
187
+ 173,
188
+ 771,
189
+ 825,
190
+ 827
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "equation",
196
+ "img_path": "images/6674e066791bbf528f350e89a70d47c627c6a3fb12df1f14900957b317ba58ee.jpg",
197
+ "text": "$$\ny _ { i } = \\sum _ { j \\in \\mathcal { L } ( i ) } w _ { i - j } \\odot x _ { j } \\quad \\mathrm { ( d e p t h w i s e c o n v o l u t i o n ) } ,\n$$",
198
+ "text_format": "latex",
199
+ "bbox": [
200
+ 333,
201
+ 832,
202
+ 661,
203
+ 868
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "where $x _ { i } , y _ { i } \\in \\mathbb { R } ^ { D }$ are the input and output at position $i$ respectively, and $\\mathcal { L } ( i )$ denotes a local neighborhood of $i$ , e.g., a 3x3 grid centered at $i$ in image processing. ",
210
+ "bbox": [
211
+ 174,
212
+ 882,
213
+ 823,
214
+ 912
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "In comparison, self-attention allows the receptive field to be the entire spatial locations and computes the weights based on the re-normalized pairwise similarity between the pair $( x _ { i } , x _ { j } )$ : 2 ",
221
+ "bbox": [
222
+ 169,
223
+ 90,
224
+ 823,
225
+ 119
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "equation",
231
+ "img_path": "images/a9164aac5bb6f55e0bd90b25f31a8559f39a62986021c906fcf5f7116eba58d0.jpg",
232
+ "text": "$$\ny _ { i } = \\sum _ { j \\in \\mathcal { G } } \\underbrace { \\frac { \\exp { \\left( x _ { i } ^ { \\top } x _ { j } \\right) } } { \\sum _ { k \\in \\mathcal { G } } \\exp { \\left( x _ { i } ^ { \\top } x _ { k } \\right) } } } _ { A _ { i , j } } x _ { j } \\quad \\mathrm { ( s e l f - a t t e n t i o n ) } ,\n$$",
233
+ "text_format": "latex",
234
+ "bbox": [
235
+ 333,
236
+ 128,
237
+ 663,
238
+ 188
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "where $\\mathcal { G }$ indicates the global spatial space. Before getting into the question of how to best combine them, it is worthwhile to compare their relative strengths and weaknesses, which helps to figure out the good properties we hope to retain. ",
245
+ "bbox": [
246
+ 174,
247
+ 195,
248
+ 825,
249
+ 238
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "• First of all, the depthwise convolution kernel $w _ { i - j }$ is an input-independent parameter of static value, while the attention weight $A _ { i , j }$ dynamically depends on the representation of the input. Hence, it is much easier for the self-attention to capture complicated relational interactions between different spatial positions, a property that we desire most when processing high-level concepts. However, the flexibility comes with a risk of easier overfitting, especially when data is limited. • Secondly, notice that given any position pair $( i , j )$ , the corresponding convolution weight $w _ { i - j }$ only cares about the relative shift between them, i.e. $i - j$ , rather than the specific values of $i$ or $j$ . This property is often referred to translation equivalence, which has been found to improve generalization under datasets of limited size [29]. Due to the usage of absolution positional embeddings, standard Transformer (ViT) lacks this property. This partially explains why ConvNets are usually better than Transformers when the dataset is not enormously large. • Finally, the size of the receptive field is one of the most crucial differences between self-attention and convolution. Generally speaking, a larger receptive field provides more contextual information, which could lead to higher model capacity. Hence, the global receptive field has been a key motivation to employ self-attention in vision. However, a large receptive field requires significantly more computation. In the case of global attention, the complexity is quadratic w.r.t. spatial size, which has been a fundamental trade-off in applying self-attention models. ",
256
+ "bbox": [
257
+ 173,
258
+ 242,
259
+ 826,
260
+ 486
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "table",
266
+ "img_path": "images/d75e2fc9a7e5f7449242faadd95d844ba4bb23d1ab343baa75e9dc6fb7c8645c.jpg",
267
+ "table_caption": [
268
+ "Table 1: Desirable properties found in convolution or self-attention. "
269
+ ],
270
+ "table_footnote": [],
271
+ "table_body": "<table><tr><td>Properties</td><td>Convolution</td><td>Self-Attention</td></tr><tr><td>Translation Equivariance</td><td>√</td><td></td></tr><tr><td>Input-adaptive Weighting</td><td></td><td>√</td></tr><tr><td>Global Receptive Field</td><td></td><td></td></tr></table>",
272
+ "bbox": [
273
+ 285,
274
+ 525,
275
+ 702,
276
+ 595
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "Given the comparison above, an ideal model should be able to combine the 3 desirable properties in Table 1. With the similar form of depthwise convolution in Eqn. (1) and self-attention in Eqn. (2), a straightforward idea that could achieve this is simply to sum a global static convolution kernel with the adaptive attention matrix, either after or before the Softmax normalization, i.e., ",
283
+ "bbox": [
284
+ 178,
285
+ 612,
286
+ 821,
287
+ 667
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/6ad701e539bf342fce3258bfc8889c519cd941777a414d3170d3f20d5b95a53d.jpg",
294
+ "text": "$$\ny _ { i } ^ { \\mathrm { p o s t } } = \\sum _ { j \\in \\mathcal { G } } \\left( \\frac { \\exp \\left( x _ { i } ^ { \\top } x _ { j } \\right) } { \\sum _ { k \\in \\mathcal { G } } \\exp \\left( x _ { i } ^ { \\top } x _ { k } \\right) } + w _ { i - j } \\right) x _ { j } \\ \\mathrm { ~ o r ~ } \\ y _ { i } ^ { \\mathrm { p e } } = \\sum _ { j \\in \\mathcal { G } } \\frac { \\exp \\left( x _ { i } ^ { \\top } x _ { j } + w _ { i - j } \\right) } { \\sum _ { k \\in \\mathcal { G } } \\exp \\left( x _ { i } ^ { \\top } x _ { k } + w _ { i - k } \\right) } x _ { j } .\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 181,
298
+ 676,
299
+ 800,
300
+ 720
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Interestingly, while the idea seems overly simplified, the pre-normalization version $y ^ { \\mathrm { p r e } }$ corresponds to a particular variant of relative self-attention [30, 31]. In this case, the attention weight $A _ { i , j }$ is decided jointly by the $w _ { i - j }$ of translation equivariance and the input-adaptive $x _ { i } ^ { \\top } x _ { j }$ , which can enjoy both effects depending on their relative magnitudes. Importantly, note that in order to enable the global convolution kernel without blowing up the number of parameters, we have reloaded the notation of $w _ { i - j }$ as a scalar (i.e., $w \\in \\mathbb { R } ^ { O ( | \\mathcal { G } | ) }$ ) rather than a vector in Eqn. (1). Another advantage of the scalar formulation of $w$ is that retrieving $w _ { i - j }$ for all $( i , j )$ is clearly subsumed by computing the pairwise dot-product attention, hence resulting in minimum additional cost (see Appendix A.1). Given the benefits, we will use the Transformer block with the pre-normalization relative attention variant in Eqn. (3) as the key component of the proposed CoAtNet model. ",
307
+ "bbox": [
308
+ 173,
309
+ 728,
310
+ 825,
311
+ 871
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "2.2 Vertical Layout Design ",
318
+ "text_level": 1,
319
+ "bbox": [
320
+ 174,
321
+ 92,
322
+ 372,
323
+ 106
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "After figuring out a neat way to combine convolution and attention, we next consider how to utilize it to stack an entire network. ",
330
+ "bbox": [
331
+ 173,
332
+ 118,
333
+ 823,
334
+ 146
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "As we have discuss above, the global context has a quadratic complexity w.r.t. the spatial size. Hence, if we directly apply the relative attention in Eqn. (3) to the raw image input, the computation will be excessively slow due to the large number of pixels in any image of common sizes. Hence, to construct a network that is feasible in practice, we have mainly three options: ",
341
+ "bbox": [
342
+ 173,
343
+ 152,
344
+ 825,
345
+ 209
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "(A) Perform some down-sampling to reduce the spatial size and employ the global relative attention after the feature map reaches manageable level. \n(B) Enforce local attention, which restricts the global receptive field $\\mathcal { G }$ in attention to a local field $\\mathcal { L }$ just like in convolution [22, 21]. \n(C) Replace the quadratic Softmax attention with certain linear attention variant which only has a linear complexity w.r.t. the spatial size [12, 32, 33]. ",
352
+ "bbox": [
353
+ 176,
354
+ 215,
355
+ 825,
356
+ 309
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "We briefly experimented with option (C) without getting a reasonably good result. For option (B), we found that implementing local attention involves many non-trivial shape formatting operations that requires intensive memory access. On our accelerator of choice (TPU), such operation turns out to be extremely slow [34], which not only defeats the original purpose of speeding up global attention, but also hurts the model capacity. Hence, as some recent work has studied this variant [22, 21], we will focus on option (A) and compare our results with theirs in our empirical study (Section 4). ",
363
+ "bbox": [
364
+ 173,
365
+ 315,
366
+ 825,
367
+ 398
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "For option (A), the down-sampling can be achieved by either (1) a convolution stem with aggressive stride (e.g., stride 16x16) as in ViT or (2) a multi-stage network with gradual pooling as in ConvNets. With these choices, we derive a search space of 5 variants and compare them in controlled experiments. ",
374
+ "bbox": [
375
+ 174,
376
+ 404,
377
+ 823,
378
+ 446
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "• When the ViT Stem is used, we directly stack $L$ Transformer blocks with relative attention, which we denote as $\\mathrm { V I T } _ { \\mathrm { R E L } }$ . \n• When the multi-stage layout is used, we mimic ConvNets to construct a network of 5 stages (S0, S1, S2, S3 & S4), with spatial resolution gradually decreased from S0 to S4. At the beginning of each stage, we always reduce the spatial size by $2 \\mathbf { x }$ and increase the number of channels (see Appendix A.1 for the detailed down-sampling implementation). The first stage S0 is a simple 2-layer convolutional Stem and S1 always employs MBConv blocks with squeeze-excitation (SE), as the spatial size is too large for global attention. Starting from S2 through S4, we consider either the MBConv or the Transformer block, with a constraint that convolution stages must appear before Transformer stages. The constraint is based on the prior that convolution is better at processing local patterns that are more common in early stages. This leads to 4 variants with increasingly more Transformer stages, C-C-C-C, C-C-C-T, C-C-T-T and C-T-T-T, where C and T denote Convolution and Transformer respectively. ",
385
+ "bbox": [
386
+ 171,
387
+ 453,
388
+ 825,
389
+ 642
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "To systematically study the design choices, we consider two fundamental aspects generalization capability and model capacity: For generalization, we are interested in the gap between the training loss and the evaluation accuracy. If two models have the same training loss, then the model with higher evaluation accuracy has better generalization capability, since it can generalize better to unseen evaluation dataset. Generalization capability is particularly important to data efficiency when training data size is limited. For model capacity, we measure the ability to fit large training datasets. When training data is abundant and overfitting is not an issue, the model with higher capacity will achieve better final performance after reasonable training steps. Note that, since simply increasing the model size can lead to higher model capacity, to perform a meaningful comparison, we make sure the model sizes of the 5 variants are comparable. ",
396
+ "bbox": [
397
+ 173,
398
+ 648,
399
+ 825,
400
+ 787
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "To compare the generalization and model capacity, we train different variants of hybrid models on ImageNet-1K (1.3M) and JFT $\\left( > 3 0 0 \\mathbf { M } \\right)$ dataset for 300 and 3 epochs respectively, both without any regularization or augmentation. The training loss and evaluation accuracy on both datasets are summarized in Figure 1. ",
407
+ "bbox": [
408
+ 174,
409
+ 792,
410
+ 825,
411
+ 849
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "• From the ImageNet-1K results, a key observation is that, in terms of generalization capability (i.e., gap between train and evaluation metrics), we have ",
418
+ "bbox": [
419
+ 169,
420
+ 854,
421
+ 825,
422
+ 883
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "equation",
428
+ "img_path": "images/5f09b3609b6f1eadeb4a99c8e756ab7b3480d39c7a84b75a5be78aad8ba17e00.jpg",
429
+ "text": "$$\n\\mathrm { C \\mathrm { - } C \\mathrm { - } C \\mathrm { - } C \\approx C \\mathrm { - } C \\mathrm { - } C \\mathrm { - } T \\ge C \\mathrm { - } C \\mathrm { - } T \\mathrm { - } T > C \\mathrm { - } T \\mathrm { - } T \\mathrm { - } T \\gg V \\mathrm { I } \\mathrm { T } _ { \\mathrm { R E L } } . }\n$$",
430
+ "text_format": "latex",
431
+ "bbox": [
432
+ 305,
433
+ 896,
434
+ 702,
435
+ 912
436
+ ],
437
+ "page_idx": 3
438
+ },
439
+ {
440
+ "type": "image",
441
+ "img_path": "images/8e4cc944c4e098b4c2962d8c1e585910035ad5a220c25df539ba8f057d9c47df.jpg",
442
+ "image_caption": [
443
+ "Figure 1: Comparison for model generalization and capacity under different data size. For fair comparison, all models have similar parameter size and computational cost. "
444
+ ],
445
+ "image_footnote": [],
446
+ "bbox": [
447
+ 178,
448
+ 90,
449
+ 820,
450
+ 234
451
+ ],
452
+ "page_idx": 4
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "Particularly, $\\mathrm { V I T } _ { \\mathrm { R E L } }$ is significantly worse than variants by a large margin, which we conjecture is related to the lack of proper low-level information processing in its aggressive down-sampling Stem. Among the multi-stage variants, the overall trend is that the more convolution stages the model has, the smaller the generalization gap is. ",
457
+ "bbox": [
458
+ 186,
459
+ 297,
460
+ 825,
461
+ 354
462
+ ],
463
+ "page_idx": 4
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "• As for model capacity, from the JFT comparison, both the train and evaluation metrics at the end of the training suggest the following ranking: ",
468
+ "bbox": [
469
+ 176,
470
+ 356,
471
+ 823,
472
+ 385
473
+ ],
474
+ "page_idx": 4
475
+ },
476
+ {
477
+ "type": "equation",
478
+ "img_path": "images/db72680f50180e0871b5c7bce1cdd56ab51755cadb71545f3fb276d6f9b0b410.jpg",
479
+ "text": "$$\n\\mathrm { C - C \\mathrm { - } T \\mathrm { - } T \\approx C \\mathrm { - } T \\mathrm { - } T \\mathrm { - } T > V I T _ { R E L } > C \\mathrm { - } C \\mathrm { - } C \\mathrm { - } T > C \\mathrm { - } C \\mathrm { - } C \\mathrm { - } C \\mathrm { - } C \\mathrm { . } }\n$$",
480
+ "text_format": "latex",
481
+ "bbox": [
482
+ 307,
483
+ 391,
484
+ 702,
485
+ 407
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Importantly, this suggests that simply having more Transformer blocks does NOT necessarily mean higher capacity for visual processing. On one hand, while initially worse, $\\mathrm { V I T } _ { \\mathrm { R E L } }$ ultimately catch up with the two variants with more MBConv stages, indicating the capacity advantage of Transformer blocks. On the other hand, both C-C-T-T and C-T-T-T clearly outperforming $\\mathrm { V I T } _ { \\mathrm { R E L } }$ suggest that the ViT stem with an aggressive stride may have lost too much information and hence limit the model capacity. More interestingly, the fact that C-C-T-T $\\approx \\mathbf { C }$ -T-T-T indicates the for processing low-level information, static local operations like convolution could be as capable as adaptive global attention mechanism, while saving computation and memory usage substantially. ",
492
+ "bbox": [
493
+ 186,
494
+ 415,
495
+ 825,
496
+ 526
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Finally, to decide between C-C-T-T and C-T-T-T, we conduct another transferability test3 — we finetune the two JFT pre-trained models above on ImageNet-1K for 30 epochs and compare their transfer performances. From Table 2, it turns out that C-C-T-T achieves a clearly better transfer accuracy than C-T-T-T, despite the same pre-training performance. ",
503
+ "bbox": [
504
+ 176,
505
+ 531,
506
+ 825,
507
+ 588
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "table",
513
+ "img_path": "images/c21bffeded81866fc6229e3aca114c77d365b7c6effb04ceec185d4089ddb3a2.jpg",
514
+ "table_caption": [
515
+ "Table 2: Transferability test results. "
516
+ ],
517
+ "table_footnote": [],
518
+ "table_body": "<table><tr><td>Metric</td><td>C-C-T-T</td><td>C-T-T-T</td></tr><tr><td>Pre-training Precision@1 (JFT)</td><td>34.40</td><td>34.36</td></tr><tr><td>Transfer Accuracy 224x224</td><td>82.39</td><td>81.78</td></tr><tr><td>Transfer Accuracy 384x384</td><td>84.23</td><td>84.02</td></tr></table>",
519
+ "bbox": [
520
+ 300,
521
+ 612,
522
+ 692,
523
+ 683
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Taking generalization, model capacity, transferability and efficiency into consideration, we adapt the C-C-T-T multi-stage layout for CoAtNet. More model details are included in Appendix A.1. ",
530
+ "bbox": [
531
+ 173,
532
+ 696,
533
+ 825,
534
+ 726
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "3 Related Work ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 174,
544
+ 744,
545
+ 321,
546
+ 762
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "Convolutional network building blocks. Convolutional Networks (ConvNets) have been the dominating neural architectures for many computer vision tasks. Traditionally, regular convolutions, such as ResNet blocks [3], are popular in large-scale ConvNets; in contrast, depthwise convolutions [28] are popular in mobile platforms due to its lower computational cost and smaller parameter size [27]. Recent works show that an improved inverted residual bottlenecks (MBConv [27, 35]), which is built upon depthwise convolutions, can achieve both high accuracy and better efficiency [5, 19]. As discussed in Section 2, due to the strong connection between MBConv and Transformer blocks , this paper mostly employs MBConv as convolution building blocks. ",
553
+ "bbox": [
554
+ 173,
555
+ 775,
556
+ 826,
557
+ 887
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Self-attention and Transformers. With the key ingredients of self-attention, Transformers have been widely adopted for neural language processing and speech understanding. As an early work, stand-alone self-attention network [34] shows self-attention alone can work well for different vision tasks, though with some practical difficulties. Recently, ViT [13] applies a vanilla Transformer to ImageNet classification, and achieves impressive results after pre-training on a large-scale JFT dataset. However, ViT still largely lags behind state-of-the-art ConvNets when training data is limited. Following that, many recent works have been focused on improving vision Transformers for data efficiency and model efficiency. For a more comprehensive review of vision Transformers, we refer readers to the dedicated surveys [36, 37]. ",
564
+ "bbox": [
565
+ 174,
566
+ 90,
567
+ 825,
568
+ 215
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "Relative attention. Under the general name of relative attention, there have been various variants in literature [30, 38, 39, 34, 40, 31]. Generally speaking, we can separate them into two categories: (a) the input-dependent version where the extra relative attention score is a function of the input states $f ( \\bar { x } _ { i } , x _ { j } , \\bar { i } - j )$ , and (b) the input-independent version $f ( i - j )$ . The variant in CoAtNet belongs to the input-independent version, and is similar to the one used in T5 [31], but unlike T5, we neither share the relative attention parameters across layers nor use the bucketing mechanism. As a benefit of the input independence, obtaining $f ( i - j )$ for all $( i , j )$ pairs is computationally much cheaper than the input-dependent version on TPU. In addition, at inference time, this only needs to be computed once and cached for future use. A recent work [22] also utilizes such an input-independent parameterization, but it restricts the receptive field to a local window. ",
575
+ "bbox": [
576
+ 173,
577
+ 229,
578
+ 825,
579
+ 368
580
+ ],
581
+ "page_idx": 5
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "Combining convolution and self-attention. The idea of combining convolution and self-attention for vision recognition is not new. A common approach is to augment the ConvNet backbone with explicit self-attention or non-local modules [9, 10, 11, 12], or to replace certain convolution layers with standard self-attention [11] or a more flexible mix of linear attention and convolution [41]. While self-attention usually improves the accuracy, they often come with extra computational cost and hence are often regarded as an add-on to the ConvNets, similar to squeeze-and-excitation [42] module. In comparison, after the success of ViT and ResNet-ViT [13], another popular line of research starts with a Transformer backbone and tries to incorporate explicit convolution or some desirable properties of convolution into the Transformer backbone [25, 24, 23, 22, 21, 43, 44]. ",
586
+ "bbox": [
587
+ 174,
588
+ 382,
589
+ 825,
590
+ 507
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "While our work also belongs to this category, we show that our relative attention instantiation is a natural mixture of depthwise convolution and content-based attention with minimum additional cost. More importantly, starting from the perspectives of generalization and model capacity, we take a systematic approach to the vertical layout design and show how and why different network stages prefer different types of layers. Therefore, compared to models that simply use an off-the-shelf ConvNet as the stem layer, such as ResNet-ViT [13], CoAtNet also scales the Convolution stage (S2) when the overall size increases. On the other hand, compared to models employing local attention [22, 21], CoAtNet consistently uses full attention for S3 & S4 to ensure the model capacity, as S3 occupies the majority of the computation and parameters. ",
597
+ "bbox": [
598
+ 174,
599
+ 513,
600
+ 825,
601
+ 638
602
+ ],
603
+ "page_idx": 5
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "4 Experiments ",
608
+ "text_level": 1,
609
+ "bbox": [
610
+ 174,
611
+ 657,
612
+ 312,
613
+ 674
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "In this section, we compare CoAtNet with previous results under comparable settings. For completeness, all the hyper-parameters not mentioned here are included in Appendix A.2. ",
620
+ "bbox": [
621
+ 174,
622
+ 688,
623
+ 823,
624
+ 717
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "4.1 Experiment Setting ",
631
+ "text_level": 1,
632
+ "bbox": [
633
+ 174,
634
+ 732,
635
+ 348,
636
+ 747
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "CoAtNet model family. To compare with existing models of different sizes, we also design a family of CoAtNet models as summarized in Table 3. Overall, we always double the number of channels from S1 to S4, while ensuring the width of the Stem S0 to be smaller or equal to that of S1. Also, for simplicity, when increasing the depth of the network, we only scale the number of blocks in S2 and S3. ",
643
+ "bbox": [
644
+ 174,
645
+ 757,
646
+ 825,
647
+ 827
648
+ ],
649
+ "page_idx": 5
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "Evaluation Protocol. Our experiments focus on image classification. To evaluate the performance of the model across different data sizes, we utilize three datasets of increasingly larger sizes, namely ImageNet-1K (1.28M images), ImageNet-21K (12.7M images) and JFT (300M images). Following previous works, we first pre-train our models on each of the three datasets at resolution 224 for 300, 90 and 14 epochs respectively. Then, we finetune the pre-trained models on ImageNet-1K at the desired resolutions for 30 epochs and obtain the corresponding evaluation accuracy. One exception is the ImageNet-1K performance at resolution 224, which can be directly obtained at the end of pre-training. Note that similar to other models utilizing Transformer blocks, directly evaluating models pre-trained on ImageNet-1K at a larger resolution without finetuning usually leads to performance drop. Hence, finetuning is always employed whenever input resolution changes. ",
654
+ "bbox": [
655
+ 174,
656
+ 842,
657
+ 823,
658
+ 911
659
+ ],
660
+ "page_idx": 5
661
+ },
662
+ {
663
+ "type": "table",
664
+ "img_path": "images/84f510eacc36a4509902c6b3ea9d4f6ed24dfc3c9e12f559c758703dee925573.jpg",
665
+ "table_caption": [
666
+ "Table 3: L denotes the number of blocks and D denotes the hidden dimension (#channels). For all Conv and MBConv blocks, we always use the kernel size 3. For all Transformer blocks, we set the size of each attention head to 32, following [22]. The expansion rate for the inverted bottleneck is always 4 and the expansion (shrink) rate for the SE is always 0.25. "
667
+ ],
668
+ "table_footnote": [],
669
+ "table_body": "<table><tr><td> Stages</td><td>Size</td><td>CoAtNet-0</td><td></td><td>CoAtNet-1</td><td>CoAtNet-2</td><td></td><td>CoAtNet-3</td><td>CoAtNet-4</td></tr><tr><td>S0-Conv</td><td>1/2</td><td>L=2 D=64</td><td>L=2</td><td>D=64</td><td>L=2</td><td>D=128 L=2</td><td>D=192</td><td>L=2 D=192</td></tr><tr><td>S1-MbConv</td><td>1/4</td><td>L=2 D=96</td><td>L=2</td><td>D=96</td><td>L=2 D=128</td><td>L=2</td><td>D=192</td><td>L=2 D=192</td></tr><tr><td>S2-MBConv</td><td>1/8</td><td>L=3 D=192</td><td>L=6</td><td>D=192</td><td>L=6 D=256</td><td>L=6</td><td>D=384</td><td>L=12 D=384</td></tr><tr><td>S3-TFMRel</td><td>1/16</td><td>L=5 D=384</td><td>L=14</td><td>D=384</td><td>L=14 D=512</td><td>L=14</td><td>D=768</td><td>L=28 D=768</td></tr><tr><td>S4-TFMRel</td><td>1/32</td><td>L=2 D=768</td><td>L=2</td><td>D=768</td><td>L=2 D=1024</td><td>L=2</td><td>D=1536</td><td>L=2 D=1536</td></tr></table>",
670
+ "bbox": [
671
+ 173,
672
+ 154,
673
+ 826,
674
+ 244
675
+ ],
676
+ "page_idx": 6
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "",
681
+ "bbox": [
682
+ 173,
683
+ 261,
684
+ 826,
685
+ 332
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "Data Augmentation & Regularization. In this work, we only consider two widely used data augmentations, namely RandAugment [45] and MixUp [46], and three common techniques, including stochastic depth [47], label smoothing [48] and weight decay [49], to regularize the model. Intuitively, the specific hyper-parameters of the augmentation and regularization methods depend on model size and data scale, where strong regularization is usually applied for larger models and smaller dataset. ",
692
+ "bbox": [
693
+ 174,
694
+ 347,
695
+ 825,
696
+ 416
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "Under the general principle, a complication under the current paradigm is how to adjust the regularization for pre-training and finetuning as data size can change. Specifically, we have an interesting observation that if a certain type of augmentation is entirely disabled during pre-training, simply turning it on during fine-tuning would most likely harm the performance rather than improving. We conjecture this could be related to data distribution shift. As a result, for certain runs of the proposed model, we deliberately apply RandAugment and stochastic depth of a small degree when pre-training on the two larger datasets, ImageNet21-K and JFT. Although such regularization can harm the pre-training metrics, this allows more versatile regularization and augmentation during finetuning, leading to improved down-stream performances. ",
703
+ "bbox": [
704
+ 173,
705
+ 422,
706
+ 826,
707
+ 547
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "4.2 Main Results ",
714
+ "text_level": 1,
715
+ "bbox": [
716
+ 174,
717
+ 565,
718
+ 305,
719
+ 579
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "image",
725
+ "img_path": "images/cf1567b93b834a38bb5d149ee37f969799ca7bcd6b3f63af756a7cd673e8c469.jpg",
726
+ "image_caption": [
727
+ "Figure 2: Accuracy-to-FLOPs scaling curve under ImageNet-1K only setting at $2 2 4 \\mathbf { x } 2 2 4$ . "
728
+ ],
729
+ "image_footnote": [],
730
+ "bbox": [
731
+ 179,
732
+ 601,
733
+ 478,
734
+ 785
735
+ ],
736
+ "page_idx": 6
737
+ },
738
+ {
739
+ "type": "image",
740
+ "img_path": "images/f8c09d4a039db4e8c22000a3a3a66bae5de7e541a68ec3f2c6a6234546bf4ac2.jpg",
741
+ "image_caption": [
742
+ "Figure 3: Accuracy-to-Params scaling curve under ImageNet- $2 1 \\mathrm { K } \\Rightarrow$ ImageNet-1K setting. "
743
+ ],
744
+ "image_footnote": [],
745
+ "bbox": [
746
+ 513,
747
+ 602,
748
+ 813,
749
+ 785
750
+ ],
751
+ "page_idx": 6
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "ImageNet-1K The experiment results with only the ImageNet-1K dataset are shown in Table 4. Under similar conditions, the proposed CoAtNet models not only outperform ViT variants, but also match the best convolution-only architectures, i.e., EfficientNet-V2 and NFNets. Additionally, we also visualize the all results at resolution $2 2 4 \\mathbf { x } 2 2 4$ in Fig. 2. As we can see, CoAtNet scales much better than previous model with attention modules. ",
756
+ "bbox": [
757
+ 174,
758
+ 842,
759
+ 825,
760
+ 911
761
+ ],
762
+ "page_idx": 6
763
+ },
764
+ {
765
+ "type": "table",
766
+ "img_path": "images/07c0ff9e9c5c785f3c33e97ba94f2023e40f027155a317dec4e0af0e0e53d4b3.jpg",
767
+ "table_caption": [
768
+ "Table 4: Model performance on ImageNet. 1K only denotes training on ImageNet-1K only; $2 1 \\mathtt { K } + 1 \\mathtt { K }$ denotes pre-training on ImageNet-21K and finetuning on ImageNet-1K; PT-RA denotes applying RandAugment during 21K pre-training, and E150 means 150 epochs of 21K pre-training, which is longer than the standard 90 epochs. More results are in Appendix A.3. "
769
+ ],
770
+ "table_footnote": [],
771
+ "table_body": "<table><tr><td colspan=\"2\">Models</td><td>Eval Size</td><td>#Params</td><td>#FLOPs</td><td colspan=\"2\">ImageNet Top-1 Accuracy</td></tr><tr><td rowspan=\"5\">Conv Only</td><td></td><td></td><td></td><td></td><td>1K only</td><td>21K+1K</td></tr><tr><td>EfficientNet-B7</td><td>600²</td><td>66M</td><td>37B</td><td>84.7</td><td>-</td></tr><tr><td>EfficientNetV2-L</td><td>480²</td><td>121M</td><td>53B</td><td>85.7</td><td>86.8</td></tr><tr><td>NFNet-F3</td><td>4162²</td><td>255M</td><td>114.8B</td><td>85.7</td><td>=</td></tr><tr><td>NFNet-F5</td><td>5442</td><td>377M</td><td>289.8B</td><td>86.0</td><td>1</td></tr><tr><td rowspan=\"4\">ViT-Stem TFM</td><td>DeiT-B</td><td>3842</td><td>86M</td><td>55.4B</td><td>83.1</td><td>-</td></tr><tr><td>ViT-L/16</td><td>384²</td><td>304M</td><td>190.7B</td><td>-</td><td>85.3</td></tr><tr><td>CaiT-S-36</td><td>384²</td><td>68M</td><td>48.0B</td><td>85.0</td><td></td></tr><tr><td>DeepViT-L</td><td>224²</td><td>55M</td><td>12.5B</td><td>83.1</td><td>-</td></tr><tr><td rowspan=\"2\">Multi-stage TFM</td><td>Swin-B</td><td>384²</td><td>88M</td><td>47.0B</td><td>84.2</td><td>86.0</td></tr><tr><td>Swin-L</td><td>384²</td><td>197M</td><td>103.9B</td><td>-</td><td>86.4</td></tr><tr><td rowspan=\"5\">Conv+TFM</td><td>BotNet-T7</td><td>3842</td><td>75.1M</td><td>45.8B</td><td>84.7</td><td>-</td></tr><tr><td>LambdaResNet-420</td><td>320²</td><td>-</td><td>=</td><td>84.8</td><td></td></tr><tr><td>T2T-ViT-24</td><td>224²</td><td>64.1M</td><td>15.0B</td><td>82.6</td><td>=</td></tr><tr><td>CvT-21</td><td>384²</td><td>32M</td><td>24.9B</td><td>83.3</td><td>-</td></tr><tr><td>CvT-W24</td><td>3842</td><td>277M</td><td>193.2B</td><td>-</td><td>87.7</td></tr><tr><td rowspan=\"19\">Conv+TFM (ours)</td><td>CoAtNet-0 CoAtNet-1</td><td>224²</td><td>25M</td><td>4.2B</td><td>81.6</td><td>=</td></tr><tr><td></td><td>224²</td><td>42M</td><td>8.4B</td><td>83.3</td><td>-</td></tr><tr><td>CoAtNet-2 CoAtNet-3</td><td>224²</td><td>75M</td><td>15.7B</td><td>84.1</td><td>87.1</td></tr><tr><td></td><td>2242</td><td>168M</td><td>34.7B</td><td>84.5</td><td>87.6</td></tr><tr><td>CoAtNet-0</td><td>384²</td><td>25M</td><td>13.4B</td><td>83.9</td><td>-</td></tr><tr><td>CoAtNet-1</td><td>3842</td><td>42M</td><td>27.4B</td><td>85.1</td><td>-</td></tr><tr><td>CoAtNet-2</td><td>384²</td><td>75M</td><td>49.8B</td><td>85.7</td><td>87.1</td></tr><tr><td>CoAtNet-3</td><td>384²</td><td>168M</td><td>107.4B</td><td>85.8</td><td>87.6</td></tr><tr><td>CoAtNet-4</td><td>384²</td><td>275M</td><td>189.5B</td><td>-</td><td>87.9</td></tr><tr><td>+ PT-RA</td><td>384²</td><td>275M</td><td>189.5B</td><td></td><td>88.3</td></tr><tr><td>+ PT-RA-E150</td><td>3842</td><td>275M</td><td>189.5B</td><td></td><td>88.4</td></tr><tr><td>CoAtNet-2</td><td>5122</td><td>75M</td><td>96.7B</td><td>85.9</td><td>87.3</td></tr><tr><td>CoAtNet-3</td><td>512²</td><td>168M</td><td>203.1B</td><td>86.0</td><td>87.9</td></tr><tr><td>CoAtNet-4</td><td>512²</td><td>275M</td><td>360.9B</td><td>-</td><td>88.1</td></tr><tr><td>+ PT-RA</td><td>512²</td><td>275M</td><td>360.9B</td><td>=</td><td>88.4</td></tr><tr><td>+ PT-RA-E150</td><td>5122</td><td>275M</td><td>360.9B</td><td>=</td><td>88.56</td></tr></table>",
772
+ "bbox": [
773
+ 171,
774
+ 140,
775
+ 843,
776
+ 645
777
+ ],
778
+ "page_idx": 7
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "ImageNet-21K As we can see from Table 4 and Fig. 3, when ImageNet-21K is used for pretraining, the advantage of CoAtNet becomes more obvious, substantially outperforming all previous models. Notably, the best CoAtNet variant achieves a top-1 accuracy of $8 8 . 5 6 \\%$ , matching the ViTH/14 performance of $8 8 . 5 5 \\%$ , which requires pre-training the $2 . 3 \\mathbf { x }$ larger ViT model on a $2 3 \\mathrm { x }$ larger proprietary weakly labeled dataset (JFT) for $2 . 2 \\mathbf { x }$ more steps. This marks a dramatic improvement in both data efficiency and computation efficiency. ",
783
+ "bbox": [
784
+ 174,
785
+ 681,
786
+ 826,
787
+ 766
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "JFT Finally, in Table 5, we further evaluate CoAtNet under the large-scale data regime with JFT300M and JFT-3B. Encouragingly, our CoAtNet-4 can almost match the best previous performance with JFT-300M set by NFNet- $\\mathrm { F 4 + }$ , while being $2 \\mathbf { x }$ more efficient in terms of both TPU training time and parameter count. When we scale up the model to consume similar training resource as NFNet- $. \\mathrm { F 4 + }$ , CoAtNet-5 reaches $8 9 . 7 7 \\%$ on top-1 accuracy, outperforming previous results under comparable settings. ",
794
+ "bbox": [
795
+ 174,
796
+ 792,
797
+ 825,
798
+ 877
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Moreover, as we further push the training resource towards the level used by ViT-G/14 and utilize the same JFT-3B dataset of an even larger size [26], with over $4 \\mathbf { x }$ less computation, CoAtNet-6 is able to match the performance of $\\mathrm { V i T - G } / 1 4$ of $9 0 . 4 5 \\%$ , and with $1 . 5 \\mathrm { x }$ less computation, CoAtNet-7 achieves $8 9 . 7 7 \\%$ on top-1 accuracy $9 0 . 8 8 \\%$ , achieving the new state-of-the-art performance. ",
805
+ "bbox": [
806
+ 174,
807
+ 883,
808
+ 821,
809
+ 911
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "table",
815
+ "img_path": "images/4da8c9ad6e7a2eb2d4e66c521d47f928929362333fe2c47dcf4ccbd3f89040eb.jpg",
816
+ "table_caption": [
817
+ "Table 5: Performance Comparison on large-scale JFT dataset. TPUv3-core-days denotes the pretraining time, Top-1 Accuracy denotes the finetuned accuracy on ImageNet. Note that the last 3 rows use a larger dataset JFT-3B [26] for pre-training, while others use JFT-300M [15]. See Appendix A.2 for the size details of CoAtNet-5/6/7. †: Down-sampling in the MBConv block is achieved by stride-2 Depthwise Convolution. ⇧: ViT-G/14 computation consumption is read from Fig. 1 of the paper [26]. "
818
+ ],
819
+ "table_footnote": [],
820
+ "table_body": "<table><tr><td>Models</td><td>Eval Size</td><td>#Params</td><td>#FLOPs</td><td>TPUv3-core-days</td><td>Top-1 Accuracy</td></tr><tr><td>ResNet + ViT-L/16</td><td>3842</td><td>330M</td><td>=</td><td>1</td><td>87.12</td></tr><tr><td>ViT-L/16</td><td>5122</td><td>307M</td><td>364B</td><td>0.68K</td><td>87.76</td></tr><tr><td>ViT-H/14</td><td>5182</td><td>632M</td><td>1021B</td><td>2.5K</td><td>88.55</td></tr><tr><td>NFNet-F4+</td><td>5122</td><td>527M</td><td>367B</td><td>1.86K</td><td>89.2</td></tr><tr><td>CoAtNet-3t</td><td>3842</td><td>168M</td><td>114B</td><td>0.58K</td><td>88.52</td></tr><tr><td>CoAtNet-3t</td><td>5122</td><td>168M</td><td>214B</td><td>0.58K</td><td>88.81</td></tr><tr><td>CoAtNet-4</td><td>5122</td><td>275M</td><td>361B</td><td>0.95K</td><td>89.11</td></tr><tr><td>CoAtNet-5</td><td>5122</td><td>688M</td><td>812B</td><td>1.82K</td><td>89.77</td></tr><tr><td>ViT-G/14</td><td>5182</td><td>1.84B</td><td>5160B</td><td>&gt;30K</td><td>90.45</td></tr><tr><td>CoAtNet-6</td><td>5122</td><td>1.47B</td><td>1521B</td><td>6.6K</td><td>90.45</td></tr><tr><td>CoAtNet-7</td><td>5122</td><td>2.44B</td><td>2586B</td><td>20.1K</td><td>90.88</td></tr></table>",
821
+ "bbox": [
822
+ 173,
823
+ 156,
824
+ 834,
825
+ 358
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "",
832
+ "bbox": [
833
+ 174,
834
+ 372,
835
+ 823,
836
+ 401
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "4.3 Ablation Studies ",
843
+ "text_level": 1,
844
+ "bbox": [
845
+ 174,
846
+ 416,
847
+ 328,
848
+ 431
849
+ ],
850
+ "page_idx": 8
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "In this section, we will ablate our design choices for CoAtNet. ",
855
+ "bbox": [
856
+ 174,
857
+ 441,
858
+ 581,
859
+ 457
860
+ ],
861
+ "page_idx": 8
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "Firstly, we study the importance of the relative attention from combining convolution and attention into a single computation unit. Specifically, we compare two models, one with the relative attention and the other without, under both the ImageNet-1K alone and ImageNet-21K transfer setting. As we can see from Table 6, when only the ImageNet-1K is used, relative attention clearly outperforms the standard attention, indicating a better generalization. In addition, under the ImageNet-21K transfer setting, the relative attention variant achieves a substantially better transfer accuracy, despite their very close pre-training performances. This suggests the main advantage of relative attention in visual processing is not in higher capacity but in better generalization. ",
866
+ "bbox": [
867
+ 173,
868
+ 462,
869
+ 825,
870
+ 574
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "table",
876
+ "img_path": "images/00ceb486f1a8197ca19a9f75354b351e896ee887a8c0a4bb90f5cf09fdd07a32.jpg",
877
+ "table_caption": [
878
+ "Table 6: Ablation on relative attention. "
879
+ ],
880
+ "table_footnote": [],
881
+ "table_body": "<table><tr><td>Seting</td><td>Metric</td><td>With Rel-Attn</td><td>Without Rel-Attn</td></tr><tr><td rowspan=\"2\">ImageNet-1K</td><td>Accuracy (2242)</td><td>84.1</td><td>83.8</td></tr><tr><td>Accuracy (3842)</td><td>85.7</td><td>85.3</td></tr><tr><td rowspan=\"2\">ImageNet-21K →ImageNet-1K</td><td>Pre-train Precision@1 (224²)</td><td>53.0</td><td>52.8</td></tr><tr><td>Finetune Accuracy (384²)</td><td>87.9</td><td>87.4</td></tr></table>",
882
+ "bbox": [
883
+ 192,
884
+ 597,
885
+ 800,
886
+ 691
887
+ ],
888
+ "page_idx": 8
889
+ },
890
+ {
891
+ "type": "table",
892
+ "img_path": "images/06fc157c275539a26e5cec13a54703dca4447c0c9a577af5fa97836a983d1abe.jpg",
893
+ "table_caption": [
894
+ "Table 7: Ablation on architecture layout. "
895
+ ],
896
+ "table_footnote": [],
897
+ "table_body": "<table><tr><td>Setting</td><td>Models</td><td>Layout</td><td>Top-1 Accuracy</td></tr><tr><td rowspan=\"3\">ImageNet-1K</td><td>VO: CoAtNet-2</td><td>[2,2,6,14,2]</td><td>84.1</td></tr><tr><td>V1: S2← S3</td><td>[2,2, 2,18,2]</td><td>83.4</td></tr><tr><td>V2: S2→ S3</td><td>[2,2,8,12,2]</td><td>84.0</td></tr><tr><td>ImageNet-21K</td><td>VO: CoAtNet-3</td><td>[2,2,6,14,2]</td><td>53.0 -→87.6</td></tr><tr><td>⇒ImageNet-1K</td><td>V1: S2 ← S3</td><td>[2,2,2,18,2]</td><td>53.0 -→87.4</td></tr></table>",
898
+ "bbox": [
899
+ 227,
900
+ 723,
901
+ 766,
902
+ 828
903
+ ],
904
+ "page_idx": 8
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "Secondly, as S2 with MBConv blocks and S3 with relative Transformer blocks occupy most of the computation of the CoAtNet, a question to ask is how to split the computation between S2 (MBConv) and S3 (Transformer) to achieve a good performance. In practice, it boils down to deciding the number of blocks to have in each stage, which we will refer to as “layout” design. For this purpose, we compare a few different layouts that we experimented with in Table 7. ",
909
+ "bbox": [
910
+ 174,
911
+ 842,
912
+ 826,
913
+ 911
914
+ ],
915
+ "page_idx": 8
916
+ },
917
+ {
918
+ "type": "table",
919
+ "img_path": "images/622bb1939958732b44fe6505260003f83b893fe0388e4f1de344e047e3c173b0.jpg",
920
+ "table_caption": [
921
+ "Table 8: Ablation on head size and normalization type. "
922
+ ],
923
+ "table_footnote": [],
924
+ "table_body": "<table><tr><td>Setting</td><td>Models</td><td>Image Size</td><td>Top-1 Accuracy</td></tr><tr><td rowspan=\"3\">ImageNet-1K</td><td>CoAtNet-2</td><td>2242</td><td>84.1</td></tr><tr><td>Head size: 32 → 64</td><td>2242</td><td>83.9</td></tr><tr><td>Norm type: 1 BN →LN</td><td>2242</td><td>84.1</td></tr><tr><td rowspan=\"2\">ImageNet-21K ⇒ ImageNet-1K</td><td>CoAtNet-3</td><td>3842</td><td>87.9</td></tr><tr><td>Norm type: BN →→ LN</td><td>384²</td><td>87.8</td></tr></table>",
925
+ "bbox": [
926
+ 225,
927
+ 99,
928
+ 767,
929
+ 208
930
+ ],
931
+ "page_idx": 9
932
+ },
933
+ {
934
+ "type": "text",
935
+ "text": "• If we keep the total number of blocks in S2 and S3 fixed and vary the number in each stage, we observe that V0 is a sweet spot between V1 and V2. Basically, having more Transformer blocks in S3 generally leads to better performance until the number of MBConv blocks in S2 is too small to generalize well. ",
936
+ "bbox": [
937
+ 174,
938
+ 233,
939
+ 823,
940
+ 289
941
+ ],
942
+ "page_idx": 9
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "• To further evaluate whether the sweet spot also holds in the transfer setting, where a higher capacity is often regarded more important, we further compare V0 and V1 under the ImageNet21K transferring to ImageNet-1K setup. Interestingly, despite that V1 and V0 have the same performance during ImageNet-21K pre-training, the transfer accuracy of V1 clearly falls behind V0. Again, this suggests the importance of convolution in achieving good transferability and generalization. ",
947
+ "bbox": [
948
+ 173,
949
+ 291,
950
+ 825,
951
+ 373
952
+ ],
953
+ "page_idx": 9
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Lastly, we study two choices of model details, namely the dimension of each attention (default to 32) head as well as the type of normalization (default to BatchNorm) used in MBConv blocks. From Table 8, we can see increasing head size from 32 to 64 can slightly hurt performance, though it actually improves the TPU speed by a significant amount. In practice, this will be a quality-speed trade-off one can make. On the other hand, BatchNorm and LayerNorm have almost the same performance, while BatchNorm is $10 - 2 0 \\%$ faster on TPU depending on the per-core batch size. ",
958
+ "bbox": [
959
+ 174,
960
+ 381,
961
+ 825,
962
+ 463
963
+ ],
964
+ "page_idx": 9
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "5 Conclusion ",
969
+ "text_level": 1,
970
+ "bbox": [
971
+ 174,
972
+ 483,
973
+ 299,
974
+ 500
975
+ ],
976
+ "page_idx": 9
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "In this paper, we systematically study the properties of convolutions and Transformers, which leads to a principled way to combine them into a new family of models named CoAtNet. Extensive experiments show that CoAtNet enjoys both good generalization like ConvNets and superior model capacity like Transformers, achieving state-of-the-art performances under different data sizes and computation budgets. ",
981
+ "bbox": [
982
+ 174,
983
+ 513,
984
+ 825,
985
+ 583
986
+ ],
987
+ "page_idx": 9
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "Note that this paper currently focuses on ImageNet classification for model development. However, we believe our approach is applicable to broader applications like object detection and semantic segmentation. We will leave them for future work. ",
992
+ "bbox": [
993
+ 174,
994
+ 590,
995
+ 823,
996
+ 632
997
+ ],
998
+ "page_idx": 9
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "References ",
1003
+ "text_level": 1,
1004
+ "bbox": [
1005
+ 174,
1006
+ 90,
1007
+ 266,
1008
+ 106
1009
+ ],
1010
+ "page_idx": 10
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "[1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097–1105, 2012. \n[2] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. \n[3] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. \n[4] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015. \n[5] Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. ICML, 2019. \n[6] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. \n[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. \n[8] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. \n[9] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803, 2018. \n[10] Irwan Bello, Barret Zoph, Ashish Vaswani, Jonathon Shlens, and Quoc V Le. Attention augmented convolutional networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3286–3295, 2019. \n[11] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021. \n[12] Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, and Hongsheng Li. Efficient attention: Attention with linear complexities. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 3531–3539, 2021. \n[13] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. \n[14] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A largescale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009. \n[15] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843–852, 2017. \n[16] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. \n[17] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021. \n[18] Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer. arXiv preprint arXiv:2103.11886, 2021. \n[19] Mingxing Tan and Quoc V Le. Efficientnetv2: Smaller models and faster training. ICML, 2021. \n[20] Andrew Brock, Soham De, Samuel L Smith, and Karen Simonyan. High-performance largescale image recognition without normalization. arXiv preprint arXiv:2102.06171, 2021. \n[21] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. arXiv preprint arXiv:2103.12731, 2021. \n[22] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. \n[23] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. arXiv preprint arXiv:2103.15808, 2021. \n[24] Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, and Matthijs Douze. Levit: a vision transformer in convnet’s clothing for faster inference. arXiv preprint arXiv:2104.01136, 2021. \n[25] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021. \n[26] Xiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, and Lucas Beyer. Scaling vision transformers. arXiv preprint arXiv:2106.04560, 2021. \n[27] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520, 2018. \n[28] Laurent Sifre. Rigid-motion scattering for image classification. Ph.D. thesis section 6.2, 2014. \n[29] Mirgahney Mohamed, Gabriele Cesa, Taco S Cohen, and Max Welling. A data and compute efficient design for limited-resources deep learning. arXiv preprint arXiv:2004.09691, 2020. \n[30] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018. \n[31] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019. \n[32] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International Conference on Machine Learning, pages 5156–5165. PMLR, 2020. \n[33] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020. \n[34] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019. \n[35] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2820–2828, 2019. \n[36] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on visual transformer. arXiv preprint arXiv:2012.12556, 2020. \n[37] Salman Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir, Fahad Shahbaz Khan, and Mubarak Shah. Transformers in vision: A survey. arXiv preprint arXiv:2101.01169, 2021. \n[38] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Ian Simon, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer. arXiv preprint arXiv:1809.04281, 2018. \n[39] Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019. \n[40] Yao-Hung Hubert Tsai, Shaojie Bai, Makoto Yamada, Louis-Philippe Morency, and Ruslan Salakhutdinov. Transformer dissection: A unified understanding of transformer’s attention via the lens of kernel. arXiv preprint arXiv:1908.11775, 2019. \n[41] Irwan Bello. Lambdanetworks: Modeling long-range interactions without attention. arXiv preprint arXiv:2102.08602, 2021. \n[42] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132–7141, 2018. \n[43] Kun Yuan, Shaopeng Guo, Ziwei Liu, Aojun Zhou, Fengwei Yu, and Wei Wu. Incorporating convolution designs into visual transformers. arXiv preprint arXiv:2103.11816, 2021. \n[44] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. \n[45] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 702–703, 2020. \n[46] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. \n[47] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016. \n[48] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016. \n[49] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. \n[50] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016. \n[51] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. \n[52] Zihang Dai, Guokun Lai, Yiming Yang, and Quoc V Le. Funnel-transformer: Filtering out sequential redundancy for efficient language processing. arXiv preprint arXiv:2006.03236, 2020. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 119,
1018
+ 828,
1019
+ 914
1020
+ ],
1021
+ "page_idx": 10
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "",
1026
+ "bbox": [
1027
+ 171,
1028
+ 45,
1029
+ 828,
1030
+ 917
1031
+ ],
1032
+ "page_idx": 11
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "",
1037
+ "bbox": [
1038
+ 171,
1039
+ 85,
1040
+ 828,
1041
+ 631
1042
+ ],
1043
+ "page_idx": 12
1044
+ }
1045
+ ]
parse/train/dUk5Foj5CLf/dUk5Foj5CLf_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/dUk5Foj5CLf/dUk5Foj5CLf_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r6cNUjS8cm0/r6cNUjS8cm0.md ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Closing the Gap: Tighter Analysis of Alternating Stochastic Gradient Methods for Bilevel Problems
2
+
3
+ Tianyi Chen Rensselaer Polytechnic Institute chentianyi $1 9 @$ gmail.com
4
+
5
+ Yuejiao Sun
6
+ UCLA
7
+ sunyj@math.ucla.edu
8
+
9
+ Wotao Yin UCLA wotaoyin@math.ucla.edu
10
+
11
+ # Abstract
12
+
13
+ Stochastic nested optimization, including stochastic bilevel, min-max, and compositional optimization, is gaining popularity in many machine learning applications. While the three problems share a nested structure, existing works often treat them separately, thus developing problem-specific algorithms and analyses. Among various exciting developments, simple SGD-type updates (potentially on multiple variables) are still prevalent in solving this class of nested problems, but they are believed to have a slower convergence rate than non-nested problems. This paper unifies several SGD-type updates for stochastic nested problems into a single SGD approach that we term ALternating Stochastic gradient dEscenT (ALSET) method. By leveraging the hidden smoothness of the problem, this paper presents a tighter analysis of ALSET for stochastic nested problems. Under the new analysis, to achieve an $\epsilon$ -stationary point of the nested problem, it requires $\mathcal { O } ( \epsilon ^ { - 2 } )$ samples in total. Under certain regularity conditions, applying our results to stochastic compositional, min-max, and reinforcement learning problems either improves or matches the best-known sample complexity in the respective cases. Our results explain why simple SGD-type algorithms in stochastic nested problems all work very well in practice without the need for further modifications.
14
+
15
+ # 1 Introduction
16
+
17
+ Stochastic gradient descent (SGD) methods [1] are prevalent in solving large-scale machine learning problems. Often, SGD is applied to solve stochastic problems with a relatively simple structure. Specifically, applying SGD to minimize the function $\mathbb { E } _ { \xi } ^ { - } \left[ f ( x ; \xi ) \right]$ over the variable $x \in \mathbb { R } ^ { d }$ , we have the iterative update $\boldsymbol { x } ^ { k + 1 } = \boldsymbol { x } ^ { k } - \alpha \nabla f ( x ^ { k } ; \xi ^ { k } )$ , where $\alpha > 0$ is the stepsize and $\nabla f ( x ^ { k } ; \xi ^ { k } )$ is the stochastic gradient at the iterate $x ^ { k }$ and the sample $\xi ^ { k }$ . However, many problems in machine learning today, such as meta learning, deep learning, hyper-parameter optimization, and reinforcement learning, go beyond the above simple minimization structure (termed the non-nested problem thereafter). For example, the objective function may be the compositions of multiple functions, where each composition may introduce an additional expectation [2]; and, the objective function may depend on the solution of another optimization problem [3]. In these problems, how to apply SGD and the efficiency of running SGD are not fully understood.
18
+
19
+ To answer these questions, in this paper, we consider the following form of stochastic nested optimization problems, which is a generalization of the non-nested problems, given by
20
+
21
+ $$
22
+ \begin{array} { r l } { \underset { x \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } } & { F ( x ) : = \mathbb { E } _ { \xi } \left[ f \left( x , y ^ { * } ( x ) ; \xi \right) \right] } \\ { \mathrm { s . t . ~ } } & { y ^ { * } ( x ) = \underset { y \in \mathbb { R } ^ { d ^ { \prime } } } { \operatorname { a r g m i n } } \ \mathbb { E } _ { \phi } [ g ( x , y ; \phi ) ] } \end{array}
23
+ $$
24
+
25
+ where $f$ and $g$ are differentiable functions; and, $\xi$ and $\phi$ are random variables. In the optimization literature [4–6], the problem (1) is referred to as the stochastic bilevel problem, where the upper-level optimization problem depends on the solution of the lower-level optimization over $y \in \mathbb { R } ^ { d ^ { \prime } }$ , denoted as $y ^ { \ast } ( x )$ , which depends on the value of upper-level variable $\boldsymbol { x } \in \mathbb { R } ^ { d }$ .
26
+
27
+ The stochastic bilevel nested problem (1) encompasses two popular formulations with the nested structure: stochastic min-max problems and stochastic compositional problems. Therefore, results on the general nested problem (1) will also imply the results in the special cases. For example, if the lower-level objective $g$ is the negative of the upper-level objective $f$ , i.e., $g ( x , y ; \phi ) : = - \bar { f } ( x , y ; \xi )$ , the stochastic bilevel problem (1) reduces to the stochastic min-max problem
28
+
29
+ $$
30
+ \operatorname { I f } g ( x , y ; \phi ) : = - f ( x , y ; \xi ) \quad \Rightarrow \quad \operatorname* { m i n } _ { x \in \mathbb { R } ^ { d } } F ( x ) : = \operatorname* { m a x } _ { y \in \mathbb { R } ^ { d ^ { \prime } } } \mathbb { E } _ { \xi } \left[ f ( x , y ; \xi ) \right] .
31
+ $$
32
+
33
+ Motivated by applications in zero-sum games, adversarial learning and training GANs, significant efforts have been recently made for solving the stochastic min-max problem; see e.g., [7–11].
34
+
35
+ For example, if the upper-level objective $f$ is only a function of $y$ , i.e., $f ( x , y ; \xi ) : = f ( y ; \xi )$ , and the lower-level objective $g$ is a quadratic function of $y$ , i.e., $g ( x , y ; \phi ) : = \| y - h ( x ; \phi ) \| ^ { 2 }$ with a smooth function $h$ of $x$ , then the variable $y ^ { * } ( x )$ admits a closed-form solution, and thus the stochastic bilevel problem (1) reduces to the stochastic compositional problem [12–14]
36
+
37
+ $$
38
+ \mathrm { I f } \ g ( x , y ; \phi ) : = \| y - h ( x ; \phi ) \| ^ { 2 } \quad \Rightarrow \quad \operatorname* { m i n } _ { x \in \mathbb { R } ^ { d } } \ F ( x ) : = \mathbb { E } _ { \xi } \left[ f \big ( \mathbb { E } _ { \phi } [ h ( x ; \phi ) ] ; \xi \big ) \right] .
39
+ $$
40
+
41
+ Stochastic compositional problems in the form of (3) have been studied in the applications in model-agnostic meta learning and policy evaluation in reinforcement learning; see e.g., [2, 15].
42
+
43
+ To solve the nested problem (1) by SGD, one natural solution is to apply alternating SGD updates on $x$ and $y$ based on their stochastic gradients
44
+
45
+ $$
46
+ y ^ { k + 1 } = y ^ { k } - \beta _ { k } h _ { g } ^ { k } ~ \mathrm { a n d } ~ x ^ { k + 1 } = x ^ { k } - \alpha _ { k } h _ { f } ^ { k }
47
+ $$
48
+
49
+ where $h _ { g } ^ { k }$ is the unbiased stochastic gradient of $\mathbb { E } _ { \phi } [ g ( x ^ { k } , y ^ { k } ; \phi ) ]$ and $h _ { f } ^ { k }$ is the (possibly biased) stochastic gradient of $F ( x ^ { k } )$ ; and, $\beta _ { k }$ and $\alpha _ { k }$ are the stepsizes. A key challenge of running (4) for the nested problem is that (stochastic) gradient of the upper-level variable $x$ is prohibitively expensive to compute. As we will show later, computing an unbiased stochastic gradient of $F ( x )$ requires solving the lower-level problem exactly to obtain $y ^ { * } ( x )$ .
50
+
51
+ An accurate stochastic gradient $h _ { f } ^ { k }$ can be obtained in roughly three ways. One way is to run SGD updates on $y ^ { k }$ multiple times before updating $x ^ { k }$ , which yields a double-loop algorithm. To guarantee convergence, it typically requires either the increasing number of lower-level $y$ -update or the growing number of batch size to estimate $h _ { g } ^ { k }$ ; see e.g., [16, 17]. The second way is to update $y ^ { k }$ in a timescale faster than that of $x ^ { k }$ so that $x ^ { k }$ is relatively static with respect to $y ^ { k }$ ; i.e., $\scriptstyle \operatorname* { l i m } _ { k \to \infty } \alpha _ { k } / \beta _ { k } = 0$ ; see e.g., [18]. The third way is to modify the direction $h _ { g } ^ { k }$ of $y ^ { k }$ by incorporating additional correction term, which adds extra computation burden; see e.g., [19]. At a high level, these modifications either deviate from the lightweight implementation of SGD or sacrifice the sample complexity of SGD.
52
+
53
+ To this end, the main goal of this paper is to study the efficiency of running the vanilla alternating SGD (4) for the nested problem (1) and its implications on the special problem classes (2)-(3).
54
+
55
+ # 1.1 Main results
56
+
57
+ This paper analyzes a unifying algorithm for the stochastic bilevel problems that runs SGD on each variable alternatingly. We provide sample complexity that matches the complexity of SGD for single-level stochastic problems. Our results explain why SGD-type algorithms in stochastic bilevel, min-max, and compositional problems work very well in practice without modifications, including correction, increasing batch size, and two-timescale stepsizes.
58
+
59
+ In the context of existing methods, our contributions can be summarized as follows.
60
+
61
+ C1) We connect three different classes of stochastic nested optimization problems (stochastic compositional, min-max, and bilevel optimization), and unify three popular SGD-type updates for the respective problems into a single SGD-type method. We call it the ALternating Stochastic gradient dEscenT (ALSET) method.
62
+
63
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>ALSET</td><td rowspan=1 colspan=1>BSA</td><td rowspan=1 colspan=1>TTSA</td><td rowspan=1 colspan=1>stocBiO</td><td rowspan=1 colspan=1>STABLE</td><td rowspan=1 colspan=1>SUSTAIN/RSVRB</td></tr><tr><td rowspan=1 colspan=1>batch size</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(c-1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td></tr><tr><td rowspan=1 colspan=1>y-update</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>O(c-))SGD steps</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>correction</td><td rowspan=1 colspan=1>momentum</td></tr><tr><td rowspan=1 colspan=1> samples in gsamples in</td><td rowspan=1 colspan=1>(5∈-2)(-2)</td><td rowspan=1 colspan=1>(k-2)(-3)</td><td rowspan=1 colspan=1>O(KPe-(P-</td><td rowspan=1 colspan=1>(5∈-2)(-2)</td><td rowspan=1 colspan=1>O(KPe-2)O(KPe-2)</td><td rowspan=1 colspan=1>O(KP-2)(P</td></tr></table>
64
+
65
+ Table 1: Sample complexity of stochastic bilevel algorithms (BSA in [16], TTSA in [18], stocBiO in [17], STABLE in [19], SUSTAIN in [25], RSVRB in [26]) to achieve an $\epsilon$ -stationary point of $F ( x )$ ; the notation $\widetilde { \mathcal { O } } ( \cdot )$ hides the terms of $\log \epsilon ^ { - 1 }$ ; the notation $\kappa ^ { p }$ denotes a polynomial function of $\kappa$ since the dependence on $\kappa$ is not explicit in [18, 19, 25, 26].
66
+
67
+ C2) Under the same assumptions made in most of the previous work, we discover that the solution of the lower-level problem is smooth – a property that is overlooked by the previous analyses. By leveraging the hidden smoothness, we present a tighter analysis of ALSET for the stochastic bilevel problems. Under the new analysis, to achieve an $\epsilon$ -stationary point of the nested problem, ALSET requires $\mathcal { O } ( \epsilon ^ { - 2 } )$ samples in total, rather than the $\mathcal { O } \dot { ( \epsilon ^ { - 5 / 2 } ) }$ sample complexity in the existing literature.
68
+ C3) We further customize the analysis to the two special cases – the compositional and min-max problems, and establish the improved sample complexity relative to that in the literature. We apply a new analysis to the celebrated actor-critic method for reinforcement learning problems. Under some regularity conditions, we show that, to achieve an $\epsilon$ -stationary point, the single-loop actor-critic method requires $\mathcal { O } ( \epsilon ^ { - 2 } )$ samples with i.i.d. sampling, which improves the best-known result of $\mathcal { O } ( \epsilon ^ { - 5 / 2 } )$ in the literature.
69
+
70
+ # 1.2 Other related works
71
+
72
+ To put our work in context, we review prior art that we group in the following three categories.
73
+
74
+ Stochastic bilevel optimization. We can trace the study of bilevel optimization to the 1950s [20]. Many recent efforts have been made to solve the bilevel problems. One successful approach is to reformulate the bilevel problem as a single-level problem by replacing the lower-level problem by its optimality conditions [4, 5]. Recently, gradient-based methods for bilevel optimization have gained popularity. They iteratively approximate the (stochastic) gradient of the upper-level problem either in a forward or backward manner [21, 3, 22, 23]. Recent work has also studied the case where the lower-level problem does not have a unique solution [24].
75
+
76
+ The non-asymptotic analysis of bilevel optimization algorithms has been recently studied in some pioneering works, e.g., [16, 18, 17], just to name a few. In both [16, 17], bilevel stochastic optimization algorithms have been developed that run in a double-loop manner. To achieve an $\epsilon$ -stationary point, they only need the sample complexities $\mathcal { O } ( \epsilon ^ { - 3 } )$ and $\mathcal { O } ( \epsilon ^ { - 2 } )$ , respectively, comparable to that of SGD for the single-level case. Recently, a single-loop two-timescale stochastic approximation algorithm has been developed in [18] for the bilevel problem (1). Due to the nature of the two-timescale update, it incurs the sub-optimal sample complexity $\mathcal { O } ( \epsilon ^ { - 5 / 2 } )$ . A single-loop single-timescale stochastic bilevel optimization method has been recently developed in [19]. While the method can achieve the sample complexity $\mathcal { O } ( \epsilon ^ { - 2 } )$ , the resultant update on $y$ needs extra matrix projection, which can be costly. Very recently, the momentum-based acceleration has been incorporated into both the $x$ - and $y$ -updates in [25, 26] and also in [27] after our submission to the conference, where the new algorithms therein enjoy an improved sample complexity $\mathcal { O } ( \epsilon ^ { - 3 / 2 } )$ . However, these results cannot imply the $\mathcal { O } ( \epsilon ^ { - 2 } )$ sample complexity of the alternating SGD update (4), and are orthogonal to our results. A comparison of our results with prior work can be found in Table 1.
77
+
78
+ Stochastic min-max optimization. In the context of min-max problems, the alternating version of the stochastic gradient descent ascent (GDA) method can be viewed as the alternating SGD updates (4) for the special nested problem (2). To mitigate the cycling behavior of GDA for convex-concave min-max problems, several variants have been developed by incorporating the idea of optimism; see e.g., [7, 8, 11, 29]. The analysis of stochastic GDA in the nonconvex-strongly concave setting is closely related to this paper; e.g., [9, 10, 30, 28]. Specifically, for stochastic GDA (SGDA), the $\mathcal { O } ( \epsilon ^ { - 2 } )$ sample complexity has been established in [28] under an increasing batch size $\mathcal { O } ( \epsilon ^ { - 1 } )$ . As highlighted in [28], how to achieve the $\mathcal { O } ( \epsilon ^ { - 2 } )$ sample complexity under an $\mathcal { O } ( 1 )$ constant batch size remains open. The reduction of our results to the min-max setting will provide an answer to this open question. In the same setting, accelerated GDA algorithms have been developed in [31–33]. Going beyond the one-side concave settings, algorithms and their convergence analysis have been studied for nonconvex-nonconcave min-max problems with certain benign structure; see e.g., [8, 34–36]. A comparison of our results with prior work can be found in Table 2.
79
+
80
+ Stochastic compositional optimization. Stochastic compositional gradient algorithms developed in [12, 37] can be viewed as the alternating SGD updates (4) for the special compositional problem (3). However, to ensure convergence, the algorithms [12, 37] use two sequences of variables being updated in two different time scales, and thus the complexity of [12] and [37] is worse than $\mathcal { O } ( \epsilon ^ { - 2 } )$ of SGD for the non-compositional case. While most of existing algorithms rely on either two-timescale updates, the single-timescale single-loop approaches have been recently developed in [14, 38, 39], which achieve the sample complexity $\bar { \mathcal { O } } \bar { ( } \epsilon ^ { - 2 } \bar { ) }$ , same as SGD for the non-nested problems. However, the algorithms proposed therein are not the vanilla alternating SGD update in the sense of (4). Other related compositional algorithms also include [40–42]. A comparison can be found in Table 3.
81
+
82
+ Organization. The basic background of bilevel optimization is reviewed, and the tighter analysis of the unifying ALSET method is presented in Section 2. The reduction of the main results to the special stochastic nested problems is provided in Section 3, and its applications to the actor-critic method are discussed in Section 4, followed by the conclusions in Section 5.
83
+
84
+ # 2 Improved Analysis of Alternating Stochastic Gradient Method
85
+
86
+ In this section, we will first provide background of bilevel problems and then introduce ALSET for stochastic nested problems.
87
+
88
+ # 2.1 Preliminaries
89
+
90
+ We use $\| \cdot \|$ to denote the $\ell _ { 2 }$ norm for vectors and Frobenius norm for matrices. For convenience, we define the deterministic functions as $g ( x , y ) : = \mathbb { E } _ { \phi } [ g ( x , y ; \phi ) ]$ and $f ( x , y ) : = \mathbb { E } _ { \xi } [ f ( x , y ; \xi ) ]$ .
91
+
92
+ We also define $\nabla _ { y y } ^ { 2 } g \big ( x , y \big )$ as the Hessian matrix of $g$ with respect to $y$ and define $\nabla _ { x y } ^ { 2 } g \left( x , y \right)$ as
93
+
94
+ $$
95
+ \nabla _ { x y } ^ { 2 } g ( x , y ) : = \left[ \begin{array} { l l l } { \frac { \partial ^ { 2 } } { \partial x _ { 1 } \partial y _ { 1 } } g ( x , y ) } & { \cdot \cdot \cdot } & { \frac { \partial ^ { 2 } } { \partial x _ { 1 } \partial y _ { d ^ { \prime } } } g ( x , y ) } \\ & { \cdot \cdot \cdot } \\ { \frac { \partial ^ { 2 } } { \partial x _ { d } \partial y _ { 1 } } g ( x , y ) } & { \cdot \cdot \cdot } & { \frac { \partial ^ { 2 } } { \partial x _ { d } \partial y _ { d ^ { \prime } } } g ( x , y ) } \end{array} \right] .
96
+ $$
97
+
98
+ We make the following assumptions, which are common in the bilevel optimization literature [16– 18, 26].
99
+
100
+ Assumption 1 (Lipschitz continuity). Assume that $f , \nabla f , \nabla g , \nabla ^ { 2 } g$ are respectively $\ell _ { f , 0 } .$ , $\ell _ { f , 1 } , \ell _ { g , 1 } , \ell _ { g , 2 }$ -Lipschitz continuous; that is, for $z _ { 1 } : = [ x _ { 1 } ; y _ { 1 } ]$ , $z _ { 2 } : = [ x _ { 2 } ; y _ { 2 } ]$ , we have $\parallel f ( x _ { 1 } , y _ { 1 } ) -$ $\begin{array} { r c l } { f ( x _ { 2 } , y _ { 2 } ) \| ^ { - } \le } & { \ell _ { f , 0 } \| z _ { 1 } - z _ { 2 } \| , \| \nabla f ( x _ { 1 } , y _ { 1 } ) - \nabla f ( x _ { 2 } , y _ { 2 } ) \| } & { \le } & { \ell _ { f , 1 } \| z _ { 1 } - x _ { 2 } \| , } \end{array}$ $\nabla g ( x _ { 2 } , y _ { 2 } ) \| \leq \ell _ { g , 1 } \| z _ { 1 } - z _ { 2 } \|$ , $\begin{array} { r } { \| \nabla ^ { 2 } g ( x _ { 1 } , y _ { 1 } ) - \nabla ^ { 2 } g ( x _ { 2 } , y _ { 2 } ) \| \le \ell _ { g , 2 } \| z _ { 1 } - z _ { 2 } \| . } \end{array}$ .
101
+
102
+ Assumption 2 (Strong convexity of $g$ in $y$ ). For any fixed $x$ , $g ( x , y )$ is $\mu _ { g }$ -strongly convex in $y$
103
+
104
+ Assumptions 1 and 2 together ensure that the first- and second-order derivations of $f ( x , y ) , g ( x , y )$ as well as the solution mapping $y ^ { \ast } ( x )$ , are well-behaved. Define the condition number $\kappa : = \ell _ { g , 1 } / \mu _ { g }$
105
+
106
+ Assumption 3 (Stochastic derivatives). The stochastic derivatives $\nabla f ( x , y ; \xi )$ , $\nabla g ( x , y ; \phi )$ , $\nabla ^ { 2 } g ( x , \mathbf { \bar { y } } , \phi )$ are unbiased estimators of $\nabla f ( x , y )$ , $\nabla g ( x , y )$ , $\nabla ^ { 2 } g ( x , y )$ , respectively; and their variances are bounded by $\sigma _ { f } ^ { 2 } , \sigma _ { g , 1 } ^ { 2 }$ , $\sigma _ { g , 2 } ^ { 2 }$ , respectively.
107
+
108
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>ALSET</td><td rowspan=1 colspan=1>SCGD</td><td rowspan=1 colspan=1>NASA</td></tr><tr><td rowspan=1 colspan=1>batch size</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(1)</td></tr><tr><td rowspan=1 colspan=1>y-update</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>correction</td></tr><tr><td rowspan=1 colspan=1>samples</td><td rowspan=1 colspan=1>O(c-²)</td><td rowspan=1 colspan=1>0(c-4)</td><td rowspan=1 colspan=1>O(c-2)</td></tr></table>
109
+
110
+ Table 2: Sample complexity of stochastic minmax algorithms (BSA in [16], GDA in [28], SMD in [9]) to achieve an $\epsilon$ -stationary point of $F ( x )$ .
111
+
112
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>ALSET</td><td rowspan=1 colspan=1>SGDA</td><td rowspan=1 colspan=1>SMD</td></tr><tr><td rowspan=1 colspan=1>batch size</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0(e-1)</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>y-update</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>subproblem</td></tr><tr><td rowspan=1 colspan=1>samples</td><td rowspan=1 colspan=1>O(kc-2)</td><td rowspan=1 colspan=1>O(κ³-²)</td><td rowspan=1 colspan=1>O(k³-2)</td></tr></table>
113
+
114
+ Table 3: Sample complexity of stochastic compositional algorithms (SCGD in [12], NASA in [14]) to achieve an $\epsilon$ -stationary point of $F ( x )$ .
115
+
116
+ Assumptions 2 and 3 together imply that the second moments are bounded by
117
+
118
+ $$
119
+ \begin{array} { r l } & { \mathbb { E } _ { \xi } [ \| \nabla f ( x , y ; \xi ) \| ^ { 2 } ] \le \ell _ { f , 0 } ^ { 2 } + \sigma _ { f } ^ { 2 } : = C _ { f } ^ { 2 } } \\ & { \mathbb { E } _ { \phi } [ \| \nabla ^ { 2 } g ( x , y ; \phi ) \| ^ { 2 } ] \le \ell _ { g , 1 } ^ { 2 } + \sigma _ { g , 2 } ^ { 2 } : = C _ { g } ^ { 2 } . } \end{array}
120
+ $$
121
+
122
+ Assumption 3 is the counterpart of the unbiasedness and bounded variance assumption in the singlelevel stochastic optimization. In addition, the bounded moments in Assumption 3 ensure the Lipschitz continuity of the upper-level gradient $\nabla F ( x )$ .
123
+
124
+ We first highlight the inherent challenge of directly applying the alternating SGD method to the bilevel problem (1). To illustrate this point, we derive the gradient of the upper-level function $F ( x )$ in the next proposition; see the proof in the supplementary document.
125
+
126
+ Proposition 1. Under Assumptions $_ { I - 3 }$ , we have the gradients
127
+
128
+ $$
129
+ \begin{array} { r } { \nabla F ( x ) = \nabla _ { x } f ( x , y ^ { * } ( x ) ) - \nabla _ { x y } ^ { 2 } g ( x , y ^ { * } ( x ) ) \left[ \nabla _ { y y } ^ { 2 } g ( x , y ^ { * } ( x ) ) \right] ^ { - 1 } \nabla _ { y } f ( x , y ^ { * } ( x ) ) . } \end{array}
130
+ $$
131
+
132
+ urthermore, $\nabla F ( x )$ and $y ^ { * } ( x )$ are Lipschitz continuous with constants $L _ { F } , L _ { y }$ , respectively.
133
+
134
+ Notice that obtaining an unbiased stochastic estimate of $\nabla F ( x )$ and applying SGD on $x$ face two main difficulties: i) the gradient $\nabla F ( x )$ at $x$ depends on the minimizer of the lower-level problem $y ^ { \ast } ( x )$ ; ii) even if $y ^ { * } ( x )$ is known, it is hard to apply the stochastic approximation to obtain an unbiased estimate of $\dot { \nabla } F ( { \boldsymbol { x } } )$ since $\nabla F ( x )$ is nonlinear in $\nabla _ { y y } ^ { 2 } g ( x , y ^ { * } ( x ) )$ .
135
+
136
+ Similar to some existing stochastic bilevel algorithms [16, 18, 17], we evaluate $\nabla F ( x )$ on a certain vector $y$ in place of $y ^ { * } ( x )$ . Replacing the $y ^ { * } ( x )$ in definition (6) by $y$ , we define
137
+
138
+ $$
139
+ \overline { { \nabla } } _ { x } f \big ( x , y \big ) : = \nabla _ { x } f \big ( x , y \big ) - \nabla _ { x y } ^ { 2 } g \big ( x , y \big ) \left[ \nabla _ { y y } ^ { 2 } g \big ( x , y \big ) \right] ^ { - 1 } \nabla _ { y } f \big ( x , y \big ) .
140
+ $$
141
+
142
+ And to reduce the bias in (7), we estimate $\left[ \nabla _ { y y } ^ { 2 } g ( x , y ) \right] ^ { - 1 }$ via
143
+
144
+ $$
145
+ \left[ \nabla _ { y y } ^ { 2 } g ( x , y ) \right] ^ { - 1 } \approx \Big [ \frac { N } { \ell _ { g , 1 } } \prod _ { n = 1 } ^ { N ^ { \prime } } \Big ( I - \frac { 1 } { \ell _ { g , 1 } } \nabla _ { y y } ^ { 2 } g ( x , y ; \phi _ { ( n ) } ) \Big ) \Big ]
146
+ $$
147
+
148
+ where $N ^ { \prime }$ is drawn from $\{ 1 , 2 , \ldots , N \}$ uniformly at random and $\{ \phi ^ { ( 1 ) } , \dots , \phi ^ { ( N ^ { \prime } ) } \}$ are i.i.d. samples. It has been shown in [16] that using (8), the estimation bias of $\left[ \nabla _ { y y } ^ { 2 } g ( x , y ) \right] ^ { - 1 }$ exponentially decreases with the number of samples $N$ .
149
+
150
+ # 2.2 Main results: Tighter analysis of ALSET
151
+
152
+ In this subsection, we first describe the general ALSET algorithm for the stochastic bilevel problem, and then present its new convergence result.
153
+
154
+ This algorithm is very simple to implement. At each iteration $k$ , ALSET alternates between the stochastic gradient update on $y ^ { k }$ and that on $x ^ { k }$ . Although it is possible that $T = 1$ , for generality, we run $T$ steps of SGD on
155
+
156
+ # Algorithm 1 ALSET for the stochastic bilevel problem (1)
157
+
158
+ 1: initialize: $x ^ { 0 } , y ^ { 0 }$ , stepsizes $\{ \alpha _ { k } , \beta _ { k } \}$ .
159
+ 2: for $k = 0 , 1 , \ldots , K - 1$ do
160
+ 3: for $t = 0 , 1 , \dots , T - 1$ do
161
+ 4: update $y ^ { k , t + 1 } = y ^ { k , t } - \beta _ { k } h _ { g } ^ { k , t }$ . set $y ^ { k , 0 } = y ^ { k }$
162
+ 5: end for
163
+ 6: update $x ^ { k + 1 } = x ^ { k } - \alpha _ { k } h _ { f } ^ { k } \qquad \Join$
164
+ 7: end for
165
+
166
+ the lower-level variable $y ^ { k }$ before updating upper-level variable $x ^ { k }$ . With $\alpha _ { k }$ and $\beta _ { k }$ denoting the stepsizes of $x ^ { k }$ and $y ^ { k }$ that decrease at the same rate as SGD, the ALSET update is
167
+
168
+ $$
169
+ \begin{array} { r l } & { y ^ { k , t + 1 } = y ^ { k , t } - \beta _ { k } h _ { g } ^ { k , t } , t = 0 , \ldots , T \quad \mathrm { w i t h } y ^ { k , 0 } : = y ^ { k } ; y ^ { k + 1 } : = y ^ { k , T } } \\ & { x ^ { k + 1 } = x ^ { k } - \alpha _ { k } h _ { f } ^ { k } } \end{array}
170
+ $$
171
+
172
+ where the update direction of $y$ is the stochastic gradient $h _ { g } ^ { k , t } : = \nabla _ { y } g ( x ^ { k } , y ^ { k , t } ; \phi ^ { k , t } )$ ; and, with the Hessian inverse estimator (8), the update direction of $x$ is the slightly biased gradient
173
+
174
+ $$
175
+ \begin{array} { r l } & { \boldsymbol { h } _ { f } ^ { k } : = \nabla _ { \boldsymbol { x } } f ( \boldsymbol { x } ^ { k } , \boldsymbol { y } ^ { k + 1 } ; \boldsymbol { \xi } ^ { k } ) } \\ & { \qquad - \nabla _ { \boldsymbol { x } \boldsymbol { y } } ^ { 2 } g ( \boldsymbol { x } ^ { k } , \boldsymbol { y } ; \phi _ { ( 0 ) } ^ { k } ) \Bigl [ \frac { N } { \ell _ { g , 1 } } \displaystyle \prod _ { n = 1 } ^ { N ^ { \prime } } \left( I - \frac { 1 } { \ell _ { g , 1 } } \nabla _ { \boldsymbol { y } \boldsymbol { y } } ^ { 2 } g ( \boldsymbol { x } ^ { k } , \boldsymbol { y } ^ { k + 1 } ; \phi _ { ( n ) } ^ { k } ) \right) \Bigr ] \nabla _ { \boldsymbol { y } } f ( \boldsymbol { x } ^ { k } , \boldsymbol { y } ^ { k + 1 } ; \boldsymbol { \xi } ^ { k } ) . } \end{array}
176
+ $$
177
+
178
+ The alternating update (9) serves as a template for running SGD on stochastic nested problems. As we will show in the subsequent sections, we can generate stochastic algorithms for min-max, compositional, and even reinforcement learning problems following (9) as a template, but they differ in the particular forms of the stochastic gradients $h _ { g } ^ { k } , h _ { f } ^ { k }$ for the specific upper- and lower-level objective functions. See Algorithm 1 for a summary of ALSET for the bilevel problem.
179
+
180
+ Comparison between ALSET with existing works. Readers who are familiar with recent developments on stochastic optimization for bilevel problems may readily recognize the similarities between the general ALSET update (1) that we will analyze and the SGD-based updates in BSA [16], TTSA [18] and stocBiO [17]. However, the update (1) is different from BSA in that the number of $y$ -update, denoted as $T$ , is a constant in (1) that does not grow with the accuracy $\epsilon ^ { - 1 }$ ; the update (1) is different from stocBiO in that the stochastic gradient $h _ { g } ^ { k , \bar { t } }$ used in the $y$ -update (9a) is obtained by a fixed batch size that does not depend on the accuracy $\epsilon ^ { - 1 }$ ; and, the update (1) is different from TTSA in that the stepsizes $\alpha _ { k }$ and $\beta _ { k }$ in (9) decrease at the same timescale.
181
+
182
+ We next present the convergence result of ALSET.
183
+
184
+ Theorem 1 (Bilevel problems). Suppose Assumptions $_ { I - 3 }$ hold. Define the constants as
185
+
186
+ $$
187
+ \bar { \alpha } _ { 1 } = \frac { 1 } { 2 L _ { F } + 4 L _ { f } L _ { y } + \frac { 2 L _ { f } L _ { y x } } { L _ { y } \eta } } , \bar { \alpha } _ { 2 } = \frac { 1 6 T \mu _ { g } \ell _ { g , 1 } } { ( \mu _ { g } + \ell _ { g , 1 } ) ^ { 2 } ( 8 L _ { f } L _ { y } + 2 \eta L _ { y x } \tilde { C } _ { f } ^ { 2 } \bar { \alpha } _ { 1 } ) }
188
+ $$
189
+
190
+ where $\eta > 0$ is a control constant that will be specified in each special case to achieve the best sample complexity. With $\alpha > 0$ being a control constant that will be specified later, choose the stepsizes as
191
+
192
+ $$
193
+ \alpha _ { k } = \operatorname* { m i n } \left\{ \bar { \alpha } _ { 1 } , \bar { \alpha } _ { 2 } , \frac { \alpha } { \sqrt { K } } \right\} \mathrm { a n d } \beta _ { k } = \frac { 8 L _ { f } L _ { y } + 2 \eta L _ { y x } \tilde { C } _ { f } ^ { 2 } \bar { \alpha } _ { 1 } } { 4 T \mu _ { g } } \alpha _ { k } .
194
+ $$
195
+
196
+ For any $T \geq 1$ and $N = \mathcal { O } ( \log K )$ , the iterates $\{ x ^ { k } , y ^ { k } \}$ generated by Algorithm $I$ satisfy
197
+
198
+ $$
199
+ \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbb { E } \left[ \left. \nabla F ( x ^ { k } ) \right. ^ { 2 } \right] = \mathcal { O } \Big ( \frac { 1 } { \sqrt { K } } \Big ) \ \mathrm { ~ a n d ~ } \ \mathbb { E } \left[ \left. y ^ { K } - y ^ { * } ( x ^ { K } ) \right. ^ { 2 } \right] = \mathcal { O } \Big ( \frac { 1 } { \sqrt { K } } \Big )
200
+ $$
201
+
202
+ where $y ^ { * } ( x ^ { K } )$ is the minimizer of the lower-level problem in (1b).
203
+
204
+ Proposition 2. Under the same assumptions and the choice of parameters of Theorem $^ { l }$ , with $\begin{array} { r } { \kappa : = { \frac { \ell _ { g , 1 } } { \mu _ { g } } } } \end{array}$ \`g,1µg being the condition number, select α = Θ(κ−5/2), T = Θ(κ4), η = O(κ) in (12), and then
205
+
206
+ $$
207
+ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } [ \| \nabla F ( x ^ { k } ) \| ^ { 2 } ] = \mathcal { O } \left( \frac { \kappa ^ { 3 } } { K } + \frac { \kappa ^ { \frac { 5 } { 2 } } } { \sqrt { K } } \right) .
208
+ $$
209
+
210
+ Discussion of Theorem 1. To achieve $\epsilon$ -stationary point, we need $K = \mathcal { O } ( \kappa ^ { 5 } \epsilon ^ { - 2 } )$ , and the number of evaluations of $h _ { f } ^ { k } , h _ { g } ^ { k , t }$ are $\mathcal { O } ( \kappa ^ { 5 } \epsilon ^ { - 2 } )$ and $\mathcal { O } ( \kappa ^ { 9 } \epsilon ^ { - 2 } )$ , respectively. Therefore, the sample complexity is on the same order of SGD’s sample complexity for the single-level nonconvex problems [43], and improves the state-of-the-art single-loop TTSA’s sample complexity $\mathcal { O } ( \epsilon ^ { - 5 / 2 } )$ [18]. Compared to [17], ALSET achieves the same sample complexity in terms of both $\epsilon$ and $\kappa$ , without using a growing batch size. Importantly, we obtain this tighter bound without introducing additional assumptions.
211
+
212
+ # 2.3 Proof sketch
213
+
214
+ In this subsection, we highlight the key steps of the proof towards Theorem 1, and highlight the differences between our analysis and the existing ones.
215
+
216
+ For simplicity, we define the following Lyapunov function as $\begin{array} { r } { \mathbb { V } ^ { k } : = F ( x ^ { k } ) + \frac { L _ { f } } { L _ { y } } \| y ^ { k } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } . } \end{array}$ We first quantify the difference between two Lyapunov functions as
217
+
218
+ $$
219
+ \mathbb { V } ^ { k + 1 } - \mathbb { V } ^ { k } = \underbrace { F ( x ^ { k + 1 } ) - F ( x ^ { k } ) } _ { \mathrm { L e m m a ~ 1 } } + \ \frac { L _ { f } } { L _ { y } } ( \| y ^ { k + 1 } - y ^ { * } ( x ^ { k + 1 } ) \| ^ { 2 } - \| y ^ { k } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ) .
220
+ $$
221
+
222
+ The difference in (15) consists of two difference terms: the first term quantifies the descent of the overall objective functions; the second term characterizes the descent of the lower-level errors.
223
+
224
+ We will first analyze the descent of the upper-level objective in the next lemma.
225
+
226
+ Lemma 1 (Descent of upper level). Suppose Assumptions $_ { I - 3 }$ hold. Define $\bar { h } _ { f } ^ { k } : = \mathbb { E } [ h _ { f } ^ { k } | x ^ { k } , y ^ { k + 1 } ]$ and $\| \bar { h } _ { f } ^ { k } - \overline { { \nabla } } f ( x ^ { k } , y ^ { k + 1 } ) \| \leq b _ { k }$ . The sequence of $x ^ { k }$ generated by Algorithm $I$ satisfies
227
+
228
+ $$
229
+ \begin{array} { r } { \mathbb { E } [ F ( { x } ^ { k + 1 } ) ] - \mathbb { E } [ F ( { x } ^ { k } ) ] \le - \frac { \alpha _ { k } } { 2 } \mathbb { E } [ \| \nabla F ( { x } ^ { k } ) \| ^ { 2 } ] - \left( \frac { \alpha _ { k } } { 2 } - \frac { L _ { F } \alpha _ { k } ^ { 2 } } { 2 } \right) \mathbb { E } [ \| \bar { h } _ { f } ^ { k } \| ^ { 2 } ] } \\ { + L _ { f } ^ { 2 } \alpha _ { k } \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( { x } ^ { k } ) \| ^ { 2 } ] + \alpha _ { k } b _ { k } ^ { 2 } + \frac { L _ { F } \alpha _ { k } ^ { 2 } } { 2 } \tilde { \sigma } _ { f } ^ { 2 } } \end{array}
230
+ $$
231
+
232
+ where constants $L _ { f } , L _ { F } , \sigma _ { f } ^ { 2 }$ are defined in Lemma 4 of the supplementary document.
233
+
234
+ Lemma 1 implies that the descent of the upper-level objective functions depends on the error of the lower-level variable $y ^ { k }$ . We will next analyze the error of the lower-level variable, which is the key step to improving the existing results.
235
+
236
+ Before we analyze the error of $y ^ { k }$ , we introduce a lemma that characterizes the smoothness of $y ^ { \ast } ( x )$ and the bounded moments of $h _ { f } ^ { k }$ . The smoothness and the bounded moments have not been explored by previous analysis such as [16–18], and they play an essential role in our improved analysis of $y ^ { k }$ .
237
+
238
+ Lemma 2 (Smoothness and boundedness). Under Assumptions $^ { l }$ and 2, we have
239
+
240
+ $$
241
+ \begin{array} { r } { \| \nabla y ^ { * } ( x _ { 1 } ) - \nabla y ^ { * } ( x _ { 2 } ) \| \leq L _ { y x } \| x _ { 1 } - x _ { 2 } \| ; \quad \mathbb { E } [ \| h _ { f } ^ { k } \| ^ { 2 } | x ^ { k } , y ^ { k + 1 } ] \leq \tilde { C } _ { f } ^ { 2 } } \end{array}
242
+ $$
243
+
244
+ where $L _ { y x }$ and $\tilde { C } _ { f } ^ { 2 }$ depend on the constants defined in Assumptions 1-2.
245
+
246
+ Building upon Lemma 2, we establish the progress of the lower-level update.
247
+
248
+ Lemma 3 (Error of lower level). Suppose that Assumptions 1–3 hold, and $y ^ { k + 1 }$ is generated by running iteration (9) given $x ^ { k }$ . If we choose $\begin{array} { r } { \beta _ { k } \le \frac { 2 ^ { \binom { - } { q } } } { \mu _ { g } + \ell _ { g , 1 } } } \end{array}$ , then $y ^ { k + 1 }$ satisfies
249
+
250
+ $$
251
+ \begin{array} { r l } & { \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ] \leq ( 1 - \mu _ { g } \beta _ { k } ) ^ { T } \mathbb { E } [ \| y ^ { k } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ] + T \beta _ { k } ^ { 2 } \sigma _ { g , 1 } ^ { 2 } } \\ & { \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( x ^ { k + 1 } ) \| ^ { 2 } ] \leq \Big ( 1 + 4 L _ { f } L _ { y } \alpha _ { k } + \frac { \eta L _ { y x } \tilde { C } _ { f } ^ { 2 } } { 2 } \alpha _ { k } ^ { 2 } \Big ) \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ] } \\ & { \qquad + \Big ( L _ { y } ^ { 2 } + \frac { L _ { y } } { 4 L _ { f } \alpha _ { k } } + \frac { L _ { y x } } { 2 \eta } \Big ) \alpha _ { k } ^ { 2 } \mathbb { E } [ \| \bar { h } _ { f } ^ { k } \| ^ { 2 } ] + \Big ( L _ { y } ^ { 2 } + \frac { L _ { y x } } { 2 \eta } \Big ) \alpha _ { k } ^ { 2 } \tilde { \sigma } _ { f } ^ { 2 } } \end{array}
252
+ $$
253
+
254
+ where $\eta > 0$ is a fixed constant that will be chosen to obtain the tighter complexity bound.
255
+
256
+ The improved analysis of the lower-level problem. Next we explain where we can obtain improved analysis. Plugging (18a) into (18b), and selecting stepsizes $\alpha _ { k } , \beta _ { k }$ properly, we can show that
257
+
258
+ $$
259
+ \begin{array} { r } { \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( x ^ { k + 1 } ) \| ^ { 2 } ] \leq ( 1 - \delta _ { 1 } ) \mathbb { E } [ \| y ^ { k } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ] + \delta _ { 2 } \mathbb { E } [ \| \bar { h } _ { f } ^ { k } \| ^ { 2 } ] + \delta _ { 3 } T \sigma _ { g , 1 } ^ { 2 } + \delta _ { 4 } \tilde { \sigma } _ { f } ^ { 2 } } \end{array}
260
+ $$
261
+
262
+ where the constants are $\delta _ { 1 } \in [ 0 , 1 ) , \delta _ { 2 } = \mathcal { O } ( \alpha _ { k } ) , \delta _ { 3 } = \mathcal { O } ( \beta _ { k } ^ { 2 } ) , \delta _ { 4 } = \mathcal { O } ( \alpha _ { k } ^ { 2 } )$ . As we will show in our supplementary material, the term $\mathbb { E } [ \| \bar { h } _ { f } ^ { k } \| ^ { 2 } ]$ will be canceled when combined with (16) in our analysis. Hence, choosing $\alpha _ { k } = \mathcal { O } ( k ^ { - 1 / 2 } )$ and $\beta _ { k } = \mathcal { O } ( k ^ { - 1 / 2 } )$ makes the variance terms in (19) decrease at the same $\mathcal { O } ( k ^ { - 1 / 2 } )$ rate as the vanilla SGD for stochastic non-nested problems.
263
+
264
+ As a comparison, the progress of the lower-level problem in [18, 17] can be summarized as
265
+
266
+ $$
267
+ \mathbb { E } [ \| y ^ { k + 1 } - y ^ { * } ( x ^ { k + 1 } ) \| ^ { 2 } ] \leq ( 1 - \delta _ { 1 } ) \mathbb { E } [ \| y ^ { k } - y ^ { * } ( x ^ { k } ) \| ^ { 2 } ] + \delta _ { 5 } \sigma ^ { 2 }
268
+ $$
269
+
270
+ where $\sigma ^ { 2 }$ is some variance term, and the constant is $\delta _ { 5 } = \mathcal { O } ( \beta _ { k } ^ { 2 } + \alpha _ { k } ^ { 2 } / \beta _ { k } )$ or $\mathcal { O } ( 1 / B _ { k } )$ with $B _ { k }$ being the batch size at iteration $k$ . To balance the two terms in $\delta _ { 5 } = \mathcal { O } ( \beta _ { k } ^ { 2 } + \alpha _ { k } ^ { 2 } / \beta _ { k } )$ , two timescales of stepsizes $\begin{array} { r } { \operatorname* { l i m } _ { k \to \infty } \alpha _ { k } / \beta _ { k } = 0 } \end{array}$ are needed, which will make the variance term of the $y$ -update in (20) and that of the $x$ -update in (16) decrease at two different rates, slower than that of SGD; and to reduce $\delta _ { 5 } = \mathcal { O } ( 1 / B _ { k } )$ , a growing batch size $B _ { k } = \mathcal { O } ( k )$ is needed for the $y$ -update.
271
+
272
+ # 3 Applications to Stochastic Min-Max and Compositional Problems
273
+
274
+ Building upon the general results for the bilevel problems in Section 2, this section will identify special features of the stochastic min-max and stochastic compositional problems, and customize the general results to yield state-of-the-art convergence results for two special nested problems.
275
+
276
+ # 3.1 Stochastic min-max problems
277
+
278
+ We first apply our results to the stochastic min-max problem (2). In this special case, the lower-level function is $\bar { g ( x , y ; \phi ) } = - f ( x , y ; \xi )$ , and the bilevel gradient in (6) reduces to
279
+
280
+ $$
281
+ \nabla F ( x ) : = \nabla _ { x } f { \big ( } x , y ^ { * } ( x ) { \big ) } + \nabla _ { x } y ^ { * } ( x ) ^ { \top } \nabla _ { y } f { \big ( } x , y ^ { * } ( x ) { \big ) } = \nabla _ { x } f { \big ( } x , y ^ { * } ( x ) { \big ) }
282
+ $$
283
+
284
+ where the second equality follows from the optimality condition of the lower-level problem, i.e., $\nabla _ { y } f ( x , y ^ { * } ( x ) ) = 0$ . Similar to Section 2, we again approximate $\nabla F ( x )$ on a certain vector $y$ in place of $y ^ { * } ( x )$ . Therefore, the alternating stochastic gradients for this special case are given by
285
+
286
+ $$
287
+ \begin{array} { r } { h _ { g } ^ { k , t } = - \nabla _ { y } f ( x ^ { k } , y ^ { k , t } ; \xi _ { 1 } ^ { k , t } ) ~ \mathrm { a n d } ~ h _ { f } ^ { k } = \nabla _ { x } f ( x ^ { k } , y ^ { k + 1 } ; \xi _ { 2 } ^ { k } ) . } \end{array}
288
+ $$
289
+
290
+ Plugging the stochastic gradient into the general update (9), we summarize the update in Algorithm 2.
291
+ When the number of $y$ -update is $T = 1$ , the ALSET algorithm reduces to the SGDA method in [28].
292
+
293
+ Proposition 3 (Min-max problems). Choose the same choice of parameters as those in Theorem $I$ , and follow the same assumption as those in Theorem $^ { l }$ except that $f ( \cdot , y )$ is only Lipchitz over $x \in \mathbb { R } ^ { d }$ but not that $f ( x , \cdot )$ is Lipschitz continuous over $y \in \mathbb { R } ^ { d ^ { \prime } }$ . If we select $\alpha = \Theta ( \kappa ^ { - 1 } )$ , $T = \Theta ( \kappa )$ , $\eta = 1$ in (12), the iterates generated by Algorithm 2 satisfy
294
+
295
+ $$
296
+ \frac { 1 } { K } \sum _ { k = 0 } ^ { K - 1 } \mathbb { E } \left[ \left. \nabla F ( x ^ { k } ) \right. ^ { 2 } \right] = \mathcal { O } \left( \frac { \kappa ^ { 2 } } { K } + \frac { \kappa } { \sqrt { K } } \right) .
297
+ $$
298
+
299
+ Proposition 3 implies that for the minmax problem, the convergence rate of ALSET to the stationary point of $\begin{array} { r } { F ( x ) \ \mathrel { \mathop : } = \ \operatorname* { m a x } _ { y \in \mathbb { R } ^ { d ^ { \prime } } } \mathbb { E } _ { \xi } \left[ f ( x , y ; \xi ) \right] } \end{array}$ is $\mathcal { O } ( K ^ { - 1 / 2 } )$ . To achieve $\epsilon$ -stationary point, we need $K = \mathcal { O } ( \kappa ^ { 2 } \epsilon ^ { - 2 } )$ . And the number of gradient evaluations for $h _ { f } ^ { k } , h _ { g } ^ { k , t }$ are $\mathcal { O } \bar { ( \kappa ^ { 2 } \epsilon ^ { - 2 } ) }$ and $\mathcal { O } ( \kappa ^ { 3 } \epsilon ^ { - 2 } )$ , respectively. Comparing with the results in [28], we achieve the same sample complexity without an increasing batch size $\mathsf { \bar { \mathcal { O } } } ( \epsilon ^ { - 1 } )$ , and improve their sample complexity $\mathcal { O } ( \epsilon ^ { - 5 / 2 } )$ under a fixed batch size.
300
+
301
+ Algorithm 2 ALSET for the min-max problem (2)
302
+
303
+ 1: initialize: $x ^ { 0 } , y ^ { 0 }$ , stepsizes $\{ \alpha _ { k } , \beta _ { k } \}$ .
304
+ 2: for $k = 0 , 1 , \ldots , K - 1$ do
305
+ 3: set $y ^ { k , 0 } = y ^ { k }$
306
+ 4: for $t = 0 , 1 , \dots , T - 1$ do
307
+ 5: update $y ^ { k , t + 1 } = y ^ { k , t } - \beta _ { k } \nabla _ { y } f ( x ^ { k } , y ^ { k , t } ; \xi _ { 1 } ^ { k , t } )$
308
+ 6: end for
309
+ 7: set $y ^ { k + 1 } = y ^ { k , T }$
310
+ 8: update $\boldsymbol { x } ^ { k + \mathrm { i } } = x ^ { k } - \alpha _ { k } \nabla _ { x } f ( x ^ { k } , y ^ { k + 1 } ; \xi _ { 2 } ^ { k } )$
311
+ 9: end for
312
+
313
+ However, it is also worth mentioning that compared with [28], our analysis requires the additional Lipschitz continuity assumption of $f ( \cdot , y )$ over $x \in \mathbb { R } ^ { d }$ , which inherits from the analysis for the general bilevel problem. Therefore, our result complements, rather than improves, the analysis in [28]. We view our contribution in min-max problems as a supplementary of existing results.
314
+
315
+ # 3.2 Stochastic compositional problems
316
+
317
+ In this section, we apply our results to the stochastic compositional problem (3). In this special case, the upper-level function is $f ( x , y ; \xi ) : = f ( y ; \xi )$ , and the lower-level function is $g ( x , y ; \phi ) =$ $\| y - h ( x ; \phi ) \| ^ { 2 }$ , and the bilevel gradient in (6) reduces to
318
+
319
+ $$
320
+ \begin{array} { r l } & { \nabla F ( x ) : = \nabla _ { x } f \big ( x , y ^ { * } ( x ) \big ) - \nabla _ { x y } ^ { 2 } g ( x , y ^ { * } ( x ) ) \big [ \nabla _ { y y } ^ { 2 } g ( x , y ^ { * } ( x ) ) \big ] ^ { - 1 } \nabla _ { y } f ( x , y ^ { * } ( x ) ) } \\ & { \qquad = \nabla h ( x ; \phi ) ^ { \top } \nabla _ { y } f ( y ^ { * } ( x ) ) } \end{array}
321
+ $$
322
+
323
+ where we use the fact that $\nabla _ { y y } ^ { 2 } g ( x , y ; \phi ) = \mathbf { I } _ { d ^ { \prime } \times d ^ { \prime } } , \nabla _ { x y } ^ { 2 } g ( x , y ; \phi ) = - \nabla h ( x ; \phi ) ^ { \top }$ . Similar to Section 2, we again evaluate $\nabla F ( x )$ on a certain vector $y$ in place of $y ^ { \ast } ( x )$ . Therefore, by choosing $T = 1$ , the alternating stochastic gradients $h _ { f } ^ { k } , h _ { g } ^ { k , t }$ for this special case are much simpler, given by
324
+
325
+ $$
326
+ h _ { g } ^ { k , t } = h _ { g } ^ { k } = y ^ { k } - h ( x ^ { k } ; \phi ^ { k } ) ~ \mathrm { a n d } ~ h _ { f } ^ { k } = \nabla h ( x ^ { k } ; \phi ^ { k } ) \nabla f ( y ^ { k + 1 } ; \xi ^ { k } ) .
327
+ $$
328
+
329
+ Plugging the stochastic gradient into the general update (9), we summarize the update in Algorithm 3.
330
+ When $T = 1$ , the ALSET algorithm reduces to SCGD proposed in [12].
331
+
332
+ In the supplementary document, we have verified that the standard assumptions of stochastic compositional optimization in [12, 37, 14, 41, 38] are sufficient for Assumptions 1–3 to hold.
333
+
334
+ Proposition 4 (Compositional problems). Under the same assumptions and the parameters as those in Theorem $I$ , if we select $\begin{array} { r } { T ^ { } = 1 , \alpha = 1 , \eta = \frac { 1 } { L _ { y x } } } \end{array}$ in (12), the iterates of Algorithm 3 satisfy
335
+
336
+ $$
337
+ \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbb { E } \left[ \left\| \nabla F ( x ^ { k } ) \right\| ^ { 2 } \right] = \mathcal { O } \Big ( \frac { 1 } { \sqrt { K } } \Big ) .
338
+ $$
339
+
340
+ Since each iteration of ALSET only uses $\mathcal { O } ( 1 )$ samples (see Algorithm 3), Proposition 4 implies that the sample complexity to achieve an $\epsilon$ -stationary point of (3) is $\mathcal { O } ( \epsilon ^ { - 2 } )$ . Comparing with the results
341
+
342
+ Algorithm 3 ALSET for the compositional problem (3)
343
+
344
+ 1: initialize: $x ^ { 0 } , y ^ { 0 }$ , stepsizes $\{ \alpha _ { k } , \beta _ { k } \}$ .
345
+ 2: for $k = 0 , 1 , \ldots , K - 1$ do
346
+ 3: update $y ^ { k + 1 } = y ^ { k } - \beta _ { k } ( y ^ { k } - h ( x ^ { k } ; \phi ^ { k } ) )$
347
+ 4: update $x ^ { k + 1 } = x ^ { k } - \alpha _ { k } \nabla f ( y ^ { k + 1 } ; \xi ^ { k } ) \nabla h ( x ^ { k } ; \phi ^ { k } )$
348
+ 5: end for
349
+
350
+ of the SCGD method in [12], our result improves the sample complexity $\mathcal { O } ( \epsilon ^ { - 4 } )$ under a fixed batch size. Importantly, our analysis does not introduce additional assumption compared to [12].
351
+
352
+ # 4 Applications to Actor-Critic Methods
353
+
354
+ In this section, we apply our tighter analysis to the actor-critic (AC) method with linear value function approximation [44], which can be viewed as a special case of the stochastic bilevel algorithm [45, 46].
355
+
356
+ Consider a Markov decision process described by $\mathcal { M } = \{ { \cal S } , \mathcal { A } , \mathcal { P } , { \cal R } , \gamma \}$ , where $s$ is the state space, $\mathcal { A }$ is the action space, $\mathcal { P } ( s ^ { \prime } | s , a )$ is the probability of transitioning to $s ^ { \prime } \in \mathcal { S }$ given state $s \in S$ and action $a \in { \mathcal { A } }$ , and $R ( s , a , s ^ { \prime } )$ is the reward associated with $( s , a , s ^ { \prime } )$ , and $\gamma \in [ 0 , 1 )$ is a discount factor. For a policy $\pi _ { \theta }$ , define the value function $V _ { \pi _ { \theta } } ( s )$ that satisfies the Bellman equation [47]
357
+
358
+ $$
359
+ \begin{array} { r } { V _ { \pi _ { \theta } } ( s ) = \mathbb { E } _ { a \sim \pi _ { \theta } ( . | s ) , s ^ { \prime } \sim \mathcal { P } ( \cdot | s , a ) } \left[ r ( s , a , s ^ { \prime } ) + \gamma V _ { \pi _ { \theta } } ( s ^ { \prime } ) \right] . } \end{array}
360
+ $$
361
+
362
+ Given the state feature mapping $\phi ( \cdot ) : \mathcal { S } \mathbb { R } ^ { d _ { y } }$ , we approximate the value function linearly as $V _ { \pi _ { \boldsymbol { \theta } } } ( s ) \approx \hat { V } _ { y } ( s ) : = \boldsymbol { \phi } ( s ) ^ { \top } \boldsymbol { y }$ , where $\boldsymbol { y } \in \mathbb { R } ^ { d _ { y } }$ is the critic parameter. The task of finding the best $y$ such that $V _ { \pi _ { \theta } } ( s ) \approx \hat { V } _ { y } ( s )$ is usually addressed by TD learning [48].
363
+
364
+ Defining the stationary distribution induced by the policy parameter $\theta _ { k }$ as $\mu _ { \theta _ { k } }$ and the $k$ th transition as $\xi _ { k } : = ( s _ { k } , a _ { k } , s _ { k + 1 } )$ , which is sampled from $s _ { k } \sim \mu _ { \theta _ { k } } , a \sim \pi _ { \theta _ { k } } , s _ { k + 1 } \sim \mathcal { P }$ , the TD-error is
365
+
366
+ $$
367
+ \hat { \delta } ( \xi _ { k } , y _ { k } ) : = r ( s _ { k } , a _ { k } , s _ { k + 1 } ) + \gamma \phi ( s _ { k + 1 } ) ^ { \top } y _ { k } - \phi ( s _ { k } ) ^ { \top } y _ { k }
368
+ $$
369
+
370
+ and the critic gradient $h _ { g } ( \xi _ { k } , y _ { k } ) : = \hat { \delta } ( \xi _ { k } , y _ { k } ) \nabla \hat { V } _ { y _ { k } } ( s _ { k } )$ . We update the parameter $y$ via
371
+
372
+ $$
373
+ y _ { k + 1 } = \Pi _ { R _ { y } } \big ( y _ { k } + \beta _ { k } h _ { g } ( \xi _ { k } , y _ { k } ) \big ) ,
374
+ $$
375
+
376
+ where $\beta _ { k }$ is the critic stepsize, and $\Pi _ { R _ { y } }$ is the projection to control the norm of the gradient. A pre-defined constant $R _ { y }$ will be specified in the supplementary document.
377
+
378
+ The goal of policy optimization is to solve ${ \mathrm { m a x } } _ { \theta \in \mathbb { R } ^ { d } } F ( \theta )$ with $F ( \theta ) : = \mathbb { E } _ { s \sim \eta } [ V _ { \pi _ { \theta } } ( s ) ]$ , where $\eta$ is the initial distribution. Leveraging the value function approximation and the policy gradient theorem [49], we have the policy gradient $h _ { f } ( \xi , \theta , y ) : = \hat { \delta } ( \xi , \bar { y ) \psi } _ { \theta } ( s , a )$ , which gives the policy update
379
+
380
+ $$
381
+ \theta _ { k + 1 } = \theta _ { k } + \alpha _ { k } h _ { f } ( \xi _ { k } ^ { \prime } , \theta _ { k } , y _ { k + 1 } ) ,
382
+ $$
383
+
384
+ where $\alpha _ { k }$ is the stepsize and $\psi _ { \boldsymbol \theta } ( s , a ) : = \nabla \log \pi _ { \boldsymbol \theta } ( a | s )$ . Note that the sample $\xi _ { k } ^ { \prime } : = ( s _ { k } ^ { \prime } , a _ { k } ^ { \prime } , s _ { k + 1 } ^ { \prime } )$ used in (30) is independent from $\xi _ { k }$ in (29). Specifically, $\xi _ { k } ^ { \prime }$ is sampled from $s _ { k } ^ { \prime } \sim d _ { \theta _ { k } } , a _ { k } ^ { \prime } \sim$ $\pi _ { \boldsymbol { \theta } _ { k } } , s _ { k + 1 } ^ { \prime } \sim \mathcal { P }$ with $d _ { \theta _ { k } }$ being the discounted state action visitation measure under $\theta _ { k }$ .
385
+
386
+ The alternating AC update (29)-(30) is a special case of ALSET, where the critic update is the lower-level update, and the actor update is the upper-level update.
387
+
388
+ Due to space limitation, we will directly present the results of the alternating AC next, and defer presentation of the proof and the corresponding assumptions, which are the counterparts of Assumptions 1–3 in the context of AC, to the supplementary document.
389
+
390
+ Theorem 2 (Actor-critic). Under the some regularity conditions that are specified in the supplementary document, selecting step size $\begin{array} { r } { \alpha _ { k } = \alpha = \overset { \cdot } { \mathcal { O } } ( \frac { 1 } { \sqrt { K } } ) } \end{array}$ , $\begin{array} { r } { \beta _ { k } = \beta = \mathcal { O } ( \frac { 1 } { \sqrt { K } } ) } \end{array}$ , it holds
391
+
392
+ $$
393
+ \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbb { E } \left[ \| \nabla F ( \theta _ { k } ) \| ^ { 2 } \right] = \mathcal { O } \left( \frac { 1 } { \sqrt { K } } \right) + \epsilon _ { \mathrm { a p p } }
394
+ $$
395
+
396
+ where $\epsilon _ { \mathrm { a p p } }$ , defined in the supplementary document, captures the richness of the linear function class.
397
+
398
+ Both sides of Theorem 2. As an application of our tighter analysis, Theorem 2 establishes for the first time that the sample complexity of the single-loop alternating actor-critic method is $\mathcal { O } ( \epsilon ^ { - 2 } )$ . On the positive side, this new result improves the previous complexity $\mathcal { O } ( \epsilon ^ { - 5 / 2 } )$ for the single-loop AC [50], and $\mathcal { O } ( \epsilon ^ { - 2 } \log \epsilon ^ { - 1 } )$ for the nested-loop AC [51], and matches $\mathcal { O } ( \epsilon ^ { - 2 } )$ for AC with an exact critic oracle [52]. In addition to using two independent samples, one limitation of our result is that inheriting from the analysis for the general bilevel case, our analysis of AC requires the smoothness of the critic fixed-point $y ^ { * } ( \theta )$ . As shown in the supplementary document, this implicitly requires the additional bounded and Lipschitz continuity assumption on the stationary distribution $\mu _ { \theta }$ . The removal of this assumption and the extension to Markovian sampling are left for future research.
399
+
400
+ # 5 Preliminary Experiments
401
+
402
+ To validate our new theoretical results, we have conducted the simple experiment using the riskaverse portfolio management task on a benchmark dataset - 100 Book-to-Market. This is a typical application of stochastic compositional optimization (3) that is used in [40, 41]. We compared the popular two-timescale SCGD approach [12] with our single-timescale ALSET approach.
403
+
404
+ We use the same initialization of $x ^ { 0 } , y ^ { 0 }$ for both SCGD and ALSET, and tune the stepsizes $\alpha _ { k } , \beta _ { k }$ by following the suggested order in the original SCGD paper and then using a grid search for the multiplicative constant $c$ , that is
405
+
406
+ <table><tr><td rowspan=1 colspan=1>Iter k</td><td rowspan=1 colspan=1>ln k</td><td rowspan=1 colspan=1>SCGD</td><td rowspan=1 colspan=1>ALSET</td><td rowspan=1 colspan=1>ALSET-const</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>2.30</td><td rowspan=1 colspan=1>5.32</td><td rowspan=1 colspan=1>5.31</td><td rowspan=1 colspan=1>5.63</td></tr><tr><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>4.61</td><td rowspan=1 colspan=1>3.78</td><td rowspan=1 colspan=1>3.49</td><td rowspan=1 colspan=1>3.63</td></tr><tr><td rowspan=1 colspan=1>200</td><td rowspan=1 colspan=1>5.30</td><td rowspan=1 colspan=1>3.40</td><td rowspan=1 colspan=1>2.94</td><td rowspan=1 colspan=1>3.06</td></tr><tr><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>5.99</td><td rowspan=1 colspan=1>3.04</td><td rowspan=1 colspan=1>2.40</td><td rowspan=1 colspan=1>2.55</td></tr><tr><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>6.91</td><td rowspan=1 colspan=1>2.57</td><td rowspan=1 colspan=1>1.65</td><td rowspan=1 colspan=1>2.06</td></tr></table>
407
+
408
+ The constant $c$ is chosen from the searching
409
+
410
+ Table 4: Comparison of $\begin{array} { r l } { { \ln ( \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \| \nabla F ( x ^ { k } ) \| ^ { 2 } ) } \quad } & { { } } \end{array}$ among the two-timescale and single-timescale algorithms.
411
+
412
+ grid $\{ 1 0 ^ { - 3 } , 5 \times 1 0 ^ { - 4 } , 1 0 ^ { - 4 } \}$ and is optimized for each algorithm in terms of ergodic average gradient norm versus the number of iterations. In Table 4, we report the logarithmic value of the average gradient norm performance of SCGD, ALSET with both the above decreasing stepsizes and ALSETconst with the constant stepsizes (replacing $k$ with $K = 1 0 0 0$ ). Since SCGD and ALSET use the same number of samples and gradient evaluations per iteration, we report the progress in terms of iterations. By calculating the decay rate, we can observe that the empirical convergence rate of ALSET is no worse than the theoretical rate $\mathcal { O } ( k ^ { - 1 / 2 } )$ , and ALSET outperforms SCGD thanks to its single-timescale stepsizes. We will pursue more comprehensive experiments in our future work.
413
+
414
+ # 6 Conclusions
415
+
416
+ This paper unifies several SGD-type updates for stochastic nested problems into a single nested SGD approach that we term ALternating Stochastic gradient dEscenT (ALSET) method. ALSET runs in the single-timescale and uses a fixed batch size. This paper presents a tighter analysis for using ALSET to solve stochastic nested problems. Under the new analysis, to achieve an $\epsilon$ -stationary point of the nested problem, ALSET requires $\mathcal { O } ( \epsilon ^ { - 2 } )$ samples in total. As a by-product, this general result also improves the existing sample complexity of the min-max and compositional cases. It matches the sample complexity of SGD for single-level stochastic problems. Applying our analysis to an alternating version of the actor-critic algorithm also yields a state-of-the-art sample complexity.
417
+
418
+ Potential limitations of our results include additional assumptions in the min-max and actor-critic cases, which inherit from the assumptions of general bilevel problems. Nevertheless, our work can also lead to promising future research in understanding the theoretical performance of many successful empirical nested optimization algorithms. To this end, our future work consists of relaxing the regularity conditions needed to achieve our theoretical results and Possible extensions include applying our the tighter analysis in this paper to the existing two-timescale Hessian-free bilevel optimization algorithms and decentralized stochastic nested optimization algorithms.
419
+
420
+ # Acknowledgements
421
+
422
+ The work of T. Chen was partially supported by NSF Grant 2047177 and the RPI-IBM Artificial Intelligence Research Collaboration (AIRC). The work of Y. Sun was partially supported by ONR
423
+
424
+ Grant N000141712162 and AFOSR MURI FA9550-18-1-0502. We thank anonymous reviewers for their valuable feedback on improving the current paper.
425
+
426
+ References
427
+ [1] H. Robbins and S. Monro, “A stochastic approximation method,” Annals of Mathematical Statistics, vol. 22, no. 3, pp. 400–407, Sep. 1951.
428
+ [2] C. Finn, P. Abbeel, and S. Levine, “Model-agnostic meta-learning for fast adaptation of deep networks,” in Proc. Intl. Conf. Machine Learn., Sydney, Australia, Jun. 2017, pp. 1126–1135.
429
+ [3] L. Franceschi, P. Frasconi, S. Salzo, R. Grazzi, and M. Pontil, “Bilevel programming for hyperparameter optimization and meta-learning,” in Proc. Intl. Conf. Machine Learn., Vienna, Austria, Jun. 2018, pp. 1568–1577.
430
+ [4] B. Colson, P. Marcotte, and G. Savard, “An overview of bilevel optimization,” Annals of operations research, vol. 153, no. 1, pp. 235–256, 2007.
431
+ [5] G. Kunapuli, K. P. Bennett, J. Hu, and J.-S. Pang, “Classification model selection via bilevel programming,” Optimization Methods & Software, vol. 23, no. 4, pp. 475–489, 2008.
432
+ [6] S. Dempe and A. Zemkoho, Bilevel Optimization. Springer, 2020.
433
+ [7] C. Daskalakis and I. Panageas, “The limit points of (optimistic) gradient descent in min-max optimization,” in Proc. Advances in Neural Info. Process. Syst., Montreal, Canada, Dec. 2018, pp. 9256–9266.
434
+ [8] G. Gidel, H. Berard, G. Vignoud, P. Vincent, and S. Lacoste-Julien, “A variational inequality perspective on generative adversarial networks,” in Proc. Intl. Conf. Learn. Representations, Vancouver, Canada, Apr. 2018.
435
+ [9] H. Rafique, M. Liu, Q. Lin, and T. Yang, “Non-convex min-max optimization: Provable algorithms and applications in machine learning,” Optimization Methods and Software, Mar. 2021.
436
+ [10] K. K. Thekumparampil, P. Jain, P. Netrapalli, and S. Oh, “Efficient algorithms for smooth minimax optimization,” in NeurIPS, Vancouver, Canada, Dec. 2019.
437
+ [11] A. Mokhtari, A. Ozdaglar, and S. Pattathil, “A unified analysis of extra-gradient and optimistic gradient methods for saddle point problems: Proximal point approach,” in Proc. Intl. Conf. on Artif. Intell. and Stat., Palermo, Italy, Aug. 2020, pp. 1497–1507.
438
+ [12] M. Wang, E. X. Fang, and H. Liu, “Stochastic compositional gradient descent: algorithms for minimizing compositions of expected-value functions,” Mathematical Programming, vol. 161, no. 1-2, pp. 419–449, Jan. 2017.
439
+ [13] B. Dai, N. He, Y. Pan, B. Boots, and L. Song, “Learning from conditional distributions via dual embeddings,” in Proc. Intl. Conf. on Artif. Intell. and Stat., Fort Lauderdale, FL, Apr. 2017, pp. 1458–1467.
440
+ [14] S. Ghadimi, A. Ruszczynski, and M. Wang, “A single timescale stochastic approximation method for nested stochastic optimization,” SIAM Journal on Optimization, vol. 30, no. 1, pp. 960–979, Mar. 2020.
441
+ [15] K. Ji, J. Yang, and Y. Liang, “Multi-step model-agnostic meta-learning: Convergence and improved algorithms,” arXiv preprint:2002.07836, Feb. 2020.
442
+ [16] S. Ghadimi and M. Wang, “Approximation methods for bilevel programming,” arXiv preprint:1802.02246, 2018.
443
+ [17] K. Ji, J. Yang, and Y. Liang, “Provably faster algorithms for bilevel optimization and applications to meta-learning,” in Proc. Intl. Conf. Machine Learn., Virtual, Jul. 2021.
444
+ [18] M. Hong, H.-T. Wai, Z. Wang, and Z. Yang, “A two-timescale framework for bilevel optimization: Complexity analysis and application to actor-critic,” arXiv preprint:2007.05170, 2020.
445
+ [19] T. Chen, Y. Sun, and W. Yin, “A single-timescale stochastic bilevel optimization method,” arXiv preprint arXiv:2102.04671, 2021.
446
+ [20] H. V. Stackelberg, The Theory of Market Economy. Oxford University Press, 1952.
447
+ [21] S. Sabach and S. Shtern, “A first order method for solving convex bilevel optimization problems,” SIAM Journal on Optimization, vol. 27, no. 2, pp. 640–660, 2017.
448
+ [22] A. Shaban, C.-A. Cheng, N. Hatch, and B. Boots, “Truncated back-propagation for bilevel optimization,” in Proc. Intl. Conf. on Artif. Intell. and Stat., Naha, Okinawa, Japan, Apr. 2019, pp. 1723–1732.
449
+ [23] R. Grazzi, L. Franceschi, M. Pontil, and S. Salzo, “On the iteration complexity of hypergradient computation,” in Proc. Intl. Conf. Machine Learn., virtual, Jul. 2020, pp. 3748–3758.
450
+ [24] R. Liu, P. Mu, X. Yuan, S. Zeng, and J. Zhang, “A generic first-order algorithmic framework for bi-level programming beyond lower-level singleton,” in Proc. of International Conference on Machine Learning, Virtual, July 2020, pp. 6305–6315.
451
+ [25] P. Khanduri, S. Zeng, M. Hong, H.-T. Wai, Z. Wang, and Z. Yang, “A momentum-assisted single-timescale stochastic approximation algorithm for bilevel optimization,” arXiv preprint arXiv:2102.07367, Feb. 2021.
452
+ [26] Z. Guo and T. Yang, “Randomized stochastic variance-reduced methods for stochastic bilevel optimization,” arXiv preprint arXiv:2105.02266, May 2021.
453
+ [27] J. Yang, K. Ji, and Y. Liang, “Provably faster algorithms for bilevel optimization,” arXiv preprint arXiv:2106.04692, Jun. 2021.
454
+ [28] T. Lin, C. Jin, and M. Jordan, “On gradient descent ascent for nonconvex-concave minimax problems,” in Proc. Intl. Conf. Machine Learn., virtual, Jul. 2020, pp. 6083–6093.
455
+ [29] T. Yoon and E. K. Ryu, “Accelerated algorithms for smooth convex-concave minimax problems with $O ( 1 / k ^ { 2 } )$ rate on squared gradient norm,” in Proc. Intl. Conf. Machine Learn., Virtual, Jul. 2021.
456
+ [30] M. Nouiehed, M. Sanjabi, T. Huang, J. D. Lee, and M. Razaviyayn, “Solving a class of nonconvex min-max games using iterative first order methods,” in Proc. Advances in Neural Info. Process. Syst., Vancouver, Canada, Dec. 2019, pp. 14 934–14 942.
457
+ [31] L. Luo, H. Ye, Z. Huang, and T. Zhang, “Stochastic recursive gradient descent ascent for stochastic nonconvex-strongly-concave minimax problems,” in Proc. Advances in Neural Info. Process. Syst., Virtual, Dec. 2020.
458
+ [32] Y. Yan, Y. Xu, Q. Lin, W. Liu, and T. Yang, “Optimal epoch stochastic gradient descent ascent methods for min-max optimization,” Proc. Advances in Neural Info. Process. Syst., vol. 33, Dec. 2020.
459
+ [33] Q. Tran Dinh, D. Liu, and L. Nguyen, “Hybrid variance-reduced sgd algorithms for minimax problems with nonconvex-linear function,” in Proc. Advances in Neural Info. Process. Syst., Virtual, Dec. 2020.
460
+ [34] M. Liu, Y. Mroueh, J. Ross, W. Zhang, X. Cui, P. Das, and T. Yang, “Towards better understanding of adaptive gradient algorithms in generative adversarial nets,” in Proc. Intl. Conf. Learn. Representations, Virtual, Apr. 2020.
461
+ [35] J. Yang, N. Kiyavash, and N. He, “Global convergence and variance reduction for a class of nonconvex-nonconcave minimax problems,” in Proc. Advances in Neural Info. Process. Syst., Virtual, Dec. 2020.
462
+ [36] J. Diakonikolas, C. Daskalakis, and M. Jordan, “Efficient methods for structured nonconvexnonconcave min-max optimization,” in Proc. Intl. Conf. on Artif. Intell. and Stat., Virtual, Apr. 2021.
463
+ [37] M. Wang, J. Liu, and E. Fang, “Accelerating stochastic composition optimization,” Journal Machine Learning Research, vol. 18, no. 1, pp. 3721–3743, 2017.
464
+ [38] T. Chen, Y. Sun, and W. Yin, “Solving stochastic compositional optimization is nearly as easy as solving stochastic optimization,” IEEE Trans. Sig. Proc., vol. 69, Aug. 2021.
465
+ [39] A. Ruszczynski, “A stochastic subgradient method for nonsmooth nonconvex multi-level composition optimization,” arXiv preprint:2001.10669, Jan. 2020.
466
+ [40] X. Lian, M. Wang, and J. Liu, “Finite-sum composition optimization via variance reduced gradient descent,” in Proc. Intl. Conf. on Artif. Intell. and Stat., Fort Lauderdale, FL, Apr. 2017.
467
+ [41] J. Zhang and L. Xiao, “A stochastic composite gradient method with incremental variance reduction,” in Proc. Advances in Neural Info. Process. Syst., Vancouver, Canada, Dec. 2019.
468
+ [42] Q. Tran-Dinh, N. Pham, and L. Nguyen, “Stochastic gauss-newton algorithms for nonconvex compositional optimization,” in Proc. Intl. Conf. Machine Learn., Virtual, Jul. 2020.
469
+ [43] S. Ghadimi and G. Lan, “Stochastic first-and zeroth-order methods for nonconvex stochastic programming,” SIAM Journal on Optimization, vol. 23, no. 4, pp. 2341–2368, 2013.
470
+ [44] V. Konda and V. Borkar, “Actor-critic-type learning algorithms for markov decision processes,” SIAM Journal on Control and Optimization, vol. 38, no. 1, pp. 94–123, 1999.
471
+ [45] J. Wen, S. Kumar, R. Gummadi, and D. Schuurmans, “Characterizing the gap between actorcritic and policy gradient,” in Proc. Intl. Conf. Machine Learn., Virtual, 2021.
472
+ [46] L. Zheng, T. Fiez, Z. Alumbaugh, B. Chasnov, and L. J. Ratliff, “Stackelberg actor-critic: Game-theoretic reinforcement learning algorithms,” arXiv preprint arXiv:2109.12286, 2021.
473
+ [47] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction. MIT Press, 2018.
474
+ [48] R. Sutton, “Learning to predict by the methods of temporal differences,” Machine Learning, vol. 3, pp. 9–44, 1988.
475
+ [49] R. Sutton, D. McAllester, S. Singh, and Y. Mansour, “Policy gradient methods for reinforcement learning with function approximation.” in Proc. Advances in Neural Info. Process. Syst., 2000.
476
+ [50] Y. Wu, W. Zhang, P. Xu, and Q. Gu, “A finite time analysis of two time-scale actor critic methods,” in Proc. Advances in Neural Info. Process. Syst., 2020.
477
+ [51] T. Xu, Z. Wang, and Y. Liang, “Improving sample complexity bounds for (natural) actor-critic algorithms,” in Proc. Advances in Neural Info. Process. Syst., 2020.
478
+ [52] Z. Fu, Z. Yang, and Z. Wang, “Single-timescale actor-critic provably finds globally optimal policy,” in Proc. Intl. Conf. Learn. Representations, 2020.
479
+ [53] Y. Nesterov, Introductory Lectures on Convex Optimization: A basic course. Berlin, Germany: Springer, 2013, vol. 87.
480
+ [54] J. Bhandari, D. Russo, and R. Singal, “A finite time analysis of temporal difference learning with linear function approximation.” in COLT, 2018.
481
+ [55] T. Xu, Z. Wang, Y. Zhou, and Y. Liang, “Reanalysis of variance reduced temporal difference learning,” in Proc. Intl. Conf. Learn. Representations, 2020.
482
+ [56] K. Zhang, A. Koppel, H. Zhu, and T. Ba¸sar, “Global convergence of policy gradient methods to (almost) locally optimal policies,” arXiv preprint:1906.08383, 2019.
483
+ [57] A. Agarwal, S. M. Kakade, J. D. Lee, and G. Mahajan, “Optimality and approximation with policy gradient methods in markov decision processes.” in Proc. of Thirty Third Conference on Learning Theory, 2020.
484
+ [58] K. Doya, “Reinforcement learning in continuous time and space,” Neural Computation, vol. 12, no. 1, pp. 219–245, 2000.
485
+ [59] J. Baxter and P. L. Bartlett, “Infinite-horizon policy-gradient estimation,” J. Artificial Intelligence Res., vol. 15, pp. 319–350, 2001.
486
+ [60] A. Y. Mitrophanov, “Sensitivity and convergence of uniformly ergodic markov chains,” Journal of Applied Probability, vol. 42, no. 4, pp. 1003–1014, 2005.
487
+ [61] S. Qiu, Z. Yang, J. Ye, and Z. Wang, “On the finite-time convergence of actor-critic algorithm,” in Optimization Foundations for Reinforcement Learning Workshop at Advances in Neural Information Processing Systems, 2019.
parse/train/r6cNUjS8cm0/r6cNUjS8cm0_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r6cNUjS8cm0/r6cNUjS8cm0_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r6cNUjS8cm0/r6cNUjS8cm0_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJeZS3RcYm/rJeZS3RcYm.md ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SIMPLE BLACK-BOX ADVERSARIAL ATTACKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The construction of adversarial images is a search problem in high dimensions within a small region around a target image. The goal is to find an imperceptibly modified image that is misclassified by a target model. In the black-box setting, only sporadic feedback is provided through occasional model evaluations. In this paper we provide a new algorithm whose search strategy is based on an intriguingly simple iterative principle: We randomly pick a low frequency component of the discrete cosine transform (DCT) and either add or subtract it to the target image. Model evaluations are only required to identify whether an operation decreases the adversarial loss. Despite its simplicity, the proposed method can be used for targeted and untargeted attacks — resulting in previously unprecedented query efficiency in both settings. We require a median of 600 black-box model queries (ResNet-50) to produce an adversarial ImageNet image, and we successfully attack Google Cloud Vision with 2500 median queries, averaging to a cost of only $\$ 3$ per image. We argue that our proposed algorithm should serve as a strong baseline for future adversarial black-box attacks, in particular because it is extremely fast and can be implemented in less than 20 lines of PyTorch code.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ As machine learning systems become prevalent in numerous application domains, the security of these systems in the presence of malicious adversaries becomes an important area of research. Many recent studies have shown that decisions output by machine learning models can be altered arbitrarily with imperceptible changes to the input (Carlini & Wagner, 2017b). These attacks on machine learning models can be categorized by the capabilities of the adversary. White-box attacks require the adversary to have complete knowledge of the target model, whereas black-box attacks require only queries to the target model that may return complete or partial information.
12
+
13
+ Although often misunderstood as a property of neural networks (Szegedy et al., 2014), the vulnerability towards adversarial examples is likely an inevitability of classifiers in high-dimensional spaces (Shafahi et al., 2018). When the space is high-dimensional, randomly sampled points tend to be far apart (simply because to be close, they would have to be similar along every dimension). However, the reverse is true for distances between points and high-dimensional decision surfaces. The distance from a point to a hyper-plane is only measured along the direction of its normal vector (all other orthogonal directions are parallel to the hyper-plane).1 One can of course construct pathological counter examples of distributions with two classes that have only non-zero support in small but distant regions of the space (e.g. classifying all-white vs. all-black images). However, the fact that almost all models for classification of natural images are susceptible to white-box attacks (Athalye et al., 2018), suggests that natural images tend to be very close to decision boundaries learned by classifiers and demonstrates that the distribution of natural images is no such exception.
14
+
15
+ If adversarial examples (almost) always exist, attacking a classifier turns into a search problem within a small volume around a target image. In the white-box scenario, this search can be guided effectively with gradient descent (Szegedy et al., 2014; Carlini & Wagner, 2017b; Madry et al., 2017). However, the black-box threat model is more applicable in many scenarios. Most popular online machine learning services such as Clarifai or Google Cloud Vision only allow API calls to access the model’s predictions. These services do not release any internal details such as training data and model parameters. Moreover, queries to the model may incur a significant cost of both time and money. The number of black-box queries made to the model therefore serves as an important metric of efficiency for the attack algorithm. Attacks that are too costly, or are easily defeated by query limiting, pose less of a security risk than efficient attacks. To date, the average number of queries performed by the best known black-box attacks remains high despite a large amount of recent work in this area (Chen et al., 2017; Brendel et al., 2017; Cheng et al., 2018; Guo et al., 2018; Tu et al., 2018; Ilyas et al., 2018). The most efficient and complex attacks still typically require tens or even hundreds of thousands of queries. Until now, a method for query efficient black-box attacks has remained an open research problem.
16
+
17
+ In this paper we propose a simple, yet highly efficient black-box attack that is based on a very simple intuition: If the distance to a decision boundary is very small, we don’t have to be too careful about the exact direction along which we traverse towards it. Concretely, we repeatedly pick a random direction among a pre-specified set of orthogonal search directions, check if it is pointing towards or away from the decision boundary, and perturb the image by adding or subtracting the vector from the image. Each update moves the image further away from the original image and towards the decision boundary.
18
+
19
+ We provide some theoretical insight on the efficacy of our approach and evaluate various orthogonal search subspaces. Similar to Guo et al. (2018), we observe that restricting the search towards the low frequency end of the discrete cosine transform (DCT) basis is particularly query efficient. Further, we demonstrate empirically that our approach achieves a similar success rate to state-of-the-art black-box attack algorithms, however with an unprecedented low number of black-box queries. Due to its simplicity — it can be implemented in PyTorch in under 20 lines of code — we consider our method a new and perhaps surprisingly strong baseline for adversarial image attacks and we refer to our algorithm as Simple Black-box Attack (SimBA).
20
+
21
+ # 2 BACKGROUND
22
+
23
+ The study of adversarial examples concerns with the robustness of a machine learning model to small changes in the input. In the realm of classification, given a model $h$ and some input-label pair $\left( \mathbf { x } , y \right)$ on which the model correctly classifies $h ( \mathbf { x } ) = y$ , $h$ is said to be $\rho$ -robust with respect to perceptibility metric $d ( \cdot , \cdot )$ if $h ( \mathbf { x } ^ { \prime } ) \bar { = } y$ for all $\mathbf { x } ^ { \prime }$ such that $d ( \mathbf { x } , \mathbf { x } ^ { \prime } ) < \rho$ . The metric $d$ is often approximated by the $L _ { 0 }$ , $L _ { 2 }$ and $L _ { \infty }$ distances to measure the degree of visual dissimilarity between the clean input $\mathbf { x }$ and the perturbed input $\mathbf { x } ^ { \prime }$ . Following (Moosavi-Dezfooli et al., 2016; MoosaviDezfooli et al., 2017), for the remainder of this paper, we will use $d ( \mathbf { x } , \mathbf { x } ^ { \prime } ) = \| \mathbf { x } - \mathbf { x } ^ { \prime } \| _ { 2 }$ as the perceptibility metric unless specified otherwise.
24
+
25
+ Although this robustness requirement often holds when $\mathbf { x } ^ { \prime } = \mathbf { x } + \boldsymbol { \delta }$ for randomly sampled noise vectors $\delta$ , many studies have shown that the model admits directions of non-robustness even for very small values of $\rho$ (Moosavi-Dezfooli et al., 2016; Carlini & Wagner, 2017b). More recent work (Shafahi et al., 2018) has verified this claim theoretically, showing that adversarial examples are inherent in high-dimensional spaces. These findings motivate the problem of finding adversarial directions $\delta$ that alter the model’s decision.
26
+
27
+ The simplest success condition for the adversary is to change the original correct prediction of the model to an arbitrary class, i.e., $h ( \mathbf { x } ^ { \prime } ) \neq y$ . This is known as an untargeted attack. In contrast, a targeted attack aims to construct $\mathbf { x } ^ { \prime }$ such that $h ( \mathbf { x } ^ { \prime } ) = y ^ { \prime }$ for some chosen target class $y ^ { \prime }$ . For the sake of brevity, we will focus on untargeted attacks in our discussion, but all arguments in our paper are applicable to targeted attacks as well.
28
+
29
+ Since the model outputs discrete decisions, finding adversarial perturbations to change the model’s prediction is, at first, a discrete optimization problem. However, it is often useful to define a surrogate loss $\ell _ { y } ( \cdot )$ that measures the degree of certainty that the model $h$ classifies the input as class $y$ . The adversarial perturbation problem can therefore be formulated as the following constrained (continuous) optimization problem:
30
+
31
+ $$
32
+ \begin{array} { r } { \underset { \delta } { \mathrm { m i n } } \ \ell _ { y } ( \mathbf { x } + \delta ) } \\ { \mathrm { s u b j e c t ~ t o } \ \lVert \delta \rVert _ { 2 } < \rho . } \end{array}
33
+ $$
34
+
35
+ When the model $h$ also outputs probabilities $p _ { h } ( \cdot \mid \mathbf { x } )$ associated with each class, one commonly used adversarial loss is the probability of class $y$ : $\ell _ { y } ( \mathbf { x } ^ { \prime } ) = p _ { h } ( y \mid \mathbf { x } ^ { \prime } )$ . For targeted attacks towards label $y ^ { \prime }$ a common choice is $\ell _ { y ^ { \prime } } ( \mathbf { x } ^ { \prime } ) \overset { \cdot } { = } - p _ { h } ( y ^ { \prime } \mid \mathbf { x } ^ { \prime } )$
36
+
37
+ Depending on the application domain, the attacker may have various degrees of knowledge about the target model $h$ . Under the white-box threat model, the classifier $h$ is provided to the adversary. In this scenario, a powerful attack strategy is to perform gradient descent on the adversarial loss $\ell _ { y } ( \cdot )$ , or an approximation thereof. The perturbation norm $\bar { | | } \delta \| _ { 2 }$ can be controlled by early stopping (Goodfellow et al., 2015; Kurakin et al., 2016) or by including it as a component of the loss function (Carlini & Wagner, 2017b).
38
+
39
+ However, the white-box assumption may be unsuitable for many applications. For instance, the model $h$ may be exposed to the public as an API, allowing only queries on inputs. This black-box threat model is much more challenging for the adversary, since gradient information may not be used to guide the finding of the adversarial direction $\delta$ , and each query to the model incurs a time and monetary cost. Thus, the adversary is tasked with an additional goal of minimizing the number of black-box queries to $h$ while succeeding in constructing an imperceptible adversarial perturbation. This poses a slightly modified constrained optimization problem (with a slight abuse of notation):
40
+
41
+ $$
42
+ \begin{array} { c } { \displaystyle \operatorname* { m i n } _ { \delta } \ell _ { y } ( \mathbf { x } + \delta ) } \\ { \mathrm { s u b j e c t ~ t o } \| \delta \| _ { 2 } < \rho } \\ { \mathrm { q u e r i e s } \leq B } \end{array}
43
+ $$
44
+
45
+ where $B$ is some fixed budget for the number of queries allowed during the optimization. For iterative methods, the budget $B$ constrains the number of iterations the algorithm may take, hence requiring that the attack algorithm converges to a solution very quickly.
46
+
47
+ # 3 A SIMPLE BLACK-BOX ATTACK
48
+
49
+ Imagine that we have some image x which a black-box neural network classifies as category $y$ with predicted probability $p _ { h } ( y \mid \mathbf { x } )$ . Our goal is to find a small pertubation $\delta$ such that the prediction $h ( \mathbf { x } + \delta ) \neq y$ .
50
+
51
+ # Algorithm 1 SimBA in Pesudocode
52
+
53
+ <table><tr><td colspan="2">1: procedure SIMBA(x,y, Q,∈)</td></tr><tr><td>2: δ=0 3:</td><td>&gt; Query black-box for initial probabilities</td></tr><tr><td>p = Ph(y|x)</td><td></td></tr><tr><td>4: while Py = maxy&#x27; Py&#x27; do 5:</td><td>While the true label has not changed</td></tr><tr><td>Pick randomly without replacement: q ∈ Q</td><td>&gt; Try eq and then -eq if that fails.</td></tr><tr><td>6:</td><td>for α ∈{ε,-ε} do</td></tr><tr><td>7:</td><td>p&#x27;= ph(y|x+δ+aq) Query the black-box model</td></tr><tr><td>8:</td><td>&gt; If the probability is lower,accept this step</td></tr><tr><td>9:</td><td>if py&lt;Py then =δ+aq</td></tr><tr><td>10:</td><td>p=p&#x27;</td></tr><tr><td>11: break return δ</td><td>Move on to the next direction</td></tr></table>
54
+
55
+ The intuition behind our method is simple: for any direction q and some step size $\epsilon$ , one of $\mathbf { x } + \epsilon \mathbf { q }$ or $\mathbf { x } - \epsilon \mathbf { q }$ is likely to decrease $p _ { h } ( y \mid \mathbf { x } )$ . We therefore repeatedly pick random directions $\mathbf { q }$ and either add or subtract them. The approach is summarized in psuedocode in Algorithm 1. To minimize the number of queries to $h ( \cdot )$ we always first try adding q. If this decreases the probability $p _ { h } ( y \mid \mathbf { x } )$ we take the step, otherwise we try subtracting q. This procedure requires between 1.4 and 1.5 queries per update on average (depending on the data set and target model). Our proposed method – Simple Black-box Attack (SimBA) – takes as input the target image label pair $\left( \mathbf { x } , y \right)$ , a set of orthogonal candidate vectors $Q$ and a step-size $\epsilon > 0$ . For simplicity we pick $\mathbf { q } \in Q$ uniformly at random. To guarantee maximum query efficiency, we ensure that no two directions cancel each other out and diminish progress, or amplify each other and increase the norm of $\delta$ disproportionately. For this reason we pick q without replacement and restrict all vectors in √ $Q$ to be orthogonal. As we show later, this results in a guaranteed perturbation norm of $\| \delta \| _ { 2 } = \sqrt { T } \epsilon$ after $T$ updates.
56
+
57
+ ![](images/4cd2729197b86e4d0ecc7f994ae80686a119688575848cf4e902bc9294c10c6c.jpg)
58
+ Figure 1: Plot of the change in true class probability when descending in a random direction in pixel space (left) and DCT space (right) at step size $\epsilon$ . The average change (purple line) is almost linear in $\epsilon$ with the slope being steeper when the direction is sampled in DCT space. Furthermore, $98 \%$ of the directions sampled in DCT space have either $\mathbf { q }$ or $- \mathbf { q }$ descending, while only $73 \%$ are descending in pixel space.
59
+
60
+ # 3.1 HYPER-PARAMETERS
61
+
62
+ The only hyper-parameters of SimBA are the set of orthogonal search vectors $Q$ and the step size $\epsilon$
63
+
64
+ Orthogonal directions $Q$ . A natural first choice for the set of orthogonal search directions $Q$ is to randomly subsample the natural basis, $Q = I$ , which corresponds to performing our algorithm directly in pixel space. Essentially each iteration we are increasing or decreasing one color of a single randomly chosen pixel. Alternatively, we can consider directions in frequency domain. Recent work has discovered that random noise in low frequency space are more likely to be adversarial (Guo et al., 2018). To exploit this fact, we follow Guo et al. (2018) and propose to exploit the discrete cosine transform (DCT). The discrete cosine transform is an orthonormal transformation that maps signals in a 2D image space $\mathbb { R } ^ { d \times d }$ to frequency coefficients corresponding to magnitudes of wave functions. In what follows, we will refer to the set of orthonormal frequencies extracted by the DCT as $Q _ { \mathrm { D C T } }$ . While the full set of directions $Q _ { \mathrm { D C T } }$ contains $d \times d$ frequencies, we keep only a fraction $r$ of the lowest frequency directions in order to make the adversarial perturbation in the low frequency space.
65
+
66
+ Choosing a learning rate . Given any set of search directions $Q$ , some directions may decrease $p _ { h } ( y \mid \mathbf { x } )$ more than others. Furthermore, it is not naively obvious that arbitrary steps along any direction $\mathbf { q } _ { i }$ decrease the probability. It is possible for the probability $p _ { h } ( y \mid { \bf x } + \epsilon { \bf q } _ { i } )$ to be nonmonotonic in $\epsilon$ . In Figure 1, we plot the relative decrease in probability as a function of $\epsilon$ for randomly sampled search directions in both pixel space and the DCT space. This figure highlights an illuminating result: the probability $p _ { h } ( y \mid { \bf x } \pm \epsilon { \bf q } )$ decreases monotonically in $\epsilon$ with surprising consistency (across random images and vectors q)! Although some directions eventually increase the true class probability, the expected change in this probability is negative with a relatively steep slope. This means that our algorithm is not overly sensitive to the choice of $\epsilon$ and the iterates will decrease the true class probability quickly. The figure also shows that search in the DCT space tends to lead to steeper descent directions than pixel space. As we show in the next section, we can tightly bound the final $L _ { 2 }$ -norm of the perturbation given a choice of $\epsilon$ and maximum number of steps $T$ , so the choice of $\epsilon$ depends primarily on budget considerations with respect to $\lVert \delta \rVert _ { 2 }$ .
67
+
68
+ # 3.2 BUDGET CONSIDERATIONS.
69
+
70
+ Each iteration of our algorithm strictly increases the norm of the adversarial perturbation $\delta _ { i } \ =$ $\epsilon \mathbf { q } _ { i }$ . By exploiting the orthonormality of the basis $Q$ , we can bound this change tightly. Let $\alpha _ { i } \in$ $\{ - \epsilon , 0 , \epsilon \}$ denote the sign of the search direction chosen at step $i$ , so
71
+
72
+ $$
73
+ \delta _ { i + 1 } = \delta _ { i } + \alpha _ { i } { \bf q } _ { i } .
74
+ $$
75
+
76
+ We can recursively expand $\delta _ { i + 1 } = \delta _ { i - 1 } + \alpha _ { i - 1 } { \bf q } _ { i - 1 } + \alpha _ { i } { \bf q } _ { i }$ . In general, the final perturbation $\delta _ { T }$ after $T$ steps can be written as a sum of these individual search directions:
77
+
78
+ $$
79
+ \delta _ { T } = \sum _ { i = 1 } ^ { T } \alpha _ { i } \mathbf { q } _ { i } .
80
+ $$
81
+
82
+ Since the directions $\mathbf { q } _ { i }$ are orthogonal, $\mathbf { q } _ { i } ^ { \top } \mathbf { q } _ { j } = 0$ for any $i \neq j$ . We can therefore compute the $L _ { 2 }$ -norm of the adversarial perturbation:
83
+
84
+ $$
85
+ \lVert \delta _ { T } \rVert _ { 2 } ^ { 2 } = \left. \sum _ { i = 1 } ^ { T } \alpha _ { i } \mathbf { q } _ { i } \right. _ { 2 } ^ { 2 } = \sum _ { i = 1 } ^ { T } \lVert \alpha _ { i } \mathbf { q } _ { i } \rVert _ { 2 } ^ { 2 } = \sum _ { i = 1 } ^ { T } \alpha _ { i } ^ { 2 } \lVert \mathbf { q } _ { i } \rVert _ { 2 } ^ { 2 } \leq T \epsilon ^ { 2 } .
86
+ $$
87
+
88
+ Here, the second equality follows from the orthogonality of $\mathbf { q } _ { i }$ and ${ \bf q } _ { j }$ , and the last inequality is tight √if all queries result in a step of either $\epsilon$ or $- \epsilon$ . Thus the adversarial perturbation has $L _ { 2 }$ -norm at most $\sqrt { T } \epsilon$ after $T$ iterations. The same analysis holds when using any orthonormal basis (e.g. $Q _ { \mathrm { D C T } }$ ).
89
+
90
+ This result highlights an important trade-off for our method. For query-limited scenarios, we may reduce the number of iterations by setting $\epsilon$ higher, incurring higher perturbation $L _ { 2 }$ -norm. If a low norm solution is more desirable, reducing $\epsilon$ will allow quadratically more queries at the same $L _ { 2 }$ -norm. A more thorough theoretical analysis of this trade-off could improve query efficiency.
91
+
92
+ # 4 EXPERIMENTAL EVALUATION
93
+
94
+ In this section, we empirically evaluate our attack against a comprehensive list of known black-box attack algorithms: ZOO (Chen et al., 2017), the Boundary Attack (Brendel et al., 2017), Opt attack (Cheng et al., 2018), Low Frequency Boundary Attack (LFBA) (Guo et al., 2018), AutoZOOM (Tu et al., 2018), and the QL attack (Ilyas et al., 2018). Based on Eq. (??), there are three dimensions to evaluate black-box adversarial attacks on: how often the optimization problem finds a feasible point (success rate), how many queries were required $( B )$ , and the resulting perturbation norms $( \rho )$ .
95
+
96
+ ![](images/5c6f39b033bc83dde2df4535d2a01dd32211186862e55a6725a99162fa5e49f0.jpg)
97
+ Figure 2: Comparison of success rate versus number of model queries for untargeted (left) and targeted (right) attacks. Horizontal axis shows queries in log scale. For boundary attack and LFBA, success is defined as achieving a perturbation $L _ { 2 }$ -norm of 10 or less. Note that both SimBA and SimBA-DCT achieve a high success rate very quickly.
98
+
99
+ # 4.1 SETUP
100
+
101
+ We first compare all methods on the ImageNet validation set. We present numbers reported by the original authors’ papers in comparison to ours where applicable. For methods where the required values were unavailable (the boundary attack, LFBA, and the QL attack), we evaluate these methods ourselves using hyperparameters suggested by the authors. For all original and reproduced results, we sample a set of 1000 images from the ImageNet validation set that are initially classified correctly to avoid artifically inflating the success rate.
102
+
103
+ ![](images/e0d277a68c5031f553128bbc34a263ad2a02f03ec261b203de110b13d0493ac0.jpg)
104
+ Figure 3: Histogram of queries required until a successful model attack (over 1000 target images). SimBA-DCT is highly skew-right, suggesting that only a handful of images require more than a small number of queries. The median number of queries required by SimBA-DCT is only 582.
105
+
106
+ <table><tr><td colspan="4">Untargeted</td><td colspan="4"></td></tr><tr><td>Attack</td><td>Averagequeries</td><td>Successrate</td><td>AverageL2</td><td></td><td>Targeted</td><td>Successrate</td><td>AverageL2</td></tr><tr><td>ZO0</td><td>192,000</td><td>88.9%</td><td>1.20</td><td>Attack</td><td>Average queries</td><td></td><td></td></tr><tr><td>Boundary attack</td><td>123,407</td><td>100%</td><td>5.98</td><td>QL-attack</td><td>20.614</td><td>98.7%</td><td>11.39</td></tr><tr><td>Opt-attack</td><td>71,100</td><td>100%</td><td>6.98</td><td>AutoZOOM</td><td>13,525</td><td>100%</td><td>26.74</td></tr><tr><td>LFBA</td><td>30,000</td><td>100%</td><td>6.34</td><td>SimBA</td><td>7,899</td><td>100%</td><td>8.83</td></tr><tr><td>SimBA</td><td>1,665</td><td>98.6%</td><td>3.77</td><td>SimBA-DCT</td><td>9,182</td><td>96.0%</td><td>7.02</td></tr><tr><td>SimBA-DCT</td><td>1,232</td><td>98.3%</td><td>3.09</td><td></td><td></td><td></td><td></td></tr></table>
107
+
108
+ Table 1: Average query count for untargeted (left) and targeted (right) attacks. Both SimBA and SimBA-DCT have comparable success rate to other algorithms, but require a significantly fewer number of model queries. This effect is especially dramatic for untargeted attack, where the number of queries made by SimBA-DCT is 24 times fewer than all other methods.
109
+
110
+ We also evaluate SimBA in the real-world setting of attacking the Google Cloud Vision API. Due to the extreme budget required by baselines that might cost up to $\$ 300$ per image2, we compare here only to LFBA, which we found to be the most query efficient baseline.
111
+
112
+ In our experiments, we limit SimBA and SimBA-DCT to at most $T = 1 0 , 0 0 0$ iterations for untargeted attacks and to $T = 3 0 , 0 0 0$ for targeted attacks. For SimBA-DCT, we use we keep the first 1/8th of all frequencies, and add an additional 1/32nd of the frequencies whenever we run out of frequencies without succeeding. For both methods, we use a fixed step size of $\epsilon = 0 . 2$ .
113
+
114
+ # 4.2 IMAGENET RESULTS
115
+
116
+ Evaluating success rate (Figure 2). We first demonstrate the query efficiency of our method by showing that the average success rate increases dramatically faster than other methods with the same number of queries. Figure 2 compares SimBA and SimBA-DCT to the boundary attack and LFBA in the untargeted setting, and to the QL attack for the targeted setting. Since both boundary attack and LFBA are initialized with inputs of the adversarial class and gradually reduce $L _ { 2 }$ perturbation norm, we define success as reducing the $L _ { 2 }$ -norm to 10 or below. For untargeted attack (left plot), the success rate for both SimBA and SimBA-DCT increase very quickly. LFBA is competitive with SimBA and SimBA-DCT until iteration 1000, but the final success rate is much worse than both methods. A similar result can be seen for targeted attack (right plot), where SimBA and SimBADCT outperform QL attack dramatically in terms of query efficiency.
117
+
118
+ Query distributions. In Figure 3 we plot the histogram of model queries made by both SimBA and SimBA-DCT over 1000 random images. Notice that the distributions are highly skewed so the median query count is much smaller than the average query count reported in Table 1. These median counts for SimBA and SimBA-DCT are only 944 and 582, respectively. In the targeted case, while the majority of images can be successfully attacked with very few model evaluations, SimBADCT failed to find an adversarial perturbation for approximately $2 . 5 \%$ of the images. Nevertheless, SimBA is achieves a success rate of $1 0 0 \%$ within 7,899 average queries.
119
+
120
+ ![](images/db590b8ee2cbb10bb154afc4de63741e4e286b9f65d2f71e31a30752da880881.jpg)
121
+ Figure 4: Comparison of success rate versus number of model queries across different network architectures for untargeted SimBA (left) and SimBA-DCT (right) attacks. For all networks, SimBADCT is more query efficient by at least a factor of 2. DenseNet is the most vulnerable against both attacks, admitting a success rate of almost $1 0 0 \%$ after only 10,000 queries for SimBA and 4000 queries for SimBA-DCT. Inception v3 is much more difficult to attack for both methods.
122
+
123
+ Aggregate statistics (Table 1). Table 1 computes aggregate statistics of model queries, success rate, and perturbation $L _ { 2 }$ -norm across different attack algorithms. The target model is a pretrained ResNet-50 (He et al., 2016) network, with the exception of AutoZOOM, which used an Inception v3 (Szegedy et al., 2016) network. All methods achieve a similar success rate except for ZOO, which has a reported success rate of ${ \mathrm { 8 8 . 9 \% } }$ . The success rate for boundary attack and LFBA are always $1 0 0 \%$ since both methods begin with very large perturbations to guarantee misclassification and gradually reduce the perturbation norm. Both SimBA and SimBA-DCT have lower average $L _ { 2 }$ -norm than all methods except for ZOO for untargeted attacks, while requiring an order of magnitude fewer queries (at 1665 and 1232, respectively). For targeted attack (right table), all the evaluated methods have much more similar query count, but both SimBA and SimBA-DCT still require significantly fewer queries than QL attack and AutoZOOM, and the $L _ { 2 }$ -norm of constructed perturbation is also much lower.
124
+
125
+ Evaluating different networks (Figure 4). To verify that our attack is robust against different model architectures, we evaluate SimBA and SimBA-DCT additionally against DenseNet-121 (Huang et al., 2017a) and Inception v3 (Szegedy et al., 2016) networks. Figure 4 shows success rate across the number of model queries for an untargeted attack against
126
+
127
+ ![](images/185717453b53aee51e17b3ad09b3f93837df2a5cd7cc17e6db665519e81e43d1.jpg)
128
+ Figure 5: Randomly selected images before and after adversarial perturbation by SimBA, SimBADCT and boundary attack. The constructed perturbation is imperceptible for all three methods, but the $L _ { 2 }$ -norm for SimBA and SimBA-DCT is significantly lower than boundary attack across all images, despite allowing boundary attack to make 60,000 queries. In comparison, our methods are capable of constructing an adversarial example in as few as 36 queries. Zoom in for detail.
129
+
130
+ ![](images/f9bfccb10b14cc731fbe504da93bbd43da7c023d54f5277d521cf6335835b304.jpg)
131
+ Figure 6: Screenshot of Google Cloud Vision labeling results on a randomly chosen image before and after adversarial perturbation. While the labels for the adversarial image are still reasonable, the concept bird has been completely removed. See Supplementary Material for additional samples.
132
+
133
+ the three different network architectures. ResNet-50 and DenseNet-121 exhibit a similar degree of vulnerability against our attacks. However, Inception v3 is noticeably more difficult to attack, requiring more than 10,000 queries to successfully attack with some images.
134
+
135
+ Qualitative results (Figure 5). For qualitative evaluation of our method, we present several randomly selected images before and after adversarial perturbation by untargeted attack. For comparison, we attack the same set of images using boundary attack for 30,000 iterations (60,000 model queries). Figure 5 shows the clean and perturbed images along with the perturbation $L _ { 2 }$ -norm and number of queries. While all attacks are highly successful at changing the label, SimBA and SimBADCT require much fewer queries and the resulting perturbation norm is also much smaller than that of boundary attack. In fact, SimBA-DCT was able to find an adversarial image in as few as 36 model queries! Notice that the perturbation produced by SimBA contains sparse but sharp differences, constituting a low $L _ { 0 }$ norm but relatively high $L _ { \infty }$ norm. However, SimBA-DCT produces perturbations that are sparse in frequency space, but the resulting change in pixel space is spread out across all pixels.
136
+
137
+ # 4.3 GOOGLE CLOUD VISION ATTACK
138
+
139
+ To demonstrate the effectiveness of our attack against real world systems, we attack the Google Cloud Vision API, an online machine learning service that provides labels for arbitrary input images. For a given image, the API returns a list of top concepts contained in the image and their associated probabilities. Since the full list of probabilities associated with every label is unavailable, we define an untargeted attack that aims to remove the top 3 concepts in the original. We use the maximum of the original top 3 concepts’ returned probabilities as the adversarial loss and use SimBA to minimize this loss. Figure 6 shows a sample random image before and after the attack. The top 3 concepts, in particular the concept bird, have been removed in the adversarial image.
140
+
141
+ ![](images/5a9be383d241f2bbc4e0ccc0b2582d537471b9498dec0583ff3064ca9276c752.jpg)
142
+ Figure 7: Plot of success rate across number of model queries for Google Cloud Vision attack. SimBA is able to achieve close to $7 0 \%$ success rate after only 5000 queries, while the success rate for LFBA has only reached $2 5 \%$ .
143
+
144
+ Since our attack can be executed efficiently, we evaluate its effectiveness over an aggregate of 50 random images. For the LFBA baseline, we define an attack as successful if the produced perturbation has an $L _ { 2 }$ -norm of at most the highest $L _ { 2 }$ -norm in a successful run of our attack. Figure 7 shows the average success rate of both attacks across number of queries. SimBA achieves a final success rate of $7 0 \%$ after only 5000 API calls, while LFBA is able to succeed only $2 5 \%$ of the time under the same query budge. To the best of our knowledge, this is the first adversarial attack result on Google Cloud Vision that has a high reported success rate within very limited number of queries.
145
+
146
+ # 5 RELATED WORK
147
+
148
+ Many recent studies have shown that both white-box and black-box attacks can be applied to a diverse set of tasks. Computer vision models for image segmentation and object detection have also been shown to be vulnerable against adversarial perturbations (Cisse et al., 2017a; Xie et al., 2017). Carlini & Wagner (2018) performed a systematic study of speech recognition attacks and showed that robust adversarial examples that alter the transcription model to output arbitrary target phrases can be constructed. Attacks on neural network policies (Huang et al., 2017b; Behzadan & Munir, 2017) have also been shown to be permissible.
149
+
150
+ As these attacks become prevalent, many recent works have focused on designing defenses against adversarial examples. One common class of defenses applies an image transformation prior to classification, which aims to remove the adversarial perturbation without changing the image content (Xu et al., 2017; Dziugaite et al., 2016; Guo et al., 2017). Instead of requiring the model to correctly classify all adversarial images, another strategy is to detect the attack and output an adversarial class when certain statistics of the input appear abnormal (Li & Li, 2017; Metzen et al., 2017; Meng & Chen, 2017; Lu et al., 2017). The training procedure can also be strengthened by including the adversarial loss as an implicit or explicit regularizer to promote robustness against adversarial perturbations (Tramer et al., 2017; Madry et al., 2017; Cisse et al., 2017b). While these defenses \` have shown great success against a passive adversary, almost all of them can be easily defeated by modifying the attack strategy (Carlini & Wagner, 2017a; Athalye & Carlini, 2018; Athalye et al., 2018).
151
+
152
+ Relative to defenses against white-box attacks, few studies have focused on defending against adversaries that may only access the model via black-box queries. While transfer attacks can be effectively mitigated by methods such as ensemble adversarial training (Tramer et al., 2017) and image \` transformation (Guo et al., 2017), it is unknown whether existing defense strategies can be applied to adaptive adversaries that may access the model via queries. Guo et al. (2018) have shown that the boundary attack is susceptible to image transformations that quantize the decision boundary, but employing the attack in low frequency space can successfully circumvent these transformation defenses. Given the query efficiency and real world applicability of our proposed black-box attacks, we hope that more research can be dedicated towards defending against malicious adversaries under this threat model.
153
+
154
+ # 6 CONCLUSION
155
+
156
+ We proposed SimBA, a simple black-box adversarial attack that takes small steps iteratively towards the decision boundary, and demonstrated through extensive experiment its unprecedented query efficiency in both the untargeted and targeted settings. Due to its accessibility, we hope that this method establishes a strong baseline for future research on black-box adversarial examples.
157
+
158
+ While we intentionally avoid more sophisticated techniques to improve the method in favor of simplicity, we believe that additional modifications can still dramatically decrease the number of model queries. One possible extension could be to further investigate the selection of different sets of orthonormal bases, which could be crucial to the efficiency of our method by increasing the probability of finding a direction of large change. Another area for improvement is the adaptive selection of the step size $\epsilon$ to optimally consume the distance and query budgets.
159
+
160
+ Given that our method has relatively few requirements, it is conceivable that it can be applied to any task for which the target model returns a continuous score for the prediction. For instance, speech recognition systems are trained to maximize the probability of the correct transcription, and neural network policies are trained to maximize some reward function over the set of actions conditioned on the current environment. A simple iterative algorithm that modifies the input at random elements may prove to be effective in these scenarios. We leave these directions for future work.
161
+
162
+ # REFERENCES
163
+
164
+ Anish Athalye and Nicholas Carlini. On the robustness of the CVPR 2018 white-box adversarial example defenses. CoRR, abs/1804.03286, 2018. URL http://arxiv.org/abs/1804. 03286.
165
+
166
+ Anish Athalye, Nicholas Carlini, and David A. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. CoRR, abs/1802.00420, 2018. URL http://arxiv.org/abs/1802.00420.
167
+
168
+ Vahid Behzadan and Arslan Munir. Vulnerability of deep reinforcement learning to policy induction attacks. CoRR, abs/1701.04143, 2017.
169
+
170
+ Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. CoRR, abs/1712.04248, 2017. URL http: //arxiv.org/abs/1712.04248.
171
+
172
+ Nicholas Carlini and David A. Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. CoRR, abs/1705.07263, 2017a.
173
+
174
+ Nicholas Carlini and David A. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, pp. 39–57, 2017b.
175
+
176
+ Nicholas Carlini and David A. Wagner. Audio adversarial examples: Targeted attacks on speech-totext. CoRR, abs/1801.01944, 2018. URL http://arxiv.org/abs/1801.01944.
177
+
178
+ Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. ZOO: zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, AISec@CCS 2017, Dallas, TX, USA, November 3, 2017, pp. 15–26, 2017. doi: 10.1145/3128572.3140448. URL http://doi.acm.org/10.1145/3128572.3140448.
179
+
180
+ Minhao Cheng, Thong Le, Pin-Yu Chen, Jinfeng Yi, Huan Zhang, and Cho-Jui Hsieh. Queryefficient hard-label black-box attack: An optimization-based approach. CoRR, abs/1807.04457, 2018. URL http://arxiv.org/abs/1807.04457.
181
+
182
+ Moustapha Cisse, Yossi Adi, Natalia Neverova, and Joseph Keshet. Houdini: Fooling deep structured prediction models. CoRR, abs/1707.05373, 2017a.
183
+
184
+ Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. CoRR, abs/1704.08847, 2017b.
185
+
186
+ Gintare Karolina Dziugaite, Zoubin Ghahramani, and Daniel Roy. A study of the effect of JPG compression on adversarial images. CoRR, abs/1608.00853, 2016.
187
+
188
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proc. ICLR, 2015.
189
+
190
+ Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens van der Maaten. Countering adversarial ´ images using input transformations. CoRR, abs/1711.00117, 2017. URL http://arxiv. org/abs/1711.00117.
191
+
192
+ Chuan Guo, Jared S. Frank, and Kilian Q. Weinberger. Low frequency adversarial perturbations. CoRR, abs/1809.08758, 2018. URL http://arxiv.org/abs/1809.08758.
193
+
194
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, pp. 770–778, 2016.
195
+
196
+ Gao Huang, Zhuang Liu, Kilian Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Proc. CVPR, pp. 2261–2269, 2017a.
197
+
198
+ Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. CoRR, abs/1702.02284, 2017b.
199
+
200
+ Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmassan, Stockholm, Sweden, July 10-15, 2018 ¨ , pp. 2142–2151, 2018. URL http://proceedings.mlr.press/v80/ilyas18a.html.
201
+
202
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. CoRR, abs/1611.01236, 2016.
203
+
204
+ Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pp. 5775–5783, 2017. doi: 10.1109/ICCV.2017.615. URL https: //doi.org/10.1109/ICCV.2017.615.
205
+
206
+ Jiajun Lu, Theerasit Issaranon, and David A. Forsyth. Safetynet: Detecting and rejecting adversarial examples robustly. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pp. 446–454, 2017. doi: 10.1109/ICCV.2017.56. URL https: //doi.org/10.1109/ICCV.2017.56.
207
+
208
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. CoRR, abs/1706.06083, 2017. URL http://arxiv.org/abs/1706.06083.
209
+
210
+ Dongyu Meng and Hao Chen. Magnet: A two-pronged defense against adversarial examples. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, CCS 2017, Dallas, TX, USA, October 30 - November 03, 2017, pp. 135–147, 2017. doi: 10.1145/ 3133956.3134057. URL http://doi.acm.org/10.1145/3133956.3134057.
211
+
212
+ Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. CoRR, abs/1702.04267, 2017. URL http://arxiv.org/abs/1702. 04267.
213
+
214
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. In Proc. CVPR, pp. 2574–2582, 2016.
215
+
216
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proc. CVPR, pp. 86–94, 2017.
217
+
218
+ Ali Shafahi, W. Ronny Huang, Christoph Studer, Soheil Feizi, and Tom Goldstein. Are adversarial examples inevitable? CoRR, abs/1809.02104, 2018. URL http://arxiv.org/abs/1809. 02104.
219
+
220
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In In Proc. ICLR, 2014.
221
+
222
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proc. CVPR, pp. 2818–2826, 2016.
223
+
224
+ Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick D. McDaniel. Ensemble \` adversarial training: Attacks and defenses. CoRR, abs/1705.07204, 2017.
225
+
226
+ Chun-Chen Tu, Pai-Shun Ting, Pin-Yu Chen, Sijia Liu, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh, and Shin-Ming Cheng. Autozoom: Autoencoder-based zeroth order optimization method for attacking black-box neural networks. CoRR, abs/1805.11770, 2018. URL http://arxiv. org/abs/1805.11770.
227
+
228
+ Cihang Xie, Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and Alan L. Yuille. Adversarial examples for semantic segmentation and object detection. In ICCV, pp. 1378–1387. IEEE Computer Society, 2017.
229
+
230
+ Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. CoRR, abs/1704.01155, 2017.
231
+
232
+ # S1 SUPPLEMENTARY MATERIAL
233
+
234
+ To demonstrate the generality of our evaluation of the Google Cloud Vision attack, we show 10 additional random images before and after perturbation by SimBA. In all cases, we successfully remove the top 3 original labels.
235
+
236
+ ![](images/13166133a7c0be9e0360f5ebb32dc44fc47742e69f4ae53f3a8d2f9c3f08a4c5.jpg)
237
+
238
+ ![](images/f3b5f1296a0308812fb35c3a31a88070db640ad95b4da878cf2854887752e494.jpg)
239
+ Figure S1: Additional adversarial images on Google Cloud Vision.
parse/train/rJeZS3RcYm/rJeZS3RcYm_content_list.json ADDED
@@ -0,0 +1,1322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SIMPLE BLACK-BOX ADVERSARIAL ATTACKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 723,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "The construction of adversarial images is a search problem in high dimensions within a small region around a target image. The goal is to find an imperceptibly modified image that is misclassified by a target model. In the black-box setting, only sporadic feedback is provided through occasional model evaluations. In this paper we provide a new algorithm whose search strategy is based on an intriguingly simple iterative principle: We randomly pick a low frequency component of the discrete cosine transform (DCT) and either add or subtract it to the target image. Model evaluations are only required to identify whether an operation decreases the adversarial loss. Despite its simplicity, the proposed method can be used for targeted and untargeted attacks — resulting in previously unprecedented query efficiency in both settings. We require a median of 600 black-box model queries (ResNet-50) to produce an adversarial ImageNet image, and we successfully attack Google Cloud Vision with 2500 median queries, averaging to a cost of only $\\$ 3$ per image. We argue that our proposed algorithm should serve as a strong baseline for future adversarial black-box attacks, in particular because it is extremely fast and can be implemented in less than 20 lines of PyTorch code. ",
40
+ "bbox": [
41
+ 233,
42
+ 241,
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
+ 489,
55
+ 334,
56
+ 506
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "As machine learning systems become prevalent in numerous application domains, the security of these systems in the presence of malicious adversaries becomes an important area of research. Many recent studies have shown that decisions output by machine learning models can be altered arbitrarily with imperceptible changes to the input (Carlini & Wagner, 2017b). These attacks on machine learning models can be categorized by the capabilities of the adversary. White-box attacks require the adversary to have complete knowledge of the target model, whereas black-box attacks require only queries to the target model that may return complete or partial information. ",
63
+ "bbox": [
64
+ 174,
65
+ 522,
66
+ 825,
67
+ 619
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Although often misunderstood as a property of neural networks (Szegedy et al., 2014), the vulnerability towards adversarial examples is likely an inevitability of classifiers in high-dimensional spaces (Shafahi et al., 2018). When the space is high-dimensional, randomly sampled points tend to be far apart (simply because to be close, they would have to be similar along every dimension). However, the reverse is true for distances between points and high-dimensional decision surfaces. The distance from a point to a hyper-plane is only measured along the direction of its normal vector (all other orthogonal directions are parallel to the hyper-plane).1 One can of course construct pathological counter examples of distributions with two classes that have only non-zero support in small but distant regions of the space (e.g. classifying all-white vs. all-black images). However, the fact that almost all models for classification of natural images are susceptible to white-box attacks (Athalye et al., 2018), suggests that natural images tend to be very close to decision boundaries learned by classifiers and demonstrates that the distribution of natural images is no such exception. ",
74
+ "bbox": [
75
+ 174,
76
+ 627,
77
+ 825,
78
+ 792
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "If adversarial examples (almost) always exist, attacking a classifier turns into a search problem within a small volume around a target image. In the white-box scenario, this search can be guided effectively with gradient descent (Szegedy et al., 2014; Carlini & Wagner, 2017b; Madry et al., 2017). However, the black-box threat model is more applicable in many scenarios. Most popular online machine learning services such as Clarifai or Google Cloud Vision only allow API calls to access the model’s predictions. These services do not release any internal details such as training data and model parameters. Moreover, queries to the model may incur a significant cost of both time and money. The number of black-box queries made to the model therefore serves as an important metric of efficiency for the attack algorithm. Attacks that are too costly, or are easily defeated by query limiting, pose less of a security risk than efficient attacks. To date, the average number of queries performed by the best known black-box attacks remains high despite a large amount of recent work in this area (Chen et al., 2017; Brendel et al., 2017; Cheng et al., 2018; Guo et al., 2018; Tu et al., 2018; Ilyas et al., 2018). The most efficient and complex attacks still typically require tens or even hundreds of thousands of queries. Until now, a method for query efficient black-box attacks has remained an open research problem. ",
85
+ "bbox": [
86
+ 174,
87
+ 800,
88
+ 823,
89
+ 897
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 215
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper we propose a simple, yet highly efficient black-box attack that is based on a very simple intuition: If the distance to a decision boundary is very small, we don’t have to be too careful about the exact direction along which we traverse towards it. Concretely, we repeatedly pick a random direction among a pre-specified set of orthogonal search directions, check if it is pointing towards or away from the decision boundary, and perturb the image by adding or subtracting the vector from the image. Each update moves the image further away from the original image and towards the decision boundary. ",
107
+ "bbox": [
108
+ 174,
109
+ 222,
110
+ 825,
111
+ 319
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We provide some theoretical insight on the efficacy of our approach and evaluate various orthogonal search subspaces. Similar to Guo et al. (2018), we observe that restricting the search towards the low frequency end of the discrete cosine transform (DCT) basis is particularly query efficient. Further, we demonstrate empirically that our approach achieves a similar success rate to state-of-the-art black-box attack algorithms, however with an unprecedented low number of black-box queries. Due to its simplicity — it can be implemented in PyTorch in under 20 lines of code — we consider our method a new and perhaps surprisingly strong baseline for adversarial image attacks and we refer to our algorithm as Simple Black-box Attack (SimBA). ",
118
+ "bbox": [
119
+ 174,
120
+ 325,
121
+ 825,
122
+ 438
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 BACKGROUND ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 458,
133
+ 326,
134
+ 473
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "The study of adversarial examples concerns with the robustness of a machine learning model to small changes in the input. In the realm of classification, given a model $h$ and some input-label pair $\\left( \\mathbf { x } , y \\right)$ on which the model correctly classifies $h ( \\mathbf { x } ) = y$ , $h$ is said to be $\\rho$ -robust with respect to perceptibility metric $d ( \\cdot , \\cdot )$ if $h ( \\mathbf { x } ^ { \\prime } ) \\bar { = } y$ for all $\\mathbf { x } ^ { \\prime }$ such that $d ( \\mathbf { x } , \\mathbf { x } ^ { \\prime } ) < \\rho$ . The metric $d$ is often approximated by the $L _ { 0 }$ , $L _ { 2 }$ and $L _ { \\infty }$ distances to measure the degree of visual dissimilarity between the clean input $\\mathbf { x }$ and the perturbed input $\\mathbf { x } ^ { \\prime }$ . Following (Moosavi-Dezfooli et al., 2016; MoosaviDezfooli et al., 2017), for the remainder of this paper, we will use $d ( \\mathbf { x } , \\mathbf { x } ^ { \\prime } ) = \\| \\mathbf { x } - \\mathbf { x } ^ { \\prime } \\| _ { 2 }$ as the perceptibility metric unless specified otherwise. ",
141
+ "bbox": [
142
+ 173,
143
+ 488,
144
+ 825,
145
+ 601
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Although this robustness requirement often holds when $\\mathbf { x } ^ { \\prime } = \\mathbf { x } + \\boldsymbol { \\delta }$ for randomly sampled noise vectors $\\delta$ , many studies have shown that the model admits directions of non-robustness even for very small values of $\\rho$ (Moosavi-Dezfooli et al., 2016; Carlini & Wagner, 2017b). More recent work (Shafahi et al., 2018) has verified this claim theoretically, showing that adversarial examples are inherent in high-dimensional spaces. These findings motivate the problem of finding adversarial directions $\\delta$ that alter the model’s decision. ",
152
+ "bbox": [
153
+ 174,
154
+ 607,
155
+ 825,
156
+ 690
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "The simplest success condition for the adversary is to change the original correct prediction of the model to an arbitrary class, i.e., $h ( \\mathbf { x } ^ { \\prime } ) \\neq y$ . This is known as an untargeted attack. In contrast, a targeted attack aims to construct $\\mathbf { x } ^ { \\prime }$ such that $h ( \\mathbf { x } ^ { \\prime } ) = y ^ { \\prime }$ for some chosen target class $y ^ { \\prime }$ . For the sake of brevity, we will focus on untargeted attacks in our discussion, but all arguments in our paper are applicable to targeted attacks as well. ",
163
+ "bbox": [
164
+ 174,
165
+ 698,
166
+ 825,
167
+ 768
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Since the model outputs discrete decisions, finding adversarial perturbations to change the model’s prediction is, at first, a discrete optimization problem. However, it is often useful to define a surrogate loss $\\ell _ { y } ( \\cdot )$ that measures the degree of certainty that the model $h$ classifies the input as class $y$ . The adversarial perturbation problem can therefore be formulated as the following constrained (continuous) optimization problem: ",
174
+ "bbox": [
175
+ 173,
176
+ 775,
177
+ 825,
178
+ 844
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "equation",
184
+ "img_path": "images/bef33e0fe2ef9984e0ccc1c1421ace0375dba965a6259204407868d51bc82fb6.jpg",
185
+ "text": "$$\n\\begin{array} { r } { \\underset { \\delta } { \\mathrm { m i n } } \\ \\ell _ { y } ( \\mathbf { x } + \\delta ) } \\\\ { \\mathrm { s u b j e c t ~ t o } \\ \\lVert \\delta \\rVert _ { 2 } < \\rho . } \\end{array}\n$$",
186
+ "text_format": "latex",
187
+ "bbox": [
188
+ 429,
189
+ 852,
190
+ 568,
191
+ 893
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "When the model $h$ also outputs probabilities $p _ { h } ( \\cdot \\mid \\mathbf { x } )$ associated with each class, one commonly used adversarial loss is the probability of class $y$ : $\\ell _ { y } ( \\mathbf { x } ^ { \\prime } ) = p _ { h } ( y \\mid \\mathbf { x } ^ { \\prime } )$ . For targeted attacks towards label $y ^ { \\prime }$ a common choice is $\\ell _ { y ^ { \\prime } } ( \\mathbf { x } ^ { \\prime } ) \\overset { \\cdot } { = } - p _ { h } ( y ^ { \\prime } \\mid \\mathbf { x } ^ { \\prime } )$ ",
198
+ "bbox": [
199
+ 174,
200
+ 103,
201
+ 825,
202
+ 147
203
+ ],
204
+ "page_idx": 2
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "Depending on the application domain, the attacker may have various degrees of knowledge about the target model $h$ . Under the white-box threat model, the classifier $h$ is provided to the adversary. In this scenario, a powerful attack strategy is to perform gradient descent on the adversarial loss $\\ell _ { y } ( \\cdot )$ , or an approximation thereof. The perturbation norm $\\bar { | | } \\delta \\| _ { 2 }$ can be controlled by early stopping (Goodfellow et al., 2015; Kurakin et al., 2016) or by including it as a component of the loss function (Carlini & Wagner, 2017b). ",
209
+ "bbox": [
210
+ 174,
211
+ 152,
212
+ 825,
213
+ 236
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "However, the white-box assumption may be unsuitable for many applications. For instance, the model $h$ may be exposed to the public as an API, allowing only queries on inputs. This black-box threat model is much more challenging for the adversary, since gradient information may not be used to guide the finding of the adversarial direction $\\delta$ , and each query to the model incurs a time and monetary cost. Thus, the adversary is tasked with an additional goal of minimizing the number of black-box queries to $h$ while succeeding in constructing an imperceptible adversarial perturbation. This poses a slightly modified constrained optimization problem (with a slight abuse of notation): ",
220
+ "bbox": [
221
+ 173,
222
+ 242,
223
+ 825,
224
+ 342
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "equation",
230
+ "img_path": "images/cdd75a22462751e269ecc0465704960e5591e17ac52bc906fee4d34db5a92025.jpg",
231
+ "text": "$$\n\\begin{array} { c } { \\displaystyle \\operatorname* { m i n } _ { \\delta } \\ell _ { y } ( \\mathbf { x } + \\delta ) } \\\\ { \\mathrm { s u b j e c t ~ t o } \\| \\delta \\| _ { 2 } < \\rho } \\\\ { \\mathrm { q u e r i e s } \\leq B } \\end{array}\n$$",
232
+ "text_format": "latex",
233
+ "bbox": [
234
+ 419,
235
+ 344,
236
+ 580,
237
+ 405
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "where $B$ is some fixed budget for the number of queries allowed during the optimization. For iterative methods, the budget $B$ constrains the number of iterations the algorithm may take, hence requiring that the attack algorithm converges to a solution very quickly. ",
244
+ "bbox": [
245
+ 174,
246
+ 409,
247
+ 825,
248
+ 450
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 A SIMPLE BLACK-BOX ATTACK ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 469,
259
+ 470,
260
+ 486
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Imagine that we have some image x which a black-box neural network classifies as category $y$ with predicted probability $p _ { h } ( y \\mid \\mathbf { x } )$ . Our goal is to find a small pertubation $\\delta$ such that the prediction $h ( \\mathbf { x } + \\delta ) \\neq y$ . ",
267
+ "bbox": [
268
+ 174,
269
+ 501,
270
+ 825,
271
+ 544
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "Algorithm 1 SimBA in Pesudocode ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 176,
281
+ 558,
282
+ 411,
283
+ 573
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "table",
289
+ "img_path": "images/41db931fe0f9a99cba716ed39c0f54e3df276345878beb14c3e44eea3c2cf93b.jpg",
290
+ "table_caption": [],
291
+ "table_footnote": [],
292
+ "table_body": "<table><tr><td colspan=\"2\">1: procedure SIMBA(x,y, Q,∈)</td></tr><tr><td>2: δ=0 3:</td><td>&gt; Query black-box for initial probabilities</td></tr><tr><td>p = Ph(y|x)</td><td></td></tr><tr><td>4: while Py = maxy&#x27; Py&#x27; do 5:</td><td>While the true label has not changed</td></tr><tr><td>Pick randomly without replacement: q ∈ Q</td><td>&gt; Try eq and then -eq if that fails.</td></tr><tr><td>6:</td><td>for α ∈{ε,-ε} do</td></tr><tr><td>7:</td><td>p&#x27;= ph(y|x+δ+aq) Query the black-box model</td></tr><tr><td>8:</td><td>&gt; If the probability is lower,accept this step</td></tr><tr><td>9:</td><td>if py&lt;Py then =δ+aq</td></tr><tr><td>10:</td><td>p=p&#x27;</td></tr><tr><td>11: break return δ</td><td>Move on to the next direction</td></tr></table>",
293
+ "bbox": [
294
+ 178,
295
+ 575,
296
+ 826,
297
+ 742
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "The intuition behind our method is simple: for any direction q and some step size $\\epsilon$ , one of $\\mathbf { x } + \\epsilon \\mathbf { q }$ or $\\mathbf { x } - \\epsilon \\mathbf { q }$ is likely to decrease $p _ { h } ( y \\mid \\mathbf { x } )$ . We therefore repeatedly pick random directions $\\mathbf { q }$ and either add or subtract them. The approach is summarized in psuedocode in Algorithm 1. To minimize the number of queries to $h ( \\cdot )$ we always first try adding \u000fq. If this decreases the probability $p _ { h } ( y \\mid \\mathbf { x } )$ we take the step, otherwise we try subtracting \u000fq. This procedure requires between 1.4 and 1.5 queries per update on average (depending on the data set and target model). Our proposed method – Simple Black-box Attack (SimBA) – takes as input the target image label pair $\\left( \\mathbf { x } , y \\right)$ , a set of orthogonal candidate vectors $Q$ and a step-size $\\epsilon > 0$ . For simplicity we pick $\\mathbf { q } \\in Q$ uniformly at random. To guarantee maximum query efficiency, we ensure that no two directions cancel each other out and diminish progress, or amplify each other and increase the norm of $\\delta$ disproportionately. For this reason we pick q without replacement and restrict all vectors in √ $Q$ to be orthogonal. As we show later, this results in a guaranteed perturbation norm of $\\| \\delta \\| _ { 2 } = \\sqrt { T } \\epsilon$ after $T$ updates. ",
304
+ "bbox": [
305
+ 173,
306
+ 756,
307
+ 825,
308
+ 924
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "image",
314
+ "img_path": "images/4cd2729197b86e4d0ecc7f994ae80686a119688575848cf4e902bc9294c10c6c.jpg",
315
+ "image_caption": [
316
+ "Figure 1: Plot of the change in true class probability when descending in a random direction in pixel space (left) and DCT space (right) at step size $\\epsilon$ . The average change (purple line) is almost linear in $\\epsilon$ with the slope being steeper when the direction is sampled in DCT space. Furthermore, $98 \\%$ of the directions sampled in DCT space have either $\\mathbf { q }$ or $- \\mathbf { q }$ descending, while only $73 \\%$ are descending in pixel space. "
317
+ ],
318
+ "image_footnote": [],
319
+ "bbox": [
320
+ 183,
321
+ 107,
322
+ 826,
323
+ 268
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "3.1 HYPER-PARAMETERS ",
330
+ "text_level": 1,
331
+ "bbox": [
332
+ 176,
333
+ 367,
334
+ 362,
335
+ 381
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "The only hyper-parameters of SimBA are the set of orthogonal search vectors $Q$ and the step size $\\epsilon$ ",
342
+ "bbox": [
343
+ 174,
344
+ 392,
345
+ 821,
346
+ 407
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "Orthogonal directions $Q$ . A natural first choice for the set of orthogonal search directions $Q$ is to randomly subsample the natural basis, $Q = I$ , which corresponds to performing our algorithm directly in pixel space. Essentially each iteration we are increasing or decreasing one color of a single randomly chosen pixel. Alternatively, we can consider directions in frequency domain. Recent work has discovered that random noise in low frequency space are more likely to be adversarial (Guo et al., 2018). To exploit this fact, we follow Guo et al. (2018) and propose to exploit the discrete cosine transform (DCT). The discrete cosine transform is an orthonormal transformation that maps signals in a 2D image space $\\mathbb { R } ^ { d \\times d }$ to frequency coefficients corresponding to magnitudes of wave functions. In what follows, we will refer to the set of orthonormal frequencies extracted by the DCT as $Q _ { \\mathrm { D C T } }$ . While the full set of directions $Q _ { \\mathrm { D C T } }$ contains $d \\times d$ frequencies, we keep only a fraction $r$ of the lowest frequency directions in order to make the adversarial perturbation in the low frequency space. ",
353
+ "bbox": [
354
+ 174,
355
+ 414,
356
+ 825,
357
+ 580
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "Choosing a learning rate \u000f. Given any set of search directions $Q$ , some directions may decrease $p _ { h } ( y \\mid \\mathbf { x } )$ more than others. Furthermore, it is not naively obvious that arbitrary steps along any direction $\\mathbf { q } _ { i }$ decrease the probability. It is possible for the probability $p _ { h } ( y \\mid { \\bf x } + \\epsilon { \\bf q } _ { i } )$ to be nonmonotonic in $\\epsilon$ . In Figure 1, we plot the relative decrease in probability as a function of $\\epsilon$ for randomly sampled search directions in both pixel space and the DCT space. This figure highlights an illuminating result: the probability $p _ { h } ( y \\mid { \\bf x } \\pm \\epsilon { \\bf q } )$ decreases monotonically in $\\epsilon$ with surprising consistency (across random images and vectors q)! Although some directions eventually increase the true class probability, the expected change in this probability is negative with a relatively steep slope. This means that our algorithm is not overly sensitive to the choice of $\\epsilon$ and the iterates will decrease the true class probability quickly. The figure also shows that search in the DCT space tends to lead to steeper descent directions than pixel space. As we show in the next section, we can tightly bound the final $L _ { 2 }$ -norm of the perturbation given a choice of $\\epsilon$ and maximum number of steps $T$ , so the choice of $\\epsilon$ depends primarily on budget considerations with respect to $\\lVert \\delta \\rVert _ { 2 }$ . ",
364
+ "bbox": [
365
+ 173,
366
+ 588,
367
+ 825,
368
+ 768
369
+ ],
370
+ "page_idx": 3
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "3.2 BUDGET CONSIDERATIONS. ",
375
+ "text_level": 1,
376
+ "bbox": [
377
+ 176,
378
+ 785,
379
+ 405,
380
+ 799
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "Each iteration of our algorithm strictly increases the norm of the adversarial perturbation $\\delta _ { i } \\ =$ $\\epsilon \\mathbf { q } _ { i }$ . By exploiting the orthonormality of the basis $Q$ , we can bound this change tightly. Let $\\alpha _ { i } \\in$ $\\{ - \\epsilon , 0 , \\epsilon \\}$ denote the sign of the search direction chosen at step $i$ , so ",
387
+ "bbox": [
388
+ 174,
389
+ 811,
390
+ 823,
391
+ 853
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "equation",
397
+ "img_path": "images/281e4819b4b98a57958284771e7700f1a716d4852a1192a9227fcb7af81e6995.jpg",
398
+ "text": "$$\n\\delta _ { i + 1 } = \\delta _ { i } + \\alpha _ { i } { \\bf q } _ { i } .\n$$",
399
+ "text_format": "latex",
400
+ "bbox": [
401
+ 437,
402
+ 861,
403
+ 560,
404
+ 877
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "We can recursively expand $\\delta _ { i + 1 } = \\delta _ { i - 1 } + \\alpha _ { i - 1 } { \\bf q } _ { i - 1 } + \\alpha _ { i } { \\bf q } _ { i }$ . In general, the final perturbation $\\delta _ { T }$ after $T$ steps can be written as a sum of these individual search directions: ",
411
+ "bbox": [
412
+ 171,
413
+ 103,
414
+ 821,
415
+ 132
416
+ ],
417
+ "page_idx": 4
418
+ },
419
+ {
420
+ "type": "equation",
421
+ "img_path": "images/adca316baf619133cee51a6f97ad597244985ab64d6af3e6be16332f7e38e04d.jpg",
422
+ "text": "$$\n\\delta _ { T } = \\sum _ { i = 1 } ^ { T } \\alpha _ { i } \\mathbf { q } _ { i } .\n$$",
423
+ "text_format": "latex",
424
+ "bbox": [
425
+ 446,
426
+ 136,
427
+ 552,
428
+ 180
429
+ ],
430
+ "page_idx": 4
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "Since the directions $\\mathbf { q } _ { i }$ are orthogonal, $\\mathbf { q } _ { i } ^ { \\top } \\mathbf { q } _ { j } = 0$ for any $i \\neq j$ . We can therefore compute the $L _ { 2 }$ -norm of the adversarial perturbation: ",
435
+ "bbox": [
436
+ 174,
437
+ 184,
438
+ 823,
439
+ 214
440
+ ],
441
+ "page_idx": 4
442
+ },
443
+ {
444
+ "type": "equation",
445
+ "img_path": "images/664fe05300f694efd2f549bbc2259d345ca4bea052d16b31839fdd9856a36b0a.jpg",
446
+ "text": "$$\n\\lVert \\delta _ { T } \\rVert _ { 2 } ^ { 2 } = \\left. \\sum _ { i = 1 } ^ { T } \\alpha _ { i } \\mathbf { q } _ { i } \\right. _ { 2 } ^ { 2 } = \\sum _ { i = 1 } ^ { T } \\lVert \\alpha _ { i } \\mathbf { q } _ { i } \\rVert _ { 2 } ^ { 2 } = \\sum _ { i = 1 } ^ { T } \\alpha _ { i } ^ { 2 } \\lVert \\mathbf { q } _ { i } \\rVert _ { 2 } ^ { 2 } \\leq T \\epsilon ^ { 2 } .\n$$",
447
+ "text_format": "latex",
448
+ "bbox": [
449
+ 294,
450
+ 218,
451
+ 704,
452
+ 265
453
+ ],
454
+ "page_idx": 4
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "Here, the second equality follows from the orthogonality of $\\mathbf { q } _ { i }$ and ${ \\bf q } _ { j }$ , and the last inequality is tight √if all queries result in a step of either $\\epsilon$ or $- \\epsilon$ . Thus the adversarial perturbation has $L _ { 2 }$ -norm at most $\\sqrt { T } \\epsilon$ after $T$ iterations. The same analysis holds when using any orthonormal basis (e.g. $Q _ { \\mathrm { D C T } }$ ). ",
459
+ "bbox": [
460
+ 174,
461
+ 268,
462
+ 825,
463
+ 313
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "This result highlights an important trade-off for our method. For query-limited scenarios, we may reduce the number of iterations by setting $\\epsilon$ higher, incurring higher perturbation $L _ { 2 }$ -norm. If a low norm solution is more desirable, reducing $\\epsilon$ will allow quadratically more queries at the same $L _ { 2 }$ -norm. A more thorough theoretical analysis of this trade-off could improve query efficiency. ",
470
+ "bbox": [
471
+ 174,
472
+ 319,
473
+ 825,
474
+ 376
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "4 EXPERIMENTAL EVALUATION ",
481
+ "text_level": 1,
482
+ "bbox": [
483
+ 176,
484
+ 395,
485
+ 452,
486
+ 411
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "In this section, we empirically evaluate our attack against a comprehensive list of known black-box attack algorithms: ZOO (Chen et al., 2017), the Boundary Attack (Brendel et al., 2017), Opt attack (Cheng et al., 2018), Low Frequency Boundary Attack (LFBA) (Guo et al., 2018), AutoZOOM (Tu et al., 2018), and the QL attack (Ilyas et al., 2018). Based on Eq. (??), there are three dimensions to evaluate black-box adversarial attacks on: how often the optimization problem finds a feasible point (success rate), how many queries were required $( B )$ , and the resulting perturbation norms $( \\rho )$ . ",
493
+ "bbox": [
494
+ 173,
495
+ 426,
496
+ 825,
497
+ 511
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "image",
503
+ "img_path": "images/5c6f39b033bc83dde2df4535d2a01dd32211186862e55a6725a99162fa5e49f0.jpg",
504
+ "image_caption": [
505
+ "Figure 2: Comparison of success rate versus number of model queries for untargeted (left) and targeted (right) attacks. Horizontal axis shows queries in log scale. For boundary attack and LFBA, success is defined as achieving a perturbation $L _ { 2 }$ -norm of 10 or less. Note that both SimBA and SimBA-DCT achieve a high success rate very quickly. "
506
+ ],
507
+ "image_footnote": [],
508
+ "bbox": [
509
+ 171,
510
+ 521,
511
+ 818,
512
+ 717
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "4.1 SETUP ",
519
+ "text_level": 1,
520
+ "bbox": [
521
+ 174,
522
+ 814,
523
+ 261,
524
+ 828
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "We first compare all methods on the ImageNet validation set. We present numbers reported by the original authors’ papers in comparison to ours where applicable. For methods where the required values were unavailable (the boundary attack, LFBA, and the QL attack), we evaluate these methods ourselves using hyperparameters suggested by the authors. For all original and reproduced results, we sample a set of 1000 images from the ImageNet validation set that are initially classified correctly to avoid artifically inflating the success rate. ",
531
+ "bbox": [
532
+ 174,
533
+ 839,
534
+ 825,
535
+ 924
536
+ ],
537
+ "page_idx": 4
538
+ },
539
+ {
540
+ "type": "image",
541
+ "img_path": "images/e0d277a68c5031f553128bbc34a263ad2a02f03ec261b203de110b13d0493ac0.jpg",
542
+ "image_caption": [
543
+ "Figure 3: Histogram of queries required until a successful model attack (over 1000 target images). SimBA-DCT is highly skew-right, suggesting that only a handful of images require more than a small number of queries. The median number of queries required by SimBA-DCT is only 582. "
544
+ ],
545
+ "image_footnote": [],
546
+ "bbox": [
547
+ 171,
548
+ 97,
549
+ 823,
550
+ 296
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "table",
556
+ "img_path": "images/734074d0526336e7b0b6c3dba8a3deab42184b390887c38658d53c62e85a714f.jpg",
557
+ "table_caption": [],
558
+ "table_footnote": [],
559
+ "table_body": "<table><tr><td colspan=\"4\">Untargeted</td><td colspan=\"4\"></td></tr><tr><td>Attack</td><td>Averagequeries</td><td>Successrate</td><td>AverageL2</td><td></td><td>Targeted</td><td>Successrate</td><td>AverageL2</td></tr><tr><td>ZO0</td><td>192,000</td><td>88.9%</td><td>1.20</td><td>Attack</td><td>Average queries</td><td></td><td></td></tr><tr><td>Boundary attack</td><td>123,407</td><td>100%</td><td>5.98</td><td>QL-attack</td><td>20.614</td><td>98.7%</td><td>11.39</td></tr><tr><td>Opt-attack</td><td>71,100</td><td>100%</td><td>6.98</td><td>AutoZOOM</td><td>13,525</td><td>100%</td><td>26.74</td></tr><tr><td>LFBA</td><td>30,000</td><td>100%</td><td>6.34</td><td>SimBA</td><td>7,899</td><td>100%</td><td>8.83</td></tr><tr><td>SimBA</td><td>1,665</td><td>98.6%</td><td>3.77</td><td>SimBA-DCT</td><td>9,182</td><td>96.0%</td><td>7.02</td></tr><tr><td>SimBA-DCT</td><td>1,232</td><td>98.3%</td><td>3.09</td><td></td><td></td><td></td><td></td></tr></table>",
560
+ "bbox": [
561
+ 173,
562
+ 362,
563
+ 823,
564
+ 444
565
+ ],
566
+ "page_idx": 5
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "Table 1: Average query count for untargeted (left) and targeted (right) attacks. Both SimBA and SimBA-DCT have comparable success rate to other algorithms, but require a significantly fewer number of model queries. This effect is especially dramatic for untargeted attack, where the number of queries made by SimBA-DCT is 24 times fewer than all other methods. ",
571
+ "bbox": [
572
+ 173,
573
+ 455,
574
+ 825,
575
+ 510
576
+ ],
577
+ "page_idx": 5
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "We also evaluate SimBA in the real-world setting of attacking the Google Cloud Vision API. Due to the extreme budget required by baselines that might cost up to $\\$ 300$ per image2, we compare here only to LFBA, which we found to be the most query efficient baseline. ",
582
+ "bbox": [
583
+ 174,
584
+ 537,
585
+ 825,
586
+ 579
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "In our experiments, we limit SimBA and SimBA-DCT to at most $T = 1 0 , 0 0 0$ iterations for untargeted attacks and to $T = 3 0 , 0 0 0$ for targeted attacks. For SimBA-DCT, we use we keep the first 1/8th of all frequencies, and add an additional 1/32nd of the frequencies whenever we run out of frequencies without succeeding. For both methods, we use a fixed step size of $\\epsilon = 0 . 2$ . ",
593
+ "bbox": [
594
+ 174,
595
+ 587,
596
+ 825,
597
+ 642
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "4.2 IMAGENET RESULTS ",
604
+ "text_level": 1,
605
+ "bbox": [
606
+ 176,
607
+ 660,
608
+ 357,
609
+ 674
610
+ ],
611
+ "page_idx": 5
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "Evaluating success rate (Figure 2). We first demonstrate the query efficiency of our method by showing that the average success rate increases dramatically faster than other methods with the same number of queries. Figure 2 compares SimBA and SimBA-DCT to the boundary attack and LFBA in the untargeted setting, and to the QL attack for the targeted setting. Since both boundary attack and LFBA are initialized with inputs of the adversarial class and gradually reduce $L _ { 2 }$ perturbation norm, we define success as reducing the $L _ { 2 }$ -norm to 10 or below. For untargeted attack (left plot), the success rate for both SimBA and SimBA-DCT increase very quickly. LFBA is competitive with SimBA and SimBA-DCT until iteration 1000, but the final success rate is much worse than both methods. A similar result can be seen for targeted attack (right plot), where SimBA and SimBADCT outperform QL attack dramatically in terms of query efficiency. ",
616
+ "bbox": [
617
+ 174,
618
+ 685,
619
+ 825,
620
+ 825
621
+ ],
622
+ "page_idx": 5
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "Query distributions. In Figure 3 we plot the histogram of model queries made by both SimBA and SimBA-DCT over 1000 random images. Notice that the distributions are highly skewed so the median query count is much smaller than the average query count reported in Table 1. These median counts for SimBA and SimBA-DCT are only 944 and 582, respectively. In the targeted case, while the majority of images can be successfully attacked with very few model evaluations, SimBADCT failed to find an adversarial perturbation for approximately $2 . 5 \\%$ of the images. Nevertheless, SimBA is achieves a success rate of $1 0 0 \\%$ within 7,899 average queries. ",
627
+ "bbox": [
628
+ 174,
629
+ 840,
630
+ 823,
631
+ 896
632
+ ],
633
+ "page_idx": 5
634
+ },
635
+ {
636
+ "type": "image",
637
+ "img_path": "images/db590b8ee2cbb10bb154afc4de63741e4e286b9f65d2f71e31a30752da880881.jpg",
638
+ "image_caption": [
639
+ "Figure 4: Comparison of success rate versus number of model queries across different network architectures for untargeted SimBA (left) and SimBA-DCT (right) attacks. For all networks, SimBADCT is more query efficient by at least a factor of 2. DenseNet is the most vulnerable against both attacks, admitting a success rate of almost $1 0 0 \\%$ after only 10,000 queries for SimBA and 4000 queries for SimBA-DCT. Inception v3 is much more difficult to attack for both methods. "
640
+ ],
641
+ "image_footnote": [],
642
+ "bbox": [
643
+ 171,
644
+ 97,
645
+ 818,
646
+ 297
647
+ ],
648
+ "page_idx": 6
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "",
653
+ "bbox": [
654
+ 174,
655
+ 405,
656
+ 825,
657
+ 446
658
+ ],
659
+ "page_idx": 6
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "Aggregate statistics (Table 1). Table 1 computes aggregate statistics of model queries, success rate, and perturbation $L _ { 2 }$ -norm across different attack algorithms. The target model is a pretrained ResNet-50 (He et al., 2016) network, with the exception of AutoZOOM, which used an Inception v3 (Szegedy et al., 2016) network. All methods achieve a similar success rate except for ZOO, which has a reported success rate of ${ \\mathrm { 8 8 . 9 \\% } }$ . The success rate for boundary attack and LFBA are always $1 0 0 \\%$ since both methods begin with very large perturbations to guarantee misclassification and gradually reduce the perturbation norm. Both SimBA and SimBA-DCT have lower average $L _ { 2 }$ -norm than all methods except for ZOO for untargeted attacks, while requiring an order of magnitude fewer queries (at 1665 and 1232, respectively). For targeted attack (right table), all the evaluated methods have much more similar query count, but both SimBA and SimBA-DCT still require significantly fewer queries than QL attack and AutoZOOM, and the $L _ { 2 }$ -norm of constructed perturbation is also much lower. ",
664
+ "bbox": [
665
+ 174,
666
+ 463,
667
+ 483,
668
+ 795
669
+ ],
670
+ "page_idx": 6
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "Evaluating different networks (Figure 4). To verify that our attack is robust against different model architectures, we evaluate SimBA and SimBA-DCT additionally against DenseNet-121 (Huang et al., 2017a) and Inception v3 (Szegedy et al., 2016) networks. Figure 4 shows success rate across the number of model queries for an untargeted attack against ",
675
+ "bbox": [
676
+ 174,
677
+ 811,
678
+ 483,
679
+ 922
680
+ ],
681
+ "page_idx": 6
682
+ },
683
+ {
684
+ "type": "image",
685
+ "img_path": "images/185717453b53aee51e17b3ad09b3f93837df2a5cd7cc17e6db665519e81e43d1.jpg",
686
+ "image_caption": [
687
+ "Figure 5: Randomly selected images before and after adversarial perturbation by SimBA, SimBADCT and boundary attack. The constructed perturbation is imperceptible for all three methods, but the $L _ { 2 }$ -norm for SimBA and SimBA-DCT is significantly lower than boundary attack across all images, despite allowing boundary attack to make 60,000 queries. In comparison, our methods are capable of constructing an adversarial example in as few as 36 queries. Zoom in for detail. "
688
+ ],
689
+ "image_footnote": [],
690
+ "bbox": [
691
+ 501,
692
+ 474,
693
+ 820,
694
+ 768
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "image",
700
+ "img_path": "images/f9bfccb10b14cc731fbe504da93bbd43da7c023d54f5277d521cf6335835b304.jpg",
701
+ "image_caption": [
702
+ "Figure 6: Screenshot of Google Cloud Vision labeling results on a randomly chosen image before and after adversarial perturbation. While the labels for the adversarial image are still reasonable, the concept bird has been completely removed. See Supplementary Material for additional samples. "
703
+ ],
704
+ "image_footnote": [],
705
+ "bbox": [
706
+ 173,
707
+ 101,
708
+ 821,
709
+ 257
710
+ ],
711
+ "page_idx": 7
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "the three different network architectures. ResNet-50 and DenseNet-121 exhibit a similar degree of vulnerability against our attacks. However, Inception v3 is noticeably more difficult to attack, requiring more than 10,000 queries to successfully attack with some images. ",
716
+ "bbox": [
717
+ 174,
718
+ 338,
719
+ 825,
720
+ 380
721
+ ],
722
+ "page_idx": 7
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "Qualitative results (Figure 5). For qualitative evaluation of our method, we present several randomly selected images before and after adversarial perturbation by untargeted attack. For comparison, we attack the same set of images using boundary attack for 30,000 iterations (60,000 model queries). Figure 5 shows the clean and perturbed images along with the perturbation $L _ { 2 }$ -norm and number of queries. While all attacks are highly successful at changing the label, SimBA and SimBADCT require much fewer queries and the resulting perturbation norm is also much smaller than that of boundary attack. In fact, SimBA-DCT was able to find an adversarial image in as few as 36 model queries! Notice that the perturbation produced by SimBA contains sparse but sharp differences, constituting a low $L _ { 0 }$ norm but relatively high $L _ { \\infty }$ norm. However, SimBA-DCT produces perturbations that are sparse in frequency space, but the resulting change in pixel space is spread out across all pixels. ",
727
+ "bbox": [
728
+ 173,
729
+ 395,
730
+ 825,
731
+ 547
732
+ ],
733
+ "page_idx": 7
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "4.3 GOOGLE CLOUD VISION ATTACK",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 178,
741
+ 565,
742
+ 442,
743
+ 579
744
+ ],
745
+ "page_idx": 7
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "To demonstrate the effectiveness of our attack against real world systems, we attack the Google Cloud Vision API, an online machine learning service that provides labels for arbitrary input images. For a given image, the API returns a list of top concepts contained in the image and their associated probabilities. Since the full list of probabilities associated with every label is unavailable, we define an untargeted attack that aims to remove the top 3 concepts in the original. We use the maximum of the original top 3 concepts’ returned probabilities as the adversarial loss and use SimBA to minimize this loss. Figure 6 shows a sample random image before and after the attack. The top 3 concepts, in particular the concept bird, have been removed in the adversarial image. ",
750
+ "bbox": [
751
+ 174,
752
+ 592,
753
+ 483,
754
+ 827
755
+ ],
756
+ "page_idx": 7
757
+ },
758
+ {
759
+ "type": "image",
760
+ "img_path": "images/5a9be383d241f2bbc4e0ccc0b2582d537471b9498dec0583ff3064ca9276c752.jpg",
761
+ "image_caption": [
762
+ "Figure 7: Plot of success rate across number of model queries for Google Cloud Vision attack. SimBA is able to achieve close to $7 0 \\%$ success rate after only 5000 queries, while the success rate for LFBA has only reached $2 5 \\%$ . "
763
+ ],
764
+ "image_footnote": [],
765
+ "bbox": [
766
+ 496,
767
+ 561,
768
+ 820,
769
+ 744
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "Since our attack can be executed efficiently, we evaluate its effectiveness over an aggregate of 50 random images. For the LFBA baseline, we define an attack as successful if the produced perturbation has an $L _ { 2 }$ -norm of at most the highest $L _ { 2 }$ -norm in a successful run of our attack. Figure 7 shows the average success rate of both attacks across number of queries. SimBA achieves a final success rate of $7 0 \\%$ after only 5000 API calls, while LFBA is able to succeed only $2 5 \\%$ of the time under the same query budge. To the best of our knowledge, this is the first adversarial attack result on Google Cloud Vision that has a high reported success rate within very limited number of queries. ",
776
+ "bbox": [
777
+ 174,
778
+ 835,
779
+ 825,
780
+ 917
781
+ ],
782
+ "page_idx": 7
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "",
787
+ "bbox": [
788
+ 173,
789
+ 103,
790
+ 825,
791
+ 132
792
+ ],
793
+ "page_idx": 8
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "5 RELATED WORK ",
798
+ "text_level": 1,
799
+ "bbox": [
800
+ 176,
801
+ 151,
802
+ 344,
803
+ 167
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Many recent studies have shown that both white-box and black-box attacks can be applied to a diverse set of tasks. Computer vision models for image segmentation and object detection have also been shown to be vulnerable against adversarial perturbations (Cisse et al., 2017a; Xie et al., 2017). Carlini & Wagner (2018) performed a systematic study of speech recognition attacks and showed that robust adversarial examples that alter the transcription model to output arbitrary target phrases can be constructed. Attacks on neural network policies (Huang et al., 2017b; Behzadan & Munir, 2017) have also been shown to be permissible. ",
810
+ "bbox": [
811
+ 174,
812
+ 183,
813
+ 825,
814
+ 281
815
+ ],
816
+ "page_idx": 8
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "As these attacks become prevalent, many recent works have focused on designing defenses against adversarial examples. One common class of defenses applies an image transformation prior to classification, which aims to remove the adversarial perturbation without changing the image content (Xu et al., 2017; Dziugaite et al., 2016; Guo et al., 2017). Instead of requiring the model to correctly classify all adversarial images, another strategy is to detect the attack and output an adversarial class when certain statistics of the input appear abnormal (Li & Li, 2017; Metzen et al., 2017; Meng & Chen, 2017; Lu et al., 2017). The training procedure can also be strengthened by including the adversarial loss as an implicit or explicit regularizer to promote robustness against adversarial perturbations (Tramer et al., 2017; Madry et al., 2017; Cisse et al., 2017b). While these defenses \\` have shown great success against a passive adversary, almost all of them can be easily defeated by modifying the attack strategy (Carlini & Wagner, 2017a; Athalye & Carlini, 2018; Athalye et al., 2018). ",
821
+ "bbox": [
822
+ 174,
823
+ 287,
824
+ 825,
825
+ 454
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "Relative to defenses against white-box attacks, few studies have focused on defending against adversaries that may only access the model via black-box queries. While transfer attacks can be effectively mitigated by methods such as ensemble adversarial training (Tramer et al., 2017) and image \\` transformation (Guo et al., 2017), it is unknown whether existing defense strategies can be applied to adaptive adversaries that may access the model via queries. Guo et al. (2018) have shown that the boundary attack is susceptible to image transformations that quantize the decision boundary, but employing the attack in low frequency space can successfully circumvent these transformation defenses. Given the query efficiency and real world applicability of our proposed black-box attacks, we hope that more research can be dedicated towards defending against malicious adversaries under this threat model. ",
832
+ "bbox": [
833
+ 174,
834
+ 462,
835
+ 825,
836
+ 601
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "6 CONCLUSION ",
843
+ "text_level": 1,
844
+ "bbox": [
845
+ 176,
846
+ 621,
847
+ 318,
848
+ 637
849
+ ],
850
+ "page_idx": 8
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "We proposed SimBA, a simple black-box adversarial attack that takes small steps iteratively towards the decision boundary, and demonstrated through extensive experiment its unprecedented query efficiency in both the untargeted and targeted settings. Due to its accessibility, we hope that this method establishes a strong baseline for future research on black-box adversarial examples. ",
855
+ "bbox": [
856
+ 174,
857
+ 652,
858
+ 823,
859
+ 708
860
+ ],
861
+ "page_idx": 8
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "While we intentionally avoid more sophisticated techniques to improve the method in favor of simplicity, we believe that additional modifications can still dramatically decrease the number of model queries. One possible extension could be to further investigate the selection of different sets of orthonormal bases, which could be crucial to the efficiency of our method by increasing the probability of finding a direction of large change. Another area for improvement is the adaptive selection of the step size $\\epsilon$ to optimally consume the distance and query budgets. ",
866
+ "bbox": [
867
+ 174,
868
+ 715,
869
+ 823,
870
+ 799
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "Given that our method has relatively few requirements, it is conceivable that it can be applied to any task for which the target model returns a continuous score for the prediction. For instance, speech recognition systems are trained to maximize the probability of the correct transcription, and neural network policies are trained to maximize some reward function over the set of actions conditioned on the current environment. A simple iterative algorithm that modifies the input at random elements may prove to be effective in these scenarios. We leave these directions for future work. ",
877
+ "bbox": [
878
+ 174,
879
+ 806,
880
+ 823,
881
+ 890
882
+ ],
883
+ "page_idx": 8
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "REFERENCES ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 176,
891
+ 103,
892
+ 287,
893
+ 117
894
+ ],
895
+ "page_idx": 9
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "Anish Athalye and Nicholas Carlini. On the robustness of the CVPR 2018 white-box adversarial example defenses. CoRR, abs/1804.03286, 2018. URL http://arxiv.org/abs/1804. 03286. ",
900
+ "bbox": [
901
+ 173,
902
+ 126,
903
+ 823,
904
+ 167
905
+ ],
906
+ "page_idx": 9
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "Anish Athalye, Nicholas Carlini, and David A. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. CoRR, abs/1802.00420, 2018. URL http://arxiv.org/abs/1802.00420. ",
911
+ "bbox": [
912
+ 176,
913
+ 178,
914
+ 821,
915
+ 220
916
+ ],
917
+ "page_idx": 9
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "Vahid Behzadan and Arslan Munir. Vulnerability of deep reinforcement learning to policy induction attacks. CoRR, abs/1701.04143, 2017. ",
922
+ "bbox": [
923
+ 171,
924
+ 228,
925
+ 825,
926
+ 258
927
+ ],
928
+ "page_idx": 9
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. CoRR, abs/1712.04248, 2017. URL http: //arxiv.org/abs/1712.04248. ",
933
+ "bbox": [
934
+ 176,
935
+ 266,
936
+ 823,
937
+ 309
938
+ ],
939
+ "page_idx": 9
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "Nicholas Carlini and David A. Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. CoRR, abs/1705.07263, 2017a. ",
944
+ "bbox": [
945
+ 168,
946
+ 318,
947
+ 823,
948
+ 347
949
+ ],
950
+ "page_idx": 9
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "Nicholas Carlini and David A. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, pp. 39–57, 2017b. ",
955
+ "bbox": [
956
+ 169,
957
+ 356,
958
+ 823,
959
+ 386
960
+ ],
961
+ "page_idx": 9
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "Nicholas Carlini and David A. Wagner. Audio adversarial examples: Targeted attacks on speech-totext. CoRR, abs/1801.01944, 2018. URL http://arxiv.org/abs/1801.01944. ",
966
+ "bbox": [
967
+ 173,
968
+ 393,
969
+ 821,
970
+ 422
971
+ ],
972
+ "page_idx": 9
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. ZOO: zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, AISec@CCS 2017, Dallas, TX, USA, November 3, 2017, pp. 15–26, 2017. doi: 10.1145/3128572.3140448. URL http://doi.acm.org/10.1145/3128572.3140448. ",
977
+ "bbox": [
978
+ 173,
979
+ 431,
980
+ 823,
981
+ 502
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Minhao Cheng, Thong Le, Pin-Yu Chen, Jinfeng Yi, Huan Zhang, and Cho-Jui Hsieh. Queryefficient hard-label black-box attack: An optimization-based approach. CoRR, abs/1807.04457, 2018. URL http://arxiv.org/abs/1807.04457. ",
988
+ "bbox": [
989
+ 174,
990
+ 510,
991
+ 821,
992
+ 554
993
+ ],
994
+ "page_idx": 9
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "Moustapha Cisse, Yossi Adi, Natalia Neverova, and Joseph Keshet. Houdini: Fooling deep structured prediction models. CoRR, abs/1707.05373, 2017a. ",
999
+ "bbox": [
1000
+ 174,
1001
+ 561,
1002
+ 821,
1003
+ 592
1004
+ ],
1005
+ "page_idx": 9
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. CoRR, abs/1704.08847, 2017b. ",
1010
+ "bbox": [
1011
+ 174,
1012
+ 599,
1013
+ 823,
1014
+ 630
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "Gintare Karolina Dziugaite, Zoubin Ghahramani, and Daniel Roy. A study of the effect of JPG compression on adversarial images. CoRR, abs/1608.00853, 2016. ",
1021
+ "bbox": [
1022
+ 173,
1023
+ 637,
1024
+ 823,
1025
+ 666
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proc. ICLR, 2015. ",
1032
+ "bbox": [
1033
+ 173,
1034
+ 675,
1035
+ 825,
1036
+ 704
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens van der Maaten. Countering adversarial ´ images using input transformations. CoRR, abs/1711.00117, 2017. URL http://arxiv. org/abs/1711.00117. ",
1043
+ "bbox": [
1044
+ 171,
1045
+ 713,
1046
+ 823,
1047
+ 756
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Chuan Guo, Jared S. Frank, and Kilian Q. Weinberger. Low frequency adversarial perturbations. CoRR, abs/1809.08758, 2018. URL http://arxiv.org/abs/1809.08758. ",
1054
+ "bbox": [
1055
+ 171,
1056
+ 765,
1057
+ 825,
1058
+ 795
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, pp. 770–778, 2016. ",
1065
+ "bbox": [
1066
+ 171,
1067
+ 803,
1068
+ 823,
1069
+ 832
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Gao Huang, Zhuang Liu, Kilian Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Proc. CVPR, pp. 2261–2269, 2017a. ",
1076
+ "bbox": [
1077
+ 171,
1078
+ 840,
1079
+ 823,
1080
+ 869
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. CoRR, abs/1702.02284, 2017b. ",
1087
+ "bbox": [
1088
+ 173,
1089
+ 877,
1090
+ 823,
1091
+ 907
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmassan, Stockholm, Sweden, July 10-15, 2018 ¨ , pp. 2142–2151, 2018. URL http://proceedings.mlr.press/v80/ilyas18a.html. ",
1098
+ "bbox": [
1099
+ 176,
1100
+ 103,
1101
+ 825,
1102
+ 160
1103
+ ],
1104
+ "page_idx": 10
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. CoRR, abs/1611.01236, 2016. ",
1109
+ "bbox": [
1110
+ 173,
1111
+ 169,
1112
+ 823,
1113
+ 196
1114
+ ],
1115
+ "page_idx": 10
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pp. 5775–5783, 2017. doi: 10.1109/ICCV.2017.615. URL https: //doi.org/10.1109/ICCV.2017.615. ",
1120
+ "bbox": [
1121
+ 173,
1122
+ 207,
1123
+ 825,
1124
+ 262
1125
+ ],
1126
+ "page_idx": 10
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Jiajun Lu, Theerasit Issaranon, and David A. Forsyth. Safetynet: Detecting and rejecting adversarial examples robustly. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pp. 446–454, 2017. doi: 10.1109/ICCV.2017.56. URL https: //doi.org/10.1109/ICCV.2017.56. ",
1131
+ "bbox": [
1132
+ 173,
1133
+ 272,
1134
+ 825,
1135
+ 329
1136
+ ],
1137
+ "page_idx": 10
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. CoRR, abs/1706.06083, 2017. URL http://arxiv.org/abs/1706.06083. ",
1142
+ "bbox": [
1143
+ 176,
1144
+ 337,
1145
+ 825,
1146
+ 381
1147
+ ],
1148
+ "page_idx": 10
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Dongyu Meng and Hao Chen. Magnet: A two-pronged defense against adversarial examples. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, CCS 2017, Dallas, TX, USA, October 30 - November 03, 2017, pp. 135–147, 2017. doi: 10.1145/ 3133956.3134057. URL http://doi.acm.org/10.1145/3133956.3134057. ",
1153
+ "bbox": [
1154
+ 173,
1155
+ 388,
1156
+ 825,
1157
+ 445
1158
+ ],
1159
+ "page_idx": 10
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. CoRR, abs/1702.04267, 2017. URL http://arxiv.org/abs/1702. 04267. ",
1164
+ "bbox": [
1165
+ 173,
1166
+ 454,
1167
+ 823,
1168
+ 497
1169
+ ],
1170
+ "page_idx": 10
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. In Proc. CVPR, pp. 2574–2582, 2016. ",
1175
+ "bbox": [
1176
+ 171,
1177
+ 506,
1178
+ 823,
1179
+ 535
1180
+ ],
1181
+ "page_idx": 10
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proc. CVPR, pp. 86–94, 2017. ",
1186
+ "bbox": [
1187
+ 169,
1188
+ 542,
1189
+ 823,
1190
+ 573
1191
+ ],
1192
+ "page_idx": 10
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Ali Shafahi, W. Ronny Huang, Christoph Studer, Soheil Feizi, and Tom Goldstein. Are adversarial examples inevitable? CoRR, abs/1809.02104, 2018. URL http://arxiv.org/abs/1809. 02104. ",
1197
+ "bbox": [
1198
+ 173,
1199
+ 580,
1200
+ 823,
1201
+ 623
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In In Proc. ICLR, 2014. ",
1208
+ "bbox": [
1209
+ 173,
1210
+ 632,
1211
+ 823,
1212
+ 662
1213
+ ],
1214
+ "page_idx": 10
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proc. CVPR, pp. 2818–2826, 2016. ",
1219
+ "bbox": [
1220
+ 173,
1221
+ 670,
1222
+ 825,
1223
+ 700
1224
+ ],
1225
+ "page_idx": 10
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick D. McDaniel. Ensemble \\` adversarial training: Attacks and defenses. CoRR, abs/1705.07204, 2017. ",
1230
+ "bbox": [
1231
+ 173,
1232
+ 708,
1233
+ 823,
1234
+ 738
1235
+ ],
1236
+ "page_idx": 10
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Chun-Chen Tu, Pai-Shun Ting, Pin-Yu Chen, Sijia Liu, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh, and Shin-Ming Cheng. Autozoom: Autoencoder-based zeroth order optimization method for attacking black-box neural networks. CoRR, abs/1805.11770, 2018. URL http://arxiv. org/abs/1805.11770. ",
1241
+ "bbox": [
1242
+ 173,
1243
+ 746,
1244
+ 825,
1245
+ 803
1246
+ ],
1247
+ "page_idx": 10
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Cihang Xie, Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and Alan L. Yuille. Adversarial examples for semantic segmentation and object detection. In ICCV, pp. 1378–1387. IEEE Computer Society, 2017. ",
1252
+ "bbox": [
1253
+ 173,
1254
+ 811,
1255
+ 823,
1256
+ 854
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. CoRR, abs/1704.01155, 2017. ",
1263
+ "bbox": [
1264
+ 171,
1265
+ 863,
1266
+ 825,
1267
+ 892
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "S1 SUPPLEMENTARY MATERIAL ",
1274
+ "text_level": 1,
1275
+ "bbox": [
1276
+ 174,
1277
+ 102,
1278
+ 459,
1279
+ 117
1280
+ ],
1281
+ "page_idx": 11
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "To demonstrate the generality of our evaluation of the Google Cloud Vision attack, we show 10 additional random images before and after perturbation by SimBA. In all cases, we successfully remove the top 3 original labels. ",
1286
+ "bbox": [
1287
+ 174,
1288
+ 133,
1289
+ 825,
1290
+ 176
1291
+ ],
1292
+ "page_idx": 11
1293
+ },
1294
+ {
1295
+ "type": "image",
1296
+ "img_path": "images/13166133a7c0be9e0360f5ebb32dc44fc47742e69f4ae53f3a8d2f9c3f08a4c5.jpg",
1297
+ "image_caption": [],
1298
+ "image_footnote": [],
1299
+ "bbox": [
1300
+ 207,
1301
+ 183,
1302
+ 792,
1303
+ 893
1304
+ ],
1305
+ "page_idx": 11
1306
+ },
1307
+ {
1308
+ "type": "image",
1309
+ "img_path": "images/f3b5f1296a0308812fb35c3a31a88070db640ad95b4da878cf2854887752e494.jpg",
1310
+ "image_caption": [
1311
+ "Figure S1: Additional adversarial images on Google Cloud Vision. "
1312
+ ],
1313
+ "image_footnote": [],
1314
+ "bbox": [
1315
+ 205,
1316
+ 143,
1317
+ 790,
1318
+ 847
1319
+ ],
1320
+ "page_idx": 12
1321
+ }
1322
+ ]
parse/train/rJeZS3RcYm/rJeZS3RcYm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJeZS3RcYm/rJeZS3RcYm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryxepo0cFX/ryxepo0cFX.md ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ANTISYMMETRICRNN: A DYNAMICAL SYSTEM VIEWON RECURRENT NEURAL NETWORKS
2
+
3
+ Bo Chang∗ University of British Columbia Vancouver, BC, Canada bchang@stat.ubc.ca
4
+
5
+ Minmin Chen
6
+ Google Brain
7
+ Mountain View, CA, USA minminc@google.com
8
+
9
+ Eldad Haber University of British Columbia Vancouver, BC, Canada haber@math.ubc.ca
10
+
11
+ Ed H. Chi
12
+ Google Brain
13
+ Mountain View, CA, USA edchi@google.com
14
+
15
+ # ABSTRACT
16
+
17
+ Recurrent neural networks have gained widespread use in modeling sequential data. Learning long-term dependencies using these models remains difficult though, due to exploding or vanishing gradients. In this paper, we draw connections between recurrent networks and ordinary differential equations. A special form of recurrent networks called the AntisymmetricRNN is proposed under this theoretical framework, which is able to capture long-term dependencies thanks to the stability property of its underlying differential equation. Existing approaches to improving RNN trainability often incur significant computation overhead. In comparison, AntisymmetricRNN achieves the same goal by design. We showcase the advantage of this new architecture through extensive simulations and experiments. AntisymmetricRNN exhibits much more predictable dynamics. It outperforms regular LSTM models on tasks requiring long-term memory and matches the performance on tasks where short-term dependencies dominate despite being much simpler.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ Recurrent neural networks (RNNs) (Rumelhart et al., 1986; Elman, 1990) have found widespread use across a variety of domains from language modeling (Mikolov et al., 2010; Kiros et al., 2015; Jozefowicz et al., 2016) and machine translation (Bahdanau et al., 2014) to speech recognition (Graves et al., 2013) and recommendation systems (Hidasi et al., 2015; Wu et al., 2017). Modeling complex temporal dependencies in sequential data using RNNs, especially the long-term dependencies, remains an open challenge. The main difficulty arises as the error signal back-propagated through time (BPTT) suffers from exponential growth or decay, a dilemma commonly referred to as exploding or vanishing gradient (Pascanu et al., 2012; Bengio et al., 1994).
22
+
23
+ Vanilla RNNs as originally proposed are particularly prone to these issues and are rarely used in practice. Gated variants of RNNs, such as long short-term memory (LSTM) networks (Hochreiter & Schmidhuber, 1997) and gated recurrent units (GRU) (Cho et al., 2014) that feature various forms of “gating” are proposed to alleviate these issues. The gates allow information to flow from inputs at any previous time steps to the end of the sequence more easily, partially addressing the vanishing gradient problem (Collins et al., 2016). In practice, these models must be paired with techniques such as normalization layers (Ioffe & Szegedy, 2015; Ba et al., 2016) and gradient clipping (Pascanu et al., 2013) to achieve good performance.
24
+
25
+ Identity and orthogonal initialization is another proposed solution to the exploding or vanishing gradient problem of deep neural networks (Le et al., 2015; Mishkin & Matas, 2015; Saxe et al., 2013; Chen et al., 2018a). Recently, Arjovsky et al. (2016); Wisdom et al. (2016); Hyland & Ratsch ¨ (2017); Xie et al. (2017); Zhang et al. (2018a) advocate going beyond initialization and forcing the weight matrices to be orthogonal throughout the entire learning process. However, some of these approaches come with significant computational overhead and reportedly hinder representation power of these models (Vorontsov et al., 2017). Moreover, orthogonal weight matrices alone do not prevent exploding and vanishing gradients, due to the nonlinear nature of deep neural networks as shown in (Pennington et al., 2017).
26
+
27
+ Here we offer a new perspective on the trainability of RNNs from the dynamical system viewpoint. While exploding gradient is a manifestation of the instability of the underlying dynamical system, vanishing gradient results from a lossy system, properties that have been widely studied in the dynamical system literature (Haber & Ruthotto, 2017; Laurent & von Brecht, 2017). The main contributions of the work are:
28
+
29
+ • We draw connections between RNNs and the ordinary differential equation theory and design new recurrent architectures by discretizing ODEs.
30
+ • The stability of the ODE solutions and the numerical methods for solving ODEs lead us to design a special form of RNNs, which we name AntisymmetricRNN, that can capture longterm dependencies in the inputs. The construction of the model is much simpler compared to the existing methods for improving RNN trainability.
31
+ We conduct extensive simulations and experiments to demonstrate the benefits of this new RNN architecture. AntisymmetricRNN exhibits well-behaved dynamics and outperforms the regular LSTM model on tasks requiring long-term memory, and matches its performance on tasks where short-term dependencies dominate with much fewer parameters.
32
+
33
+ # 2 RELATED WORK
34
+
35
+ Trainability of RNNs. Capturing long-term dependencies using RNNs has been a long-standing research topic with various approaches proposed. The first group of approaches mitigates the exploding or vanishing gradient issues by introducing some forms of gating. Long short-term memory networks (LSTM) (Hochreiter & Schmidhuber, 1997) and gated recurrent units (GRU) (Cho et al., 2014) are the most prominent models along this line of work. Parallel efforts include designing special neural architectures, such as hierarchical RNNs (El Hihi & Bengio, 1996), recursive neural networks (Socher et al., 2011), attention networks (Bahdanau et al., 2014), dilated convolutions (Yu & Koltun, 2015), recurrent batch normalization (Cooijmans et al., 2017), residual RNNs (Yue et al., 2018), and Fourier recurrent units (Zhang et al., 2018b). These, however, are fundamentally different networks with different tradeoffs.
36
+
37
+ Another direction is to constrain the weight matrices of an RNN so that the back-propagated error signal is well conditioned, in particular, the input-output Jacobian having unitary singular values. Le et al. (2015); Mikolov et al. (2014); Mishkin & Matas (2015) propose the use of identity or orthogonal matrix to initialize the recurrent weight matrix. Followup works further constrain the weight matrix throughout the entire learning process either through re-parametrization (Arjovsky et al., 2016), geodesic gradient descent on the Stiefel manifold (Wisdom et al., 2016; Vorontsov et al., 2017), or constraining the singular values (Jose et al., 2017; Kanai et al., 2017; Zhang et al., 2018a). It is worth noting that, orthogonal weights by themselves do not guarantee unitary Jacobians. Nonlinear activations still cause the gradients to explode or vanish. Contractive maps such as sigmoid and hyperbolic tangent lead to vanishing gradients. Chen et al. (2018a) offer an initialization scheme taking into account the nonlinearity. However, the theory developed relies heavily on the random matrix assumptions, which only hold at the initialization point of training. Although it has been shown to predict trainability beyond initialization.
38
+
39
+ Dynamical systems view of recurrent networks. Connections between dynamical systems and RNNs have not been well explored. Laurent & von Brecht (2017) study the behavior of dynamical systems induced by recurrent networks, and show that LSTMs and GRUs exhibit chaotic dynamics in the absence of input data. They propose a simplified gated RNN named the chaos free network (CFN), that has non-chaotic dynamics and achieves comparable performance to LSTMs and GRUs on language modeling. Tallec & Ollivier (2018) formulate RNNs as a time-discretized version of ODE and show that time invariance leads to gate-like mechanisms in RNNs. With this formulation, the authors propose an initialization scheme by setting the initial gate bias according to the range of time dependencies to capture.
40
+
41
+ Dynamical systems view of residual networks. Another line of work that is closely related to ours is the dynamical systems view on residual networks (ResNets) (He et al., 2016). Haber & Ruthotto (2017); Chang et al. (2018a;b); Lu et al. (2018) propose to interpret ResNets as ordinary differential equations (ODEs), under which learning the network parameters is equivalent to solve a parameter estimation problem involving the ODE. Chen et al. (2018b) parameterize the continuous dynamics of hidden units using an ODE specified by a neural network. Stable and reversible architectures are developed (Haber & Ruthotto, 2017; Chang et al., 2018a) from this viewpoint, which form the basis of our proposed recurrent networks.
42
+
43
+ # 3 ANTISYMMETRICRNNS
44
+
45
+ # 3.1 ORDINARY DIFFERENTIAL EQUATIONS
46
+
47
+ We first give a brief overview of the ordinary differential equations (ODEs), a special kind of dynamical systems that involves a single variable, time $t$ in this case. Consider the first-order ODE
48
+
49
+ $$
50
+ \begin{array} { r } { \pmb { h } ^ { \prime } ( t ) = f ( \pmb { h } ( t ) ) , } \end{array}
51
+ $$
52
+
53
+ for time $t \geq 0$ , where $\ b { h } ( t ) \in \mathbb { R } ^ { n }$ and $f : \mathbb { R } ^ { n } \mathbb { R } ^ { n }$ . Together with a given initial condition $\pmb { h } ( 0 )$ , the problem of solving for the function $h ( t )$ is called the initial value problem. For most ODEs, it is impossible to find an analytic solution. Instead, numerical methods relying on discretization are commonly used to approximate the solution. The forward Euler method is probably the best known and simplest numerical method for approximation. One way to derive the forward Euler method is to approximate the derivative on the left-hand side of Equation 1 by a finite difference, and evaluate the right-hand side at $\boldsymbol { h } _ { t - 1 }$ :
54
+
55
+ $$
56
+ \frac { h _ { t } - h _ { t - 1 } } { \epsilon } = f ( h _ { t - 1 } ) .
57
+ $$
58
+
59
+ Note that for the approximation to be valid, $\epsilon > 0$ should be small by the definition of the derivative. One can easily prove that the forward Euler method converges linearly w.r.t. $\epsilon$ , assuming $f ( h )$ is Lipschitz continuous on $^ { h }$ and that the eigenvalues of the Jacobian of $f$ have negative real parts. Rearranging it, we have the forward Euler method for a given initial value
60
+
61
+ $$
62
+ \begin{array} { r } { h _ { t } = h _ { t - 1 } + \epsilon f ( h _ { t - 1 } ) , \quad h _ { 0 } = h ( 0 ) . } \end{array}
63
+ $$
64
+
65
+ Geometrically, each forward Euler step takes a small step along the tangential direction to the exact trajectory starting at $h _ { t - 1 }$ . As a result, $\epsilon$ is usually referred to as the step size.
66
+
67
+ As an example, consider the ODE
68
+
69
+ $$
70
+ \pmb { h } ^ { \prime } ( t ) = \operatorname { t a n h } \left( \pmb { W } \pmb { h } ( t ) \right) .
71
+ $$
72
+
73
+ The forward Euler method approximates the solution to the ODE iteratively as
74
+
75
+ $$
76
+ h _ { t } = h _ { t - 1 } + \epsilon \operatorname { t a n h } ( W h _ { t - 1 } ) ,
77
+ $$
78
+
79
+ which can be regarded as a recurrent network without input data. Here $h _ { t }$ is the hidden state at the $t$ -th step, $W$ is a model parameter, and $\epsilon$ is a hyperparameter. This provides a general framework of designing recurrent network architectures by discretizing ODEs. As a result, we can design ODEs that possess desirable properties by exploiting the theoretical successes of dynamical systems, and the resulting recurrent networks will inherit these properties. Stability is one of the important properties to consider, which we will discuss in the next section. It is worth mentioning that the “skip connection” in this architecture resembles the residual RNN (Yue et al., 2018) and the Fourier RNN (Zhang et al., 2018b), which are proposed to mitigate the vanishing and exploding gradient issues.
80
+
81
+ # 3.2 STABILITY OF ORDINARY DIFFERENTIAL EQUATIONS: ANTISYMMETRICRNNS
82
+
83
+ In numerical analysis, stability theory addresses the stability of solutions of ODEs under small perturbations of initial conditions. In this section, we are going to establish the connections between the stability of an ODE and the trainability of the RNNs by discretizing the ODE, and design a new RNN architecture that is stable and capable of capturing long-term dependencies.
84
+
85
+ An ODE solution is stable if the long-term behavior of the system does not depend significantly on the initial conditions. A formal definition is given as follows.
86
+
87
+ Definition 1. (Stability) $A$ solution $h ( t )$ of the ODE in Equation $I$ with initial condition $\pmb { h } ( 0 )$ is stable if for any $\epsilon > 0$ , there exists a $\delta > 0$ such that any other solution $\tilde { h } ( t )$ of the ODE with initial condition $\tilde { \pmb { h } } ( 0 )$ satisfying $| h ( 0 ) - \tilde { h } ( 0 ) | \leq \delta$ also satisfies $| h ( t ) - \tilde { h } ( t ) | \leq \epsilon ,$ , for all $t \geq 0$ .
88
+
89
+ In plain language, given a small perturbation of size $\delta$ of the initial state, the effect of the perturbation on the subsequent states is no bigger than $\epsilon$ . The eigenvalues of the Jacobian matrix play a central role in stability analysis. Let $\bar { \ b { J } } ( \bar { t } ) \in \mathbb { R } ^ { n \times n }$ be the Jacobian matrix of $f$ , and $\lambda _ { i } ( \cdot )$ denotes the $i$ -th eigenvalue.
90
+
91
+ Proposition 1. The solution of an ODE is stable $i f$
92
+
93
+ $$
94
+ \operatorname* { m a x } _ { i = 1 , 2 , \ldots , n } R e ( \lambda _ { i } ( \pmb { J } ( t ) ) ) \leq 0 , \quad \forall t \geq 0 ,
95
+ $$
96
+
97
+ where $R e ( \cdot )$ denotes the real part of a complex number.
98
+
99
+ A more precise proposition that involves the kinematic eigenvalues of $\mathbf { } J ( t )$ is given in Ascher et al. (1994). Stability alone, however, does not suffice to capture long-term dependencies. As argued in Haber & Ruthotto (2017), $R e ( \lambda _ { i } ( J ( t ) ) ) \ll 0$ results in a lossy system; the energy or signal in the initial state is dissipated over time. Using such an ODE as the underlying dynamical system of a recurrent network will lead to catastrophic forgetting of the past inputs during the forward propagation. Ideally,
100
+
101
+ $$
102
+ R e ( \lambda _ { i } ( \pmb { J } ( t ) ) ) \approx 0 , \quad \forall i = 1 , 2 , \ldots , n ,
103
+ $$
104
+
105
+ a condition we referred to as the critical criterion. Under this condition, the system preserves the long-term dependencies of the inputs while being stable.
106
+
107
+ Stability and Trainability. Here we connect the stability of the ODE to the trainability of the RNN produced by discretization. Inherently, the stability analysis studies the sensitivity of a solution, i.e., how much a solution of the ODE would change w.r.t. changes in the initial condition. Differentiating Equation 1 with respect to the initial state $\bar { \pmb h } ( 0 )$ on both sides, we have the following sensitivity analysis (with chain rules):
108
+
109
+ $$
110
+ \frac { \mathrm { d } } { \mathrm { d } t } \left( \frac { \partial \pmb { h } ( t ) } { \partial \pmb { h } ( 0 ) } \right) = \pmb { J } ( t ) \frac { \partial \pmb { h } ( t ) } { \partial \pmb { h } ( 0 ) } .
111
+ $$
112
+
113
+ For notational simplicity, let us define $\pmb { A } ( t ) = \partial \pmb { h } ( t ) / \partial \pmb { h } ( 0 )$ , then we have
114
+
115
+ $$
116
+ \frac { \mathrm { d } \pmb { A } ( t ) } { \mathrm { d } t } = \pmb { J } ( t ) \pmb { A } ( t ) , \quad \pmb { A } ( 0 ) = \pmb { I } .
117
+ $$
118
+
119
+ Note that this is a linear ODE with solution ${ \pmb A } ( t ) = e ^ { { \pmb J } \cdot t } = P e ^ { { \pmb \Lambda } ( J ) t } { \pmb P } ^ { - 1 }$ , assuming the Jacobian $\textbf { { J } }$ does not vary or vary slowly over time (We will later show this is a valid assumption). Here $\pmb { \Lambda } ( J )$ denotes the eigenvalues of $\textbf { { J } }$ , and the columns of $_ { r }$ are the corresponding eigenvectors. See Appendix A for a more detailed derivation. In the language of RNNs, $A ( t )$ is the Jacobian of a hidden state $h _ { t }$ with respect to the initial hidden state $h _ { 0 }$ . When the critical criterion is met, i.e., $R e ( \pmb { \Lambda } ( \pmb { J } ) ) \approx 0$ , the magnitude of $A ( t )$ is approximately constant in time, thus no exploding or vanishing gradient problems.
120
+
121
+ With the connection established, we next design ODEs that satisfy the critical criterion. An antisymmetric matrix is a square matrix whose transpose equals its negative; i.e., a matrix $M \in \mathbb { R } ^ { n \times n }$ is antisymmetric if $M ^ { T } = - M$ . An interesting property of an antisymmetric matrix $M$ is that, the eigenvalues of $M$ are all imaginary:
122
+
123
+ $$
124
+ R e ( \lambda _ { i } ( M ) ) = 0 , \quad \forall i = 1 , 2 , \ldots , n ,
125
+ $$
126
+
127
+ making antisymmetric matrices a suitable building block of a stable recurrent architecture.
128
+
129
+ Consider the following ODE
130
+
131
+ $$
132
+ \begin{array} { r } { \pmb { h } ^ { \prime } ( t ) = \operatorname { t a n h } \left( ( \pmb { W } _ { h } - \pmb { W } _ { h } ^ { T } ) \pmb { h } ( t ) + \pmb { V } _ { h } \pmb { x } ( t ) + \pmb { b } _ { h } \right) , } \end{array}
133
+ $$
134
+
135
+ where $\ b { h } ( t ) \in \mathbb { R } ^ { n }$ , $\pmb { x } ( t ) \in \mathbb { R } ^ { m }$ , $\boldsymbol { W _ { h } } \in \mathbb { R } ^ { n \times n }$ , $V _ { h } \in \mathbb { R } ^ { n \times m }$ and $b _ { h } \in \mathbb { R } ^ { n }$ . Note that $W _ { h } - W _ { h } ^ { T }$ is an antisymmetric matrix. The Jacobian matrix of the right hand side is
136
+
137
+ $$
138
+ \begin{array} { r } { \boldsymbol J ( t ) = \mathrm { d i a g } \left[ \operatorname { t a n h } ^ { \prime } \left( ( \boldsymbol W _ { h } - \boldsymbol W _ { h } ^ { T } ) \boldsymbol h ( t ) + \boldsymbol V _ { h } \boldsymbol x ( t ) + \boldsymbol b \right) \right] ( \boldsymbol W _ { h } - \boldsymbol W _ { h } ^ { T } ) , } \end{array}
139
+ $$
140
+
141
+ whose eigenvalues are all imaginary, i.e., $R e ( \lambda _ { i } ( \pmb { J } ( t ) ) ) = 0 , \forall i = 1 , 2 , \ldots , n$ . In other words, it satisfies the critical criterion in Equation 5. See Appendix B for a proof. The entries of the diagonal matrix in Equation 9 are the derivatives of the activation function, which are bounded in $[ 0 , { \bar { 1 } } ]$ for sigmoid and hyperbolic tangent. In other words, the Jacobian matrix $\mathbf { } J ( t )$ changes smoothly over time. Furthermore, since the input and bias term only affect the bounded diagonal matrix, their effect on the stability of the ODE is insignificant compared with the antisymmetric matrix.
142
+
143
+ A naive forward Euler discretization of the ODE in Equation 8 leads to the following recurrent network we refer to as the AntisymmetricRNN.
144
+
145
+ $$
146
+ \begin{array} { r } { \boldsymbol { h } _ { t } = \boldsymbol { h } _ { t - 1 } + \epsilon \operatorname { t a n h } \left( ( W _ { h } - W _ { h } ^ { T } ) h _ { t - 1 } + V _ { h } \boldsymbol { x } _ { t } + b _ { h } \right) , } \end{array}
147
+ $$
148
+
149
+ where $\ b { h _ { t } } ~ \in ~ \mathbb { R } ^ { n }$ is the hidden state at time $t$ ; $\pmb { x } _ { t } \in \mathbb { R } ^ { m }$ is the input at time $t$ ; $\boldsymbol { W } _ { h } ~ \in ~ \mathbb { R } ^ { n \times n }$ , $V _ { h } \in \mathbb { R } ^ { n \times m }$ and $b _ { h } \in \mathbb { R } ^ { n }$ are the parameters of the network; $\epsilon > 0$ is a hyperparameter that represents the step size.
150
+
151
+ Note that the antisymmetric matrix $W _ { h } \mathrm { ~ - ~ } W _ { h } ^ { T }$ only has $n ( n - 1 ) / 2$ degrees of freedom. When implementing the model, $W _ { h }$ can be parameterized as a strictly upper triangular matrix, i.e., an upper triangular matrix of which the diagonal entries are all zero. This makes the proposed model more parameter efficient than an unstructured RNN model of the same size of hidden states.
152
+
153
+ # 3.3 STABILITY OF THE FORWARD EULER METHOD: DIFFUSION
154
+
155
+ Given a stable ODE, its forward Euler discretization can still be unstable, as illustrated in Section 4. The stability condition of the forward Euler method has been well studied and summarized in the following proposition.
156
+
157
+ Proposition 2. (Stability of the forward Euler method) The forward propagation in Equation 10 is stable $i f$
158
+
159
+ $$
160
+ \operatorname* { m a x } _ { i = 1 , 2 , \ldots , n } | 1 + \epsilon \lambda _ { i } ( J _ { t } ) | \leq 1 ,
161
+ $$
162
+
163
+ where $| \cdot |$ denote the absolute value or modulus of a complex number and $\scriptstyle { J _ { t } }$ is the Jacobian matrix evaluated at $\boldsymbol { h } _ { t }$ .
164
+
165
+ See Ascher & Petzold (1998) for a proof. The ODE as defined in Equation 8 is however incompatible with the stability condition of the forward Euler method. Since $\lambda _ { i } ( J _ { t } )$ , the eigenvalues of the Jacobian matrix, are all imaginary, $\left| 1 + \epsilon \lambda _ { i } ( J _ { t } ) \right|$ is always greater than 1, which makes the AntisymmetricRNN defined in Equation 10 unstable when solved using forward Euler.
166
+
167
+ One easy way to fix it is to add diffusion to the system by subtracting a small number $\gamma > 0$ from the diagonal elements of the transition matrix. The model thus becomes
168
+
169
+ $$
170
+ \begin{array} { r } { h _ { t } = h _ { t - 1 } + \epsilon \operatorname { t a n h } \big ( ( W _ { h } - W _ { h } ^ { T } - \gamma I ) h _ { t - 1 } + V _ { h } x _ { t } + b _ { h } \big ) , } \end{array}
171
+ $$
172
+
173
+ where $\pmb { I }$ is the identity matrix of size $n$ and $\gamma > 0$ is a hyperparameter that controls the strength of diffusion. By doing so, the eigenvalues of the Jacobian have slightly negative real parts. This modification improves the stability of the numerical method as demonstrated in Section 4.
174
+
175
+ # 3.4 GATING MECHANISM
176
+
177
+ Gating is commonly employed in RNNs. Each gate is often modeled as a single layer network taking the previous hidden state $h _ { t - 1 }$ and data $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ as inputs, followed by a sigmoid activation. As an example, LSTM cells make use of three gates, a forget gate, an input gate, and an output gate. A systematic ablation study suggests that some of the gates are crucial to the performance of LSTM (Jozefowicz et al., 2015).
178
+
179
+ Gating can be incorporated into AntisymmetricRNN as well. However, it should be done carefully so that the critical condition in Equation 5 still holds. We propose the following modification to
180
+
181
+ AntisymmetricRNN, which adds an input gate ${ \boldsymbol { z } } _ { t }$ to control the flow of information into the hidden states:
182
+
183
+ $$
184
+ \begin{array} { r l } & { z _ { t } = \sigma \left( ( W _ { h } - W _ { h } ^ { T } - \gamma I ) h _ { t - 1 } + V _ { z } x _ { t } + b _ { z } \right) , } \\ & { h _ { t } = h _ { t - 1 } + \epsilon z _ { t } \circ \operatorname { t a n h } \left( ( W _ { h } - W _ { h } ^ { T } - \gamma I ) h _ { t - 1 } + V _ { h } x _ { t } + b _ { h } \right) , } \end{array}
185
+ $$
186
+
187
+ where $\sigma$ denotes the sigmoid function and $\circ$ denotes the Hadamard product.
188
+
189
+ The effect of ${ \boldsymbol { z } } _ { t }$ resembles the input gate in LSTM and the update gate in GRU. By sharing the antisymmetric weight matrix, the number of model parameters only increases slightly, instead of being doubled. More importantly, the Jacobian matrix of this gated model has a similar form as that in Equation 9, that is, a diagonal matrix multiplied by an antisymmetric matrix (ignoring diffusion). As a result, the real parts of the eigenvalues of the Jacobian matrix are still close to zero, and the critical criterion remains satisfied.
190
+
191
+ # 4 SIMULATION
192
+
193
+ ![](images/5a858e81e3967a8c614f2927716aa5f9ff6bf81f6c10c6a13a134af61b8531b4.jpg)
194
+ Figure 1: Visualization of the dynamics of RNNs and RNNs with feedback using different weight matrices.
195
+
196
+ Adopting the visualization technique used by Laurent & von Brecht (2017) and Haber & Ruthotto (2017), we study the behavior of two-dimensional vanilla RNNs (left) and RNNs with feedback (right) in the absence of input data and bias:
197
+
198
+ $$
199
+ \operatorname { \mathrm { = \ t a n h } } ( W h _ { t - 1 } ) , \qquad { \mathrm { f e e d b a c k } } ; h _ { t } = h _ { t - 1 } + \epsilon \operatorname { t a n h } ( W h _ { t - 1 } ) .
200
+ $$
201
+
202
+ Here $\boldsymbol { h } _ { t } \in \mathbb { R } ^ { 2 }$ and $1 \leq t \leq T$ . We arbitrarily choose three initial states: $( 0 , 0 . 5 ) , ( - 0 . 5 , - 0 . 5 )$ and $( 0 . 5 , - 0 . 7 5 )$ , and apply the corresponding RNN recurrence. Figure 1 plots the progression of the states $h _ { t }$ of vanilla RNNs (first row) and RNNs with feedback (second row) parameterized by different transition matrices $W$ . In each figure, more translucent points represent earlier time steps. The number of total time steps $T = 5 0$ .
203
+
204
+ Figure 1(a) corresponds to a random weight matrix, where the entries are independent and standard Gaussian. The three initial points (shown in stars) converge to two fixed points on the boundary. Since the weight matrix is unstructured, the behavior is unpredictable as expected. More examples with different weight matrices are shown in Appendix D. Figure 1(b) shows the behavior of the identity weight matrix. Since $\operatorname { t a n h } ( { \cdot } )$ is a contractive mapping, the origin is the unique fixed point. Figure 1(c) and (d) correspond to orthogonal weight matrices that represent reflection and rotation transforms respectively. A two-dimensional orthogonal matrix is either a reflection or a rotation transform; the determinant of the matrix is 1 or $- 1$ respectively. Even though the weight matrix is orthogonal, the states all converge to the origin because of the derivative of the activation function $0 \leq \mathrm { t a n h } ^ { \prime } ( W h _ { t - 1 } ) \leq 1$ .
205
+
206
+ In the case of RNNs with feedback, the trajectory of the hidden states is predictable based on the eigenvalues of the weight matrix $W$ .We consider the following four weight matrices that correspond to Figure 1(e)-(f) respectively:
207
+
208
+ $$
209
+ W _ { + } = \left( \begin{array} { c c } { { 2 } } & { { - 2 } } \\ { { 0 } } & { { 2 } } \end{array} \right) , W _ { - } = \left( \begin{array} { c c } { { - 2 } } & { { 2 } } \\ { { 0 } } & { { - 2 } } \end{array} \right) , W _ { 0 } = \left( \begin{array} { c c } { { 0 } } & { { - 2 } } \\ { { 2 } } & { { 0 } } \end{array} \right) , W _ { \mathrm { d i f f } } = \left( \begin{array} { c c } { { - 0 . 1 5 } } & { { - 2 } } \\ { { 2 } } & { { - 0 . 1 5 } } \end{array} \right) .
210
+ $$
211
+
212
+ We also overlay the vector field that represents the underlying ODE. The step size is set to $\epsilon = 0 . 1$
213
+
214
+ For Figure 1(e) and (f), the eigenvalues are $\lambda _ { 1 } ( W _ { + } ) = \lambda _ { 2 } ( W _ { + } ) = 2$ and $\lambda _ { 1 } ( { \cal W } _ { - } ) = \lambda _ { 2 } ( { \cal W } _ { - } ) =$ $- 2$ . As a result, the hidden states are moving away from the origin and towards the origin respectively. Figure $1 ( \mathrm { g } )$ corresponds to the antisymmetric weight matrix $W _ { 0 }$ , whose eigenvalues are purely imaginary: $\lambda _ { 1 } ( W _ { 0 } ) = 2 i$ , $\lambda _ { 2 } ( \mathbf { W } _ { 0 } ) = - 2 i$ . In this case, the vector field is circular; a state moves around the origin without exponentially increasing or decreasing its norm. However, on closer inspection, the trajectories are actually outward spirals. This is because, at each time step, the state moves along the tangential direction by a small step, which increases the distance from the origin and leads to numerical instability. It is the behavior characterized by Proposition 2. This issue can be mitigated by subtracting a small diffusion term $\gamma$ from the diagonal elements of the weight matrix. We choose $\gamma = 0 . 1 5$ and the weight matrix $W _ { \mathrm { d i f f } }$ has eigenvalues of $\lambda _ { 1 } ( W _ { \mathrm { d i f f } } ) = - 0 . 1 5 + 2 i$ , $\lambda _ { 2 } ( W _ { \mathrm { d i f f } } ) = - 0 . 1 5 - 2 i$ . Figure 1(h) shows the effect of the diffusion terms. The vector field is slightly tilting toward the origin and the trajectory maintains a constant distance from the origin.
215
+
216
+ These simulations show that the hidden states of an AntisymmetricRNN (Figure $1 ( \mathrm { g } )$ and (h)) have predictable dynamics. It achieves the desirable behavior, without the complication of maintaining an orthogonal or unitary matrix as in Figure 1(d), which still suffers from vanishing gradients due to the contraction of the activation function.
217
+
218
+ # 5 EXPERIMENTS
219
+
220
+ The performance of the proposed antisymmetric networks is evaluated on four image classification tasks with long-range dependencies. The classification is done by feeding pixels of the images as a sequence to RNNs and sending the last hidden state $h _ { T }$ of the RNNs into a fully-connected layer and a softmax function. We use the cross-entropy loss and SGD with momentum and Adagrad (Duchi et al., 2011) as optimizers. More experimental details can be found in Appendix C. In this section, AntisymmetricRNN denotes the model with diffusion in Equation 12, and AntisymmetricRNN w/ gating represents the model in Equation 13.
221
+
222
+ # 5.1 PIXEL-BY-PIXEL MNIST
223
+
224
+ In the first task, we learn to classify the MNIST digits by pixels (LeCun et al., 1998). This task was proposed by Le et al. (2015) and used as a benchmark for learning long term dependencies. MNIST images are grayscale with $2 8 \times 2 8$ pixels. The 784 pixels are presented sequentially to the recurrent net, one pixel at a time in scanline order (starting at the top left corner of the image and ending at the bottom right corner). In other words, the input dimension $m = 1$ and number of time steps $T = 7 8 4$ . The pixel-by-pixel MNIST task is to predict the digit of the MNIST image after seeing all 784 pixels. As a result, the network has to be able to learn the long-range dependencies in order to correctly classify the digit. To make the task even harder, the MNIST pixels are shuffled using a fixed random permutation. It creates non-local long-range dependencies among pixels in an image. This task is referred to as the permuted pixel-by-pixel MNIST.
225
+
226
+ Table 1: Evaluation accuracy on pixel-by-pixel MNIST and permuted MNIST.
227
+
228
+ <table><tr><td>method</td><td>MNIST</td><td>pMNIST</td><td>#units</td><td># params</td></tr><tr><td>LSTM (Arjovsky et al., 2016)1</td><td>97.3%</td><td>92.6%</td><td>128</td><td>68k</td></tr><tr><td>FC uRNN(Wisdom et al., 2016)</td><td>92.8%</td><td>92.1%</td><td>116</td><td>16k</td></tr><tr><td>FC uRNN (Wisdom et al., 2016)</td><td>96.9%</td><td>94.1%</td><td>512</td><td>270k</td></tr><tr><td>Soft orthogonal (Vorontsov et al., 2017)</td><td>94.1%</td><td>91.4%</td><td>128</td><td>18k</td></tr><tr><td>KRU (Jose et al., 2017)</td><td>96.4%</td><td>94.5%</td><td>512</td><td>11k</td></tr><tr><td>AntisymmetricRNN</td><td>98.0%</td><td>95.8%</td><td>128</td><td>10k</td></tr><tr><td>AntisymmetricRNN w/ gating</td><td>98.8%</td><td>93.1%</td><td>128</td><td>10k</td></tr></table>
229
+
230
+ Table 1 summarizes the performance of our methods and the existing methods. On both tasks, the proposed AntisymmetricRNNs outperform the regular LSTM model using only $1 / 7$ of parameters. Imposing orthogonal weights (Arjovsky et al., 2016) produces worse results, which corroborates with the existing study showing that such constraints restrict the capacity of the learned model. Softening the orthogonal weights constraints (Wisdom et al., 2016; Vorontsov et al., 2017; Jose et al., 2017) leads to slightly improved performance. AntisymmetricRNNs outperform these methods by a large margin, without the computational overhead to enforce orthogonality.
231
+
232
+ # 5.2 PIXEL-BY-PIXEL CIFAR-10
233
+
234
+ To test our methods on a larger dataset, we conduct experiments on pixel-by-pixel CIFAR-10. The CIFAR-10 dataset contains $3 2 \times 3 2$ colour images in 10 classes (Krizhevsky & Hinton, 2009). Similar to pixel-by-pixel MNIST, we feed the three channels of a pixel into the model at each time step. The input dimension $m = 3$ and number of time steps $T = 1 0 2 4$ .
235
+
236
+ The results are shown in Table 2. The AntisymmetricRNN performance is on par with the LSTM, and AntisymmetricRNN with gating is slightly better than LSTM, both using only about half of the parameters of the LSTM model. Further investigation shows that the task is mostly dominated by short term dependencies. LSTM can achieve about $4 8 . 3 \%$ classification accuracy by only seeing the last 8 rows of CIFAR-10 images 2.
237
+
238
+ Table 2: Evaluation accuracy on pixel-by-pixel CIFAR-10 and noise padded CIFAR-10.
239
+
240
+ <table><tr><td>method</td><td>pixel-by-pixel</td><td>noise padded</td><td>#units</td><td># params</td></tr><tr><td>LSTM</td><td>59.7%</td><td>11.6%</td><td>128</td><td>69k</td></tr><tr><td>Ablation model</td><td>54.6%</td><td>46.2%</td><td>196</td><td>42k</td></tr><tr><td>AntisymmetricRNN</td><td>58.7%</td><td>48.3%</td><td>256</td><td>36k</td></tr><tr><td>AntisymmetricRNN w/ gating</td><td>62.2%</td><td>54.7%</td><td>256</td><td>37k</td></tr></table>
241
+
242
+ # 5.3 NOISE PADDED CIFAR-10
243
+
244
+ To introduce more long-range dependencies to the pixel-by-pixel CIFAR-10 task, we define a more challenging task call the noise padded CIFAR-10, inspired by the noise padded experiments in Chen et al. (2018a). Instead of feeding in one pixel at one time, we input each row of a CIFAR-10 image at every time step. After the first 32 time steps, we input independent standard Gaussian noise for the remaining time steps. Since a CIFAR-10 image is of size 32 with three RGB channels, the input dimension is $m = 9 6$ . The total number of time steps is set to $T = 1 0 0 0$ . In other words, only the first 32 time steps of input contain salient information, all remaining 968 time steps are merely random noise. For a model to correctly classify an input image, it has to remember the information from a long time ago. This task is conceptually more difficult than the pixel-by-pixel CIFAR-10, although the total amount of signal in the input sequence is the same. The results are shown in Table 2. LSTM fails to train at all on this task while our proposed methods perform reasonably well with fewer parameters.
245
+
246
+ ![](images/dc62088bb56c80add338f8f3c68221e98d375809570dee8a3113a566b93497bc.jpg)
247
+ Figure 2: Mean and standard deviation of eigenvalues of the end-to-end Jacobian matrix in AntisymmetricRNNs with different diffusion constants and LSTMs, trained on the noise padded CIFAR-10.
248
+
249
+ To verify that AntisymmetricRNNs indeed mitigate the exploding/vanishing gradient issues, we conduct an additional set of experiments varying the length of noise padding so that the total time steps $T \in \{ 1 0 0 , 2 0 0 , 4 0 0 , 8 0 0 \}$ . LSTMs and AntisymmetricRNNs with different diffusion constants $\gamma \in \{ 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 , 5 , 1 0 \}$ are trained on these tasks. Figure 2 visualizes the mean and standard deviation of the eigenvalues of the end-to-end Jacobian matrices for these networks. Unitary eigenvalues, i.e., mean close to 1 and standard deviation close to 0, indicate non-exploding and non-vanishing gradients. As shown in the figure, the eigenvalues for LSTMs quickly approaches zero as time steps increase, indicating vanishing gradients during back-propagation. This explains why LSTMs fail to train at all on this task. AntisymmetricRNNs with a broad range of diffusion constants $\gamma$ , on the other hand, have eigenvalues centered around 1. It is worth noting though as the diffusion constant increases to large values, AntisymmetricRNNs run into vanishing gradients as well. The diffusion constant $\gamma$ plays an important role in striking a balance between the stability of discretization and capturing long-term dependencies.
250
+
251
+ # 5.4 ABLATION STUDY
252
+
253
+ For the CIFAR-10 experiments, we have also conducted an ablation study to further demonstrate the effect of antisymmetric weight matrix. The ablation model in Table 2 refers to the model that replaces the antisymmetric weight matrices in Equation 13 with unstructured weight matrices. As shown in Table 2, without the antisymmetric parametrization, the performance on both pixel-bypixel and noise padded CIFAR-10 is worse.
254
+
255
+ It is worth mentioning that the antisymmetric formulation is a sufficient condition of stability, not necessary. There are possibly other conditions that lead to stability as well as suggested in Chen et al. (2018a), which could explain the modest degradation in the ablation results.
256
+
257
+ # 6 CONCLUSION
258
+
259
+ In this paper, we present a new perspective on the trainability of RNNs from the dynamical system viewpoint. We draw connections between RNNs and the ordinary differential equation theory and design new recurrent architectures by discretizing ODEs. This new view opens up possibilities to exploit the computational and theoretical success from dynamical systems to understand and improve the trainability of RNNs. We also propose the AntisymmetricRNN, which is a discretization of ODEs that satisfy the critical criterion. Besides its appealing theoretical properties, our models have demonstrated competitive performance over strong recurrent baselines on a comprehensive set of benchmark tasks.
260
+
261
+ By establishing a link between recurrent networks and ordinary differential equations, we anticipate that this work will inspire future research in both communities. An important item of future work is to investigate other stable ODEs and numerical methods that lead to novel and well-conditioned recurrent architectures.
262
+
263
+ # REFERENCES
264
+
265
+ Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In ICML, pp. 1120–1128, 2016.
266
+
267
+ Uri M Ascher and Linda R Petzold. Computer methods for ordinary differential equations and differential-algebraic equations, volume 61. Siam, 1998.
268
+
269
+ Uri M Ascher, Robert MM Mattheij, and Robert D Russell. Numerical solution of boundary value problems for ordinary differential equations, volume 13. Siam, 1994.
270
+
271
+ Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
272
+
273
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
274
+
275
+ Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
276
+
277
+ Bo Chang, Lili Meng, Eldad Haber, Lars Ruthotto, David Begert, and Elliot Holtham. Reversible architectures for arbitrarily deep residual neural networks. In AAAI, 2018a.
278
+
279
+ Bo Chang, Lili Meng, Eldad Haber, Frederick Tung, and David Begert. Multi-level residual networks from dynamical systems view. In ICLR, 2018b.
280
+
281
+ Minmin Chen, Jeffrey Pennington, and Samuel Schoenholz. Dynamical isometry and a mean field theory of RNNs: Gating enables signal propagation in recurrent neural networks. In ICML, pp. 873–882, 2018a.
282
+
283
+ Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. arXiv preprint arXiv:1806.07366, 2018b.
284
+
285
+ Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In EMNLP, pp. 1724–1734, 2014.
286
+
287
+ Jasmine Collins, Jascha Sohl-Dickstein, and David Sussillo. Capacity and trainability in recurrent neural networks. ICLR, 2016.
288
+
289
+ Tim Cooijmans, Nicolas Ballas, Cesar Laurent, C¸ a ´ glar G ˘ ulc¸ehre, and Aaron Courville. Recurrent ¨ batch normalization. In ICLR, 2017.
290
+
291
+ John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011.
292
+
293
+ Salah El Hihi and Yoshua Bengio. Hierarchical recurrent neural networks for long-term dependencies. In NIPS, pp. 493–499, 1996.
294
+
295
+ Jeffrey L Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990.
296
+
297
+ Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In ICASSP, pp. 6645–6649. IEEE, 2013.
298
+
299
+ Eldad Haber and Lars Ruthotto. Stable architectures for deep neural networks. Inverse Problems, 34(1):014004, 2017.
300
+
301
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.
302
+
303
+ Balazs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. Session-based rec-´ ommendations with recurrent neural networks. arXiv preprint arXiv:1511.06939, 2015.
304
+
305
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
306
+
307
+ Stephanie L Hyland and Gunnar Ratsch. Learning unitary operators with help from u (n). In ¨ AAAI, pp. 2050–2058, 2017.
308
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pp. 448–456, 2015.
309
+ Cijo Jose, Moustpaha Cisse, and Francois Fleuret. Kronecker recurrent units. arXiv preprint arXiv:1705.10142, 2017.
310
+ Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In ICML, pp. 2342–2350, 2015.
311
+ Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
312
+ Sekitoshi Kanai, Yasuhiro Fujiwara, and Sotetsu Iwamura. Preventing gradient explosions in gated recurrent units. In NIPS, pp. 435–444, 2017.
313
+ Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In NIPS, pp. 3294–3302, 2015.
314
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
315
+ Thomas Laurent and James von Brecht. A recurrent neural network without chaos. In ICLR, 2017.
316
+ Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015.
317
+ 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.
318
+ Yiping Lu, Aoxiao Zhong, Quanzheng Li, and Bin Dong. Beyond finite layer neural networks: Bridging deep architectures and numerical differential equations. In ICML, pp. 3276–3285, 2018.
319
+ Tomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Interspeech, volume 2, pp. 3, 2010.
320
+ Tomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014.
321
+ Dmytro Mishkin and Jiri Matas. All you need is a good init. arXiv preprint arXiv:1511.06422, 2015.
322
+ Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. Understanding the exploding gradient problem. CoRR, abs/1211.5063, 2012.
323
+ Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In ICML, pp. 1310–1318, 2013.
324
+ Jeffrey Pennington, Sam Schoenholz, and Surya Ganguli. Resurrecting the sigmoid in deep learning through dynamical isometry: theory and practice. NIPS, 2017.
325
+ David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. nature, 323(6088):533, 1986.
326
+ Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
327
+ Richard Socher, Cliff C Lin, Chris Manning, and Andrew Y Ng. Parsing natural scenes and natural language with recursive neural networks. In ICML, pp. 129–136, 2011.
328
+ Corentin Tallec and Yann Ollivier. Can recurrent neural networks warp time? In ICLR, 2018.
329
+ Eugene Vorontsov, Chiheb Trabelsi, Samuel Kadoury, and Chris Pal. On orthogonality and learning recurrent networks with long term dependencies. In ICML, pp. 3570–3578, 2017.
330
+ Scott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In NIPS, pp. 4880–4888, 2016.
331
+ Chao-Yuan Wu, Amr Ahmed, Alex Beutel, Alexander J Smola, and How Jing. Recurrent recommender networks. In WSDM, pp. 495–503. ACM, 2017.
332
+ Di Xie, Jiang Xiong, and Shiliang Pu. All you need is beyond a good init: Exploring better solution for training extremely deep convolutional neural networks with orthonormality and modulation. arXiv preprint arXiv:1703.01827, 2017.
333
+ Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015.
334
+ Boxuan Yue, Junwei Fu, and Jun Liang. Residual recurrent neural networks for learning sequential representations. Information, 9(3):56, 2018.
335
+ Jiong Zhang, Qi Lei, and Inderjit Dhillon. Stabilizing gradients for deep neural networks via efficient SVD parameterization. In ICML, pp. 5806–5814, 2018a.
336
+ Jiong Zhang, Yibo Lin, Zhao Song, and Inderjit Dhillon. Learning long term dependencies via Fourier recurrent units. In ICML, pp. 5815–5823, 2018b.
337
+
338
+ # A AN OVERVIEW OF STABILITY THEORY
339
+
340
+ In this section, we provide a brief overview of the stability theory by examples. Most of the materials are adapted from Ascher & Petzold (1998).
341
+
342
+ Consider the simple scalar ODE, often referred to as the test equation: $y ^ { \prime } ( t ) = \lambda y ( t )$ , where $\lambda \in \mathbb { C }$ is a constant. We allow $\lambda$ to be complex because it later represents an eigenvalue of a system’s matrix. The solution to this initial value problem is $y ( t ) \stackrel { \bullet } { = } e ^ { \lambda t } y ( 0 )$ . If $y ( t )$ and $\tilde { y } ( t )$ are two solutions of the test equation, then their difference at any time $t$ is
343
+
344
+ $$
345
+ | y ( t ) - \tilde { y } ( t ) | = | e ^ { \lambda t } ( y ( 0 ) - \tilde { y } ( 0 ) ) | = e ^ { R e ( \lambda ) t } | y ( 0 ) - \tilde { y } ( 0 ) | .
346
+ $$
347
+
348
+ If $R e ( \lambda ) > 0$ , then a small perturbation of the initial states would cause an exponentially exploding difference. If $R e ( \lambda ) ~ < ~ 0$ , the system is stable, but the perturbation decays exponentially. The perturbation is preserved in the system only if $R e ( \lambda ) = 0$ .
349
+
350
+ We now consider the extension of the test equation to a matrix ODE $\mathbf { \boldsymbol { y } } ^ { \prime } ( t ) = \mathbf { \boldsymbol { A } } \mathbf { \boldsymbol { y } } ( t )$ . The solution is $\pmb { y } ( t ) = e ^ { \pmb { A } t } \pmb { y } ( 0 )$ . To simplify the analysis, we assume $\pmb { A }$ is diagonalizable, i.e., $\pmb { P } ^ { - 1 } \pmb { A } \pmb { P } = \pmb { \Lambda }$ , where $\pmb { \Lambda }$ is a diagonal matrix of the eigenvalues of $\pmb { A }$ and the columns of $_ { r }$ are the corresponding eigenvectors. If we define ${ \pmb w } ( t ) = { \pmb P } ^ { - 1 } { \pmb y } ( t )$ , then ${ \pmb w } ^ { \prime } ( t ) = { \pmb \Lambda } { \pmb w } ( t )$ . The system for ${ \mathbf { } } w ( t )$ is decoupled: for each component $w _ { i } ( t )$ of ${ \mathbf { } } w ( t )$ , we have a test equation $w _ { i } ^ { \prime } ( t ) \stackrel { \cdot } { = } \lambda _ { i } w _ { i } ( t )$ . Therefore, the stability for ${ \pmb w } ( t )$ , hence also for ${ \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf } { } \mathbf { } { \mathbf { } } { \mathbf } { } \mathbf { } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf } { \mathbf } { \mathbf { } } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { \mathbf \mathbf { } \mathbf { } \mathbf { } \mathbf } { \mathbf \mathbf { } \mathbf } { \mathbf \mathbf { } \mathbf } { \mathbf \mathbf { } \mathbf } { \mathbf \mathbf { } \mathbf } \mathbf { \mathbf } \mathbf { \mathbf } \mathbf { \mathbf } \mathbf { \mathbf } \mathbf { \mathbf } \mathbf { \mathbf } \mathbf \mathbf { } \mathbf \mathbf { \mathbf } \mathbf \mathbf { } \mathbf \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf \mathbf $ , is determined by the eigenvalues $\lambda _ { i }$ .
351
+
352
+ # B PROOF OF A PROPOSITION
353
+
354
+ In this section, we provide a proof of a proposition which implies that the AntisymmetricRNN and AntisymmetricRNN with gating satisfy the critical criterion, i.e., the eigenvalues of the Jacobian matrix are imaginary. The proof is adapted from Chang et al. (2018a).
355
+
356
+ Proposition 3. If $W \in \mathbb { R } ^ { n \times n }$ is an antisymmetric matrix and $\ b { D } \in \mathbb { R } ^ { n \times n }$ is an invertible diagonal matrix, then the eigenvalues of $\pmb { D W }$ are imaginary.
357
+
358
+ $$
359
+ R e ( \lambda _ { i } ( D W ) ) = 0 , \quad \forall i = 1 , 2 , \ldots , n .
360
+ $$
361
+
362
+ Proof. Let $\lambda$ and $\textbf { { v } }$ be a pair of eigenvalue and eigenvector of $\pmb { D W }$ , then
363
+
364
+ $$
365
+ \begin{array} { c } { { D W v = \lambda v , } } \\ { { W v = \lambda D ^ { - 1 } v , } } \\ { { v ^ { * } W v = \lambda ( v ^ { * } D ^ { - 1 } v ) , } } \end{array}
366
+ $$
367
+
368
+ On one hand, ${ \pmb v } ^ { * } { \pmb D } ^ { - 1 } { \pmb v }$ is real. On the other hand,
369
+
370
+ $$
371
+ ( v ^ { * } W v ) ^ { * } = v ^ { * } W ^ { * } v = - v ^ { * } W v ,
372
+ $$
373
+
374
+ where $^ *$ represents conjugate transpose. It implies that ${ \boldsymbol { v } } ^ { * } { \boldsymbol { W } } { \boldsymbol { v } }$ is imaginary. Therefore, $\lambda$ has to be imaginary. As a result, all eigenvalues of $\pmb { D W }$ are imaginary. □
375
+
376
+ # C EXPERIMENTAL DETAILS
377
+
378
+ Let $m$ be the input dimension and $n$ be the number of hidden units. The input to hidden matrices are initialized to $\bar { \mathcal { N } } ( 0 , 1 / m )$ . The hidden to hidden matrices are initialized to $\bar { \mathcal { N } } ( 0 , \sigma _ { w } ^ { 2 } / n )$ , where $\sigma _ { w }$ is chosen from $\sigma _ { w } \in \{ 0 , 1 , 2 , 4 , 8 , 1 6 \}$ . The bias terms are initialized to zero, except the forget gate bias of LSTM is initialized to 1, as suggested by Jozefowicz et al. (2015). For AntisymmetricRNNs, the step size $\epsilon \in \{ 0 . 0 1 , 0 . 1 , 1 \}$ and diffusion $\gamma \in \lbrace 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 . 0 \rbrace$ . We use SGD with momentum and Adagrad (Duchi et al., 2011) as optimizers, with batch size of 128 and learning rate chosen from $\{ 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 7 5 , 1 \}$ . On MNIST and pixel-by-pixel CIFAR-10, all the models are trained for 50,000 iterations. On noise padded CIFAR-10, models are trained for 10,000 iterations. We use the standard train/test split of MNIST and CIFAR-10. The performance measure is the classification accuracy evaluated on the test set.
379
+
380
+ # D ADDITIONAL VISUALIZATIONS
381
+
382
+ In this section, we present additional visualizations that are related to the simulation study in Section 4. Figure 3 and 4 show the dynamics of vanilla RNNs and AntisymmetricRNNs with standard Gaussian random weights using different seeds. These visualizations further illustrate the random behavior of a vanilla RNN and the predictable dynamics of an AntisymmetricRNN.
383
+
384
+ Figure 5 shows the dynamics of AntisymmetricRNNs with independent standard Gaussian input.
385
+ This shows that the dynamics become noisier compared to Figure 1, but the trend remains the same.
386
+
387
+ ![](images/af56ab1a9ad6434e2c42f09f694c286b94dde568787aced6f5c97395e47c7d3b.jpg)
388
+ Figure 3: Visualization of the dynamics of vanilla RNNs with standard Gaussian random weights, using seeds from 1 to 16.
389
+
390
+ ![](images/9d3db63ba5e4d101e28325552839dc4269331c8b18c379d043cdb087dc6176d3.jpg)
391
+ Figure 4: Visualization of the dynamics of RNN with feedback with standard Gaussian random weights, using seeds from 1 to 16, diffusion strength $\gamma = 0 . 1$ .
392
+
393
+ ![](images/8ce9b81ff6e57ebb11af09e775f759cb7b8d30d4c27b2a12b1b87256b00b8379.jpg)
394
+ Figure 5: Visualization of the dynamics of RNN with feedback with independent standard Gaussian input.
parse/train/ryxepo0cFX/ryxepo0cFX_content_list.json ADDED
@@ -0,0 +1,1835 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ANTISYMMETRICRNN: A DYNAMICAL SYSTEM VIEWON RECURRENT NEURAL NETWORKS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Bo Chang∗ University of British Columbia Vancouver, BC, Canada bchang@stat.ubc.ca ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 388,
21
+ 226
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Minmin Chen \nGoogle Brain \nMountain View, CA, USA minminc@google.com ",
28
+ "bbox": [
29
+ 408,
30
+ 170,
31
+ 586,
32
+ 227
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Eldad Haber University of British Columbia Vancouver, BC, Canada haber@math.ubc.ca ",
39
+ "bbox": [
40
+ 607,
41
+ 170,
42
+ 813,
43
+ 226
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Ed H. Chi \nGoogle Brain \nMountain View, CA, USA edchi@google.com ",
50
+ "bbox": [
51
+ 183,
52
+ 247,
53
+ 357,
54
+ 304
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 340,
65
+ 544,
66
+ 354
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Recurrent neural networks have gained widespread use in modeling sequential data. Learning long-term dependencies using these models remains difficult though, due to exploding or vanishing gradients. In this paper, we draw connections between recurrent networks and ordinary differential equations. A special form of recurrent networks called the AntisymmetricRNN is proposed under this theoretical framework, which is able to capture long-term dependencies thanks to the stability property of its underlying differential equation. Existing approaches to improving RNN trainability often incur significant computation overhead. In comparison, AntisymmetricRNN achieves the same goal by design. We showcase the advantage of this new architecture through extensive simulations and experiments. AntisymmetricRNN exhibits much more predictable dynamics. It outperforms regular LSTM models on tasks requiring long-term memory and matches the performance on tasks where short-term dependencies dominate despite being much simpler. ",
73
+ "bbox": [
74
+ 233,
75
+ 371,
76
+ 764,
77
+ 565
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 592,
88
+ 336,
89
+ 607
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recurrent neural networks (RNNs) (Rumelhart et al., 1986; Elman, 1990) have found widespread use across a variety of domains from language modeling (Mikolov et al., 2010; Kiros et al., 2015; Jozefowicz et al., 2016) and machine translation (Bahdanau et al., 2014) to speech recognition (Graves et al., 2013) and recommendation systems (Hidasi et al., 2015; Wu et al., 2017). Modeling complex temporal dependencies in sequential data using RNNs, especially the long-term dependencies, remains an open challenge. The main difficulty arises as the error signal back-propagated through time (BPTT) suffers from exponential growth or decay, a dilemma commonly referred to as exploding or vanishing gradient (Pascanu et al., 2012; Bengio et al., 1994). ",
96
+ "bbox": [
97
+ 174,
98
+ 622,
99
+ 825,
100
+ 734
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Vanilla RNNs as originally proposed are particularly prone to these issues and are rarely used in practice. Gated variants of RNNs, such as long short-term memory (LSTM) networks (Hochreiter & Schmidhuber, 1997) and gated recurrent units (GRU) (Cho et al., 2014) that feature various forms of “gating” are proposed to alleviate these issues. The gates allow information to flow from inputs at any previous time steps to the end of the sequence more easily, partially addressing the vanishing gradient problem (Collins et al., 2016). In practice, these models must be paired with techniques such as normalization layers (Ioffe & Szegedy, 2015; Ba et al., 2016) and gradient clipping (Pascanu et al., 2013) to achieve good performance. ",
107
+ "bbox": [
108
+ 174,
109
+ 741,
110
+ 825,
111
+ 853
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Identity and orthogonal initialization is another proposed solution to the exploding or vanishing gradient problem of deep neural networks (Le et al., 2015; Mishkin & Matas, 2015; Saxe et al., 2013; Chen et al., 2018a). Recently, Arjovsky et al. (2016); Wisdom et al. (2016); Hyland & Ratsch ¨ (2017); Xie et al. (2017); Zhang et al. (2018a) advocate going beyond initialization and forcing the weight matrices to be orthogonal throughout the entire learning process. However, some of these approaches come with significant computational overhead and reportedly hinder representation power of these models (Vorontsov et al., 2017). Moreover, orthogonal weight matrices alone do not prevent exploding and vanishing gradients, due to the nonlinear nature of deep neural networks as shown in (Pennington et al., 2017). ",
118
+ "bbox": [
119
+ 176,
120
+ 859,
121
+ 825,
122
+ 902
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "",
129
+ "bbox": [
130
+ 174,
131
+ 103,
132
+ 825,
133
+ 188
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Here we offer a new perspective on the trainability of RNNs from the dynamical system viewpoint. While exploding gradient is a manifestation of the instability of the underlying dynamical system, vanishing gradient results from a lossy system, properties that have been widely studied in the dynamical system literature (Haber & Ruthotto, 2017; Laurent & von Brecht, 2017). The main contributions of the work are: ",
140
+ "bbox": [
141
+ 174,
142
+ 194,
143
+ 825,
144
+ 263
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "• We draw connections between RNNs and the ordinary differential equation theory and design new recurrent architectures by discretizing ODEs. \n• The stability of the ODE solutions and the numerical methods for solving ODEs lead us to design a special form of RNNs, which we name AntisymmetricRNN, that can capture longterm dependencies in the inputs. The construction of the model is much simpler compared to the existing methods for improving RNN trainability. \nWe conduct extensive simulations and experiments to demonstrate the benefits of this new RNN architecture. AntisymmetricRNN exhibits well-behaved dynamics and outperforms the regular LSTM model on tasks requiring long-term memory, and matches its performance on tasks where short-term dependencies dominate with much fewer parameters. ",
151
+ "bbox": [
152
+ 215,
153
+ 277,
154
+ 825,
155
+ 434
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 RELATED WORK ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 176,
165
+ 458,
166
+ 341,
167
+ 474
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Trainability of RNNs. Capturing long-term dependencies using RNNs has been a long-standing research topic with various approaches proposed. The first group of approaches mitigates the exploding or vanishing gradient issues by introducing some forms of gating. Long short-term memory networks (LSTM) (Hochreiter & Schmidhuber, 1997) and gated recurrent units (GRU) (Cho et al., 2014) are the most prominent models along this line of work. Parallel efforts include designing special neural architectures, such as hierarchical RNNs (El Hihi & Bengio, 1996), recursive neural networks (Socher et al., 2011), attention networks (Bahdanau et al., 2014), dilated convolutions (Yu & Koltun, 2015), recurrent batch normalization (Cooijmans et al., 2017), residual RNNs (Yue et al., 2018), and Fourier recurrent units (Zhang et al., 2018b). These, however, are fundamentally different networks with different tradeoffs. ",
174
+ "bbox": [
175
+ 174,
176
+ 492,
177
+ 825,
178
+ 631
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Another direction is to constrain the weight matrices of an RNN so that the back-propagated error signal is well conditioned, in particular, the input-output Jacobian having unitary singular values. Le et al. (2015); Mikolov et al. (2014); Mishkin & Matas (2015) propose the use of identity or orthogonal matrix to initialize the recurrent weight matrix. Followup works further constrain the weight matrix throughout the entire learning process either through re-parametrization (Arjovsky et al., 2016), geodesic gradient descent on the Stiefel manifold (Wisdom et al., 2016; Vorontsov et al., 2017), or constraining the singular values (Jose et al., 2017; Kanai et al., 2017; Zhang et al., 2018a). It is worth noting that, orthogonal weights by themselves do not guarantee unitary Jacobians. Nonlinear activations still cause the gradients to explode or vanish. Contractive maps such as sigmoid and hyperbolic tangent lead to vanishing gradients. Chen et al. (2018a) offer an initialization scheme taking into account the nonlinearity. However, the theory developed relies heavily on the random matrix assumptions, which only hold at the initialization point of training. Although it has been shown to predict trainability beyond initialization. ",
185
+ "bbox": [
186
+ 173,
187
+ 638,
188
+ 825,
189
+ 819
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "Dynamical systems view of recurrent networks. Connections between dynamical systems and RNNs have not been well explored. Laurent & von Brecht (2017) study the behavior of dynamical systems induced by recurrent networks, and show that LSTMs and GRUs exhibit chaotic dynamics in the absence of input data. They propose a simplified gated RNN named the chaos free network (CFN), that has non-chaotic dynamics and achieves comparable performance to LSTMs and GRUs on language modeling. Tallec & Ollivier (2018) formulate RNNs as a time-discretized version of ODE and show that time invariance leads to gate-like mechanisms in RNNs. With this formulation, the authors propose an initialization scheme by setting the initial gate bias according to the range of time dependencies to capture. ",
196
+ "bbox": [
197
+ 174,
198
+ 827,
199
+ 825,
200
+ 924
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "",
207
+ "bbox": [
208
+ 173,
209
+ 103,
210
+ 823,
211
+ 132
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Dynamical systems view of residual networks. Another line of work that is closely related to ours is the dynamical systems view on residual networks (ResNets) (He et al., 2016). Haber & Ruthotto (2017); Chang et al. (2018a;b); Lu et al. (2018) propose to interpret ResNets as ordinary differential equations (ODEs), under which learning the network parameters is equivalent to solve a parameter estimation problem involving the ODE. Chen et al. (2018b) parameterize the continuous dynamics of hidden units using an ODE specified by a neural network. Stable and reversible architectures are developed (Haber & Ruthotto, 2017; Chang et al., 2018a) from this viewpoint, which form the basis of our proposed recurrent networks. ",
218
+ "bbox": [
219
+ 173,
220
+ 138,
221
+ 825,
222
+ 251
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "3 ANTISYMMETRICRNNS ",
229
+ "text_level": 1,
230
+ "bbox": [
231
+ 176,
232
+ 270,
233
+ 406,
234
+ 286
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "3.1 ORDINARY DIFFERENTIAL EQUATIONS ",
241
+ "text_level": 1,
242
+ "bbox": [
243
+ 176,
244
+ 303,
245
+ 478,
246
+ 316
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "We first give a brief overview of the ordinary differential equations (ODEs), a special kind of dynamical systems that involves a single variable, time $t$ in this case. Consider the first-order ODE ",
253
+ "bbox": [
254
+ 171,
255
+ 328,
256
+ 823,
257
+ 356
258
+ ],
259
+ "page_idx": 2
260
+ },
261
+ {
262
+ "type": "equation",
263
+ "img_path": "images/5742694d952e856159a2de8421271c83f851a9a8772bc05c06b05240f5af52b3.jpg",
264
+ "text": "$$\n\\begin{array} { r } { \\pmb { h } ^ { \\prime } ( t ) = f ( \\pmb { h } ( t ) ) , } \\end{array}\n$$",
265
+ "text_format": "latex",
266
+ "bbox": [
267
+ 441,
268
+ 362,
269
+ 555,
270
+ 381
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "for time $t \\geq 0$ , where $\\ b { h } ( t ) \\in \\mathbb { R } ^ { n }$ and $f : \\mathbb { R } ^ { n } \\mathbb { R } ^ { n }$ . Together with a given initial condition $\\pmb { h } ( 0 )$ , the problem of solving for the function $h ( t )$ is called the initial value problem. For most ODEs, it is impossible to find an analytic solution. Instead, numerical methods relying on discretization are commonly used to approximate the solution. The forward Euler method is probably the best known and simplest numerical method for approximation. One way to derive the forward Euler method is to approximate the derivative on the left-hand side of Equation 1 by a finite difference, and evaluate the right-hand side at $\\boldsymbol { h } _ { t - 1 }$ : ",
277
+ "bbox": [
278
+ 173,
279
+ 386,
280
+ 825,
281
+ 484
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "equation",
287
+ "img_path": "images/f0fdb1b0a2a08ca6e592930225314e463a18515aa44c42f113822ea0cb4c5b4c.jpg",
288
+ "text": "$$\n\\frac { h _ { t } - h _ { t - 1 } } { \\epsilon } = f ( h _ { t - 1 } ) .\n$$",
289
+ "text_format": "latex",
290
+ "bbox": [
291
+ 419,
292
+ 482,
293
+ 578,
294
+ 512
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Note that for the approximation to be valid, $\\epsilon > 0$ should be small by the definition of the derivative. One can easily prove that the forward Euler method converges linearly w.r.t. $\\epsilon$ , assuming $f ( h )$ is Lipschitz continuous on $^ { h }$ and that the eigenvalues of the Jacobian of $f$ have negative real parts. Rearranging it, we have the forward Euler method for a given initial value ",
301
+ "bbox": [
302
+ 174,
303
+ 515,
304
+ 823,
305
+ 570
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/798f6407aa298245b0d9fb13b31fb3560c455d3ff39ee18236ae087c04b1a403.jpg",
312
+ "text": "$$\n\\begin{array} { r } { h _ { t } = h _ { t - 1 } + \\epsilon f ( h _ { t - 1 } ) , \\quad h _ { 0 } = h ( 0 ) . } \\end{array}\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 369,
316
+ 578,
317
+ 627,
318
+ 595
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "Geometrically, each forward Euler step takes a small step along the tangential direction to the exact trajectory starting at $h _ { t - 1 }$ . As a result, $\\epsilon$ is usually referred to as the step size. ",
325
+ "bbox": [
326
+ 171,
327
+ 602,
328
+ 823,
329
+ 631
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "As an example, consider the ODE ",
336
+ "bbox": [
337
+ 176,
338
+ 637,
339
+ 398,
340
+ 651
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "equation",
346
+ "img_path": "images/23a35eff562cb7af8c99a6509bdb5738d1b2428dbbdaab08d01502157862a453.jpg",
347
+ "text": "$$\n\\pmb { h } ^ { \\prime } ( t ) = \\operatorname { t a n h } \\left( \\pmb { W } \\pmb { h } ( t ) \\right) .\n$$",
348
+ "text_format": "latex",
349
+ "bbox": [
350
+ 415,
351
+ 657,
352
+ 581,
353
+ 676
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "The forward Euler method approximates the solution to the ODE iteratively as ",
360
+ "bbox": [
361
+ 174,
362
+ 681,
363
+ 687,
364
+ 696
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/d3daf9001d3b689a0ff618f259513d930bdee5ef0f732e64f5310de5699c9053.jpg",
371
+ "text": "$$\nh _ { t } = h _ { t - 1 } + \\epsilon \\operatorname { t a n h } ( W h _ { t - 1 } ) ,\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 393,
375
+ 703,
376
+ 601,
377
+ 720
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "which can be regarded as a recurrent network without input data. Here $h _ { t }$ is the hidden state at the $t$ -th step, $W$ is a model parameter, and $\\epsilon$ is a hyperparameter. This provides a general framework of designing recurrent network architectures by discretizing ODEs. As a result, we can design ODEs that possess desirable properties by exploiting the theoretical successes of dynamical systems, and the resulting recurrent networks will inherit these properties. Stability is one of the important properties to consider, which we will discuss in the next section. It is worth mentioning that the “skip connection” in this architecture resembles the residual RNN (Yue et al., 2018) and the Fourier RNN (Zhang et al., 2018b), which are proposed to mitigate the vanishing and exploding gradient issues. ",
384
+ "bbox": [
385
+ 173,
386
+ 727,
387
+ 825,
388
+ 853
389
+ ],
390
+ "page_idx": 2
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "3.2 STABILITY OF ORDINARY DIFFERENTIAL EQUATIONS: ANTISYMMETRICRNNS ",
395
+ "text_level": 1,
396
+ "bbox": [
397
+ 173,
398
+ 871,
399
+ 754,
400
+ 883
401
+ ],
402
+ "page_idx": 2
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "In numerical analysis, stability theory addresses the stability of solutions of ODEs under small perturbations of initial conditions. In this section, we are going to establish the connections between the stability of an ODE and the trainability of the RNNs by discretizing the ODE, and design a new RNN architecture that is stable and capable of capturing long-term dependencies. ",
407
+ "bbox": [
408
+ 173,
409
+ 895,
410
+ 820,
411
+ 924
412
+ ],
413
+ "page_idx": 2
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "",
418
+ "bbox": [
419
+ 171,
420
+ 103,
421
+ 823,
422
+ 132
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "An ODE solution is stable if the long-term behavior of the system does not depend significantly on the initial conditions. A formal definition is given as follows. ",
429
+ "bbox": [
430
+ 171,
431
+ 138,
432
+ 823,
433
+ 167
434
+ ],
435
+ "page_idx": 3
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "Definition 1. (Stability) $A$ solution $h ( t )$ of the ODE in Equation $I$ with initial condition $\\pmb { h } ( 0 )$ is stable if for any $\\epsilon > 0$ , there exists a $\\delta > 0$ such that any other solution $\\tilde { h } ( t )$ of the ODE with initial condition $\\tilde { \\pmb { h } } ( 0 )$ satisfying $| h ( 0 ) - \\tilde { h } ( 0 ) | \\leq \\delta$ also satisfies $| h ( t ) - \\tilde { h } ( t ) | \\leq \\epsilon ,$ , for all $t \\geq 0$ . ",
440
+ "bbox": [
441
+ 174,
442
+ 170,
443
+ 825,
444
+ 219
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "In plain language, given a small perturbation of size $\\delta$ of the initial state, the effect of the perturbation on the subsequent states is no bigger than $\\epsilon$ . The eigenvalues of the Jacobian matrix play a central role in stability analysis. Let $\\bar { \\ b { J } } ( \\bar { t } ) \\in \\mathbb { R } ^ { n \\times n }$ be the Jacobian matrix of $f$ , and $\\lambda _ { i } ( \\cdot )$ denotes the $i$ -th eigenvalue. ",
451
+ "bbox": [
452
+ 173,
453
+ 229,
454
+ 825,
455
+ 286
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Proposition 1. The solution of an ODE is stable $i f$ ",
462
+ "bbox": [
463
+ 174,
464
+ 290,
465
+ 511,
466
+ 305
467
+ ],
468
+ "page_idx": 3
469
+ },
470
+ {
471
+ "type": "equation",
472
+ "img_path": "images/b5d46c04f0ef8569020b1161f80cf51423c0ba76c2b5dc8bd27a233bce382e75.jpg",
473
+ "text": "$$\n\\operatorname* { m a x } _ { i = 1 , 2 , \\ldots , n } R e ( \\lambda _ { i } ( \\pmb { J } ( t ) ) ) \\leq 0 , \\quad \\forall t \\geq 0 ,\n$$",
474
+ "text_format": "latex",
475
+ "bbox": [
476
+ 369,
477
+ 311,
478
+ 629,
479
+ 335
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "where $R e ( \\cdot )$ denotes the real part of a complex number. ",
486
+ "bbox": [
487
+ 173,
488
+ 343,
489
+ 539,
490
+ 358
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "A more precise proposition that involves the kinematic eigenvalues of $\\mathbf { } J ( t )$ is given in Ascher et al. (1994). Stability alone, however, does not suffice to capture long-term dependencies. As argued in Haber & Ruthotto (2017), $R e ( \\lambda _ { i } ( J ( t ) ) ) \\ll 0$ results in a lossy system; the energy or signal in the initial state is dissipated over time. Using such an ODE as the underlying dynamical system of a recurrent network will lead to catastrophic forgetting of the past inputs during the forward propagation. Ideally, ",
497
+ "bbox": [
498
+ 173,
499
+ 369,
500
+ 825,
501
+ 453
502
+ ],
503
+ "page_idx": 3
504
+ },
505
+ {
506
+ "type": "equation",
507
+ "img_path": "images/23079462bd3d14421bc944a15c3580c0c3cd95c19dc43c82a330bc4367bf7217.jpg",
508
+ "text": "$$\nR e ( \\lambda _ { i } ( \\pmb { J } ( t ) ) ) \\approx 0 , \\quad \\forall i = 1 , 2 , \\ldots , n ,\n$$",
509
+ "text_format": "latex",
510
+ "bbox": [
511
+ 369,
512
+ 452,
513
+ 627,
514
+ 469
515
+ ],
516
+ "page_idx": 3
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "a condition we referred to as the critical criterion. Under this condition, the system preserves the long-term dependencies of the inputs while being stable. ",
521
+ "bbox": [
522
+ 174,
523
+ 472,
524
+ 825,
525
+ 501
526
+ ],
527
+ "page_idx": 3
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "Stability and Trainability. Here we connect the stability of the ODE to the trainability of the RNN produced by discretization. Inherently, the stability analysis studies the sensitivity of a solution, i.e., how much a solution of the ODE would change w.r.t. changes in the initial condition. Differentiating Equation 1 with respect to the initial state $\\bar { \\pmb h } ( 0 )$ on both sides, we have the following sensitivity analysis (with chain rules): ",
532
+ "bbox": [
533
+ 173,
534
+ 506,
535
+ 825,
536
+ 577
537
+ ],
538
+ "page_idx": 3
539
+ },
540
+ {
541
+ "type": "equation",
542
+ "img_path": "images/9359a5636fe77b24f823cef4abfbcda724c42d122400cea94b79963377647663.jpg",
543
+ "text": "$$\n\\frac { \\mathrm { d } } { \\mathrm { d } t } \\left( \\frac { \\partial \\pmb { h } ( t ) } { \\partial \\pmb { h } ( 0 ) } \\right) = \\pmb { J } ( t ) \\frac { \\partial \\pmb { h } ( t ) } { \\partial \\pmb { h } ( 0 ) } .\n$$",
544
+ "text_format": "latex",
545
+ "bbox": [
546
+ 400,
547
+ 574,
548
+ 598,
549
+ 609
550
+ ],
551
+ "page_idx": 3
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "For notational simplicity, let us define $\\pmb { A } ( t ) = \\partial \\pmb { h } ( t ) / \\partial \\pmb { h } ( 0 )$ , then we have ",
556
+ "bbox": [
557
+ 174,
558
+ 611,
559
+ 665,
560
+ 627
561
+ ],
562
+ "page_idx": 3
563
+ },
564
+ {
565
+ "type": "equation",
566
+ "img_path": "images/a3f4fc9edf63942fcf0ab874379f65a51becc603701f3865aeda530a1ea33865.jpg",
567
+ "text": "$$\n\\frac { \\mathrm { d } \\pmb { A } ( t ) } { \\mathrm { d } t } = \\pmb { J } ( t ) \\pmb { A } ( t ) , \\quad \\pmb { A } ( 0 ) = \\pmb { I } .\n$$",
568
+ "text_format": "latex",
569
+ "bbox": [
570
+ 383,
571
+ 633,
572
+ 614,
573
+ 665
574
+ ],
575
+ "page_idx": 3
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Note that this is a linear ODE with solution ${ \\pmb A } ( t ) = e ^ { { \\pmb J } \\cdot t } = P e ^ { { \\pmb \\Lambda } ( J ) t } { \\pmb P } ^ { - 1 }$ , assuming the Jacobian $\\textbf { { J } }$ does not vary or vary slowly over time (We will later show this is a valid assumption). Here $\\pmb { \\Lambda } ( J )$ denotes the eigenvalues of $\\textbf { { J } }$ , and the columns of $_ { r }$ are the corresponding eigenvectors. See Appendix A for a more detailed derivation. In the language of RNNs, $A ( t )$ is the Jacobian of a hidden state $h _ { t }$ with respect to the initial hidden state $h _ { 0 }$ . When the critical criterion is met, i.e., $R e ( \\pmb { \\Lambda } ( \\pmb { J } ) ) \\approx 0$ , the magnitude of $A ( t )$ is approximately constant in time, thus no exploding or vanishing gradient problems. ",
580
+ "bbox": [
581
+ 173,
582
+ 670,
583
+ 825,
584
+ 771
585
+ ],
586
+ "page_idx": 3
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "With the connection established, we next design ODEs that satisfy the critical criterion. An antisymmetric matrix is a square matrix whose transpose equals its negative; i.e., a matrix $M \\in \\mathbb { R } ^ { n \\times n }$ is antisymmetric if $M ^ { T } = - M$ . An interesting property of an antisymmetric matrix $M$ is that, the eigenvalues of $M$ are all imaginary: ",
591
+ "bbox": [
592
+ 173,
593
+ 776,
594
+ 825,
595
+ 833
596
+ ],
597
+ "page_idx": 3
598
+ },
599
+ {
600
+ "type": "equation",
601
+ "img_path": "images/c4a8f792239bcdd89e1251694f971a7ea7e1adea4951b3e3f24d369b7438505a.jpg",
602
+ "text": "$$\nR e ( \\lambda _ { i } ( M ) ) = 0 , \\quad \\forall i = 1 , 2 , \\ldots , n ,\n$$",
603
+ "text_format": "latex",
604
+ "bbox": [
605
+ 375,
606
+ 840,
607
+ 620,
608
+ 857
609
+ ],
610
+ "page_idx": 3
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "making antisymmetric matrices a suitable building block of a stable recurrent architecture. ",
615
+ "bbox": [
616
+ 169,
617
+ 863,
618
+ 763,
619
+ 878
620
+ ],
621
+ "page_idx": 3
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "Consider the following ODE ",
626
+ "bbox": [
627
+ 174,
628
+ 885,
629
+ 364,
630
+ 900
631
+ ],
632
+ "page_idx": 3
633
+ },
634
+ {
635
+ "type": "equation",
636
+ "img_path": "images/732c12b765129851934f3b1c42f27ab9c819c2a88ce46572f30f7d3e7b09edd9.jpg",
637
+ "text": "$$\n\\begin{array} { r } { \\pmb { h } ^ { \\prime } ( t ) = \\operatorname { t a n h } \\left( ( \\pmb { W } _ { h } - \\pmb { W } _ { h } ^ { T } ) \\pmb { h } ( t ) + \\pmb { V } _ { h } \\pmb { x } ( t ) + \\pmb { b } _ { h } \\right) , } \\end{array}\n$$",
638
+ "text_format": "latex",
639
+ "bbox": [
640
+ 326,
641
+ 906,
642
+ 668,
643
+ 926
644
+ ],
645
+ "page_idx": 3
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "where $\\ b { h } ( t ) \\in \\mathbb { R } ^ { n }$ , $\\pmb { x } ( t ) \\in \\mathbb { R } ^ { m }$ , $\\boldsymbol { W _ { h } } \\in \\mathbb { R } ^ { n \\times n }$ , $V _ { h } \\in \\mathbb { R } ^ { n \\times m }$ and $b _ { h } \\in \\mathbb { R } ^ { n }$ . Note that $W _ { h } - W _ { h } ^ { T }$ is an antisymmetric matrix. The Jacobian matrix of the right hand side is ",
650
+ "bbox": [
651
+ 171,
652
+ 102,
653
+ 825,
654
+ 132
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "equation",
660
+ "img_path": "images/f54a9fa88fade55b7c1d1e6b6e67bc8ca00f52cf9f3f99119e471ac2218e5af1.jpg",
661
+ "text": "$$\n\\begin{array} { r } { \\boldsymbol J ( t ) = \\mathrm { d i a g } \\left[ \\operatorname { t a n h } ^ { \\prime } \\left( ( \\boldsymbol W _ { h } - \\boldsymbol W _ { h } ^ { T } ) \\boldsymbol h ( t ) + \\boldsymbol V _ { h } \\boldsymbol x ( t ) + \\boldsymbol b \\right) \\right] ( \\boldsymbol W _ { h } - \\boldsymbol W _ { h } ^ { T } ) , } \\end{array}\n$$",
662
+ "text_format": "latex",
663
+ "bbox": [
664
+ 263,
665
+ 138,
666
+ 733,
667
+ 160
668
+ ],
669
+ "page_idx": 4
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "whose eigenvalues are all imaginary, i.e., $R e ( \\lambda _ { i } ( \\pmb { J } ( t ) ) ) = 0 , \\forall i = 1 , 2 , \\ldots , n$ . In other words, it satisfies the critical criterion in Equation 5. See Appendix B for a proof. The entries of the diagonal matrix in Equation 9 are the derivatives of the activation function, which are bounded in $[ 0 , { \\bar { 1 } } ]$ for sigmoid and hyperbolic tangent. In other words, the Jacobian matrix $\\mathbf { } J ( t )$ changes smoothly over time. Furthermore, since the input and bias term only affect the bounded diagonal matrix, their effect on the stability of the ODE is insignificant compared with the antisymmetric matrix. ",
674
+ "bbox": [
675
+ 173,
676
+ 165,
677
+ 825,
678
+ 250
679
+ ],
680
+ "page_idx": 4
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "A naive forward Euler discretization of the ODE in Equation 8 leads to the following recurrent network we refer to as the AntisymmetricRNN. ",
685
+ "bbox": [
686
+ 173,
687
+ 256,
688
+ 821,
689
+ 285
690
+ ],
691
+ "page_idx": 4
692
+ },
693
+ {
694
+ "type": "equation",
695
+ "img_path": "images/0e411078fd36ff1cb4f02352e466345c960a22c84d5a3d80beb5f1a61a6ddb23.jpg",
696
+ "text": "$$\n\\begin{array} { r } { \\boldsymbol { h } _ { t } = \\boldsymbol { h } _ { t - 1 } + \\epsilon \\operatorname { t a n h } \\left( ( W _ { h } - W _ { h } ^ { T } ) h _ { t - 1 } + V _ { h } \\boldsymbol { x } _ { t } + b _ { h } \\right) , } \\end{array}\n$$",
697
+ "text_format": "latex",
698
+ "bbox": [
699
+ 308,
700
+ 290,
701
+ 687,
702
+ 310
703
+ ],
704
+ "page_idx": 4
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "where $\\ b { h _ { t } } ~ \\in ~ \\mathbb { R } ^ { n }$ is the hidden state at time $t$ ; $\\pmb { x } _ { t } \\in \\mathbb { R } ^ { m }$ is the input at time $t$ ; $\\boldsymbol { W } _ { h } ~ \\in ~ \\mathbb { R } ^ { n \\times n }$ , $V _ { h } \\in \\mathbb { R } ^ { n \\times m }$ and $b _ { h } \\in \\mathbb { R } ^ { n }$ are the parameters of the network; $\\epsilon > 0$ is a hyperparameter that represents the step size. ",
709
+ "bbox": [
710
+ 173,
711
+ 318,
712
+ 825,
713
+ 361
714
+ ],
715
+ "page_idx": 4
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "Note that the antisymmetric matrix $W _ { h } \\mathrm { ~ - ~ } W _ { h } ^ { T }$ only has $n ( n - 1 ) / 2$ degrees of freedom. When implementing the model, $W _ { h }$ can be parameterized as a strictly upper triangular matrix, i.e., an upper triangular matrix of which the diagonal entries are all zero. This makes the proposed model more parameter efficient than an unstructured RNN model of the same size of hidden states. ",
720
+ "bbox": [
721
+ 173,
722
+ 366,
723
+ 825,
724
+ 424
725
+ ],
726
+ "page_idx": 4
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "3.3 STABILITY OF THE FORWARD EULER METHOD: DIFFUSION ",
731
+ "text_level": 1,
732
+ "bbox": [
733
+ 174,
734
+ 440,
735
+ 622,
736
+ 455
737
+ ],
738
+ "page_idx": 4
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Given a stable ODE, its forward Euler discretization can still be unstable, as illustrated in Section 4. The stability condition of the forward Euler method has been well studied and summarized in the following proposition. ",
743
+ "bbox": [
744
+ 178,
745
+ 465,
746
+ 823,
747
+ 510
748
+ ],
749
+ "page_idx": 4
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "Proposition 2. (Stability of the forward Euler method) The forward propagation in Equation 10 is stable $i f$ ",
754
+ "bbox": [
755
+ 173,
756
+ 512,
757
+ 823,
758
+ 541
759
+ ],
760
+ "page_idx": 4
761
+ },
762
+ {
763
+ "type": "equation",
764
+ "img_path": "images/344e3afe1337e227bb93f3db82f29705ba1824b461deb93e9b7f4e274b591ff7.jpg",
765
+ "text": "$$\n\\operatorname* { m a x } _ { i = 1 , 2 , \\ldots , n } | 1 + \\epsilon \\lambda _ { i } ( J _ { t } ) | \\leq 1 ,\n$$",
766
+ "text_format": "latex",
767
+ "bbox": [
768
+ 405,
769
+ 540,
770
+ 593,
771
+ 564
772
+ ],
773
+ "page_idx": 4
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "where $| \\cdot |$ denote the absolute value or modulus of a complex number and $\\scriptstyle { J _ { t } }$ is the Jacobian matrix evaluated at $\\boldsymbol { h } _ { t }$ . ",
778
+ "bbox": [
779
+ 174,
780
+ 568,
781
+ 825,
782
+ 597
783
+ ],
784
+ "page_idx": 4
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "See Ascher & Petzold (1998) for a proof. The ODE as defined in Equation 8 is however incompatible with the stability condition of the forward Euler method. Since $\\lambda _ { i } ( J _ { t } )$ , the eigenvalues of the Jacobian matrix, are all imaginary, $\\left| 1 + \\epsilon \\lambda _ { i } ( J _ { t } ) \\right|$ is always greater than 1, which makes the AntisymmetricRNN defined in Equation 10 unstable when solved using forward Euler. ",
789
+ "bbox": [
790
+ 173,
791
+ 608,
792
+ 825,
793
+ 665
794
+ ],
795
+ "page_idx": 4
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "One easy way to fix it is to add diffusion to the system by subtracting a small number $\\gamma > 0$ from the diagonal elements of the transition matrix. The model thus becomes ",
800
+ "bbox": [
801
+ 173,
802
+ 671,
803
+ 825,
804
+ 700
805
+ ],
806
+ "page_idx": 4
807
+ },
808
+ {
809
+ "type": "equation",
810
+ "img_path": "images/a5313a878df8745f764bd4f52396b5632c2c06f8479a241f2abd36d5dc710c3c.jpg",
811
+ "text": "$$\n\\begin{array} { r } { h _ { t } = h _ { t - 1 } + \\epsilon \\operatorname { t a n h } \\big ( ( W _ { h } - W _ { h } ^ { T } - \\gamma I ) h _ { t - 1 } + V _ { h } x _ { t } + b _ { h } \\big ) , } \\end{array}\n$$",
812
+ "text_format": "latex",
813
+ "bbox": [
814
+ 289,
815
+ 707,
816
+ 705,
817
+ 727
818
+ ],
819
+ "page_idx": 4
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "where $\\pmb { I }$ is the identity matrix of size $n$ and $\\gamma > 0$ is a hyperparameter that controls the strength of diffusion. By doing so, the eigenvalues of the Jacobian have slightly negative real parts. This modification improves the stability of the numerical method as demonstrated in Section 4. ",
824
+ "bbox": [
825
+ 174,
826
+ 733,
827
+ 825,
828
+ 776
829
+ ],
830
+ "page_idx": 4
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "3.4 GATING MECHANISM ",
835
+ "text_level": 1,
836
+ "bbox": [
837
+ 174,
838
+ 792,
839
+ 362,
840
+ 806
841
+ ],
842
+ "page_idx": 4
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Gating is commonly employed in RNNs. Each gate is often modeled as a single layer network taking the previous hidden state $h _ { t - 1 }$ and data $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { t } }$ as inputs, followed by a sigmoid activation. As an example, LSTM cells make use of three gates, a forget gate, an input gate, and an output gate. A systematic ablation study suggests that some of the gates are crucial to the performance of LSTM (Jozefowicz et al., 2015). ",
847
+ "bbox": [
848
+ 173,
849
+ 818,
850
+ 825,
851
+ 888
852
+ ],
853
+ "page_idx": 4
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Gating can be incorporated into AntisymmetricRNN as well. However, it should be done carefully so that the critical condition in Equation 5 still holds. We propose the following modification to ",
858
+ "bbox": [
859
+ 173,
860
+ 895,
861
+ 823,
862
+ 924
863
+ ],
864
+ "page_idx": 4
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "AntisymmetricRNN, which adds an input gate ${ \\boldsymbol { z } } _ { t }$ to control the flow of information into the hidden states: ",
869
+ "bbox": [
870
+ 171,
871
+ 103,
872
+ 825,
873
+ 132
874
+ ],
875
+ "page_idx": 5
876
+ },
877
+ {
878
+ "type": "equation",
879
+ "img_path": "images/e76782633e00b1dd1f79627791ca64e966afbbece6e2cb8f4c1757959da92986.jpg",
880
+ "text": "$$\n\\begin{array} { r l } & { z _ { t } = \\sigma \\left( ( W _ { h } - W _ { h } ^ { T } - \\gamma I ) h _ { t - 1 } + V _ { z } x _ { t } + b _ { z } \\right) , } \\\\ & { h _ { t } = h _ { t - 1 } + \\epsilon z _ { t } \\circ \\operatorname { t a n h } \\left( ( W _ { h } - W _ { h } ^ { T } - \\gamma I ) h _ { t - 1 } + V _ { h } x _ { t } + b _ { h } \\right) , } \\end{array}\n$$",
881
+ "text_format": "latex",
882
+ "bbox": [
883
+ 276,
884
+ 137,
885
+ 720,
886
+ 180
887
+ ],
888
+ "page_idx": 5
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "where $\\sigma$ denotes the sigmoid function and $\\circ$ denotes the Hadamard product. ",
893
+ "bbox": [
894
+ 176,
895
+ 184,
896
+ 669,
897
+ 199
898
+ ],
899
+ "page_idx": 5
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "The effect of ${ \\boldsymbol { z } } _ { t }$ resembles the input gate in LSTM and the update gate in GRU. By sharing the antisymmetric weight matrix, the number of model parameters only increases slightly, instead of being doubled. More importantly, the Jacobian matrix of this gated model has a similar form as that in Equation 9, that is, a diagonal matrix multiplied by an antisymmetric matrix (ignoring diffusion). As a result, the real parts of the eigenvalues of the Jacobian matrix are still close to zero, and the critical criterion remains satisfied. ",
904
+ "bbox": [
905
+ 173,
906
+ 205,
907
+ 826,
908
+ 290
909
+ ],
910
+ "page_idx": 5
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "4 SIMULATION ",
915
+ "text_level": 1,
916
+ "bbox": [
917
+ 174,
918
+ 310,
919
+ 313,
920
+ 327
921
+ ],
922
+ "page_idx": 5
923
+ },
924
+ {
925
+ "type": "image",
926
+ "img_path": "images/5a858e81e3967a8c614f2927716aa5f9ff6bf81f6c10c6a13a134af61b8531b4.jpg",
927
+ "image_caption": [
928
+ "Figure 1: Visualization of the dynamics of RNNs and RNNs with feedback using different weight matrices. "
929
+ ],
930
+ "image_footnote": [],
931
+ "bbox": [
932
+ 173,
933
+ 352,
934
+ 825,
935
+ 659
936
+ ],
937
+ "page_idx": 5
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Adopting the visualization technique used by Laurent & von Brecht (2017) and Haber & Ruthotto (2017), we study the behavior of two-dimensional vanilla RNNs (left) and RNNs with feedback (right) in the absence of input data and bias: ",
942
+ "bbox": [
943
+ 173,
944
+ 717,
945
+ 825,
946
+ 758
947
+ ],
948
+ "page_idx": 5
949
+ },
950
+ {
951
+ "type": "equation",
952
+ "img_path": "images/0a18591616ff8ee12b08f2744cf0823424fcf2940a96668d0a8bc648af63fb84.jpg",
953
+ "text": "$$\n\\operatorname { \\mathrm { = \\ t a n h } } ( W h _ { t - 1 } ) , \\qquad { \\mathrm { f e e d b a c k } } ; h _ { t } = h _ { t - 1 } + \\epsilon \\operatorname { t a n h } ( W h _ { t - 1 } ) .\n$$",
954
+ "text_format": "latex",
955
+ "bbox": [
956
+ 328,
957
+ 767,
958
+ 750,
959
+ 784
960
+ ],
961
+ "page_idx": 5
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "Here $\\boldsymbol { h } _ { t } \\in \\mathbb { R } ^ { 2 }$ and $1 \\leq t \\leq T$ . We arbitrarily choose three initial states: $( 0 , 0 . 5 ) , ( - 0 . 5 , - 0 . 5 )$ and $( 0 . 5 , - 0 . 7 5 )$ , and apply the corresponding RNN recurrence. Figure 1 plots the progression of the states $h _ { t }$ of vanilla RNNs (first row) and RNNs with feedback (second row) parameterized by different transition matrices $W$ . In each figure, more translucent points represent earlier time steps. The number of total time steps $T = 5 0$ . ",
966
+ "bbox": [
967
+ 173,
968
+ 790,
969
+ 825,
970
+ 861
971
+ ],
972
+ "page_idx": 5
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Figure 1(a) corresponds to a random weight matrix, where the entries are independent and standard Gaussian. The three initial points (shown in stars) converge to two fixed points on the boundary. Since the weight matrix is unstructured, the behavior is unpredictable as expected. More examples with different weight matrices are shown in Appendix D. Figure 1(b) shows the behavior of the identity weight matrix. Since $\\operatorname { t a n h } ( { \\cdot } )$ is a contractive mapping, the origin is the unique fixed point. Figure 1(c) and (d) correspond to orthogonal weight matrices that represent reflection and rotation transforms respectively. A two-dimensional orthogonal matrix is either a reflection or a rotation transform; the determinant of the matrix is 1 or $- 1$ respectively. Even though the weight matrix is orthogonal, the states all converge to the origin because of the derivative of the activation function $0 \\leq \\mathrm { t a n h } ^ { \\prime } ( W h _ { t - 1 } ) \\leq 1$ . ",
977
+ "bbox": [
978
+ 173,
979
+ 867,
980
+ 825,
981
+ 924
982
+ ],
983
+ "page_idx": 5
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "",
988
+ "bbox": [
989
+ 174,
990
+ 103,
991
+ 825,
992
+ 188
993
+ ],
994
+ "page_idx": 6
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "In the case of RNNs with feedback, the trajectory of the hidden states is predictable based on the eigenvalues of the weight matrix $W$ .We consider the following four weight matrices that correspond to Figure 1(e)-(f) respectively: ",
999
+ "bbox": [
1000
+ 174,
1001
+ 194,
1002
+ 825,
1003
+ 236
1004
+ ],
1005
+ "page_idx": 6
1006
+ },
1007
+ {
1008
+ "type": "equation",
1009
+ "img_path": "images/47d468695314b0b59286f3662419944c639838b2642a550c2d7bfd1358abdcdd.jpg",
1010
+ "text": "$$\nW _ { + } = \\left( \\begin{array} { c c } { { 2 } } & { { - 2 } } \\\\ { { 0 } } & { { 2 } } \\end{array} \\right) , W _ { - } = \\left( \\begin{array} { c c } { { - 2 } } & { { 2 } } \\\\ { { 0 } } & { { - 2 } } \\end{array} \\right) , W _ { 0 } = \\left( \\begin{array} { c c } { { 0 } } & { { - 2 } } \\\\ { { 2 } } & { { 0 } } \\end{array} \\right) , W _ { \\mathrm { d i f f } } = \\left( \\begin{array} { c c } { { - 0 . 1 5 } } & { { - 2 } } \\\\ { { 2 } } & { { - 0 . 1 5 } } \\end{array} \\right) .\n$$",
1011
+ "text_format": "latex",
1012
+ "bbox": [
1013
+ 200,
1014
+ 241,
1015
+ 795,
1016
+ 276
1017
+ ],
1018
+ "page_idx": 6
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "We also overlay the vector field that represents the underlying ODE. The step size is set to $\\epsilon = 0 . 1$ ",
1023
+ "bbox": [
1024
+ 174,
1025
+ 280,
1026
+ 820,
1027
+ 295
1028
+ ],
1029
+ "page_idx": 6
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "For Figure 1(e) and (f), the eigenvalues are $\\lambda _ { 1 } ( W _ { + } ) = \\lambda _ { 2 } ( W _ { + } ) = 2$ and $\\lambda _ { 1 } ( { \\cal W } _ { - } ) = \\lambda _ { 2 } ( { \\cal W } _ { - } ) =$ $- 2$ . As a result, the hidden states are moving away from the origin and towards the origin respectively. Figure $1 ( \\mathrm { g } )$ corresponds to the antisymmetric weight matrix $W _ { 0 }$ , whose eigenvalues are purely imaginary: $\\lambda _ { 1 } ( W _ { 0 } ) = 2 i$ , $\\lambda _ { 2 } ( \\mathbf { W } _ { 0 } ) = - 2 i$ . In this case, the vector field is circular; a state moves around the origin without exponentially increasing or decreasing its norm. However, on closer inspection, the trajectories are actually outward spirals. This is because, at each time step, the state moves along the tangential direction by a small step, which increases the distance from the origin and leads to numerical instability. It is the behavior characterized by Proposition 2. This issue can be mitigated by subtracting a small diffusion term $\\gamma$ from the diagonal elements of the weight matrix. We choose $\\gamma = 0 . 1 5$ and the weight matrix $W _ { \\mathrm { d i f f } }$ has eigenvalues of $\\lambda _ { 1 } ( W _ { \\mathrm { d i f f } } ) = - 0 . 1 5 + 2 i$ , $\\lambda _ { 2 } ( W _ { \\mathrm { d i f f } } ) = - 0 . 1 5 - 2 i$ . Figure 1(h) shows the effect of the diffusion terms. The vector field is slightly tilting toward the origin and the trajectory maintains a constant distance from the origin. ",
1034
+ "bbox": [
1035
+ 173,
1036
+ 300,
1037
+ 825,
1038
+ 482
1039
+ ],
1040
+ "page_idx": 6
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "These simulations show that the hidden states of an AntisymmetricRNN (Figure $1 ( \\mathrm { g } )$ and (h)) have predictable dynamics. It achieves the desirable behavior, without the complication of maintaining an orthogonal or unitary matrix as in Figure 1(d), which still suffers from vanishing gradients due to the contraction of the activation function. ",
1045
+ "bbox": [
1046
+ 174,
1047
+ 489,
1048
+ 825,
1049
+ 545
1050
+ ],
1051
+ "page_idx": 6
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "5 EXPERIMENTS ",
1056
+ "text_level": 1,
1057
+ "bbox": [
1058
+ 176,
1059
+ 565,
1060
+ 326,
1061
+ 580
1062
+ ],
1063
+ "page_idx": 6
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "The performance of the proposed antisymmetric networks is evaluated on four image classification tasks with long-range dependencies. The classification is done by feeding pixels of the images as a sequence to RNNs and sending the last hidden state $h _ { T }$ of the RNNs into a fully-connected layer and a softmax function. We use the cross-entropy loss and SGD with momentum and Adagrad (Duchi et al., 2011) as optimizers. More experimental details can be found in Appendix C. In this section, AntisymmetricRNN denotes the model with diffusion in Equation 12, and AntisymmetricRNN w/ gating represents the model in Equation 13. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 595,
1071
+ 825,
1072
+ 694
1073
+ ],
1074
+ "page_idx": 6
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "5.1 PIXEL-BY-PIXEL MNIST ",
1079
+ "text_level": 1,
1080
+ "bbox": [
1081
+ 176,
1082
+ 710,
1083
+ 387,
1084
+ 724
1085
+ ],
1086
+ "page_idx": 6
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "In the first task, we learn to classify the MNIST digits by pixels (LeCun et al., 1998). This task was proposed by Le et al. (2015) and used as a benchmark for learning long term dependencies. MNIST images are grayscale with $2 8 \\times 2 8$ pixels. The 784 pixels are presented sequentially to the recurrent net, one pixel at a time in scanline order (starting at the top left corner of the image and ending at the bottom right corner). In other words, the input dimension $m = 1$ and number of time steps $T = 7 8 4$ . The pixel-by-pixel MNIST task is to predict the digit of the MNIST image after seeing all 784 pixels. As a result, the network has to be able to learn the long-range dependencies in order to correctly classify the digit. To make the task even harder, the MNIST pixels are shuffled using a fixed random permutation. It creates non-local long-range dependencies among pixels in an image. This task is referred to as the permuted pixel-by-pixel MNIST. ",
1091
+ "bbox": [
1092
+ 173,
1093
+ 736,
1094
+ 825,
1095
+ 876
1096
+ ],
1097
+ "page_idx": 6
1098
+ },
1099
+ {
1100
+ "type": "table",
1101
+ "img_path": "images/12e0f91c5ad63a2caa5b177da5c0b6b8400f5132a170e4cfdf15382088711a33.jpg",
1102
+ "table_caption": [
1103
+ "Table 1: Evaluation accuracy on pixel-by-pixel MNIST and permuted MNIST. "
1104
+ ],
1105
+ "table_footnote": [],
1106
+ "table_body": "<table><tr><td>method</td><td>MNIST</td><td>pMNIST</td><td>#units</td><td># params</td></tr><tr><td>LSTM (Arjovsky et al., 2016)1</td><td>97.3%</td><td>92.6%</td><td>128</td><td>68k</td></tr><tr><td>FC uRNN(Wisdom et al., 2016)</td><td>92.8%</td><td>92.1%</td><td>116</td><td>16k</td></tr><tr><td>FC uRNN (Wisdom et al., 2016)</td><td>96.9%</td><td>94.1%</td><td>512</td><td>270k</td></tr><tr><td>Soft orthogonal (Vorontsov et al., 2017)</td><td>94.1%</td><td>91.4%</td><td>128</td><td>18k</td></tr><tr><td>KRU (Jose et al., 2017)</td><td>96.4%</td><td>94.5%</td><td>512</td><td>11k</td></tr><tr><td>AntisymmetricRNN</td><td>98.0%</td><td>95.8%</td><td>128</td><td>10k</td></tr><tr><td>AntisymmetricRNN w/ gating</td><td>98.8%</td><td>93.1%</td><td>128</td><td>10k</td></tr></table>",
1107
+ "bbox": [
1108
+ 222,
1109
+ 101,
1110
+ 777,
1111
+ 229
1112
+ ],
1113
+ "page_idx": 7
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Table 1 summarizes the performance of our methods and the existing methods. On both tasks, the proposed AntisymmetricRNNs outperform the regular LSTM model using only $1 / 7$ of parameters. Imposing orthogonal weights (Arjovsky et al., 2016) produces worse results, which corroborates with the existing study showing that such constraints restrict the capacity of the learned model. Softening the orthogonal weights constraints (Wisdom et al., 2016; Vorontsov et al., 2017; Jose et al., 2017) leads to slightly improved performance. AntisymmetricRNNs outperform these methods by a large margin, without the computational overhead to enforce orthogonality. ",
1118
+ "bbox": [
1119
+ 173,
1120
+ 281,
1121
+ 825,
1122
+ 378
1123
+ ],
1124
+ "page_idx": 7
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "5.2 PIXEL-BY-PIXEL CIFAR-10 ",
1129
+ "text_level": 1,
1130
+ "bbox": [
1131
+ 176,
1132
+ 396,
1133
+ 408,
1134
+ 410
1135
+ ],
1136
+ "page_idx": 7
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "To test our methods on a larger dataset, we conduct experiments on pixel-by-pixel CIFAR-10. The CIFAR-10 dataset contains $3 2 \\times 3 2$ colour images in 10 classes (Krizhevsky & Hinton, 2009). Similar to pixel-by-pixel MNIST, we feed the three channels of a pixel into the model at each time step. The input dimension $m = 3$ and number of time steps $T = 1 0 2 4$ . ",
1141
+ "bbox": [
1142
+ 174,
1143
+ 422,
1144
+ 825,
1145
+ 478
1146
+ ],
1147
+ "page_idx": 7
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "The results are shown in Table 2. The AntisymmetricRNN performance is on par with the LSTM, and AntisymmetricRNN with gating is slightly better than LSTM, both using only about half of the parameters of the LSTM model. Further investigation shows that the task is mostly dominated by short term dependencies. LSTM can achieve about $4 8 . 3 \\%$ classification accuracy by only seeing the last 8 rows of CIFAR-10 images 2. ",
1152
+ "bbox": [
1153
+ 174,
1154
+ 484,
1155
+ 823,
1156
+ 555
1157
+ ],
1158
+ "page_idx": 7
1159
+ },
1160
+ {
1161
+ "type": "table",
1162
+ "img_path": "images/d380c059993ae679686020c20815fd5f9815005e9d338d8404eecf0de766dc5e.jpg",
1163
+ "table_caption": [
1164
+ "Table 2: Evaluation accuracy on pixel-by-pixel CIFAR-10 and noise padded CIFAR-10. "
1165
+ ],
1166
+ "table_footnote": [],
1167
+ "table_body": "<table><tr><td>method</td><td>pixel-by-pixel</td><td>noise padded</td><td>#units</td><td># params</td></tr><tr><td>LSTM</td><td>59.7%</td><td>11.6%</td><td>128</td><td>69k</td></tr><tr><td>Ablation model</td><td>54.6%</td><td>46.2%</td><td>196</td><td>42k</td></tr><tr><td>AntisymmetricRNN</td><td>58.7%</td><td>48.3%</td><td>256</td><td>36k</td></tr><tr><td>AntisymmetricRNN w/ gating</td><td>62.2%</td><td>54.7%</td><td>256</td><td>37k</td></tr></table>",
1168
+ "bbox": [
1169
+ 214,
1170
+ 569,
1171
+ 785,
1172
+ 655
1173
+ ],
1174
+ "page_idx": 7
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "5.3 NOISE PADDED CIFAR-10 ",
1179
+ "text_level": 1,
1180
+ "bbox": [
1181
+ 174,
1182
+ 705,
1183
+ 398,
1184
+ 719
1185
+ ],
1186
+ "page_idx": 7
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "To introduce more long-range dependencies to the pixel-by-pixel CIFAR-10 task, we define a more challenging task call the noise padded CIFAR-10, inspired by the noise padded experiments in Chen et al. (2018a). Instead of feeding in one pixel at one time, we input each row of a CIFAR-10 image at every time step. After the first 32 time steps, we input independent standard Gaussian noise for the remaining time steps. Since a CIFAR-10 image is of size 32 with three RGB channels, the input dimension is $m = 9 6$ . The total number of time steps is set to $T = 1 0 0 0$ . In other words, only the first 32 time steps of input contain salient information, all remaining 968 time steps are merely random noise. For a model to correctly classify an input image, it has to remember the information from a long time ago. This task is conceptually more difficult than the pixel-by-pixel CIFAR-10, although the total amount of signal in the input sequence is the same. The results are shown in Table 2. LSTM fails to train at all on this task while our proposed methods perform reasonably well with fewer parameters. ",
1191
+ "bbox": [
1192
+ 174,
1193
+ 732,
1194
+ 825,
1195
+ 898
1196
+ ],
1197
+ "page_idx": 7
1198
+ },
1199
+ {
1200
+ "type": "image",
1201
+ "img_path": "images/dc62088bb56c80add338f8f3c68221e98d375809570dee8a3113a566b93497bc.jpg",
1202
+ "image_caption": [
1203
+ "Figure 2: Mean and standard deviation of eigenvalues of the end-to-end Jacobian matrix in AntisymmetricRNNs with different diffusion constants and LSTMs, trained on the noise padded CIFAR-10. "
1204
+ ],
1205
+ "image_footnote": [],
1206
+ "bbox": [
1207
+ 307,
1208
+ 104,
1209
+ 683,
1210
+ 276
1211
+ ],
1212
+ "page_idx": 8
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "To verify that AntisymmetricRNNs indeed mitigate the exploding/vanishing gradient issues, we conduct an additional set of experiments varying the length of noise padding so that the total time steps $T \\in \\{ 1 0 0 , 2 0 0 , 4 0 0 , 8 0 0 \\}$ . LSTMs and AntisymmetricRNNs with different diffusion constants $\\gamma \\in \\{ 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 , 5 , 1 0 \\}$ are trained on these tasks. Figure 2 visualizes the mean and standard deviation of the eigenvalues of the end-to-end Jacobian matrices for these networks. Unitary eigenvalues, i.e., mean close to 1 and standard deviation close to 0, indicate non-exploding and non-vanishing gradients. As shown in the figure, the eigenvalues for LSTMs quickly approaches zero as time steps increase, indicating vanishing gradients during back-propagation. This explains why LSTMs fail to train at all on this task. AntisymmetricRNNs with a broad range of diffusion constants $\\gamma$ , on the other hand, have eigenvalues centered around 1. It is worth noting though as the diffusion constant increases to large values, AntisymmetricRNNs run into vanishing gradients as well. The diffusion constant $\\gamma$ plays an important role in striking a balance between the stability of discretization and capturing long-term dependencies. ",
1217
+ "bbox": [
1218
+ 174,
1219
+ 349,
1220
+ 825,
1221
+ 530
1222
+ ],
1223
+ "page_idx": 8
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "5.4 ABLATION STUDY ",
1228
+ "text_level": 1,
1229
+ "bbox": [
1230
+ 176,
1231
+ 550,
1232
+ 338,
1233
+ 563
1234
+ ],
1235
+ "page_idx": 8
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "For the CIFAR-10 experiments, we have also conducted an ablation study to further demonstrate the effect of antisymmetric weight matrix. The ablation model in Table 2 refers to the model that replaces the antisymmetric weight matrices in Equation 13 with unstructured weight matrices. As shown in Table 2, without the antisymmetric parametrization, the performance on both pixel-bypixel and noise padded CIFAR-10 is worse. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 577,
1243
+ 825,
1244
+ 645
1245
+ ],
1246
+ "page_idx": 8
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "It is worth mentioning that the antisymmetric formulation is a sufficient condition of stability, not necessary. There are possibly other conditions that lead to stability as well as suggested in Chen et al. (2018a), which could explain the modest degradation in the ablation results. ",
1251
+ "bbox": [
1252
+ 174,
1253
+ 654,
1254
+ 823,
1255
+ 695
1256
+ ],
1257
+ "page_idx": 8
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "6 CONCLUSION ",
1262
+ "text_level": 1,
1263
+ "bbox": [
1264
+ 174,
1265
+ 717,
1266
+ 318,
1267
+ 733
1268
+ ],
1269
+ "page_idx": 8
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "In this paper, we present a new perspective on the trainability of RNNs from the dynamical system viewpoint. We draw connections between RNNs and the ordinary differential equation theory and design new recurrent architectures by discretizing ODEs. This new view opens up possibilities to exploit the computational and theoretical success from dynamical systems to understand and improve the trainability of RNNs. We also propose the AntisymmetricRNN, which is a discretization of ODEs that satisfy the critical criterion. Besides its appealing theoretical properties, our models have demonstrated competitive performance over strong recurrent baselines on a comprehensive set of benchmark tasks. ",
1274
+ "bbox": [
1275
+ 174,
1276
+ 750,
1277
+ 825,
1278
+ 861
1279
+ ],
1280
+ "page_idx": 8
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "By establishing a link between recurrent networks and ordinary differential equations, we anticipate that this work will inspire future research in both communities. An important item of future work is to investigate other stable ODEs and numerical methods that lead to novel and well-conditioned recurrent architectures. ",
1285
+ "bbox": [
1286
+ 174,
1287
+ 867,
1288
+ 823,
1289
+ 922
1290
+ ],
1291
+ "page_idx": 8
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "REFERENCES ",
1296
+ "text_level": 1,
1297
+ "bbox": [
1298
+ 174,
1299
+ 102,
1300
+ 287,
1301
+ 118
1302
+ ],
1303
+ "page_idx": 9
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In ICML, pp. 1120–1128, 2016. ",
1308
+ "bbox": [
1309
+ 174,
1310
+ 126,
1311
+ 823,
1312
+ 155
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Uri M Ascher and Linda R Petzold. Computer methods for ordinary differential equations and differential-algebraic equations, volume 61. Siam, 1998. ",
1319
+ "bbox": [
1320
+ 173,
1321
+ 162,
1322
+ 823,
1323
+ 193
1324
+ ],
1325
+ "page_idx": 9
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Uri M Ascher, Robert MM Mattheij, and Robert D Russell. Numerical solution of boundary value problems for ordinary differential equations, volume 13. Siam, 1994. ",
1330
+ "bbox": [
1331
+ 173,
1332
+ 200,
1333
+ 825,
1334
+ 231
1335
+ ],
1336
+ "page_idx": 9
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. ",
1341
+ "bbox": [
1342
+ 173,
1343
+ 238,
1344
+ 825,
1345
+ 268
1346
+ ],
1347
+ "page_idx": 9
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ",
1352
+ "bbox": [
1353
+ 173,
1354
+ 276,
1355
+ 823,
1356
+ 306
1357
+ ],
1358
+ "page_idx": 9
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994. ",
1363
+ "bbox": [
1364
+ 173,
1365
+ 314,
1366
+ 823,
1367
+ 344
1368
+ ],
1369
+ "page_idx": 9
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Bo Chang, Lili Meng, Eldad Haber, Lars Ruthotto, David Begert, and Elliot Holtham. Reversible architectures for arbitrarily deep residual neural networks. In AAAI, 2018a. ",
1374
+ "bbox": [
1375
+ 173,
1376
+ 352,
1377
+ 821,
1378
+ 382
1379
+ ],
1380
+ "page_idx": 9
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Bo Chang, Lili Meng, Eldad Haber, Frederick Tung, and David Begert. Multi-level residual networks from dynamical systems view. In ICLR, 2018b. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 390,
1388
+ 823,
1389
+ 420
1390
+ ],
1391
+ "page_idx": 9
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Minmin Chen, Jeffrey Pennington, and Samuel Schoenholz. Dynamical isometry and a mean field theory of RNNs: Gating enables signal propagation in recurrent neural networks. In ICML, pp. 873–882, 2018a. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 428,
1399
+ 823,
1400
+ 470
1401
+ ],
1402
+ "page_idx": 9
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. arXiv preprint arXiv:1806.07366, 2018b. ",
1407
+ "bbox": [
1408
+ 171,
1409
+ 479,
1410
+ 823,
1411
+ 508
1412
+ ],
1413
+ "page_idx": 9
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In EMNLP, pp. 1724–1734, 2014. ",
1418
+ "bbox": [
1419
+ 174,
1420
+ 517,
1421
+ 823,
1422
+ 560
1423
+ ],
1424
+ "page_idx": 9
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Jasmine Collins, Jascha Sohl-Dickstein, and David Sussillo. Capacity and trainability in recurrent neural networks. ICLR, 2016. ",
1429
+ "bbox": [
1430
+ 173,
1431
+ 568,
1432
+ 823,
1433
+ 598
1434
+ ],
1435
+ "page_idx": 9
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Tim Cooijmans, Nicolas Ballas, Cesar Laurent, C¸ a ´ glar G ˘ ulc¸ehre, and Aaron Courville. Recurrent ¨ batch normalization. In ICLR, 2017. ",
1440
+ "bbox": [
1441
+ 174,
1442
+ 606,
1443
+ 821,
1444
+ 636
1445
+ ],
1446
+ "page_idx": 9
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. ",
1451
+ "bbox": [
1452
+ 173,
1453
+ 643,
1454
+ 821,
1455
+ 674
1456
+ ],
1457
+ "page_idx": 9
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Salah El Hihi and Yoshua Bengio. Hierarchical recurrent neural networks for long-term dependencies. In NIPS, pp. 493–499, 1996. ",
1462
+ "bbox": [
1463
+ 173,
1464
+ 681,
1465
+ 820,
1466
+ 712
1467
+ ],
1468
+ "page_idx": 9
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "Jeffrey L Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990. ",
1473
+ "bbox": [
1474
+ 174,
1475
+ 719,
1476
+ 730,
1477
+ 736
1478
+ ],
1479
+ "page_idx": 9
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In ICASSP, pp. 6645–6649. IEEE, 2013. ",
1484
+ "bbox": [
1485
+ 173,
1486
+ 743,
1487
+ 818,
1488
+ 773
1489
+ ],
1490
+ "page_idx": 9
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Eldad Haber and Lars Ruthotto. Stable architectures for deep neural networks. Inverse Problems, 34(1):014004, 2017. ",
1495
+ "bbox": [
1496
+ 173,
1497
+ 781,
1498
+ 821,
1499
+ 810
1500
+ ],
1501
+ "page_idx": 9
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016. ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 819,
1509
+ 820,
1510
+ 849
1511
+ ],
1512
+ "page_idx": 9
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Balazs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. Session-based rec-´ ommendations with recurrent neural networks. arXiv preprint arXiv:1511.06939, 2015. ",
1517
+ "bbox": [
1518
+ 174,
1519
+ 857,
1520
+ 820,
1521
+ 887
1522
+ ],
1523
+ "page_idx": 9
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1528
+ "bbox": [
1529
+ 174,
1530
+ 895,
1531
+ 820,
1532
+ 924
1533
+ ],
1534
+ "page_idx": 9
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "Stephanie L Hyland and Gunnar Ratsch. Learning unitary operators with help from u (n). In ¨ AAAI, pp. 2050–2058, 2017. \nSergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pp. 448–456, 2015. \nCijo Jose, Moustpaha Cisse, and Francois Fleuret. Kronecker recurrent units. arXiv preprint arXiv:1705.10142, 2017. \nRafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In ICML, pp. 2342–2350, 2015. \nRafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. \nSekitoshi Kanai, Yasuhiro Fujiwara, and Sotetsu Iwamura. Preventing gradient explosions in gated recurrent units. In NIPS, pp. 435–444, 2017. \nRyan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In NIPS, pp. 3294–3302, 2015. \nAlex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009. \nThomas Laurent and James von Brecht. A recurrent neural network without chaos. In ICLR, 2017. \nQuoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015. \nYann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. \nYiping Lu, Aoxiao Zhong, Quanzheng Li, and Bin Dong. Beyond finite layer neural networks: Bridging deep architectures and numerical differential equations. In ICML, pp. 3276–3285, 2018. \nTomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent \\` neural network based language model. In Interspeech, volume 2, pp. 3, 2010. \nTomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014. \nDmytro Mishkin and Jiri Matas. All you need is a good init. arXiv preprint arXiv:1511.06422, 2015. \nRazvan Pascanu, Tomas Mikolov, and Yoshua Bengio. Understanding the exploding gradient problem. CoRR, abs/1211.5063, 2012. \nRazvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In ICML, pp. 1310–1318, 2013. \nJeffrey Pennington, Sam Schoenholz, and Surya Ganguli. Resurrecting the sigmoid in deep learning through dynamical isometry: theory and practice. NIPS, 2017. \nDavid E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. nature, 323(6088):533, 1986. \nAndrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013. \nRichard Socher, Cliff C Lin, Chris Manning, and Andrew Y Ng. Parsing natural scenes and natural language with recursive neural networks. In ICML, pp. 129–136, 2011. \nCorentin Tallec and Yann Ollivier. Can recurrent neural networks warp time? In ICLR, 2018. \nEugene Vorontsov, Chiheb Trabelsi, Samuel Kadoury, and Chris Pal. On orthogonality and learning recurrent networks with long term dependencies. In ICML, pp. 3570–3578, 2017. \nScott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In NIPS, pp. 4880–4888, 2016. \nChao-Yuan Wu, Amr Ahmed, Alex Beutel, Alexander J Smola, and How Jing. Recurrent recommender networks. In WSDM, pp. 495–503. ACM, 2017. \nDi Xie, Jiang Xiong, and Shiliang Pu. All you need is beyond a good init: Exploring better solution for training extremely deep convolutional neural networks with orthonormality and modulation. arXiv preprint arXiv:1703.01827, 2017. \nFisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. \nBoxuan Yue, Junwei Fu, and Jun Liang. Residual recurrent neural networks for learning sequential representations. Information, 9(3):56, 2018. \nJiong Zhang, Qi Lei, and Inderjit Dhillon. Stabilizing gradients for deep neural networks via efficient SVD parameterization. In ICML, pp. 5806–5814, 2018a. \nJiong Zhang, Yibo Lin, Zhao Song, and Inderjit Dhillon. Learning long term dependencies via Fourier recurrent units. In ICML, pp. 5815–5823, 2018b. ",
1539
+ "bbox": [
1540
+ 171,
1541
+ 54,
1542
+ 828,
1543
+ 924
1544
+ ],
1545
+ "page_idx": 10
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "",
1550
+ "bbox": [
1551
+ 171,
1552
+ 102,
1553
+ 828,
1554
+ 371
1555
+ ],
1556
+ "page_idx": 11
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "A AN OVERVIEW OF STABILITY THEORY ",
1561
+ "text_level": 1,
1562
+ "bbox": [
1563
+ 174,
1564
+ 396,
1565
+ 524,
1566
+ 411
1567
+ ],
1568
+ "page_idx": 11
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "text": "In this section, we provide a brief overview of the stability theory by examples. Most of the materials are adapted from Ascher & Petzold (1998). ",
1573
+ "bbox": [
1574
+ 174,
1575
+ 425,
1576
+ 823,
1577
+ 455
1578
+ ],
1579
+ "page_idx": 11
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "Consider the simple scalar ODE, often referred to as the test equation: $y ^ { \\prime } ( t ) = \\lambda y ( t )$ , where $\\lambda \\in \\mathbb { C }$ is a constant. We allow $\\lambda$ to be complex because it later represents an eigenvalue of a system’s matrix. The solution to this initial value problem is $y ( t ) \\stackrel { \\bullet } { = } e ^ { \\lambda t } y ( 0 )$ . If $y ( t )$ and $\\tilde { y } ( t )$ are two solutions of the test equation, then their difference at any time $t$ is ",
1584
+ "bbox": [
1585
+ 173,
1586
+ 462,
1587
+ 825,
1588
+ 517
1589
+ ],
1590
+ "page_idx": 11
1591
+ },
1592
+ {
1593
+ "type": "equation",
1594
+ "img_path": "images/ea067c6dbcabf4a4ed41fcfe08e9725db146a776e5d853833f68fa6789ea306d.jpg",
1595
+ "text": "$$\n| y ( t ) - \\tilde { y } ( t ) | = | e ^ { \\lambda t } ( y ( 0 ) - \\tilde { y } ( 0 ) ) | = e ^ { R e ( \\lambda ) t } | y ( 0 ) - \\tilde { y } ( 0 ) | .\n$$",
1596
+ "text_format": "latex",
1597
+ "bbox": [
1598
+ 302,
1599
+ 523,
1600
+ 696,
1601
+ 542
1602
+ ],
1603
+ "page_idx": 11
1604
+ },
1605
+ {
1606
+ "type": "text",
1607
+ "text": "If $R e ( \\lambda ) > 0$ , then a small perturbation of the initial states would cause an exponentially exploding difference. If $R e ( \\lambda ) ~ < ~ 0$ , the system is stable, but the perturbation decays exponentially. The perturbation is preserved in the system only if $R e ( \\lambda ) = 0$ . ",
1608
+ "bbox": [
1609
+ 174,
1610
+ 547,
1611
+ 825,
1612
+ 590
1613
+ ],
1614
+ "page_idx": 11
1615
+ },
1616
+ {
1617
+ "type": "text",
1618
+ "text": "We now consider the extension of the test equation to a matrix ODE $\\mathbf { \\boldsymbol { y } } ^ { \\prime } ( t ) = \\mathbf { \\boldsymbol { A } } \\mathbf { \\boldsymbol { y } } ( t )$ . The solution is $\\pmb { y } ( t ) = e ^ { \\pmb { A } t } \\pmb { y } ( 0 )$ . To simplify the analysis, we assume $\\pmb { A }$ is diagonalizable, i.e., $\\pmb { P } ^ { - 1 } \\pmb { A } \\pmb { P } = \\pmb { \\Lambda }$ , where $\\pmb { \\Lambda }$ is a diagonal matrix of the eigenvalues of $\\pmb { A }$ and the columns of $_ { r }$ are the corresponding eigenvectors. If we define ${ \\pmb w } ( t ) = { \\pmb P } ^ { - 1 } { \\pmb y } ( t )$ , then ${ \\pmb w } ^ { \\prime } ( t ) = { \\pmb \\Lambda } { \\pmb w } ( t )$ . The system for ${ \\mathbf { } } w ( t )$ is decoupled: for each component $w _ { i } ( t )$ of ${ \\mathbf { } } w ( t )$ , we have a test equation $w _ { i } ^ { \\prime } ( t ) \\stackrel { \\cdot } { = } \\lambda _ { i } w _ { i } ( t )$ . Therefore, the stability for ${ \\pmb w } ( t )$ , hence also for ${ \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf } { } \\mathbf { } { \\mathbf { } } { \\mathbf } { } \\mathbf { } { \\mathbf { } \\mathbf { } } { \\mathbf { } \\mathbf { } } { \\mathbf { } \\mathbf { } } { \\mathbf } { \\mathbf { } } { \\mathbf } { \\mathbf { } } { \\mathbf } { \\mathbf } { \\mathbf { } } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { \\mathbf \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf } { \\mathbf \\mathbf { } \\mathbf } { \\mathbf \\mathbf { } \\mathbf } { \\mathbf \\mathbf { } \\mathbf } { \\mathbf \\mathbf { } \\mathbf } \\mathbf { \\mathbf } \\mathbf { \\mathbf } \\mathbf { \\mathbf } \\mathbf { \\mathbf } \\mathbf { \\mathbf } \\mathbf { \\mathbf } \\mathbf \\mathbf { } \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf { } \\mathbf \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf { \\mathbf \\mathbf } \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf \\mathbf $ , is determined by the eigenvalues $\\lambda _ { i }$ . ",
1619
+ "bbox": [
1620
+ 173,
1621
+ 597,
1622
+ 825,
1623
+ 683
1624
+ ],
1625
+ "page_idx": 11
1626
+ },
1627
+ {
1628
+ "type": "text",
1629
+ "text": "B PROOF OF A PROPOSITION ",
1630
+ "text_level": 1,
1631
+ "bbox": [
1632
+ 176,
1633
+ 702,
1634
+ 426,
1635
+ 717
1636
+ ],
1637
+ "page_idx": 11
1638
+ },
1639
+ {
1640
+ "type": "text",
1641
+ "text": "In this section, we provide a proof of a proposition which implies that the AntisymmetricRNN and AntisymmetricRNN with gating satisfy the critical criterion, i.e., the eigenvalues of the Jacobian matrix are imaginary. The proof is adapted from Chang et al. (2018a). ",
1642
+ "bbox": [
1643
+ 174,
1644
+ 732,
1645
+ 826,
1646
+ 775
1647
+ ],
1648
+ "page_idx": 11
1649
+ },
1650
+ {
1651
+ "type": "text",
1652
+ "text": "Proposition 3. If $W \\in \\mathbb { R } ^ { n \\times n }$ is an antisymmetric matrix and $\\ b { D } \\in \\mathbb { R } ^ { n \\times n }$ is an invertible diagonal matrix, then the eigenvalues of $\\pmb { D W }$ are imaginary. ",
1653
+ "bbox": [
1654
+ 171,
1655
+ 777,
1656
+ 823,
1657
+ 808
1658
+ ],
1659
+ "page_idx": 11
1660
+ },
1661
+ {
1662
+ "type": "equation",
1663
+ "img_path": "images/16e2a387b65363446063c83771c787fdf44195192b37bf05423347a42921db55.jpg",
1664
+ "text": "$$\nR e ( \\lambda _ { i } ( D W ) ) = 0 , \\quad \\forall i = 1 , 2 , \\ldots , n .\n$$",
1665
+ "text_format": "latex",
1666
+ "bbox": [
1667
+ 367,
1668
+ 813,
1669
+ 630,
1670
+ 830
1671
+ ],
1672
+ "page_idx": 11
1673
+ },
1674
+ {
1675
+ "type": "text",
1676
+ "text": "Proof. Let $\\lambda$ and $\\textbf { { v } }$ be a pair of eigenvalue and eigenvector of $\\pmb { D W }$ , then ",
1677
+ "bbox": [
1678
+ 173,
1679
+ 843,
1680
+ 655,
1681
+ 858
1682
+ ],
1683
+ "page_idx": 11
1684
+ },
1685
+ {
1686
+ "type": "equation",
1687
+ "img_path": "images/94f306dff1290b5fb3463a0e647ea3cd39f3e79f2a851cc5f3e573707bbf83f1.jpg",
1688
+ "text": "$$\n\\begin{array} { c } { { D W v = \\lambda v , } } \\\\ { { W v = \\lambda D ^ { - 1 } v , } } \\\\ { { v ^ { * } W v = \\lambda ( v ^ { * } D ^ { - 1 } v ) , } } \\end{array}\n$$",
1689
+ "text_format": "latex",
1690
+ "bbox": [
1691
+ 418,
1692
+ 863,
1693
+ 578,
1694
+ 922
1695
+ ],
1696
+ "page_idx": 11
1697
+ },
1698
+ {
1699
+ "type": "text",
1700
+ "text": "On one hand, ${ \\pmb v } ^ { * } { \\pmb D } ^ { - 1 } { \\pmb v }$ is real. On the other hand, ",
1701
+ "bbox": [
1702
+ 176,
1703
+ 103,
1704
+ 501,
1705
+ 118
1706
+ ],
1707
+ "page_idx": 12
1708
+ },
1709
+ {
1710
+ "type": "equation",
1711
+ "img_path": "images/18ef60292eb7a3b8e94668abeb68d24533215703aa70ad3747d422df0b39624e.jpg",
1712
+ "text": "$$\n( v ^ { * } W v ) ^ { * } = v ^ { * } W ^ { * } v = - v ^ { * } W v ,\n$$",
1713
+ "text_format": "latex",
1714
+ "bbox": [
1715
+ 380,
1716
+ 125,
1717
+ 614,
1718
+ 142
1719
+ ],
1720
+ "page_idx": 12
1721
+ },
1722
+ {
1723
+ "type": "text",
1724
+ "text": "where $^ *$ represents conjugate transpose. It implies that ${ \\boldsymbol { v } } ^ { * } { \\boldsymbol { W } } { \\boldsymbol { v } }$ is imaginary. Therefore, $\\lambda$ has to be imaginary. As a result, all eigenvalues of $\\pmb { D W }$ are imaginary. □ ",
1725
+ "bbox": [
1726
+ 173,
1727
+ 148,
1728
+ 826,
1729
+ 178
1730
+ ],
1731
+ "page_idx": 12
1732
+ },
1733
+ {
1734
+ "type": "text",
1735
+ "text": "C EXPERIMENTAL DETAILS ",
1736
+ "text_level": 1,
1737
+ "bbox": [
1738
+ 176,
1739
+ 198,
1740
+ 416,
1741
+ 213
1742
+ ],
1743
+ "page_idx": 12
1744
+ },
1745
+ {
1746
+ "type": "text",
1747
+ "text": "Let $m$ be the input dimension and $n$ be the number of hidden units. The input to hidden matrices are initialized to $\\bar { \\mathcal { N } } ( 0 , 1 / m )$ . The hidden to hidden matrices are initialized to $\\bar { \\mathcal { N } } ( 0 , \\sigma _ { w } ^ { 2 } / n )$ , where $\\sigma _ { w }$ is chosen from $\\sigma _ { w } \\in \\{ 0 , 1 , 2 , 4 , 8 , 1 6 \\}$ . The bias terms are initialized to zero, except the forget gate bias of LSTM is initialized to 1, as suggested by Jozefowicz et al. (2015). For AntisymmetricRNNs, the step size $\\epsilon \\in \\{ 0 . 0 1 , 0 . 1 , 1 \\}$ and diffusion $\\gamma \\in \\lbrace 0 . 0 0 1 , 0 . 0 1 , 0 . 1 , 1 . 0 \\rbrace$ . We use SGD with momentum and Adagrad (Duchi et al., 2011) as optimizers, with batch size of 128 and learning rate chosen from $\\{ 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 7 5 , 1 \\}$ . On MNIST and pixel-by-pixel CIFAR-10, all the models are trained for 50,000 iterations. On noise padded CIFAR-10, models are trained for 10,000 iterations. We use the standard train/test split of MNIST and CIFAR-10. The performance measure is the classification accuracy evaluated on the test set. ",
1748
+ "bbox": [
1749
+ 173,
1750
+ 228,
1751
+ 825,
1752
+ 368
1753
+ ],
1754
+ "page_idx": 12
1755
+ },
1756
+ {
1757
+ "type": "text",
1758
+ "text": "D ADDITIONAL VISUALIZATIONS ",
1759
+ "text_level": 1,
1760
+ "bbox": [
1761
+ 176,
1762
+ 388,
1763
+ 464,
1764
+ 405
1765
+ ],
1766
+ "page_idx": 12
1767
+ },
1768
+ {
1769
+ "type": "text",
1770
+ "text": "In this section, we present additional visualizations that are related to the simulation study in Section 4. Figure 3 and 4 show the dynamics of vanilla RNNs and AntisymmetricRNNs with standard Gaussian random weights using different seeds. These visualizations further illustrate the random behavior of a vanilla RNN and the predictable dynamics of an AntisymmetricRNN. ",
1771
+ "bbox": [
1772
+ 174,
1773
+ 420,
1774
+ 825,
1775
+ 476
1776
+ ],
1777
+ "page_idx": 12
1778
+ },
1779
+ {
1780
+ "type": "text",
1781
+ "text": "Figure 5 shows the dynamics of AntisymmetricRNNs with independent standard Gaussian input. \nThis shows that the dynamics become noisier compared to Figure 1, but the trend remains the same. ",
1782
+ "bbox": [
1783
+ 173,
1784
+ 482,
1785
+ 821,
1786
+ 512
1787
+ ],
1788
+ "page_idx": 12
1789
+ },
1790
+ {
1791
+ "type": "image",
1792
+ "img_path": "images/af56ab1a9ad6434e2c42f09f694c286b94dde568787aced6f5c97395e47c7d3b.jpg",
1793
+ "image_caption": [
1794
+ "Figure 3: Visualization of the dynamics of vanilla RNNs with standard Gaussian random weights, using seeds from 1 to 16. "
1795
+ ],
1796
+ "image_footnote": [],
1797
+ "bbox": [
1798
+ 209,
1799
+ 275,
1800
+ 785,
1801
+ 710
1802
+ ],
1803
+ "page_idx": 13
1804
+ },
1805
+ {
1806
+ "type": "image",
1807
+ "img_path": "images/9d3db63ba5e4d101e28325552839dc4269331c8b18c379d043cdb087dc6176d3.jpg",
1808
+ "image_caption": [
1809
+ "Figure 4: Visualization of the dynamics of RNN with feedback with standard Gaussian random weights, using seeds from 1 to 16, diffusion strength $\\gamma = 0 . 1$ . "
1810
+ ],
1811
+ "image_footnote": [],
1812
+ "bbox": [
1813
+ 209,
1814
+ 138,
1815
+ 785,
1816
+ 571
1817
+ ],
1818
+ "page_idx": 14
1819
+ },
1820
+ {
1821
+ "type": "image",
1822
+ "img_path": "images/8ce9b81ff6e57ebb11af09e775f759cb7b8d30d4c27b2a12b1b87256b00b8379.jpg",
1823
+ "image_caption": [
1824
+ "Figure 5: Visualization of the dynamics of RNN with feedback with independent standard Gaussian input. "
1825
+ ],
1826
+ "image_footnote": [],
1827
+ "bbox": [
1828
+ 176,
1829
+ 691,
1830
+ 821,
1831
+ 847
1832
+ ],
1833
+ "page_idx": 14
1834
+ }
1835
+ ]
parse/train/ryxepo0cFX/ryxepo0cFX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryxepo0cFX/ryxepo0cFX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/5qsptDcsdEj/0.png ADDED

Git LFS Details

  • SHA256: 6641ee63e19f54f5b263f57a20fff78839c77413129751d374df9d42c254cd24
  • Pointer size: 131 Bytes
  • Size of remote file: 403 kB
vlm/train/5qsptDcsdEj/1.png ADDED

Git LFS Details

  • SHA256: ef751e785b9afeea9611cc7f601ed2151caff813392a95075ac8c34451acfdb7
  • Pointer size: 131 Bytes
  • Size of remote file: 596 kB
vlm/train/5qsptDcsdEj/10.png ADDED

Git LFS Details

  • SHA256: 488f105c3e8699826b841c7569a205bc4db93c70cb16572756c13b1b6313fd70
  • Pointer size: 131 Bytes
  • Size of remote file: 610 kB
vlm/train/5qsptDcsdEj/11.png ADDED

Git LFS Details

  • SHA256: 25bb58d63bd6e59a0f6726989579983858665c181c54d5206776549ea482e878
  • Pointer size: 131 Bytes
  • Size of remote file: 596 kB
vlm/train/5qsptDcsdEj/12.png ADDED

Git LFS Details

  • SHA256: 70b54ad0feb2bfbac14dcb0df63681165d32fec74acb84326e47c452a47ab646
  • Pointer size: 131 Bytes
  • Size of remote file: 629 kB
vlm/train/5qsptDcsdEj/13.png ADDED

Git LFS Details

  • SHA256: fbb3d76599133f5ab2f7656b5e5ee4b78dffb560b432fecda6eb1a607456aac6
  • Pointer size: 131 Bytes
  • Size of remote file: 607 kB
vlm/train/5qsptDcsdEj/14.png ADDED

Git LFS Details

  • SHA256: cc5c5b1e56036d31ad11bcb5efff497d6524db91a14c11918a739a327a592539
  • Pointer size: 131 Bytes
  • Size of remote file: 392 kB
vlm/train/5qsptDcsdEj/2.png ADDED

Git LFS Details

  • SHA256: ad20ede4c1820989e885f7100072c71f6fcf36ee8abdbdd0538af0d5c894cec4
  • Pointer size: 131 Bytes
  • Size of remote file: 659 kB
vlm/train/5qsptDcsdEj/3.png ADDED

Git LFS Details

  • SHA256: c35c19af8b0740fbcd0a8eac117fee3fbc161a4c9a1e63cf44843e0352ea69b1
  • Pointer size: 131 Bytes
  • Size of remote file: 492 kB
vlm/train/5qsptDcsdEj/4.png ADDED

Git LFS Details

  • SHA256: d31eb9c3ee96b84759d8e2bd611e809d35513db8d903c43d45c5a47a548de8d8
  • Pointer size: 131 Bytes
  • Size of remote file: 719 kB
vlm/train/5qsptDcsdEj/5.png ADDED

Git LFS Details

  • SHA256: 715634d216af8e06af782a5c2a5ef2cacbbb3be869ee27f61ba5ea7e5f6e1d11
  • Pointer size: 131 Bytes
  • Size of remote file: 539 kB
vlm/train/5qsptDcsdEj/6.png ADDED

Git LFS Details

  • SHA256: a39fc5acb7618266a7a40b9588252ac363594c67e8675a34d15c76ff62b44101
  • Pointer size: 131 Bytes
  • Size of remote file: 605 kB
vlm/train/5qsptDcsdEj/7.png ADDED

Git LFS Details

  • SHA256: 5c63b2302c11c62ded3a4dff5266ccf31b32ed61497ca4d3edd39c78c0d91755
  • Pointer size: 131 Bytes
  • Size of remote file: 627 kB
vlm/train/5qsptDcsdEj/8.png ADDED

Git LFS Details

  • SHA256: 189bcf6025ce12645beba0edfd185d60f4f950e71619263e2e411d702c840b76
  • Pointer size: 131 Bytes
  • Size of remote file: 655 kB
vlm/train/5qsptDcsdEj/9.png ADDED

Git LFS Details

  • SHA256: 21e5c728872fc90843350560d814d64445e1097eb0053a0da278a458f1424532
  • Pointer size: 131 Bytes
  • Size of remote file: 502 kB
vlm/train/7Yhok3vJpU/0.png ADDED

Git LFS Details

  • SHA256: d50d31ccf546101cdc5ce1851fb0d7fbb2b73df2788feed9c4d8684dfbd34376
  • Pointer size: 131 Bytes
  • Size of remote file: 491 kB
vlm/train/7Yhok3vJpU/1.png ADDED

Git LFS Details

  • SHA256: e4d836f32f2d3d0c3611cb4e0c89947d164257bba6a2d74843e35310afb159eb
  • Pointer size: 131 Bytes
  • Size of remote file: 487 kB
vlm/train/7Yhok3vJpU/10.png ADDED

Git LFS Details

  • SHA256: 8f635c2f9a3d9d89d3515e88cfb92af5c04f6866d48ee529ef5ec74f0611c7df
  • Pointer size: 131 Bytes
  • Size of remote file: 518 kB
vlm/train/7Yhok3vJpU/11.png ADDED

Git LFS Details

  • SHA256: e34242e4bf110df71d82ffe391f888cb6a72bacba0e0d631929be0a68708628a
  • Pointer size: 131 Bytes
  • Size of remote file: 333 kB
vlm/train/7Yhok3vJpU/12.png ADDED

Git LFS Details

  • SHA256: 0f926e644b5da520d7a3afe9fcf4d7f3351eedf4fb94f6f2fe00da2222390643
  • Pointer size: 131 Bytes
  • Size of remote file: 408 kB
vlm/train/7Yhok3vJpU/13.png ADDED

Git LFS Details

  • SHA256: ebc5e087ed836722d7a5af61f0aa95776a116aa4d58cb6717fc0ba2eda311789
  • Pointer size: 131 Bytes
  • Size of remote file: 463 kB
vlm/train/7Yhok3vJpU/14.png ADDED

Git LFS Details

  • SHA256: c6f638afa992489d67c344fee65d4710e5d9ff2029108514faf3b568c3d4c7fa
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
vlm/train/7Yhok3vJpU/15.png ADDED

Git LFS Details

  • SHA256: 9e2acd8ed7ab2f9988b75ff87d370000dcfeddc8e9ee37c80b3602b7b23739d9
  • Pointer size: 131 Bytes
  • Size of remote file: 111 kB
vlm/train/7Yhok3vJpU/2.png ADDED

Git LFS Details

  • SHA256: 1255d283dfe65adfa88d576bd237770daeea7720d38efe7e184a916ffc668031
  • Pointer size: 131 Bytes
  • Size of remote file: 600 kB
vlm/train/7Yhok3vJpU/3.png ADDED

Git LFS Details

  • SHA256: 1d93a448698305cf74447a7d8da59bb2948e4e62946fc3fa0f4fbcc307dc2777
  • Pointer size: 131 Bytes
  • Size of remote file: 527 kB
vlm/train/7Yhok3vJpU/4.png ADDED

Git LFS Details

  • SHA256: 03959fc1d8e586b2c99fcdfdf267795e8f9c3d5f4db18bb882a2f79e5efbfdfb
  • Pointer size: 131 Bytes
  • Size of remote file: 514 kB
vlm/train/7Yhok3vJpU/5.png ADDED

Git LFS Details

  • SHA256: 351c7a4ea0c96e6d72d9d84f0d80026a97f9c41da64f7e73080a5684fc2c2e4e
  • Pointer size: 131 Bytes
  • Size of remote file: 529 kB
vlm/train/7Yhok3vJpU/6.png ADDED

Git LFS Details

  • SHA256: e613f6644a35587e0b82a18f31d7c3ad0aeffcf479f1ff311e8d1fa365bbe67b
  • Pointer size: 131 Bytes
  • Size of remote file: 463 kB
vlm/train/7Yhok3vJpU/7.png ADDED

Git LFS Details

  • SHA256: ef8f9a1847bafbca78da922f2147272937cd9b5dc6a3474a959355b0eb64e55f
  • Pointer size: 131 Bytes
  • Size of remote file: 498 kB
vlm/train/7Yhok3vJpU/8.png ADDED

Git LFS Details

  • SHA256: aa25af58fb337ce940c4245c54cedac40f17b3426c60d128955ca31303f3cafa
  • Pointer size: 131 Bytes
  • Size of remote file: 550 kB