ZHANGYUXUAN-zR commited on
Commit
18e223b
·
verified ·
1 Parent(s): 9430ec1

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/1_gaHBaRYt/1_gaHBaRYt.md +358 -0
  2. parse/train/1_gaHBaRYt/1_gaHBaRYt_content_list.json +1665 -0
  3. parse/train/1_gaHBaRYt/1_gaHBaRYt_middle.json +0 -0
  4. parse/train/1_gaHBaRYt/1_gaHBaRYt_model.json +0 -0
  5. parse/train/7R7fAoUygoa/7R7fAoUygoa.md +698 -0
  6. parse/train/7R7fAoUygoa/7R7fAoUygoa_content_list.json +0 -0
  7. parse/train/7R7fAoUygoa/7R7fAoUygoa_middle.json +0 -0
  8. parse/train/7R7fAoUygoa/7R7fAoUygoa_model.json +0 -0
  9. parse/train/ByRWCqvT-/ByRWCqvT-.md +384 -0
  10. parse/train/ByRWCqvT-/ByRWCqvT-_content_list.json +0 -0
  11. parse/train/ByRWCqvT-/ByRWCqvT-_middle.json +0 -0
  12. parse/train/ByRWCqvT-/ByRWCqvT-_model.json +0 -0
  13. parse/train/BygzbyHFvB/BygzbyHFvB.md +313 -0
  14. parse/train/BygzbyHFvB/BygzbyHFvB_content_list.json +1710 -0
  15. parse/train/BygzbyHFvB/BygzbyHFvB_middle.json +0 -0
  16. parse/train/BygzbyHFvB/BygzbyHFvB_model.json +0 -0
  17. parse/train/ByldLrqlx/ByldLrqlx.md +496 -0
  18. parse/train/ByldLrqlx/ByldLrqlx_middle.json +0 -0
  19. parse/train/ByldLrqlx/ByldLrqlx_model.json +0 -0
  20. parse/train/ByxXZpVtPB/ByxXZpVtPB.md +204 -0
  21. parse/train/ByxXZpVtPB/ByxXZpVtPB_content_list.json +1079 -0
  22. parse/train/ByxXZpVtPB/ByxXZpVtPB_middle.json +0 -0
  23. parse/train/ByxXZpVtPB/ByxXZpVtPB_model.json +0 -0
  24. parse/train/EKV158tSfwv/images/016738b1658887d5192d6f9e87ae2c0aaf68ba3c2aac34ac95050e000e8ca2f0.jpg +3 -0
  25. parse/train/EKV158tSfwv/images/028476a532884b39d36ed3d14d0db7a5693b209303ea005750d6a939c583b0e4.jpg +3 -0
  26. parse/train/EKV158tSfwv/images/083d3d70eab9424ca9b0bc47b41d1556871b469c3a9a0ddc9deacfbd3e06483c.jpg +3 -0
  27. parse/train/EKV158tSfwv/images/0bd238f81d39c3e37eddb8a3fcdde86a0f81b76b0afada83a88f67d100209e35.jpg +3 -0
  28. parse/train/EKV158tSfwv/images/1272484bc875f051f390fdeccd1c2700634a8673e6ea94a155ffda24e58342bc.jpg +3 -0
  29. parse/train/EKV158tSfwv/images/17ec080f437c916f8123c572d38285089522fcd5f80eed018f3fc0c58bfb21af.jpg +3 -0
  30. parse/train/EKV158tSfwv/images/18951c913dca68571b45e1955eace7e2d03a5c698fa611b719202969d087b335.jpg +3 -0
  31. parse/train/EKV158tSfwv/images/19e05e392812d42406123d639dd61a923b2b18b886de39e192f7f8e449684371.jpg +3 -0
  32. parse/train/EKV158tSfwv/images/1adb9d55c3614fa5d4deaba0752d1adc6648392ab75eb084c920a1da96e037c5.jpg +3 -0
  33. parse/train/EKV158tSfwv/images/1ae2e2c3ba83e67857d3467fc348e39ce56a1f2a46fc0456ba5962b51088041f.jpg +3 -0
  34. parse/train/EKV158tSfwv/images/230f3e209fbceb452e0cacbf145a045e0f776bcfbd699b15f3d9a268719828f7.jpg +3 -0
  35. parse/train/EKV158tSfwv/images/2dc9622e275140a89614cd4a116278b803f8a74ab43fb682e99cdda4e2983efd.jpg +3 -0
  36. parse/train/EKV158tSfwv/images/2ea410f33d13c5bf4d54f8759d58fa63e926c7a4261f5285df87a257976071e0.jpg +3 -0
  37. parse/train/EKV158tSfwv/images/3082a0205f8ca0fa19bad584c2bc254cb66610f53905d3b82bb0fc293c8f4f1b.jpg +3 -0
  38. parse/train/EKV158tSfwv/images/59faebc170755326f1a741f053a3e3239331feaa8c6c73c0c49a37833915a29c.jpg +3 -0
  39. parse/train/EKV158tSfwv/images/5baa71ed36db05c11ad982d836213faf594098a0f7cc817d7543b4bd2c7b1d9b.jpg +3 -0
  40. parse/train/EKV158tSfwv/images/61cfdcc751c8306c0d6dc61c857c5d35f3f6a62b6aadd3c2faf676f9dce5244a.jpg +3 -0
  41. parse/train/EKV158tSfwv/images/6504675e7bba4e4b29771df9cad8ef0f1bc1ac16fed6ca3940a427444b617353.jpg +3 -0
  42. parse/train/EKV158tSfwv/images/6c312df5ec5b36e73d7097e7dae5f64a03e8198a7eae4af2f0c439e27b2827a2.jpg +3 -0
  43. parse/train/EKV158tSfwv/images/6dff23a033f50eadf42c3616ebcec2d95d6d4472f4a2b701f6fca905189a98da.jpg +3 -0
  44. parse/train/EKV158tSfwv/images/759286d18791fab6aab94014e7f91dfc3b7de4d642a759d9c8422f4f9d06cb25.jpg +3 -0
  45. parse/train/EKV158tSfwv/images/7b30aa5f903208aed3d4c412129bb3a9ed61a9c1503e1613bdb5586fd7bb7360.jpg +3 -0
  46. parse/train/EKV158tSfwv/images/80fddaac0df5b077969f77da997b9aa2b510857222eb5466257ea9d6faf78119.jpg +3 -0
  47. parse/train/EKV158tSfwv/images/889d3259c5a7dd19b9331e75f9781a2265e65a2772c75f10eac7863ed58d9891.jpg +3 -0
  48. parse/train/EKV158tSfwv/images/96bc8addaa4f716f3390db0c46fc0893bb3015b718fc1ff093a67d8cda261f87.jpg +3 -0
  49. parse/train/EKV158tSfwv/images/9aab59e7cb45f4b818552a6b812185f6a2881323d9a51a2afbe47c773e351103.jpg +3 -0
  50. parse/train/EKV158tSfwv/images/b4c9f6d5bbe628ccb586a62d611eebc4165991a353062d8e7707476de15105b0.jpg +3 -0
parse/train/1_gaHBaRYt/1_gaHBaRYt.md ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Fast Federated Learning in the Presence of Arbitrary Device Unavailability
2
+
3
+ Xinran Gu∗ IIIS Tsinghua University gxr21@mails.tsinghua.edu.cn
4
+
5
+ Kaixuan Huang∗ ECE Princeton University kaixuanh@princeton.edu
6
+
7
+ Jingzhao Zhang EECS Massachusetts Institute of Technology jzhzhang@mit.edu
8
+
9
+ Longbo Huang† IIIS Tsinghua University longbohuang@tsinghua.edu.cn
10
+
11
+ # Abstract
12
+
13
+ Federated Learning (FL) coordinates with numerous heterogeneous devices to collaboratively train a shared model while preserving user privacy. Despite its multiple advantages, FL faces new challenges. One challenge arises when devices drop out of the training process beyond the control of the central server. In this case, the convergence of popular FL algorithms such as FedAvg is severely influenced by the straggling devices. To tackle this challenge, we study federated learning algorithms under arbitrary device unavailability and propose an algorithm named Memory-augmented Impatient Federated Averaging (MIFA). Our algorithm efficiently avoids excessive latency induced by inactive devices, and corrects the gradient bias using the memorized latest updates from the devices. We prove that MIFA achieves minimax optimal convergence rates on non-i.i.d. data for both strongly convex and non-convex smooth functions. We also provide an explicit characterization of the improvement over baseline algorithms through a case study, and validate the results by numerical experiments on real-world datasets.
14
+
15
+ # 1 Introduction
16
+
17
+ Federated learning is a machine learning setting in which a central server coordinates with a large number of devices to collectively train a shared model [28, 34, 20, 33, 25, 26]. Practical advantages of this training scheme are mainly twofold. First, each device keeps the private data locally and hence preserves its data privacy. Second, federated learning can make use of idle computing resources and lower computation costs. Although federated learning successfully scales up with data sizes and accelerates training via more affordable computing power [43, 38, 36], the collaborative setup leads to new challenges due to large variations among individual computing devices. Our work aims to formulate and investigate the impact of device variations on FL from an optimization perspective.
18
+
19
+ In FL, a device can differ from its peers in multiple aspects [17, 25]. First, the data distribution and local task can be different among devices. To address the data variation, non-i.i.d. objective models were proposed and analyzed by [26, 18, 19, 42, 25]. We follow this line of work and formulate our optimization objective as a sum of stochastic functions on individual devices (See Eqn. (1)).
20
+
21
+ A second variation among devices is caused by different computing and communication speeds. One natural way to formulate the variation in computation speeds is to allow asynchronous updates and model the updates as delayed responses. Lots of novel research has studied the problem with different delay models, e.g., [35, 4, 27, 11, 45, 1, 5, 13]. However, the delayed setup assumes that all devices make roughly the same number of (delayed) responses in the end. This behavior may deviate largely from the FL practice, where each device, e.g., personal cell phones, can have very different active duration when participating in the FL training, and hence make different numbers of responses. For this reason, our work aims to address this third discrepancy among devices caused by individual availability patterns.
22
+
23
+ The third device heterogeneity caused by different availability patterns is less studied in optimization for federated learning problems. In this model, instead of making a delayed response, devices can abort the training halfway, e.g., due to battery level, incoming calls, etc, and fail to return their responses upon the central server’s requests [28, 7, 17]. To handle missing responses, researchers propose algorithms where the central server may collect responses from only a fraction of the devices and make updates [18, 28, 42, 25, 26, 17, 30, 14].
24
+
25
+ Previous works on collecting responses from a fraction of devices can be divided into two categories. When the response distribution is known, one could collect only the fastest responses and re-weight according to their response probability [17, 26, 30]. This model can be restrictive, as in practice, the exact distribution may not be available and may evolve. Another line of work assumes that the server can arbitrarily decide and sample a set of devices to collect responses accordingly in every communication round [18, 28, 42, 25, 14]. This model does not require knowing the response possibility. However, the response time can be very long if the selected subset contains unavailable devices.
26
+
27
+ In this work, we address the above limitations by studying federated learning in the presence of arbitrary device unavailability. Within this practical setup, we propose an algorithm that automatically accommodates for the underlying unavailability and allows patterns of the device unavailability to be non-stationary and even adversarial. Furthermore, our algorithm can achieve optimal convergence rates in the presence of device inactivity and automatically reduce to best-known rates if all devices are active. Our contributions are summarized as follows.
28
+
29
+ • We investigate the federated learning problem with a practical formulation of device participation, which does not require each device to be online according to an (either known or unknown) distribution. • We propose the Memory-augmented Impatient Federated Averaging (MIFA) algorithm that is agnostic to the availability pattern. It efficiently avoids excessive latency induced by inactive devices, successfully exploits the information about the descent direction in stale and noisy gradients, and corrects the gradient bias using the memorized latest updates. • We prove that MIFA achieves minimax optimal convergence rates $\begin{array} { r } { \mathcal { O } \left( \frac { \bar { \tau } _ { T } + 1 } { N K T } \right) } \end{array}$ for smooth, strongly convex functions, and $\mathcal { O } \left( \sqrt { \frac { \bar { \nu } + 1 } { N K T } } \right)$ for smooth, non-convex functions, and establish matching lower bounds. Here, $N , K$ and $T$ stand for the number of devices, local updates and communication rounds respectively. $\bar { \tau } _ { T }$ and $\bar { \nu }$ characterize how actively devices participate in training (see formal definitions in Sections 3, 5 and 6). MIFA also achieves optimal convergence rates in the ideal case when all devices are active. • We provide an explicit characterization of the improvement over baseline algorithms through a case study and empirically verify our results on real-world datasets.
30
+
31
+ # 2 Related work
32
+
33
+ Federated learning. Federated Averaging (FedAvg) was first proposed in [28]. [26, 19, 18, 42] provided convergence analysis for FedAvg on non-i.i.d. data and quantified how data heterogeneity degrades the convergence rate. Several variants of FedAvg were designed to deal with data heterogeneity. FedProx [25] adds a proximal term to local objective functions, while FSVRG [21] and SCAFFOLD [18] employ variance reduction techniques.
34
+
35
+ One line of work focused on variations in computation capabilities among devices [39, 31, 40]. These models assume that responses are delayed but not missing. To address the missing response, some work assumes that the server can actively sample a subset of devices to respond [18, 28, 42, 25, 14] or that the pattern of device availability is known [26, 17, 10, 30]. These results do not generalize to adversarial inactive patterns. [32] discussed the impact of device inactivity on convergence but their proposed algorithm diverges if there exists an inactive device in each round of communication. However, our setup allows adversarial patterns under certain non-distributional assumptions (see Section 5) while our proposed algorithm still achieves convergence.
36
+
37
+ Asynchronous distributed optimization. Our work is related to literature in the field of traditional asynchronous distributed optimization in that our proposed algorithm uses stale gradients. The problem setup for asynchronous distributed algorithms can be divided into two categories [13]. One is the shared-data (i.i.d.) setting, where all workers can access the whole dataset. In this setting, the local gradient is an unbiased estimator of the global gradient [35, 4, 27, 11, 45, 1]. In contrast, we assume each worker has non-i.i.d. data, and hence the local stochastic gradient can not be viewed as an unbiased estimator of the global gradient.
38
+
39
+ The other less studied setting in distributed optimization is the distributed-data setting (non-i.i.d.), where data are partitioned among workers. Specifically, [5] proposed an asynchronous incremental aggregated gradient algorithm that uses buffered gradients to update the global model. Unlike our setup, this algorithm evaluates full local gradients, performs only one local step, and was analyzed under the bounded delay assumption. [13] models the delay as stochastic and assumes that the server has knowledge of the distribution, but our formulation is distribution-free. [6] allows workers to perform multiple local steps and communicate with the server at different times, but the authors assume that all workers are available and compute at the same rate.
40
+
41
+ Comparison with an independent work. While preparing the manuscript, we were unaware of an independent work [41] that investigated the same setup and proposed a similar algorithm called FedLaAvg. Their main theorem established the convergence rate of $\mathcal { O } \left( \sqrt { \frac { \nu _ { \mathrm { m a x } } } { N ^ { 0 . 5 } T } } ( \mathbf { \bar { G } } ^ { 2 } + \sigma ^ { 2 } ) \right)$ for smooth and non-convex problems, where $G ^ { 2 }$ is the uniform upper bound for the squared norm of stochastic gradients and $\nu _ { m a x }$ is the maximum number of inactive rounds. In comparison, we prove the minimax optimal rate of $\mathcal { O } ( \sqrt { \frac { \bar { \nu } } { N K T } } \sigma ^ { 2 } )$ without the bounded gradient assumption, also improving $\nu _ { \mathrm { m a x } }$ to $\bar { \nu }$ . Furthermore, our result achieves a linear speedup in $N$ and $K$ .
42
+
43
+ Apart from non-convex functions, we also derive the minimax optimal rates for strongly convex smooth functions under the mild assumption that allows for arbitrary and unbounded number of inactive rounds. Both of our results achieve linear speedups in terms of $N$ and $K$ , and automatically recover the best-known rates of FedAvg when all devices are active. We also show that our proposed algorithm achieves acceleration over unbiased baseline algorithms in the presence of stragglers.
44
+
45
+ # 3 Problem Setup
46
+
47
+ We consider optimizing the following problem in a Federated Learning setting:
48
+
49
+ $$
50
+ \begin{array} { r } { \underset { w \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } f ( w ) : = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } f _ { i } ( w ) : = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathbb { E } _ { \xi _ { i } } [ f _ { i } ( w , \xi _ { i } ) ] , } \end{array}
51
+ $$
52
+
53
+ where $w$ is the optimization variable, e.g., parameters of a machine learning model, $N$ is the number of participating devices, $f _ { i }$ is the local loss function on device $i$ , and $\xi _ { i }$ describes the randomness in local data distribution.
54
+
55
+ In the ideal federated learning setup (see Figure 1 (a)), all devices return responses within similar time, and hence the central server collects all the local updates. In this case, the computation cost is usually measured by the number of local stochastic oracle evaluations, which is proportional to the number of rounds. In a delayed FL setup (see Figure 1 (b)), devices are always active upon the central server’s request but may return responses with a delay. Here, all devices return almost the same number of responses in the long term.
56
+
57
+ As we discussed, the above setups do not depict a real-world scenario in which a device can have a longer inactive duration than active duration. In such cases, the communication interval is much longer than the local computation time required for each update, and each device generates an unequal number of responses [28, 17]. This motivates our setup in Figure 1 (c).
58
+
59
+ ![](images/dbec5db87e22ee0dc55043253dc815eff5fd652c994f67ee8a04489f10ef06e1.jpg)
60
+ Figure 1: An illustration of setup. (a) Ideal setup: all devices return their responses within similar time. (b) Delayed setup: all devices are available, but may return responses with a delay. (c) Our setup: devices can be unavailable arbitrarily, and the communication interval is long enough for active devices to return responses.
61
+
62
+ In our proposed setup, we use $t$ to index the global communication rounds. We say a device participates or is active at round $t$ if it can complete the computation task and send back the update at the end of round $t$ . We define $\boldsymbol { \mathcal { A } } ( t )$ as the set of all active devices at round $t$ . Notice that we make no assumptions on the distribution of the participation patterns of devices and allow them to be arbitrary.
63
+
64
+ Directly applying FedAvg to the proposed setup can be problematic due to the existence of inactive devices. To accommodate for inactive devices, we discuss three natural variants of FedAvg and their limitations. The detailed algorithms can be found in Appendix A.
65
+
66
+ • Biased FedAvg. At each communication round, the global model is updated with a direct average of local updates from the active devices. This naive approach induces bias when data distribution and response patterns vary among devices.
67
+ • FedAvg with device sampling. The server selects a subset of $S$ devices randomly without replacement, and then waits until all devices in the subset $s$ respond. This is how original FedAvg [28] addresses device unavailability. Note that over $T$ communication rounds, the global model is updated less than $T$ times due to waiting. This approach is prone to stragglers and we refer the readers to Section 5.1 for a detailed discussion.
68
+ • FedAvg with importance sampling [26, 13, 17]. The local updates from the active devices are weighted by the reciprocal of the participation probabilities to avoid bias. This approach is only applicable when the response of each device is i.i.d. over rounds and it requires the knowledge of participation probabilities.
69
+
70
+ # 4 Memory-augmented Impatient Federated Averaging (MIFA)
71
+
72
+ In this section, we introduce our algorithm — Memory-augmented Impatient Federated Averaging (MIFA). MIFA maintains an update-array $\{ G ^ { i } \}$ in the memory that stores the latest updates for all devices. As the name suggests, MIFA has two components. First, the algorithm is impatient and avoids waiting for any specific device when facing heterogeneous devices with arbitrary availability. Second, the algorithm augments the received updates of the active devices with the stored updates of the inactive devices to perform averaging.
73
+
74
+ Specifically, at the beginning of round $t$ , the server broadcasts the latest model parameter $w _ { t }$ to all active devices $\boldsymbol { \mathcal { A } } ( t )$ . After receiving $w _ { t }$ , each active device, say, the $i$ -th device, sets $w _ { t , 0 } ^ { i } = w _ { t }$ and performs $K$ steps of SGD with respect to the local objective function to get $w _ { t , K } ^ { i }$ :
75
+
76
+ $$
77
+ \boldsymbol w _ { t , k + 1 } ^ { i } = \boldsymbol w _ { t , k } ^ { i } - \eta _ { t } \tilde { \nabla } f _ { i } ( \boldsymbol w _ { t , k } ^ { i } ) , \boldsymbol k = 0 , \cdots , \boldsymbol K - 1 ,
78
+ $$
79
+
80
+ where $\eta _ { t }$ is the learning rate and $\tilde { \nabla } f _ { i } ( w _ { t , k } ^ { i } )$ is the stochastic gradient evaluated on device $i$ . Next, the server stores the received update $\begin{array} { r } { \frac { 1 } { \eta _ { t } } \big ( w _ { t } - w _ { t , K } ^ { i } \big ) } \end{array}$ in $G ^ { i }$ . Denote by $\{ G _ { t } ^ { i } \}$ the update-array after round $t$ , then we have
81
+
82
+ $$
83
+ \begin{array} { r } { G _ { t } ^ { i } = \left\{ \begin{array} { l l } { G _ { t - 1 } ^ { i } , } & { \mathrm { ~ i f ~ } i \notin \mathcal { A } ( t ) , } \\ { \frac { 1 } { \eta _ { t } } ( w _ { t } - w _ { t , K } ^ { i } ) , } & { \mathrm { ~ i f ~ } i \in \mathcal { A } ( t ) . } \end{array} \right. } \end{array}
84
+ $$
85
+
86
+ At the end of round $t$ , the server updates the global model with the average of $\{ G _ { t } ^ { i } \}$ (line 9). In other words, our algorithm MIFA updates the model with the latest available accumulated gradients for all devices.
87
+
88
+ Algorithm 1 Memory-augmented Impatient Federated Averaging (MIFA)
89
+
90
+ <table><tr><td colspan="2">1: Input: initial wi,learning rate {nt }</td></tr><tr><td>2: Server executes:</td><td>1: DeviceUpdate(i, Wt , nt):</td></tr><tr><td>3: initialize Gi ←O,i∈[N]</td><td>2:w,←Wt</td></tr><tr><td>4: fort=1,.,T-1do</td><td>3: for local step k = O,.,K -1 do</td></tr><tr><td>5: broadcast wt to all active devices i ∈ A(t)</td><td> 4:compute stochastic gradient Vfi(wt,)</td></tr><tr><td>6: for each active device ido</td><td>Wk+1←W,k-ntvfi(w,) 5:</td></tr><tr><td>7: G ←DeviceUpdate(i,Wt, nt) 8: end for</td><td>6: end for</td></tr><tr><td>Wt+1←wt-∑1 N 9: Gi</td><td>7:Return (wt - wi,k) to the server</td></tr></table>
91
+
92
+ MIFA efficiently progresses without waiting for inactive devices and re-uses their latest updates as the surrogate for missing responses. Being impatient accelerates convergence, whereas memory augmentation corrects the update bias. Our algorithm differs from asynchronous algorithms in traditional distributed optimization [35, 4, 27, 11, 45, 1, 13, 6] in that we utilize the noisy updates of inactive devices more than once to avoid biasing against stragglers. In the following part of the paper, we show that MIFA successfully exploits information about the descent direction contained in the stale and noisy gradients.
93
+
94
+ Discussion on implementation. In practice, to implement MIFA, the server needs to maintain a huge array to store the latest update for each device, which scales with the model size and the total number of devices. To avoid exhausting the server’s memory, one strategy is to distribute the memory consumption among devices. Specifically, each device, say the $i$ -th, stores its previous update $G _ { t _ { i } ^ { \prime } } ^ { \ i }$ computed at round $t _ { i } ^ { \prime }$ in its local memory. When it becomes active and computes $G _ { t } ^ { i }$ , the device sends $G _ { t } ^ { i } - G _ { t _ { i } ^ { \prime } } ^ { i }$ to the server, which is the difference between the current update and the previous one. In this case, the server only needs to maintain the average $\bar { G }$ in the memory and updates it by $\begin{array} { r } { \bar { G } _ { t } = \bar { G } _ { t - 1 } + \frac { 1 } { N } \sum _ { i \in \mathcal { A } ( t ) } ( G _ { t } ^ { \bar { i } } - G _ { t _ { i } ^ { \prime } } ^ { i } ) } \end{array}$ at round $t$ . Then the server updates the global model by $w _ { t + 1 } = w _ { t } - \eta _ { t } \bar { G } _ { t }$ .
95
+
96
+ # 5 Convergence Analysis for strongly convex objective functions
97
+
98
+ In this section, we present the convergence results for MIFA on $\mu$ -strongly convex $L$ -smooth functions. Typical examples for the strongly convex case are $\ell _ { 2 }$ regularized logistic regression and linear regression problems.
99
+
100
+ In order to capture how the unavailability of devices affects algorithm performance, we introduce the following notion to quantify the dynamics of devices in our setting.
101
+
102
+ Definition 5.1 (Number of inactive rounds). We define the number of inactive rounds of device $i$ at round $t$ as $\tau ( t , i ) = t - \operatorname* { m a x } \{ t ^ { \prime } \mid t ^ { \prime } \leq t , i \in A ( t ^ { \prime } ) \}$ , which is the difference between current round $t$ and the latest round when device $i$ is active.
103
+
104
+ It can be seen that $\tau ( t , i ) = 0$ if device $i$ is active at round $t$ and $\tau ( t , i ) = \tau ( t - 1 , i ) + 1$ otherwise. Also, $t - \tau ( t , i )$ is the latest round when the device $i$ is active. Next, we present the assumptions made for establishing our convergence theorem.
105
+
106
+ Assumption 1. $f _ { 1 } , \cdots , f _ { N }$ are all $L$ -smooth, i.e., for all $w$ and $v _ { \scriptscriptstyle { i } }$ , $\begin{array} { r c l } { f _ { i } ( v ) } & { \leq } & { f _ { i } ( w ) \ + } \end{array}$ $\begin{array} { r } { \left. \nabla f _ { i } ( w ) , v - w \right. + \frac { L } { 2 } \left\| w - v \right\| ^ { 2 } } \end{array}$ .
107
+
108
+ Assumption 2. $\tilde { \nabla } f _ { i } ( \boldsymbol { w } )$ is an unbiased estimator of $\nabla f _ { i }$ with variance bounded by $\sigma ^ { 2 }$ , i.e., $\mathbb { E } _ { \boldsymbol { \xi } } \left[ \tilde { \nabla } f _ { i } ( \boldsymbol { w } ) \right] = \nabla f _ { i } ( \boldsymbol { w } ) , \mathbb { E } _ { \boldsymbol { \xi } } \left[ \left\| \tilde { \nabla } f _ { i } ( \boldsymbol { w } ) - \nabla f _ { i } ( \boldsymbol { w } ) \right\| ^ { 2 } \right] \leq \sigma ^ { 2 } .$ .
109
+
110
+ Assumption 3. $f _ { 1 } , \cdots , f _ { N }$ are all $\mu$ -strongly convex: for all $w$ and $v _ { \scriptscriptstyle { i } }$ , $f _ { i } ( v ) \geq f _ { i } ( w ) +$ $\begin{array} { r } { \left. \nabla f _ { i } ( w ) , v - w \right. + \frac { \mu } { 2 } \left\| w - v \right\| ^ { 2 } } \end{array}$ .
111
+
112
+ Assumption 4. There exists a constant $t _ { 0 } > 0$ , such that for all $t \geq 1$ and $i \in [ N ]$ , the number of inactive rounds of device $i$ at communication round $t$ satisfies $\begin{array} { r } { \tau ( t , i ) \leq t _ { 0 } + \frac { 1 } { b } \dot { t } } \end{array}$ , where $b =$ $4 0 \left( L / \mu \right) ^ { 1 . 5 }$ .
113
+
114
+ Assumptions 1, 2, and 3 are standard and common in the FL literature, e.g., [26, 18, 19, 42, 36]. In Assumption 2, we relax the bounded gradient assumption that is often required in prior work, e.g., [6, 26, 40, 1]. Lastly, Assumption 4 is a very mild assumption on device availability, since it allows the number of inactive rounds to grow as ${ \mathcal { O } } ( t )$ . In contrast, existing results on asynchronous updates mostly assume a bounded or fixed latency, e.g., [6, 1, 5, 40, 35, 4].
115
+
116
+ We are now ready to present our first convergence result. Define $\begin{array} { r l } { D = } & { { } \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \left. \nabla f _ { i } ( w _ { * } ) \right. ^ { 2 } } \end{array}$ to measure data dissimilarity, where $w _ { * } = \arg \operatorname* { m i n } f ( w )$ is the global optimum. Also, define $\bar { \tau } _ { T }$ and $\tau _ { \operatorname* { m a x } , T }$ to be the average and maximum numbers of inactive rounds $\tau ( t , i )$ across all devices and rounds, respectively. That is,
117
+
118
+ $$
119
+ \bar { \tau } _ { T } = \frac { 1 } { N ( T - 1 ) } \sum _ { t = 1 } ^ { T - 1 } \sum _ { i = 1 } ^ { N } \tau ( t , i ) , \tau _ { \operatorname* { m a x } , T } = \operatorname* { m a x } _ { i \in [ N ] } \operatorname* { m a x } _ { 1 \leq t \leq T - 1 } \tau ( t , i ) .
120
+ $$
121
+
122
+ The following theorem summarizes the performance of MIFA in this case.
123
+
124
+ Theorem 5.1. Assume that Assumptions $^ { l }$ to 3 hold. Further assume that the device availability sequence $\tau ( t , i )$ satisfies Assumption $^ { 4 }$ and $\tau ( 1 , i ) = 0$ for all $i \in [ N ]$ . By setting the learning rate $\begin{array} { r } { \eta _ { t } = \frac { 4 } { \mu K ( t + a ) } } \end{array}$ with $a = \operatorname* { m a x } \{ 1 0 0 , 4 0 t _ { 0 } \} ( L / \mu ) ^ { 1 . 5 }$ , after $T - 1$ communication rounds, MIFA satisfies:
125
+
126
+ $$
127
+ \mathbb { E } _ { \xi } \left[ f ( \overline { { w } } _ { T } ) \right] - f ( w _ { * } ) = \mathcal { O } \left( \frac { \bar { \tau } _ { T } + 1 } { \mu N K T } \sigma ^ { 2 } + \frac { \tau _ { \operatorname* { m a x } , T } ^ { 2 } A _ { 1 } + ( K - 1 ) ^ { 2 } A _ { 2 } + A _ { 3 } } { \mu ^ { 2 } T ^ { 2 } } \right) ,
128
+ $$
129
+
130
+ where $\overline { { w } } _ { T }$ is a weighted average of $w _ { t }$ defined as:
131
+
132
+ $$
133
+ \overline { { w } } _ { T } = \frac { 1 } { W _ { T } } \sum _ { t = 1 } ^ { T } ( t + a - 1 ) ( t + a - 2 ) w _ { t } , W _ { T } = \sum _ { t = 1 } ^ { T } ( t + a - 1 ) ( t + a - 2 ) ,
134
+ $$
135
+
136
+ Our results hold under Assumption 4, which allows for arbitrary device availability sequences with $\tau _ { \mathrm { m a x } , T } = \mathcal { O } ( T )$ . However, for MIFA to converge, we require $\tau _ { \operatorname* { m a x } , T } = o ( T )$ and $\dot { t _ { 0 } } = \bar { o } ( T )$ . When ( NK(τ2max,T +t20)τ¯+1 ), the first term dominates and the impact of the second O(1/T 2) term is negligible. In fact the first term in Theorem 5.1 is minimax optimal by our information-theoretic lower bound for the problem in the next proposition.
137
+
138
+ Proposition 5.1. Let $c _ { 0 } > 0$ be a universal constant. For any potentially randomized algorithm, there exists a stochastic strongly convex problem satisfying Assumptions $^ { l }$ to 3, such that the output $w _ { T }$ after $T$ rounds of communication has expected sub-optimality lower bounded by
139
+
140
+ $$
141
+ \mathbb { E } [ f ( w _ { T } ) - f ( w ^ { * } ) ] \geq c _ { 0 } \frac { \bar { \tau } _ { T } \sigma ^ { 2 } } { \mu N K T } .
142
+ $$
143
+
144
+ The proof is based on the observation that the number of gradient evaluation can scale inversely with $\bar { \tau } _ { T }$ and that the oracle complexity is tight even for centralized stochastic optimization problems. The optimality of the first term in Theorem 5.1 is independent of the distributed or the FL setup.
145
+
146
+ The second term in Theorem 5.1 converges at the rate $\mathcal { O } ( 1 / T ^ { 2 } )$ and consists of three parts, where the first part reflects the slowdown caused by device unavailability through $\tau _ { \operatorname* { m a x } , T }$ , the second part shows the effect of multiple $( K > 1 )$ ) local steps, and the third part tells how the initial error decreases.
147
+
148
+ Remark 5.1. When $\tau ( t , i ) ~ = ~ 0$ for all $i$ and $t _ { : }$ , our setup reduces to FedAvg with full device pbound $\bar { \tau } _ { T } ~ = ~ 0$ d , $\tau _ { \mathrm { m a x } , T } ~ = ~ 0$ . Iate $\begin{array} { r } { \mathcal { O } \left( \frac { \sigma ^ { 2 } } { \mu K N T } + \frac { L ( \sigma ^ { 2 } / K + D + L ^ { 2 } \| w _ { 1 } - w _ { * } \| ^ { 2 } ) } { \mu ^ { 2 } T ^ { 2 } } \right) } \end{array}$ $\begin{array} { r } { \mathcal { O } \bigg ( \frac { \sigma ^ { 2 } \log T } { \mu K N T } + \frac { L ( \sigma ^ { 2 } / K + D ) ( \log T ) ^ { 2 } } { \mu ^ { 2 } T ^ { 2 } } + } \end{array}$ $\begin{array} { r } { \mu \left. w _ { 1 } - w _ { * } \right. ^ { 2 } \exp ( - \frac { \mu } { 4 8 L } T ) \Bigr ) } \end{array}$ in [18] (Thm. V. $B ^ { 2 } = 2 , \eta _ { g } = 1 ,$ ) up to logarithmic terms. Besides, in the general case, our $\mathcal { O } ( \tau _ { \mathrm { m a x } , T } ^ { 2 } A _ { 1 } / T ^ { 2 } )$ term matches the last term in $I 6 J \left( C o r . 5 \right)$ .
149
+
150
+ Remark 5.2. Our analysis relies on the technical assumption that all devices respond in the first round. Intuitively, this is because we need at least one valid stochastic gradient evaluation for each device to get a complete picture of the global objective, or otherwise any update would be biased. In practice, this can be achieved by waiting for the updates from all devices on $w _ { 1 }$ at the very beginning.
151
+
152
+ # 5.1 Case Study: i.i.d. Bernoulli participation
153
+
154
+ Though our algorithm can be applied to non-stationary and non-independent response patterns, we show in this subsection that even in the simple i.i.d. Bernoulli participation scenario our algorithm can achieve considerable improvement compared to known algorithms. In particular, we consider a setup where each device becomes active independently with a fixed probability $p _ { i }$ . It serves as the first motivating example towards modeling the participation patterns of devices, and provides a clean view of how the heterogeneity of the device participation influences the Federated optimization algorithms.
155
+
156
+ We will show that in this scenario, Assumption 4 holds with high probability, and the terms involving the inactive rounds $\tau ( t , i )$ in Theorem 5.1 can also be bounded. Furthermore, we theoretically demonstrate that algorithms such as FedAvg [28] and SCAFFOLD [18], which sample $S$ devices for each global update, are more prone to stragglers than our algorithm.
157
+
158
+ Definition 5.2. Assume that for all $i \in [ N ]$ , the i-th device is assigned with a probability $p _ { i }$ . We say the participation of the devices follows i.i.d. Bernoulli participation model with participation probabilities $\{ p _ { i } \}$ , if (1). at the first round, all devices are active, and (2). at round $t > 1$ , device $i$ is active with probability $p _ { i }$ , which is independent of the history and other devices.
159
+
160
+ Next theorem shows that under i.i.d. Bernoulli participation scenario, with high probability, $\tau ( t , i )$ only grows logarithmically in $t$ . Also Assumption 4 holds for a mild choice of $t _ { 0 }$ .
161
+
162
+ Theorem 5.2. For i.i.d. Bernoulli participation model defined in Definition 5.2, given any $\delta > 0$ , with probability at least $1 - \delta$ , we have the following holds for all $t \geq 1$ and $i \in [ N ]$ simultaneously,
163
+
164
+ $$
165
+ \tau ( t , i ) \leq \mathcal { O } \Big ( \frac { 1 } { p _ { i } } ( \log ( N t / \delta ) + 1 ) \Big ) .
166
+ $$
167
+
168
+ Furthermore, $( l )$ . Assumption $^ { 4 }$ holds true $\begin{array} { r } { \mathrm { \ddot { \it f } } t _ { 0 } = \Omega \bigg ( \frac { 1 } { p _ { m i n } } \log \frac { b N } { p _ { m i n } \delta } \bigg ) } \end{array}$ , where $p _ { m i n } = \operatorname* { m i n } \{ p _ { i } \}$ , and $b = 4 0 ( L / \mu ) ^ { 1 . 5 }$ ;(2). $\tau _ { \operatorname* { m a x } , T }$ can be upper bounded as
169
+
170
+ $$
171
+ \tau _ { \operatorname* { m a x } , T } \leq \mathcal { O } \Big ( \frac { 1 } { p _ { m i n } } \cdot \big ( \log ( T N / \delta ) + 1 \big ) \Big ) .
172
+ $$
173
+
174
+ The next theorem provides a high probability upper bound for $\bar { \tau } _ { T }$ .
175
+
176
+ Theorem 5.3. For i.i.d. Bernoulli participation model defined in Definition 5.2, given any $\delta > 0$ and $T > 1$ , with probability at least $1 - \delta$ , we have
177
+
178
+ $$
179
+ \bar { \tau } _ { T } \leq \Big ( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { 1 } { p _ { i } } \Big ) \cdot \mathcal { O } \Big ( 1 + \log \frac { 1 } { \delta } \Big ) .
180
+ $$
181
+
182
+ By Theorem 5.2 and Theorem 5.3, we conclude that the dominant term of our convergence bound is $\begin{array} { r } { \stackrel { \triangledown } { \mathcal { O } } \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { 1 } { p _ { i } } \cdot \frac { \sigma ^ { 2 } } { \mu N K T } \right) } \end{array}$ . Therefore, to achieve $\epsilon$ accuracy, the dominant term of the number of the required rounds is
183
+
184
+ $$
185
+ T _ { \epsilon } ^ { \left( \mathrm { M I F A } \right) } = \widetilde { \mathcal { O } } \Bigl ( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { 1 } { p _ { i } } \cdot \frac { \sigma ^ { 2 } } { \mu N K \epsilon } \Bigr ) .
186
+ $$
187
+
188
+ For both FedAvg and SCAFFOLD that sample $S$ devices uniformly at random, [18] (Thm I. & III.) showed that the dominant term of the number of global updates needed to achieve $\epsilon$ accuracy is $\begin{array} { r } { R _ { \epsilon } = \widetilde { \mathcal { O } } \left( \frac { \sigma ^ { 2 } } { \mu S K \epsilon } \right) } \end{array}$ . Notice that in our setting, to accomplish each global update, the server needs to wait for a few rounds for the $S$ devices to respond. Let $T ( S )$ be the expected rounds for which the server needs to wait for the selected devices $\boldsymbol { S }$ to be active. Then the expected total rounds to achieve $\epsilon$ accuracy is $R _ { \epsilon } \cdot \mathbb { E } _ { S } \left[ T ( S ) \right]$ . For i.i.d. Bernoulli participation model, we have $\begin{array} { r } { T ( S ) \geq \frac { 1 } { \operatorname* { m i n } \{ p _ { i } | i \in S \} } } \end{array}$ , and we can further show that $\begin{array} { r } { \mathbb { E } _ { S } \left[ T ( S ) \right] \ge \frac { 1 } { p _ { m i n } } \frac { S } { N } } \end{array}$ ≥ 1p min SN ( see Appendix D.3 for details). Therefore,
189
+
190
+ $$
191
+ \mathbb { E } \left[ T _ { \epsilon } ^ { ( \mathsf { F e d A v g , S C A F F O L D } ) } \right] \geq \frac { S } { N } \frac { 1 } { p _ { m i n } } \widetilde { \mathcal { O } } \Big ( \frac { \sigma ^ { 2 } } { \mu S K \epsilon } \Big ) = \widetilde { \mathcal { O } } \Big ( \frac { 1 } { p _ { m i n } } \cdot \frac { \sigma ^ { 2 } } { \mu N K \epsilon } \Big ) .
192
+ $$
193
+
194
+ By comparing Eqn. 2 and Eqn. 3, we see that both FedAvg and SCAFFOLD are more vulnerable to stragglers, that is, the devices with very small participation probabilities; on the contrary, the convergence rate of MIFA only depends on the average of $1 / p _ { i }$ instead of $1 / p _ { m i n }$ . We also provide empirical experiments showing that MIFA converges faster than FedAvg in Section 7.
195
+
196
+ # 6 Convergence result for non-convex objective functions
197
+
198
+ In this section, we present the convergence guarantee of MIFA for the non-convex case. First we list the additional assumptions as below.
199
+
200
+ Assumption 5 (Hessian Lipschitz). $f _ { 1 } , \cdots , f _ { N }$ are all $\rho$ -Hessian Lipschitz: for all $w$ and $v$ $\bigl \| \nabla ^ { 2 } f _ { i } \bigl ( \tilde { \boldsymbol { w } } \bigr ) - \nabla ^ { 2 } f _ { i } ( \boldsymbol { v } ) \bigr \| \leq \dot { \rho } \bigl \| \boldsymbol { w } - \boldsymbol { \tilde { v } } \bigr \|$ .
201
+
202
+ Assumption 6 (Bounded noise). The noise of the local stochastic gradients is upper bounded by $a$ constant $\delta$ almost surely: $\begin{array} { r } { \left\| \tilde { \nabla } f _ { i } ( w ) - \nabla f _ { i } ( w ) \right\| \le \delta a . s . , \forall i \in [ N ] } \end{array}$ .
203
+
204
+ Assand y). There exist . Furthermore, $\alpha > 0$ anfine $\beta _ { i } > 0$ at for all . $w$ $\in [ N ] \colon \left\| \nabla f _ { i } ( w ) \right\| ^ { 2 } \leq \alpha \left\| \nabla f ( w ) \right\| ^ { 2 } + \beta _ { i }$ $\begin{array} { r } { \beta = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \beta _ { i } } \end{array}$
205
+
206
+ Assumption 8. There exists a constant $\nu _ { i }$ such that $\tau ( t , i ) \ \leq \ \nu _ { i }$ , for all $i \in [ N ]$ and $t \geq 1$ Furthermore, define ν¯ = 1N PNi=1 νi and νmax = maxi∈[N] νi.
207
+
208
+ The analysis of non-convex functions is much more technically involved, and our results rely on strong assumptions that provide a finer control of the gradient difference (Assumption 5), gradient noise (Assumption 6), gradient dissimilarity among devices (Assumption 7), and device unavailability (Assumption 8). We remark that Assumption 5 is also made in [9, 16], and Assumption 7 is also made in [18, 39]. We leave it as future work to study whether and how MIFA converges for non-convex functions with weaker assumptions.
209
+
210
+ Theorem 6.1. Assume that Assumptions $I , ~ 2 , ~$ , and $^ { 5 }$ to 7 hold. Further assume that the device availability sequence $\tau ( t , i )$ satisfies Assumption 8 and $\tau ( 1 , i ) = 0$ for all $i \in [ N ]$ . By using $a$ learning rate η = q $\begin{array} { r } { \eta = \sqrt { \frac { N } { K T L \left( 1 + \bar { \nu } \right) } } } \end{array}$ NKT L(1+¯ν), for T ≥ max{32αLNK, 16LNK , 8KNν2max(L2+ρδ) }, after T − 1 communication rounds, MIFA satisfies:
211
+
212
+ $$
213
+ \operatorname* { m i n } _ { 1 \leq t \leq T } \mathbb { E } _ { \xi } \left[ \left\| \nabla f ( w _ { t } ) \right\| ^ { 2 } \right] = \mathcal { O } \left( \sqrt { \frac { ( 1 + \bar { \nu } ) L } { T K N } } ( f ( w _ { 1 } ) - f ^ { * } + \sigma ^ { 2 } ) + \frac { A _ { 4 } + A _ { 5 } } { T } \right) ,
214
+ $$
215
+
216
+ where $f ^ { * }$ is the optimal value, and:
217
+
218
+ $$
219
+ \begin{array} { l } { { A _ { 4 } = N K L \left( \alpha \sigma ^ { 2 } \hat { \nu } + \frac { \sigma ^ { 2 } \nu _ { \mathrm { m a x } } } { \sqrt { K N } } + \sigma \nu _ { \mathrm { m a x } } \sqrt { \beta } \right) + \frac { { ( L ^ { 2 } + \rho \delta ) \sigma ^ { 2 } \nu _ { \mathrm { m a x } } } } { L } , } } \\ { { A _ { 5 } = \frac { { ( K - 1 ) N L ( \beta + \sigma ^ { 2 } / K ) } } { \hat { \nu } + 1 } . } } \end{array}
220
+ $$
221
+
222
+ Next, we show that the leading $\mathcal { O } ( 1 / \sqrt { T } )$ term is theoretically optimal for zero-respecting algorithms.
223
+
224
+ Proposition 6.1. Let $c _ { 0 } > 0$ be a universal constant. For any randomized zero-respecting algorithm, there exists a stochastic non-convex problem satisfying Assumption1, 2, 5 and 7, such that the output $w _ { T }$ after $T$ rounds of communication has expected sub-optimality lower bounded by
225
+
226
+ $$
227
+ \mathbb { E } [ \| \nabla f ( w _ { T } ) \| ^ { 2 } ] \ge \mathbb { E } [ \| \nabla f ( w _ { T } ) \| ] ^ { 2 } \ge c _ { 0 } \sqrt { \frac { \bar { \nu } L \sigma ^ { 2 } ( f ( w _ { 0 } ) - f ^ { * } ) } { N K T } } .
228
+ $$
229
+
230
+ The above proposition show that when $\sigma \sqrt { ( f ( w _ { 0 } ) - f ^ { * } ) } \sim \sigma ^ { 2 } + ( f ( w _ { 0 } ) - f ^ { * } )$ , the result in Theorem 6.1 is tight. However, note that the counter example we used requires the quantity $\delta$ in Assumption 6 to scale with $T$ , hence requiring $\delta$ to be large enough. This does not change the optimality of the first term as the first term is independent of $\delta$ . Whether this requirement can be relaxed is left as an open problem.
231
+
232
+ Remark 6.1. When all $\nu _ { i } = 0$ (i.e. all the devices are active), our convergence bound reduces to $\begin{array} { r } { \mathcal { O } \Big ( \sqrt { \frac { L } { T K N } } ( f ( w _ { 1 } ) - f ^ { * } + \sigma ^ { 2 } ) + \frac { ( K - 1 ) N L ( \beta + \sigma ^ { 2 } / K ) } { T } \Big ) } \end{array}$ . This matches the result in [42] (Thm. 1, $\begin{array} { r } { \eta = 1 , \eta _ { L } = \sqrt { \frac { N } { K T L } } ) } \end{array}$ .
233
+
234
+ # 7 Numerical Experiments
235
+
236
+ In this section, we conduct numerical experiments3. to verify our theoretical results and investigate how the heterogeneity of the device availability influences the Federated optimization algorithms. We compare the performance of the following four algorithms: FedAvg with importance sampling (FedAvg-IS), Biased FedAvg, FedAvg with device sampling, and our proposed MIFA. For the detailed discussions of the algorithms, we refer the readers to Sections 3 and 4. We remark that for a fair comparison, we deliberately include the first few rounds that MIFA needs to wait to receive responses from all devices for initializing the update-array $\{ G ^ { i } \}$ .
237
+
238
+ Following [26, 25], we construct non-i.i.d. datasets from two commonly used computer vision datasets — MNIST [23] and CIFAR-10 [22] . Specifically, we divide the data into $N = 1 0 0$ devices with each device holding samples of only two classes, which creates a high level of data heterogeneity. For simplicity, we ensure that each device holds the same number of samples. We do not use any data augmentation. We use multinomial logistic regression as the convex model and LeNet-5 [24] with ReLU activations as the non-convex model. For all experiments, we use weight decay in the training process, which corresponds to adding $\ell _ { 2 }$ penalty. We use logistic models for MNIST dataset, while we use LeNet-5 for CIFAR-10. Our code is adapted from [26], which is under MIT License.
239
+
240
+ We model the availability of the devices as independent Bernoulli random trials. The $i \cdot$ -th device is assigned with a probability $p _ { i }$ , where at each time step, the device becomes active with probability $p _ { i }$ . In our experiments, the $p _ { i }$ ’s are chosen such that devices holding data of smaller labels participate less frequently. Specifically, if the $i$ -th device holds the data of label $j$ and $k$ , we set $\bar { p } _ { i } = \bar { p _ { \operatorname* { m i n } } } \operatorname* { m i n } ( j , k ) / 9 + \bar { ( 1 - p _ { \operatorname* { m i n } } ) }$ , where $p _ { \mathrm { m i n } }$ controls the lower bound of the participation probabilities. The correlation between the participation patterns and local datasets increases the difficulty of the problem [17]. To investigate this phenomenon, we repeat the experiments for $p _ { \mathrm { m i n } } = 0 . 1$ and 0.2. We control the randomness of device participation when testing different algorithms.
241
+
242
+ In all the experiments, we set the initial learning rate to be $\eta _ { 0 } = 0 . 1$ and decay the learning rate as $\begin{array} { r } { \eta _ { t } = \eta _ { 0 } \cdot \frac { 1 } { t } } \end{array}$ . We set the weight decay to be 0.001. The local batch size is 100 and each local update consists of 2 epochs. Therefore, the actual number of local steps $K$ depends on the size of the dataset. We run all the experiments with 4 GPUs of type GeForce RTX 2080 Ti. We repeat the experiments for 5 different random seeds, and all of the experiments exhibit similar training curves. We report the averaged training loss and test accuracy with error bars in Figure 2.
243
+
244
+ We observe that FedAvg with device sampling (FedAvg ( $S = 5 0$ ) and FedAvg $S = 1 0 0$ ) in Figure 2) is severely influenced by the straggling devices and makes progress relatively slowly compared to the other algorithms. Although biased FedAvg converges fast at the beginning, this simple algorithm is biased, and the optimality gaps are prominent for the harder CIFAR-10 dataset and when $p _ { \mathrm { m i n } }$ is small. On the contrary, our proposed MIFA avoids waiting for stragglers, converges fast without bias, and is competitive with FedAvg with importance sampling, which requires knowledge of the participation probabilities. We refer the readers to Appendix G for additional experiments on CIFAR-10.
245
+
246
+ # 8 Conclusions and Discussions
247
+
248
+ In this paper, we study FL algorithms in the presence of arbitrary device unavailability and propose MIFA, which avoids waiting for straggling devices and re-uses the memorized latest updates as the surrogate when the device is unavailable. We theoretically analyze MIFA without any structural assumptions on the device availability and prove the convergence for strongly convex and non-convex smooth functions. Different from the literature that studies oracle complexity in terms of stochastic gradient evaluations, we argue that in federated learning system, the bottleneck lies in the nonstationary and possibly adversarial pattern of device participation. Therefore, it is important to study how the number of inactive rounds influences the convergence rate. In Theorem 5.1, the dependency upon $\tau _ { \operatorname* { m a x } , T }$ might be an artifact of our analysis, and a future direction is to study whether we can remove this dependency. Another important direction is to analyze algorithms for non-convex functions under weaker assumptions.
249
+
250
+ ![](images/c1142e9ecbf7a3052e86380ac3f4c818747910b17c29f238aaf9134bafeb112a.jpg)
251
+ Figure 2: Training losses and test accuracies. Fig. 2(a)–2(d): logistic models on non-iid MNIST. Fig. 2(e)–2(h): LeNet-5 on non-iid CIFAR-10. FedAvg $S = 5 0$ ) and FedAvg $S = 1 0 0$ ) refer to FedAvg with device sampling that samples $S$ devices for each global update. FedAvg-IS is short for FedAvg with importance sampling, which requires knowledge of the participation probabilities.
252
+
253
+ # Acknowledgments and Disclosure of Funding
254
+
255
+ The work of Xinran Gu and Longbo Huang is supported in part by the Technology and Innovation Major Project of the Ministry of Science and Technology of China under Grant 2020AAA0108400 and2020AAA0108403. Xinran Gu would like to thank Kaifeng Lyu for the discussion on the convergence analysis. The authors would like to thank Sai Praneeth Karimireddy for the discussion on the problem settings.
256
+
257
+ # References
258
+
259
+ [1] Alekh Agarwal and John C Duchi. Distributed delayed stochastic optimization. In 2012 IEEE 51st IEEE Conference on Decision and Control (CDC), pages 5451–5452. IEEE, 2012.
260
+ [2] Alekh Agarwal, Martin J Wainwright, Peter Bartlett, and Pradeep Ravikumar. Informationtheoretic lower bounds on the oracle complexity of convex optimization. Advances in Neural Information Processing Systems, 22:1–9, 2009.
261
+ [3] Yossi Arjevani, Yair Carmon, John C. Duchi, Dylan J. Foster, Nathan Srebro, and Blake Woodworth. Lower bounds for non-convex stochastic optimization, 2019.
262
+ [4] Yossi Arjevani, Ohad Shamir, and Nathan Srebro. A tight convergence analysis for stochastic gradient descent with delayed updates. In Algorithmic Learning Theory, pages 111–132. PMLR, 2020.
263
+ [5] Arda Aytekin, Hamid Reza Feyzmahdavian, and Mikael Johansson. Analysis and implementation of an asynchronous optimization algorithm for the parameter server. arXiv preprint arXiv:1610.05507, 2016.
264
+ [6] Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-sgd: Distributed sgd with quantization, sparsification, and local computations. arXiv preprint arXiv:1906.02367, 2019.
265
+ [7] Keith Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex Ingerman, Vladimir Ivanov, Chloé Kiddon, Jakub Konecný, Stefano Mazzocchi, Brendan McMahan, Timon ˇ
266
+
267
+ Van Overveldt, David Petrou, Daniel Ramage, and Jason Roselander. Towards federated learning at scale: System design. In A. Talwalkar, V. Smith, and M. Zaharia, editors, Proceedings of Machine Learning and Systems, volume 1, pages 374–388, 2019.
268
+
269
+ [8] Sébastien Bubeck, Nicolo Cesa-Bianchi, and Gábor Lugosi. Bandits with heavy tail. IEEE Transactions on Information Theory, 59(11):7711–7717, 2013.
270
+
271
+ [9] Yair Carmon, John C Duchi, Oliver Hinder, and Aaron Sidford. Accelerated methods for nonconvex optimization. SIAM Journal on Optimization, 28(2):1751–1772, 2018.
272
+
273
+ [10] Hubert Eichner, Tomer Koren, Brendan McMahan, Nathan Srebro, and Kunal Talwar. Semicyclic stochastic gradient descent. In International Conference on Machine Learning, pages 1764–1773. PMLR, 2019.
274
+
275
+ [11] Hamid Reza Feyzmahdavian, Arda Aytekin, and Mikael Johansson. An asynchronous minibatch algorithm for regularized stochastic optimization. IEEE Transactions on Automatic Control, 61(12):3740–3754, 2016.
276
+
277
+ [12] Saeed Ghadimi and Guanghui Lan. Optimal stochastic approximation algorithms for strongly convex stochastic composite optimization i: A generic algorithmic framework. SIAM Journal on Optimization, 22(4):1469–1492, 2012.
278
+
279
+ [13] Margalit Glasgow and Mary Wootters. Asynchronous distributed optimization with stochastic delays. arXiv preprint arXiv:2009.10717, 2020.
280
+
281
+ [14] Eduard Gorbunov, Konstantin P. Burlachenko, Zhize Li, and Peter Richtarik. Marina: Faster non-convex distributed learning with compression. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 3788–3798. PMLR, 18–24 Jul 2021.
282
+
283
+ [15] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019.
284
+
285
+ [16] Chi Jin, Rong Ge, Praneeth Netrapalli, Sham M Kakade, and Michael I Jordan. How to escape saddle points efficiently. In International Conference on Machine Learning, pages 1724–1732. PMLR, 2017.
286
+
287
+ [17] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019.
288
+
289
+ [18] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning, pages 5132–5143. PMLR, 2020.
290
+
291
+ [19] Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local sgd on identical and heterogeneous data. In International Conference on Artificial Intelligence and Statistics, pages 4519–4529. PMLR, 2020.
292
+
293
+ [20] Jakub Konecnˇ y, Brendan McMahan, and Daniel Ramage. Federated optimization: Distributed \` optimization beyond the datacenter. arXiv preprint arXiv:1511.03575, 2015.
294
+
295
+ [21] Jakub Konecnˇ y, H Brendan McMahan, Daniel Ramage, and Peter Richtárik. Federated optimiza- \` tion: Distributed machine learning for on-device intelligence. arXiv preprint arXiv:1610.02527, 2016.
296
+
297
+ [22] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
298
+
299
+ [23] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
300
+
301
+ [24] Yann LeCun et al. Lenet-5, convolutional neural networks. URL: http://yann. lecun. com/exdb/lenet, 20(5):14, 2015.
302
+
303
+ [25] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. In I. Dhillon, D. Papailiopoulos, and V. Sze, editors, Proceedings of Machine Learning and Systems, volume 2, pages 429–450, 2020.
304
+ [26] Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. In International Conference on Learning Representations, 2020.
305
+ [27] Xiangru Lian, Yijun Huang, Yuncheng Li, and Ji Liu. Asynchronous parallel stochastic gradient for nonconvex optimization. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc., 2015.
306
+ [28] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pages 1273–1282. PMLR, 2017.
307
+ [29] Arkadij Semenovic Nemirovskij and David Borisovich Yudin. Problem complexity and method ˇ efficiency in optimization. 1983.
308
+ [30] Constantin Philippenko and Aymeric Dieuleveut. Bidirectional compression in heterogeneous settings for distributed or federated learning with partial participation: tight convergence guarantees. arXiv preprint arXiv:2006.14591, 2020.
309
+ [31] Amirhossein Reisizadeh, Isidoros Tziotis, Hamed Hassani, Aryan Mokhtari, and Ramtin Pedarsani. Straggler-resilient federated learning: Leveraging the interplay between statistical accuracy and system heterogeneity. arXiv preprint arXiv:2012.14453, 2020.
310
+ [32] Yichen Ruan, Xiaoxi Zhang, Shu-Che Liang, and Carlee Joe-Wong. Towards flexible device participation in federated learning. In International Conference on Artificial Intelligence and Statistics, pages 3403–3411. PMLR, 2021.
311
+ [33] Felix Sattler, Simon Wiedemann, Klaus-Robert Müller, and Wojciech Samek. Robust and communication-efficient federated learning from non-iid data. IEEE transactions on neural networks and learning systems, 31(9):3400–3413, 2019.
312
+ [34] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet Talwalkar. Federated multi-task learning. arXiv preprint arXiv:1705.10467, 2017.
313
+ [35] Sebastian U Stich and Sai Praneeth Karimireddy. The error-feedback framework: Better rates for sgd with delayed gradients and compressed updates. Journal of Machine Learning Research, 21:1–36, 2020.
314
+ [36] Sebastian Urban Stich. Local sgd converges fast and communicates little. In ICLR 2019- International Conference on Learning Representations, number CONF, 2019.
315
+ [37] Roman Vershynin. High-dimensional probability: An introduction with applications in data science, volume 47. Cambridge university press, 2018.
316
+ [38] Jianyu Wang and Gauri Joshi. Cooperative sgd: A unified framework for the design and analysis of communication-efficient sgd algorithms. In ICML Workshop on Coding Theory for Machine Learning, 2019.
317
+ [39] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. Advances in Neural Information Processing Systems, 33, 2020.
318
+ [40] Cong Xie, Sanmi Koyejo, and Indranil Gupta. Asynchronous federated optimization. arXiv preprint arXiv:1903.03934, 2019.
319
+ [41] Yikai Yan, Chaoyue Niu, Yucheng Ding, Zhenzhe Zheng, Fan Wu, Guihai Chen, Shaojie Tang, and Zhihua Wu. Distributed non-convex optimization with sublinear speedup under intermittent client availability. arXiv preprint arXiv:2002.07399, 2020.
320
+ [42] Haibo Yang, Minghong Fang, and Jia Liu. Achieving linear speedup with partial worker participation in non-iid federated learning. arXiv preprint arXiv:2101.11203, 2021.
321
+ [43] Hao Yu, Rong Jin, and Sen Yang. On the linear speedup analysis of communication efficient momentum sgd for distributed non-convex optimization. In International Conference on Machine Learning, pages 7184–7193. PMLR, 2019.
322
+ [44] Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim, Sashank J Reddi, Sanjiv Kumar, and Suvrit Sra. Why are adaptive methods good for attention models?, 2020.
323
+ [45] Xin Zhang, Jia Liu, and Zhengyuan Zhu. Taming convergence for asynchronous stochastic gradient descent with unbounded delay in non-convex learning. In 2020 59th IEEE Conference on Decision and Control (CDC), pages 3580–3585. IEEE, 2020.
324
+
325
+ # Checklist
326
+
327
+ 1. For all authors...
328
+
329
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
330
+ (b) Did you describe the limitations of your work? [Yes] See Section 8.
331
+ (c) Did you discuss any potential negative societal impacts of your work? [N/A] Our work is mainly theoretical and targets at providing theoretical analysis of the FL algorithms, which has almost no negative societal impacts.
332
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
333
+
334
+ 2. If you are including theoretical results...
335
+
336
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] The assumptions are rigorously stated in Section 5 and Section 6.
337
+ (b) Did you include complete proofs of all theoretical results? [Yes] All the proofs are deferred to the appendix.
338
+
339
+ 3. If you ran experiments...
340
+
341
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Our code will be included in the supplemental material. The datasets we use are public. The instructions needed to reproduce the main experimental results are clearly stated in Section 7.
342
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 7.
343
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Section 7.
344
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 7.
345
+
346
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
347
+
348
+ (a) If your work uses existing assets, did you cite the creators? [Yes] See Section 7.
349
+ (b) Did you mention the license of the assets? [Yes] See Section 7.
350
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We include our code for reproducing the experiments in the supplemental material.
351
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] We choose the commonly-used MNIST and CIFAR-10 datasets.
352
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] We choose the commonly-used MNIST and CIFAR-10 datasets.
353
+
354
+ 5. If you used crowdsourcing or conducted research with human subjects...
355
+
356
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
357
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
358
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/1_gaHBaRYt/1_gaHBaRYt_content_list.json ADDED
@@ -0,0 +1,1665 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Fast Federated Learning in the Presence of Arbitrary Device Unavailability ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 238,
8
+ 122,
9
+ 761,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xinran Gu∗ IIIS Tsinghua University gxr21@mails.tsinghua.edu.cn ",
17
+ "bbox": [
18
+ 245,
19
+ 226,
20
+ 480,
21
+ 282
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Kaixuan Huang∗ ECE Princeton University kaixuanh@princeton.edu ",
28
+ "bbox": [
29
+ 558,
30
+ 227,
31
+ 751,
32
+ 281
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Jingzhao Zhang EECS Massachusetts Institute of Technology jzhzhang@mit.edu ",
39
+ "bbox": [
40
+ 225,
41
+ 303,
42
+ 478,
43
+ 358
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Longbo Huang† IIIS Tsinghua University longbohuang@tsinghua.edu.cn ",
50
+ "bbox": [
51
+ 537,
52
+ 303,
53
+ 771,
54
+ 358
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 395,
65
+ 535,
66
+ 411
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Federated Learning (FL) coordinates with numerous heterogeneous devices to collaboratively train a shared model while preserving user privacy. Despite its multiple advantages, FL faces new challenges. One challenge arises when devices drop out of the training process beyond the control of the central server. In this case, the convergence of popular FL algorithms such as FedAvg is severely influenced by the straggling devices. To tackle this challenge, we study federated learning algorithms under arbitrary device unavailability and propose an algorithm named Memory-augmented Impatient Federated Averaging (MIFA). Our algorithm efficiently avoids excessive latency induced by inactive devices, and corrects the gradient bias using the memorized latest updates from the devices. We prove that MIFA achieves minimax optimal convergence rates on non-i.i.d. data for both strongly convex and non-convex smooth functions. We also provide an explicit characterization of the improvement over baseline algorithms through a case study, and validate the results by numerical experiments on real-world datasets. ",
73
+ "bbox": [
74
+ 233,
75
+ 428,
76
+ 766,
77
+ 621
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 650,
88
+ 310,
89
+ 667
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Federated learning is a machine learning setting in which a central server coordinates with a large number of devices to collectively train a shared model [28, 34, 20, 33, 25, 26]. Practical advantages of this training scheme are mainly twofold. First, each device keeps the private data locally and hence preserves its data privacy. Second, federated learning can make use of idle computing resources and lower computation costs. Although federated learning successfully scales up with data sizes and accelerates training via more affordable computing power [43, 38, 36], the collaborative setup leads to new challenges due to large variations among individual computing devices. Our work aims to formulate and investigate the impact of device variations on FL from an optimization perspective. ",
96
+ "bbox": [
97
+ 174,
98
+ 684,
99
+ 823,
100
+ 795
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In FL, a device can differ from its peers in multiple aspects [17, 25]. First, the data distribution and local task can be different among devices. To address the data variation, non-i.i.d. objective models were proposed and analyzed by [26, 18, 19, 42, 25]. We follow this line of work and formulate our optimization objective as a sum of stochastic functions on individual devices (See Eqn. (1)). ",
107
+ "bbox": [
108
+ 174,
109
+ 801,
110
+ 823,
111
+ 857
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "A second variation among devices is caused by different computing and communication speeds. One natural way to formulate the variation in computation speeds is to allow asynchronous updates and model the updates as delayed responses. Lots of novel research has studied the problem with different delay models, e.g., [35, 4, 27, 11, 45, 1, 5, 13]. However, the delayed setup assumes that all devices make roughly the same number of (delayed) responses in the end. This behavior may deviate largely from the FL practice, where each device, e.g., personal cell phones, can have very different active duration when participating in the FL training, and hence make different numbers of responses. For this reason, our work aims to address this third discrepancy among devices caused by individual availability patterns. ",
118
+ "bbox": [
119
+ 174,
120
+ 90,
121
+ 825,
122
+ 215
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "The third device heterogeneity caused by different availability patterns is less studied in optimization for federated learning problems. In this model, instead of making a delayed response, devices can abort the training halfway, e.g., due to battery level, incoming calls, etc, and fail to return their responses upon the central server’s requests [28, 7, 17]. To handle missing responses, researchers propose algorithms where the central server may collect responses from only a fraction of the devices and make updates [18, 28, 42, 25, 26, 17, 30, 14]. ",
129
+ "bbox": [
130
+ 174,
131
+ 222,
132
+ 825,
133
+ 305
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Previous works on collecting responses from a fraction of devices can be divided into two categories. When the response distribution is known, one could collect only the fastest responses and re-weight according to their response probability [17, 26, 30]. This model can be restrictive, as in practice, the exact distribution may not be available and may evolve. Another line of work assumes that the server can arbitrarily decide and sample a set of devices to collect responses accordingly in every communication round [18, 28, 42, 25, 14]. This model does not require knowing the response possibility. However, the response time can be very long if the selected subset contains unavailable devices. ",
140
+ "bbox": [
141
+ 173,
142
+ 311,
143
+ 825,
144
+ 422
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "In this work, we address the above limitations by studying federated learning in the presence of arbitrary device unavailability. Within this practical setup, we propose an algorithm that automatically accommodates for the underlying unavailability and allows patterns of the device unavailability to be non-stationary and even adversarial. Furthermore, our algorithm can achieve optimal convergence rates in the presence of device inactivity and automatically reduce to best-known rates if all devices are active. Our contributions are summarized as follows. ",
151
+ "bbox": [
152
+ 176,
153
+ 428,
154
+ 825,
155
+ 512
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "• We investigate the federated learning problem with a practical formulation of device participation, which does not require each device to be online according to an (either known or unknown) distribution. • We propose the Memory-augmented Impatient Federated Averaging (MIFA) algorithm that is agnostic to the availability pattern. It efficiently avoids excessive latency induced by inactive devices, successfully exploits the information about the descent direction in stale and noisy gradients, and corrects the gradient bias using the memorized latest updates. • We prove that MIFA achieves minimax optimal convergence rates $\\begin{array} { r } { \\mathcal { O } \\left( \\frac { \\bar { \\tau } _ { T } + 1 } { N K T } \\right) } \\end{array}$ for smooth, strongly convex functions, and $\\mathcal { O } \\left( \\sqrt { \\frac { \\bar { \\nu } + 1 } { N K T } } \\right)$ for smooth, non-convex functions, and establish matching lower bounds. Here, $N , K$ and $T$ stand for the number of devices, local updates and communication rounds respectively. $\\bar { \\tau } _ { T }$ and $\\bar { \\nu }$ characterize how actively devices participate in training (see formal definitions in Sections 3, 5 and 6). MIFA also achieves optimal convergence rates in the ideal case when all devices are active. • We provide an explicit characterization of the improvement over baseline algorithms through a case study and empirically verify our results on real-world datasets. ",
162
+ "bbox": [
163
+ 217,
164
+ 523,
165
+ 825,
166
+ 758
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "2 Related work ",
173
+ "text_level": 1,
174
+ "bbox": [
175
+ 174,
176
+ 775,
177
+ 318,
178
+ 792
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Federated learning. Federated Averaging (FedAvg) was first proposed in [28]. [26, 19, 18, 42] provided convergence analysis for FedAvg on non-i.i.d. data and quantified how data heterogeneity degrades the convergence rate. Several variants of FedAvg were designed to deal with data heterogeneity. FedProx [25] adds a proximal term to local objective functions, while FSVRG [21] and SCAFFOLD [18] employ variance reduction techniques. ",
185
+ "bbox": [
186
+ 174,
187
+ 808,
188
+ 825,
189
+ 877
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "One line of work focused on variations in computation capabilities among devices [39, 31, 40]. These models assume that responses are delayed but not missing. To address the missing response, some work assumes that the server can actively sample a subset of devices to respond [18, 28, 42, 25, 14] or that the pattern of device availability is known [26, 17, 10, 30]. These results do not generalize to adversarial inactive patterns. [32] discussed the impact of device inactivity on convergence but their proposed algorithm diverges if there exists an inactive device in each round of communication. However, our setup allows adversarial patterns under certain non-distributional assumptions (see Section 5) while our proposed algorithm still achieves convergence. ",
196
+ "bbox": [
197
+ 174,
198
+ 883,
199
+ 821,
200
+ 911
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "",
207
+ "bbox": [
208
+ 174,
209
+ 90,
210
+ 825,
211
+ 174
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Asynchronous distributed optimization. Our work is related to literature in the field of traditional asynchronous distributed optimization in that our proposed algorithm uses stale gradients. The problem setup for asynchronous distributed algorithms can be divided into two categories [13]. One is the shared-data (i.i.d.) setting, where all workers can access the whole dataset. In this setting, the local gradient is an unbiased estimator of the global gradient [35, 4, 27, 11, 45, 1]. In contrast, we assume each worker has non-i.i.d. data, and hence the local stochastic gradient can not be viewed as an unbiased estimator of the global gradient. ",
218
+ "bbox": [
219
+ 174,
220
+ 190,
221
+ 825,
222
+ 289
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "The other less studied setting in distributed optimization is the distributed-data setting (non-i.i.d.), where data are partitioned among workers. Specifically, [5] proposed an asynchronous incremental aggregated gradient algorithm that uses buffered gradients to update the global model. Unlike our setup, this algorithm evaluates full local gradients, performs only one local step, and was analyzed under the bounded delay assumption. [13] models the delay as stochastic and assumes that the server has knowledge of the distribution, but our formulation is distribution-free. [6] allows workers to perform multiple local steps and communicate with the server at different times, but the authors assume that all workers are available and compute at the same rate. ",
229
+ "bbox": [
230
+ 173,
231
+ 294,
232
+ 825,
233
+ 405
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "Comparison with an independent work. While preparing the manuscript, we were unaware of an independent work [41] that investigated the same setup and proposed a similar algorithm called FedLaAvg. Their main theorem established the convergence rate of $\\mathcal { O } \\left( \\sqrt { \\frac { \\nu _ { \\mathrm { m a x } } } { N ^ { 0 . 5 } T } } ( \\mathbf { \\bar { G } } ^ { 2 } + \\sigma ^ { 2 } ) \\right)$ for smooth and non-convex problems, where $G ^ { 2 }$ is the uniform upper bound for the squared norm of stochastic gradients and $\\nu _ { m a x }$ is the maximum number of inactive rounds. In comparison, we prove the minimax optimal rate of $\\mathcal { O } ( \\sqrt { \\frac { \\bar { \\nu } } { N K T } } \\sigma ^ { 2 } )$ without the bounded gradient assumption, also improving $\\nu _ { \\mathrm { m a x } }$ to $\\bar { \\nu }$ . Furthermore, our result achieves a linear speedup in $N$ and $K$ . ",
240
+ "bbox": [
241
+ 173,
242
+ 421,
243
+ 825,
244
+ 531
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "Apart from non-convex functions, we also derive the minimax optimal rates for strongly convex smooth functions under the mild assumption that allows for arbitrary and unbounded number of inactive rounds. Both of our results achieve linear speedups in terms of $N$ and $K$ , and automatically recover the best-known rates of FedAvg when all devices are active. We also show that our proposed algorithm achieves acceleration over unbiased baseline algorithms in the presence of stragglers. ",
251
+ "bbox": [
252
+ 174,
253
+ 536,
254
+ 825,
255
+ 607
256
+ ],
257
+ "page_idx": 2
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "3 Problem Setup ",
262
+ "text_level": 1,
263
+ "bbox": [
264
+ 174,
265
+ 627,
266
+ 330,
267
+ 645
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "We consider optimizing the following problem in a Federated Learning setting: ",
274
+ "bbox": [
275
+ 174,
276
+ 660,
277
+ 691,
278
+ 675
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "equation",
284
+ "img_path": "images/22f078ec690bdea95bad0a3810ee899d3c05899a7210597c3a542826721eabc9.jpg",
285
+ "text": "$$\n\\begin{array} { r } { \\underset { w \\in \\mathbb { R } ^ { d } } { \\operatorname* { m i n } } f ( w ) : = \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } f _ { i } ( w ) : = \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\mathbb { E } _ { \\xi _ { i } } [ f _ { i } ( w , \\xi _ { i } ) ] , } \\end{array}\n$$",
286
+ "text_format": "latex",
287
+ "bbox": [
288
+ 308,
289
+ 683,
290
+ 687,
291
+ 710
292
+ ],
293
+ "page_idx": 2
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "where $w$ is the optimization variable, e.g., parameters of a machine learning model, $N$ is the number of participating devices, $f _ { i }$ is the local loss function on device $i$ , and $\\xi _ { i }$ describes the randomness in local data distribution. ",
298
+ "bbox": [
299
+ 176,
300
+ 717,
301
+ 825,
302
+ 760
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "In the ideal federated learning setup (see Figure 1 (a)), all devices return responses within similar time, and hence the central server collects all the local updates. In this case, the computation cost is usually measured by the number of local stochastic oracle evaluations, which is proportional to the number of rounds. In a delayed FL setup (see Figure 1 (b)), devices are always active upon the central server’s request but may return responses with a delay. Here, all devices return almost the same number of responses in the long term. ",
309
+ "bbox": [
310
+ 173,
311
+ 765,
312
+ 825,
313
+ 849
314
+ ],
315
+ "page_idx": 2
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "As we discussed, the above setups do not depict a real-world scenario in which a device can have a longer inactive duration than active duration. In such cases, the communication interval is much longer than the local computation time required for each update, and each device generates an unequal number of responses [28, 17]. This motivates our setup in Figure 1 (c). ",
320
+ "bbox": [
321
+ 174,
322
+ 856,
323
+ 823,
324
+ 911
325
+ ],
326
+ "page_idx": 2
327
+ },
328
+ {
329
+ "type": "image",
330
+ "img_path": "images/dbec5db87e22ee0dc55043253dc815eff5fd652c994f67ee8a04489f10ef06e1.jpg",
331
+ "image_caption": [
332
+ "Figure 1: An illustration of setup. (a) Ideal setup: all devices return their responses within similar time. (b) Delayed setup: all devices are available, but may return responses with a delay. (c) Our setup: devices can be unavailable arbitrarily, and the communication interval is long enough for active devices to return responses. "
333
+ ],
334
+ "image_footnote": [],
335
+ "bbox": [
336
+ 176,
337
+ 82,
338
+ 823,
339
+ 233
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "In our proposed setup, we use $t$ to index the global communication rounds. We say a device participates or is active at round $t$ if it can complete the computation task and send back the update at the end of round $t$ . We define $\\boldsymbol { \\mathcal { A } } ( t )$ as the set of all active devices at round $t$ . Notice that we make no assumptions on the distribution of the participation patterns of devices and allow them to be arbitrary. ",
346
+ "bbox": [
347
+ 173,
348
+ 299,
349
+ 825,
350
+ 356
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "Directly applying FedAvg to the proposed setup can be problematic due to the existence of inactive devices. To accommodate for inactive devices, we discuss three natural variants of FedAvg and their limitations. The detailed algorithms can be found in Appendix A. ",
357
+ "bbox": [
358
+ 176,
359
+ 361,
360
+ 825,
361
+ 404
362
+ ],
363
+ "page_idx": 3
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "• Biased FedAvg. At each communication round, the global model is updated with a direct average of local updates from the active devices. This naive approach induces bias when data distribution and response patterns vary among devices. \n• FedAvg with device sampling. The server selects a subset of $S$ devices randomly without replacement, and then waits until all devices in the subset $s$ respond. This is how original FedAvg [28] addresses device unavailability. Note that over $T$ communication rounds, the global model is updated less than $T$ times due to waiting. This approach is prone to stragglers and we refer the readers to Section 5.1 for a detailed discussion. \n• FedAvg with importance sampling [26, 13, 17]. The local updates from the active devices are weighted by the reciprocal of the participation probabilities to avoid bias. This approach is only applicable when the response of each device is i.i.d. over rounds and it requires the knowledge of participation probabilities. ",
368
+ "bbox": [
369
+ 217,
370
+ 417,
371
+ 825,
372
+ 599
373
+ ],
374
+ "page_idx": 3
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "4 Memory-augmented Impatient Federated Averaging (MIFA) ",
379
+ "text_level": 1,
380
+ "bbox": [
381
+ 176,
382
+ 621,
383
+ 709,
384
+ 638
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "In this section, we introduce our algorithm — Memory-augmented Impatient Federated Averaging (MIFA). MIFA maintains an update-array $\\{ G ^ { i } \\}$ in the memory that stores the latest updates for all devices. As the name suggests, MIFA has two components. First, the algorithm is impatient and avoids waiting for any specific device when facing heterogeneous devices with arbitrary availability. Second, the algorithm augments the received updates of the active devices with the stored updates of the inactive devices to perform averaging. ",
391
+ "bbox": [
392
+ 173,
393
+ 654,
394
+ 825,
395
+ 738
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "Specifically, at the beginning of round $t$ , the server broadcasts the latest model parameter $w _ { t }$ to all active devices $\\boldsymbol { \\mathcal { A } } ( t )$ . After receiving $w _ { t }$ , each active device, say, the $i$ -th device, sets $w _ { t , 0 } ^ { i } = w _ { t }$ and performs $K$ steps of SGD with respect to the local objective function to get $w _ { t , K } ^ { i }$ : ",
402
+ "bbox": [
403
+ 174,
404
+ 743,
405
+ 825,
406
+ 789
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "equation",
412
+ "img_path": "images/2c0127a5706cf7944f95df9680a24f67da0062cc0709e170f05907f9d6d3a845.jpg",
413
+ "text": "$$\n\\boldsymbol w _ { t , k + 1 } ^ { i } = \\boldsymbol w _ { t , k } ^ { i } - \\eta _ { t } \\tilde { \\nabla } f _ { i } ( \\boldsymbol w _ { t , k } ^ { i } ) , \\boldsymbol k = 0 , \\cdots , \\boldsymbol K - 1 ,\n$$",
414
+ "text_format": "latex",
415
+ "bbox": [
416
+ 328,
417
+ 799,
418
+ 666,
419
+ 820
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "where $\\eta _ { t }$ is the learning rate and $\\tilde { \\nabla } f _ { i } ( w _ { t , k } ^ { i } )$ is the stochastic gradient evaluated on device $i$ . Next, the server stores the received update $\\begin{array} { r } { \\frac { 1 } { \\eta _ { t } } \\big ( w _ { t } - w _ { t , K } ^ { i } \\big ) } \\end{array}$ in $G ^ { i }$ . Denote by $\\{ G _ { t } ^ { i } \\}$ the update-array after round $t$ , then we have ",
426
+ "bbox": [
427
+ 173,
428
+ 830,
429
+ 826,
430
+ 878
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "equation",
436
+ "img_path": "images/72c964c9acb692ffa258397e5523d41c405bf9354c410c37349066a92c8e4d6d.jpg",
437
+ "text": "$$\n\\begin{array} { r } { G _ { t } ^ { i } = \\left\\{ \\begin{array} { l l } { G _ { t - 1 } ^ { i } , } & { \\mathrm { ~ i f ~ } i \\notin \\mathcal { A } ( t ) , } \\\\ { \\frac { 1 } { \\eta _ { t } } ( w _ { t } - w _ { t , K } ^ { i } ) , } & { \\mathrm { ~ i f ~ } i \\in \\mathcal { A } ( t ) . } \\end{array} \\right. } \\end{array}\n$$",
438
+ "text_format": "latex",
439
+ "bbox": [
440
+ 362,
441
+ 880,
442
+ 627,
443
+ 916
444
+ ],
445
+ "page_idx": 3
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "At the end of round $t$ , the server updates the global model with the average of $\\{ G _ { t } ^ { i } \\}$ (line 9). In other words, our algorithm MIFA updates the model with the latest available accumulated gradients for all devices. ",
450
+ "bbox": [
451
+ 174,
452
+ 90,
453
+ 823,
454
+ 132
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "table",
460
+ "img_path": "images/5471198ff0b654b45b8a140b5c46c5f6e75ff5794c1529023b59736618813d80.jpg",
461
+ "table_caption": [
462
+ "Algorithm 1 Memory-augmented Impatient Federated Averaging (MIFA) "
463
+ ],
464
+ "table_footnote": [],
465
+ "table_body": "<table><tr><td colspan=\"2\">1: Input: initial wi,learning rate {nt }</td></tr><tr><td>2: Server executes:</td><td>1: DeviceUpdate(i, Wt , nt):</td></tr><tr><td>3: initialize Gi ←O,i∈[N]</td><td>2:w,←Wt</td></tr><tr><td>4: fort=1,.,T-1do</td><td>3: for local step k = O,.,K -1 do</td></tr><tr><td>5: broadcast wt to all active devices i ∈ A(t)</td><td> 4:compute stochastic gradient Vfi(wt,)</td></tr><tr><td>6: for each active device ido</td><td>Wk+1←W,k-ntvfi(w,) 5:</td></tr><tr><td>7: G ←DeviceUpdate(i,Wt, nt) 8: end for</td><td>6: end for</td></tr><tr><td>Wt+1←wt-∑1 N 9: Gi</td><td>7:Return (wt - wi,k) to the server</td></tr></table>",
466
+ "bbox": [
467
+ 178,
468
+ 164,
469
+ 810,
470
+ 304
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "MIFA efficiently progresses without waiting for inactive devices and re-uses their latest updates as the surrogate for missing responses. Being impatient accelerates convergence, whereas memory augmentation corrects the update bias. Our algorithm differs from asynchronous algorithms in traditional distributed optimization [35, 4, 27, 11, 45, 1, 13, 6] in that we utilize the noisy updates of inactive devices more than once to avoid biasing against stragglers. In the following part of the paper, we show that MIFA successfully exploits information about the descent direction contained in the stale and noisy gradients. ",
477
+ "bbox": [
478
+ 173,
479
+ 320,
480
+ 825,
481
+ 417
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "Discussion on implementation. In practice, to implement MIFA, the server needs to maintain a huge array to store the latest update for each device, which scales with the model size and the total number of devices. To avoid exhausting the server’s memory, one strategy is to distribute the memory consumption among devices. Specifically, each device, say the $i$ -th, stores its previous update $G _ { t _ { i } ^ { \\prime } } ^ { \\ i }$ computed at round $t _ { i } ^ { \\prime }$ in its local memory. When it becomes active and computes $G _ { t } ^ { i }$ , the device sends $G _ { t } ^ { i } - G _ { t _ { i } ^ { \\prime } } ^ { i }$ to the server, which is the difference between the current update and the previous one. In this case, the server only needs to maintain the average $\\bar { G }$ in the memory and updates it by $\\begin{array} { r } { \\bar { G } _ { t } = \\bar { G } _ { t - 1 } + \\frac { 1 } { N } \\sum _ { i \\in \\mathcal { A } ( t ) } ( G _ { t } ^ { \\bar { i } } - G _ { t _ { i } ^ { \\prime } } ^ { i } ) } \\end{array}$ at round $t$ . Then the server updates the global model by $w _ { t + 1 } = w _ { t } - \\eta _ { t } \\bar { G } _ { t }$ . ",
488
+ "bbox": [
489
+ 173,
490
+ 422,
491
+ 825,
492
+ 563
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "5 Convergence Analysis for strongly convex objective functions ",
499
+ "text_level": 1,
500
+ "bbox": [
501
+ 173,
502
+ 582,
503
+ 714,
504
+ 599
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "In this section, we present the convergence results for MIFA on $\\mu$ -strongly convex $L$ -smooth functions. Typical examples for the strongly convex case are $\\ell _ { 2 }$ regularized logistic regression and linear regression problems. ",
511
+ "bbox": [
512
+ 173,
513
+ 613,
514
+ 826,
515
+ 655
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "In order to capture how the unavailability of devices affects algorithm performance, we introduce the following notion to quantify the dynamics of devices in our setting. ",
522
+ "bbox": [
523
+ 173,
524
+ 660,
525
+ 823,
526
+ 689
527
+ ],
528
+ "page_idx": 4
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "Definition 5.1 (Number of inactive rounds). We define the number of inactive rounds of device $i$ at round $t$ as $\\tau ( t , i ) = t - \\operatorname* { m a x } \\{ t ^ { \\prime } \\mid t ^ { \\prime } \\leq t , i \\in A ( t ^ { \\prime } ) \\}$ , which is the difference between current round $t$ and the latest round when device $i$ is active. ",
533
+ "bbox": [
534
+ 174,
535
+ 693,
536
+ 826,
537
+ 734
538
+ ],
539
+ "page_idx": 4
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "It can be seen that $\\tau ( t , i ) = 0$ if device $i$ is active at round $t$ and $\\tau ( t , i ) = \\tau ( t - 1 , i ) + 1$ otherwise. Also, $t - \\tau ( t , i )$ is the latest round when the device $i$ is active. Next, we present the assumptions made for establishing our convergence theorem. ",
544
+ "bbox": [
545
+ 173,
546
+ 746,
547
+ 826,
548
+ 787
549
+ ],
550
+ "page_idx": 4
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "Assumption 1. $f _ { 1 } , \\cdots , f _ { N }$ are all $L$ -smooth, i.e., for all $w$ and $v _ { \\scriptscriptstyle { i } }$ , $\\begin{array} { r c l } { f _ { i } ( v ) } & { \\leq } & { f _ { i } ( w ) \\ + } \\end{array}$ $\\begin{array} { r } { \\left. \\nabla f _ { i } ( w ) , v - w \\right. + \\frac { L } { 2 } \\left\\| w - v \\right\\| ^ { 2 } } \\end{array}$ . ",
555
+ "bbox": [
556
+ 173,
557
+ 791,
558
+ 825,
559
+ 825
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Assumption 2. $\\tilde { \\nabla } f _ { i } ( \\boldsymbol { w } )$ is an unbiased estimator of $\\nabla f _ { i }$ with variance bounded by $\\sigma ^ { 2 }$ , i.e., $\\mathbb { E } _ { \\boldsymbol { \\xi } } \\left[ \\tilde { \\nabla } f _ { i } ( \\boldsymbol { w } ) \\right] = \\nabla f _ { i } ( \\boldsymbol { w } ) , \\mathbb { E } _ { \\boldsymbol { \\xi } } \\left[ \\left\\| \\tilde { \\nabla } f _ { i } ( \\boldsymbol { w } ) - \\nabla f _ { i } ( \\boldsymbol { w } ) \\right\\| ^ { 2 } \\right] \\leq \\sigma ^ { 2 } .$ . ",
566
+ "bbox": [
567
+ 173,
568
+ 829,
569
+ 826,
570
+ 877
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "Assumption 3. $f _ { 1 } , \\cdots , f _ { N }$ are all $\\mu$ -strongly convex: for all $w$ and $v _ { \\scriptscriptstyle { i } }$ , $f _ { i } ( v ) \\geq f _ { i } ( w ) +$ $\\begin{array} { r } { \\left. \\nabla f _ { i } ( w ) , v - w \\right. + \\frac { \\mu } { 2 } \\left\\| w - v \\right\\| ^ { 2 } } \\end{array}$ . ",
577
+ "bbox": [
578
+ 173,
579
+ 880,
580
+ 826,
581
+ 914
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Assumption 4. There exists a constant $t _ { 0 } > 0$ , such that for all $t \\geq 1$ and $i \\in [ N ]$ , the number of inactive rounds of device $i$ at communication round $t$ satisfies $\\begin{array} { r } { \\tau ( t , i ) \\leq t _ { 0 } + \\frac { 1 } { b } \\dot { t } } \\end{array}$ , where $b =$ $4 0 \\left( L / \\mu \\right) ^ { 1 . 5 }$ . ",
588
+ "bbox": [
589
+ 173,
590
+ 90,
591
+ 825,
592
+ 137
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "Assumptions 1, 2, and 3 are standard and common in the FL literature, e.g., [26, 18, 19, 42, 36]. In Assumption 2, we relax the bounded gradient assumption that is often required in prior work, e.g., [6, 26, 40, 1]. Lastly, Assumption 4 is a very mild assumption on device availability, since it allows the number of inactive rounds to grow as ${ \\mathcal { O } } ( t )$ . In contrast, existing results on asynchronous updates mostly assume a bounded or fixed latency, e.g., [6, 1, 5, 40, 35, 4]. ",
599
+ "bbox": [
600
+ 173,
601
+ 146,
602
+ 826,
603
+ 217
604
+ ],
605
+ "page_idx": 5
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "We are now ready to present our first convergence result. Define $\\begin{array} { r l } { D = } & { { } \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\left. \\nabla f _ { i } ( w _ { * } ) \\right. ^ { 2 } } \\end{array}$ to measure data dissimilarity, where $w _ { * } = \\arg \\operatorname* { m i n } f ( w )$ is the global optimum. Also, define $\\bar { \\tau } _ { T }$ and $\\tau _ { \\operatorname* { m a x } , T }$ to be the average and maximum numbers of inactive rounds $\\tau ( t , i )$ across all devices and rounds, respectively. That is, ",
610
+ "bbox": [
611
+ 173,
612
+ 222,
613
+ 826,
614
+ 281
615
+ ],
616
+ "page_idx": 5
617
+ },
618
+ {
619
+ "type": "equation",
620
+ "img_path": "images/733c5805d202f72a1df49e8a211f10a98cbaf3e0246f5f2ede823112da4e143c.jpg",
621
+ "text": "$$\n\\bar { \\tau } _ { T } = \\frac { 1 } { N ( T - 1 ) } \\sum _ { t = 1 } ^ { T - 1 } \\sum _ { i = 1 } ^ { N } \\tau ( t , i ) , \\tau _ { \\operatorname* { m a x } , T } = \\operatorname* { m a x } _ { i \\in [ N ] } \\operatorname* { m a x } _ { 1 \\leq t \\leq T - 1 } \\tau ( t , i ) .\n$$",
622
+ "text_format": "latex",
623
+ "bbox": [
624
+ 281,
625
+ 282,
626
+ 717,
627
+ 327
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "The following theorem summarizes the performance of MIFA in this case. ",
634
+ "bbox": [
635
+ 174,
636
+ 335,
637
+ 655,
638
+ 351
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Theorem 5.1. Assume that Assumptions $^ { l }$ to 3 hold. Further assume that the device availability sequence $\\tau ( t , i )$ satisfies Assumption $^ { 4 }$ and $\\tau ( 1 , i ) = 0$ for all $i \\in [ N ]$ . By setting the learning rate $\\begin{array} { r } { \\eta _ { t } = \\frac { 4 } { \\mu K ( t + a ) } } \\end{array}$ with $a = \\operatorname* { m a x } \\{ 1 0 0 , 4 0 t _ { 0 } \\} ( L / \\mu ) ^ { 1 . 5 }$ , after $T - 1$ communication rounds, MIFA satisfies: ",
645
+ "bbox": [
646
+ 173,
647
+ 352,
648
+ 825,
649
+ 410
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "equation",
655
+ "img_path": "images/a586eb10027a5e2bde1e4b791106324315628fa6d12e02e2e3e3c1ae021cee54.jpg",
656
+ "text": "$$\n\\mathbb { E } _ { \\xi } \\left[ f ( \\overline { { w } } _ { T } ) \\right] - f ( w _ { * } ) = \\mathcal { O } \\left( \\frac { \\bar { \\tau } _ { T } + 1 } { \\mu N K T } \\sigma ^ { 2 } + \\frac { \\tau _ { \\operatorname* { m a x } , T } ^ { 2 } A _ { 1 } + ( K - 1 ) ^ { 2 } A _ { 2 } + A _ { 3 } } { \\mu ^ { 2 } T ^ { 2 } } \\right) ,\n$$",
657
+ "text_format": "latex",
658
+ "bbox": [
659
+ 240,
660
+ 412,
661
+ 754,
662
+ 455
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "where $\\overline { { w } } _ { T }$ is a weighted average of $w _ { t }$ defined as: ",
669
+ "bbox": [
670
+ 173,
671
+ 463,
672
+ 501,
673
+ 478
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "equation",
679
+ "img_path": "images/467ef08efd364fd1d849ca3dc16aa8bd25b2ad4ef2f4136b25ee850e32438dab.jpg",
680
+ "text": "$$\n\\overline { { w } } _ { T } = \\frac { 1 } { W _ { T } } \\sum _ { t = 1 } ^ { T } ( t + a - 1 ) ( t + a - 2 ) w _ { t } , W _ { T } = \\sum _ { t = 1 } ^ { T } ( t + a - 1 ) ( t + a - 2 ) ,\n$$",
681
+ "text_format": "latex",
682
+ "bbox": [
683
+ 243,
684
+ 481,
685
+ 751,
686
+ 523
687
+ ],
688
+ "page_idx": 5
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "Our results hold under Assumption 4, which allows for arbitrary device availability sequences with $\\tau _ { \\mathrm { m a x } , T } = \\mathcal { O } ( T )$ . However, for MIFA to converge, we require $\\tau _ { \\operatorname* { m a x } , T } = o ( T )$ and $\\dot { t _ { 0 } } = \\bar { o } ( T )$ . When ( NK(τ2max,T +t20)τ¯+1 ), the first term dominates and the impact of the second O(1/T 2) term is negligible. In fact the first term in Theorem 5.1 is minimax optimal by our information-theoretic lower bound for the problem in the next proposition. ",
693
+ "bbox": [
694
+ 173,
695
+ 559,
696
+ 825,
697
+ 638
698
+ ],
699
+ "page_idx": 5
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Proposition 5.1. Let $c _ { 0 } > 0$ be a universal constant. For any potentially randomized algorithm, there exists a stochastic strongly convex problem satisfying Assumptions $^ { l }$ to 3, such that the output $w _ { T }$ after $T$ rounds of communication has expected sub-optimality lower bounded by ",
704
+ "bbox": [
705
+ 173,
706
+ 640,
707
+ 823,
708
+ 683
709
+ ],
710
+ "page_idx": 5
711
+ },
712
+ {
713
+ "type": "equation",
714
+ "img_path": "images/15944ea925ca625bc0c3fb0cf5ed413d2deb8aa7ced28f61f9ba449d3ce641aa.jpg",
715
+ "text": "$$\n\\mathbb { E } [ f ( w _ { T } ) - f ( w ^ { * } ) ] \\geq c _ { 0 } \\frac { \\bar { \\tau } _ { T } \\sigma ^ { 2 } } { \\mu N K T } .\n$$",
716
+ "text_format": "latex",
717
+ "bbox": [
718
+ 385,
719
+ 685,
720
+ 611,
721
+ 719
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "The proof is based on the observation that the number of gradient evaluation can scale inversely with $\\bar { \\tau } _ { T }$ and that the oracle complexity is tight even for centralized stochastic optimization problems. The optimality of the first term in Theorem 5.1 is independent of the distributed or the FL setup. ",
728
+ "bbox": [
729
+ 174,
730
+ 727,
731
+ 823,
732
+ 770
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "The second term in Theorem 5.1 converges at the rate $\\mathcal { O } ( 1 / T ^ { 2 } )$ and consists of three parts, where the first part reflects the slowdown caused by device unavailability through $\\tau _ { \\operatorname* { m a x } , T }$ , the second part shows the effect of multiple $( K > 1 )$ ) local steps, and the third part tells how the initial error decreases. ",
739
+ "bbox": [
740
+ 173,
741
+ 775,
742
+ 826,
743
+ 818
744
+ ],
745
+ "page_idx": 5
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "Remark 5.1. When $\\tau ( t , i ) ~ = ~ 0$ for all $i$ and $t _ { : }$ , our setup reduces to FedAvg with full device pbound $\\bar { \\tau } _ { T } ~ = ~ 0$ d , $\\tau _ { \\mathrm { m a x } , T } ~ = ~ 0$ . Iate $\\begin{array} { r } { \\mathcal { O } \\left( \\frac { \\sigma ^ { 2 } } { \\mu K N T } + \\frac { L ( \\sigma ^ { 2 } / K + D + L ^ { 2 } \\| w _ { 1 } - w _ { * } \\| ^ { 2 } ) } { \\mu ^ { 2 } T ^ { 2 } } \\right) } \\end{array}$ $\\begin{array} { r } { \\mathcal { O } \\bigg ( \\frac { \\sigma ^ { 2 } \\log T } { \\mu K N T } + \\frac { L ( \\sigma ^ { 2 } / K + D ) ( \\log T ) ^ { 2 } } { \\mu ^ { 2 } T ^ { 2 } } + } \\end{array}$ $\\begin{array} { r } { \\mu \\left. w _ { 1 } - w _ { * } \\right. ^ { 2 } \\exp ( - \\frac { \\mu } { 4 8 L } T ) \\Bigr ) } \\end{array}$ in [18] (Thm. V. $B ^ { 2 } = 2 , \\eta _ { g } = 1 ,$ ) up to logarithmic terms. Besides, in the general case, our $\\mathcal { O } ( \\tau _ { \\mathrm { m a x } , T } ^ { 2 } A _ { 1 } / T ^ { 2 } )$ term matches the last term in $I 6 J \\left( C o r . 5 \\right)$ . ",
750
+ "bbox": [
751
+ 173,
752
+ 819,
753
+ 826,
754
+ 915
755
+ ],
756
+ "page_idx": 5
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Remark 5.2. Our analysis relies on the technical assumption that all devices respond in the first round. Intuitively, this is because we need at least one valid stochastic gradient evaluation for each device to get a complete picture of the global objective, or otherwise any update would be biased. In practice, this can be achieved by waiting for the updates from all devices on $w _ { 1 }$ at the very beginning. ",
761
+ "bbox": [
762
+ 173,
763
+ 90,
764
+ 826,
765
+ 147
766
+ ],
767
+ "page_idx": 6
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "5.1 Case Study: i.i.d. Bernoulli participation ",
772
+ "text_level": 1,
773
+ "bbox": [
774
+ 173,
775
+ 164,
776
+ 498,
777
+ 180
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "Though our algorithm can be applied to non-stationary and non-independent response patterns, we show in this subsection that even in the simple i.i.d. Bernoulli participation scenario our algorithm can achieve considerable improvement compared to known algorithms. In particular, we consider a setup where each device becomes active independently with a fixed probability $p _ { i }$ . It serves as the first motivating example towards modeling the participation patterns of devices, and provides a clean view of how the heterogeneity of the device participation influences the Federated optimization algorithms. ",
784
+ "bbox": [
785
+ 173,
786
+ 189,
787
+ 825,
788
+ 287
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "We will show that in this scenario, Assumption 4 holds with high probability, and the terms involving the inactive rounds $\\tau ( t , i )$ in Theorem 5.1 can also be bounded. Furthermore, we theoretically demonstrate that algorithms such as FedAvg [28] and SCAFFOLD [18], which sample $S$ devices for each global update, are more prone to stragglers than our algorithm. ",
795
+ "bbox": [
796
+ 173,
797
+ 292,
798
+ 825,
799
+ 349
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "Definition 5.2. Assume that for all $i \\in [ N ]$ , the i-th device is assigned with a probability $p _ { i }$ . We say the participation of the devices follows i.i.d. Bernoulli participation model with participation probabilities $\\{ p _ { i } \\}$ , if (1). at the first round, all devices are active, and (2). at round $t > 1$ , device $i$ is active with probability $p _ { i }$ , which is independent of the history and other devices. ",
806
+ "bbox": [
807
+ 173,
808
+ 353,
809
+ 825,
810
+ 410
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "Next theorem shows that under i.i.d. Bernoulli participation scenario, with high probability, $\\tau ( t , i )$ only grows logarithmically in $t$ . Also Assumption 4 holds for a mild choice of $t _ { 0 }$ . ",
817
+ "bbox": [
818
+ 174,
819
+ 420,
820
+ 821,
821
+ 450
822
+ ],
823
+ "page_idx": 6
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Theorem 5.2. For i.i.d. Bernoulli participation model defined in Definition 5.2, given any $\\delta > 0$ , with probability at least $1 - \\delta$ , we have the following holds for all $t \\geq 1$ and $i \\in [ N ]$ simultaneously, ",
828
+ "bbox": [
829
+ 171,
830
+ 454,
831
+ 825,
832
+ 483
833
+ ],
834
+ "page_idx": 6
835
+ },
836
+ {
837
+ "type": "equation",
838
+ "img_path": "images/39aa0a52372df38b6d9e71e222db332e84efa7cdb81235ae00a0fb9752de5e1b.jpg",
839
+ "text": "$$\n\\tau ( t , i ) \\leq \\mathcal { O } \\Big ( \\frac { 1 } { p _ { i } } ( \\log ( N t / \\delta ) + 1 ) \\Big ) .\n$$",
840
+ "text_format": "latex",
841
+ "bbox": [
842
+ 382,
843
+ 489,
844
+ 614,
845
+ 522
846
+ ],
847
+ "page_idx": 6
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "Furthermore, $( l )$ . Assumption $^ { 4 }$ holds true $\\begin{array} { r } { \\mathrm { \\ddot { \\it f } } t _ { 0 } = \\Omega \\bigg ( \\frac { 1 } { p _ { m i n } } \\log \\frac { b N } { p _ { m i n } \\delta } \\bigg ) } \\end{array}$ , where $p _ { m i n } = \\operatorname* { m i n } \\{ p _ { i } \\}$ , and $b = 4 0 ( L / \\mu ) ^ { 1 . 5 }$ ;(2). $\\tau _ { \\operatorname* { m a x } , T }$ can be upper bounded as ",
852
+ "bbox": [
853
+ 173,
854
+ 530,
855
+ 825,
856
+ 570
857
+ ],
858
+ "page_idx": 6
859
+ },
860
+ {
861
+ "type": "equation",
862
+ "img_path": "images/922e99211cb7c2d1fd2b59ad614767b49e2270e68185e6f77ea7f51093a5ac80.jpg",
863
+ "text": "$$\n\\tau _ { \\operatorname* { m a x } , T } \\leq \\mathcal { O } \\Big ( \\frac { 1 } { p _ { m i n } } \\cdot \\big ( \\log ( T N / \\delta ) + 1 \\big ) \\Big ) .\n$$",
864
+ "text_format": "latex",
865
+ "bbox": [
866
+ 359,
867
+ 577,
868
+ 637,
869
+ 609
870
+ ],
871
+ "page_idx": 6
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "The next theorem provides a high probability upper bound for $\\bar { \\tau } _ { T }$ . ",
876
+ "bbox": [
877
+ 173,
878
+ 622,
879
+ 606,
880
+ 638
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Theorem 5.3. For i.i.d. Bernoulli participation model defined in Definition 5.2, given any $\\delta > 0$ and $T > 1$ , with probability at least $1 - \\delta$ , we have ",
887
+ "bbox": [
888
+ 173,
889
+ 642,
890
+ 825,
891
+ 671
892
+ ],
893
+ "page_idx": 6
894
+ },
895
+ {
896
+ "type": "equation",
897
+ "img_path": "images/79e3a5996cb3f7b4c46ca91911907e624b79420e705c6142b9338d5386fc6e5b.jpg",
898
+ "text": "$$\n\\bar { \\tau } _ { T } \\leq \\Big ( \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\frac { 1 } { p _ { i } } \\Big ) \\cdot \\mathcal { O } \\Big ( 1 + \\log \\frac { 1 } { \\delta } \\Big ) .\n$$",
899
+ "text_format": "latex",
900
+ "bbox": [
901
+ 377,
902
+ 678,
903
+ 619,
904
+ 722
905
+ ],
906
+ "page_idx": 6
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "By Theorem 5.2 and Theorem 5.3, we conclude that the dominant term of our convergence bound is $\\begin{array} { r } { \\stackrel { \\triangledown } { \\mathcal { O } } \\left( \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\frac { 1 } { p _ { i } } \\cdot \\frac { \\sigma ^ { 2 } } { \\mu N K T } \\right) } \\end{array}$ . Therefore, to achieve $\\epsilon$ accuracy, the dominant term of the number of the required rounds is ",
911
+ "bbox": [
912
+ 173,
913
+ 734,
914
+ 825,
915
+ 785
916
+ ],
917
+ "page_idx": 6
918
+ },
919
+ {
920
+ "type": "equation",
921
+ "img_path": "images/d6f389bee97e0f3555558010eb2588b9917d901810a517b05b4f4f415bf814cb.jpg",
922
+ "text": "$$\nT _ { \\epsilon } ^ { \\left( \\mathrm { M I F A } \\right) } = \\widetilde { \\mathcal { O } } \\Bigl ( \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\frac { 1 } { p _ { i } } \\cdot \\frac { \\sigma ^ { 2 } } { \\mu N K \\epsilon } \\Bigr ) .\n$$",
923
+ "text_format": "latex",
924
+ "bbox": [
925
+ 379,
926
+ 785,
927
+ 617,
928
+ 828
929
+ ],
930
+ "page_idx": 6
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "For both FedAvg and SCAFFOLD that sample $S$ devices uniformly at random, [18] (Thm I. & III.) showed that the dominant term of the number of global updates needed to achieve $\\epsilon$ accuracy is $\\begin{array} { r } { R _ { \\epsilon } = \\widetilde { \\mathcal { O } } \\left( \\frac { \\sigma ^ { 2 } } { \\mu S K \\epsilon } \\right) } \\end{array}$ . Notice that in our setting, to accomplish each global update, the server needs to wait for a few rounds for the $S$ devices to respond. Let $T ( S )$ be the expected rounds for which the server needs to wait for the selected devices $\\boldsymbol { S }$ to be active. Then the expected total rounds to achieve $\\epsilon$ accuracy is $R _ { \\epsilon } \\cdot \\mathbb { E } _ { S } \\left[ T ( S ) \\right]$ . For i.i.d. Bernoulli participation model, we have $\\begin{array} { r } { T ( S ) \\geq \\frac { 1 } { \\operatorname* { m i n } \\{ p _ { i } | i \\in S \\} } } \\end{array}$ , and we can further show that $\\begin{array} { r } { \\mathbb { E } _ { S } \\left[ T ( S ) \\right] \\ge \\frac { 1 } { p _ { m i n } } \\frac { S } { N } } \\end{array}$ ≥ 1p min SN ( see Appendix D.3 for details). Therefore, ",
935
+ "bbox": [
936
+ 173,
937
+ 830,
938
+ 825,
939
+ 912
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "",
946
+ "bbox": [
947
+ 173,
948
+ 89,
949
+ 828,
950
+ 128
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "equation",
956
+ "img_path": "images/4ba801327622edadc3d535bd6d82d30aa8d7d969b43ccdf1e9db7ea55271f48d.jpg",
957
+ "text": "$$\n\\mathbb { E } \\left[ T _ { \\epsilon } ^ { ( \\mathsf { F e d A v g , S C A F F O L D } ) } \\right] \\geq \\frac { S } { N } \\frac { 1 } { p _ { m i n } } \\widetilde { \\mathcal { O } } \\Big ( \\frac { \\sigma ^ { 2 } } { \\mu S K \\epsilon } \\Big ) = \\widetilde { \\mathcal { O } } \\Big ( \\frac { 1 } { p _ { m i n } } \\cdot \\frac { \\sigma ^ { 2 } } { \\mu N K \\epsilon } \\Big ) .\n$$",
958
+ "text_format": "latex",
959
+ "bbox": [
960
+ 267,
961
+ 130,
962
+ 728,
963
+ 164
964
+ ],
965
+ "page_idx": 7
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "By comparing Eqn. 2 and Eqn. 3, we see that both FedAvg and SCAFFOLD are more vulnerable to stragglers, that is, the devices with very small participation probabilities; on the contrary, the convergence rate of MIFA only depends on the average of $1 / p _ { i }$ instead of $1 / p _ { m i n }$ . We also provide empirical experiments showing that MIFA converges faster than FedAvg in Section 7. ",
970
+ "bbox": [
971
+ 173,
972
+ 165,
973
+ 825,
974
+ 222
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "6 Convergence result for non-convex objective functions ",
981
+ "text_level": 1,
982
+ "bbox": [
983
+ 173,
984
+ 238,
985
+ 656,
986
+ 256
987
+ ],
988
+ "page_idx": 7
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "In this section, we present the convergence guarantee of MIFA for the non-convex case. First we list the additional assumptions as below. ",
993
+ "bbox": [
994
+ 173,
995
+ 268,
996
+ 823,
997
+ 297
998
+ ],
999
+ "page_idx": 7
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Assumption 5 (Hessian Lipschitz). $f _ { 1 } , \\cdots , f _ { N }$ are all $\\rho$ -Hessian Lipschitz: for all $w$ and $v$ $\\bigl \\| \\nabla ^ { 2 } f _ { i } \\bigl ( \\tilde { \\boldsymbol { w } } \\bigr ) - \\nabla ^ { 2 } f _ { i } ( \\boldsymbol { v } ) \\bigr \\| \\leq \\dot { \\rho } \\bigl \\| \\boldsymbol { w } - \\boldsymbol { \\tilde { v } } \\bigr \\|$ . ",
1004
+ "bbox": [
1005
+ 176,
1006
+ 299,
1007
+ 825,
1008
+ 329
1009
+ ],
1010
+ "page_idx": 7
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Assumption 6 (Bounded noise). The noise of the local stochastic gradients is upper bounded by $a$ constant $\\delta$ almost surely: $\\begin{array} { r } { \\left\\| \\tilde { \\nabla } f _ { i } ( w ) - \\nabla f _ { i } ( w ) \\right\\| \\le \\delta a . s . , \\forall i \\in [ N ] } \\end{array}$ . ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 330,
1018
+ 823,
1019
+ 368
1020
+ ],
1021
+ "page_idx": 7
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Assand y). There exist . Furthermore, $\\alpha > 0$ anfine $\\beta _ { i } > 0$ at for all . $w$ $\\in [ N ] \\colon \\left\\| \\nabla f _ { i } ( w ) \\right\\| ^ { 2 } \\leq \\alpha \\left\\| \\nabla f ( w ) \\right\\| ^ { 2 } + \\beta _ { i }$ $\\begin{array} { r } { \\beta = \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\beta _ { i } } \\end{array}$ ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 369,
1029
+ 823,
1030
+ 402
1031
+ ],
1032
+ "page_idx": 7
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Assumption 8. There exists a constant $\\nu _ { i }$ such that $\\tau ( t , i ) \\ \\leq \\ \\nu _ { i }$ , for all $i \\in [ N ]$ and $t \\geq 1$ Furthermore, define ν¯ = 1N PNi=1 νi and νmax = maxi∈[N] νi. ",
1037
+ "bbox": [
1038
+ 173,
1039
+ 404,
1040
+ 821,
1041
+ 438
1042
+ ],
1043
+ "page_idx": 7
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "The analysis of non-convex functions is much more technically involved, and our results rely on strong assumptions that provide a finer control of the gradient difference (Assumption 5), gradient noise (Assumption 6), gradient dissimilarity among devices (Assumption 7), and device unavailability (Assumption 8). We remark that Assumption 5 is also made in [9, 16], and Assumption 7 is also made in [18, 39]. We leave it as future work to study whether and how MIFA converges for non-convex functions with weaker assumptions. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 443,
1051
+ 825,
1052
+ 526
1053
+ ],
1054
+ "page_idx": 7
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Theorem 6.1. Assume that Assumptions $I , ~ 2 , ~$ , and $^ { 5 }$ to 7 hold. Further assume that the device availability sequence $\\tau ( t , i )$ satisfies Assumption 8 and $\\tau ( 1 , i ) = 0$ for all $i \\in [ N ]$ . By using $a$ learning rate η = q $\\begin{array} { r } { \\eta = \\sqrt { \\frac { N } { K T L \\left( 1 + \\bar { \\nu } \\right) } } } \\end{array}$ NKT L(1+¯ν), for T ≥ max{32αLNK, 16LNK , 8KNν2max(L2+ρδ) }, after T − 1 communication rounds, MIFA satisfies: ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 529,
1062
+ 826,
1063
+ 594
1064
+ ],
1065
+ "page_idx": 7
1066
+ },
1067
+ {
1068
+ "type": "equation",
1069
+ "img_path": "images/2ffd78cf10bfd3d236632f49cd6b6cd64bc3d08d3e2f60866f445ed97510c80b.jpg",
1070
+ "text": "$$\n\\operatorname* { m i n } _ { 1 \\leq t \\leq T } \\mathbb { E } _ { \\xi } \\left[ \\left\\| \\nabla f ( w _ { t } ) \\right\\| ^ { 2 } \\right] = \\mathcal { O } \\left( \\sqrt { \\frac { ( 1 + \\bar { \\nu } ) L } { T K N } } ( f ( w _ { 1 } ) - f ^ { * } + \\sigma ^ { 2 } ) + \\frac { A _ { 4 } + A _ { 5 } } { T } \\right) ,\n$$",
1071
+ "text_format": "latex",
1072
+ "bbox": [
1073
+ 236,
1074
+ 597,
1075
+ 759,
1076
+ 638
1077
+ ],
1078
+ "page_idx": 7
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "where $f ^ { * }$ is the optimal value, and: ",
1083
+ "bbox": [
1084
+ 174,
1085
+ 640,
1086
+ 406,
1087
+ 655
1088
+ ],
1089
+ "page_idx": 7
1090
+ },
1091
+ {
1092
+ "type": "equation",
1093
+ "img_path": "images/068374b3ecfcb8e112e697b4b2961eec732c2ae914494131485a106df94ed394.jpg",
1094
+ "text": "$$\n\\begin{array} { l } { { A _ { 4 } = N K L \\left( \\alpha \\sigma ^ { 2 } \\hat { \\nu } + \\frac { \\sigma ^ { 2 } \\nu _ { \\mathrm { m a x } } } { \\sqrt { K N } } + \\sigma \\nu _ { \\mathrm { m a x } } \\sqrt { \\beta } \\right) + \\frac { { ( L ^ { 2 } + \\rho \\delta ) \\sigma ^ { 2 } \\nu _ { \\mathrm { m a x } } } } { L } , } } \\\\ { { A _ { 5 } = \\frac { { ( K - 1 ) N L ( \\beta + \\sigma ^ { 2 } / K ) } } { \\hat { \\nu } + 1 } . } } \\end{array}\n$$",
1095
+ "text_format": "latex",
1096
+ "bbox": [
1097
+ 269,
1098
+ 656,
1099
+ 727,
1100
+ 727
1101
+ ],
1102
+ "page_idx": 7
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Next, we show that the leading $\\mathcal { O } ( 1 / \\sqrt { T } )$ term is theoretically optimal for zero-respecting algorithms. ",
1107
+ "bbox": [
1108
+ 171,
1109
+ 733,
1110
+ 825,
1111
+ 751
1112
+ ],
1113
+ "page_idx": 7
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Proposition 6.1. Let $c _ { 0 } > 0$ be a universal constant. For any randomized zero-respecting algorithm, there exists a stochastic non-convex problem satisfying Assumption1, 2, 5 and 7, such that the output $w _ { T }$ after $T$ rounds of communication has expected sub-optimality lower bounded by ",
1118
+ "bbox": [
1119
+ 173,
1120
+ 752,
1121
+ 825,
1122
+ 795
1123
+ ],
1124
+ "page_idx": 7
1125
+ },
1126
+ {
1127
+ "type": "equation",
1128
+ "img_path": "images/ca9299cdc027e71b6e299a9e1e31a7cd5c2809df369d439bba1b7aba2e00a1ef.jpg",
1129
+ "text": "$$\n\\mathbb { E } [ \\| \\nabla f ( w _ { T } ) \\| ^ { 2 } ] \\ge \\mathbb { E } [ \\| \\nabla f ( w _ { T } ) \\| ] ^ { 2 } \\ge c _ { 0 } \\sqrt { \\frac { \\bar { \\nu } L \\sigma ^ { 2 } ( f ( w _ { 0 } ) - f ^ { * } ) } { N K T } } .\n$$",
1130
+ "text_format": "latex",
1131
+ "bbox": [
1132
+ 289,
1133
+ 796,
1134
+ 707,
1135
+ 830
1136
+ ],
1137
+ "page_idx": 7
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "The above proposition show that when $\\sigma \\sqrt { ( f ( w _ { 0 } ) - f ^ { * } ) } \\sim \\sigma ^ { 2 } + ( f ( w _ { 0 } ) - f ^ { * } )$ , the result in Theorem 6.1 is tight. However, note that the counter example we used requires the quantity $\\delta$ in Assumption 6 to scale with $T$ , hence requiring $\\delta$ to be large enough. This does not change the optimality of the first term as the first term is independent of $\\delta$ . Whether this requirement can be relaxed is left as an open problem. ",
1142
+ "bbox": [
1143
+ 173,
1144
+ 840,
1145
+ 825,
1146
+ 912
1147
+ ],
1148
+ "page_idx": 7
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Remark 6.1. When all $\\nu _ { i } = 0$ (i.e. all the devices are active), our convergence bound reduces to $\\begin{array} { r } { \\mathcal { O } \\Big ( \\sqrt { \\frac { L } { T K N } } ( f ( w _ { 1 } ) - f ^ { * } + \\sigma ^ { 2 } ) + \\frac { ( K - 1 ) N L ( \\beta + \\sigma ^ { 2 } / K ) } { T } \\Big ) } \\end{array}$ . This matches the result in [42] (Thm. 1, $\\begin{array} { r } { \\eta = 1 , \\eta _ { L } = \\sqrt { \\frac { N } { K T L } } ) } \\end{array}$ . ",
1153
+ "bbox": [
1154
+ 173,
1155
+ 90,
1156
+ 826,
1157
+ 155
1158
+ ],
1159
+ "page_idx": 8
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "7 Numerical Experiments ",
1164
+ "text_level": 1,
1165
+ "bbox": [
1166
+ 174,
1167
+ 171,
1168
+ 405,
1169
+ 189
1170
+ ],
1171
+ "page_idx": 8
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "In this section, we conduct numerical experiments3. to verify our theoretical results and investigate how the heterogeneity of the device availability influences the Federated optimization algorithms. We compare the performance of the following four algorithms: FedAvg with importance sampling (FedAvg-IS), Biased FedAvg, FedAvg with device sampling, and our proposed MIFA. For the detailed discussions of the algorithms, we refer the readers to Sections 3 and 4. We remark that for a fair comparison, we deliberately include the first few rounds that MIFA needs to wait to receive responses from all devices for initializing the update-array $\\{ G ^ { i } \\}$ . ",
1176
+ "bbox": [
1177
+ 173,
1178
+ 202,
1179
+ 825,
1180
+ 300
1181
+ ],
1182
+ "page_idx": 8
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Following [26, 25], we construct non-i.i.d. datasets from two commonly used computer vision datasets — MNIST [23] and CIFAR-10 [22] . Specifically, we divide the data into $N = 1 0 0$ devices with each device holding samples of only two classes, which creates a high level of data heterogeneity. For simplicity, we ensure that each device holds the same number of samples. We do not use any data augmentation. We use multinomial logistic regression as the convex model and LeNet-5 [24] with ReLU activations as the non-convex model. For all experiments, we use weight decay in the training process, which corresponds to adding $\\ell _ { 2 }$ penalty. We use logistic models for MNIST dataset, while we use LeNet-5 for CIFAR-10. Our code is adapted from [26], which is under MIT License. ",
1187
+ "bbox": [
1188
+ 174,
1189
+ 305,
1190
+ 825,
1191
+ 416
1192
+ ],
1193
+ "page_idx": 8
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "We model the availability of the devices as independent Bernoulli random trials. The $i \\cdot$ -th device is assigned with a probability $p _ { i }$ , where at each time step, the device becomes active with probability $p _ { i }$ . In our experiments, the $p _ { i }$ ’s are chosen such that devices holding data of smaller labels participate less frequently. Specifically, if the $i$ -th device holds the data of label $j$ and $k$ , we set $\\bar { p } _ { i } = \\bar { p _ { \\operatorname* { m i n } } } \\operatorname* { m i n } ( j , k ) / 9 + \\bar { ( 1 - p _ { \\operatorname* { m i n } } ) }$ , where $p _ { \\mathrm { m i n } }$ controls the lower bound of the participation probabilities. The correlation between the participation patterns and local datasets increases the difficulty of the problem [17]. To investigate this phenomenon, we repeat the experiments for $p _ { \\mathrm { m i n } } = 0 . 1$ and 0.2. We control the randomness of device participation when testing different algorithms. ",
1198
+ "bbox": [
1199
+ 173,
1200
+ 422,
1201
+ 825,
1202
+ 534
1203
+ ],
1204
+ "page_idx": 8
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "In all the experiments, we set the initial learning rate to be $\\eta _ { 0 } = 0 . 1$ and decay the learning rate as $\\begin{array} { r } { \\eta _ { t } = \\eta _ { 0 } \\cdot \\frac { 1 } { t } } \\end{array}$ . We set the weight decay to be 0.001. The local batch size is 100 and each local update consists of 2 epochs. Therefore, the actual number of local steps $K$ depends on the size of the dataset. We run all the experiments with 4 GPUs of type GeForce RTX 2080 Ti. We repeat the experiments for 5 different random seeds, and all of the experiments exhibit similar training curves. We report the averaged training loss and test accuracy with error bars in Figure 2. ",
1209
+ "bbox": [
1210
+ 173,
1211
+ 540,
1212
+ 825,
1213
+ 623
1214
+ ],
1215
+ "page_idx": 8
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "We observe that FedAvg with device sampling (FedAvg ( $S = 5 0$ ) and FedAvg $S = 1 0 0$ ) in Figure 2) is severely influenced by the straggling devices and makes progress relatively slowly compared to the other algorithms. Although biased FedAvg converges fast at the beginning, this simple algorithm is biased, and the optimality gaps are prominent for the harder CIFAR-10 dataset and when $p _ { \\mathrm { m i n } }$ is small. On the contrary, our proposed MIFA avoids waiting for stragglers, converges fast without bias, and is competitive with FedAvg with importance sampling, which requires knowledge of the participation probabilities. We refer the readers to Appendix G for additional experiments on CIFAR-10. ",
1220
+ "bbox": [
1221
+ 173,
1222
+ 628,
1223
+ 825,
1224
+ 727
1225
+ ],
1226
+ "page_idx": 8
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "8 Conclusions and Discussions ",
1231
+ "text_level": 1,
1232
+ "bbox": [
1233
+ 174,
1234
+ 744,
1235
+ 444,
1236
+ 762
1237
+ ],
1238
+ "page_idx": 8
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "In this paper, we study FL algorithms in the presence of arbitrary device unavailability and propose MIFA, which avoids waiting for straggling devices and re-uses the memorized latest updates as the surrogate when the device is unavailable. We theoretically analyze MIFA without any structural assumptions on the device availability and prove the convergence for strongly convex and non-convex smooth functions. Different from the literature that studies oracle complexity in terms of stochastic gradient evaluations, we argue that in federated learning system, the bottleneck lies in the nonstationary and possibly adversarial pattern of device participation. Therefore, it is important to study how the number of inactive rounds influences the convergence rate. In Theorem 5.1, the dependency upon $\\tau _ { \\operatorname* { m a x } , T }$ might be an artifact of our analysis, and a future direction is to study whether we can remove this dependency. Another important direction is to analyze algorithms for non-convex functions under weaker assumptions. ",
1243
+ "bbox": [
1244
+ 173,
1245
+ 776,
1246
+ 825,
1247
+ 887
1248
+ ],
1249
+ "page_idx": 8
1250
+ },
1251
+ {
1252
+ "type": "image",
1253
+ "img_path": "images/c1142e9ecbf7a3052e86380ac3f4c818747910b17c29f238aaf9134bafeb112a.jpg",
1254
+ "image_caption": [
1255
+ "Figure 2: Training losses and test accuracies. Fig. 2(a)–2(d): logistic models on non-iid MNIST. Fig. 2(e)–2(h): LeNet-5 on non-iid CIFAR-10. FedAvg $S = 5 0$ ) and FedAvg $S = 1 0 0$ ) refer to FedAvg with device sampling that samples $S$ devices for each global update. FedAvg-IS is short for FedAvg with importance sampling, which requires knowledge of the participation probabilities. "
1256
+ ],
1257
+ "image_footnote": [],
1258
+ "bbox": [
1259
+ 178,
1260
+ 80,
1261
+ 818,
1262
+ 316
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "",
1269
+ "bbox": [
1270
+ 174,
1271
+ 398,
1272
+ 825,
1273
+ 440
1274
+ ],
1275
+ "page_idx": 9
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Acknowledgments and Disclosure of Funding ",
1280
+ "text_level": 1,
1281
+ "bbox": [
1282
+ 174,
1283
+ 459,
1284
+ 553,
1285
+ 478
1286
+ ],
1287
+ "page_idx": 9
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "The work of Xinran Gu and Longbo Huang is supported in part by the Technology and Innovation Major Project of the Ministry of Science and Technology of China under Grant 2020AAA0108400 and2020AAA0108403. Xinran Gu would like to thank Kaifeng Lyu for the discussion on the convergence analysis. The authors would like to thank Sai Praneeth Karimireddy for the discussion on the problem settings. ",
1292
+ "bbox": [
1293
+ 174,
1294
+ 491,
1295
+ 825,
1296
+ 560
1297
+ ],
1298
+ "page_idx": 9
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "References ",
1303
+ "text_level": 1,
1304
+ "bbox": [
1305
+ 174,
1306
+ 580,
1307
+ 266,
1308
+ 597
1309
+ ],
1310
+ "page_idx": 9
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "[1] Alekh Agarwal and John C Duchi. Distributed delayed stochastic optimization. In 2012 IEEE 51st IEEE Conference on Decision and Control (CDC), pages 5451–5452. IEEE, 2012. \n[2] Alekh Agarwal, Martin J Wainwright, Peter Bartlett, and Pradeep Ravikumar. Informationtheoretic lower bounds on the oracle complexity of convex optimization. Advances in Neural Information Processing Systems, 22:1–9, 2009. \n[3] Yossi Arjevani, Yair Carmon, John C. Duchi, Dylan J. Foster, Nathan Srebro, and Blake Woodworth. Lower bounds for non-convex stochastic optimization, 2019. \n[4] Yossi Arjevani, Ohad Shamir, and Nathan Srebro. A tight convergence analysis for stochastic gradient descent with delayed updates. In Algorithmic Learning Theory, pages 111–132. PMLR, 2020. \n[5] Arda Aytekin, Hamid Reza Feyzmahdavian, and Mikael Johansson. Analysis and implementation of an asynchronous optimization algorithm for the parameter server. arXiv preprint arXiv:1610.05507, 2016. \n[6] Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-sgd: Distributed sgd with quantization, sparsification, and local computations. arXiv preprint arXiv:1906.02367, 2019. \n[7] Keith Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex Ingerman, Vladimir Ivanov, Chloé Kiddon, Jakub Konecný, Stefano Mazzocchi, Brendan McMahan, Timon ˇ ",
1315
+ "bbox": [
1316
+ 179,
1317
+ 603,
1318
+ 828,
1319
+ 912
1320
+ ],
1321
+ "page_idx": 9
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Van Overveldt, David Petrou, Daniel Ramage, and Jason Roselander. Towards federated learning at scale: System design. In A. Talwalkar, V. Smith, and M. Zaharia, editors, Proceedings of Machine Learning and Systems, volume 1, pages 374–388, 2019. ",
1326
+ "bbox": [
1327
+ 205,
1328
+ 90,
1329
+ 825,
1330
+ 133
1331
+ ],
1332
+ "page_idx": 10
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "[8] Sébastien Bubeck, Nicolo Cesa-Bianchi, and Gábor Lugosi. Bandits with heavy tail. IEEE Transactions on Information Theory, 59(11):7711–7717, 2013. ",
1337
+ "bbox": [
1338
+ 179,
1339
+ 141,
1340
+ 823,
1341
+ 171
1342
+ ],
1343
+ "page_idx": 10
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "[9] Yair Carmon, John C Duchi, Oliver Hinder, and Aaron Sidford. Accelerated methods for nonconvex optimization. SIAM Journal on Optimization, 28(2):1751–1772, 2018. ",
1348
+ "bbox": [
1349
+ 179,
1350
+ 178,
1351
+ 823,
1352
+ 208
1353
+ ],
1354
+ "page_idx": 10
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "[10] Hubert Eichner, Tomer Koren, Brendan McMahan, Nathan Srebro, and Kunal Talwar. Semicyclic stochastic gradient descent. In International Conference on Machine Learning, pages 1764–1773. PMLR, 2019. ",
1359
+ "bbox": [
1360
+ 174,
1361
+ 215,
1362
+ 825,
1363
+ 258
1364
+ ],
1365
+ "page_idx": 10
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "[11] Hamid Reza Feyzmahdavian, Arda Aytekin, and Mikael Johansson. An asynchronous minibatch algorithm for regularized stochastic optimization. IEEE Transactions on Automatic Control, 61(12):3740–3754, 2016. ",
1370
+ "bbox": [
1371
+ 173,
1372
+ 266,
1373
+ 825,
1374
+ 309
1375
+ ],
1376
+ "page_idx": 10
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "[12] Saeed Ghadimi and Guanghui Lan. Optimal stochastic approximation algorithms for strongly convex stochastic composite optimization i: A generic algorithmic framework. SIAM Journal on Optimization, 22(4):1469–1492, 2012. ",
1381
+ "bbox": [
1382
+ 173,
1383
+ 316,
1384
+ 823,
1385
+ 359
1386
+ ],
1387
+ "page_idx": 10
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "[13] Margalit Glasgow and Mary Wootters. Asynchronous distributed optimization with stochastic delays. arXiv preprint arXiv:2009.10717, 2020. ",
1392
+ "bbox": [
1393
+ 171,
1394
+ 367,
1395
+ 825,
1396
+ 396
1397
+ ],
1398
+ "page_idx": 10
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "[14] Eduard Gorbunov, Konstantin P. Burlachenko, Zhize Li, and Peter Richtarik. Marina: Faster non-convex distributed learning with compression. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 3788–3798. PMLR, 18–24 Jul 2021. ",
1403
+ "bbox": [
1404
+ 173,
1405
+ 404,
1406
+ 826,
1407
+ 460
1408
+ ],
1409
+ "page_idx": 10
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "[15] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019. ",
1414
+ "bbox": [
1415
+ 171,
1416
+ 468,
1417
+ 823,
1418
+ 497
1419
+ ],
1420
+ "page_idx": 10
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "[16] Chi Jin, Rong Ge, Praneeth Netrapalli, Sham M Kakade, and Michael I Jordan. How to escape saddle points efficiently. In International Conference on Machine Learning, pages 1724–1732. PMLR, 2017. ",
1425
+ "bbox": [
1426
+ 174,
1427
+ 505,
1428
+ 823,
1429
+ 547
1430
+ ],
1431
+ "page_idx": 10
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "[17] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. ",
1436
+ "bbox": [
1437
+ 173,
1438
+ 555,
1439
+ 826,
1440
+ 612
1441
+ ],
1442
+ "page_idx": 10
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "[18] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning, pages 5132–5143. PMLR, 2020. ",
1447
+ "bbox": [
1448
+ 171,
1449
+ 619,
1450
+ 821,
1451
+ 664
1452
+ ],
1453
+ "page_idx": 10
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "[19] Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local sgd on identical and heterogeneous data. In International Conference on Artificial Intelligence and Statistics, pages 4519–4529. PMLR, 2020. ",
1458
+ "bbox": [
1459
+ 171,
1460
+ 670,
1461
+ 823,
1462
+ 713
1463
+ ],
1464
+ "page_idx": 10
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "[20] Jakub Konecnˇ y, Brendan McMahan, and Daniel Ramage. Federated optimization: Distributed \\` optimization beyond the datacenter. arXiv preprint arXiv:1511.03575, 2015. ",
1469
+ "bbox": [
1470
+ 171,
1471
+ 720,
1472
+ 821,
1473
+ 751
1474
+ ],
1475
+ "page_idx": 10
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "[21] Jakub Konecnˇ y, H Brendan McMahan, Daniel Ramage, and Peter Richtárik. Federated optimiza- \\` tion: Distributed machine learning for on-device intelligence. arXiv preprint arXiv:1610.02527, 2016. ",
1480
+ "bbox": [
1481
+ 173,
1482
+ 758,
1483
+ 823,
1484
+ 801
1485
+ ],
1486
+ "page_idx": 10
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "[22] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. ",
1491
+ "bbox": [
1492
+ 173,
1493
+ 809,
1494
+ 823,
1495
+ 838
1496
+ ],
1497
+ "page_idx": 10
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "[23] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1502
+ "bbox": [
1503
+ 173,
1504
+ 845,
1505
+ 823,
1506
+ 876
1507
+ ],
1508
+ "page_idx": 10
1509
+ },
1510
+ {
1511
+ "type": "text",
1512
+ "text": "[24] Yann LeCun et al. Lenet-5, convolutional neural networks. URL: http://yann. lecun. com/exdb/lenet, 20(5):14, 2015. ",
1513
+ "bbox": [
1514
+ 171,
1515
+ 882,
1516
+ 825,
1517
+ 911
1518
+ ],
1519
+ "page_idx": 10
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "[25] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. In I. Dhillon, D. Papailiopoulos, and V. Sze, editors, Proceedings of Machine Learning and Systems, volume 2, pages 429–450, 2020. \n[26] Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. In International Conference on Learning Representations, 2020. \n[27] Xiangru Lian, Yijun Huang, Yuncheng Li, and Ji Liu. Asynchronous parallel stochastic gradient for nonconvex optimization. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc., 2015. \n[28] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pages 1273–1282. PMLR, 2017. \n[29] Arkadij Semenovic Nemirovskij and David Borisovich Yudin. Problem complexity and method ˇ efficiency in optimization. 1983. \n[30] Constantin Philippenko and Aymeric Dieuleveut. Bidirectional compression in heterogeneous settings for distributed or federated learning with partial participation: tight convergence guarantees. arXiv preprint arXiv:2006.14591, 2020. \n[31] Amirhossein Reisizadeh, Isidoros Tziotis, Hamed Hassani, Aryan Mokhtari, and Ramtin Pedarsani. Straggler-resilient federated learning: Leveraging the interplay between statistical accuracy and system heterogeneity. arXiv preprint arXiv:2012.14453, 2020. \n[32] Yichen Ruan, Xiaoxi Zhang, Shu-Che Liang, and Carlee Joe-Wong. Towards flexible device participation in federated learning. In International Conference on Artificial Intelligence and Statistics, pages 3403–3411. PMLR, 2021. \n[33] Felix Sattler, Simon Wiedemann, Klaus-Robert Müller, and Wojciech Samek. Robust and communication-efficient federated learning from non-iid data. IEEE transactions on neural networks and learning systems, 31(9):3400–3413, 2019. \n[34] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet Talwalkar. Federated multi-task learning. arXiv preprint arXiv:1705.10467, 2017. \n[35] Sebastian U Stich and Sai Praneeth Karimireddy. The error-feedback framework: Better rates for sgd with delayed gradients and compressed updates. Journal of Machine Learning Research, 21:1–36, 2020. \n[36] Sebastian Urban Stich. Local sgd converges fast and communicates little. In ICLR 2019- International Conference on Learning Representations, number CONF, 2019. \n[37] Roman Vershynin. High-dimensional probability: An introduction with applications in data science, volume 47. Cambridge university press, 2018. \n[38] Jianyu Wang and Gauri Joshi. Cooperative sgd: A unified framework for the design and analysis of communication-efficient sgd algorithms. In ICML Workshop on Coding Theory for Machine Learning, 2019. \n[39] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. Advances in Neural Information Processing Systems, 33, 2020. \n[40] Cong Xie, Sanmi Koyejo, and Indranil Gupta. Asynchronous federated optimization. arXiv preprint arXiv:1903.03934, 2019. \n[41] Yikai Yan, Chaoyue Niu, Yucheng Ding, Zhenzhe Zheng, Fan Wu, Guihai Chen, Shaojie Tang, and Zhihua Wu. Distributed non-convex optimization with sublinear speedup under intermittent client availability. arXiv preprint arXiv:2002.07399, 2020. \n[42] Haibo Yang, Minghong Fang, and Jia Liu. Achieving linear speedup with partial worker participation in non-iid federated learning. arXiv preprint arXiv:2101.11203, 2021. \n[43] Hao Yu, Rong Jin, and Sen Yang. On the linear speedup analysis of communication efficient momentum sgd for distributed non-convex optimization. In International Conference on Machine Learning, pages 7184–7193. PMLR, 2019. \n[44] Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim, Sashank J Reddi, Sanjiv Kumar, and Suvrit Sra. Why are adaptive methods good for attention models?, 2020. \n[45] Xin Zhang, Jia Liu, and Zhengyuan Zhu. Taming convergence for asynchronous stochastic gradient descent with unbounded delay in non-convex learning. In 2020 59th IEEE Conference on Decision and Control (CDC), pages 3580–3585. IEEE, 2020. ",
1524
+ "bbox": [
1525
+ 171,
1526
+ 45,
1527
+ 828,
1528
+ 921
1529
+ ],
1530
+ "page_idx": 11
1531
+ },
1532
+ {
1533
+ "type": "text",
1534
+ "text": "",
1535
+ "bbox": [
1536
+ 173,
1537
+ 90,
1538
+ 826,
1539
+ 220
1540
+ ],
1541
+ "page_idx": 12
1542
+ },
1543
+ {
1544
+ "type": "text",
1545
+ "text": "Checklist ",
1546
+ "text_level": 1,
1547
+ "bbox": [
1548
+ 174,
1549
+ 242,
1550
+ 254,
1551
+ 258
1552
+ ],
1553
+ "page_idx": 12
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "1. For all authors... ",
1558
+ "bbox": [
1559
+ 214,
1560
+ 268,
1561
+ 339,
1562
+ 281
1563
+ ],
1564
+ "page_idx": 12
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Section 8. \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] Our work is mainly theoretical and targets at providing theoretical analysis of the FL algorithms, which has almost no negative societal impacts. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1569
+ "bbox": [
1570
+ 238,
1571
+ 285,
1572
+ 825,
1573
+ 402
1574
+ ],
1575
+ "page_idx": 12
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "2. If you are including theoretical results... ",
1580
+ "bbox": [
1581
+ 214,
1582
+ 405,
1583
+ 493,
1584
+ 420
1585
+ ],
1586
+ "page_idx": 12
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] The assumptions are rigorously stated in Section 5 and Section 6. \n(b) Did you include complete proofs of all theoretical results? [Yes] All the proofs are deferred to the appendix. ",
1591
+ "bbox": [
1592
+ 238,
1593
+ 422,
1594
+ 825,
1595
+ 481
1596
+ ],
1597
+ "page_idx": 12
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "3. If you ran experiments... ",
1602
+ "bbox": [
1603
+ 214,
1604
+ 484,
1605
+ 393,
1606
+ 498
1607
+ ],
1608
+ "page_idx": 12
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Our code will be included in the supplemental material. The datasets we use are public. The instructions needed to reproduce the main experimental results are clearly stated in Section 7. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 7. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Section 7. \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 7. ",
1613
+ "bbox": [
1614
+ 238,
1615
+ 503,
1616
+ 825,
1617
+ 645
1618
+ ],
1619
+ "page_idx": 12
1620
+ },
1621
+ {
1622
+ "type": "text",
1623
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1624
+ "bbox": [
1625
+ 215,
1626
+ 650,
1627
+ 823,
1628
+ 664
1629
+ ],
1630
+ "page_idx": 12
1631
+ },
1632
+ {
1633
+ "type": "text",
1634
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] See Section 7. \n(b) Did you mention the license of the assets? [Yes] See Section 7. \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We include our code for reproducing the experiments in the supplemental material. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] We choose the commonly-used MNIST and CIFAR-10 datasets. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] We choose the commonly-used MNIST and CIFAR-10 datasets. ",
1635
+ "bbox": [
1636
+ 238,
1637
+ 667,
1638
+ 825,
1639
+ 797
1640
+ ],
1641
+ "page_idx": 12
1642
+ },
1643
+ {
1644
+ "type": "text",
1645
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1646
+ "bbox": [
1647
+ 214,
1648
+ 803,
1649
+ 705,
1650
+ 816
1651
+ ],
1652
+ "page_idx": 12
1653
+ },
1654
+ {
1655
+ "type": "text",
1656
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1657
+ "bbox": [
1658
+ 238,
1659
+ 820,
1660
+ 825,
1661
+ 909
1662
+ ],
1663
+ "page_idx": 12
1664
+ }
1665
+ ]
parse/train/1_gaHBaRYt/1_gaHBaRYt_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/1_gaHBaRYt/1_gaHBaRYt_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7R7fAoUygoa/7R7fAoUygoa.md ADDED
@@ -0,0 +1,698 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OPTIMAL REGULARIZATION CAN MITIGATE DOUBLE DESCENT
2
+
3
+ Preetum Nakkiran
4
+ Harvard University
5
+ preetum@cs.harvard.edu
6
+ Prayaag Venkat
7
+ Harvard University
8
+ pvenkat@g.harvard.edu
9
+
10
+ # Sham Kakade
11
+
12
+ Microsoft Research & University of Washington sham@cs.washington.edu
13
+
14
+ Tengyu Ma
15
+ Stanford University
16
+ tengyuma@stanford.edu
17
+
18
+ # ABSTRACT
19
+
20
+ Recent empirical and theoretical studies have shown that many learning algorithms – from linear regression to neural networks – can have test performance that is non-monotonic in quantities such the sample size and model size. This striking phenomenon, often referred to as “double descent”, has raised questions of if we need to re-think our current understanding of generalization. In this work, we study whether the double-descent phenomenon can be avoided by using optimal regularization. Theoretically, we prove that for certain linear regression models with isotropic data distribution, optimally-tuned $\ell _ { 2 }$ regularization achieves monotonic test performance as we grow either the sample size or the model size. We also demonstrate empirically that optimally-tuned $\ell _ { 2 }$ regularization can mitigate double descent for more general models, including neural networks. Our results suggest that it may also be informative to study the test risk scalings of various algorithms in the context of appropriately tuned regularization.
21
+
22
+ # 1 INTRODUCTION
23
+
24
+ Recent works have demonstrated a ubiquitous “double descent” phenomenon present in a range of machine learning models, including decision trees, random features, linear regression, and deep neural networks (Opper, 1995; 2001; Advani & Saxe, 2017; Spigler et al., 2018; Belkin et al., 2018; Geiger et al., 2019b; Nakkiran et al., 2020; Belkin et al., 2019; Hastie et al., 2019; Bartlett et al., 2019; Muthukumar et al., 2019; Bibas et al., 2019; Mitra, 2019; Mei & Montanari, 2019; Liang & Rakhlin, 2018; Liang et al., 2019; Xu & Hsu, 2019; Derezinski et al., 2019; Lampinen & Ganguli, ´ 2018; Deng et al., 2019; Nakkiran, 2019). The phenomenon is that models exhibit a peak of high test risk when they are just barely able to fit the train set, that is, to interpolate. For example, as we increase the size of models, test risk first decreases, then increases to a peak around when effective model size is close to the training data size, and then decreases again in the overparameterized regime. Also surprising is that Nakkiran et al. (2020) observe a double descent as we increase sample size, i.e. for a fixed model, training the model with more data can hurt test performance.
25
+
26
+ These striking observations highlight a potential gap in our understanding of generalization and an opportunity for improved methods. Ideally, we seek to use learning algorithms which robustly improve performance as the data or model size grow and do not exhibit such unexpected nonmonotonic behaviors. In other words, we aim to improve the test performance in situations which would otherwise exhibit high test risk due to double descent. Here, a natural strategy would be to use a regularizer and tune its strength on a validation set. This motivates the central question of this work:
27
+
28
+ When does optimally tuned regularization mitigate or remove the double-descent phenomenon?
29
+
30
+ Another motivation is the fact that double descent is largely observed for unregularized or under regularized models in practice. As an example, Figure 1 shows a simple linear ridge regression setting in which the unregularized estimator exhibits double descent, but an optimally-tuned regularizer has monotonic test performance.
31
+
32
+ ![](images/b5edb5b47ed8f04264d90917cb098c4913b1a417a4d6db231609364ffb35c0c9.jpg)
33
+ Figure 1: Test Risk vs. Num. Samples for Isotropic Ridge Regression in $d \_ =$ 500 dimensions. Unregularized regression is non-monotonic in samples, but optimallyregularized regression $( \lambda = \lambda _ { o p t } )$ is monotonic. In this setting, the optimal regularizer $\lambda _ { o p t }$ does not depend on number of samples $n$ (Lemma 2), but this is not always true – see Figure 2.
34
+
35
+ Our Contributions: We study this question from both a theoretical and empirical perspective. Theoretically, we start with the setting of high-dimensional linear regression. Linear regression is a sensible starting point to study these questions, since it already exhibits many of the qualitative features of double descent in more complex models (e.g. Belkin et al. (2019); Hastie et al. (2019) and further related works in Section 1.1). Our work shows that optimally-tuned ridge regression can achieve both sample-wise monotonicity and model-size-wise monotonicity under certain assumptions. Concretely, we show
36
+
37
+ 1. Sample-wise monotonicity: In the setting of well-specified linear regression with isotropic features/covariates (Figure 1), we prove that optimally-tuned ridge regression yields monotonic test performance with increasing samples. That is, more data never hurts for optimally-tuned ridge regression. (See Theorem 1).
38
+
39
+ 2. Model-wise monotonicity: We consider a setting where the input/covariate lives in a highdimensional ambient space with isotropic covariance. Given a fixed model size $d$ (which might be much smaller than ambient dimension), we consider the family of models which first project the input to a random $d$ -dimensional subspace, and then compute a linear function in this projected “feature space.” (This is nearly identical to models of double-descent considered in Hastie et al. (2019, Section 5.1)). We prove that in this setting, as we grow the model-size, optimally-tuned ridge regression over the projected features has monotone test performance. That is, with optimal regularization, bigger models are always better or the same. (See Theorem 3).
40
+
41
+ 3. Monotonicity in the real-world: We also demonstrate several richer empirical settings where optimal $\ell _ { 2 }$ regularization induces monotonicity, including random feature classifiers and convolutional neural networks. This suggests that the mitigating effect of optimal regularization may hold more generally in broad machine learning contexts. (See Section 5).
42
+
43
+ A few remarks are in order:
44
+
45
+ Problem-specific vs Minimax and Bayesian. It is worth noting that our results hold for all linear ground-truths, rather than holding for only the worst-case ground-truth or a random ground-truth. Indeed, the minimax optimal estimator or the Bayes optimal estimator are both trivially sample-wise and model-wise monotonic with respect to the minimax risk or the Bayes risk. However, they do not guarantee monotonicity of the risk itself for a given fixed problem. In particular, there exist minimax optimal estimators which are not sample-monotonic in the sense we desire.
46
+
47
+ Universal vs Asymptotic. We also remark that our analysis is not only non-asymptotic but also works for all possible input dimensions, model sizes, and sample sizes. To our knowledge, the results herein are the first non-asymptotic sample-wise and model-wise monotonicity results for linear regression. (See discussion of related works Hastie et al. (2019); Mei & Montanari (2019) for related results in the asymptotic setting). Our work reveals aspects of the problem that were not present in prior asymptotic works. For example, we empirically show that optimal regularization can eliminate even “triple descent” in ridge regression (Figure 2). Moreover, we show that for nonGaussian covariates, optimally-tuned ridge regression is not always sample-monotonic: we give a counterexample in Section 4.
48
+
49
+ Towards a more general characterization. Our theoretical results crucially rely on the covariance of the data being isotropic. A natural next question is if and when the same results can hold more generally. A full answer to this question is beyond the scope of this paper, though we give the following results:
50
+
51
+ 1. Optimally-tuned ridge regression is not always sample-monotonic: we show a counterexample for a certain non-Gaussian data distribution and heteroscedastic noise. We are not aware of prior work pointing out this fact. (See Section 4 for the counterexample and intuitions.)
52
+ 2. For non-isotropic Gaussian covariates, we can achieve sample-wise monotonicity with a regularizer that depends on the population covariance matrix of data. This suggests unlabeled data might also help mitigate double descent in some settings, because the population covariance can be estimated from unlabeled data. (See Appendix B).
53
+ 3. For non-isotropic Gaussian covariates, we conjecture that optimally-tuned ridge regression is sample-monotonic even with a standard $\ell _ { 2 }$ regularizer (as in Figure 2). We derive a sufficient condition for this conjecture. Due to that current random matrix theory may be insufficient to verify this conjecture, we verify it numerically on a wide variety of cases. (See Appendix B for details).
54
+
55
+ The last two results above highlight the importance of the form of the regularizer, which leads to the open question: “How do we design good regularizers which mitigate or remove double descent?” We hope that our results can motivate future work on mitigating the double descent phenomenon, and allow us to train high performance models which do not exhibit nonmonotonic behaviors.
56
+
57
+ # 1.1 RELATED WORKS
58
+
59
+ The study of nonmonotonicity in learning algorithms existed prior to double descent and has a long history going back to (at least) Trunk (1979) and LeCun et al. (1991); Le Cun et al. (1991), where the former was largely empirical observations and the latter studied the sample non-nonmonotonicity of unregularized linear regression in terms of the eigenspectrum of the covariance matrix; the difference to our works is that we study this in the context of optimal regularization. In fact, Duin (1995; 2000); Opper (2001); Loog & Duin (2012). Loog et al. (2019) introduces the same notion of risk monotonicity which we consider, and studies several examples of monotonic and non-monotonic procedures.
60
+
61
+ Double descent of test risk as a function of model size was considered recently in more generality by Belkin et al. (2018). Similar behavior was observed empirically in earlier work in somewhat more restricted settings Trunk (1979); Opper (1995; 2001); Skurichina & Duin (2002); Le Cun et al. (1991); LeCun et al. (1991) and more recently in Advani & Saxe (2017); Geiger et al. (2019a); Spigler et al. (2018); Neal et al. (2018). Recently Nakkiran et al. (2020) demonstrated a generalized double descent phenomenon on modern deep networks, and highlighted “sample non-monotonicity” as an aspect of double descent.
62
+
63
+ A recent stream of theoretical works consider model-wise double descent in simplified settings— often via linear models for regression or classification. This also connects to works on highdimentional regression in the statistics literature. A partial list of works in these areas include Belkin et al. (2019); Hastie et al. (2019); Bartlett et al. (2019); Muthukumar et al. (2019); Bibas et al. (2019); Mitra (2019); Mei & Montanari (2019); Liang & Rakhlin (2018); Liang et al. (2019); Xu & Hsu (2019); Derezinski et al. (2019); Lampinen & Ganguli (2018); Deng et al. (2019); Nakki- ´ ran (2019); Mahdaviyeh & Naulet (2019); Dobriban et al. (2018); Dobriban & Sheng (2019); Kobak et al. (2018). Of these, most closely related to our work are Hastie et al. (2019); Dobriban et al. (2018); Mei & Montanari (2019). Specifically, Hastie et al. (2019) considers the risk of unregularized and regularized linear regression in an asymptotic regime, where dimension $d$ and number of samples $n$ scale to infinity together, at a constant ratio $d / n$ . In contrast, we show non-asymptotic results, and are able to consider increasing the number of samples for a fixed model, without scaling both together. Mei & Montanari (2019) derive similar results for unregularized and regularized random features, also in an asymptotic limit. The non-asymptotic versions of the settings considered in Hastie et al. (2019) are almost identical to ours— for example, our projection model in Section 3 is nearly identical to the model in Hastie et al. (2019, Section 5.1). Finally, subsequent to our work, d’Ascoli et al. (2020) identified triple descent in an asymptotic setting.
64
+
65
+ # 2 SAMPLE MONOTONICITY IN RIDGE RIDGRESSION
66
+
67
+ In this section, we prove that optimally-regularized ridge regression has test risk that is monotonic in samples, for isotropic gaussian covariates and linear response. This confirms the behavior empirically observed in Figure 1. We also show that this monotonicity is not “fragile”, and using larger than larger regularization is still sample-monotonic (consistent with Figure 1).
68
+
69
+ Formally, we consider the following linear regression problem in $d$ dimensions. The input/covariate $x \in \mathbb { R } ^ { d }$ is generated from $\mathcal { N } ( 0 , I _ { d } )$ , and the output/response is generated by $y = \langle x , \beta ^ { * } \rangle + \varepsilon$ with $\varepsilon \sim \mathcal { N } ( 0 , \bar { \sigma } ^ { 2 } )$ for some unknown parameter $\beta ^ { * } \in \mathbb { R } ^ { d }$ . We denote the joint distribution of $( x , y )$ by $\mathcal { D }$ . We are given $n$ training examples $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ i.i.d sampled from $\mathcal { D }$ . We aim to learn a linear model $f _ { \beta } ( x ) = \langle x , \beta \rangle$ with small population risk $\bar { R } ( \beta ) : = \mathbb { E } _ { ( x , y ) \sim \mathcal { D } } [ ( \langle x , \beta \rangle - y ) ^ { 2 } ]$ . For simplicity, let $\ b { X } \in \mathbb { R } ^ { n \times d }$ be the data matrix that contains $x _ { i } ^ { \top }$ ’s as rows and let $\vec { y } \in \mathbb R ^ { n }$ be column vector that contains the responses $y _ { i }$ ’s as entries. For any estimator $\hat { \beta } _ { n } ( X , \vec { y } )$ as a function of $n$ samples, define the expected risk of the estimator as:
70
+
71
+ $$
72
+ { \overline { { R } } } ( { \hat { \beta } } _ { n } ) : = \operatorname * { \mathbb { E } } _ { X , y \sim { \mathcal { D } } ^ { n } } [ R ( { \hat { \beta } } _ { n } ( X , { \vec { y } } ) ) ]
73
+ $$
74
+
75
+ We consider the regularized least-squares estimator, also known as the ridge regression estimator. For a given $\lambda > 0$ , define
76
+
77
+ $$
78
+ \hat { \beta } _ { n , \lambda } : = \underset { \beta } { \operatorname { a r g m i n } } | | X \beta - \vec { y } | | _ { 2 } ^ { 2 } + \lambda | | \beta | | _ { 2 } ^ { 2 } = ( X ^ { T } X + \lambda I _ { d } ) ^ { - 1 } X ^ { T } \vec { y }
79
+ $$
80
+
81
+ Here $I _ { d }$ denotes the $d$ dimensional identity matrix. Let $\lambda _ { n } ^ { \mathrm { o p t } }$ be the optimal ridge parameter (that achieves the minimum expected risk) given $n$ samples: $\begin{array} { r } { \lambda _ { n } ^ { \mathrm { o p t } } : = \operatorname * { a r g m i n } _ { \lambda : \lambda \geq 0 } \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) ) } \end{array}$ . Let $\hat { \beta } _ { n } ^ { \mathrm { { o p t } } }$ be the estimator that corresponds to the $\lambda _ { n } ^ { \mathrm { o p t } }$ . That is, $\begin{array} { r } { \hat { \beta } _ { n } ^ { \mathrm { o p t } } : = \operatorname * { a r g m i n } _ { \beta } | | X \beta - \vec { y } | | _ { 2 } ^ { 2 } + \lambda _ { n } ^ { \mathrm { o p t } } | | \beta | | _ { 2 } ^ { 2 } } \end{array}$ . Our main theorem in this section shows that the expected risk of $\hat { \beta } _ { n } ^ { \mathrm { { o p t } } }$ monotonically decreases as $n$ increases.
82
+
83
+ Theorem 1. In the setting above, the expected test risk of optimally-regularized well-specified isotropic linear regression is monotonic in samples. That is, for all $\beta ^ { * } \in \mathbb { R } ^ { d }$ and all $d \in \mathbb { N } , n \in$ $\mathbb { N } , \sigma > 0$ ,
84
+
85
+ $$
86
+ \overline { { R } } ( \hat { \beta } _ { n + 1 } ^ { \mathrm { o p t } } ) \leq \overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { o p t } } )
87
+ $$
88
+
89
+ The above theorem shows a strong form of monotonicity, since it holds for every fixed groundtruth $\beta ^ { * }$ , and does not require averaging over any prior on ground-truths. Moreover, it holds nonasymptotically, for every fixed $n , d \in \mathbb { N }$ . Obtaining such non-asymptotic results is nontrivial, since we cannot rely on concentration properties of the involved random variables.
90
+
91
+ In particular, evaluating $\overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { { o p t } } } )$ as a function of the problem parameters $( n , \sigma , \beta ^ { * }$ , and $d$ ) is technically challenging. In fact, we suspect that a simple closed form expression does not exist. The key idea towards proving the theorem is to derive a “partial evaluation” — the following lemmas shows that we can write $\overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { { o p t } } } )$ in the form of $\mathbb { E } [ g ( \gamma , \sigma , n , d , \beta ^ { * } ) ]$ where $\gamma \in \mathbb { R } ^ { d }$ contains the singular values of $X$ . We will then couple the randomness of data matrices obtained by adding a single sample, and use singular value interlacing to compare their singular values.
92
+
93
+ Lemma 1. In the setting of Theorem $^ { l }$ , let $\gamma = ( \gamma _ { 1 } , \ldots , \gamma _ { d } )$ be the singular values of the data matrix $\ b { X } \in \mathbb { R } ^ { n \times d }$ . (If $n < d$ , we pad the $\gamma _ { i } = 0$ for $i > n .$ .) Let $\Gamma _ { n }$ be the distribution of $\gamma .$ . Then, the expected test risk is
94
+
95
+ $$
96
+ \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) = \operatorname * { \mathbb { E } } _ { ( \gamma _ { 1 } , \dots \gamma _ { d } ) \sim \Gamma _ { n } } \left[ \sum _ { i = 1 } ^ { d } \frac { | | \beta ^ { * } | | _ { 2 } ^ { 2 } \lambda ^ { 2 } / d + \sigma ^ { 2 } \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } \right] + \sigma ^ { 2 }
97
+ $$
98
+
99
+ From Lemma 1, the below lemma follows directly by taking derivatives to find the optimal $\lambda$ .
100
+
101
+ Lemma 2. In the setting of Theorem 1, the optimal ridge parameter is constant for all $n$ : $\lambda _ { n } ^ { \mathrm { o p t } } =$ $\frac { d \sigma ^ { 2 } } { | | \beta ^ { * } | | _ { 2 } ^ { 2 } }$ . Moreover, the optimal expected test risk can be written as
102
+
103
+ $$
104
+ \overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { o p t } } ) = \operatorname * { l } _ { ( \gamma _ { 1 } , \ldots \gamma _ { d } ) \sim \Gamma _ { n } } \left[ \sum _ { i = 1 } ^ { d } \frac { \sigma ^ { 2 } } { \gamma _ { i } ^ { 2 } + d \sigma ^ { 2 } / | | \beta ^ { * } | | _ { 2 } ^ { 2 } } \right] + \sigma ^ { 2 }
105
+ $$
106
+
107
+ Proofs of Lemma 1 and 2 are deferred to the Appendix, Section A.1. Now we are ready to prove Theorem 1.
108
+
109
+ Proof of Theorem $^ { l }$ . Let $\widetilde { X } \ \in \ \mathbb { R } ^ { ( n + 1 ) \times d }$ and $\boldsymbol { X } \in \mathbb { R } ^ { n \times d }$ be any two matrices which differ by only the last row of $\widetilde { X }$ . By the Cauchy interlacing theorem Theorem 4.3.4 of Horn et al. (1990) (c.f.,Lemma 3.4 of Marcus et al. (2014)), the singular values of $X$ and $\widetilde { X }$ are interlaced: $\forall i$ : $\gamma _ { i - 1 } ( X ) \geq \gamma _ { i } ( { \widetilde { X } } ) \geq \gamma _ { i } ( X )$ where $\gamma _ { i } ( \cdot )$ is the $i$ -th singular value.
110
+
111
+ If we couple $\widetilde { X }$ and $X$ , it will induce a coupling $\Pi$ between the distributions $\Gamma _ { n + 1 }$ and $\Gamma _ { n }$ , of the singular values of the data matrix for $n + 1$ and $n$ samples. This coupling satisfies that $\widetilde { \gamma } _ { i } \geq \gamma _ { i }$ with probability 1 for $( \{ \widetilde { \gamma } _ { i } \} , \{ \gamma _ { i } \} ) \sim \Pi$ e. Now, expand the test risk using Lemma 2, and observe that each eterm in the sum of Equation (4) below is monotone decreasing with $\gamma _ { i }$ . Thus:
112
+
113
+ $$
114
+ \begin{array} { r l } & { \overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { o p t } } ) = \underset { ( \gamma _ { 1 } , \ldots , \gamma _ { d } ) \sim \Gamma _ { n } } { \mathbb { E } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \frac { \sigma ^ { 2 } } { \gamma _ { i } ^ { 2 } + d \sigma ^ { 2 } / | | \beta ^ { * } | | _ { 2 } ^ { 2 } } \right] + \sigma ^ { 2 } } \\ & { \qquad \quad \overset { \mathbb { E } } { \ge } \underset { ( \widetilde { \gamma } _ { 1 } , \ldots , \widetilde { \gamma } _ { d } ) \sim \Gamma _ { n + 1 } } { \mathbb { E } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \frac { \sigma ^ { 2 } } { \widetilde { \gamma } _ { i } ^ { 2 } + d \sigma ^ { 2 } / | | \beta ^ { * } | | _ { 2 } ^ { 2 } } \right] + \sigma ^ { 2 } } \\ & { \qquad = \overline { { R } } ( \hat { \beta } _ { n + 1 } ^ { \mathrm { o p t } } ) } \end{array}
115
+ $$
116
+
117
+ By similar techniques, we can also prove that overregularization —that is, using ridge parameters $\lambda$ larger than the optimal value— is still monotonic. This proves the behavior empirically observed in Figure 1.
118
+
119
+ Theorem 2. In the same setting as Theorem $I$ , over-regularized regression is also monotonic in samples. That is, for all $d \in \mathbb { N } , n \in \mathbb { N } , \sigma > 0 , \beta ^ { * } \in \mathbb { R } ^ { d }$ , the following holds
120
+
121
+ $$
122
+ \forall \lambda \geq \lambda ^ { * } : \quad \overline { { { R } } } ( \widehat { \beta } _ { n + 1 , \lambda } ) \leq \overline { { { R } } } ( \widehat { \beta } _ { n , \lambda } )
123
+ $$
124
+
125
+ where $\begin{array} { r } { \lambda ^ { * } = \frac { d \sigma ^ { 2 } } { | | \beta ^ { * } | | _ { 2 } ^ { 2 } } } \end{array}$
126
+
127
+ Proof. In Section A.1.
128
+
129
+ # 3 MODEL-WISE MONOTONICITY IN RIDGE REGRESSION
130
+
131
+ In this section, we show that for a certain family of linear models, optimal regularization prevents model-wise double descent. That is, for a fixed number of samples, larger models are not worse than smaller models.
132
+
133
+ We consider the following learning problem. Informally, covariates live in a $p$ -dimensional ambient space, and we consider models which first linearly project down to a random $d$ -dimensional subspace, then perform ridge regression in that subspace for some $d \leq p$ . Formally, the covariate $x \in \mathbb { R } ^ { p }$ is generated from $\bar { \mathcal { N } } ( 0 , I _ { p } )$ , and the response is generated by $y = \langle x , \theta \rangle + \varepsilon$ with $\varepsilon \sim \mathcal { N } ( 0 , \sigma ^ { 2 } )$ and for some unknown parameter $\theta \in \mathbb { R } ^ { p }$ . Next, $n$ examples $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ are sampled i.i.d from this distribution. For a given model size $d \leq p$ , we first sample a random orthonormal matrix $P \in \mathbb { R } ^ { d \times p }$ which specifies our model. We then consider models which operate on $( \widetilde { x } _ { i } , y _ { i } ) \in \mathbb { R } ^ { d } \times \mathbb { R }$ , where $\widetilde { x _ { i } } = P x _ { i }$ . We denote the joint distribution of $( \widetilde { x } , y )$ by $\mathcal { D }$ . Here, we eemphasize that $p$ eis some large ambient dimension and $d \leq p$ eis the size of the model we learn.
134
+
135
+ For a fixed $P$ , we want to learn a linear model $f _ { \hat { \beta } } ( \tilde { x } ) = \langle \tilde { x } , \hat { \beta } \rangle$ for estimating $y$ , with small mean squared error on distribution: $R _ { P } ( \hat { \beta } ) : = \mathbb { E } _ { ( \tilde { x } , y ) \sim \mathcal { D } } [ ( \langle \tilde { x } , \hat { \beta } \rangle - y ) ^ { 2 } ]$ . For $n$ samples $( x _ { i } , y _ { i } )$ , let $X \in$ $\mathbb { R } ^ { n \times p }$ be the data matrix, $\widetilde { X } \ = X P ^ { T } \ \in \ \mathbb { R } ^ { n \times d }$ be the projected data matrix and $\vec { y } \in \mathbb R ^ { n }$ be the responses. For any estimator $\hat { \beta } ( \widetilde { X } , \vec { y } )$ as a function of the observed samples, define the expected risk of the estimator as:
136
+
137
+ $$
138
+ \overline { { R } } ( \hat { \beta } ) : = \operatorname * { \mathbb { E } } _ { P } \operatorname * { \mathbb { E } } _ { \tilde { X } , \vec { y } \sim \mathcal { D } ^ { n } } [ R _ { P } ( \hat { \beta } ( \tilde { X } , \vec { y } ) ]
139
+ $$
140
+
141
+ We consider the regularized least-squares estimator. For a given $\lambda > 0$ , define
142
+
143
+ $$
144
+ \hat { \beta } _ { d , \lambda } : = \underset { \beta } { \mathrm { a r g m i n } } | | \widetilde { X } \beta - \vec { y } | | _ { 2 } ^ { 2 } + \lambda | | \beta | | _ { 2 } ^ { 2 } = ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I _ { d } ) ^ { - 1 } \widetilde { X } ^ { T } \vec { y }
145
+ $$
146
+
147
+ Let $\lambda _ { d } ^ { \mathrm { o p t } }$ be the optimal ridge parameter (that achieves the minimum expected risk) for a model of size $d$ d, with $n$ samples: $\lambda _ { d } ^ { \mathrm { o p t } } : = \mathrm { a r g m i n } _ { \lambda \ge 0 } \overline { { R } } ( \hat { \beta } _ { d , \lambda } ) )$ . Let $\hat { \beta } _ { d } ^ { \mathrm { { o p t } } }$ be the estimator that corresponds to the $\lambda _ { d } ^ { \mathrm { o p t } }$ , that is $\begin{array} { r } { \hat { \beta } _ { d } ^ { \mathrm { o p t } } : = \operatorname * { a r g m i n } _ { \beta } | | \widetilde { X } \beta - \vec { y } | | _ { 2 } ^ { 2 } + \lambda _ { d } ^ { \mathrm { o p t } } | | \beta | | _ { 2 } ^ { 2 } } \end{array}$ . Now, our main theorem in this setting shows that with optimal $\ell _ { 2 }$ regularization, test performance is monotonic in model size.
148
+
149
+ Theorem 3. In the setting above, the expected test risk of the optimally-regularized model is monotonic in the model size $d .$ . That is, for all $p \in \mathbb { N } , \theta \in \mathbb { R } ^ { p } , d \leq p , n \in \mathbb { N } , \sigma > 0$ , we have
150
+
151
+ $$
152
+ \overline { { R } } ( \hat { \beta } _ { d + 1 } ^ { \mathrm { o p t } } ) \leq \overline { { R } } ( \hat { \beta } _ { d } ^ { \mathrm { o p t } } )
153
+ $$
154
+
155
+ The proof of Theorem 3 is in Appendix A.2, and follows closely the proof of Theorem 1.
156
+
157
+ # 4 COUNTEREXAMPLES TO MONOTONICITY
158
+
159
+ In this section, we show that optimally-regularized ridge regression is not always monotonic in samples. We give a numeric counterexample in $d = 2$ dimensions, with non-gaussian covariates and heteroscedastic noise. This does not contradict our main theorem in Section 2, since this distribution is not jointly Gaussian with isotropic marginals.
160
+
161
+ Counterexample. Here we give an example of a distribution $( x , y )$ for which the expected error of optimally-regularized ridge regression with $n = 2$ samples is worse than with $n = 1$ samples. This counterexample is most intuitive to understand when the ridge parameter $\lambda$ is allowed to depend on the specific sample instance $( X , { \vec { y } } )$ as well as $n ^ { 1 }$ . We sketch the intuition for this below. Consider the following distribution on $( x , y )$ in $d = 2$ dimensions. This distribution has one “clean” coordinate and one “noisy” coordinate. The distribution is: $( x , y ) = ( { \vec { e } } _ { 1 } , 1 )$ with probability $1 / 2$ , and $( x , y ) =$ $( \vec { e } _ { 2 } , \pm 1 0 )$ w.p. 1/2. Where $\pm 1 0$ is uniformly random independent noise. This distribution is “wellspecified” in that the optimal predictor is linear in $x$ $: \mathbb { E } [ y | x ] = \langle \beta ^ { * } , x \rangle$ for $\beta ^ { * } = [ 1 , 0 ]$ . However, the noise is heteroscedastic.
162
+
163
+ For $n = 1$ samples, the estimator can decide whether to use small $\lambda$ or large $\lambda$ depending on if the sampled coordinate is the “clean” or “noisy” one. Specifically, for the sample $( x , y )$ : If $x = \vec { e } _ { 1 }$ , then the optimal ridge parameter is $\lambda = 0$ . If $x = \vec { e } _ { 2 }$ , then the optimal parameter is $\lambda = \infty$ .
164
+
165
+ For $n = 2$ samples, with probability $1 / 2$ the two samples will hit both coordinates. In this case, the estimator must chose a single value of $\lambda$ uniformly for both coordinates. This yields to a suboptimal tradeoff, since the “noisy” coordinate demands large regularization, but this hurts estimation on the “clean” coordinate.
166
+
167
+ It turns out that a slight modification to the above also serves as a counterexample to monotonicity when the regularization parameter $\lambda$ is chosen only depending on $n$ (and not on the instance $X , y )$ . The distribution is: $( x , y ) = ( \vec { e } _ { 1 } , 1 )$ w.p. 0.98 and $( x , y ) = ( \vec { e } _ { 2 } , \pm 2 0 )$ w.p. 0.02. This distribution has the following property.
168
+
169
+ Theorem 4. There exists a distribution $\mathcal { D }$ over $( x , y )$ for $x \in \mathbb { R } ^ { 2 } , y \in \mathbb { R }$ with the following properties. Let $\hat { \beta } _ { n } ^ { \mathrm { { o p t } } }$ be the optimally-regularized ridge regression solution for $n$ samples $( X , { \vec { y } } )$ from $\mathcal { D }$ . Then:
170
+
171
+ 1. D is “well-specified” in that $\mathbb { E } p [ y | x ]$ is a linear function of $x$ ,
172
+
173
+ 2. The expected test risk increases as a function of $n _ { \ast }$ , between $n = 1$ and $n = 2$ . Specifically
174
+
175
+ $$
176
+ \overline { { R } } ( \hat { \beta } _ { n = 1 } ^ { \mathrm { o p t } } ) < \overline { { R } } ( \hat { \beta } _ { n = 2 } ^ { \mathrm { o p t } } )
177
+ $$
178
+
179
+ Proof. For $n = 1$ samples, it can be confirmed analytically that the expected risk $\overline { { { R } } } ( \hat { \beta } _ { n = 1 } ^ { \mathrm { o p t } } ) ~ <$ 8.157. This is achieved with $\lambda = 4 0 0 / 2 4 0 1 \approx 0 . 1 6 6 5 9 7 .$ For $n = 2$ samples, it can be confirmed numerically (via Mathematica) that the expected risk $\overline { { R } } ( \hat { \beta } _ { n = 2 } ^ { \mathrm { o p t } } ) ~ > ~ 8 . 1 7 9$ . This is achieved with $\lambda = 0 . 6 4 2 5 2 5$ . □
180
+
181
+ # 5 EXPERIMENTS
182
+
183
+ We now experimentally demonstrate that optimal $\ell _ { 2 }$ regularization can mitigate double descent, in more general settings than Theorems 1 and 3.
184
+
185
+ # 5.1 SAMPLE MONOTONICITY
186
+
187
+ Here we show various settings where optimal $\ell _ { 2 }$ regularization empirically induces samplemonotonic performance.
188
+
189
+ Nonisotropic Regression. We first consider the setting of Theorem 1, but with non-isotropic covariantes $x$ . That is, we perform ridge regression on samples $( x , y )$ , where the covariate $\boldsymbol { x } \in \mathbb { R } ^ { d }$ is generated from $\mathcal { N } ( 0 , \Sigma )$ for $\Sigma \neq I _ { d }$ . As before, the response is generated by $y = \langle x , \beta ^ { * } \rangle + \varepsilon$ with $\varepsilon \sim \mathcal { N } ( 0 , \sigma ^ { 2 } )$ for some unknown parameter $\beta ^ { * } \in \mathbb { R } ^ { d }$ . We consider the same ridge regression estimator, $\begin{array} { r } { \hat { \beta } _ { n , \lambda } : = \operatorname * { a r g m i n } _ { \boldsymbol { \beta } } \| X { \boldsymbol { \beta } } - \vec { y } \| _ { 2 } ^ { 2 } + \lambda \| { \boldsymbol { \beta } } \| _ { 2 } ^ { 2 } } \end{array}$ .
190
+
191
+ ![](images/6bbe45f3d0113a0cbb86e816d67e9834573c85c456540349b12e6e02c25001ba.jpg)
192
+ Figure 2: Test Risk vs. Num. Samples for Non-Isotropic Ridge Regression in $d = 3 0$ dimensions. Unregularized regression is non-monotonic in samples, but optimally-regularized regression is monotonic. Note the optimal regularization $\lambda$ depends on the number of samples $n$ .
193
+ Figure 2 shows one instance of this, for a particular choice of $\Sigma$ and $\beta ^ { * }$ . The covariance $\Sigma$ is diagonal, with $\Sigma _ { i , i } = 1 0$ for $i \leq 1 5$ and $\Sigma _ { i , i } = 1$ for $i > 1 5$ . That is, the covariance has one “large” eigenspace and one “small” eigenspace. The ground-truth $\beta ^ { * } = 0 . 1 \vec { e _ { 1 } } + e _ { 3 0 } ^ { }$ , which lies almost entirely within the “small” eigenspace of $\Sigma$ . The noise parameter is $\sigma = 0 . 5$ .
194
+
195
+ We see that unregularized regression $\lambda = 0$ ) actually undergoes “triple descent”2 in this setting, with the first peak around $n = 1 5$ samples due to the 15-dimensional large eigenspace, and the second peak at $n = d$ . In this setting, optimally-regularized ridge regression is empirically monotonic in samples (Figure 2). Unlike the isotropic setting of Section 2, the optimal ridge parameter $\lambda _ { n }$ is no longer a constant, but varies with number of samples $n$ .
196
+
197
+ Random ReLU Features. We consider random ReLU features, in the random features framework of Rahimi & Recht (2008). For a given number of features $D$ , and number of samples $n$ , the random feature classifier is obtained by performing regularized linear regression on the embedding√ $\tilde { x } : = \mathrm { R e L U } ( W x )$ , where $W \in \mathbb { R } ^ { D \times d }$ is a matrix with each entry sampled i.i.d $\mathcal { N } ( 0 , 1 / \sqrt { d } )$ and ReLU applies pointwise. This is equivalent to a 2-layer fully-connected neural network with a frozen (randomly-initialized) first layer, trained with $\ell _ { 2 }$ loss and weight decay. In Appendix A.4, we apply random features to Fashion-MNIST Xiao et al. (2017). From Appendix Figure 4a, we see that underregularized models are non-monotonic, but optimal $\ell _ { 2 }$ regularization is monotonic in samples. Moreover, the optimal ridge parameter $\lambda$ appears to be constant for all $n$ , similar to our results from the isotropic setting in Theorem 1.
198
+
199
+ # 5.2 MODEL-SIZE MONOTONICITY
200
+
201
+ Here we empirically show that optimal $\ell _ { 2 }$ regularization can mitigate model-wise double descent.
202
+
203
+ Random ReLU Features. We consider the same experimental setup as in Section 5.1, but now fix the number of samples $n$ , and vary the number of random features $D$ . This corresponds to varying the width of the corresponding 2-layer neural network. Figure 4b in Appendix A.4 shows the test error of the random features classifier, for $n = 5 0 0$ train samples and varying number of random features. We see that underregularized models undergo model-wise double descent, but optimal $\ell _ { 2 }$ regularization prevents double descent.
204
+
205
+ Convolutional Neural Networks. We follow the experimental setup of Nakkiran et al. (2020) for modelwise double descent, and add varying amounts of $\ell _ { 2 }$ regularization (weight decay). We chose the following setting from Nakkiran et al. (2020), because it exhibits double descent even with no added label noise. We consider the same family of 5-layer convolutional neural networks (CNNs) from Nakkiran et al. (2020), consisting of 4 convolutional layers of widths $[ k , 2 k , 4 k , 8 k ]$ for varying $k \in$ $\mathbb { N }$ . We train and test on CIFAR100 (Krizhevsky et al., 2009), an image classification problem with 100 classes. Inputs are normalized to
206
+
207
+ ![](images/b59ffa519889838486fdb1bea9435eca85527fcc4c5ff780a6f8610321941a4b.jpg)
208
+ Figure 3: Test Error vs. Model Size for 5-layer CNNs on CIFAR-100, with $\ell _ { 2 }$ regularization (weight decay). Note that the optimal regularization $\lambda$ varies with $n$ .
209
+
210
+ $[ - 1 , 1 ] ^ { d }$ , and we use standard data-augmentation of random horizontal flip and random crop with 4- pixel padding. All models are trained using Stochastic Gradient Descent (SGD) on the cross-entropy loss, with step size $0 . 1 / \sqrt { \lfloor { T / 5 1 2 } \rfloor + 1 }$ at step $T$ . We train for 1e6 gradient steps, and use weight decay $\lambda$ for varying $\lambda$ . Due to optimization instabilities for large $\lambda$ , we use the model with the minimum train loss among the last 5K gradient steps. Figure 3 shows the test error of these models on CIFAR-100. Although unregularized and under-reguarized models exhibit double descent, the test error of optimally-regularized models is largely monotonic. Note that the optimal regularization $\lambda$ varies with the model size — no single regularization value is optimal for all models.
211
+
212
+ # 6 DISCUSSION AND CONCLUSION
213
+
214
+ In this work, we study the double descent phenomenon in the context of optimal regularization. We show that, while unregularized or under-regularized models often have non-monotonic behavior, appropriate regularization can eliminate this effect.
215
+
216
+ Theoretically, we prove that for certain linear regression models with isotropic covariates, optimallytuned $\ell _ { 2 }$ regularization achieves monotonic test performance as we grow either the sample size or the model size. These are the first non-asymptotic monotonicity results we are aware of in linear regression. We also demonstrate empirically that optimally-tuned $\ell _ { 2 }$ regularization can mitigate double descent for more general models, including neural networks. We hope that our results can motivate future work on mitigating the double descent phenomenon, and allow us to train high performance models which do not exhibit unexpected nonmonotonic behaviors.
217
+
218
+ Open Questions. Our work suggests a number of natural open questions. First, it is open to prove (or disprove) that optimal ridge regression is sample-monotonic for non-isotropic Gaussian covariates. We conjecture that it is, and outline a potential route to proving this (via Conjectures 1 and 2 in the Appendix). Second, more broadly, it is open to prove sample-wise or model-wise monotonicity for more general (non-linear) models with appropriate regularizers. Finally, it is open to understand why large neural networks in practice are often sample-monotonic in realistic regimes of sample sizes, even without careful choice of regularization.
219
+
220
+ # REFERENCES
221
+
222
+ Madhu S Advani and Andrew M Saxe. High-dimensional dynamics of generalization error in neural networks. arXiv preprint arXiv:1710.03667, 2017.
223
+ Peter L Bartlett, Philip M Long, Gabor Lugosi, and Alexander Tsigler. Benign overfitting in linear ´ regression. arXiv preprint arXiv:1906.11300, 2019.
224
+ Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal. Reconciling modern machine learning and the bias-variance trade-off. arXiv preprint arXiv:1812.11118, 2018.
225
+ Mikhail Belkin, Daniel Hsu, and Ji Xu. Two models of double descent for weak features. arXiv preprint arXiv:1903.07571, 2019.
226
+ Koby Bibas, Yaniv Fogel, and Meir Feder. A new look at an old problem: A universal learning approach to linear regression. arXiv preprint arXiv:1905.04708, 2019.
227
+ Stephane d’Ascoli, Levent Sagun, and Giulio Biroli. Triple descent and the two kinds of overfitting: ´ Where & why do they appear? arXiv preprint arXiv:2006.03509, 2020.
228
+ Zeyu Deng, Abla Kammoun, and Christos Thrampoulidis. A model of double descent for highdimensional binary linear classification. arXiv preprint arXiv:1911.05822, 2019.
229
+ Michał Derezinski, Feynman Liang, and Michael W. Mahoney. Exact expressions for double descent ´ and implicit regularization via surrogate random design, 2019.
230
+ Edgar Dobriban and Yue Sheng. Wonder: Weighted one-shot distributed ridge regression in high dimensions. arXiv preprint arXiv:1903.09321, 2019.
231
+ Edgar Dobriban, Stefan Wager, et al. High-dimensional asymptotics of prediction: Ridge regression and classification. The Annals of Statistics, 46(1):247–279, 2018.
232
+ Robert PW Duin. Small sample size generalization. In Proceedings of the Scandinavian Conference on Image Analysis, volume 2, pp. 957–964. PROCEEDINGS PUBLISHED BY VARIOUS PUBLISHERS, 1995.
233
+ Robert PW Duin. Classifiers in almost empty spaces. In Proceedings 15th International Conference on Pattern Recognition. ICPR-2000, volume 2, pp. 1–7. IEEE, 2000.
234
+ Mario Geiger, Arthur Jacot, Stefano Spigler, Franck Gabriel, Levent Sagun, Stephane d’Ascoli, ´ Giulio Biroli, Clement Hongler, and Matthieu Wyart. Scaling description of generalization with ´ number of parameters in deep learning. arXiv preprint arXiv:1901.01608, 2019a.
235
+ Mario Geiger, Stefano Spigler, Stephane d’Ascoli, Levent Sagun, Marco Baity-Jesi, Giulio Biroli, ´ and Matthieu Wyart. Jamming transition as a paradigm to understand the loss landscape of deep neural networks. Physical Review E, 100(1):012115, 2019b.
236
+ Trevor Hastie, Andrea Montanari, Saharon Rosset, and Ryan J. Tibshirani. Surprises in high
237
+
238
+ dimensional ridgeless least squares interpolation, 2019.
239
+
240
+ Roger A Horn, Roger A Horn, and Charles R Johnson. Matrix Analysis. Cambridge University Press, 1990.
241
+
242
+ Dmitry Kobak, Jonathan Lomond, and Benoit Sanchez. Optimal ridge penalty for real-world highdimensional data can be zero or negative due to the implicit ridge regularization. arXiv preprint arXiv:1805.10939, 2018.
243
+
244
+ Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
245
+
246
+ Andrew K Lampinen and Surya Ganguli. An analytic theory of generalization dynamics and transfer learning in deep linear networks. arXiv preprint arXiv:1809.10374, 2018.
247
+
248
+ Yann Le Cun, Ido Kanter, and Sara A Solla. Eigenvalues of covariance matrices: Application to neural-network learning. Physical Review Letters, 66(18):2396, 1991.
249
+
250
+ Yann LeCun, Ido Kanter, and Sara A Solla. Second order properties of error surfaces: Learning time and generalization. In Advances in neural information processing systems, pp. 918–924, 1991.
251
+
252
+ Tengyuan Liang and Alexander Rakhlin. Just interpolate: Kernel” ridgeless” regression can generalize. arXiv preprint arXiv:1808.00387, 2018.
253
+
254
+ Tengyuan Liang, Alexander Rakhlin, and Xiyu Zhai. On the risk of minimum-norm interpolants and restricted lower isometry of kernels. arXiv preprint arXiv:1908.10292, 2019.
255
+
256
+ Tengyuan Liang, Alexander Rakhlin, and Xiyu Zhai. On the multiple descent of minimum-norm interpolants and restricted lower isometry of kernels. 2020.
257
+
258
+ Marco Loog and Robert PW Duin. The dipping phenomenon. In Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition (SPR) and Structural and Syntactic Pattern Recognition (SSPR), pp. 310–317. Springer, 2012.
259
+
260
+ Marco Loog, Tom Viering, and Alexander Mey. Minimizers of the empirical risk and risk monotonicity. In Advances in Neural Information Processing Systems, pp. 7476–7485, 2019.
261
+
262
+ Yasaman Mahdaviyeh and Zacharie Naulet. Asymptotic risk of least squares minimum norm estimator under the spike covariance model. arXiv preprint arXiv:1912.13421, 2019.
263
+
264
+ Adam W Marcus, Daniel A Spielman, and Nikhil Srivastava. Ramanujan graphs and the solution of the kadison-singer problem. arXiv preprint arXiv:1408.4421, 2014.
265
+
266
+ Song Mei and Andrea Montanari. The generalization error of random features regression: Precise asymptotics and double descent curve. arXiv preprint arXiv:1908.05355, 2019.
267
+
268
+ Partha P. Mitra. Understanding overfitting peaks in generalization error: Analytical risk curves for l2 and l1 penalized interpolation. ArXiv, abs/1906.03667, 2019.
269
+
270
+ Vidya Muthukumar, Kailas Vodrahalli, and Anant Sahai. Harmless interpolation of noisy data in regression. arXiv preprint arXiv:1903.09139, 2019.
271
+
272
+ Preetum Nakkiran. More data can hurt for linear regression: Sample-wise double descent. arXiv preprint arXiv:1912.07242, 2019.
273
+
274
+ Preetum Nakkiran, Gal Kaplun, Yamini Bansal, Tristan Yang, Boaz Barak, and Ilya Sutskever. Deep double descent: Where bigger models and more data hurt. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ B1g5sA4twr.
275
+
276
+ Brady Neal, Sarthak Mittal, Aristide Baratin, Vinayak Tantia, Matthew Scicluna, Simon LacosteJulien, and Ioannis Mitliagkas. A modern take on the bias-variance tradeoff in neural networks. arXiv preprint arXiv:1810.08591, 2018.
277
+
278
+ Manfred Opper. Statistical mechanics of learning: Generalization. The Handbook of Brain Theory and Neural Networks, 922-925., 1995.
279
+
280
+ Manfred Opper. Learning to generalize. Frontiers of Life, 3(part 2), pp.763-775., 2001.
281
+
282
+ Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pp. 1177–1184, 2008.
283
+
284
+ Marina Skurichina and Robert PW Duin. Bagging, boosting and the random subspace method for linear classifiers. Pattern Analysis & Applications, 5(2):121–135, 2002.
285
+
286
+ Stefano Spigler, Mario Geiger, Stephane d’Ascoli, Levent Sagun, Giulio Biroli, and Matthieu Wyart.´ A jamming transition from under-to over-parametrization affects loss landscape and generalization. arXiv preprint arXiv:1810.09665, 2018.
287
+
288
+ Gerard V Trunk. A problem of dimensionality: A simple example. IEEE Transactions on pattern analysis and machine intelligence, (3):306–307, 1979.
289
+
290
+ Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
291
+
292
+ Ji Xu and Daniel J Hsu. On the number of variables to use in principal component regression. In Advances in Neural Information Processing Systems, pp. 5095–5104, 2019.
293
+
294
+ # A APPENDIX
295
+
296
+ In Section A.1 and A.2 we provide the proofs for sample-monotonicity and model-size monotonicity. In Section A.4 we include additional and omitted plots. In Section B we investigate whether monotonicity provably holds in more general models, and present a monotonicity conjecture for non-isotropic covariates.
297
+
298
+ # A.1 SAMPLE MONOTONICITY PROOFS
299
+
300
+ First we prove Lemma 1.
301
+
302
+ Proof of Lemma $^ { l }$ . For isotropic $x$ , the test risk is related to the parameter error as:
303
+
304
+ $$
305
+ \begin{array} { r l } & { R ( \hat { \beta } ) : = \underset { ( x , y ) \sim \mathcal { D } } { \mathbb { E } } [ ( \langle x , \hat { \beta } \rangle - y ) ^ { 2 } ] } \\ & { \quad \quad = \underset { x \sim \mathcal { N } ( 0 , I _ { d } ) , \eta \sim \mathcal { N } ( 0 , \sigma ^ { 2 } ) } { \mathbb { E } } [ ( \langle x , \hat { \beta } - \beta ^ { * } \rangle + \eta ) ^ { 2 } ] } \\ & { \quad \quad = | | \hat { \beta } - \beta ^ { * } | | _ { 2 } ^ { 2 } + \sigma ^ { 2 } } \end{array}
306
+ $$
307
+
308
+ Plugging in the form of $\hat { \beta } _ { n , \lambda }$ and expanding:
309
+
310
+ $$
311
+ \begin{array} { r l } & { \bar { R } ( \hat { \beta } _ { n , \lambda } ) : = \underset { X , y \sim \mathcal { D } ^ { n } } { \mathbb { E } } [ R ( \hat { \beta } _ { n , \lambda } ) ] } \\ & { = \mathbb { E } [ \| \hat { \beta } _ { n , \lambda } - \beta ^ { * } \| _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { = \underset { X , y } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } y - \beta \| _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { = \underset { X , \eta \sim \mathcal { N } ( 0 , \sigma ^ { 2 } I _ { n } ) } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } ( X \beta ^ { * } + \eta ) - \beta ^ { * } \| _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { = \underset { X } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } X \beta ^ { * } - \beta ^ { * } \| _ { 2 } ^ { 2 } ] + \underset { X , \eta } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } \eta \| _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { = \underset { X } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } X \beta ^ { * } - \beta ^ { * } \| _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { X } { \mathbb { E } } [ \| ( X ^ { T } X + \lambda I ) ^ { - 1 } X ^ { T } \| _ { F } ^ { 2 } ] + \sigma ^ { 2 } } \end{array}
312
+ $$
313
+
314
+ Now let $X \ = \ U \Sigma V ^ { T }$ be the full singular value decomposition of $X$ , with $U \ \in \ \mathbb { R } ^ { n \times n } , \Sigma \ \in$ $\mathbb { R } ^ { n \times d } , V \in \mathbb { R } ^ { d \times d }$ . Let $( \gamma _ { 1 } , \ldots \gamma _ { d } )$ denote the singular values, defining $\gamma _ { i } = 0$ for $i > \operatorname* { m i n } ( n , d )$ . Then, continuing:
315
+
316
+ $$
317
+ \begin{array} { r l } & { \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) = \underset { V , \Sigma } { \mathbb { E } } [ | | \mathrm { d i a g } ( \{ \frac { - \lambda } { \gamma _ { i } ^ { 2 } + \lambda } \} ) V ^ { T } \beta ^ { * } | | _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { \Sigma } { \mathbb { E } } [ \sum _ { i } \frac { \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ] + \sigma ^ { 2 } } \\ & { \quad \quad = \underset { z \sim \mathrm { U n i f } ( 1 ) \frac { \mathbb { E } } { \delta } } { \underbrace { \mathrm { U } \mathrm { E } } } [ | | \mathrm { d i a g } ( \{ \frac { - \lambda } { \gamma _ { i } ^ { 2 } + \lambda } \} ) z | | _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { \Sigma } { \mathbb { E } } [ \sum _ { i } \frac { \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ] + \sigma ^ { 2 } } \\ & { \quad \quad = \frac { | | \beta ^ { * } | | _ { 2 } ^ { 2 } } { d } \underset { \Sigma } { \mathbb { E } } [ \sum _ { i } \frac { \lambda ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ] + \sigma ^ { 2 } \underset { \Sigma } { \mathbb { E } } [ \sum _ { i } \frac { \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ] + \sigma ^ { 2 } } \\ & { \quad \quad = \underset { \Sigma } { \mathbb { E } } [ \sum _ { i } \frac { | | \beta ^ { * } | | _ { 2 } ^ { 2 } \lambda ^ { 2 } / d + \sigma ^ { 2 } \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ] + \sigma ^ { 2 } } \end{array}
318
+ $$
319
+
320
+ In Line (10) follows because by symmetry, the distribution of $V$ is a uniformly random orthonormal matrix, and $\Sigma$ is independent of $V$ . Thus, $z : = V ^ { T } \beta ^ { * }$ is distributed as a uniformly random point on the unit sphere of radius $| | \beta ^ { * } | | _ { 2 }$ .
321
+
322
+ Next we prove Lemma 2.
323
+
324
+ Proof of Lemma 2. First, we determine the optimal ridge parameter. Using Lemma 1, we have
325
+
326
+ $$
327
+ \begin{array} { r l } & { \frac { \partial } { \partial \lambda } \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) = \frac { \partial } { \partial \lambda } _ { ( \gamma _ { 1 } , \dots \gamma _ { d } ) \sim \Gamma } \left[ \displaystyle \sum _ { i } \frac { | | \beta | | _ { 2 } ^ { 2 } \lambda ^ { 2 } / d + \sigma ^ { 2 } \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } \right] } \\ & { = 2 ( | | \beta ^ { * } | | _ { 2 } ^ { 2 } \lambda / d - \sigma ^ { 2 } ) _ { ( \underbrace { ( \gamma _ { 1 } , \dots \gamma _ { d } ) \sim \Gamma } _ { > 0 } } \left[ \displaystyle \sum _ { i } \frac { \gamma _ { i } ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 3 } } \right] } \end{array}
328
+ $$
329
+
330
+ Thus, $\begin{array} { r } { \frac { \partial } { \partial \lambda } \overline { { R } } ( \widehat { \beta } _ { n , \lambda } ) = 0 \implies \lambda = \frac { d \sigma ^ { 2 } } { | | \beta ^ { * } | | _ { 2 } ^ { 2 } } } \end{array}$ and we conclude that $\begin{array} { r } { \lambda _ { n } ^ { \mathrm { o p t } } = \frac { d \sigma ^ { 2 } } { | | \beta ^ { * } | | _ { 2 } ^ { 2 } } } \end{array}$
331
+
332
+ For this optimal parameter, the test risk follows from Lemma 1 as
333
+
334
+ $$
335
+ \begin{array} { l } { \displaystyle \overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { o p t } } ) = \overline { { R } } ( \hat { \beta } _ { n , \lambda _ { n } ^ { \mathrm { o p t } } } ) } \\ { \displaystyle = \frac { \mathbb { E } } { ( \gamma _ { 1 } , \dots \gamma _ { d } ) \sim \Gamma _ { n } } \left[ \sum _ { i = 1 } ^ { d } \frac { \sigma ^ { 2 } } { \gamma _ { i } ^ { 2 } + d \sigma ^ { 2 } / | | \beta ^ { * } | | _ { 2 } ^ { 2 } } \right] + \sigma ^ { 2 } } \end{array}
336
+ $$
337
+
338
+ Proof of Theorem 2. We follow a similar proof strategy as in Theorem 1: we invoke singular value interlacing $( \widetilde { \gamma } _ { i } \geq \gamma _ { i } )$ for the data matrix when adding a single sample. We then apply Lemma 1 to eargue that the test risk varies monotonically with the singular values.
339
+
340
+ We have
341
+
342
+ $$
343
+ { \overline { { R } } } ( \hat { \beta } _ { n , \lambda } ) = \operatorname * { \mathbb { E } } _ { ( \gamma _ { 1 } , \dots \gamma _ { d } ) \sim \Gamma } [ \sum _ { i } \underbrace { | | \beta ^ { * } | | _ { 2 } ^ { 2 } \lambda ^ { 2 } / d + \sigma ^ { 2 } \gamma _ { i } ^ { 2 } } _ { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } ]
344
+ $$
345
+
346
+ and we compute how each term in the sum varies with $\gamma _ { i }$ :
347
+
348
+ $$
349
+ \begin{array} { l } { \displaystyle { \frac { \partial } { \partial \gamma _ { i } } \sum _ { i } S ( \gamma _ { i } ) = \frac { \partial } { \partial \gamma _ { i } } S ( \gamma _ { i } ) } } \\ { \displaystyle { \quad = ( \frac { - 2 \gamma _ { i } } { d } ) \frac { 2 | | \beta ^ { * } | | _ { 2 } ^ { 2 } \lambda ^ { 2 } + d \sigma ^ { 2 } ( \gamma _ { i } ^ { 2 } - \lambda ) } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 3 } } } } \end{array}
350
+ $$
351
+
352
+ Thus we have
353
+
354
+ $$
355
+ \lambda \geq \frac { d \sigma ^ { 2 } } { 2 \vert \vert \beta ^ { * } \vert \vert ^ { 2 } } \implies \frac { \partial } { \partial \gamma _ { i } } S ( \gamma _ { i } ) \leq 0
356
+ $$
357
+
358
+ By the coupling argument in Theorem 1, this implies that the test risk is monotonic:
359
+
360
+ $$
361
+ \begin{array} { r l } & { \overline { { R } } ( \hat { \beta } _ { n + 1 , \lambda } ) - \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) } \\ & { \quad = \underset { ( \widetilde { \gamma } _ { 1 } , \dots , \widetilde { \gamma } _ { d } ) \sim \Gamma _ { n + 1 } } { \mathbb { E } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } S ( \widetilde { \gamma } _ { i } ) \right] - \underset { ( \gamma _ { 1 } , \dots , \gamma _ { d } ) \sim \Gamma _ { n } } { \mathbb { E } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } S ( \gamma _ { i } ) \right] } \\ & { \quad = \underset { ( \{ \widetilde { \gamma } _ { i } \} , \{ \gamma _ { i } \} ) \sim \Pi } { \mathbb { E } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } S ( \widetilde { \gamma } _ { i } ) - S ( \gamma _ { i } ) \right] } \\ & { \quad \le 0 } \end{array}
362
+ $$
363
+
364
+ where $\Pi$ is the coupling. Line (17) follows from Equation (15), and the fact that the coupling obeys $\widetilde { \gamma } _ { i } \geq \gamma _ { i }$ . □
365
+
366
+ # A.2 PROJECTION MODEL PROOFS
367
+
368
+ Lemma 3. For all $\theta \in \mathbb { R } ^ { p }$ , $d , n \in \mathbb { N } ,$ , and $\lambda > 0 ;$ , let $\ b { X } \in \mathbb { R } ^ { n \times p }$ be a matrix with i.i.d. $\mathcal { N } ( 0 , 1 )$ entries. Let $P \in \mathbb { R } ^ { d \times p }$ be a random orthonormal matrix. Define $\widetilde { X } : = X P ^ { T }$ . Let $\left( \gamma _ { 1 } , \dots , \gamma _ { m } \right)$ be the singular values of the data matrix $\tilde { X } \in \mathbb { R } ^ { n \times d }$ , for $m : = \operatorname* { m a x } ( n , d )$ (with $\gamma _ { i } ~ = ~ 0$ for $i > \operatorname* { m i n } ( n , d ) )$ . Let $\Gamma _ { d }$ be the distribution of singular values $\left( \gamma _ { 1 } , \ldots , \gamma _ { m } \right)$ .
369
+
370
+ Then, the optimal ridge parameter is constant for all $d$ : $\begin{array} { r } { \lambda _ { d } ^ { \mathrm { o p t } } = \frac { p ^ { 2 } \widetilde \sigma ^ { 2 } } { d | | \theta | | _ { 2 } ^ { 2 } } } \end{array}$ . where we define $\widetilde { \sigma } ^ { 2 } : = \ :$ $\begin{array} { r } { \sigma ^ { 2 } + \frac { p - d } { p } | | \boldsymbol { \theta } | | _ { 2 } ^ { 2 } } \end{array}$ . Moreover, the optimal expected test risk can be written as
371
+
372
+ $$
373
+ \overline { { R } } ( \hat { \beta } _ { d } ^ { \mathrm { o p t } } ) = \widetilde { \sigma } ^ { 2 } + \underset { ( \gamma _ { 1 } , \ldots , \gamma _ { m } ) \sim \Gamma _ { d } } { \mathbb { E } } \left[ \sum _ { i = 1 } ^ { p } \frac { \widetilde { \sigma } ^ { 2 } } { \gamma _ { i } ^ { 2 } + \frac { \widetilde { \sigma } ^ { 2 } p ^ { 2 } } { d | | \theta | | _ { 2 } ^ { 2 } } } \right]
374
+ $$
375
+
376
+ Proof. This proof follows exactly analogously as the proof of Lemma 2 from Lemma 1, in Section A.1. □
377
+
378
+ Lemma 4. For all $\theta \in \mathbb { R } ^ { p }$ , $d , n \in \mathbb { N } ,$ , and $\lambda > 0$ , let $\ b { X } \in \mathbb { R } ^ { n \times p }$ be a matrix with i.i.d. $\mathcal { N } ( 0 , 1 )$
379
+ entries. Let $P \in \mathbb { R } ^ { d \times p }$ be a random orthonormal matrix. Define $\widetilde X : = X P ^ { T }$ and $\beta ^ { * } : = P \theta$ .
380
+
381
+ Let $\left( \gamma _ { 1 } , \dots , \gamma _ { m } \right)$ be the singular values of the data matrix $\tilde { X } \in \mathbb { R } ^ { n \times d }$ , for $m : = \operatorname* { m a x } ( n , d )$ (with $\gamma _ { i } = 0$ for $i > \operatorname* { m i n } ( n , d ) )$ . Let $\Gamma _ { d }$ be the distribution of singular values $\left( \gamma _ { 1 } , \dots , \gamma _ { m } \right)$ .
382
+
383
+ Then, the expected test risk is
384
+
385
+ $$
386
+ \begin{array} { r l } & { \overline { { R } } ( \hat { \beta } _ { d , \lambda } ) : = \underset { P } { \mathbb { E } } \underset { \widetilde { X } , \widetilde { y } \sim \mathcal { D } ^ { n } } { \mathbb { E } } [ R _ { P } ( \hat { \beta } _ { d , \lambda } ( \widetilde { X } , \overrightarrow { y } ) ] } \\ & { = \sigma ^ { 2 } + ( 1 - \frac { d } { p } ) | | \theta | | _ { 2 } ^ { 2 } } \\ & { + \underset { ( \gamma _ { 1 } , \dotsc , \gamma _ { m } ) \sim \Gamma _ { d } } { \mathbb { E } } \left[ \underset { i = 1 } { \overset { p } { \sum } } \frac { ( \sigma ^ { 2 } + \frac { p - d } { p } | | \theta | | _ { 2 } ^ { 2 } ) \gamma _ { i } ^ { 2 } + \frac { d } { p ^ { 2 } } | | \theta | | _ { 2 } ^ { 2 } \lambda ^ { 2 } } { ( \gamma _ { i } ^ { 2 } + \lambda ) ^ { 2 } } \right] } \end{array}
387
+ $$
388
+
389
+ Proof of Lemma 4. We first define the parameter that minimizes the population risk. It follows directly that:
390
+
391
+ $$
392
+ \beta _ { P } ^ { * } : = \underset { \beta \in \mathbb { R } ^ { d } } { \mathrm { a r g m i n } } R _ { P } ( \beta ) = P \theta
393
+ $$
394
+
395
+ First, we can expand the risk as
396
+
397
+ $$
398
+ \begin{array} { r l } & { R ( \hat { \beta } ) = \underset { ( \bar { x } , y ) \sim \mathcal { D } } { \mathbb { E } } [ ( \langle P x , \hat { \beta } \rangle - y ) ^ { 2 } ] } \\ & { \quad = \underset { ( \bar { x } , y ) \sim \mathcal { D } , \eta \sim \mathcal { N } ( 0 , \sigma ^ { 2 } ) } { \mathbb { E } } [ ( \langle x , P ^ { T } \hat { \beta } - \theta \rangle + \eta ) ^ { 2 } ] } \\ & { \quad = \sigma ^ { 2 } + \vert \vert \theta - P ^ { T } \hat { \beta } \vert \vert _ { 2 } ^ { 2 } } \\ & { \quad = \sigma ^ { 2 } + \vert \vert \theta - P ^ { T } \beta ^ { * } \vert \vert _ { 2 } ^ { 2 } + \vert \vert P ^ { T } \beta ^ { * } - P ^ { T } \hat { \beta } \vert \vert _ { 2 } ^ { 2 } } \\ & { \quad + 2 \langle ( \theta - P ^ { T } \beta ^ { * } ) , P ^ { T } \beta ^ { * } - P ^ { T } \hat { \beta } \rangle } \\ & { \quad = \sigma ^ { 2 } + \vert \vert \theta - P ^ { T } \beta ^ { * } \vert \vert _ { 2 } ^ { 2 } + \vert \vert P ^ { T } \beta ^ { * } - P ^ { T } \hat { \beta } \vert \vert _ { 2 } ^ { 2 } } \\ & { \quad = \sigma ^ { 2 } + \vert \vert \vert \theta - P ^ { T } P \theta \vert \vert _ { 2 } ^ { 2 } + \vert \vert \beta ^ { * } - \hat { \beta } \vert \vert _ { 2 } ^ { 2 } } \end{array}
399
+ $$
400
+
401
+ The cross terms in Line (22) vanish because the first-order optimality condition for $\beta ^ { * }$ implies that $\beta ^ { * }$ satisfies $P ( \theta ^ { * } - P ^ { T } \beta ^ { * } ) = 0$ . We now simplify each of the two remaining terms.
402
+
403
+ First, we have that:
404
+
405
+ $$
406
+ \underset { P } { \mathbb { E } } | | \theta - P ^ { T } P \theta | | _ { 2 } ^ { 2 } = ( 1 - \frac { d } { p } ) | | \theta | | _ { 2 } ^ { 2 }
407
+ $$
408
+
409
+ since $P ^ { T } P$ is an orthogonal projection onto a random $d$ -dimensional subspace.
410
+
411
+ Now, recall we have ${ \vec { y } } = X \theta + \eta$ where $\eta \sim \mathcal { N } ( 0 , \sigma ^ { 2 } I _ { n } )$ . Expand this as:
412
+
413
+ $$
414
+ \begin{array} { l } { { \vec { y } = X \theta + \eta } } \\ { { \ = X P ^ { T } P \theta + X ( 1 - P ^ { T } P ) \theta + \eta } } \\ { { \ = \widetilde { X } \beta ^ { * } + \varepsilon + \eta } } \end{array}
415
+ $$
416
+
417
+ where $\varepsilon : = X ( 1 - P ^ { T } P ) \theta$ . Note that conditioned on $P$ , the three terms $\widetilde { X } , \varepsilon$ and $\eta$ are conditionally independent, since $P ^ { T } P$ and $( I - P ^ { T } P )$ project $X$ onto orthogonal subspaces. And further, $\varepsilon \sim$ $\mathcal { N } ( \dot { 0 _ { \cdot } } | | ( 1 - P ^ { T } P ) \theta | | ^ { 2 } I _ { n } )$ .
418
+
419
+ $$
420
+ \begin{array} { r l } & { \frac { \mathbb { E } } { P } \underset { \tilde { X } , y } { \mathbb { E } } | | \hat { \boldsymbol { \beta } } - \boldsymbol { \beta } ^ { * } | | _ { 2 } ^ { 2 } } \\ & { = \underset { P } { \mathbb { E } } \underset { \tilde { X } , y } { \mathbb { E } } | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \boldsymbol { y } - \boldsymbol { \beta } ^ { * } | | _ { 2 } ^ { 2 } } \\ & { = \underset { P } { \mathbb { E } } \underset { \tilde { X } , y , \varepsilon , \eta } { \mathbb { E } } | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } ( \widetilde { X } \boldsymbol { \beta } ^ { * } + \varepsilon + \eta ) - \boldsymbol { \beta } ^ { * } | | _ { 2 } ^ { 2 } } \\ & { = \underset { P } { \overset { \mathbb { E } } { \mathbb { X } } } \underset { y , \varepsilon , \eta } { \mathbb { E } } | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \widetilde { X } \boldsymbol { \beta } ^ { * } - \boldsymbol { \beta } ^ { * } | | _ { 2 } ^ { 2 } } \\ & { = \underset { P } { \overset { \mathbb { E } } { \mathbb { X } } } \underset { y , \varepsilon , \eta } { \mathbb { E } } | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \widetilde { X } \boldsymbol { \beta } ^ { * } - \boldsymbol { \beta } ^ { * } | | _ { 2 } ^ { 2 } } \\ & { + \| ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \varepsilon | | _ { 2 } ^ { 2 } + | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \eta | | _ { 2 } ^ { 2 } ] } \end{array}
421
+ $$
422
+
423
+ Now, since $\widetilde { X }$ is conditionally independent of $\varepsilon$ conditioned on $P$ ,
424
+
425
+ $$
426
+ \begin{array} { r l } & { \frac { \mathbb { E } } { F } \underset { \tilde { X } , y , \varepsilon | P } { \mathbb { E } } \ \lVert ( \tilde { X } ^ { T } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { T } \varepsilon \rVert _ { 2 } ^ { 2 } } \\ & { = \mathbb { E } \ \underset { \tilde { Y } } { \mathbb { E } } \ [ \lVert ( \tilde { X } ^ { T } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { T } \rVert _ { F } ^ { 2 } \ \underset { \varepsilon | P } { \mathbb { E } } [ \lVert \varepsilon \rVert _ { 2 } ^ { 2 } ] } \\ & { = \frac { \mathbb { E } } { \frac { \mathbb { E } } { \tilde { X } } } \lVert ( \tilde { X } ^ { T } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { T } \rVert _ { F } ^ { 2 } \ \underset { \varepsilon , \varepsilon } { \mathbb { E } } [ \lVert \varepsilon \rVert _ { 2 } ^ { 2 } ] } \\ & { = \underset { \tilde { X } } { \mathbb { E } } [ \lVert ( \tilde { X } ^ { T } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { T } \rVert _ { F } ^ { 2 } ] \cdot \underset { { P } , X } { \mathbb { E } } [ \lVert X ( 1 - P ^ { T } P ) \theta \rVert _ { 2 } ^ { 2 } ] } \\ & { = \underset { \tilde { X } } { \mathbb { E } } [ \lVert ( \tilde { X } ^ { T } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { T } \rVert _ { F } ^ { 2 } ] ( \frac { p - d } { p } | \theta \rVert _ { 2 } ^ { 2 } ) } \end{array}
427
+ $$
428
+
429
+ where Line (37) holds because the marginal distribution of $\widetilde { X }$ does not depend on $P$ .
430
+
431
+ Similarly,
432
+
433
+ $$
434
+ \begin{array} { r l } & { \frac { \mathbb { E } } { P } \underset { \widetilde { X } , y , \eta | P } { \mathbb { E } } | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } \eta | | _ { 2 } ^ { 2 } } \\ & { = \sigma ^ { 2 } \underset { \widetilde { X } } { \mathbb { E } } [ | | ( \widetilde { X } ^ { T } \widetilde { X } + \lambda I ) ^ { - 1 } \widetilde { X } ^ { T } | | _ { F } ^ { 2 } ] } \end{array}
435
+ $$
436
+
437
+ Now let $\tilde { \cal X } \ = \ { \cal U } \Sigma { \cal V } ^ { T }$ be the full singular value decomposition of $\widetilde { X }$ , with $U \ \in \ \mathbb { R } ^ { n \times n } , \Sigma \ \in$ $\mathbb { R } ^ { n \times d } , V \in \mathbb { R } ^ { d \times d }$ . Let $( \gamma _ { 1 } , \dots \gamma _ { m } )$ denote the singular values, where $m = \operatorname* { m a x } ( n , d )$ and defining $\gamma _ { i } = 0$ for $i > \operatorname* { m i n } ( n , d )$ .
438
+
439
+ Observe that by symmetry, $\widetilde { X } = X P ^ { T }$ and $P$ are independent, because the joint distribution $( \widetilde { X } , P )$ is equivalent to the distribution $( \widetilde { X } Q , P Q )$ for a random orthonormal $Q \in \mathbb { R } ^ { p \times p }$ . Thus $\widetilde { X }$ and
440
+
441
+ $\beta ^ { * } = P \theta$ are also independent, and we have:
442
+
443
+ $$
444
+ \begin{array} { r l } & { \mathbb { E } \mathbb { E } \| \{ \hat { X } ^ { \prime } \} \hat { X } + \lambda \mathcal { I } \} ^ { - 1 } \hat { X } ^ { \prime } \hat { X } ^ { \prime } - \delta ^ { * } \} \| _ { 2 } ^ { 2 } } \\ & { = \frac { 1 } { b } \mathbb { E } \hat { X } ^ { \prime } \| \mathrm { H i s s } ( \hat { \mathcal { Z } } _ { \frac { e } { 2 } } ^ { - 1 } \lambda ) b ^ { \mathcal { N } / 2 } \| _ { 2 } ^ { 2 } } \\ & { = \mathbb { E } \mathbb { E } \mathbb { E } \mathbb { E } \mathbb { E } \bigg [ \| \mathrm { H i s s } ( \hat { \mathcal { Z } } _ { \frac { e } { 2 } } ^ { - 1 } \lambda ) \| ^ { \mathcal { N } / 2 } b ^ { \mathcal { N } / 2 } \| _ { 2 } ^ { 2 } } \\ & { - \mathbb { E } \mathbb { E } \mathbb { E } \mathbb { E } \bigg [ \| \mathrm { H i s s } ( \hat { \mathcal { Z } } _ { \frac { e } { 2 } } ^ { - 1 } \lambda ) \| ^ { \mathcal { N } / 2 } \bigg ] \| _ { 2 } ^ { 2 } } \\ & { = \mathbb { E } _ { \hat { X } ^ { \prime } \sim \mathrm { N } \times \mathrm { W } ( \hat { \mathcal { Z } } ) } \mathbb { E } \| \mathrm { H i s s } ( \hat { \mathcal { Z } } _ { \frac { e } { 2 } } ^ { - 1 } \lambda ) \| ^ { \mathcal { N } / 2 } } \\ & { = \mathbb { E } \mathbb { E } \| \hat { X } ^ { \prime } \| ^ { 2 } \mathbb { E } \| \mathrm { H } ^ { 2 } \mathbb { E } \bigg [ \mathrm { H } _ { \frac { e } { 2 } } ^ { - 1 } \lambda \Big ] ^ { \| \mathcal { N } / 2 } } \\ & { = \frac { 1 } { b } \mathbb { E } \hat { X } ^ { \prime } \| ^ { 2 } \mathbb { E } \bigg [ \mathcal { P } _ { \frac { e } { 2 } } ^ { - 1 } \frac { \lambda ^ { 2 } } { b } \Big ] ^ { 2 } } \\ & = \frac { 1 } { b } \mathbb { E } \frac { \hat { X } ^ { \prime } } { \| \mathcal { P } \| \mathcal { P } \| ^ { 2 } \| _ { 2 } ^ { 2 } } \mathbb { E } \bigg [ \int _ { 0 } ^ { \mathcal { N } / 2 } \frac { \lambda ^ { 2 } } \| \mathcal { P } \| _ { 2 } ^ { 2 } \end{array}
445
+ $$
446
+
447
+ Finally, continuing from Line (33), we can use Lines (38), (40), and (47) to write:
448
+
449
+ $$
450
+ \begin{array} { r l } & { \frac { \mathbb { E } } { \rho } \frac { \| \tilde { \rho } - \tilde { \rho } ^ { - 1 } \| ^ { 2 } } { \mathcal { F } _ { x , y } } } \\ & { = ( \sigma ^ { 2 } + \frac { \rho - \tilde { \rho } - d } { p } \| \theta \| _ { 2 } ^ { 2 } \frac { \mathbb { E } \| ( \tilde { X } ^ { \mathcal { T } } \tilde { X } + \lambda I ) ^ { - 1 } \tilde { X } ^ { \mathcal { T } } \| _ { \mathcal { F } _ { x } ^ { 1 } } ^ { 2 } } { \mathcal { F } _ { x } ^ { 1 } } } \\ & { + \frac { d } { \gamma } \| \theta \| _ { 2 } ^ { 2 } \frac { \mathbb { E } } { \varepsilon } \| \sum _ { i } ^ { 2 } \frac { \lambda ^ { 2 } } { ( \sqrt { d } ^ { 2 } + \lambda I ) ^ { 2 } } | } \\ & { = ( \sigma ^ { 2 } + \frac { p - d } { p } \| \theta \| _ { 2 } ^ { 2 } ) \frac { \mathbb { E } } { \Sigma } \frac { \gamma ^ { 2 } } { \varepsilon } \langle \frac { \eta _ { i } ^ { 2 } } { ( \sqrt { d } ^ { 2 } + \lambda I ) ^ { 2 } } | } \\ & { + \frac { d } { \gamma ^ { 2 } } \| \theta \| _ { 2 } ^ { 2 } \frac { \mathbb { E } } { \Sigma } \frac { \lambda ^ { 2 } } { \langle \frac { \eta _ { i } ^ { 2 } + \lambda I \rangle ^ { 2 } } { \varepsilon } } | } \\ & = \frac { \mathbb { E } } { \nu } \langle \frac { ( \sigma ^ { 2 } + \frac { p - d - \tilde { \rho } - \tilde { \rho } - \tilde { \rho } - \tilde { \rho } } { i } ) | \theta \rangle _ { 2 } ^ { 2 } \sqrt { \frac { \lambda ^ { 2 } } { \varepsilon } + \frac { d } { \gamma ^ { 2 } } | \theta | _ { 2 } ^ { 2 } \lambda ^ { 2 } } } \end{array}
451
+ $$
452
+
453
+ Now, we can continue from Line (24), and apply lines (25), to conclude:
454
+
455
+ $$
456
+ \begin{array} { r l } & { \mathbb { E } \big [ R ( \hat { \beta } ) \big ] = \sigma ^ { 2 } + \mathbb { E } [ | | \theta - P ^ { T } P \theta | | _ { 2 } ^ { 2 } ] + \mathbb { E } [ | | \beta ^ { * } - \hat { \beta } | | _ { 2 } ^ { 2 } ] } \\ & { \qquad = \sigma ^ { 2 } + ( 1 - \frac { d } { p } ) | | \theta | | _ { 2 } ^ { 2 } } \\ & { \qquad + \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { p } \frac { \big ( \sigma ^ { 2 } + \frac { p - d } { p } | | \theta | | _ { 2 } ^ { 2 } \big ) \gamma _ { i } ^ { 2 } + \frac { d } { p ^ { 2 } } | | \theta | | _ { 2 } ^ { 2 } \lambda ^ { 2 } } { \big ( \gamma _ { i } ^ { 2 } + \lambda \big ) ^ { 2 } } \right] } \end{array}
457
+ $$
458
+
459
+ Proof of Theorem 3. This follows analogously to the proof of Theorem 1, Let $\widetilde { X } _ { d }$ and $\widetilde { X } _ { d + 1 }$ be the observed data matrices for $d$ and $d + 1$ e emodel size. As in Theorem 1, there exists a coupling $\Pi$ between the distributions $\Gamma _ { d }$ and $\Gamma _ { d + 1 }$ of the singular values of $\widetilde { X } _ { d }$ and $\widetilde { X } _ { d + 1 }$ such that these singular values are interlaced.
460
+
461
+ Thus by Lemma 3,
462
+
463
+ $$
464
+ \begin{array} { l } { \overline { { R } } ( \hat { \beta } _ { d } ^ { \mathrm { o p t } } ) = \widetilde { \sigma } ^ { 2 } + \underset { ( \gamma _ { 1 } , \ldots , \gamma _ { m } ) \sim \Gamma _ { d + 1 } } { \mathbb { E } } \left[ \overset { p } { \underset { i = 1 } { \sum } } \frac { \widetilde { \sigma } ^ { 2 } } { \gamma _ { i } ^ { 2 } + \frac { \widetilde { \sigma } ^ { 2 } p ^ { 2 } } { d | \boldsymbol { \theta } | | _ { 2 } ^ { 2 } } } \right] } \\ { \geq \widetilde { \sigma } ^ { 2 } + \underset { ( \widetilde { \gamma } _ { 1 } , \ldots , \widetilde { \gamma } _ { m } ) \sim \Gamma _ { d + 1 } } { \mathbb { E } } \left[ \overset { p } { \underset { i = 1 } { \sum } } \frac { \widetilde { \sigma } ^ { 2 } } { \widetilde { \gamma } _ { i } ^ { 2 } + \frac { \widetilde { \sigma } ^ { 2 } p ^ { 2 } } { d | \boldsymbol { \theta } | | _ { 2 } ^ { 2 } } } \right] } \\ { = \overline { { R } } ( \hat { \beta } _ { d + 1 } ^ { \mathrm { o p t } } ) } \end{array}
465
+ $$
466
+
467
+ # A.3 NONISOTROPIC REDUCTION
468
+
469
+ Here we observe that results on isotropic regression in Section 2 also imply that ridge regression can be made sample-monotonic even for non-isotropic covariates, if an appropriate regularzier is applied. Specifically, the regularizer depends on the covariance on the inputs. This follows from a general equivalence between the non-isotropic and isotropic problems.
470
+
471
+ Lemma 5. For all $n \in \mathbb { N } , d \in \mathbb { N } , \lambda \in \mathbb { R } , \sigma \in \mathbb { R } ,$ covariance $\Sigma \in \mathbb { R } ^ { d \times d }$ , PSD matrix $M \in \mathbb { R } ^ { d \times d }$ and ground-truth $\beta ^ { * } \in \mathbb { R } ^ { d }$ , the following holds.
472
+
473
+ Consider the following two problems:
474
+
475
+ 1. Regularized regression on isotropic covariates, and an $M$ -regularizer. That is, suppose $n$ samples $( x , y )$ are drawn with covariates $x \sim \mathcal { N } ( 0 , I _ { d } )$ and response $y = \langle \beta ^ { * } , x \rangle +$ $\mathcal { N } ( 0 , \bar { \sigma } ^ { 2 } )$ . Let $\ b { \hat { X } } \in \mathbb { R } ^ { n \times d }$ be the matrix of covariates, and $\vec { y }$ the vector of responses. Consider
476
+
477
+ $$
478
+ { \hat { \beta } } _ { \lambda } : = \operatorname * { a r g m i n } _ { \beta } | | X \beta - { \vec { y } } | | _ { 2 } ^ { 2 } + \lambda | | \beta | | _ { M } ^ { 2 }
479
+ $$
480
+
481
+ Let $\overline { { R } } = \mathbb { E } _ { X , y } [ | | \hat { \beta } - \beta ^ { * } | | _ { 2 } ^ { 2 } ] + \sigma ^ { 2 }$ be the expected test risk of the above estimator.
482
+
483
+ 2. Regularized regression with covariance $\Sigma$ , and an $( \Sigma ^ { 1 / 2 } M \Sigma ^ { 1 / 2 } )$ -regularizer. That is, suppose $n$ samples $( \widetilde { x } , y )$ are drawn with covariates $\widetilde { x } \sim \mathcal { N } ( 0 , \Sigma )$ and response $y =$ $\langle z ^ { \ast } , \widetilde { x } \rangle + \mathcal { N } ( 0 , \widetilde { \sigma } ^ { 2 } )$ e, for
484
+
485
+ $$
486
+ z ^ { * } = \Sigma ^ { - 1 / 2 } \beta ^ { * }
487
+ $$
488
+
489
+ Let $\widetilde { X } \in \mathbb { R } ^ { n \times d }$ be the matrix of covariates, and $\vec { y }$ the vector of responses. Consider
490
+
491
+ $$
492
+ \hat { z } _ { \lambda } : = \operatorname * { a r g m i n } _ { z } | | \widetilde { X } z - \vec { y } | | _ { 2 } ^ { 2 } + \lambda | | z | | _ { \Sigma ^ { 1 / 2 } M \Sigma ^ { 1 / 2 } } ^ { 2 }
493
+ $$
494
+
495
+ Let $\widetilde { R } = \mathbb { E } _ { \widetilde { X } , y } [ | | \hat { z } - z ^ { * } | | _ { \Sigma } ^ { 2 } ] + \sigma ^ { 2 }$ be the expected test risk of the above estimator.
496
+
497
+ Then, the expected test risks of the above two problems are identical:
498
+
499
+ $$
500
+ \overline { { R } } = \widetilde { R }
501
+ $$
502
+
503
+ Proof of Lemma 5. The distribution of $\widetilde { X }$ in the Problem 2 is equivalent to $X \Sigma ^ { 1 / 2 }$ , where $X$ is as in Problem 1. Thus, the two settings are equivalent by the change-of-variable $\beta = \Sigma ^ { 1 / 2 } z$ . Specifically,
504
+
505
+ $$
506
+ \begin{array} { r l } & { \hat { z } _ { \lambda } : = \underset { z } { \mathrm { a r g m i n } } \left| \lvert \tilde { X } z - \bar { y } \rvert \right| _ { 2 } ^ { 2 } + \lambda \lvert | z \rvert | _ { \Sigma ^ { 1 / 2 } M \Sigma ^ { 1 / 2 } } ^ { 2 } } \\ & { = \underset { z } { \mathrm { a r g m i n } } \left| \lvert X \Sigma ^ { 1 / 2 } z - \bar { y } \rvert \right| _ { 2 } ^ { 2 } + \lambda z ^ { T } \Sigma ^ { 1 / 2 } M \Sigma ^ { 1 / 2 } z } \\ & { = \underset { z } { \mathrm { a r g m i n } } \left| \lvert X \Sigma ^ { 1 / 2 } z - \bar { y } \rvert \right| _ { 2 } ^ { 2 } + \lambda z ^ { T } \Sigma ^ { 1 / 2 } M \Sigma ^ { 1 / 2 } z } \\ & { = \Sigma ^ { - 1 / 2 } \underset { \beta = \Sigma ^ { 1 / 2 } z } { \mathrm { a r g m i n } } \left| \lvert X \beta - \bar { y } \rvert \right| _ { 2 } ^ { 2 } + \lambda \beta ^ { T } M \beta } \end{array}
507
+ $$
508
+
509
+ Further, the response $\langle z ^ { * } , { \widetilde { x } } \rangle = \langle \beta , x \rangle$ , and the test risk transforms identically:
510
+
511
+ $$
512
+ \begin{array} { r } { \widetilde { R } = \underset { \widetilde { X } , y } { \mathbb { E } } \left[ \vert \vert \hat { z } - z ^ { * } \vert \vert _ { \Sigma } ^ { 2 } \right] + \sigma ^ { 2 } } \\ { = \underset { X , y } { \mathbb { E } } \left[ \vert \vert \hat { \beta } - \beta ^ { * } \vert \vert _ { 2 } ^ { 2 } \right] + \sigma ^ { 2 } } \\ { = \overline { { R } } } \end{array}
513
+ $$
514
+
515
+ This implies that if the covariance $\Sigma$ is known, then ridge regression with a $\Sigma ^ { - 1 }$ regularizer is sample-monotonic.
516
+
517
+ Theorem 5. For all $n \in \mathbb { N } , d \in \mathbb { N } , \sigma \in \mathbb { R } ,$ , covariance $\Sigma \in \mathbb { R } ^ { d \times d }$ , and ground-truths $\beta ^ { * } \in \mathbb { R } ^ { d }$ , th e following holds.
518
+
519
+ Suppose $n$ samples $( x , y )$ are drawn with covariates $x \sim \mathcal { N } ( 0 , \Sigma )$ and response $y = \langle \beta ^ { * } , x \rangle +$ ${ \mathcal { N } } ( 0 , \sigma ^ { 2 } )$ . Let $\ b { X } \in \mathbb { R } ^ { n \times d }$ be the matrix of covariates, and $\vec { y }$ the vector of responses. For $\lambda > 0$ , consider the ridge regression estimator with $\Sigma ^ { - 1 }$ -regularizer:
520
+
521
+ $$
522
+ \hat { \beta } _ { n , \lambda } : = \operatorname * { a r g m i n } _ { \boldsymbol { \beta } } \| X \boldsymbol { \beta } - \vec { y } \| _ { 2 } ^ { 2 } + \lambda \| \boldsymbol { \beta } \| _ { \Sigma ^ { - 1 } } ^ { 2 }
523
+ $$
524
+
525
+ Let $\overline { { R } } ( \hat { \beta } _ { n , \lambda } ) : = \mathbb { E } _ { \hat { \beta } } \| \hat { \beta } - \beta ^ { * } \| _ { \Sigma } + \sigma ^ { 2 }$ be the expected test risk of the above estimator. Let $\lambda _ { n } ^ { \mathrm { o p t } }$ be the optimal ridge parameter (that achieves the minimum expected risk) given $n$ samples:
526
+
527
+ $$
528
+ \lambda _ { n } ^ { \mathrm { o p t } } : = \operatorname * { a r g m i n } _ { \lambda } \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) )
529
+ $$
530
+
531
+ And let $\hat { \beta } _ { n } ^ { \mathrm { { o p t } } }$ be the estimator that corresponds to the $\lambda _ { n } ^ { \mathrm { o p t } }$ . Then, the expected test risk of optimallyregularized linear regression is monotonic in samples:
532
+
533
+ $$
534
+ \overline { { R } } ( \hat { \beta } _ { n + 1 } ^ { \mathrm { o p t } } ) \leq \overline { { R } } ( \hat { \beta } _ { n } ^ { \mathrm { o p t } } )
535
+ $$
536
+
537
+ Proof. This follows directly by applying the reduction in Lemma 5 for $M = I _ { d }$ to reduce to the isotropic case, and then applying the monotonicity of isotropic regression from Theorem 1. □
538
+
539
+ # A.4 ADDITIONAL PLOTS
540
+
541
+ We apply random features to Fashion-MNIST Xiao et al. (2017), an image classification problem with 10 classes. Input images $x \in \mathbb { R } ^ { d }$ are normalized and flattened to $[ - \bar { 1 } , 1 ] ^ { d }$ for $d = 7 8 4$ . Class labels are encoded as one-hot vectors $y \in \{ \vec { e _ { 1 } } , \dots e _ { 1 0 } ^ { } \} \subset \mathbb { R } ^ { 1 0 }$ .
542
+
543
+ # B TOWARDS MONOTONICITY WITH GENERAL COVARIATES
544
+
545
+ Here we investigate whether monotonicity provably holds in more general models, inspired by the experimental results. As a first step, we consider Gaussian (but not isotropic) covariances and homeostatic noise. That is, we consider ridge regression in the setting of Section 2, but with $x \sim \mathcal { N } ( 0 , \Sigma )$ , and $y \sim \langle x , \beta ^ { * } \rangle + N ( 0 , \sigma ^ { 2 } )$ . In this section, we observe that ridge regression can be made sample-monotonic with a modified regularizer. We also conjecture that ridge regression is sample-monotonic without modifying the regularizer, and we outline a potential proof strategy along with numerical evidence.
546
+
547
+ # B.1 ADAPTIVE REGULARIZATION
548
+
549
+ The results on isotropic regression in Section 2 imply that ridge regression can be made samplemonotonic even for non-isotropic covariates, if an appropriate regularizer is applied. Specifically, the appropriate regularizer depends on the covariance of the inputs. For $\boldsymbol { x } \sim \mathcal { N } ( 0 , \Sigma )$ , the following estimator is sample-monotonic for optimally-tuned $\lambda$ : $\begin{array} { r } { \hat { \beta } _ { n , \lambda } : = \operatorname * { a r g m i n } _ { \boldsymbol { \beta } } \| X \boldsymbol { \beta } - \vec { y } \| _ { 2 } ^ { 2 } + \lambda \| \boldsymbol { \beta } \| _ { \Sigma ^ { - 1 } } ^ { 2 } } \end{array}$ . This follows directly from Theorem 1 by applying a change-of-variable; full details of this equivalence are in Section A.3. Note that if the population covariance $\Sigma$ is not known, it can potentially be estimated from unlabeled data.
550
+
551
+ ![](images/6d706f197addd390fb2defce66fd1cd5af413a8242fbc58ab89186d03af9186f.jpg)
552
+ Test Error for Regularized Random Features
553
+
554
+ (a) Test Classification Error vs. Number of Training Samples.
555
+
556
+ ![](images/ce3f799d5bd5415e26ca617c4e47e654875a8b6c2557b5bf3b3c7007b6a14a4f.jpg)
557
+ Test Errorfor Regularized Random Features
558
+ (b) Test Classification Error vs. Model Size (Number of Random Features).
559
+
560
+ Figure 4: Double-descent for Random ReLU Features. Test classification error as a function of model size and sample size for Random ReLU Features on Fashion-MNIST. Left: with $D = 5 0 0$ features. Right: with $n = 5 0 0$ samples. See Figures 7, 8 for the corresponding test Mean Squared Error. See Appendix D of Nakkiran et al. (2020) for the performance of these unregularized models plotted across Num. Samples $\times$ Model Size simultaneously.
561
+
562
+ ![](images/05df2a46592e323dc1205edaa5fa11d2355d7bba6df96212a7b9f700cd4a121b.jpg)
563
+ Figure 5: Train Error vs. Model Size for 5-layer CNNs on CIFAR-100, with $\ell _ { 2 }$ regularization (weight decay).
564
+
565
+ # B.2 TOWARDS PROVING MONOTONICITY
566
+
567
+ We conjecture that optimally-regularized ridge regression is sample-monotonic for non-isotropic covariates, even without modifying the regularizer (as suggested by the experiment in Figure 2). We derive a sufficient condition for monotonicity, which we have numerically verified in a variety of instances. Specifically, we conjecture the following.
568
+
569
+ Conjecture 1. For all $d \in \mathbb { N }$ , and all PSD covariances $\Sigma \in \mathbb { R } ^ { d \times d }$ , consider the distribution on $( x , y )$ where $x \sim \mathcal { N } ( 0 , \Sigma )$ , and $y \sim \langle x , \beta ^ { * } \rangle + \mathcal { N } ( 0 , \sigma ^ { 2 } )$ . Then, we conjecture that the expected test risk of the ridge regression estimator: $\begin{array} { r } { \hat { \beta } _ { n , \lambda } : = \operatorname * { a r g m i n } _ { \boldsymbol { \beta } } \| X { \boldsymbol { \beta } } - \vec { y } \| _ { 2 } ^ { 2 } + \lambda \| { \boldsymbol { \beta } } \| _ { 2 } ^ { 2 } } \end{array}$ for optimally-tuned $\lambda \geq 0$ , is monotone non-increasing in number of samples $n$ . That is, for all $n \in \mathbb { N }$ ,
570
+
571
+ $$
572
+ \operatorname * { i n f } _ { \lambda \geq 0 } \overline { { { R } } } ( \hat { \beta } _ { n + 1 , \lambda } ) \leq \operatorname * { i n f } _ { \lambda \geq 0 } \overline { { { R } } } ( \hat { \beta } _ { n , \lambda } )
573
+ $$
574
+
575
+ where we define $\begin{array} { r } { \hat { \beta } _ { n , 0 } : = \operatorname* { l i m } _ { \lambda \to 0 + } \hat { \beta } _ { n , \lambda } = X ^ { \dagger } y } \end{array}$ .
576
+
577
+ ![](images/d4048491df9a41611fd80fea0aeac569328ee316a77886c71b4c9d4ba9170d40.jpg)
578
+ Figure 6: Train MSE vs. Num. Samples for Non-Isotropic Ridge Regression in $d = 3 0$ dimensions, in the setting of Figure 2. Plotting train MSE: $\begin{array} { r } { \frac { 1 } { n } | | X \hat { \boldsymbol { \beta } } - \vec { y } | | _ { 2 } ^ { 2 } } \end{array}$ .
579
+
580
+ ![](images/aa84a8ffbd2beefb1d745ab29a4ccc613c56c1dfa1eef8d51380a0483dcffecb.jpg)
581
+ Figure 7: Test Mean Squared Error vs. Num Train Samples for Random ReLU Features on FashionMNIST, with $D = 5 0 0$ features.
582
+
583
+ In Appendix B.3 we present a technical conjecture in random matrix theory (Conjecture 2) which suffices to prove Conjecture 1. Proving this Conjecture 2 presents a number of technical challenges, but we have numerically verified it in a variety of cases. It can also be shown that Conjecture 2 is true when $Q = I$ , corresponding to isotropic covariates. We prove the reduction between Conjecture 2 and 1 in Appendix B.3.
584
+
585
+ # B.3 MONOTONICITY CONJECTURE PROOFS
586
+
587
+ In order to establish Conjecture 1, it is sufficient to prove the following technical conjecture.
588
+
589
+ ![](images/8eda0db61a5bd63cb07df9565b6981c5a80a7fd865e013f9ce281e419515418e.jpg)
590
+ Figure 8: Test Mean Squared Error vs. Num Features for Random ReLU Features on FashionMNIST, with $n = 5 0 0$ samples.
591
+
592
+ Conjecture 2. For all $n \in \mathbb { N } , d \geq n , \lambda > 0$ , symmetric positive definite matrix $Q \in \mathbb { R } ^ { d \times d }$ , the following holds.
593
+
594
+ Define
595
+
596
+ $$
597
+ G _ { \lambda } ^ { n } : = \lambda ^ { 2 } \underset { X } { \mathbb { E } } [ ( X ^ { T } X + \lambda Q ) ^ { - 2 } ]
598
+ $$
599
+
600
+ where $\ b { X } \in \mathbb { R } ^ { n \times d }$ is sampled with each entry i.i.d. $\mathcal { N } ( 0 , 1 )$ . Similarly, define
601
+
602
+ $$
603
+ H _ { \lambda } ^ { n } : = \mathbb { E } [ | | X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } | | _ { F } ^ { 2 } ]
604
+ $$
605
+
606
+ The expected test risk for $n$ samples can be expressed as:
607
+
608
+ $$
609
+ \overline { { { R } } } ( \hat { \beta } _ { n , \lambda } ) = ( \beta ^ { * } ) ^ { T } G _ { \lambda } ^ { n } \beta ^ { * } + \sigma ^ { 2 } H _ { \lambda } ^ { n } + \sigma ^ { 2 }
610
+ $$
611
+
612
+ Then, we conjecture that the following two conditions hold.
613
+
614
+ 1.
615
+
616
+ $$
617
+ G _ { \lambda } ^ { n } \succeq G _ { \lambda } ^ { n + 1 }
618
+ $$
619
+
620
+ 2.
621
+
622
+ $$
623
+ ( G _ { \lambda } ^ { n } - G _ { \lambda } ^ { n + 1 } ) - ( H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } ) \frac { d G _ { \lambda } ^ { n } / d \lambda } { d H _ { \lambda } ^ { n } / d \lambda } \succeq 0
624
+ $$
625
+
626
+ Lemma 6. Conjecture 2 implies Conjecture $^ { l }$
627
+
628
+ Proof. By the reduction in Section A.3, showing monotonicity for non-isotropic regression with an isotropic regularizer is equivalent to showing monotonicity for isotropic regression with a nonisotropic regularizer. Thus, we consider the latter. Specifically, Conjecture 1 is equivalent to showing monotonicity for the estimator
629
+
630
+ $$
631
+ \begin{array} { r l } { { \hat { \beta } _ { n , \lambda } : = \operatorname * { a r g m i n } _ { \beta } \| X \beta - \vec { y } \| _ { 2 } ^ { 2 } + \lambda \| \beta \| _ { \Sigma ^ { - 1 } } ^ { 2 } } } \\ & { = ( X ^ { T } X + \lambda \Sigma ^ { - 1 } ) ^ { - 1 } X ^ { T } y } \end{array}
632
+ $$
633
+
634
+ where $x \sim \mathcal { N } ( 0 , I )$ is isotropic, and $y \sim \langle x , \beta ^ { * } \rangle + \mathcal { N } ( 0 , \sigma ^ { 2 } )$ .
635
+
636
+ Now, letting $\boldsymbol { Q } : = \boldsymbol { \Sigma } ^ { - 1 }$ , the expected test risk of this estimator for $n$ samples is:
637
+
638
+ $$
639
+ \begin{array} { r l } & { \mathbb { E } [ \left. \hat { \beta } _ { n , \lambda } \right. = \underset { X , y } { \mathbb { E } } [ \left. \hat { \beta } _ { n , \lambda } - \beta ^ { * } \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { \quad = \underset { X , y } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } y - \beta ^ { * } \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { \quad = \underset { X , \eta = N ; 0 } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } ( X \beta ^ { * } + \eta ) - \beta ^ { * } \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { \quad = \underset { X , \eta = N ; 0 } { \mathbb { E } } [ ( 0 , \lambda ^ { 2 } Y ^ { T } \eta _ { n } ^ { 2 } ) ] \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } ( X \beta ^ { * } + \eta ) - \beta ^ { * } \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { \quad = \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } X \beta ^ { * } - \beta ^ { * } ) \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } \right. _ { F } ^ { 2 } ] + \sigma ^ { 2 } } \\ & { \quad = \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } ( X ^ { T } X + \lambda Q - \lambda Q ) \beta ^ { * } - \beta ^ { * } ) \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } \right. _ { F } ^ { 2 } ] } \\ & \quad = \lambda ^ { 2 } \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } \right. _ { 2 } ^ { 2 } ] + \sigma ^ { 2 } \underset { X } { \mathbb { E } } [ \left. ( X ^ { T } X + \lambda Q ) ^ { - 1 } X ^ { T } \right. _ { F } ^ { 2 } ] + \sigma \end{array}
640
+ $$
641
+
642
+ Consider the infimum
643
+
644
+ $$
645
+ \operatorname* { i n f } _ { \lambda \geq 0 } { \overline { { R } } } ( { \hat { \beta } } _ { n , \lambda } )
646
+ $$
647
+
648
+ We consider several cases below.
649
+
650
+ Case (1). Suppose the infimum in Equation 71 is achieved in the limit $\lambda \to + \infty$ . In this case, monotonicity trivially holds, since
651
+
652
+ $$
653
+ \operatorname* { l i m } _ { \lambda \to \infty } \overline { { { R } } } ( \hat { \beta } _ { n , \lambda } ) = \overline { { { R } } } ( \vec { 0 } ) = \operatorname* { l i m } _ { \lambda \to \infty } \overline { { { R } } } ( \hat { \beta } _ { n + 1 , \lambda } )
654
+ $$
655
+
656
+ Case (2). Suppose the infimum in Equation 71 is achieved by some $\lambda = \lambda _ { n } ^ { \mathrm { o p t } }$ in the interior of the set $( 0 , \infty )$ .
657
+
658
+ Because $\overline { { R } } ( \hat { \beta } _ { n , \lambda } )$ is continuous and differentiable in $\lambda$ for all $\lambda \in ( 0 , \infty )$ , we have that $\lambda _ { n } ^ { \mathrm { o p t } }$ must satisfy the following first-order optimality condition:
659
+
660
+ $$
661
+ \begin{array} { r } { \frac { d \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) } { d \lambda } \Big | _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } } = 0 } \\ { \implies ( \beta ^ { * } ) ^ { T } \frac { d G _ { \lambda } ^ { n } } { d \lambda } \beta ^ { * } + \sigma ^ { 2 } \frac { d H _ { \lambda } ^ { n } } { d \lambda } \Big | _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } } = 0 } \end{array}
662
+ $$
663
+
664
+ We will later use this condition to show monotonicity.
665
+
666
+ Case (3). Suppose the infimum in Equation 71 is achieved at $\lambda _ { n } ^ { \mathrm { o p t } } = 0$ . Recall, we define $\hat { \beta } _ { n , 0 } : =$ $\mathrm { l i m } _ { \lambda \to 0 + } \hat { \beta } _ { n , \lambda }$ . This means that,
667
+
668
+ $$
669
+ \frac { d \overline { { R } } ( \hat { \beta } _ { n , \lambda } ) } { d \lambda } \Big | _ { \lambda = 0 } = ( \beta ^ { * } ) ^ { T } \frac { d G _ { \lambda } ^ { n } } { d \lambda } \beta ^ { * } + \sigma ^ { 2 } \frac { d H _ { \lambda } ^ { n } } { d \lambda } \Big | _ { \lambda = 0 } \geq 0
670
+ $$
671
+
672
+ Note that since $\begin{array} { r } { \frac { d H _ { \lambda } ^ { n } } { d \lambda } \leq 0 } \end{array}$ , both Equations (73) and (74) in Case (2) and Case (3) respectively imply that
673
+
674
+ $$
675
+ \sigma ^ { 2 } \leq - \frac { ( \beta ^ { * } ) ^ { T } ( \frac { d G _ { \lambda } ^ { n } } { d \lambda } ) \beta ^ { * } } { d H _ { \lambda } ^ { n } / d \lambda } \Big \vert _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } }
676
+ $$
677
+
678
+ Now, assuming Conjecture 2, we will show that the choice of $\lambda _ { n } ^ { \mathrm { o p t } }$ in Cases (2) and (3) has nonincreasing test risk for $( n + 1 )$ samples. That is,
679
+
680
+ $$
681
+ \overline { { R } } ( \widehat { \beta } _ { n , \lambda _ { n } ^ { \mathrm { o p t } } } ) \geq \overline { { R } } ( \widehat { \beta } _ { n + 1 , \lambda _ { n } ^ { \mathrm { o p t } } } )
682
+ $$
683
+
684
+ This implies the desired monotonicity, since R(βˆn+1,λoptn ) ≥ R(βˆn+1,λoptn+1 ).
685
+
686
+ We first consider the case when $H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } | _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } } \geq 0$ . In this case, because $G _ { \lambda } ^ { n } - G _ { \lambda } ^ { n + 1 } \succeq 0$ by assumption, we have
687
+
688
+ $$
689
+ \begin{array} { r l r } { { \overline { { R } } ( \widehat { \beta } _ { n , \lambda _ { n } ^ { \mathrm { o p t } } } ) - \overline { { R } } ( \widehat { \beta } _ { n + 1 , \lambda _ { n } ^ { \mathrm { o p t } } } ) = ( \beta ^ { * } ) ^ { T } ( G _ { \lambda } ^ { n } - G _ { \lambda } ^ { n + 1 } ) \beta ^ { * } + \sigma ^ { 2 } ( H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } ) \Big | _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } } } } \\ & { } & { \geq 0 \quad \quad } \end{array}
690
+ $$
691
+
692
+ Otherwise, assume. $H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } | _ { \lambda = \lambda _ { n } ^ { \mathrm { o p t } } } \leq 0$ . Then we have:
693
+
694
+ $$
695
+ \begin{array} { r l } { \overline { { R } } ( \hat { \beta } _ { n , \lambda _ { n } ^ { \smash { \mathrm { o u t } } } } ) - \overline { { R } } ( \hat { \beta } _ { n + 1 , \lambda _ { n } ^ { \smash { \mathrm { o u t } } } } ) = ( \beta ^ { * } ) ^ { T } ( G _ { \lambda } ^ { m } - G _ { \lambda } ^ { m + 1 } ) \beta ^ { * } + \sigma ^ { 2 } ( H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } ) \Big | _ { \lambda = \lambda _ { n } ^ { \smash { \mathrm { o u t } } } } } & { \qquad \mathrm { ( } } \\ & { \qquad \geq ( \beta ^ { * } ) ^ { T } ( G _ { \lambda } ^ { m } - G _ { \lambda } ^ { m + 1 } ) \beta ^ { * } - ( \beta ^ { * } ) ^ { T } ( \frac { d G _ { \lambda } ^ { n } } { d \lambda } ) \beta ^ { * } \frac { ( H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } ) } { d H _ { \lambda } ^ { \lambda } / d \lambda } \Big | _ { \lambda = \lambda _ { n } ^ { \smash { \mathrm { o u t } } } } } \\ & { \qquad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { = ( \beta ^ { * } ) ^ { T } \underbrace { \Bigg ( ( G _ { \lambda } ^ { m } - G _ { \lambda } ^ { n + 1 } ) - ( H _ { \lambda } ^ { n } - H _ { \lambda } ^ { n + 1 } ) \frac { d G _ { \lambda } ^ { m } / d \lambda } { d H _ { \lambda } ^ { n } / d \lambda } \Big ) \Big | _ { \lambda = \lambda _ { n } ^ { \mathrm { o u t } } } \beta ^ { * } } _ { \geq 0 \mathrm { b y c o n j e c u r e 2 } } } \\ & { \qquad \quad \quad \quad \quad \quad \quad \quad \quad \geq 0 } \end{array}
696
+ $$
697
+
698
+ as desired.
parse/train/7R7fAoUygoa/7R7fAoUygoa_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7R7fAoUygoa/7R7fAoUygoa_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7R7fAoUygoa/7R7fAoUygoa_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByRWCqvT-/ByRWCqvT-.md ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING TO CLUSTER IN ORDER TO TRANSFER ACROSS DOMAINS AND TASKS
2
+
3
+ Yen-Chang Hsu, Zhaoyang Lv
4
+ Georgia Institute of Technology
5
+ Atlanta, GA 30332, USA
6
+ {yenchang.hsu, zhaoyang.lv}@gatech.edu
7
+
8
+ Zsolt Kira Georgia Tech Research Institute Atlanta, GA 30318, USA zkira@gatech.edu
9
+
10
+ # ABSTRACT
11
+
12
+ This paper introduces a novel method to perform transfer learning across domains and tasks, formulating it as a problem of learning to cluster. The key insight is that, in addition to features, we can transfer similarity information and this is sufficient to learn a similarity function and clustering network to perform both domain adaptation and cross-task transfer learning. We begin by reducing categorical information to pairwise constraints, which only considers whether two instances belong to the same class or not (pairwise semantic similarity). This similarity is category-agnostic and can be learned from data in the source domain using a similarity network. We then present two novel approaches for performing transfer learning using this similarity function. First, for unsupervised domain adaptation, we design a new loss function to regularize classification with a constrained clustering loss, hence learning a clustering network with the transferred similarity metric generating the training inputs. Second, for cross-task learning (i.e., unsupervised clustering with unseen categories), we propose a framework to reconstruct and estimate the number of semantic clusters, again using the clustering network. Since the similarity network is noisy, the key is to use a robust clustering algorithm, and we show that our formulation is more robust than the alternative constrained and unconstrained clustering approaches. Using this method, we first show state of the art results for the challenging cross-task problem, applied on Omniglot and ImageNet. Our results show that we can reconstruct semantic clusters with high accuracy. We then evaluate the performance of cross-domain transfer using images from the Office-31 and SVHN-MNIST tasks and present top accuracy on both datasets. Our approach doesn’t explicitly deal with domain discrepancy. If we combine with a domain adaptation loss, it shows further improvement.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Supervised learning has made significant strides in the past decade, with substantial advancements arising from the use of deep neural networks. However, a large part of this success has come from the existence of extensive labeled datasets. In many situations, it is not practical to obtain such data due to the amount of effort required or when the task or data distributions change dynamically. To deal with these situations, the fields of transfer learning and domain adaptation have explored how to transfer learned knowledge across tasks or domains. Many approaches have focused on cases where the distributions of the features and labels have changed, but the task is the same (e.g., classification across datasets with the same categories). Cross-task transfer learning strategies, on the other hand, have been widely adopted especially in the computer vision community where features learned by a deep neural network on a large classification task have been applied to a wide variety of other tasks (Donahue et al., 2014).
17
+
18
+ Most of the prior cross-task transfer learning works, however, require labeled target data to learn classifiers for the new task. If labels of the target data are absent, there is little choice other than to apply unsupervised approaches such as clustering on the target data with pre-trained feature representations. In this paper, we focus on the question of what can be transferred (besides features) to support both cross-domain and cross-task transfer learning. We address it with a learned similarity function as the fundamental component of clustering. Clustering can then be realized using a neural network trained using the output of the similarity function, which can be successfully used to achieve both cross-task and cross-domain transfer.
19
+
20
+ The key idea is to formulate the clustering objective to use a learnable (and transferable) term, which in our proposed work is a similarity prediction function. Our proposed objective function can be easily combined with deep neural networks and optimized end-to-end. The features and clustering are optimized jointly, hence taking advantage of such side information in a robust way. Using this method, we show that unsupervised learning can benefit from learning performed on a distinct task, and demonstrate the flexibility of further combining it with a classification loss and domain discrepancy loss.
21
+
22
+ In summary, we make several contributions. First, we propose to use predictive pairwise similarity as the knowledge that is transferred and formulate a learnable objective function to utilize the pairwise information in a fashion similar to constrained clustering. We then provide the methodologies to deploy the objective function in both cross-task and cross-domain scenarios with deep neural networks. The experimental results for cross-task learning on Omniglot and ImageNet show that we can achieve state of the art clustering results with predicted similarities. On the standard domain adaptation benchmark Office-31 dataset, we demonstrate improvements over state-of-art even when not performing any explicit domain adaptation, and further improvements if we do. Finally, on another domain adaptation task, SVHN-to-MNIST, our approach using Omniglot as the auxiliary dataset achieves top performance with a large margin.
23
+
24
+ # 2 RELATED WORK
25
+
26
+ Transfer Learning: Transfer learning aims to leverage knowledge from the source domain to help learn in the target domain, while only focusing on the performance on the target domain. The type of transferred knowledge includes training instances, features, model parameters and relational knowledge (Pan & Yang, 2010). Pairwise similarity is the meta-knowledge we propose to transfer, which falls in between the last two types. The similarity prediction function is a neural network with learned parameters, while the output is the most simplified form of relational knowledge, i.e., only considering pairwise semantic similarity.
27
+
28
+ Cross-task Transfer Learning: Features learned when trained for ImageNet classification (Russakovsky et al., 2015) have boosted the performance of a variety of vision tasks in a supervised setting. For example, new classification tasks (Donahue et al., 2014; Yosinski et al., 2014), object detection (Girshick et al., 2014), semantic segmentation (Long et al., 2015a), and image captioning (Vinyals et al., 2015). Translated Learning (Dai et al., 2009) has an unsupervised setting similar to ours, but it again focuses only on transferring features across tasks. Our work explores how learning could benefit from transferring pairwise similarity in an unsupervised setting.
29
+
30
+ Cross-domain Transfer Learning: Also known as domain adaptation (Pan & Yang, 2010), there has recently been a large body of work dealing with domain shift between image datasets by minimizing domain discrepancy (Tzeng et al., 2014; Long et al., 2015b; Ganin et al., 2016; Sun et al., 2016; Long et al., 2016; Sener et al., 2016; Carlucci et al., 2017; Long et al., 2017; Zellinger et al., 2017; Bousmalis et al., 2017). We address the problem in a complementary way that transfers extra information from the auxiliary dataset and show a larger performance boost with further gains using an additional domain discrepancy loss.
31
+
32
+ Constrained Clustering: Constrained clustering algorithms can be categorized by how they utilize constraints (e.g. pairwise information). The first set of work use the constraints to learn a distance metric. For example, DML (Xing et al., 2003), ITML (Davis et al., 2007), SKMS (Anand et al., 2014), SKKm (Anand et al., 2014; Amid et al., 2016), and SKLR (Amid et al., 2016). This group of approaches closely relates to metric learning and needs a clustering algorithm such as K-means in a separate stage to obtain cluster assignments. The second group of work use constraints to formulate the clustering loss. For example, CSP (Wang et al., 2014) and COSC (Rangapuram & Hein, 2012). The third group uses constraints for both metric learning and the clustering objective, such as MPCKMeans (Bilenko et al., 2004) and CECM (Antoine et al., 2012). The fourth group does not use constraints at all. A generic clustering algorithms such as K-means (MacQueen et al., 1967), LSC (Chen & Cai, 2011), and LPNMF (Cai et al., 2009) all belong to this category. There is a long list of associated works and they are summarized in survey papers, e.g. Davidson & Basu (2007) and Dinler & Tural (2016). Our proposed clustering strategy belongs to the third group. The constrained clustering methods above are applied to the semi-supervised setting where the groundtruth constraints are sparsely available. In our unsupervised setting, the ground-truth is unavailable but predicted constraints are densely available. We include all four groups of algorithms in our comparison and show the advantages of the third group.
33
+
34
+ ![](images/e45febb1495b4ec74c335fc4134b2e9707a9552a0aad1ab6b240e7e63479843e.jpg)
35
+ Figure 1: Overview of the transfer scheme with a learnable clustering objective (LCO). The LCO and pairwise similarity are the two key components of our approach and are described in section 4. The dashed rectangles and light gray arrows are only available in cross-domain transfer. Details are described in section 3.
36
+
37
+ # 3 THE TRANSFER LEARNING TASKS
38
+
39
+ To define the transfer learning problem addressed in this work, we follow the notations used by Pan & Yang (2010). The goal is to transfer knowledge from source data $\boldsymbol { S } = ( X _ { S } , Y _ { S } )$ , where $X _ { S }$ is the set of data instances and $Y _ { S }$ is the corresponding categorical labels, to a target data noted as $T = \left( X _ { T } , Y _ { T } \right)$ . The learning is unsupervised since $Y _ { T }$ is unknown. The scenario is divided into two cases. One is $\{ Y _ { T } \} \ne \{ { \bar { Y } } _ { S } \}$ , which means the set of categories are not the same and hence the transfer is across tasks. The second case is $\{ Y _ { T } \} = \{ Y _ { S } \}$ , but with a domain shift. In other words, the marginal probability distributions of the input data are different, i.e., $P ( X _ { T } ) \neq P ( X _ { S } )$ . The latter is a cross-domain learning problem also called transductive learning. The domain adaptation approaches which have gained significant attention recently belong to the second scenario.
40
+
41
+ To align with common benchmarks for evaluating transfer learning performance, we further use the notion of an auxiliary dataset and split the source data into $S = { \bar { S } } ^ { \prime } \cup A$ . $S ^ { \prime } = ( X _ { S } ^ { \prime } , Y _ { S } ^ { \prime } )$ which is only present in the cross-domain transfer scheme and has $\{ Y _ { S } ^ { \prime } \} = \{ Y _ { T } \}$ . $A = ( X _ { A } , Y _ { A } )$ is the auxiliary dataset which has a large amount of labeled data and potentially categories as well, and may or may not contain the categories of $Y _ { T }$ . For the cross task scenario, only $A$ and unlabeled $T$ are included, while cross-domain transfer involves $A$ , $S ^ { \prime }$ , and $T$ . In the following sections we use the above notations and describe the two transfer learning tasks in detail. Figure 1 illustrates how our approach relates to both tasks.
42
+
43
+ Transfer across tasks: If the target task has different categories, we cannot directly transfer the classifier from source to target, and there is no labeled target data to use for fine-tuning transferred features. Here we propose to first reduce the categorization problem to a surrogate same-task problem. We can directly apply transductive transfer learning (Pan & Yang, 2010) to the transformed task. The cluster structure in the target data is then reconstructed using the predictions in the transformed task. See figure 2 for an illustration.
44
+
45
+ The source involves a labeled auxiliary dataset $A$ and an unlabeled target dataset $T$ . $Y _ { T }$ is the target that must be inferred. In this scenario the set of categories $\{ Y _ { A } \} \ne \{ Y _ { T } \}$ , and $Y _ { T }$ is unknown. We first transform the problem of categorization into a pairwise similarity prediction problem. In other words, we specify a transformation function $R$ such that $R ( A ) = ( X _ { A } ^ { R ^ { \prime } } , \bar { Y } ^ { R } )$ , and $\dot { X } _ { A } ^ { R } = \{ ( x _ { A , i } , x _ { A , j } ) \} _ { \forall i , j }$ contains all pairs of data, where $\{ Y ^ { R } \} = \{ d i s s i m i l a r , s i m i l a r \}$ . The transformation on the labeled auxiliary data is straightforward. It will be similar if two data instances are from the same category, and vice versa. We then use it to learn a pairwise similarity prediction function $G ( x _ { i } , x _ { j } ) = \mathbf { \bar { \Gamma } } y _ { i , j }$
46
+
47
+ ![](images/2b04f9cd1aa8b76244e957c10c6c523af984b0b1e4ea8542e4f1f432440b0e65.jpg)
48
+ Figure 2: The concept for reconstructing clusters of unseen categories. The proposed approach follows the arrows in the counter-clockwise direction, which converts cross-task transfer learning to cross-domain transfer learning. The colors of dots represent data of different categories. The hollow circle and cross symbol represent similar and dissimilar data pairs. The $G$ function and the cluster reconstruction (via constrained clustering) are the two key components in the diagram.
49
+
50
+ By applying $G$ on $T$ , we can obtain $G ( x _ { T , i } , x _ { T , j } ) = y _ { T , i , j }$ . The last step is to infer $Y _ { T }$ from $Y _ { T } ^ { R } = \{ y _ { T , i , j } \} _ { \forall i , j }$ , which can be solved using constrained clustering algorithms. Note that since the actual $Y _ { T }$ is unknown, the algorithm only infers the indices of categories, which could be in arbitrary order. The resulting clusters are expected to contain coherent semantic categories.
51
+
52
+ Transfer across domains: The problem setting we consider here is the same as unsupervised domain adaptation. Following the standard evaluation procedure (Long et al., 2017; Ganin et al., 2016), the labeled datasets $A$ is ImageNet and $S ^ { \prime }$ is one domain in the Office-31 dataset. The unlabeled $T$ is another domain in Office-31. The goal is to enhance classification performance on $T$ by utilizing $A$ , $S ^ { \prime }$ , and $T$ together.
53
+
54
+ # 4 THE LEARNABLE CLUSTERING OBJECTIVE (LCO)
55
+
56
+ The key to our approach is the design of a learning objective that can use (noisy) predicted pairwise similarities, and is inspired from constrained clustering which involves using pairwise information in the loss function. The pairwise information is called must-link/cannot-link constraints or similar/dissimilar pairs (we use the latter). Note that the information is binarized to one and zero for similar and dissimilar pairs, accordingly.
57
+
58
+ Although many constrained clustering algorithms have been developed, few of them are scalable with respect to the number of pairwise relationships. Further, none of them can be easily integrated into deep neural networks. Inspired by the work of Hsu & Kira (2016), we construct a contrastive loss for clustering on the probability outputs of a softmax classifier. However, each output node does not have to map to a fixed category but instead each output node represents a probabilistic assignment of a data point to a cluster. The assignment between output nodes and clusters are formed stochastically during the optimization and is guided by the pairwise similarity. If there is a similar pair, their output distribution should be similar, and vice-versa.
59
+
60
+ Specifically, we use the pair-wise KL-divergence to evaluate the distance between $k$ cluster assignment distributions of two data instances, and use predicted similarity to construct the contrastive loss. Given a pair of data $x _ { p } , x _ { q }$ , their corresponding output distributions are defined as $\mathcal { P } = f ( x _ { p } )$ and $\mathcal { Q } = f ( x _ { q } )$ , while $f$ is the neural network. The cost of a similar pair is described as :
61
+
62
+ $$
63
+ \mathcal { L } ( \boldsymbol { x } _ { p } , \boldsymbol { x } _ { q } ) ^ { + } = \mathcal { D } _ { K L } ( \mathcal { P } ^ { \star } | | \boldsymbol { \mathcal { Q } } ) + \mathcal { D } _ { K L } ( \mathcal { Q } ^ { \star } | | \mathcal { P } )
64
+ $$
65
+
66
+ $$
67
+ \mathcal { D } _ { K L } ( \mathcal { P } ^ { \star } | | \mathcal { Q } ) = \sum _ { c = 1 } ^ { k } p _ { c } l o g ( \frac { p _ { c } } { q _ { c } } )
68
+ $$
69
+
70
+ ![](images/b7321399ab1bca7f870eb89cd648d445662c407854095766daa46df0319beb58.jpg)
71
+ Figure 3: The similarity prediction network (the $G$ function).
72
+
73
+ The cost $\mathcal { L } ( x _ { p } , x _ { q } ) ^ { + }$ is symmetric w.r.t. $x _ { p } , x _ { q }$ , in which ${ \mathcal { P } } ^ { \star }$ and $\mathcal { Q } ^ { \star }$ are alternatively assumed to be constant. Each KL-divergence factor $\hat { \mathcal { D } } _ { K L } ^ { \star } ( \hat { \mathcal { P } } ^ { \star } | | \mathcal { Q } )$ becomes a unary function whose gradient is simply $\partial { \cal D } _ { K L } ( { \mathcal { P } } ^ { \star } | | { \mathcal { Q } } ) / \partial { \mathcal { Q } }$ .
74
+
75
+ If $x _ { p } , x _ { q }$ comes from a pair which is dissimilar, their output distributions are expected to be different, which can be defined as a hinge-loss function:
76
+
77
+ $$
78
+ \mathcal { L } ( \boldsymbol { x } _ { p } , \boldsymbol { x } _ { q } ) ^ { - } = L _ { h } ( \mathcal { D } _ { K L } ( \mathcal { P } ^ { \star } | | \boldsymbol { \mathcal { Q } } ) , \boldsymbol { \sigma } ) + L _ { h } ( \mathcal { D } _ { K L } ( \mathcal { Q } ^ { \star } | | \mathcal { P } ) , \boldsymbol { \sigma } )
79
+ $$
80
+
81
+ $$
82
+ L _ { h } ( e , \sigma ) = m a x ( 0 , \sigma - e )
83
+ $$
84
+
85
+ Given a pair of data with similarity prediction function $G ( x _ { p } , x _ { q } ) \in \{ 0 , 1 \}$ , which is introduced in section 3, the total loss can be defined as a contrastive loss (where we use integer 1 to represent a similar pair):
86
+
87
+ $$
88
+ \mathcal { L } ( x _ { p } , x _ { q } ) = G ( x _ { p } , x _ { q } ) \mathcal { L } ( x _ { p } , x _ { q } ) ^ { + } + ( 1 - G ( x _ { p } , x _ { q } ) ) \mathcal { L } ( x _ { p } , x _ { q } ) ^ { - }
89
+ $$
90
+
91
+ We refer to equation 5 as LCO. Function $G$ is the learnable part that utilizes prior knowledge and is trained with auxiliary dataset $A$ before optimizing LCO. Two particular characteristics of the clustering criterion are worth mentioning: (1) There is no need to define cluster centers. (2) There is no predefined metric applied on the feature representation. Instead, the divergence is calculated directly on the cluster assignment; therefore, both feature representation and clustering are jointly optimized using back-propagation through the deep neural networks.
92
+
93
+ # 4.1 THE PAIRWISE SIMILARITY PREDICTION NETWORK
94
+
95
+ Although there is no restriction of how $G$ should be constructed, we choose deep convolution neural networks due to their efficiency in vision tasks. We design a network architecture inspired from Zagoruyko & Komodakis (2015). While they use it to predict image patch similarity, we use it to predict image-level semantic similarity. However, the Siamese architecture used in Zagoruyko & Komodakis (2015) is not efficient in both training and inference, especially when pairwise information is dense. Therefore, instead of using Siamese architecture, we keep the single column backbone but add a pair-enumeration layer on top of the feature extraction network. The pair-enumeration layer enumerates all pairs of feature vectors within a mini-batch and concatenates the features. Suppose the input of the layer is $1 0 \times 5 1 2$ with the mini-batch size 10 and the feature dimension 512; then the output of the pair-enumeration layer will be $1 0 0 \times 1 0 2 4$ (self-pairs included).
96
+
97
+ The architecture is illustrated in figure 3. We add one hidden fully connected layer on top of the enumeration layer and a binary classifier at the end. We use the standard cross-entropy loss and train it end-to-end. The supervision for training was obtained by converting the ground-truth category labels into binary similarity, i.e., if two samples are from the same class then their label will be similar, otherwise dissimilar. The inference is also end-to-end, and it outputs predictions among all similarity pairs in a mini-batch. The output probability $g \in [ 0 , 1 ]$ with 1 means more similar. We binarize $g$ at 0.5 to obtain discrete similarity predictions. In the following sections, we simplified the notation of the pairwise similarity prediction network as $G$ . Once $G$ is learned, it then works as a static function in our experiments.
98
+
99
+ # 4.2 THE OBJECTIVE FUNCTION WITH DENSE SIMILARITY PREDICTION
100
+
101
+ Since the pairwise prediction of a mini-batch can be densely obtained from $G$ , to efficiently utilize the pair-wise information without forwarding each data multiple times we also combine the pairenumeration layer described in section 4.1 with equation 5. In this case, the outputs of softmax are
102
+
103
+ ![](images/6ee14a32f3d38107f344e558ad27ba8aa4c6dd2a6632d85ddac1a4bb2284c5fa.jpg)
104
+ Figure 4: The constrained clustering network (CCN) for transfer learning across tasks. The input is unlabeled target data $T$ . The cluster assignment block contains two fully connected layers and has the number of output nodes equal to $k$ . The $f$ described in section 4 is the backbone network plus the cluster assignment block. To optimize LCO, the full pipeline in the diagram is used. After the optimization, it uses another forward propagation with only $f$ to obtain the final cluster assignment.
105
+
106
+ ![](images/480735bbbbbc31b0524612dd6b214d318a05c8bfdb6bc3ec5a4e395d164bbae6.jpg)
107
+ Figure 5: The network for transfer learning across domains. The input is the mix of $S ^ { \prime }$ and $T$ . The architecture is a direct extension of CCN. We use $\mathrm { C C N ^ { + } }$ to represent the mandatory parts (upper branch) which implements eq. (7). $\mathrm { C C N ^ { + + } }$ includes the domain adaptation method (optional branch).
108
+
109
+ enumerated in pairs. Let $D$ be the set of all tuples $( p , q )$ , while $p$ and $q$ are the indices of a sample in a mini-batch. The dense clustering loss $\mathcal { L } _ { d }$ for a mini-batch is calculated by:
110
+
111
+ $$
112
+ \mathcal { L } _ { d } = \sum _ { \forall ( p , q ) \in D } \mathcal { L } ( x _ { p } , x _ { q } ) .
113
+ $$
114
+
115
+ We use $\mathcal { L } _ { d }$ standalone with deep neural networks to reconstruct semantic clusters and for transfer learning across tasks (figure 4). We call the architecture the constrained clustering network (CCN).
116
+
117
+ # 4.3 COMBINING WITH OTHER OBJECTIVES
118
+
119
+ In the cross-domain case, we additionally have labeled source data. This enables us to use LCO for $T$ while using classification loss for $S ^ { \prime }$ . The overall training procedure is similar to previous domain adaptation approaches in that both source and target data are mixed in a mini-batch, but different losses are applied. We denote the source domain images in a mini-batch $b$ as $X _ { b ^ { S } }$ and the target domain images $X _ { b ^ { T } }$ with its set of dense pairs $D _ { b ^ { T } }$ . The loss function $\mathcal { L } _ { c d }$ for cross-domain transfer in a mini-batch can then be formulated as:
120
+
121
+ $$
122
+ \mathcal { L } _ { c d } = \mathcal { L } _ { c l s } + \mathcal { L } _ { c l u s t e r }
123
+ $$
124
+
125
+ $$
126
+ \mathcal { L } _ { c l s } = \frac { 1 } { | b ^ { S } | } \sum _ { \forall x _ { i } \in X _ { b } s } C r o s s E n t r o p y L o s s ( f ( x _ { i } ) ) .
127
+ $$
128
+
129
+ $$
130
+ \mathcal { L } _ { c l u s t e r } = \frac { 1 } { | b ^ { T } | ^ { 2 } } \sum _ { \forall ( i , j ) \in D _ { b ^ { T } } } \mathcal { L } ( x _ { i } , x _ { j } ) .
131
+ $$
132
+
133
+ The $\mathcal { L } _ { c l u s t e r }$ and $\mathcal { L } _ { c l s }$ share the same outputs from network $f$ . Although $\mathcal { L } _ { c l u s t e r }$ does not force the mapping between clusters and categories, $\mathcal { L } _ { c l s }$ does. Therefore the learned classifier can be applied on target data directly and picks the maximum probability for the predicted class. Note that in our loss function, there is no term to explicitly match the feature distribution between source and target; it merely transfers more knowledge in the form of constraints to regularize the learning of the classifier. There is also no requirement for the architecture to utilize hidden layers. Therefore our approach has the large flexibility to be combined with other domain adaptation strategies. Figure 5 illustrates the architectures $\mathrm { C C N ^ { + } }$ and $\mathrm { C C N ^ { + + } }$ used in our cross-domain experiments.
134
+
135
+ # 5 EXPERIMENTS
136
+
137
+ This section contains evaluations with four image datasets and covers both cross-task and crossdomain schemes. The details are described below, and the differences between experimental settings are illustrated in appendix A.
138
+
139
+ # 5.1 UNSUPERVISED CROSS-TASK TRANSFER LEARNING
140
+
141
+ # 5.1.1 SETUP
142
+
143
+ The Omniglot dataset (Lake et al., 2015) contains 1623 different handwritten characters and each of them has 20 images drawn by different people. The characters are from 50 different alphabets and were separated to 30 background sets $O m n i g l o t _ { b g }$ and 20 evaluation sets $O m n i g l o t _ { e v a l }$ by the author. We use the $O m n i g l o t _ { b g }$ as the auxiliary dataset $( A )$ and the $O m n i g l o t _ { e v a l }$ as the target data $( T )$ . The total number of characters in $O m n g l o t _ { b g }$ is 964, which can be regarded as the number of categories available to learn the semantic similarity. The goal is to cluster Omniglot $_ { e v a l }$ to reconstruct its semantic categories, without ever having any labels.
144
+
145
+ The $G$ function has a backbone neural network with four $3 \mathrm { x } 3$ convolution layers followed by $2 \mathbf { x } 2$ max-pooling with stride 2. All hidden layers are followed by batch normalization (Ioffe & Szegedy, 2015) and rectified linear unit. To prepare the inputs for training, the images from $O m n i g l o t _ { b g }$ were resized to $3 2 \mathrm { x } 3 2$ and normalized to zero mean with unit standard deviation. Each mini-batch has a size of 100 and is sampled from a random 20 characters to make sure the amount of similar pairs is reasonable. After pair enumeration, there are 10000 pairs subject to the loss function, which is a two-class cross entropy loss. The ground-truth similarity is obtained by converting the categorical labels. The loss of $G$ is optimized by stochastic gradient descent and is the only part trained in a supervised manner in this section.
146
+
147
+ The Constrained Clustering Network (CCN) is used to reconstruct the semantic clusters in the target dataset using outputs from $G$ . The network has four 3x3 convolution layers followed by $2 \mathbf { x } 2$ max-pooling with stride 2, one hidden fully-connected layer, and one cluster assignment layer which is also fully connected. The number of output nodes in the last layer is equal to the number of potential clusters in the target data. The output distribution is enumerated in pairs before sending to LCO. The network is randomly initialized, trained end-to-end, and optimized by stochastic gradient descent with randomly sampled 100 images per mini-batch. Note the $G$ function used by LCO is fixed during the optimization. The input data preparation is the same as above, except now the data is from $O m n i g l o t _ { e v a l }$ . Specifically, during the training, the same mini-batch is given to both $G$ and CCN. The dense pairwise similarity predictions from $G$ are sent to LCO and are then fully utilized. The only hyper-parameter in LCO is $\sigma$ , and we set it to 2 for all our experiments.
148
+
149
+ Omniglot $e v a l$ contains 20 alphabets and each one can be used as a standalone dataset. The 20 target datasets contain a varied number (20 to 47) of characters. Therefore we can evaluate the reconstruction performance under a varied number of ground-truth clusters. We tested the situations when the number of character $( K )$ in an alphabet is known and unknown. When $K$ is known, we set the target number of clusters in the clustering algorithm equal to the true number of characters. If $K$ is unknown, the common practice is to set it to a large number so that the data from different categories will not be forced to be in the same cluster. In the experiment, we merely set $K$ to 100, which is much larger than the largest dataset (47).
150
+
151
+ All constrained clustering algorithms can be used to reconstruct the semantic clusters for our problem. Since there are mis-predictions in $G$ , robustness to noise is the most important factor. Here we include all four types of constrained clustering algorithms introduced in section 2 as the baselines. We provide the full set of pairwise constraints to all algorithms including ours. In other words, given an alphabet of 20 characters, it contains 400 images and 160000 predicted similarities from $G$ (note that $G$ makes predictions for both orders of a pair and for self-pairs). The full pairwise similarities were presented to all algorithms in random order, while we empirically found it has no noticeable effect on results. We pick the baseline approaches based on code availability and scalability concerning the number of pairwise constraints. Therefore we have shown results for K-means (MacQueen et al., 1967), LPNMF (Cai et al., 2009), LSC (Chen & Cai, 2011), ITML (Davis et al., 2007), SKKm (Anand et al., 2014), SKLR (Amid et al., 2016), SKMS (Anand et al., 2014), CSP (Wang et al., 2014) , and MPCK-means (Bilenko et al., 2004) as our baselines. We use the default parameters for each algorithm provided by the original author except for $K$ , the number of clusters. We use the same normalized images used in CCN for all algorithms.
152
+
153
+ Table 1: Unsupervised cross-task transfer from Omniglot $b g$ to $O m n i g l o t _ { e v a l }$ . The performance is averaged across 20 alphabets which have 20 to 47 letters. The ACC and NMI without brackets have the number of clusters equal to ground-truth. The "(100)" means the algorithms use $K = 1 0 0$ . The characteristics of how each algorithm utilizes the pairwise constraints are marked in the "Constraints in" column, where metric stands for the metric learning of feature representation.
154
+
155
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Constraints in</td><td rowspan="2">ACC</td><td rowspan="2">ACC (100)</td><td rowspan="2">NMI</td><td rowspan="2">NMI (100)</td></tr><tr><td>Metric</td><td>Clustering</td></tr><tr><td>K-means</td><td></td><td></td><td>21.7%</td><td>18.9%</td><td>0.353</td><td>0.464</td></tr><tr><td>LPNMF</td><td></td><td></td><td>22.2%</td><td>16.3%</td><td>0.372</td><td>0.498</td></tr><tr><td>LSC</td><td></td><td></td><td>23.6%</td><td>18.0%</td><td>0.376</td><td>0.500</td></tr><tr><td>ITML</td><td>0</td><td></td><td>56.7%</td><td>47.2%</td><td>0.674</td><td>0.727</td></tr><tr><td>SKMS</td><td>0</td><td></td><td>=</td><td>45.5%</td><td>1</td><td>0.693</td></tr><tr><td>SKKm</td><td>0</td><td></td><td>62.4%</td><td>46.9%</td><td>0.770</td><td>0.781</td></tr><tr><td>SKLR</td><td>0</td><td></td><td>66.9%</td><td>46.8%</td><td>0.791</td><td>0.760</td></tr><tr><td>CSP</td><td></td><td>0</td><td>62.5%</td><td>65.4%</td><td>0.812</td><td>0.812</td></tr><tr><td>MPCK-means</td><td>0</td><td>0</td><td>81.9%</td><td>53.9%</td><td>0.871</td><td>0.816</td></tr><tr><td>CCN (Ours)</td><td>0</td><td>0</td><td>82.4%</td><td>78.1%</td><td>0.889</td><td>0.874</td></tr></table>
156
+
157
+ The evaluation uses two clustering metrics. The first is normalized-mutual information (NMI) (Strehl & Ghosh, 2002) which is widely used for clustering. The second one is the clustering accuracy (ACC) (Yang et al., 2010). The ACC metric first finds the one-to-one matching between predicted clusters and ground-truth labels, and then calculates the classification accuracy based on the mapping. All data outside the matched clusters will be regarded as mis-predictions. To get high ACC, the algorithm has to generate coherent clusters where each cluster includes most of the data in a category; otherwise the score drops quickly. Therefore ACC provides better discrimination to evaluate whether the semantic clusters have been reconstructed well.
158
+
159
+ # 5.1.2 RESULTS AND DISCUSSIONS
160
+
161
+ We report the average performance over the 20 alphabets in table 1. Our approach achieved the top performance on both metrics. The CCN demonstrates strong robustness on the challenging scenario of unknown $K$ . It achieved $7 8 . 1 \%$ average accuracy. Compared with $8 2 . 4 \%$ when $K$ is known, CCN has a relatively small drop. Compared to the second best algorithm, CSP, which is $6 5 . 4 \%$ , CCN outperforms it with a large gap. The classical approach MPCK-means works surprisingly well when the number of clusters is known, but its performance dropped dramatically from $8 1 . 9 \%$ to $5 3 . 9 \%$ when $K = 1 0 0$ . In the performance breakdown for the 20 individual alphabets, CCN achieved $94 \%$ clustering accuracy on Old Church Slavonic Cyrillic, which has 45 characters (appendix table 5). Therefore the results show the feasibility of reconstructing semantic clusters using only noisy similarity predictions.
162
+
163
+ When to use the semantic similarity? The experiments in table 1 show a clear trend that utilizing the pairwise constraints jointly for both metric learning and minimizing the clustering loss achieves the best performance, including both MPCK-means and CCN. In the case of unknown number of clusters, where we set $K = 1 0 0$ , the algorithms that use constraints to optimize clustering loss have better robustness, for example, CSP and CCN. The group that only use constraints for metric learning (ITML, SKMS, SKKm, and SKLR) significantly outperform the group that does not use it (K-means, LPNMF, LSC). However, their performance are still far behind CCN. Our results confirm the importance of jointly optimizing the metric and clustering.
164
+
165
+ The robustness against noisy similarity prediction is the key factor to enable the cross-task transfer framework. To the best of our knowledge, table 1 is the first comprehensive robustness comparisons using predicted constraints learned from real data instead of converting from ground-truth labels. The accuracy of $G$ in our experiment is shown in appendix table 7 and demonstrates the reasonable performance of $G$ which is on par with Matching-Net (Vinyals et al., 2016). After binarizing the prediction at 0.5 probability, the similar pair precision, similar pair recall, dissimilar pair precision, and dissimilar pair recall among the 659 characters are (0.392, 0.927, 0.999, 0.995), accordingly. The binarized predictions are better than uniform random guess (0.002, 0.500, 0.998, 0.500), but are still noisy. Therefore it is very challenging for constrained clustering. The visualization of the robustness range of CCN are provided in appendix D, and shows that the robustness is related to the density of pairs involved in a mini-batch. We hypothesize that during the optimization, the gradients from wrongly predicted pairs are canceled out by each other or by the correctly predicted pairs. Therefore the overall gradient still moves the solution towards a better clustering result.
166
+
167
+ How to predict $K ?$ Inferring the number of clusters $( N C )$ is a hard problem, but with the pairwise similarity information, it becomes feasible. For evaluation, we compute the difference between the number of dominant clusters $( N D C )$ and the true number of categories $( N C ^ { g t } )$ in a dataset. We use a naive definition for $N D C$ , which is the number of clusters that have a size larger than expected size when data is sampled uniformly. In other words, $\begin{array} { r } { N D C = \sum _ { i = 1 } ^ { K } \left[ C _ { i } > = \bar { E } [ C _ { i } ] \right] } \end{array}$ where $[ \cdot ]$ is an Iverson Bracket and $C _ { i }$ is the size of cluster $i$ . For example, $\bar { E } [ \bar { C } _ { i } ]$ will be 10 if the alphabet has 1000 images and $K = 1 0 0$ . Then the average difference $( A D i f )$ is calculated by $\begin{array} { r } { A D i f = \frac { 1 } { | D | } \sum _ { d \in D } { | N D C _ { d } - N C _ { d } ^ { g t } | } } \end{array}$ , where $d$ (i.e., alphabet) is a dataset in $D$ . A smaller $A D i f$ indicates a better estimate of $K$ . CCN achieves a score of 6.35 (appendix table 6). We compare this with the baseline approach SKMS (Anand et al., 2014), which does not require a given $K$ and supports a pipeline to estimate $K$ automatically (therefore we only put it into the column $K = 1 0 0$ in table 1.). SKMS gets 16.3. Furthermore, 10 out of 20 datasets from CCN’s prediction have a difference between $N D C _ { d }$ and $N C _ { d } ^ { g t }$ smaller or equal to 3, which shows the feasibility of estimating $K$ with predicted similarity.
168
+
169
+ # 5.1.3 EXPERIMENTS USING THE IMAGENET DATASET
170
+
171
+ To demonstrate the scalability of our approach, we applied the same scheme on the ImageNet dataset. The 1000-class dataset is separated into 882-class (ImageNet882) and 118-class (ImageNet118) subsets as the random split in Vinyals et al. (2016). We use ImageN et882 for $A$ and 30 classes $\mathrm { \sim } 3 9 \mathrm { k }$ images) are randomly sampled from $I m a g e N e t _ { 1 1 8 }$ for $T$ . The difference from section 5.1.1 is that here we use Resnet-18 for both $G$ and CCN, and the weights of the backbone are pre-trained with ImageN et882. Since the number of pairs is high and it is not feasible to feed them into other constrained clustering algorithms, we compare CCN with K-means, LSC(Chen & Cai, 2011), and LPNMF (Cai et al., 2009). We use the output from the average pooling layer of Resnet-18 as the input to these clustering algorithms. CCN gives the top performance with average ACC $7 3 . 8 \%$ when $K$ is known, and $6 5 . 2 \%$ when the number of clusters is unknown, which outperforms the second $( 3 4 . 5 \%$ by K-means) with a large margin. The full comparison is in appendix table 8. And the performance of $G$ is provided in appendix table 9.
172
+
173
+ # 5.2 UNSUPERVISED CROSS-DOMAIN TRANSFER LEARNING
174
+
175
+ # 5.2.1 SETUP
176
+
177
+ Office-31 (Saenko et al., 2010) has images from 31 categories of office objects. The 4652 images are obtained from three domains: Amazon $( a )$ , DSLR $( d )$ , and Webcam $( w )$ . The dataset is the standard benchmark for evaluating domain adaptation performance in computer vision. We experiment with all six combinations (source $S ^ { \prime } \to \mathrm { t a r g e t } T$ ): $a w$ , $a \to d$ , $d \to a$ , $d \to w$ , $w a$ , $w \to d$ , and report the average accuracy based on five random experiments for each setting.
178
+
179
+ The $G$ function learns the semantic similarity function from the auxiliary dataset $A$ , which is ImageNet with all 1000 categories. The backbone network of $G$ is Resnet-18 and has the weights initialized by ImageNet classification. The training process is the same as section 5.1.1 except the images are resized to 224.
180
+
181
+ We follow the standard protocols using deep neural networks (Long et al., 2017; Ganin et al., 2016) for unsupervised domain adaptation. The backbone network of $\mathrm { C C N ^ { + } }$ is pre-trained with ImageNet. Appendix figure 7 illustrates the scheme. During the training, all source data and target data are used. Each mini-batch is constructed by 32 labeled samples from source and 96 unlabeled samples from target. Since the target dataset has no labels and could only be randomly sampled, it is crucial to have sufficient mini-batch size to ensure that similar pairs are sampled. The loss function used in our approach is equation (7) and is optimized by stochastic gradient descent. The $\mathrm { C C N ^ { + / + + } }$ and DANN (RevGrad) with ResNet backbone are implemented with Torch. We use the code from original author for JAN. Both DANN and JAN use a 256-dimension bottleneck feature layer.
182
+
183
+ Table 2: Unsupervised cross-domain transfer (domain adaptation) on the Office-31 dataset. The backbone network used here is Resnet-18 (He et al., 2016) pre-trained with ImageNet.
184
+
185
+ <table><tr><td></td><td>A→W</td><td>D→W</td><td>W→D</td><td>A→D</td><td>D→A</td><td>W→A</td><td>Avg</td></tr><tr><td>Source-Only</td><td>66.8</td><td>92.8</td><td>96.8</td><td>67.1</td><td>51.4</td><td>53.0</td><td>71.3</td></tr><tr><td>DANN (Ganin et al., 2016)</td><td>73.2</td><td>97.0</td><td>99.0</td><td>69.3</td><td>58.0</td><td>57.8</td><td>75.7</td></tr><tr><td>JAN (Long et al., 2017)</td><td>74.5</td><td>94.1</td><td>99.6</td><td>75.9</td><td>58.7</td><td>59.0</td><td>76.9</td></tr><tr><td>CCN+ (ours)</td><td>76.7</td><td>97.3</td><td>98.2</td><td>71.2</td><td>61.0</td><td>60.5</td><td>77.5</td></tr><tr><td>CCN++ (with DANN)</td><td>78.2</td><td>97.4</td><td>98.6</td><td>73.5</td><td>62.8</td><td>60.6</td><td>78.5</td></tr></table>
186
+
187
+ # 5.2.2 RESULTS AND DISCUSSIONS
188
+
189
+ The results are summarized in table 2. Our approach $\mathrm { ( C C N ^ { + } ) }$ demonstrates a strong performance boost for the unsupervised cross-domain transfer problem. It reaches $7 7 . 5 \%$ average accuracy which gained 6.2 points from the $7 1 . 3 \%$ source-only baseline. Although our approach merely transfers more information from the auxiliary dataset, it outperforms the strong approach DANN $( 7 5 . 7 \% )$ , and state-of-the-art JAN $( 7 6 . 9 \% )$ . When combining ours with DANN $\mathrm { ( C C N ^ { + + } ) }$ , the performance is further boosted. This indicates that LCO helps mitigate the transfer problem in a certain way that is orthogonal to minimizing the domain discrepancy. We observe the same trend when using a deeper backbone network, i.e., ResNet-34. In such a case the average accuracy achieved is $7 7 . 9 \%$ , $8 1 . 1 \%$ and $82 \%$ for source-only, $\mathrm { C C N ^ { + } }$ and $\mathrm { C C N ^ { + + } }$ , respectively, though we used exactly the same $G$ as before (with ResNet-18 backbone for $G$ ). This indicates that the information carried in the similarity predictions is not equivalent to transferring features with deeper networks. More discussions are in appendix C and the performance of $G$ is provided in appendix table 11 to show that although the prediction has low precision for similar pairs $( \sim 0 . 2 )$ , our approach still benefits from the dense similarity predictions.
190
+
191
+ # 5.2.3 EXPERIMENTS USING SVHN-TO-MNIST
192
+
193
+ We also evaluated the $\mathrm { C C N ^ { + } }$ on another widely compared scenario, which uses color Street View House Numbers images (SVHN) (Netzer et al., 2011) as $S ^ { \prime }$ , the gray-scale hand-written digits (MNIST) (LeCun, 1998) as $T$ . To learn $G$ , we use the $O m n g l o t _ { b g }$ as $A$ . We train all the networks in this section from scratch. Our experimental setting is similar to Sener et al. (2016). We achieve the top performance with $8 9 . 1 \%$ accuracy. The performance gain from source-only in our approach is $+ 3 7 . 1 \%$ , which wins by a large margin compared to the $+ 2 3 . 9 \%$ of LTR (Sener et al., 2016). The full comparison is presented in appendix table 12.
194
+
195
+ # 6 CONCLUSION AND OUTLOOK
196
+
197
+ In this paper, we demonstrated the usefulness of transferring information in the form of pairwise similarity predictions. Such information can be transferred as a function and utilized by a loss formulation inspired from constrained clustering, but implemented more robustly within a neural network that can jointly optimize both features and clustering outputs based on these noisy predictions. The experiments for both cross-task and cross-domain transfer learning show strong benefits of using the semantic similarity predictions resulting in new state of the art results across several datasets. This is true even without explicit domain adaptation for the cross-domain task, and if we add a domain discrepancy loss the benefits increase further.
198
+
199
+ There are two key factors that determine the performance of the proposed framework. The first is the robustness of the constrained clustering and second is the performance of the similarity prediction function. We show robustness of CCN empirically, but we do not explore situations where learning the similarity function is harder. For example, such cases arise when there are a small number of categories in source or a large domain discrepancy between source and target. One idea to deal with such a situation is learning G with domain adaptation strategies. We leave these aspects for future work.
200
+
201
+ # ACKNOWLEDGMENTS
202
+
203
+ This work was supported by the National Science Foundation and National Robotics Initiative (grant # IIS-1426998).
204
+
205
+ # REFERENCES
206
+
207
+ Ehsan Amid, Aristides Gionis, and Antti Ukkonen. Semi-supervised kernel metric learning using relative comparisons. arXiv preprint arXiv:1612.00086, 2016.
208
+
209
+ Saket Anand, Sushil Mittal, Oncel Tuzel, and Peter Meer. Semi-supervised kernel mean shift clustering. IEEE transactions on pattern analysis and machine intelligence, 36(6):1201–1215, 2014.
210
+
211
+ Violaine Antoine, Benjamin Quost, M-H Masson, and Thierry Denoeux. Cecm: Constrained evidential c-means algorithm. Computational Statistics & Data Analysis, 56(4):894–914, 2012.
212
+
213
+ Mikhail Bilenko, Sugato Basu, and Raymond J Mooney. Integrating constraints and metric learning in semi-supervised clustering. In Proceedings of the twenty-first international conference on Machine learning, pp. 11. ACM, 2004.
214
+
215
+ Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
216
+
217
+ Deng Cai, Xiaofei He, Xuanhui Wang, Hujun Bao, and Jiawei Han. Locality preserving nonnegative matrix factorization. In IJCAI, volume 9, pp. 1010–1015, 2009.
218
+
219
+ Fabio Maria Carlucci, Lorenzo Porzi, Barbara Caputo, Elisa Ricci, and Samuel Rota Bulò. Autodial: Automatic domain alignment layers. In International Conference on Computer Vision, 2017.
220
+
221
+ Xinlei Chen and Deng Cai. Large scale spectral clustering with landmark-based representation. In AAAI, volume 5, pp. 14, 2011.
222
+
223
+ Wenyuan Dai, Yuqiang Chen, Gui rong Xue, Qiang Yang, and Yong Yu. Translated learning: Transfer learning across different feature spaces. In Advances in Neural Information Processing Systems 21. 2009.
224
+
225
+ Ian Davidson and Sugato Basu. A survey of clustering with instance level. Constraints, 1:2, 2007.
226
+
227
+ Jason V Davis, Brian Kulis, Prateek Jain, Suvrit Sra, and Inderjit S Dhillon. Information-theoretic metric learning. In Proceedings of the 24th international conference on Machine learning, pp. 209–216. ACM, 2007.
228
+
229
+ Derya Dinler and Mustafa Kemal Tural. A survey of constrained clustering. In Unsupervised Learning Algorithms, pp. 207–235. Springer, 2016.
230
+
231
+ Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Icml, volume 32, pp. 647–655, 2014.
232
+
233
+ Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016.
234
+
235
+ Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Computer Vision and Pattern Recognition, 2014.
236
+
237
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
238
+
239
+ Yen-Chang Hsu and Zsolt Kira. Neural network-based clustering using pairwise constraints. ICLR workshop, 2016.
240
+
241
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
242
+
243
+ Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML Deep Learning Workshop, 2015.
244
+
245
+ Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
246
+
247
+ Yann LeCun. The mnist database of handwritten digits. 1998.
248
+
249
+ Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3431–3440, 2015a.
250
+
251
+ Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I. Jordan. Learning transferable features with deep adaptation networks. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 97–105, 2015b.
252
+
253
+ Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In Advances in Neural Information Processing Systems, 2016.
254
+
255
+ Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I. Jordan. Deep transfer learning with joint adaptation networks. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 2208–2217, 2017.
256
+
257
+ James MacQueen et al. Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, volume 1, pp. 281–297. Oakland, CA, USA., 1967.
258
+
259
+ Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
260
+
261
+ Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Trans. on Knowl. and Data Eng., 22(10):1345–1359, October 2010. ISSN 1041-4347. doi: 10.1109/TKDE.2009.191. URL http://dx.doi.org/10.1109/TKDE.2009.191.
262
+
263
+ Syama Sundar Rangapuram and Matthias Hein. Constrained 1-spectral clustering. In AISTATS, volume 30, pp. 90, 2012.
264
+
265
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
266
+
267
+ Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting Visual Category Models to New Domains, pp. 213–226. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010.
268
+
269
+ Kuniaki Saito, Yoshitaka Ushiku, and Tatsuya Harada. Asymmetric tri-training for unsupervised domain adaptation. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 2988–2997, 2017.
270
+
271
+ Ozan Sener, Hyun Oh Song, Ashutosh Saxena, and Silvio Savarese. Learning transferrable representations for unsupervised domain adaptation. In Advances in Neural Information Processing Systems, pp. 2110–2118, 2016.
272
+
273
+ Alexander Strehl and Joydeep Ghosh. Cluster ensembles—a knowledge reuse framework for combining multiple partitions. Journal of machine learning research, 3(Dec):583–617, 2002.
274
+
275
+ Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. In AAAI, 2016.
276
+
277
+ Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014.
278
+
279
+ Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Adversarial discriminative domain adaptation. In Computer Vision and Pattern Recognition (CVPR), 2017.
280
+
281
+ Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3156–3164, 2015.
282
+
283
+ Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. 2016.
284
+
285
+ Xiang Wang, Buyue Qian, and Ian Davidson. On constrained spectral clustering and its applications. Data Mining and Knowledge Discovery, pp. 1–30, 2014.
286
+
287
+ Eric P Xing, Michael I Jordan, Stuart J Russell, and Andrew Y Ng. Distance metric learning with application to clustering with side-information. In Advances in neural information processing systems, pp. 521–528, 2003.
288
+
289
+ Yi Yang, Dong Xu, Feiping Nie, Shuicheng Yan, and Yueting Zhuang. Image clustering using local discriminant models and global integration. IEEE Transactions on Image Processing, 19(10): 2761–2773, 2010.
290
+
291
+ Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? 2014.
292
+
293
+ Sergey Zagoruyko and Nikos Komodakis. Learning to compare image patches via convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4353–4361, 2015.
294
+
295
+ Werner Zellinger, Thomas Grubinger, Edwin Lughofer, Thomas Natschläger, and Susanne SamingerPlatz. Central moment discrepancy (cmd) for domain-invariant representation learning. ICLR, 2017.
296
+
297
+ # APPENDICES
298
+
299
+ # A COMPARISON OF EXPERIMENTAL SETTINGS
300
+
301
+ Table 3: The list of datasets involved in each experiment. $G$ learns the similarity function from dataset A. The $\mathbf { C C N } ^ { * }$ is optimized with dataset T or T∪S’, while $\mathbf { C C N } ^ { * }$ means CCN for cross-task transfer and $\mathrm { C C N ^ { + / + + } }$ for cross-domain transfer. The rows for network initialization indicate whether the network has weights initialized by training a classification task with the specified dataset. The weights are randomly initialized if not specified.
302
+
303
+ <table><tr><td colspan="2">Scheme</td><td colspan="2">Cross-Task Transfer</td><td colspan="2">Cross-Domain Transfer</td></tr><tr><td colspan="2">Experiment Section</td><td>Omniglot 5.1.1</td><td>ImageNet 5.1.3</td><td>Office-31 5.2.1</td><td>SVHN-MNIST 5.2.3</td></tr><tr><td rowspan="3">Datasets</td><td>A</td><td>Omniglotbg</td><td>ImageNet882</td><td>ImageNet1000</td><td>Omniglotbg</td></tr><tr><td>S’</td><td></td><td></td><td>Office-31 {a,d,w}</td><td>SVHN</td></tr><tr><td>T</td><td>Omnigloteval</td><td>ImageNet118</td><td>Office-31 {a,d,w)</td><td>MNIST</td></tr><tr><td rowspan="2">Network Initialization</td><td>G</td><td></td><td>ImageNet882</td><td>ImageNet1000</td><td>1</td></tr><tr><td>CCN*</td><td></td><td>ImageNet882</td><td>ImageNet1000</td><td>1</td></tr></table>
304
+
305
+ Table 4: The list of loss functions used for training networks. The similarity prediction function (network) $G$ uses the cross-entropy (CE) loss with two classes (similar/dissimilar). The training of constrained clustering network $( \mathbf { C C N } ^ { * } )$ involves the combinations of the learnable clustering objective (LCO), cross-entropy, and domain adaptation loss (DA).
306
+
307
+ <table><tr><td></td><td>LCO</td><td>CE</td><td>DA</td></tr><tr><td>G</td><td></td><td>√</td><td></td></tr><tr><td>CCN</td><td></td><td></td><td></td></tr><tr><td>CCN+</td><td>广</td><td>√</td><td></td></tr><tr><td>CCN++</td><td>√</td><td></td><td>√</td></tr></table>
308
+
309
+ ![](images/6077c2618b017816b79d4cf6b62b30b24d7ebf9ecfe529286747a494f9f155c8.jpg)
310
+ Figure 6: A diagram depicting the cross-task transfer experiment. Two experiments follow this flow: Omniglot $b g$ to $O m n i g l o t _ { e v a l }$ , and $I m a g e N e t _ { 8 8 2 }$ to ImageNet118. Both have exclusive classes between source and target domain. In the ImageNet experiment, the backbone network is initialized with the weights pre-trained with ImageN et882.
311
+
312
+ ![](images/62fef6aa1814051042be0542b4068cc2863de90390604a41a4bf68f744e5059c.jpg)
313
+ Figure 7: Comparison between domain adaptation approaches (a) Transferring semantic similarity from auxiliary data (our method), and (b) Minimizing the domain discrepancy. The diagram uses office-31 benchmark as the scenario of transferring.
314
+
315
+ # B SUPPLEMENTARY FOR UNSUPERVISED CROSS TASK TRANSFER LEARNING
316
+
317
+ Table 5: A breakdown of the results for each alphabet in Omnigloteval. The unsupervised cross task transfer experiment is described in section 5.1. This table shows the clustering accuracy with $K = 1 0 0$ to simulate the situation of unknown number of clusters.
318
+
319
+ <table><tr><td>Alphabet</td><td>K-means</td><td>LPNMF</td><td>LSC</td><td>ITML</td><td>SKMS</td><td>SKKm</td><td>SKLR</td><td>CSP</td><td>MPCK-means</td><td>CCN</td></tr><tr><td>Angelic</td><td>24%</td><td>26%</td><td>27%</td><td>48%</td><td>78%</td><td>40%</td><td>38%</td><td>72%</td><td>50%</td><td>82%</td></tr><tr><td>Atemayar_Qelisayer</td><td>19%</td><td>14%</td><td>17%</td><td>51%</td><td>61%</td><td>51%</td><td>44%</td><td>61%</td><td>50%</td><td>82%</td></tr><tr><td>Atlantean</td><td>19%</td><td>15%</td><td>19%</td><td>57%</td><td>72%</td><td>55%</td><td>51%</td><td>77%</td><td>47%</td><td>72%</td></tr><tr><td>Aurek_Besh</td><td>23%</td><td>18%</td><td>21%</td><td>45%</td><td>49%</td><td>44%</td><td>45%</td><td>76%</td><td>71%</td><td>90%</td></tr><tr><td>Avesta</td><td>22%</td><td>18%</td><td>19%</td><td>47%</td><td>29%</td><td>39%</td><td>38%</td><td>65%</td><td>52%</td><td>76%</td></tr><tr><td>Ge_ez</td><td>19%</td><td>17%</td><td>17%</td><td>56%</td><td>58%</td><td>47%</td><td>42%</td><td>72%</td><td>55%</td><td>82%</td></tr><tr><td>Glagolitic</td><td>22%</td><td>19%</td><td>21%</td><td>42%</td><td>38%</td><td>58%</td><td>62%</td><td>66%</td><td>61%</td><td>85%</td></tr><tr><td>Gurmukhi</td><td>15%</td><td>13%</td><td>15%</td><td>44%</td><td>26%</td><td>54%</td><td>48%</td><td>60%</td><td>56%</td><td>80%</td></tr><tr><td>Kannada</td><td>18%</td><td>14%</td><td>16%</td><td>48%</td><td>37%</td><td>46%</td><td>53%</td><td>60%</td><td>48%</td><td>62%</td></tr><tr><td>Keble</td><td>20%</td><td>14%</td><td>18%</td><td>44%</td><td>60%</td><td>46%</td><td>44%</td><td>75%</td><td>68%</td><td>90%</td></tr><tr><td>Malayalam</td><td>18%</td><td>15%</td><td>16%</td><td>36%</td><td>24%</td><td>49%</td><td>52%</td><td>50%</td><td>54%</td><td>72%</td></tr><tr><td>Manipuri</td><td>17%</td><td>15%</td><td>16%</td><td>49%</td><td>40%</td><td>53%</td><td>54%</td><td>66%</td><td>62%</td><td>85%</td></tr><tr><td>Mongolian</td><td>18%</td><td>18%</td><td>19%</td><td>50%</td><td>40%</td><td>37%</td><td>48%</td><td>75%</td><td>57%</td><td>86%</td></tr><tr><td>Old_Church_Slavonic_Cyrilic</td><td>19%</td><td>16%</td><td>19%</td><td>42%</td><td>41%</td><td>52%</td><td>67%</td><td>71%</td><td>67%</td><td>94%</td></tr><tr><td>Oriya</td><td>15%</td><td>13%</td><td>14%</td><td>46%</td><td>40%</td><td>54%</td><td>45%</td><td>57%</td><td>52%</td><td>67%</td></tr><tr><td>Sylheti</td><td>14%</td><td>13%</td><td>14%</td><td>49%</td><td>32%</td><td>35%</td><td>37%</td><td>59%</td><td>43%</td><td>64%</td></tr><tr><td>Syriac_Serto</td><td>20%</td><td>18%</td><td>19%</td><td>55%</td><td>70%</td><td>42%</td><td>35%</td><td>70%</td><td>47%</td><td>73%</td></tr><tr><td>Tengwar</td><td>18%</td><td>18%</td><td>18%</td><td>51%</td><td>44%</td><td>49%</td><td>40%</td><td>61%</td><td>44%</td><td>66%</td></tr><tr><td>Tibetan</td><td>18%</td><td>14%</td><td>16%</td><td>44%</td><td>31%</td><td>47%</td><td>54%</td><td>59%</td><td>55%</td><td>84%</td></tr><tr><td>ULOG</td><td>20%</td><td>18%</td><td>18%</td><td>41%</td><td>41%</td><td>40%</td><td>41%</td><td>56%</td><td>38%</td><td>70%</td></tr><tr><td>Average</td><td>19%</td><td>16%</td><td>18%</td><td>47%</td><td>46%</td><td>47%</td><td>47%</td><td>65%</td><td>54%</td><td>78%</td></tr></table>
320
+
321
+ Table 6: Estimates for the number of characters across the 20 datasets in Omniglot $e v a l$ . The bold number means the prediction has error smaller or equal to 3. The $A D i f$ is defined in section 5.1.2.
322
+
323
+ <table><tr><td>Alphabet</td><td>True #class</td><td>SKMS</td><td>CCN (K=100)</td></tr><tr><td>Angelic</td><td>20</td><td>16</td><td>26</td></tr><tr><td>Atemayar_Qelisayer</td><td>26</td><td>17</td><td>34</td></tr><tr><td>Atlantean</td><td>26</td><td>21</td><td>41</td></tr><tr><td>Aurek_Besh</td><td>26</td><td>14</td><td>28</td></tr><tr><td>Avesta</td><td>26</td><td>8</td><td>32</td></tr><tr><td>Ge_ez</td><td>26</td><td>18</td><td>32</td></tr><tr><td>Glagolitic</td><td>45</td><td>18</td><td>45</td></tr><tr><td>Gurmukhi</td><td>45</td><td>12</td><td>43</td></tr><tr><td>Kannada</td><td>41</td><td>19</td><td>44</td></tr><tr><td>Keble</td><td>26</td><td>16</td><td>28</td></tr><tr><td>Malayalam</td><td>47</td><td>12</td><td>47</td></tr><tr><td>Manipuri</td><td>40</td><td>17</td><td>41</td></tr><tr><td>Mongolian</td><td>30</td><td>28</td><td>36</td></tr><tr><td>Old_Church_Slavonic_Cyrillic</td><td>45</td><td>23</td><td>45</td></tr><tr><td>Oriya</td><td>46</td><td>22</td><td>49</td></tr><tr><td>Sylheti</td><td>28</td><td>11</td><td>50</td></tr><tr><td>Syriac_Serto</td><td>23</td><td>19</td><td>38</td></tr><tr><td>Tengwar</td><td>25</td><td>12</td><td>41</td></tr><tr><td>Tibetan</td><td>42</td><td>15</td><td>42</td></tr><tr><td>ULOG</td><td>26</td><td>15</td><td>40</td></tr><tr><td>ADif</td><td></td><td>16.3</td><td>6.35</td></tr></table>
324
+
325
+ Table 7: The performance of the similarity prediction function used in section 5.1. We leverage the N-way test which is commonly used in one-shot learning evaluation. The similarity is learned with Omniglot $b g$ and has N-way test with $O m n i g l o t _ { e v a l }$ and MNIST. The experimental settings follow Vinyals et al. (2016). The raw probability output (without binarization) from our $G$ is used to find the nearest exemplar in the N-way test.
326
+
327
+ <table><tr><td>Method</td><td colspan="2">Omniglot-eval 5-way</td><td>MNIST 10-way</td></tr><tr><td>Siamese-Nets (Koch et al., 2015)</td><td>0.967</td><td>20-way 0.880</td><td>0.703</td></tr><tr><td>Match-Net (Vinyals et al., 2016)</td><td>0.981</td><td>0.938</td><td>0.720</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Ours</td><td>0.979</td><td>0.935</td><td>0.720</td></tr></table>
328
+
329
+ Table 8: Unsupervised cross-task transfer learning on ImageNet. The values are the average of three random subsets in $I m a g e N e t _ { 1 1 8 }$ . Each subset has 30 classes. The "ACC" has $K = 3 0$ while the "ACC (100)" sets $K = 1 0 0$ . All methods use the features (outputs of average pooling) from Resnet-18 pre-trained with ImageNet882 classification.
330
+
331
+ <table><tr><td>Method</td><td>ACC</td><td>ACC(100)</td><td>NMI</td><td>NMI(100)</td></tr><tr><td>K-means</td><td>71.9%</td><td>34.5%</td><td>0.713</td><td>0.671</td></tr><tr><td>LSC</td><td>73.3%</td><td>33.5%</td><td>0.733</td><td>0.655</td></tr><tr><td>LPNMF</td><td>43.0%</td><td>21.8%</td><td>0.526</td><td>0.500</td></tr><tr><td>CCN (ours)</td><td>73.8%</td><td>65.2%</td><td>0.750</td><td>0.715</td></tr></table>
332
+
333
+ Table 9: Performance of the similarity prediction function ( $G$ , trained with ImageN et882) applied to three subsets of $I m a g e N e t _ { 1 1 8 }$ . Each subset contains 30 random classes of $I m a g e N e t _ { 1 1 8 }$ . The predictions are binarized at 0.5 to calculate the precision and recall. Random\*: The expected performance when classes are uniformly distributed and make uniform random guess for similarity. It is an approximation since the number of images in each class is only roughly equal in ImageNet. We sampled 12M pairs for each set to collect the statistics. Sampling more pairs has no noticeable change to the values.
334
+
335
+ <table><tr><td>Set</td><td>Similar Precision</td><td> Similar Recall</td><td>Dissimilar Precision</td><td>Dissimilar Recall</td></tr><tr><td>Random*</td><td>0.033</td><td>0.500</td><td>0.967</td><td>0.500</td></tr><tr><td>Set A</td><td>0.840</td><td>0.664</td><td>0.983</td><td>0.994</td></tr><tr><td>SetB</td><td>0.825</td><td>0.631</td><td>0.981</td><td>0.993</td></tr><tr><td>Set C</td><td>0.771</td><td>0.671</td><td>0.983</td><td>0.990</td></tr><tr><td>Average</td><td>0.812</td><td>0.655</td><td>0.982</td><td>0.992</td></tr></table>
336
+
337
+ # C SUPPLEMENTARY FOR UNSUPERVISED CROSS DOMAIN TRANSFER LEARNING
338
+
339
+ # C.1 MORE DISCUSSION FOR THE OFFICE-31 EXPERIMENTS
340
+
341
+ Our experiment (table 10) shows that simply using deeper pre-trained networks produces a significant performance boost. Specifically, using Resnet-50 increases the performance 8.4 points from Alexnet, which surpasses the 6.2 points gained by using one of the state-of-the-art domain adaptation algorithms (JAN (Long et al., 2017)). If we regard pre-training with deeper networks as transferring more information, our approach is similar in this aspect since both transfer more information from the auxiliary dataset. In this case, memory limitations precluded the application of LCO to such models, and multi-GPU implementations for this problem is an area of future work.
342
+
343
+ Table 10: The performance of unsupervised transfer across domains on Office-31 dataset. The backbone networks in the comparison have different numbers of convolutional layers. AlexNet has 5 layers and the ResNets have $1 8 { \sim } 5 0$ layers. SO is the abbreviation for source-only, which simply trains on $S ^ { \prime }$ and directly applies the classifier on $T$ . The first two rows are directly copied from Long et al. (2017). The features learned with deeper networks generalize better across domains.
344
+
345
+ <table><tr><td colspan="8">A→W D→W W→D A→D D→A W→A</td></tr><tr><td>AlexNet SO</td><td>61.6</td><td>95.4</td><td>99.0</td><td>63.8</td><td>51.1</td><td>49.8</td><td>Avg 70.1</td><td>1</td></tr><tr><td>AlexNet (JAN-A)</td><td>75.2</td><td>96.6</td><td>99.6</td><td>72.8</td><td>57.5</td><td>56.3</td><td>76.3</td><td>+6.2</td></tr><tr><td>Resnet-18 SO</td><td>66.8</td><td>92.8</td><td>96.8</td><td>67.1</td><td>51.4</td><td>53.0</td><td>71.3</td><td>+1.2</td></tr><tr><td>Resnet-34 SO</td><td>73.1</td><td>96.4</td><td>98.8</td><td>73.8</td><td>63.2</td><td>62.1</td><td>77.9</td><td>+7.8</td></tr><tr><td>Resnet-50 SO</td><td>74.3</td><td>96.8</td><td>98.8</td><td>79.5</td><td>61.2</td><td>60.6</td><td>78.5</td><td>+8.4</td></tr></table>
346
+
347
+ Table 11: Performance of the similarity prediction function ( $G$ , trained with ImageNet882) applied on three domains of the Office-31 dataset. In total, 1.4M pairs are examined to calculate the table.
348
+
349
+ <table><tr><td>Domain</td><td>Similar Precision</td><td>Similar Recall</td><td>Dissimilar Precision</td><td>Dissimilar Recall</td></tr><tr><td>Amazon</td><td>0.194</td><td>0.696</td><td>0.988</td><td>0.894</td></tr><tr><td>DSLR</td><td>0.196</td><td>0.882</td><td>0.995</td><td>0.858</td></tr><tr><td>Webcam</td><td>0.213</td><td>0.865</td><td>0.994</td><td>0.876</td></tr></table>
350
+
351
+ Table 12: Unsupervised transferring across domains (S’: SVHN, T: MNIST A: Omniglotbg) without pre-trained backbone network weights. Our setup is similar to Sener et al. (2016) and Ganin et al. (2016) which therefore has a similar source-only performance.
352
+
353
+ <table><tr><td colspan="2">Method</td><td>SVHN-&gt;MNIST</td><td>Gain</td></tr><tr><td>Ganin et al. (2016)</td><td>Source-Only DANN</td><td>54.9 73.9</td><td>1 +19.0</td></tr><tr><td>Sener et al. (2016)</td><td>Source-Only LTR</td><td>54.9 78.8</td><td>1 +23.9</td></tr><tr><td>Saito et al. (2017)</td><td>Source-Only ATDA</td><td>70.1 86.2</td><td>- +16.1</td></tr><tr><td>Tzeng et al. (2017)</td><td>Source-Only ADDA</td><td>60.1 76.0</td><td>- +15.9</td></tr><tr><td>Ours</td><td>Source-Only CCN+</td><td>52.0 89.1</td><td>1 +37.1</td></tr></table>
354
+
355
+ Table 13: Performance of the similarity prediction function ( $G$ , trained with Omniglotbg) applied on the MNIST dataset. In total, 5M pairs are sampled to calculate the table.
356
+
357
+ <table><tr><td></td><td>Similar Precision</td><td>Similar Recall</td><td>Dissimilar Precision</td><td>Dissimilar Recall</td></tr><tr><td>Random</td><td>0.100</td><td>0.500</td><td>0.900</td><td>0.500</td></tr><tr><td>MNIST</td><td>0.782</td><td>0.509</td><td>0.946</td><td>0.984</td></tr></table>
358
+
359
+ # D ROBUSTNESS ANALYSIS OF CONSTRAINED CLUSTERING NETWORK
360
+
361
+ # D.1 SETUP
362
+
363
+ To quickly explore the large combination of factors that may affect the clustering, we use a small dataset (MNIST) and a small network which has two convolution layers followed by two fully connected layers. The MNIST dataset is a dataset of handwritten digits that contains 60k training and 10k testing images with size $2 8 \mathbf { x } 2 8$ . Only the training set is used in this section and the raw pixels, which were normalized to zero mean and unit standard deviation, were fed into networks directly.
364
+
365
+ The networks were randomly initialized and the clustering training was run five times under each combination of factors; we show the best final results, as is usual in the random restart regime. The mini-batch size was set to 256, thus up to 65536 pairs were presented to the LCO per mini-batch if using full density $\mathrm { ( D } { = } 1 \mathrm { ) }$ ). There were 235 mini-batches in an epoch and the optimization proceeded for 15 epochs. The clustering loss was minimized by stochastic gradient descent with learning rate 0.1 and momentum 0.9. The predicted cluster was assigned at the end by forwarding samples through the clustering networks. The best result in the five runs was reported.
366
+
367
+ To simulate different performance of the similarity prediction, the label of pairs were flipped according to the designated recall. For example, to simulate a $90 \%$ recall of similar pair, $10 \%$ of the ground truth similar pair in a mini-batch were flipped. The precision of similar/dissimilar pairs is a function of the recall of both type of pairs, thus controlling the recall is sufficient for the evaluation. The recalls for both similar and dissimilar pairs were gradually reduced from one to zero at intervals of 0.1.
368
+
369
+ # D.2 DISCUSSION
370
+
371
+ The resulting performance w.r.t different values of recall, density, and number of clusters is visualized in Figure 8. A bright color means high NMI score and is desired. The larger the bright region, the more robust the clustering is against the noise of similarity prediction. The ACC score shows almost the same trend and is thus not shown here.
372
+
373
+ How does similarity prediction affect clustering? Looking at the top-left heat map in figure 8, which has $D = 1$ and 10 clusters, it can be observed that the NMI score is very robust to low similar pair recall, even lower than 0.5. For recall of dissimilar pairs, the effect of recall is divided at the 0.5 value: the clustering performance can be very robust to noise in dissimilar pairs if the recall is greater than 0.5; however, it can completely fail if recall is below 0.5. For similar pairs, the clustering works on a wide range of recalls when the recall of dissimilar pairs is high.
374
+
375
+ In practical terms, robustness to the recall of similar pairs is desirable because it is much easier to predict dissimilar pairs than similar pairs in real scenarios. In a dataset with 10 categories e.g. Cifar-10, we can easily get $90 \%$ recall for dissimilar pairs with purely random guess if the number of classes is known, while the recall for similar pairs will be $10 \%$ .
376
+
377
+ How does the density of the constraints affect clustering? We argue that the density of pairwise relationships is the key factor to improving the robustness of clustering. The density $D = 1$ means that every pair in a mini-batch is utilized by the clustering loss. For density $D = 0 . 1$ , it means only 1 out of 10 possible constraints is used. We could regard the higher density as better utilization of the pairwise information in a mini-batch, thus more learning instances contribute to the gradients at once. Consider a scenario where there is one sample associated with 5 true similar pairs and 3 false similar pairs. In such a case, the gradients introduced by the false similar pairs have a higher chance to be overridden by true similar pairs within the mini-batch, thus the loss can converge faster and is less affected by errors. In Figure 8, we could see when density decreases, the size of the bright region shrinks significantly.
378
+
379
+ ![](images/12cec765ecdee0ae03b658c3f3798b3d511e16695116130fd85ecccd06d459c9.jpg)
380
+ Figure 8: The clustering performance with different pairwise density and number of clusters. A bright color means that the NMI score is close to 1 while black corresponds to 0. The density is defined as a ratio compared to the total number of pair-wise combinations in a mini-batch. The number of clusters defines the final softmax output dimensionality. In each sub-figure, we show how the scores change w.r.t. the similar pair recall and dissimiliar pair recall.
381
+
382
+ In our implementation, enumerating the full pairwise relationships introduces negligible overhead in computation time using GPU. Although there is overhead for memory consumption, it is limited because only the vector of predicted distributions has to be enumerated for calculating the clustering loss.
383
+
384
+ The effect of varying the number of Clusters In the MNIST experiments, the number of categories is 10. We augment the softmax output number up to 100. The rows of figure 8 show that even when the number of output categories is significant larger than the number of true object categories, e.g. $1 0 0 > 1 0$ , the clustering performance NMI score only degrades slightly.
parse/train/ByRWCqvT-/ByRWCqvT-_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByRWCqvT-/ByRWCqvT-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByRWCqvT-/ByRWCqvT-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BygzbyHFvB/BygzbyHFvB.md ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FREELB: ENHANCED ADVERSARIAL TRAINING FOR NATURAL LANGUAGE UNDERSTANDING
2
+
3
+ Chen $\mathbf { Z } \mathbf { h } \mathbf { u } ^ { \mathbf { 1 } }$ , Yu Cheng2, Zhe $\mathbf { G a n } ^ { 2 }$ , Siqi $\mathbf { S u n } ^ { 2 }$ , Tom Goldstein1, Jingjing Liu2 1University of Maryland, College Park 2Microsoft Dynamics 365 AI Research {chenzhu,tomg}@cs.umd.edu, {yu.cheng,zhe.gan,siqi.sun,jingjl}@microsoft.com
4
+
5
+ # ABSTRACT
6
+
7
+ Adversarial training, which minimizes the maximal risk for label-preserving input perturbations, has proved to be effective for improving the generalization of language models. In this work, we propose a novel adversarial training algorithm, FreeLB, that promotes higher invariance in the embedding space, by adding adversarial perturbations to word embeddings and minimizing the resultant adversarial risk inside different regions around input samples. To validate the effectiveness of the proposed approach, we apply it to Transformer-based models for natural language understanding and commonsense reasoning tasks. Experiments on the GLUE benchmark show that when applied only to the finetuning stage, it is able to improve the overall test scores of BERT-base model from 78.3 to 79.4, and RoBERTa-large model from 88.5 to 88.8. In addition, the proposed approach achieves state-of-the-art single-model test accuracies of $8 5 . 4 4 \%$ and $6 7 . 7 5 \%$ on ARC-Easy and ARC-Challenge. Experiments on CommonsenseQA benchmark further demonstrate that FreeLB can be generalized and boost the performance of RoBERTa-large model on other tasks as well. 1
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Adversarial training is a method for creating robust neural networks. During adversarial training, mini-batches of training samples are contaminated with adversarial perturbations (alterations that are small and yet cause misclassification), and then used to update network parameters until the resulting model learns to resist such attacks. Adversarial training was originally proposed as a means to enhance the security of machine learning systems (Goodfellow et al., 2015), especially for safety-critical systems like self-driving cars (Xiao et al., 2018) and copyright detection (Saadatpanah et al., 2019).
12
+
13
+ In this paper, we turn our focus away from the security benefits of adversarial training, and instead study its effects on generalization. While adversarial training boosts the robustness, it is widely accepted by computer vision researchers that it is at odds with generalization, with classification accuracy on non-corrupted images dropping as much as $1 0 \%$ on CIFAR-10, and $1 5 \%$ on Imagenet (Madry et al., 2018; Xie et al., 2019). Surprisingly, people observe the opposite result for language models (Miyato et al., 2017; Cheng et al., 2019), showing that adversarial training can improve both generalization and robustness.
14
+
15
+ We will show that adversarial training significantly improves performance of state-of-the-art models for many language understanding tasks. In particular, we propose a novel adversarial training algorithm, called FreeLB (Free Large-Batch), which adds adversarial perturbations to word embeddings and minimizes the resultant adversarial loss around input samples. The method leverages recently proposed “free” training strategies (Shafahi et al., 2019; Zhang et al., 2019) to enrich the training data with diversified adversarial samples under different norm constraints at no extra cost than PGD-based (Projected Gradient Descent) adversarial training (Madry et al., 2018), which enables us to perform such diversified adversarial training on large-scale state-of-the-art models. We observe improved invariance in the embedding space for models trained with FreeLB, which is positively correlated with generalization.
16
+
17
+ We perform comprehensive experiments to evaluate the performance of a variety of adversarial training algorithms on state-of-the-art language understanding models and tasks. In the comparisons with standard PGD (Madry et al., 2018), FreeAT (Shafahi et al., 2019) and YOPO (Zhang et al., 2019), FreeLB stands out to be the best for the datasets and models we evaluated. With FreeLB, we achieve state-of-the-art results on several important language understanding benchmarks. On the GLUE benchmark, FreeLB pushes the performance of the BERT-base model from 78.3 to 79.4. The overall score of the RoBERTa-large models on the GLUE benchmark is also lifted from 88.5 to 88.8, achieving best results on most of its sub-tasks. Experiments also show that FreeLB can boost the performance of RoBERTa-large on question answering tasks, such as the ARC and CommonsenseQA benchmarks. We also provide a comprehensive ablation study and analysis to demonstrate the effectiveness of our training process.
18
+
19
+ # 2 RELATED WORK
20
+
21
+ # 2.1 ADVERSARIAL TRAINING
22
+
23
+ To improve the robustness of neural networks against adversarial examples, many defense strategies and models have been proposed, in which PGD-based adversarial training (Madry et al., 2018) is widely considered to be the most effective, since it largely avoids the the obfuscated gradient problem (Athalye et al., 2018). It formulates a class of adversarial training algorithms (Kurakin et al., 2017) into solving a minimax problem on the cross-entropy loss, which can be achieved reliably through multiple projected gradient ascent steps followed by a SGD (Stochastic Gradient Descent) step.
24
+
25
+ Despite being verified by Athalye et al. (2018) to avoid obfuscated gradients, Qin et al. (2019) shows that PGD-based adversarial training still leads to highly convolved and non-linear loss surfaces when $K$ is small, which could be readily broken under stronger adversaries. Thus, to be effective, the cost of PGD-based adversarial training is much higher than conventional training. To mitigate this cost, Shafahi et al. (2019) proposed a “free” adversarial training algorithm that simultaneously updates both model parameters and adversarial perturbations on a single backward pass. Using a similar formulation, Zhang et al. (2019) effectively reduce the total number of full forward and backward propagations for obtaining adversarial examples by restricting most of its adversarial updates in the first layer.
26
+
27
+ # 2.2 ADVERSARIAL EXAMPLES IN NATURAL LANGUAGES
28
+
29
+ Adversarial examples have been explored primarily in the image domain, and received many attention in text domain recently. Previous works on text adversaries have focused on heuristics for creating adversarial examples in the black-box setting, or on specific tasks. Jia & Liang (2017) propose to add distracting sentences to the input document in order to induce mis-classification. Zhao et al. (2018) generate text adversaries by projecting the input data to a latent space using GANs, and searching for adversaries close to the original instance. Belinkov & Bisk (2018) manipulate every word in a sentence with synthetic or natural noise in machine translation systems. Iyyer et al. (2018) propose a neural paraphrase model based on back-translated data to produce paraphrases that have different sentence structures. Different from previous work, ours is not to produce actual adversarial examples, but only take the benefit of adversarial training for natural language understanding.
30
+
31
+ We are not the first to observe that robust language models may perform better on clean test data. Miyato et al. (2017) extend adversarial and virtual adversarial training (Miyato et al., 2019) to the text domain to improve the performance on semi-supervised classification tasks. Ebrahimi et al. (2018) propose a character/word replacement for crafting attacks, and show employing adversarial examples in training renders the models more robust. Ribeiro et al. (2018) show that adversarial attacks can be used as a valuable tool for debugging NLP models. Cheng et al. (2019) also find that crafting adversarial examples can help neural machine translation significantly. Notably, these studies have focused on simple models or text generation tasks. Our work explores how to efficiently use the gradients obtained in adversarial training to boost the performance of state-of-the-art transformer-based models.
32
+
33
+ # 3 ADVERSARIAL TRAINING FOR LANGUAGE UNDERSTANDING
34
+
35
+ Pre-trained large-scale language models, such as BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019b), ALBERT (Lan et al., 2020) and T5 (Raffel et al., 2019), have proven to be highly effective for downstream tasks. We aim to further improve the generalization of these pre-trained language models on the downstream language understanding tasks by enhancing their robustness in the embedding space during finetuning on these tasks. We achieve this goal by creating “virtual” adversarial examples in the embedding space, and then perform parameter updates on these adversarial embeddings. Creating actual adversarial examples for language is difficult; even with state-of-theart language models as guidance (e.g., (Cheng et al., 2019)), it remains unclear how to construct label-preserving adversarial examples via word/character replacement without human evaluations, because the meaning of each word/character depends on the context (Ribeiro et al., 2018). Since we are only interested in the effects of adversarial training, rather than producing actual adversarial examples, we add norm-bounded adversarial perturbations to the embeddings of the input sentences using a gradient-based method. Note that our embedding-based adversary is strictly stronger than a more conventional text-based adversary, as our adversary can make manipulations on word embeddings that are not possible in the text domain.
36
+
37
+ For models that incorporate various input representations, including word or subword embeddings, segment embeddings and position embeddings, our adversaries only modify the concatenated word or sub-word embeddings, leaving other components of the sentence representation unchanged. 2 Denote the sequence of one-hot representations of the input subwords as $\pmb { Z } = [ z _ { 1 } , z _ { 2 } , . . . , z _ { n } ]$ , the embedding matrix as $V$ , and the language model (encoder) as a function ${ \pmb y } = f _ { \pmb \theta } ( { \pmb X } )$ , where $\dot { \boldsymbol { X } } = \boldsymbol { V } \boldsymbol { Z }$ is the subword embeddings, $\textbf { { y } }$ is the output of the model (e.g., class probabilities for classification models), and $\pmb \theta$ denotes all the learnable parameters including the embedding matrix $V$ . We add adversarial perturbations $\delta$ to the embeddings such that the prediction becomes $\pmb { y } ^ { \prime } = f _ { \pmb { \theta } } ( \pmb { X } + \pmb { \delta } )$ . To preserve the semantics, we constrain the norm of $\pmb { \delta }$ to be small, and assume the model’s prediction should not change after the perturbation. This formulation is analogous to Miyato et al. (2017), with the difference that we do not require $\boldsymbol { X }$ to be normalized.
38
+
39
+ # 3.1 PGD FOR ADVERSARIAL TRAINING
40
+
41
+ Standard adversarial training seeks to find optimal parameters $\pmb { \theta } ^ { * }$ to minimize the maximum risk for any $\pmb { \delta }$ within a norm ball as:
42
+
43
+ $$
44
+ \operatorname* { m i n } _ { \theta } \mathbb { E } _ { ( Z , y ) \sim \mathcal { D } } \left[ \operatorname* { m a x } _ { \| \delta \| \leq \epsilon } L ( f _ { \theta } ( X + \delta ) , y ) \right] ,
45
+ $$
46
+
47
+ where $\mathcal { D }$ is the data distribution, $y$ is the label, and $L$ is some loss function. We use the Frobenius norm to constrain $\delta$ . For neural networks, the outer “min” is non-convex, and the inner “max” is non-concave. Nonetheless, Madry et al. (2018) demonstrated that this saddle-point problem can be solved reliably with SGD for the outer minimization and PGD (a standard method for large-scale constrained optimization, see (Combettes & Pesquet, 2011) and (Goldstein et al., 2014)), for the inner maximization. In particular, for the constraint $\| \delta \| _ { F } \le \epsilon$ , with an additional assumption that the loss function is locally linear, PGD takes the following step (with step size $\alpha$ ) in each iteration:
48
+
49
+ $$
50
+ \delta _ { t + 1 } = \Pi _ { \| \pmb { \delta } \| _ { F } \leq \epsilon } \left( \pmb { \delta } _ { t } + \alpha g ( \pmb { \delta } _ { t } ) / \| g ( \pmb { \delta } _ { t } ) \| _ { F } \right) ,
51
+ $$
52
+
53
+ where $g ( \delta _ { t } ) = \nabla _ { \delta } L ( f _ { \theta } ( X + \delta _ { t } ) , y )$ is the gradient of the loss with respect to $\delta$ , and $\Pi _ { \| \delta \| _ { F } \leq \epsilon }$ performs a projection onto the $\epsilon$ -ball. To achieve high-level robustness, multi-step adversarial examples are needed during training, which is computationally expensive. The $K$ -step PGD ( $K$ -PGD) requires $K$ forward-backward passes through the network, while the standard SGD update requires only one. As a result, the adversary generation step in adversarial training increases run-time by an order of magnitude—a catastrophic amount when training large state-of-the-art language models.
54
+
55
+ # 3.2 LARGE-BATCH ADVERSARIAL TRAINING FOR FREE
56
+
57
+ In the inner ascent steps of PGD, the gradients of the parameters can be obtained with almost no overhead when computing the gradients of the inputs. From this observation, FreeAT (Shafahi et al.,
58
+
59
+ # Algorithm 1 “Free” Large-Batch Adversarial Training (FreeLB- $K$ )
60
+
61
+ <table><tr><td>ascent step size α</td><td>Require: Training samples X = {(Z,y)}, perturbation bound ε, learning rate T, ascent steps K,</td></tr><tr><td>1:Initialize 0</td><td></td></tr><tr><td>2: for epoch =1... Nep do</td><td></td></tr><tr><td>3:</td><td>for minibatchB ℃Xdo</td></tr><tr><td>4:</td><td>U(-∈,∈)</td></tr><tr><td>5:</td><td>90↑0</td></tr><tr><td>6:</td><td></td></tr><tr><td>7:</td><td>fort=1...K do</td></tr><tr><td>8:</td><td>Accumulate gradient of parameters θ</td></tr><tr><td>9:</td><td>gt←gt-1+kE(z,y)∈B[VθL(fe(X+δt-1),y)]</td></tr><tr><td>10:</td><td>Update the perturbation δ via gradient ascend</td></tr><tr><td>11:</td><td>gadu ←VsL(fθ(X+δt-1),y) δt ←II|δ|lr≤e(δt-1+α:gadu/llgadullF)</td></tr><tr><td>12:</td><td></td></tr><tr><td>13:</td><td>end for</td></tr><tr><td>14:</td><td>0←0-TgK</td></tr><tr><td>end for 15: end for</td><td></td></tr></table>
62
+
63
+ 2019) and YOPO (Zhang et al., 2019) have been proposed to accelerate adversarial training. They achieve comparable robustness and generalization as standard PGD-trained models using only the same or a slightly larger number of forward-backward passes as natural training (i.e., SGD on clean samples). FreeAT takes one descent step on the parameters together with each of the $K$ ascent steps on the perturbation. As a result, FreeAT may suffer from the “stale gradient” problem (Dutta et al., 2018), where in every step $t$ , $\delta _ { t }$ does not necessarily maximize the model with parameter $\theta _ { t }$ since its update is based on $\nabla _ { \delta } L \big ( f _ { \pmb { \theta } _ { t - 1 } } ( \pmb { X } + \delta _ { t - 1 } ) , y \big )$ , and vice versa, $\theta _ { t }$ does not necessarily minimize the adversarial risk with adversary $\delta _ { t }$ since its update is based on $\nabla _ { \pmb { \theta } } L \big ( f _ { \pmb { \theta } _ { t - 1 } } ( \pmb { X } + \delta _ { t - 1 } ) , y \big )$ . Such a problem may be more significant when the step size is large.
64
+
65
+ Different from FreeAT, YOPO accumulates the gradient of the parameters from each of the ascent steps, and updates the parameters only once after the $K$ inner ascent steps. YOPO also advocates that after each back-propagation, one should take the gradient of the first hidden layer as a constant and perform several additional updates on the adversary using the product of this constant and the Jacobian of the first layer of the network to obtain strong adversaries. However, when the first hidden layer is a linear layer as in their implementation, such an operation is equivalent to taking a larger step size on the adversary. The analysis backing the extra update steps also assumes a twice continuously differentiable loss, which does not hold for ReLU-based neural networks they experimented with, and thus the reasons for the success of such an algorithm remains obscure. We give empirical comparisons between YOPO and our approach in Sec. 4.3.
66
+
67
+ To obtain better solutions for the inner max and avoid fundamental limitations on the function class, we propose FreeLB, which performs multiple PGD iterations to craft adversarial examples, and simultaneously accumulates the “free” parameter gradients $\nabla _ { \boldsymbol { \theta } } L$ in each iteration. After that, it updates the model parameter $\pmb \theta$ all at once with the accumulated gradients. The overall procedure is shown in Algorithm 1, in which $X + \delta _ { t }$ is an approximation to the local maximum within the intersection of two balls $\mathcal { T } _ { t } = \mathcal { B } _ { X + \delta _ { 0 } } ( \alpha t ) \cap \mathcal { B } _ { X } ( \epsilon )$ . By taking a descent step along the averaged gradients at $X + \delta _ { 0 } , . . . , X + \delta _ { K - 1 }$ , we approximately optimize the following objective:
68
+
69
+ $$
70
+ \underset { \pmb { \theta } } { \operatorname* { m i n } } \mathbb { E } _ { ( Z , y ) \sim \mathcal { D } } \left[ \frac { 1 } { K } \sum _ { t = 0 } ^ { K - 1 } \underset { \delta _ { t } \in \mathcal { Z } _ { t } } { \operatorname* { m a x } } L \big ( f _ { \pmb { \theta } } \big ( \pmb { X } + \delta _ { t } \big ) , y \big ) \right] ,
71
+ $$
72
+
73
+ which is equivalent to replacing the original batch $\boldsymbol { X }$ with a $K$ -times larger virtual batch, consisting of samples whose embeddings are $X + \delta _ { 0 } , . . . , X + \delta _ { K - 1 }$ . Compared with PGD-based adversarial training (Eq. 1), which minimizes the maximum risk at a single estimated point in the vicinity of each training sample, FreeLB minimizes the maximum risk at each ascent step at almost no overhead.
74
+
75
+ Intuitively, FreeLB could be a learning method with lower generalization error than PGD. Sokolic et al. (2017) have proved that the generalization error of a learning method invariant to a set of√ $T$ transformations may be up to $\sqrt { T }$ smaller than a non-invariant learning method. According to their theory, FreeLB could have a more significant improvement over natural training, since FreeLB enforces the invariance to $K$ adversaries from a set of up to $K$ different norm constraints,3 while PGD only enforces invariance to a single norm constraint $\epsilon$ .
76
+
77
+ Empirically, FreeLB does lead to higher robustness and invariance than PGD in the embedding space, in the sense that the maximum increase of loss in the vicinity of $\boldsymbol { X }$ for models trained with FreeLB is smaller than that with PGD. See Sec. 4.3 for details. In theory, such improved robustness can lead to better generalization (Xu & Mannor, 2012), which is consistent with our experiments. Qin et al. (2019) also demonstrated that PGD-based method leads to highly convolved and non-linear loss surfaces in the vicinity of input samples when $K$ is small, indicating a lack of robustness.
78
+
79
+ # 3.3 WHEN ADVERSARIAL TRAINING MEETS DROPOUT
80
+
81
+ Usually, adversarial training is not used together with dropout (Srivastava et al., 2014). However, for some language models like RoBERTa (Liu et al., 2019b), dropout is used during the finetuning stage. In practice, when dropout is turned on, each ascent step of Algorithm 1 is optimizing $\delta$ for a different network. Specifically, denote the dropout mask as $_ { m }$ with each entry $m _ { i } \sim \mathrm { B e r n o u l l i } ( p )$ . Similar to our analysis for FreeAT, the ascent step from $\delta _ { t - 1 }$ to $\delta _ { t }$ is based on $\nabla _ { \delta } L \big ( f _ { \theta ( m _ { t - 1 } ) } \big ( \boldsymbol { X } + \delta _ { t - 1 } \big ) , \boldsymbol { y } \big )$ , so $\delta _ { t }$ is sub-optimal for $L ( f _ { \theta ( m _ { t } ) } ( \boldsymbol { X } + \delta ) , y )$ . Here $\theta ( m )$ is the effective parameters under dropout mask $_ { m }$ .
82
+
83
+ The more plausible solution is to use the same $_ { \mathbf { \nabla } } \mathbf { m }$ in each step. When applying dropout to any network, the objective for $\pmb \theta$ is to minimize the expectation of loss under different networks determined by the dropout masks, which is achieved by minimizing the Monte Carlo estimation of the expected loss. In our case, the objective becomes:
84
+
85
+ $$
86
+ \operatorname* { m i n } _ { \theta } \mathbb { E } _ { ( Z , y ) \sim \mathcal { D } , m \sim \mathcal { M } } \left[ \frac { 1 } { K } \sum _ { t = 0 } ^ { K - 1 } \operatorname* { m a x } _ { \delta _ { t } \in \mathcal { T } _ { t } } L \big ( f _ { \theta ( m ) } ( X + \delta _ { t } ) , y \big ) \right] ,
87
+ $$
88
+
89
+ where the 1-sample Monte Carlo estimation should be $\begin{array} { r } { \frac { 1 } { K } \sum _ { t = 0 } ^ { K - 1 } \operatorname* { m a x } _ { \delta _ { t } \in \mathcal { T } _ { t } } L ( f _ { \theta ( m _ { 0 } ) } ( X + \delta _ { t } ) , y ) } \end{array}$ and can be minimized by using FreeLB with dropout mask $m _ { 0 }$ in each ascent step. This is similar to applying Variational Dropout to RNNs as used in Gal & Ghahramani (2016).
90
+
91
+ # 4 EXPERIMENTS
92
+
93
+ In this section, we provide comprehensive analysis on FreeLB through extensive experiments on three Natural Language Understanding benchmarks: GLUE (Wang et al., 2019), ARC (Clark et al., 2018) and CommonsenseQA (Talmor et al., 2019). We also compare the robustness and generalization of FreeLB with other adversarial training algorithms to demonstrate its strength. Additional experimental details are provided in the Appendix.
94
+
95
+ # 4.1 DATASETS
96
+
97
+ GLUE Benchmark. The GLUE benchmark is a collection of 9 natural language understanding tasks, namely Corpus of Linguistic Acceptability (CoLA; Warstadt et al. (2018)), Stanford Sentiment Treebank (SST; Socher et al. (2013)), Microsoft Research Paraphrase Corpus (MRPC; Dolan & Brockett (2005)), Semantic Textual Similarity Benchmark (STS; Agirre et al. (2007)), Quora Question Pairs (QQP; Iyer et al. (2017)), Multi-Genre NLI (MNLI; Williams et al. (2018)), Question NLI (QNLI; Rajpurkar et al. (2016)), Recognizing Textual Entailment (RTE; Dagan et al. (2006); Bar Haim et al. (2006); Giampiccolo et al. (2007); Bentivogli et al. (2009)) and Winograd NLI (WNLI; Levesque et al. (2011)). 8 of the tasks are formulated as classification problems and only STS-B is formulated as regression, but FreeLB applies to all of them. For BERT-base, we use the HuggingFace implementation4, and follow the single-task finetuning procedure as in Devlin et al. (2019). For RoBERTa, we use the fairseq implementation5. Same as Liu et al. (2019b), we also use single-task finetuning for all dev set results, and start with MNLI-finetuned models on RTE, MRPC and STS-B for the test submissions.
98
+
99
+ Table 1: Results (median and variance) on the dev sets of GLUE based on the RoBERTa-large model, from 5 runs with the same hyperparameter but different random seeds. ReImp is our reimplementation of RoBERTalarge. The training process can be very unstable even with the vanilla version. Here, both PGD on STS-B and FreeAT on RTE demonstrates such instability, with one unconverged instance out of five.
100
+
101
+ <table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>MNLI(Acc)</td><td rowspan=1 colspan=1>QNLI(Acc)</td><td rowspan=1 colspan=1>QQP(Acc)</td><td rowspan=1 colspan=1>RTE(Acc)</td><td rowspan=1 colspan=1>SST-2(Acc)</td><td rowspan=1 colspan=1>MRPC(Acc)</td><td rowspan=1 colspan=1>CoLA(Mcc)</td><td rowspan=1 colspan=1>STS-B(Pearson)</td></tr><tr><td rowspan=1 colspan=1>Reported</td><td rowspan=1 colspan=1>90.2</td><td rowspan=1 colspan=1>94.7</td><td rowspan=1 colspan=1>92.2</td><td rowspan=1 colspan=1>86.6</td><td rowspan=1 colspan=1>96.4</td><td rowspan=1 colspan=1>90.9</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>92.4</td></tr><tr><td rowspan=1 colspan=1>ReImp</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>85.61 (1.7)</td><td rowspan=1 colspan=1>96.56 (.3)</td><td rowspan=1 colspan=1>90.69(.5)</td><td rowspan=1 colspan=1>67.57 (1.3)</td><td rowspan=1 colspan=1>92.20 (.2)</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>90.53 (.2)</td><td rowspan=1 colspan=1>94.87 (.2)</td><td rowspan=1 colspan=1>92.49 (.07)</td><td rowspan=1 colspan=1>87.41 (.9)</td><td rowspan=1 colspan=1>96.44 (.1)</td><td rowspan=1 colspan=1>90.93 (.2)</td><td rowspan=1 colspan=1>69.67 (1.2)</td><td rowspan=1 colspan=1>92.43 (7.)</td></tr><tr><td rowspan=1 colspan=1>FreeAT</td><td rowspan=1 colspan=1>90.02 (.2)</td><td rowspan=1 colspan=1>94.66 (.2)</td><td rowspan=1 colspan=1>92.48(.08)</td><td rowspan=1 colspan=1>86.69 (15.)</td><td rowspan=1 colspan=1>96.10 (.2)</td><td rowspan=1 colspan=1>90.69 (.4)</td><td rowspan=1 colspan=1>68.80 (1.3)</td><td rowspan=1 colspan=1>92.40 (.3)</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>90.61 (.1)</td><td rowspan=1 colspan=1>94.98 (.2)</td><td rowspan=1 colspan=1>92.60 (.03)</td><td rowspan=1 colspan=1>88.13 (1.2)</td><td rowspan=1 colspan=1>96.79 (.2)</td><td rowspan=1 colspan=1>91.42 (.7)</td><td rowspan=1 colspan=1>71.12 (.9)</td><td rowspan=1 colspan=1>92.67 (.08)</td></tr></table>
102
+
103
+ Table 2: Results on GLUE from the evaluation server, as of Sep 25, 2019. Metrics are the same as the leaderboard. Number under each task’s name is the size of the training set. FreeLB-BERT is the single-model results of BERT-base finetuned with FreeLB, and FreeLB-RoB is the ensemble of 7 RoBERTa-Large models for each task. References: 1: (Devlin et al., 2019); 2: (Liu et al., 2019a); 3: (Yang et al., 2019); 4: (Liu et al., 2019b).
104
+
105
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Score</td><td rowspan=1 colspan=1>CoLA8.5k</td><td rowspan=1 colspan=1>SST-267k</td><td rowspan=1 colspan=1>MRPC3.7k</td><td rowspan=1 colspan=1>STS-B7k</td><td rowspan=1 colspan=1>QQP364k</td><td rowspan=1 colspan=1>MNLI-m/mm393k</td><td rowspan=1 colspan=1>QNLI108k</td><td rowspan=1 colspan=1>RTE2.5k</td><td rowspan=1 colspan=1>WNLI634</td><td rowspan=1 colspan=1>AX</td></tr><tr><td rowspan=1 colspan=1>BERT-base1</td><td rowspan=1 colspan=1>78.3</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>93.5</td><td rowspan=1 colspan=1>88.9/84.8</td><td rowspan=1 colspan=1>87.1/85.8</td><td rowspan=1 colspan=1>71.2/89.2</td><td rowspan=1 colspan=1>84.6/83.4</td><td rowspan=1 colspan=1>90.5</td><td rowspan=1 colspan=1>66.4</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>34.2</td></tr><tr><td rowspan=1 colspan=1>FreeLB-BERT</td><td rowspan=1 colspan=1>79.4</td><td rowspan=1 colspan=1>54.5</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>88.1/83.5</td><td rowspan=1 colspan=1>87.7/86.7</td><td rowspan=1 colspan=1>72.7/89.6</td><td rowspan=1 colspan=1>85.7/84.6</td><td rowspan=1 colspan=1>91.8</td><td rowspan=1 colspan=1>70.1</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>36.9</td></tr><tr><td rowspan=1 colspan=1>MT-DNN2</td><td rowspan=1 colspan=1>87.6</td><td rowspan=1 colspan=1>68.4</td><td rowspan=1 colspan=1>96.5</td><td rowspan=1 colspan=1>92.7/90.3</td><td rowspan=1 colspan=1>91.1/90.7</td><td rowspan=1 colspan=1>73.7789.9</td><td rowspan=1 colspan=1>87.9/87.4</td><td rowspan=1 colspan=1>96.0</td><td rowspan=1 colspan=1>86.3</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>42.8</td></tr><tr><td rowspan=1 colspan=1>XLNet-Large</td><td rowspan=1 colspan=1>88.4</td><td rowspan=1 colspan=1>67.8</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>93.0/90.7</td><td rowspan=1 colspan=1>91.6/91.1</td><td rowspan=1 colspan=1>74.2/90.3</td><td rowspan=1 colspan=1>90.2/89.8</td><td rowspan=1 colspan=1>98.6</td><td rowspan=1 colspan=1>86.3</td><td rowspan=1 colspan=1>90.4</td><td rowspan=1 colspan=1>47.5</td></tr><tr><td rowspan=1 colspan=1>RoBERTa4</td><td rowspan=1 colspan=1>88.5</td><td rowspan=1 colspan=1>67.8</td><td rowspan=1 colspan=1>96.7</td><td rowspan=1 colspan=1>92.3/89.8</td><td rowspan=1 colspan=1>92.2/91.9</td><td rowspan=1 colspan=1>74.3/90.2</td><td rowspan=1 colspan=1>90.8/90.2</td><td rowspan=1 colspan=1>98.9</td><td rowspan=1 colspan=1>88.2</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>48.7</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoB</td><td rowspan=1 colspan=1>88.8</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>93.1/90.8</td><td rowspan=1 colspan=1>92.4/92.2</td><td rowspan=1 colspan=1>74.8/90.3</td><td rowspan=1 colspan=1>91.1/90.7</td><td rowspan=1 colspan=1>98.8</td><td rowspan=1 colspan=1>88.7</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>50.1</td></tr><tr><td rowspan=1 colspan=1>Human</td><td rowspan=1 colspan=1>87.1</td><td rowspan=1 colspan=1>66.4</td><td rowspan=1 colspan=1>97.8</td><td rowspan=1 colspan=1>86.3/80.8</td><td rowspan=1 colspan=1>92.7/92.6</td><td rowspan=1 colspan=1>59.5/80.4</td><td rowspan=1 colspan=1>92.0/92.8</td><td rowspan=1 colspan=1>91.2</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>95.9</td><td rowspan=1 colspan=1>1</td></tr></table>
106
+
107
+ ARC Benchmark. The ARC dataset (Clark et al., 2018) is a collection of multi-choice science questions from grade-school level exams. It is further divided into ARC-Challenge set with 2,590 question answer (QA) pairs and ARC-Easy set with 5,197 QA pairs. Questions in ARC-Challenge are more difficult and cannot be handled by simply using a retrieval and co-occurence based algorithm (Clark et al., 2018). A typical question is:
108
+
109
+ Which property of a mineral can be determined just by looking at it?
110
+
111
+ (A) luster [correct] $( B )$ mass $( C )$ weight $( D )$ hardness.
112
+
113
+ CommonsenseQA Benchmark. The CommonsenseQA dataset (Talmor et al., 2019) consists of 12,102 natural language questions that require human commonsense reasoning ability to answer. A typical question is :
114
+
115
+ Where can I stand on a river to see water falling without getting wet?
116
+
117
+ (A) waterfall, (B) bridge [correct], (C) valley, $( D )$ stream, (E) bottom.
118
+
119
+ Each question has five candidate answers from ConceptNet (Speer et al., 2017). To make the question more difficult to solve, most answers have the same relation in ConceptNet to the key concept in the question. As shown in the above example, most answers can be connected to “river” by “AtLocation” relation in ConceptNet. For a fair comparison with the reported results in papers and leaderboard6, we use the official random split 1.11.
120
+
121
+ # 4.2 EXPERIMENTAL RESULTS
122
+
123
+ GLUE We summarize results on the dev sets of GLUE in Table 1, comparing the proposed FreeLB against other adversatial training algorithms (PGD (Madry et al., 2018) and FreeAT (Shafahi et al., 2019)). We use the same step size $\alpha$ and number of steps $m$ for PGD, FreeAT and FreeLB. FreeLB is consistently better than the two baselines. Comparisons and detailed discussions about
124
+
125
+ Table 3: Results on ARC and CommonsenseQA (CQA). ARC-Merge is the combination of ARC-Easy and ARC-Challenge, “MTL” stands for multi-task learning and “Ens” stands for ensemble. Results of XLNet $^ +$ RoBERTa $\left( \mathbf { M } \mathbf { T } \mathbf { L } { + } \mathbf { E } \mathbf { n } \mathbf { s } \right)$ and AristoRoBERTaV7 (MTL) are from the ARC leaderboards. Test (E) denotes the test set results with ensembles. For CQA, we report the highest dev and test accuracies among all models. The models with 78.81/72.19 dev/test accuracy (as in the table) have 71.84/78.64 test/dev accuracies respectively.
126
+
127
+ <table><tr><td rowspan=2 colspan=1></td><td rowspan=2 colspan=9>ARC-Easy ARC-Challenge ARC-Merge CQADev Test Dev Test Dev Test Dev Test Test (E)</td></tr><tr><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>Dev</td><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>Dev</td><td rowspan=1 colspan=2>Test Dev</td><td rowspan=1 colspan=1>Test</td></tr><tr><td rowspan=1 colspan=1>RoBERTa(Reported)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>78.43</td><td rowspan=1 colspan=1>72.1</td><td rowspan=1 colspan=1>72.5</td></tr><tr><td rowspan=1 colspan=1>RoBERTa (ReImp)</td><td rowspan=1 colspan=1>84.39</td><td rowspan=1 colspan=1>84.13</td><td rowspan=1 colspan=1>64.54</td><td rowspan=1 colspan=1>64.44</td><td rowspan=1 colspan=1>77.83</td><td rowspan=1 colspan=1>77.62</td><td rowspan=1 colspan=1>77.56</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoBERTa</td><td rowspan=1 colspan=1>84.91</td><td rowspan=1 colspan=1>84.81</td><td rowspan=1 colspan=1>65.89</td><td rowspan=1 colspan=1>65.36</td><td rowspan=1 colspan=1>78.37</td><td rowspan=1 colspan=1>78.39</td><td rowspan=1 colspan=1>78.81</td><td rowspan=1 colspan=1>72.2</td><td rowspan=1 colspan=1>73.1</td></tr><tr><td rowspan=1 colspan=1>AristoRoBERTaV7(MTL)</td><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=1>85.02</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>66.47</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>78.89</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>:</td></tr><tr><td rowspan=1 colspan=1>XLNet +RoBERTa (MTL+Ens)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>67.06</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoBERTa(MTL)</td><td rowspan=1 colspan=1>84.91</td><td rowspan=1 colspan=1>85.44</td><td rowspan=1 colspan=1>70.23</td><td rowspan=1 colspan=1>67.75</td><td rowspan=1 colspan=1>79.86</td><td rowspan=1 colspan=1>79.60</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td></tr></table>
128
+
129
+ YOPO (Zhang et al., 2019) are provided in Sec. 4.3. We have also submitted our results to the evaluation server, results provided in Table 2. FreeLB lifts the performance of the BERT-base model from 78.3 to 79.4, and RoBERTa-large model from 88.5 to 88.8 on overall scores.
130
+
131
+ ARC For ARC, a corpus of 14 million related science documents (from ARC Corpus, Wikipedia and other sources) is provided. For each QA pair, we first use a retrieval model to select top 10 related documents. Then, given these retrieved documents7, we use RoBERTa-large model to encode $\langle s \rangle$ Retrieved Documents $\langle / s \rangle$ Question $^ +$ Answer $\langle / s \rangle$ , where $\langle \mathbf { s } \rangle$ and $\langle / \mathrm { s } \rangle$ are special tokens for RoBERTa model8. We then apply a fully-connected layer to the representation of the [CLS] token to compute the final logit, and use standard cross-entropy loss for model training.
132
+
133
+ Results are summarized in Table 3. Following Sun et al. (2018), we first finetune the RoBERTa model on the RACE dataset (Lai et al., 2017). The finetuned RoBERTa model achieves $8 5 . 7 0 \%$ and $8 5 . 2 4 \%$ accuracy on the development and test set of RACE, respectively. Based on this, we further finetune the model on both ARC-Easy and ARC-Challenge datasets with the same hyper-parameter searching strategy (for 5 epochs), which achieves $8 4 . 1 3 \% / 6 4 . 4 4 \%$ test accuracy on ARC-Easy/ARCChallenge. And by adding FreeLB finetuning, we can reach $8 4 . 8 1 \% / 6 5 . 3 6 \%$ , a significant boost on ARC benchmark, demonstrating the effectiveness of FreeLB.
134
+
135
+ To further improve the results, we apply a multi-task learning (MTL) strategy using additional datasets. We first finetune the model on RACE (Lai et al., 2017), and then finetune on a joint dataset of ARC-Easy, ARC-Challenge, OpenbookQA (Mihaylov et al., 2018) and Regents Living Environment9. Based on this, we further finetune our model on ARC-Easy and ARC-Challenge with FreeLB. After finetuning, our single model achieves $6 7 . 7 5 \%$ test accuracy on ARC-Challenge and $8 5 . 4 4 \%$ on ARC-Easy, both outperforming the best submission on the official leaderboard10.
136
+
137
+ CommonsenseQA Similar to the training strategy in Liu et al. (2019b), we construct five inputs for each question by concatenating the question and each answer separately, then encode each input with the representation of the [CLS] token. A final score is calculated by applying the representation of [CLS] to a fully-connected layer. Following the fairseq repository11, the input is formatted as: ${ \mathfrak { n } } ( s ) Q$ : Where can I stand on a river to see water falling without getting wet? $\langle / s \rangle A$ : waterfall $\langle \langle s \rangle ^ { \ast } \cdot \mathbf { \vec { \mathbf { \mu } } }$ , where $\cdot _ { Q }$ :’ and $^ { , } A$ :’ are the prefix for question and answer, respectively.
138
+
139
+ Results are summarized in Table 3. We obtained a dev-set accuracy of $7 7 . 5 6 \%$ with the RoBERTalarge model. When using FreeLB finetuning, we achieved $7 8 . 8 1 \%$ , a $1 . 2 5 \%$ absolute gain. Compared with the results reported from fairseq repository, which obtains $7 8 . 4 3 \%$ accuracy on the devset, FreeLB still achieves better performance. Our submission to the CommonsenseQA leaderboard achieves $7 2 . 2 \%$ single-model test set accuracy, and the result of a 20-model ensemble is $7 3 . 1 \%$ , which achieves No.1 among all the submissions without making use of ConceptNet.
140
+
141
+ Table 4: The median and standard deviation of the scores on the dev sets of RTE, CoLA and MRPC from the GLUE benchmark, computed from 5 runs with the same hyper-parameters except for the random seeds. We use FreeLB- $\mathbf { \nabla } m$ to denote FreeLB with $m$ ascent steps, and FreeLB- ${ . 3 ^ { * } }$ to denote the version without reusing the dropout mask.
142
+
143
+ <table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>FreeLB-3*</td><td rowspan=1 colspan=1>FreeLB-3</td><td rowspan=1 colspan=1>YOPO-3-2</td><td rowspan=1 colspan=1>YOPO-3-3</td></tr><tr><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>85.61 (1.67)</td><td rowspan=1 colspan=1>87.14 (1.29)</td><td rowspan=1 colspan=1>88.13 (1.21)</td><td rowspan=1 colspan=1>87.05 (1.36)</td><td rowspan=1 colspan=1>87.05 (0.20)</td></tr><tr><td rowspan=1 colspan=1>CoLA</td><td rowspan=1 colspan=1>67.57 (1.30)</td><td rowspan=1 colspan=1>69.31 (1.16)</td><td rowspan=1 colspan=1>71.12 (0.90)</td><td rowspan=1 colspan=1>70.40 (0.91)</td><td rowspan=1 colspan=1>69.91 (1.16)</td></tr><tr><td rowspan=1 colspan=1>MRPC</td><td rowspan=1 colspan=1>90.69 (0.54)</td><td rowspan=1 colspan=1>90.93 (0.66)</td><td rowspan=1 colspan=1>91.42 (0.72)</td><td rowspan=1 colspan=1>90.44 (0.62)</td><td rowspan=1 colspan=1>90.69 (0.37)</td></tr></table>
144
+
145
+ <table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=3>RTE</td><td rowspan=1 colspan=3>CoLA</td><td rowspan=1 colspan=3>MRPC</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-3)</td><td rowspan=1 colspan=1>M-Inc (R)(10-3)</td><td rowspan=1 colspan=1>N-Loss(10-3)</td></tr><tr><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>5.1</td><td rowspan=1 colspan=1>5.3</td><td rowspan=1 colspan=1>4.5</td><td rowspan=1 colspan=1>6.1</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.2</td><td rowspan=1 colspan=1>10.2</td><td rowspan=1 colspan=1>10.2</td><td rowspan=1 colspan=1>1.9</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>4.7</td><td rowspan=1 colspan=1>4.9</td><td rowspan=1 colspan=1>6.2</td><td rowspan=1 colspan=1>128.2</td><td rowspan=1 colspan=1>130.1</td><td rowspan=1 colspan=1>436.1</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.4</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>3.0</td><td rowspan=1 colspan=1>2.6</td><td rowspan=1 colspan=1>4.1</td><td rowspan=1 colspan=1>1.4</td><td rowspan=1 colspan=1>1.3</td><td rowspan=1 colspan=1>7.2</td><td rowspan=1 colspan=1>3.6</td><td rowspan=1 colspan=1>3.6</td><td rowspan=1 colspan=1>2.7</td></tr></table>
146
+
147
+ Table 5: Median of the maximum increase in loss in the vicinity of the dev set samples for RoBERTa-Large model finetuned with different methods. Vanilla models are naturally trained RoBERTa’s. M-Inc: Max Inc, MInc (R): Max Inc (R). Nat Loss (N-Loss) is the loss value on clean samples. Notice we require all clean samples here to be correctly classified by all models, which results in 227, 850 and 355 samples for RTE, CoLA and MRPC, respectively. We also give the variance in the Appendix.
148
+
149
+ # 4.3 ABLATION STUDY AND ANALYSIS
150
+
151
+ In this sub-section, we first show the importance of reusing dropout mask, then conduct a thorough ablation study on FreeLB over the GLUE benchmark to analyze the robustness and generalization strength of different approaches. We observe that it is unnecessary to perform shallow-layer updates on the adversary as YOPO for our case, and FreeLB results in improved robustness and generalization compared with PGD.
152
+
153
+ Importance of Reusing Mask Table 4 (columns 2 to 4) compares the results of FreeLB with and without reusing the same dropout mask in each ascent step, as proposed in Sec. 3.3. With reusing, FreeLB can achieve a larger improvement over the naturally trained models. Thus, we enable mask reusing for all experiments involving RoBERTa.
154
+
155
+ Comparing the Robustness Table 5 provides the comparisons of the maximum increment of loss in the vicinity of each sample, defined as:
156
+
157
+ $$
158
+ \displaystyle \Delta L _ { \mathrm { m a x } } ( \boldsymbol { X } , \epsilon ) = \operatorname* { m a x } _ { \| \delta \| \leq \epsilon } L ( f _ { \boldsymbol { \theta } } ( \boldsymbol { X } + \delta ) , \boldsymbol { y } ) - L ( f _ { \boldsymbol { \theta } } ( \boldsymbol { X } ) , \boldsymbol { y } ) ,
159
+ $$
160
+
161
+ which reflects the robustness and invariance of the model in the embedding space. In practice, we use PGD steps as in Eq. 2 to find the value of ${ \Delta } L _ { \mathrm { m a x } } ( \boldsymbol { X } , \boldsymbol { \epsilon } )$ . We found that when using a step size of $5 { \cdot } 1 0 ^ { - 3 }$ and $\epsilon = 0 . 0 1 \| X \| _ { F }$ , the PGD iterations converge to almost the same value, starting from 100 different random initializations of $\pmb { \delta }$ for the RoBERTa models, trained with or without FreeLB. This indicates that PGD reliably finds $\Delta L _ { \mathrm { m a x } }$ for these models. Therefore, we compute ${ \Delta } L _ { \mathrm { m a x } } ( X , \epsilon )$ for each $\boldsymbol { X }$ via a 2000-step PGD.
162
+
163
+ Samples with small margins exist even for models with perfect accuracy, which could give a false sense of vulnerability of the model. To rule out the outlier effect and make ${ \Delta } L _ { \mathrm { m a x } } ( \boldsymbol { X } , \epsilon )$ comparable across different samples, we only consider samples that all the evaluated models can correctly classify, and search for an $\epsilon$ for each sample such that the reference model can correctly classify all samples within the $\epsilon$ ball.12 However, such choice of per-sample $\epsilon$ favors the reference model by design. To make fair comparisons, Table 5 provides the median of ${ \Delta } L _ { \mathrm { m a x } } ( \boldsymbol { X } , \epsilon )$ with per-sample $\epsilon$ from models trained by FreeLB (Max Inc) and PGD (Mac Inc (R)), respectively.
164
+
165
+ Across all three datasets and different reference models, FreeLB has the smallest median increment even when starting from a larger natural loss than vanilla models. This demonstrates that FreeLB is more robust and invariant in most cases. Such results are also consistent with the models’ dev set performance (the performances for Vanilla/PGD/FreeLB models on RTE, CoLA and MRPC are 86.69/87.41/89.21, 69.91/70.84/71.40, 91.67/91.17/91.17, respectively).
166
+
167
+ Comparing with YOPO The original implementation of YOPO (Zhang et al., 2019) chooses the first convolutional layer of the ResNets as $f _ { 0 }$ for updating the adversary in the “s-loop”. As a result, each step of the “s-loop” should be using exactly the same value to update the adversary,and YOPO$m { - } n$ degenerates into FreeLB with a $n$ -times large step size. To avoid that, we choose the layers up to the output of the first Transformer block as $f _ { 0 }$ when implementing YOPO. To make the total amount of update on the adversary equal, we take the hyper-parameters for FreeLB- $m$ and only change the step size $\alpha$ into $\alpha / n$ for YOPO- $m { \cdot } n$ . Table 4 shows that FreeLB performs consistently better than YOPO on all three datasets. Accidentally, we also give the results comparing with YOPO- $\mathbf { \nabla } m - n$ without changing the step size $\alpha$ for YOPO in Table 8. The gap between two approaches seem to shrink, which may be caused by using a larger total step size for the YOPO adversaries. We leave exhaustive hyperparameter search for both models as our future work.
168
+
169
+ # 5 CONCLUSION
170
+
171
+ In this work, we have developed an adversarial training approach, FreeLB, to improve natural language understanding. The proposed approach adds perturbations to continuous word embeddings using a gradient method, and minimizes the resultant adversarial risk in an efficient way. FreeLB is able to boost Transformer-based model (BERT and RoBERTa) on several datasets and achieve new state of the art on GLUE and ARC benchmarks. Empirical study demonstrates that our method results in both higher robustness in the embedding space than natural training and better generalization ability. Such observation is also consistent with recent findings in Computer Vision. However, adversarial training still takes significant overhead compared with vanilla SGD. How to accelerate this process while improving generalization is an interesting future direction.
172
+
173
+ Acknowledgements: Goldstein and Zhu were supported in part by the DARPA GARD, DARPA QED for RML, and AFOSR MURI programs.
174
+
175
+ # REFERENCES
176
+
177
+ Eneko Agirre, Llu’is M‘arquez, and Richard Wicentowski (eds.). Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007). Association for Computational Linguistics, 2007.
178
+
179
+ Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In ICML, 2018.
180
+
181
+ Roy Bar Haim, Ido Dagan, Bill Dolan, Lisa Ferro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. The second PASCAL recognising textual entailment challenge. 2006.
182
+
183
+ Yonatan Belinkov and Yonatan Bisk. Synthetic and natural noise both break neural machine translation. In ICLR, 2018.
184
+
185
+ Luisa Bentivogli, Ido Dagan, Hoa Trang Dang, Danilo Giampiccolo, and Bernardo Magnini. The fifth PASCAL recognizing textual entailment challenge. 2009.
186
+
187
+ Yong Cheng, Lu Jiang, and Wolfgang Macherey. Robust neural machine translation with doubly adversarial inputs. In ACL, 2019.
188
+
189
+ Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457, 2018.
190
+
191
+ Patrick L Combettes and Jean-Christophe Pesquet. Proximal splitting methods in signal processing. In Fixed-point algorithms for inverse problems in science and engineering. 2011.
192
+
193
+ Ido Dagan, Oren Glickman, and Bernardo Magnini. The PASCAL recognising textual entailment challenge. In Machine learning challenges. evaluating predictive uncertainty, visual object classification, and recognising tectual entailment. Springer, 2006.
194
+
195
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.
196
+
197
+ William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the International Workshop on Paraphrasing, 2005.
198
+
199
+ Sanghamitra Dutta, Gauri Joshi, Soumyadip Ghosh, Parijat Dube, and Priya Nagpurkar. Slow and stale gradients can win the race: Error-runtime trade-offs in distributed sgd. In AISTATS, pp. 803–812, 2018.
200
+
201
+ Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. HotFlip: White-box adversarial examples for text classification. In ACL, 2018.
202
+
203
+ Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In NeurIPS, 2016.
204
+
205
+ Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL workshop on textual entailment and paraphrasing, 2007.
206
+
207
+ Tom Goldstein, Christoph Studer, and Richard Baraniuk. A field guide to forward-backward splitting with a fasta implementation. arXiv preprint 1411.3406, 2014.
208
+
209
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
210
+
211
+ Shankar Iyer, Nikhil Dandekar, and Kornl Csernai. First quora dataset release: Question pairs, 2017. URL https://www.quora.com/q/quoradata/ First-Quora-Dataset-Release-Question-Pairs.
212
+
213
+ Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. Adversarial example generation with syntactically controlled paraphrase networks. In NAACL, 2018.
214
+
215
+ Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In EMNLP, 2017.
216
+
217
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In ICLR, 2017.
218
+
219
+ Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. arXiv preprint arXiv:1704.04683, 2017.
220
+
221
+ Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. Albert: A lite bert for self-supervised learning of language representations. ICLR, 2020.
222
+
223
+ Hector J Levesque, Ernest Davis, and Leora Morgenstern. The Winograd schema challenge. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, 2011.
224
+
225
+ Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. In ACL, 2019a.
226
+
227
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019b.
228
+
229
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018.
230
+
231
+ Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. arXiv preprint arXiv:1809.02789, 2018.
232
+
233
+ Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Adversarial training methods for semisupervised text classification. In ICLR, 2017.
234
+
235
+ Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. TPAMI, 2019.
236
+
237
+ Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Alhussein Fawzi, Soham De, Robert Stanforth, Pushmeet Kohli, et al. Adversarial robustness through local linearization. In NeurIPS, 2019.
238
+
239
+ 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 1910.10683, 2019.
240
+
241
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. In EMNLP, 2016.
242
+
243
+ Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Semantically equivalent adversarial rules for debugging NLP models. In ACL, 2018.
244
+
245
+ Parsa Saadatpanah, Ali Shafahi, and Tom Goldstein. Adversarial attacks on copyright detection systems. arXiv preprint 1906.07153, 2019.
246
+
247
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, 2016.
248
+
249
+ A. Shafahi, M. Najibi, A. Ghiasi, Z. Xu, J. Dickerson, C. Studer, L. Davis, G. Taylor, and T. Goldstein. Adversarial Training for Free! In NeurIPS, 2019.
250
+
251
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013.
252
+
253
+ Jure Sokolic, Raja Giryes, Guillermo Sapiro, and Miguel Rodrigues. Generalization error of invariant classifiers. In AISTATS, 2017.
254
+
255
+ Robert Speer, Joshua Chin, and Catherine Havasi. Conceptnet 5.5: An open multilingual graph of general knowledge. In AAAI, 2017.
256
+
257
+ Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014.
258
+
259
+ Kai Sun, Dian Yu, Dong Yu, and Claire Cardie. Improving machine reading comprehension with general reading strategies. arXiv preprint arXiv:1810.13441, 2018.
260
+
261
+ Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. Commonsenseqa: A question answering challenge targeting commonsense knowledge. In NAACL, 2019.
262
+
263
+ Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In ICLR, 2019.
264
+
265
+ Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. Neural network acceptability judgments. arXiv preprint 1805.12471, 2018.
266
+
267
+ Adina Williams, Nikita Nangia, and Samuel R. Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In NAACL, 2018.
268
+
269
+ Chaowei Xiao, Ruizhi Deng, Bo Li, Fisher Yu, Mingyan Liu, and Dawn Song. Characterizing adversarial examples based on spatial consistency information for semantic segmentation. In ECCV, 2018.
270
+
271
+ Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L. Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In CVPR, 2019.
272
+
273
+ Huan Xu and Shie Mannor. Robustness and generalization. Machine learning, 2012.
274
+
275
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In NeurIPS, 2019.
276
+
277
+ Dinghuai Zhang, Tianyuan Zhang, Yiping Lu, Zhanxing Zhu, and Bin Dong. You only propagate once: Painless adversarial training using maximal principle. In NeurIPS, 2019.
278
+
279
+ Zhengli Zhao, Dheeru Dua, and Sameer Singh. Generating natural adversarial examples. In ICLR, 2018.
280
+
281
+ # A ADDITIONAL EXPERIMENTAL DETAILS
282
+
283
+ # A.1 PROBLEM FORMULATIONS
284
+
285
+ For tasks with ranking loss like ARC, CommonsenseQA, WNLI and QNLI, add the perturbation to the concatenation of the embeddings of all question/answer pairs.
286
+
287
+ Additional tricks are required to achieve high performance on WNLI and QNLI for the GLUE benchmark. We use the same tricks as Liu et al. (2019b). For WNLI, we use the same WSC data provided by Liu et al. (2019b) for training. For testing, Liu et al. (2019b) also provided the test set with span annotations, but the order is different form the GLUE dataset. We re-order their test set by matching. For the QNLI, we follow Liu et al. (2019b) and formulate the problem as pairwise ranking problem, which is the same for CommonsenseQA. We find the matching pairs for both training set and testing set by matching the queries in the dev set. We predict “entailment” if the candidate has the higher score, and “not entailment” otherwise.
288
+
289
+ # A.2 HYPER-PARAMETERS
290
+
291
+ Table 6: Additional hyper-parameters on GLUE tasks.
292
+
293
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>MNLI</td><td rowspan=1 colspan=1>QNLI</td><td rowspan=1 colspan=1>QQP</td><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>MRPC</td><td rowspan=1 colspan=1>CoLA</td><td rowspan=1 colspan=1>STS-B</td></tr><tr><td rowspan=1 colspan=1>E</td><td rowspan=1 colspan=1>2E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>4.5E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>6E-1</td><td rowspan=1 colspan=1>4E-1</td><td rowspan=1 colspan=1>2E-1</td><td rowspan=1 colspan=1>3E-1</td></tr><tr><td rowspan=1 colspan=1>a</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>3E-2</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>4E-2</td><td rowspan=1 colspan=1>2.5E-2</td><td rowspan=1 colspan=1>1E-1</td></tr><tr><td rowspan=1 colspan=1>m</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td></tr></table>
294
+
295
+ As other adversarial training methods, introduces three additional hyper-parameters: step size $\alpha$ , maximum perturbation $\epsilon$ , number of steps $m$ . For all other hyper-parameters such as learning rate and number of iterations, we either search in the same interval as RoBERTa (on CommonsenseQA, ARC, and WNLI), or use exactly the same setting as RoBERTa (except for MRPC, where we find using a learning rate of $5 \times 1 0 ^ { - 6 }$ gives better results).13. We list the best combinations for $\alpha , \epsilon$ and $m$ for each of the GLUE tasks in Table 6. For WSC/WNLI, the best combination is $\epsilon = 1 e - 2 , \alpha =$ $5 e - 3 , m = 2$ . Notice even when $m \alpha < \epsilon$ , the maximum perturbation could still reach $\epsilon$ due to the random initialization.
296
+
297
+ # B VARIANCE OF MAXIMUM INCREMENT OF LOSS
298
+
299
+ <table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=3>RTE</td><td rowspan=1 colspan=3>CoLA</td><td rowspan=1 colspan=3>MRPC</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-3)</td><td rowspan=1 colspan=1>M-Inc (R)(10-3)</td><td rowspan=1 colspan=1>N-Loss(10-3)</td></tr><tr><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>5.1(15087)</td><td rowspan=1 colspan=1>5.3(14346)</td><td rowspan=1 colspan=1>4.5(920)</td><td rowspan=1 colspan=1>6.1(13118)</td><td rowspan=1 colspan=1>5.7(14122)</td><td rowspan=1 colspan=1>5.2(447)</td><td rowspan=1 colspan=1>10.2(929)</td><td rowspan=1 colspan=1>10.2(955)</td><td rowspan=1 colspan=1>1.9(76)</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>4.7(10138)</td><td rowspan=1 colspan=1>4.9(1828)</td><td rowspan=1 colspan=1>6.2(752)</td><td rowspan=1 colspan=1>128.2(1300)</td><td rowspan=1 colspan=1>130.1(893)</td><td rowspan=1 colspan=1>436.1(1276)</td><td rowspan=1 colspan=1>5.7(321)</td><td rowspan=1 colspan=1>5.7(155)</td><td rowspan=1 colspan=1>5.4(54)</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>3.0(1614)</td><td rowspan=1 colspan=1>2.6(11114)</td><td rowspan=1 colspan=1>4.1(595)</td><td rowspan=1 colspan=1>1.4(1392)</td><td rowspan=1 colspan=1>1.3(6231)</td><td rowspan=1 colspan=1>7.2(615)</td><td rowspan=1 colspan=1>3.6(167)</td><td rowspan=1 colspan=1>3.6(601)</td><td rowspan=1 colspan=1>2.7(54)</td></tr></table>
300
+
301
+ Table 7: Median and Standard Deviation of the maximum increase in loss in the vicinity of the dev set samples for RoBERTa-Large model finetuned with different methods. Vanilla models are naturally trained RoBERTa’s. Nat Loss is the loss value on clean samples. Notice we require all clean samples here to be correctly classified by all models, which results in 227, 850 and 355 samples for RTE, CoLA and MRPC.
302
+
303
+ Table 7 provides the complete results for the increment of loss in the interval, with median and standard deviation.
304
+
305
+ # C ADDITIONAL RESULTS FOR ABLATION STUDIES
306
+
307
+ Here we provide some additional results for comparison with YOPO as complementary results to Table 4. We will release the complete results for comparing with YOPO and without variational dropout on each of the GLUE tasks in our next revision. From the current results, there is no need
308
+
309
+ <table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>FreeLB-3</td><td rowspan=1 colspan=1>YOPO-3-2</td><td rowspan=1 colspan=1>YOPO-3-3</td></tr><tr><td rowspan=1 colspan=1>STS-B</td><td rowspan=1 colspan=1>92.20 (.2)</td><td rowspan=1 colspan=1>92.67 (.08)</td><td rowspan=1 colspan=1>92.60 (.17)</td><td rowspan=1 colspan=1>92.60 (0.20)</td></tr><tr><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>96.56 (.3)</td><td rowspan=1 colspan=1>96.79 (.2)</td><td rowspan=1 colspan=1>96.44 (.2)</td><td rowspan=1 colspan=1>96.33 (.1)</td></tr><tr><td rowspan=1 colspan=1>QNLI</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>94.98 (.2)</td><td rowspan=1 colspan=1>94.96 (.1)</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>QQP</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>92.60 (.03)</td><td rowspan=1 colspan=1>92.55 (.05)*</td><td rowspan=1 colspan=1>92.50 (.02)*</td></tr><tr><td rowspan=1 colspan=1>MNLI</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>90.61 (.1)</td><td rowspan=1 colspan=1>90.59 (.2)</td><td rowspan=1 colspan=1>90.45 (.2)</td></tr></table>
310
+
311
+ Table 8: The median and standard deviation of the scores on the dev sets of STS-B, SST-2, QNLI, QQP and MNLI from the GLUE benchmark, each computed from 5 runs with the same hyper-parameters except for the random seeds (except for the results with YOPO on QQP, which are from 4 runs). Also note here we use a step size of $\alpha$ for the adversary of YOPO-m-n, so YOPO effectively uses a step size of $_ { n \alpha }$ . We use FreeLB- $\mathbf { \nabla } m$ to denote FreeLB with $m$ ascent steps, and YOPO-3- $\mathbf { \nabla } \cdot \mathbf { n }$ to denote YOPO with $_ n$ shallow-layer ascents.
312
+
313
+ in using extra shallow-layer updates that YOPO advocates, since this consistently deteriorates the performance while introducing extra computations.
parse/train/BygzbyHFvB/BygzbyHFvB_content_list.json ADDED
@@ -0,0 +1,1710 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "FREELB: ENHANCED ADVERSARIAL TRAINING FOR NATURAL LANGUAGE UNDERSTANDING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 820,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Chen $\\mathbf { Z } \\mathbf { h } \\mathbf { u } ^ { \\mathbf { 1 } }$ , Yu Cheng2, Zhe $\\mathbf { G a n } ^ { 2 }$ , Siqi $\\mathbf { S u n } ^ { 2 }$ , Tom Goldstein1, Jingjing Liu2 1University of Maryland, College Park 2Microsoft Dynamics 365 AI Research {chenzhu,tomg}@cs.umd.edu, {yu.cheng,zhe.gan,siqi.sun,jingjl}@microsoft.com ",
17
+ "bbox": [
18
+ 184,
19
+ 167,
20
+ 714,
21
+ 213
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 250,
32
+ 544,
33
+ 265
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Adversarial training, which minimizes the maximal risk for label-preserving input perturbations, has proved to be effective for improving the generalization of language models. In this work, we propose a novel adversarial training algorithm, FreeLB, that promotes higher invariance in the embedding space, by adding adversarial perturbations to word embeddings and minimizing the resultant adversarial risk inside different regions around input samples. To validate the effectiveness of the proposed approach, we apply it to Transformer-based models for natural language understanding and commonsense reasoning tasks. Experiments on the GLUE benchmark show that when applied only to the finetuning stage, it is able to improve the overall test scores of BERT-base model from 78.3 to 79.4, and RoBERTa-large model from 88.5 to 88.8. In addition, the proposed approach achieves state-of-the-art single-model test accuracies of $8 5 . 4 4 \\%$ and $6 7 . 7 5 \\%$ on ARC-Easy and ARC-Challenge. Experiments on CommonsenseQA benchmark further demonstrate that FreeLB can be generalized and boost the performance of RoBERTa-large model on other tasks as well. 1 ",
40
+ "bbox": [
41
+ 233,
42
+ 282,
43
+ 764,
44
+ 489
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 518,
55
+ 334,
56
+ 534
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Adversarial training is a method for creating robust neural networks. During adversarial training, mini-batches of training samples are contaminated with adversarial perturbations (alterations that are small and yet cause misclassification), and then used to update network parameters until the resulting model learns to resist such attacks. Adversarial training was originally proposed as a means to enhance the security of machine learning systems (Goodfellow et al., 2015), especially for safety-critical systems like self-driving cars (Xiao et al., 2018) and copyright detection (Saadatpanah et al., 2019). ",
63
+ "bbox": [
64
+ 174,
65
+ 550,
66
+ 825,
67
+ 647
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In this paper, we turn our focus away from the security benefits of adversarial training, and instead study its effects on generalization. While adversarial training boosts the robustness, it is widely accepted by computer vision researchers that it is at odds with generalization, with classification accuracy on non-corrupted images dropping as much as $1 0 \\%$ on CIFAR-10, and $1 5 \\%$ on Imagenet (Madry et al., 2018; Xie et al., 2019). Surprisingly, people observe the opposite result for language models (Miyato et al., 2017; Cheng et al., 2019), showing that adversarial training can improve both generalization and robustness. ",
74
+ "bbox": [
75
+ 174,
76
+ 655,
77
+ 823,
78
+ 752
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We will show that adversarial training significantly improves performance of state-of-the-art models for many language understanding tasks. In particular, we propose a novel adversarial training algorithm, called FreeLB (Free Large-Batch), which adds adversarial perturbations to word embeddings and minimizes the resultant adversarial loss around input samples. The method leverages recently proposed “free” training strategies (Shafahi et al., 2019; Zhang et al., 2019) to enrich the training data with diversified adversarial samples under different norm constraints at no extra cost than PGD-based (Projected Gradient Descent) adversarial training (Madry et al., 2018), which enables us to perform such diversified adversarial training on large-scale state-of-the-art models. We observe improved invariance in the embedding space for models trained with FreeLB, which is positively correlated with generalization. ",
85
+ "bbox": [
86
+ 174,
87
+ 758,
88
+ 825,
89
+ 897
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We perform comprehensive experiments to evaluate the performance of a variety of adversarial training algorithms on state-of-the-art language understanding models and tasks. In the comparisons with standard PGD (Madry et al., 2018), FreeAT (Shafahi et al., 2019) and YOPO (Zhang et al., 2019), FreeLB stands out to be the best for the datasets and models we evaluated. With FreeLB, we achieve state-of-the-art results on several important language understanding benchmarks. On the GLUE benchmark, FreeLB pushes the performance of the BERT-base model from 78.3 to 79.4. The overall score of the RoBERTa-large models on the GLUE benchmark is also lifted from 88.5 to 88.8, achieving best results on most of its sub-tasks. Experiments also show that FreeLB can boost the performance of RoBERTa-large on question answering tasks, such as the ARC and CommonsenseQA benchmarks. We also provide a comprehensive ablation study and analysis to demonstrate the effectiveness of our training process. ",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 256
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "2 RELATED WORK ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 176,
110
+ 291,
111
+ 343,
112
+ 308
113
+ ],
114
+ "page_idx": 1
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "2.1 ADVERSARIAL TRAINING ",
119
+ "text_level": 1,
120
+ "bbox": [
121
+ 176,
122
+ 328,
123
+ 393,
124
+ 342
125
+ ],
126
+ "page_idx": 1
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "To improve the robustness of neural networks against adversarial examples, many defense strategies and models have been proposed, in which PGD-based adversarial training (Madry et al., 2018) is widely considered to be the most effective, since it largely avoids the the obfuscated gradient problem (Athalye et al., 2018). It formulates a class of adversarial training algorithms (Kurakin et al., 2017) into solving a minimax problem on the cross-entropy loss, which can be achieved reliably through multiple projected gradient ascent steps followed by a SGD (Stochastic Gradient Descent) step. ",
131
+ "bbox": [
132
+ 174,
133
+ 353,
134
+ 825,
135
+ 450
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "Despite being verified by Athalye et al. (2018) to avoid obfuscated gradients, Qin et al. (2019) shows that PGD-based adversarial training still leads to highly convolved and non-linear loss surfaces when $K$ is small, which could be readily broken under stronger adversaries. Thus, to be effective, the cost of PGD-based adversarial training is much higher than conventional training. To mitigate this cost, Shafahi et al. (2019) proposed a “free” adversarial training algorithm that simultaneously updates both model parameters and adversarial perturbations on a single backward pass. Using a similar formulation, Zhang et al. (2019) effectively reduce the total number of full forward and backward propagations for obtaining adversarial examples by restricting most of its adversarial updates in the first layer. ",
142
+ "bbox": [
143
+ 174,
144
+ 457,
145
+ 825,
146
+ 583
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "2.2 ADVERSARIAL EXAMPLES IN NATURAL LANGUAGES",
153
+ "text_level": 1,
154
+ "bbox": [
155
+ 174,
156
+ 614,
157
+ 581,
158
+ 628
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "Adversarial examples have been explored primarily in the image domain, and received many attention in text domain recently. Previous works on text adversaries have focused on heuristics for creating adversarial examples in the black-box setting, or on specific tasks. Jia & Liang (2017) propose to add distracting sentences to the input document in order to induce mis-classification. Zhao et al. (2018) generate text adversaries by projecting the input data to a latent space using GANs, and searching for adversaries close to the original instance. Belinkov & Bisk (2018) manipulate every word in a sentence with synthetic or natural noise in machine translation systems. Iyyer et al. (2018) propose a neural paraphrase model based on back-translated data to produce paraphrases that have different sentence structures. Different from previous work, ours is not to produce actual adversarial examples, but only take the benefit of adversarial training for natural language understanding. ",
165
+ "bbox": [
166
+ 174,
167
+ 638,
168
+ 825,
169
+ 777
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "We are not the first to observe that robust language models may perform better on clean test data. Miyato et al. (2017) extend adversarial and virtual adversarial training (Miyato et al., 2019) to the text domain to improve the performance on semi-supervised classification tasks. Ebrahimi et al. (2018) propose a character/word replacement for crafting attacks, and show employing adversarial examples in training renders the models more robust. Ribeiro et al. (2018) show that adversarial attacks can be used as a valuable tool for debugging NLP models. Cheng et al. (2019) also find that crafting adversarial examples can help neural machine translation significantly. Notably, these studies have focused on simple models or text generation tasks. Our work explores how to efficiently use the gradients obtained in adversarial training to boost the performance of state-of-the-art transformer-based models. ",
176
+ "bbox": [
177
+ 174,
178
+ 785,
179
+ 825,
180
+ 922
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "3 ADVERSARIAL TRAINING FOR LANGUAGE UNDERSTANDING ",
187
+ "text_level": 1,
188
+ "bbox": [
189
+ 174,
190
+ 102,
191
+ 709,
192
+ 118
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "Pre-trained large-scale language models, such as BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019b), ALBERT (Lan et al., 2020) and T5 (Raffel et al., 2019), have proven to be highly effective for downstream tasks. We aim to further improve the generalization of these pre-trained language models on the downstream language understanding tasks by enhancing their robustness in the embedding space during finetuning on these tasks. We achieve this goal by creating “virtual” adversarial examples in the embedding space, and then perform parameter updates on these adversarial embeddings. Creating actual adversarial examples for language is difficult; even with state-of-theart language models as guidance (e.g., (Cheng et al., 2019)), it remains unclear how to construct label-preserving adversarial examples via word/character replacement without human evaluations, because the meaning of each word/character depends on the context (Ribeiro et al., 2018). Since we are only interested in the effects of adversarial training, rather than producing actual adversarial examples, we add norm-bounded adversarial perturbations to the embeddings of the input sentences using a gradient-based method. Note that our embedding-based adversary is strictly stronger than a more conventional text-based adversary, as our adversary can make manipulations on word embeddings that are not possible in the text domain. ",
199
+ "bbox": [
200
+ 173,
201
+ 133,
202
+ 825,
203
+ 342
204
+ ],
205
+ "page_idx": 2
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "For models that incorporate various input representations, including word or subword embeddings, segment embeddings and position embeddings, our adversaries only modify the concatenated word or sub-word embeddings, leaving other components of the sentence representation unchanged. 2 Denote the sequence of one-hot representations of the input subwords as $\\pmb { Z } = [ z _ { 1 } , z _ { 2 } , . . . , z _ { n } ]$ , the embedding matrix as $V$ , and the language model (encoder) as a function ${ \\pmb y } = f _ { \\pmb \\theta } ( { \\pmb X } )$ , where $\\dot { \\boldsymbol { X } } = \\boldsymbol { V } \\boldsymbol { Z }$ is the subword embeddings, $\\textbf { { y } }$ is the output of the model (e.g., class probabilities for classification models), and $\\pmb \\theta$ denotes all the learnable parameters including the embedding matrix $V$ . We add adversarial perturbations $\\delta$ to the embeddings such that the prediction becomes $\\pmb { y } ^ { \\prime } = f _ { \\pmb { \\theta } } ( \\pmb { X } + \\pmb { \\delta } )$ . To preserve the semantics, we constrain the norm of $\\pmb { \\delta }$ to be small, and assume the model’s prediction should not change after the perturbation. This formulation is analogous to Miyato et al. (2017), with the difference that we do not require $\\boldsymbol { X }$ to be normalized. ",
210
+ "bbox": [
211
+ 174,
212
+ 348,
213
+ 825,
214
+ 501
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "3.1 PGD FOR ADVERSARIAL TRAINING ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 176,
224
+ 517,
225
+ 464,
226
+ 531
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Standard adversarial training seeks to find optimal parameters $\\pmb { \\theta } ^ { * }$ to minimize the maximum risk for any $\\pmb { \\delta }$ within a norm ball as: ",
233
+ "bbox": [
234
+ 176,
235
+ 540,
236
+ 823,
237
+ 569
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/17c85187abb9a6ea71a8c3e97ea4dd66fd478797846cf419f4a2d777a9491c4c.jpg",
244
+ "text": "$$\n\\operatorname* { m i n } _ { \\theta } \\mathbb { E } _ { ( Z , y ) \\sim \\mathcal { D } } \\left[ \\operatorname* { m a x } _ { \\| \\delta \\| \\leq \\epsilon } L ( f _ { \\theta } ( X + \\delta ) , y ) \\right] ,\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 359,
248
+ 573,
249
+ 638,
250
+ 608
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "where $\\mathcal { D }$ is the data distribution, $y$ is the label, and $L$ is some loss function. We use the Frobenius norm to constrain $\\delta$ . For neural networks, the outer “min” is non-convex, and the inner “max” is non-concave. Nonetheless, Madry et al. (2018) demonstrated that this saddle-point problem can be solved reliably with SGD for the outer minimization and PGD (a standard method for large-scale constrained optimization, see (Combettes & Pesquet, 2011) and (Goldstein et al., 2014)), for the inner maximization. In particular, for the constraint $\\| \\delta \\| _ { F } \\le \\epsilon$ , with an additional assumption that the loss function is locally linear, PGD takes the following step (with step size $\\alpha$ ) in each iteration: ",
257
+ "bbox": [
258
+ 174,
259
+ 611,
260
+ 825,
261
+ 709
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "equation",
267
+ "img_path": "images/be4aa28dea2f09e48329453f621909356a76b82a9114c7d9674cce7e2f1707f6.jpg",
268
+ "text": "$$\n\\delta _ { t + 1 } = \\Pi _ { \\| \\pmb { \\delta } \\| _ { F } \\leq \\epsilon } \\left( \\pmb { \\delta } _ { t } + \\alpha g ( \\pmb { \\delta } _ { t } ) / \\| g ( \\pmb { \\delta } _ { t } ) \\| _ { F } \\right) ,\n$$",
269
+ "text_format": "latex",
270
+ "bbox": [
271
+ 354,
272
+ 713,
273
+ 642,
274
+ 732
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "where $g ( \\delta _ { t } ) = \\nabla _ { \\delta } L ( f _ { \\theta } ( X + \\delta _ { t } ) , y )$ is the gradient of the loss with respect to $\\delta$ , and $\\Pi _ { \\| \\delta \\| _ { F } \\leq \\epsilon }$ performs a projection onto the $\\epsilon$ -ball. To achieve high-level robustness, multi-step adversarial examples are needed during training, which is computationally expensive. The $K$ -step PGD ( $K$ -PGD) requires $K$ forward-backward passes through the network, while the standard SGD update requires only one. As a result, the adversary generation step in adversarial training increases run-time by an order of magnitude—a catastrophic amount when training large state-of-the-art language models. ",
281
+ "bbox": [
282
+ 173,
283
+ 736,
284
+ 825,
285
+ 821
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "3.2 LARGE-BATCH ADVERSARIAL TRAINING FOR FREE ",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 173,
295
+ 837,
296
+ 575,
297
+ 852
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "In the inner ascent steps of PGD, the gradients of the parameters can be obtained with almost no overhead when computing the gradients of the inputs. From this observation, FreeAT (Shafahi et al., ",
304
+ "bbox": [
305
+ 176,
306
+ 859,
307
+ 821,
308
+ 888
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Algorithm 1 “Free” Large-Batch Adversarial Training (FreeLB- $K$ ) ",
315
+ "text_level": 1,
316
+ "bbox": [
317
+ 173,
318
+ 103,
319
+ 619,
320
+ 118
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "table",
326
+ "img_path": "images/faa4884339b2dc56b051cb475bba7c56913f2fcee10d81fc04db122bc7add815.jpg",
327
+ "table_caption": [],
328
+ "table_footnote": [],
329
+ "table_body": "<table><tr><td>ascent step size α</td><td>Require: Training samples X = {(Z,y)}, perturbation bound ε, learning rate T, ascent steps K,</td></tr><tr><td>1:Initialize 0</td><td></td></tr><tr><td>2: for epoch =1... Nep do</td><td></td></tr><tr><td>3:</td><td>for minibatchB ℃Xdo</td></tr><tr><td>4:</td><td>U(-∈,∈)</td></tr><tr><td>5:</td><td>90↑0</td></tr><tr><td>6:</td><td></td></tr><tr><td>7:</td><td>fort=1...K do</td></tr><tr><td>8:</td><td>Accumulate gradient of parameters θ</td></tr><tr><td>9:</td><td>gt←gt-1+kE(z,y)∈B[VθL(fe(X+δt-1),y)]</td></tr><tr><td>10:</td><td>Update the perturbation δ via gradient ascend</td></tr><tr><td>11:</td><td>gadu ←VsL(fθ(X+δt-1),y) δt ←II|δ|lr≤e(δt-1+α:gadu/llgadullF)</td></tr><tr><td>12:</td><td></td></tr><tr><td>13:</td><td>end for</td></tr><tr><td>14:</td><td>0←0-TgK</td></tr><tr><td>end for 15: end for</td><td></td></tr></table>",
330
+ "bbox": [
331
+ 174,
332
+ 123,
333
+ 823,
334
+ 363
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "2019) and YOPO (Zhang et al., 2019) have been proposed to accelerate adversarial training. They achieve comparable robustness and generalization as standard PGD-trained models using only the same or a slightly larger number of forward-backward passes as natural training (i.e., SGD on clean samples). FreeAT takes one descent step on the parameters together with each of the $K$ ascent steps on the perturbation. As a result, FreeAT may suffer from the “stale gradient” problem (Dutta et al., 2018), where in every step $t$ , $\\delta _ { t }$ does not necessarily maximize the model with parameter $\\theta _ { t }$ since its update is based on $\\nabla _ { \\delta } L \\big ( f _ { \\pmb { \\theta } _ { t - 1 } } ( \\pmb { X } + \\delta _ { t - 1 } ) , y \\big )$ , and vice versa, $\\theta _ { t }$ does not necessarily minimize the adversarial risk with adversary $\\delta _ { t }$ since its update is based on $\\nabla _ { \\pmb { \\theta } } L \\big ( f _ { \\pmb { \\theta } _ { t - 1 } } ( \\pmb { X } + \\delta _ { t - 1 } ) , y \\big )$ . Such a problem may be more significant when the step size is large. ",
341
+ "bbox": [
342
+ 173,
343
+ 388,
344
+ 825,
345
+ 515
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Different from FreeAT, YOPO accumulates the gradient of the parameters from each of the ascent steps, and updates the parameters only once after the $K$ inner ascent steps. YOPO also advocates that after each back-propagation, one should take the gradient of the first hidden layer as a constant and perform several additional updates on the adversary using the product of this constant and the Jacobian of the first layer of the network to obtain strong adversaries. However, when the first hidden layer is a linear layer as in their implementation, such an operation is equivalent to taking a larger step size on the adversary. The analysis backing the extra update steps also assumes a twice continuously differentiable loss, which does not hold for ReLU-based neural networks they experimented with, and thus the reasons for the success of such an algorithm remains obscure. We give empirical comparisons between YOPO and our approach in Sec. 4.3. ",
352
+ "bbox": [
353
+ 173,
354
+ 521,
355
+ 825,
356
+ 661
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "To obtain better solutions for the inner max and avoid fundamental limitations on the function class, we propose FreeLB, which performs multiple PGD iterations to craft adversarial examples, and simultaneously accumulates the “free” parameter gradients $\\nabla _ { \\boldsymbol { \\theta } } L$ in each iteration. After that, it updates the model parameter $\\pmb \\theta$ all at once with the accumulated gradients. The overall procedure is shown in Algorithm 1, in which $X + \\delta _ { t }$ is an approximation to the local maximum within the intersection of two balls $\\mathcal { T } _ { t } = \\mathcal { B } _ { X + \\delta _ { 0 } } ( \\alpha t ) \\cap \\mathcal { B } _ { X } ( \\epsilon )$ . By taking a descent step along the averaged gradients at $X + \\delta _ { 0 } , . . . , X + \\delta _ { K - 1 }$ , we approximately optimize the following objective: ",
363
+ "bbox": [
364
+ 174,
365
+ 666,
366
+ 825,
367
+ 765
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "equation",
373
+ "img_path": "images/ccae4d8ef9e13199ab20f9f8a5afaca5aac1d2c3bfff645daf32d9544c002c1d.jpg",
374
+ "text": "$$\n\\underset { \\pmb { \\theta } } { \\operatorname* { m i n } } \\mathbb { E } _ { ( Z , y ) \\sim \\mathcal { D } } \\left[ \\frac { 1 } { K } \\sum _ { t = 0 } ^ { K - 1 } \\underset { \\delta _ { t } \\in \\mathcal { Z } _ { t } } { \\operatorname* { m a x } } L \\big ( f _ { \\pmb { \\theta } } \\big ( \\pmb { X } + \\delta _ { t } \\big ) , y \\big ) \\right] ,\n$$",
375
+ "text_format": "latex",
376
+ "bbox": [
377
+ 331,
378
+ 770,
379
+ 666,
380
+ 813
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "which is equivalent to replacing the original batch $\\boldsymbol { X }$ with a $K$ -times larger virtual batch, consisting of samples whose embeddings are $X + \\delta _ { 0 } , . . . , X + \\delta _ { K - 1 }$ . Compared with PGD-based adversarial training (Eq. 1), which minimizes the maximum risk at a single estimated point in the vicinity of each training sample, FreeLB minimizes the maximum risk at each ascent step at almost no overhead. ",
387
+ "bbox": [
388
+ 174,
389
+ 816,
390
+ 825,
391
+ 875
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "Intuitively, FreeLB could be a learning method with lower generalization error than PGD. Sokolic et al. (2017) have proved that the generalization error of a learning method invariant to a set of√ $T$ transformations may be up to $\\sqrt { T }$ smaller than a non-invariant learning method. According to their theory, FreeLB could have a more significant improvement over natural training, since FreeLB enforces the invariance to $K$ adversaries from a set of up to $K$ different norm constraints,3 while PGD only enforces invariance to a single norm constraint $\\epsilon$ . ",
398
+ "bbox": [
399
+ 174,
400
+ 880,
401
+ 825,
402
+ 924
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "",
409
+ "bbox": [
410
+ 174,
411
+ 103,
412
+ 823,
413
+ 146
414
+ ],
415
+ "page_idx": 4
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "Empirically, FreeLB does lead to higher robustness and invariance than PGD in the embedding space, in the sense that the maximum increase of loss in the vicinity of $\\boldsymbol { X }$ for models trained with FreeLB is smaller than that with PGD. See Sec. 4.3 for details. In theory, such improved robustness can lead to better generalization (Xu & Mannor, 2012), which is consistent with our experiments. Qin et al. (2019) also demonstrated that PGD-based method leads to highly convolved and non-linear loss surfaces in the vicinity of input samples when $K$ is small, indicating a lack of robustness. ",
420
+ "bbox": [
421
+ 174,
422
+ 152,
423
+ 825,
424
+ 237
425
+ ],
426
+ "page_idx": 4
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "3.3 WHEN ADVERSARIAL TRAINING MEETS DROPOUT ",
431
+ "text_level": 1,
432
+ "bbox": [
433
+ 174,
434
+ 255,
435
+ 570,
436
+ 270
437
+ ],
438
+ "page_idx": 4
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "Usually, adversarial training is not used together with dropout (Srivastava et al., 2014). However, for some language models like RoBERTa (Liu et al., 2019b), dropout is used during the finetuning stage. In practice, when dropout is turned on, each ascent step of Algorithm 1 is optimizing $\\delta$ for a different network. Specifically, denote the dropout mask as $_ { m }$ with each entry $m _ { i } \\sim \\mathrm { B e r n o u l l i } ( p )$ . Similar to our analysis for FreeAT, the ascent step from $\\delta _ { t - 1 }$ to $\\delta _ { t }$ is based on $\\nabla _ { \\delta } L \\big ( f _ { \\theta ( m _ { t - 1 } ) } \\big ( \\boldsymbol { X } + \\delta _ { t - 1 } \\big ) , \\boldsymbol { y } \\big )$ , so $\\delta _ { t }$ is sub-optimal for $L ( f _ { \\theta ( m _ { t } ) } ( \\boldsymbol { X } + \\delta ) , y )$ . Here $\\theta ( m )$ is the effective parameters under dropout mask $_ { m }$ . ",
443
+ "bbox": [
444
+ 174,
445
+ 277,
446
+ 825,
447
+ 377
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "The more plausible solution is to use the same $_ { \\mathbf { \\nabla } } \\mathbf { m }$ in each step. When applying dropout to any network, the objective for $\\pmb \\theta$ is to minimize the expectation of loss under different networks determined by the dropout masks, which is achieved by minimizing the Monte Carlo estimation of the expected loss. In our case, the objective becomes: ",
454
+ "bbox": [
455
+ 176,
456
+ 383,
457
+ 825,
458
+ 440
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "equation",
464
+ "img_path": "images/e662cc84309c58d4d57852d609bdc508f80860aaba1115045b618ae79744dc0a.jpg",
465
+ "text": "$$\n\\operatorname* { m i n } _ { \\theta } \\mathbb { E } _ { ( Z , y ) \\sim \\mathcal { D } , m \\sim \\mathcal { M } } \\left[ \\frac { 1 } { K } \\sum _ { t = 0 } ^ { K - 1 } \\operatorname* { m a x } _ { \\delta _ { t } \\in \\mathcal { T } _ { t } } L \\big ( f _ { \\theta ( m ) } ( X + \\delta _ { t } ) , y \\big ) \\right] ,\n$$",
466
+ "text_format": "latex",
467
+ "bbox": [
468
+ 297,
469
+ 448,
470
+ 700,
471
+ 492
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "where the 1-sample Monte Carlo estimation should be $\\begin{array} { r } { \\frac { 1 } { K } \\sum _ { t = 0 } ^ { K - 1 } \\operatorname* { m a x } _ { \\delta _ { t } \\in \\mathcal { T } _ { t } } L ( f _ { \\theta ( m _ { 0 } ) } ( X + \\delta _ { t } ) , y ) } \\end{array}$ and can be minimized by using FreeLB with dropout mask $m _ { 0 }$ in each ascent step. This is similar to applying Variational Dropout to RNNs as used in Gal & Ghahramani (2016). ",
478
+ "bbox": [
479
+ 174,
480
+ 501,
481
+ 825,
482
+ 545
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "4 EXPERIMENTS ",
489
+ "text_level": 1,
490
+ "bbox": [
491
+ 176,
492
+ 568,
493
+ 326,
494
+ 583
495
+ ],
496
+ "page_idx": 4
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "In this section, we provide comprehensive analysis on FreeLB through extensive experiments on three Natural Language Understanding benchmarks: GLUE (Wang et al., 2019), ARC (Clark et al., 2018) and CommonsenseQA (Talmor et al., 2019). We also compare the robustness and generalization of FreeLB with other adversarial training algorithms to demonstrate its strength. Additional experimental details are provided in the Appendix. ",
501
+ "bbox": [
502
+ 174,
503
+ 599,
504
+ 825,
505
+ 670
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "4.1 DATASETS ",
512
+ "text_level": 1,
513
+ "bbox": [
514
+ 174,
515
+ 688,
516
+ 287,
517
+ 703
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "GLUE Benchmark. The GLUE benchmark is a collection of 9 natural language understanding tasks, namely Corpus of Linguistic Acceptability (CoLA; Warstadt et al. (2018)), Stanford Sentiment Treebank (SST; Socher et al. (2013)), Microsoft Research Paraphrase Corpus (MRPC; Dolan & Brockett (2005)), Semantic Textual Similarity Benchmark (STS; Agirre et al. (2007)), Quora Question Pairs (QQP; Iyer et al. (2017)), Multi-Genre NLI (MNLI; Williams et al. (2018)), Question NLI (QNLI; Rajpurkar et al. (2016)), Recognizing Textual Entailment (RTE; Dagan et al. (2006); Bar Haim et al. (2006); Giampiccolo et al. (2007); Bentivogli et al. (2009)) and Winograd NLI (WNLI; Levesque et al. (2011)). 8 of the tasks are formulated as classification problems and only STS-B is formulated as regression, but FreeLB applies to all of them. For BERT-base, we use the HuggingFace implementation4, and follow the single-task finetuning procedure as in Devlin et al. (2019). For RoBERTa, we use the fairseq implementation5. Same as Liu et al. (2019b), we also use single-task finetuning for all dev set results, and start with MNLI-finetuned models on RTE, MRPC and STS-B for the test submissions. ",
524
+ "bbox": [
525
+ 173,
526
+ 714,
527
+ 825,
528
+ 868
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "table",
534
+ "img_path": "images/e1f0b3873d4f551620e6abc0f84fd1bd6b832d5a4995eee5316a5213471483a2.jpg",
535
+ "table_caption": [
536
+ "Table 1: Results (median and variance) on the dev sets of GLUE based on the RoBERTa-large model, from 5 runs with the same hyperparameter but different random seeds. ReImp is our reimplementation of RoBERTalarge. The training process can be very unstable even with the vanilla version. Here, both PGD on STS-B and FreeAT on RTE demonstrates such instability, with one unconverged instance out of five. "
537
+ ],
538
+ "table_footnote": [],
539
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>MNLI(Acc)</td><td rowspan=1 colspan=1>QNLI(Acc)</td><td rowspan=1 colspan=1>QQP(Acc)</td><td rowspan=1 colspan=1>RTE(Acc)</td><td rowspan=1 colspan=1>SST-2(Acc)</td><td rowspan=1 colspan=1>MRPC(Acc)</td><td rowspan=1 colspan=1>CoLA(Mcc)</td><td rowspan=1 colspan=1>STS-B(Pearson)</td></tr><tr><td rowspan=1 colspan=1>Reported</td><td rowspan=1 colspan=1>90.2</td><td rowspan=1 colspan=1>94.7</td><td rowspan=1 colspan=1>92.2</td><td rowspan=1 colspan=1>86.6</td><td rowspan=1 colspan=1>96.4</td><td rowspan=1 colspan=1>90.9</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>92.4</td></tr><tr><td rowspan=1 colspan=1>ReImp</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>85.61 (1.7)</td><td rowspan=1 colspan=1>96.56 (.3)</td><td rowspan=1 colspan=1>90.69(.5)</td><td rowspan=1 colspan=1>67.57 (1.3)</td><td rowspan=1 colspan=1>92.20 (.2)</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>90.53 (.2)</td><td rowspan=1 colspan=1>94.87 (.2)</td><td rowspan=1 colspan=1>92.49 (.07)</td><td rowspan=1 colspan=1>87.41 (.9)</td><td rowspan=1 colspan=1>96.44 (.1)</td><td rowspan=1 colspan=1>90.93 (.2)</td><td rowspan=1 colspan=1>69.67 (1.2)</td><td rowspan=1 colspan=1>92.43 (7.)</td></tr><tr><td rowspan=1 colspan=1>FreeAT</td><td rowspan=1 colspan=1>90.02 (.2)</td><td rowspan=1 colspan=1>94.66 (.2)</td><td rowspan=1 colspan=1>92.48(.08)</td><td rowspan=1 colspan=1>86.69 (15.)</td><td rowspan=1 colspan=1>96.10 (.2)</td><td rowspan=1 colspan=1>90.69 (.4)</td><td rowspan=1 colspan=1>68.80 (1.3)</td><td rowspan=1 colspan=1>92.40 (.3)</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>90.61 (.1)</td><td rowspan=1 colspan=1>94.98 (.2)</td><td rowspan=1 colspan=1>92.60 (.03)</td><td rowspan=1 colspan=1>88.13 (1.2)</td><td rowspan=1 colspan=1>96.79 (.2)</td><td rowspan=1 colspan=1>91.42 (.7)</td><td rowspan=1 colspan=1>71.12 (.9)</td><td rowspan=1 colspan=1>92.67 (.08)</td></tr></table>",
540
+ "bbox": [
541
+ 192,
542
+ 101,
543
+ 800,
544
+ 198
545
+ ],
546
+ "page_idx": 5
547
+ },
548
+ {
549
+ "type": "table",
550
+ "img_path": "images/1ffd483862d6f9e2fd41f54a7e4c5ac87fd33bba048718a29e5bb6a776b93922.jpg",
551
+ "table_caption": [
552
+ "Table 2: Results on GLUE from the evaluation server, as of Sep 25, 2019. Metrics are the same as the leaderboard. Number under each task’s name is the size of the training set. FreeLB-BERT is the single-model results of BERT-base finetuned with FreeLB, and FreeLB-RoB is the ensemble of 7 RoBERTa-Large models for each task. References: 1: (Devlin et al., 2019); 2: (Liu et al., 2019a); 3: (Yang et al., 2019); 4: (Liu et al., 2019b). "
553
+ ],
554
+ "table_footnote": [],
555
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Score</td><td rowspan=1 colspan=1>CoLA8.5k</td><td rowspan=1 colspan=1>SST-267k</td><td rowspan=1 colspan=1>MRPC3.7k</td><td rowspan=1 colspan=1>STS-B7k</td><td rowspan=1 colspan=1>QQP364k</td><td rowspan=1 colspan=1>MNLI-m/mm393k</td><td rowspan=1 colspan=1>QNLI108k</td><td rowspan=1 colspan=1>RTE2.5k</td><td rowspan=1 colspan=1>WNLI634</td><td rowspan=1 colspan=1>AX</td></tr><tr><td rowspan=1 colspan=1>BERT-base1</td><td rowspan=1 colspan=1>78.3</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>93.5</td><td rowspan=1 colspan=1>88.9/84.8</td><td rowspan=1 colspan=1>87.1/85.8</td><td rowspan=1 colspan=1>71.2/89.2</td><td rowspan=1 colspan=1>84.6/83.4</td><td rowspan=1 colspan=1>90.5</td><td rowspan=1 colspan=1>66.4</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>34.2</td></tr><tr><td rowspan=1 colspan=1>FreeLB-BERT</td><td rowspan=1 colspan=1>79.4</td><td rowspan=1 colspan=1>54.5</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>88.1/83.5</td><td rowspan=1 colspan=1>87.7/86.7</td><td rowspan=1 colspan=1>72.7/89.6</td><td rowspan=1 colspan=1>85.7/84.6</td><td rowspan=1 colspan=1>91.8</td><td rowspan=1 colspan=1>70.1</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>36.9</td></tr><tr><td rowspan=1 colspan=1>MT-DNN2</td><td rowspan=1 colspan=1>87.6</td><td rowspan=1 colspan=1>68.4</td><td rowspan=1 colspan=1>96.5</td><td rowspan=1 colspan=1>92.7/90.3</td><td rowspan=1 colspan=1>91.1/90.7</td><td rowspan=1 colspan=1>73.7789.9</td><td rowspan=1 colspan=1>87.9/87.4</td><td rowspan=1 colspan=1>96.0</td><td rowspan=1 colspan=1>86.3</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>42.8</td></tr><tr><td rowspan=1 colspan=1>XLNet-Large</td><td rowspan=1 colspan=1>88.4</td><td rowspan=1 colspan=1>67.8</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>93.0/90.7</td><td rowspan=1 colspan=1>91.6/91.1</td><td rowspan=1 colspan=1>74.2/90.3</td><td rowspan=1 colspan=1>90.2/89.8</td><td rowspan=1 colspan=1>98.6</td><td rowspan=1 colspan=1>86.3</td><td rowspan=1 colspan=1>90.4</td><td rowspan=1 colspan=1>47.5</td></tr><tr><td rowspan=1 colspan=1>RoBERTa4</td><td rowspan=1 colspan=1>88.5</td><td rowspan=1 colspan=1>67.8</td><td rowspan=1 colspan=1>96.7</td><td rowspan=1 colspan=1>92.3/89.8</td><td rowspan=1 colspan=1>92.2/91.9</td><td rowspan=1 colspan=1>74.3/90.2</td><td rowspan=1 colspan=1>90.8/90.2</td><td rowspan=1 colspan=1>98.9</td><td rowspan=1 colspan=1>88.2</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>48.7</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoB</td><td rowspan=1 colspan=1>88.8</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>93.1/90.8</td><td rowspan=1 colspan=1>92.4/92.2</td><td rowspan=1 colspan=1>74.8/90.3</td><td rowspan=1 colspan=1>91.1/90.7</td><td rowspan=1 colspan=1>98.8</td><td rowspan=1 colspan=1>88.7</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>50.1</td></tr><tr><td rowspan=1 colspan=1>Human</td><td rowspan=1 colspan=1>87.1</td><td rowspan=1 colspan=1>66.4</td><td rowspan=1 colspan=1>97.8</td><td rowspan=1 colspan=1>86.3/80.8</td><td rowspan=1 colspan=1>92.7/92.6</td><td rowspan=1 colspan=1>59.5/80.4</td><td rowspan=1 colspan=1>92.0/92.8</td><td rowspan=1 colspan=1>91.2</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>95.9</td><td rowspan=1 colspan=1>1</td></tr></table>",
556
+ "bbox": [
557
+ 176,
558
+ 263,
559
+ 825,
560
+ 392
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "",
567
+ "bbox": [
568
+ 174,
569
+ 484,
570
+ 821,
571
+ 512
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "ARC Benchmark. The ARC dataset (Clark et al., 2018) is a collection of multi-choice science questions from grade-school level exams. It is further divided into ARC-Challenge set with 2,590 question answer (QA) pairs and ARC-Easy set with 5,197 QA pairs. Questions in ARC-Challenge are more difficult and cannot be handled by simply using a retrieval and co-occurence based algorithm (Clark et al., 2018). A typical question is: ",
578
+ "bbox": [
579
+ 174,
580
+ 518,
581
+ 825,
582
+ 589
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "Which property of a mineral can be determined just by looking at it? ",
589
+ "bbox": [
590
+ 176,
591
+ 597,
592
+ 624,
593
+ 611
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "(A) luster [correct] $( B )$ mass $( C )$ weight $( D )$ hardness. ",
600
+ "bbox": [
601
+ 174,
602
+ 617,
603
+ 531,
604
+ 632
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "CommonsenseQA Benchmark. The CommonsenseQA dataset (Talmor et al., 2019) consists of 12,102 natural language questions that require human commonsense reasoning ability to answer. A typical question is : ",
611
+ "bbox": [
612
+ 178,
613
+ 638,
614
+ 826,
615
+ 681
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "Where can I stand on a river to see water falling without getting wet? ",
622
+ "bbox": [
623
+ 178,
624
+ 688,
625
+ 633,
626
+ 703
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "(A) waterfall, (B) bridge [correct], (C) valley, $( D )$ stream, (E) bottom. ",
633
+ "bbox": [
634
+ 176,
635
+ 709,
636
+ 629,
637
+ 724
638
+ ],
639
+ "page_idx": 5
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "Each question has five candidate answers from ConceptNet (Speer et al., 2017). To make the question more difficult to solve, most answers have the same relation in ConceptNet to the key concept in the question. As shown in the above example, most answers can be connected to “river” by “AtLocation” relation in ConceptNet. For a fair comparison with the reported results in papers and leaderboard6, we use the official random split 1.11. ",
644
+ "bbox": [
645
+ 174,
646
+ 731,
647
+ 825,
648
+ 801
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "4.2 EXPERIMENTAL RESULTS ",
655
+ "text_level": 1,
656
+ "bbox": [
657
+ 174,
658
+ 818,
659
+ 392,
660
+ 832
661
+ ],
662
+ "page_idx": 5
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "GLUE We summarize results on the dev sets of GLUE in Table 1, comparing the proposed FreeLB against other adversatial training algorithms (PGD (Madry et al., 2018) and FreeAT (Shafahi et al., 2019)). We use the same step size $\\alpha$ and number of steps $m$ for PGD, FreeAT and FreeLB. FreeLB is consistently better than the two baselines. Comparisons and detailed discussions about ",
667
+ "bbox": [
668
+ 174,
669
+ 843,
670
+ 823,
671
+ 900
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "table",
677
+ "img_path": "images/e0294ede408252845a3f452283bba1eeb68e7d5fc0d948c4421b775c75aff2ef.jpg",
678
+ "table_caption": [
679
+ "Table 3: Results on ARC and CommonsenseQA (CQA). ARC-Merge is the combination of ARC-Easy and ARC-Challenge, “MTL” stands for multi-task learning and “Ens” stands for ensemble. Results of XLNet $^ +$ RoBERTa $\\left( \\mathbf { M } \\mathbf { T } \\mathbf { L } { + } \\mathbf { E } \\mathbf { n } \\mathbf { s } \\right)$ and AristoRoBERTaV7 (MTL) are from the ARC leaderboards. Test (E) denotes the test set results with ensembles. For CQA, we report the highest dev and test accuracies among all models. The models with 78.81/72.19 dev/test accuracy (as in the table) have 71.84/78.64 test/dev accuracies respectively. "
680
+ ],
681
+ "table_footnote": [],
682
+ "table_body": "<table><tr><td rowspan=2 colspan=1></td><td rowspan=2 colspan=9>ARC-Easy ARC-Challenge ARC-Merge CQADev Test Dev Test Dev Test Dev Test Test (E)</td></tr><tr><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>Dev</td><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>Dev</td><td rowspan=1 colspan=2>Test Dev</td><td rowspan=1 colspan=1>Test</td></tr><tr><td rowspan=1 colspan=1>RoBERTa(Reported)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>78.43</td><td rowspan=1 colspan=1>72.1</td><td rowspan=1 colspan=1>72.5</td></tr><tr><td rowspan=1 colspan=1>RoBERTa (ReImp)</td><td rowspan=1 colspan=1>84.39</td><td rowspan=1 colspan=1>84.13</td><td rowspan=1 colspan=1>64.54</td><td rowspan=1 colspan=1>64.44</td><td rowspan=1 colspan=1>77.83</td><td rowspan=1 colspan=1>77.62</td><td rowspan=1 colspan=1>77.56</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoBERTa</td><td rowspan=1 colspan=1>84.91</td><td rowspan=1 colspan=1>84.81</td><td rowspan=1 colspan=1>65.89</td><td rowspan=1 colspan=1>65.36</td><td rowspan=1 colspan=1>78.37</td><td rowspan=1 colspan=1>78.39</td><td rowspan=1 colspan=1>78.81</td><td rowspan=1 colspan=1>72.2</td><td rowspan=1 colspan=1>73.1</td></tr><tr><td rowspan=1 colspan=1>AristoRoBERTaV7(MTL)</td><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=1>85.02</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>66.47</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>78.89</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>:</td></tr><tr><td rowspan=1 colspan=1>XLNet +RoBERTa (MTL+Ens)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>67.06</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>FreeLB-RoBERTa(MTL)</td><td rowspan=1 colspan=1>84.91</td><td rowspan=1 colspan=1>85.44</td><td rowspan=1 colspan=1>70.23</td><td rowspan=1 colspan=1>67.75</td><td rowspan=1 colspan=1>79.86</td><td rowspan=1 colspan=1>79.60</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td></tr></table>",
683
+ "bbox": [
684
+ 173,
685
+ 101,
686
+ 825,
687
+ 205
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "YOPO (Zhang et al., 2019) are provided in Sec. 4.3. We have also submitted our results to the evaluation server, results provided in Table 2. FreeLB lifts the performance of the BERT-base model from 78.3 to 79.4, and RoBERTa-large model from 88.5 to 88.8 on overall scores. ",
694
+ "bbox": [
695
+ 176,
696
+ 301,
697
+ 820,
698
+ 343
699
+ ],
700
+ "page_idx": 6
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "ARC For ARC, a corpus of 14 million related science documents (from ARC Corpus, Wikipedia and other sources) is provided. For each QA pair, we first use a retrieval model to select top 10 related documents. Then, given these retrieved documents7, we use RoBERTa-large model to encode $\\langle s \\rangle$ Retrieved Documents $\\langle / s \\rangle$ Question $^ +$ Answer $\\langle / s \\rangle$ , where $\\langle \\mathbf { s } \\rangle$ and $\\langle / \\mathrm { s } \\rangle$ are special tokens for RoBERTa model8. We then apply a fully-connected layer to the representation of the [CLS] token to compute the final logit, and use standard cross-entropy loss for model training. ",
705
+ "bbox": [
706
+ 174,
707
+ 351,
708
+ 825,
709
+ 434
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "Results are summarized in Table 3. Following Sun et al. (2018), we first finetune the RoBERTa model on the RACE dataset (Lai et al., 2017). The finetuned RoBERTa model achieves $8 5 . 7 0 \\%$ and $8 5 . 2 4 \\%$ accuracy on the development and test set of RACE, respectively. Based on this, we further finetune the model on both ARC-Easy and ARC-Challenge datasets with the same hyper-parameter searching strategy (for 5 epochs), which achieves $8 4 . 1 3 \\% / 6 4 . 4 4 \\%$ test accuracy on ARC-Easy/ARCChallenge. And by adding FreeLB finetuning, we can reach $8 4 . 8 1 \\% / 6 5 . 3 6 \\%$ , a significant boost on ARC benchmark, demonstrating the effectiveness of FreeLB. ",
716
+ "bbox": [
717
+ 173,
718
+ 441,
719
+ 825,
720
+ 539
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "To further improve the results, we apply a multi-task learning (MTL) strategy using additional datasets. We first finetune the model on RACE (Lai et al., 2017), and then finetune on a joint dataset of ARC-Easy, ARC-Challenge, OpenbookQA (Mihaylov et al., 2018) and Regents Living Environment9. Based on this, we further finetune our model on ARC-Easy and ARC-Challenge with FreeLB. After finetuning, our single model achieves $6 7 . 7 5 \\%$ test accuracy on ARC-Challenge and $8 5 . 4 4 \\%$ on ARC-Easy, both outperforming the best submission on the official leaderboard10. ",
727
+ "bbox": [
728
+ 174,
729
+ 546,
730
+ 825,
731
+ 628
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "CommonsenseQA Similar to the training strategy in Liu et al. (2019b), we construct five inputs for each question by concatenating the question and each answer separately, then encode each input with the representation of the [CLS] token. A final score is calculated by applying the representation of [CLS] to a fully-connected layer. Following the fairseq repository11, the input is formatted as: ${ \\mathfrak { n } } ( s ) Q$ : Where can I stand on a river to see water falling without getting wet? $\\langle / s \\rangle A$ : waterfall $\\langle \\langle s \\rangle ^ { \\ast } \\cdot \\mathbf { \\vec { \\mathbf { \\mu } } }$ , where $\\cdot _ { Q }$ :’ and $^ { , } A$ :’ are the prefix for question and answer, respectively. ",
738
+ "bbox": [
739
+ 174,
740
+ 636,
741
+ 825,
742
+ 719
743
+ ],
744
+ "page_idx": 6
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "Results are summarized in Table 3. We obtained a dev-set accuracy of $7 7 . 5 6 \\%$ with the RoBERTalarge model. When using FreeLB finetuning, we achieved $7 8 . 8 1 \\%$ , a $1 . 2 5 \\%$ absolute gain. Compared with the results reported from fairseq repository, which obtains $7 8 . 4 3 \\%$ accuracy on the devset, FreeLB still achieves better performance. Our submission to the CommonsenseQA leaderboard achieves $7 2 . 2 \\%$ single-model test set accuracy, and the result of a 20-model ensemble is $7 3 . 1 \\%$ , which achieves No.1 among all the submissions without making use of ConceptNet. ",
749
+ "bbox": [
750
+ 173,
751
+ 727,
752
+ 825,
753
+ 810
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "table",
759
+ "img_path": "images/22299a0200d7157b9946af1d49851cd5bfb444546715f02cc8dfdb5fe86e9613.jpg",
760
+ "table_caption": [
761
+ "Table 4: The median and standard deviation of the scores on the dev sets of RTE, CoLA and MRPC from the GLUE benchmark, computed from 5 runs with the same hyper-parameters except for the random seeds. We use FreeLB- $\\mathbf { \\nabla } m$ to denote FreeLB with $m$ ascent steps, and FreeLB- ${ . 3 ^ { * } }$ to denote the version without reusing the dropout mask. "
762
+ ],
763
+ "table_footnote": [],
764
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>FreeLB-3*</td><td rowspan=1 colspan=1>FreeLB-3</td><td rowspan=1 colspan=1>YOPO-3-2</td><td rowspan=1 colspan=1>YOPO-3-3</td></tr><tr><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>85.61 (1.67)</td><td rowspan=1 colspan=1>87.14 (1.29)</td><td rowspan=1 colspan=1>88.13 (1.21)</td><td rowspan=1 colspan=1>87.05 (1.36)</td><td rowspan=1 colspan=1>87.05 (0.20)</td></tr><tr><td rowspan=1 colspan=1>CoLA</td><td rowspan=1 colspan=1>67.57 (1.30)</td><td rowspan=1 colspan=1>69.31 (1.16)</td><td rowspan=1 colspan=1>71.12 (0.90)</td><td rowspan=1 colspan=1>70.40 (0.91)</td><td rowspan=1 colspan=1>69.91 (1.16)</td></tr><tr><td rowspan=1 colspan=1>MRPC</td><td rowspan=1 colspan=1>90.69 (0.54)</td><td rowspan=1 colspan=1>90.93 (0.66)</td><td rowspan=1 colspan=1>91.42 (0.72)</td><td rowspan=1 colspan=1>90.44 (0.62)</td><td rowspan=1 colspan=1>90.69 (0.37)</td></tr></table>",
765
+ "bbox": [
766
+ 230,
767
+ 101,
768
+ 763,
769
+ 159
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "table",
775
+ "img_path": "images/123f8ec948de592b6c31088d940779fcf701f6d633979bb44b4a997bb3feb667.jpg",
776
+ "table_caption": [],
777
+ "table_footnote": [],
778
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=3>RTE</td><td rowspan=1 colspan=3>CoLA</td><td rowspan=1 colspan=3>MRPC</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-3)</td><td rowspan=1 colspan=1>M-Inc (R)(10-3)</td><td rowspan=1 colspan=1>N-Loss(10-3)</td></tr><tr><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>5.1</td><td rowspan=1 colspan=1>5.3</td><td rowspan=1 colspan=1>4.5</td><td rowspan=1 colspan=1>6.1</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.2</td><td rowspan=1 colspan=1>10.2</td><td rowspan=1 colspan=1>10.2</td><td rowspan=1 colspan=1>1.9</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>4.7</td><td rowspan=1 colspan=1>4.9</td><td rowspan=1 colspan=1>6.2</td><td rowspan=1 colspan=1>128.2</td><td rowspan=1 colspan=1>130.1</td><td rowspan=1 colspan=1>436.1</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.7</td><td rowspan=1 colspan=1>5.4</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>3.0</td><td rowspan=1 colspan=1>2.6</td><td rowspan=1 colspan=1>4.1</td><td rowspan=1 colspan=1>1.4</td><td rowspan=1 colspan=1>1.3</td><td rowspan=1 colspan=1>7.2</td><td rowspan=1 colspan=1>3.6</td><td rowspan=1 colspan=1>3.6</td><td rowspan=1 colspan=1>2.7</td></tr></table>",
779
+ "bbox": [
780
+ 173,
781
+ 219,
782
+ 825,
783
+ 299
784
+ ],
785
+ "page_idx": 7
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Table 5: Median of the maximum increase in loss in the vicinity of the dev set samples for RoBERTa-Large model finetuned with different methods. Vanilla models are naturally trained RoBERTa’s. M-Inc: Max Inc, MInc (R): Max Inc (R). Nat Loss (N-Loss) is the loss value on clean samples. Notice we require all clean samples here to be correctly classified by all models, which results in 227, 850 and 355 samples for RTE, CoLA and MRPC, respectively. We also give the variance in the Appendix. ",
790
+ "bbox": [
791
+ 173,
792
+ 304,
793
+ 825,
794
+ 368
795
+ ],
796
+ "page_idx": 7
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "4.3 ABLATION STUDY AND ANALYSIS ",
801
+ "text_level": 1,
802
+ "bbox": [
803
+ 176,
804
+ 386,
805
+ 450,
806
+ 400
807
+ ],
808
+ "page_idx": 7
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "In this sub-section, we first show the importance of reusing dropout mask, then conduct a thorough ablation study on FreeLB over the GLUE benchmark to analyze the robustness and generalization strength of different approaches. We observe that it is unnecessary to perform shallow-layer updates on the adversary as YOPO for our case, and FreeLB results in improved robustness and generalization compared with PGD. ",
813
+ "bbox": [
814
+ 174,
815
+ 411,
816
+ 825,
817
+ 481
818
+ ],
819
+ "page_idx": 7
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "Importance of Reusing Mask Table 4 (columns 2 to 4) compares the results of FreeLB with and without reusing the same dropout mask in each ascent step, as proposed in Sec. 3.3. With reusing, FreeLB can achieve a larger improvement over the naturally trained models. Thus, we enable mask reusing for all experiments involving RoBERTa. ",
824
+ "bbox": [
825
+ 174,
826
+ 488,
827
+ 825,
828
+ 545
829
+ ],
830
+ "page_idx": 7
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "Comparing the Robustness Table 5 provides the comparisons of the maximum increment of loss in the vicinity of each sample, defined as: ",
835
+ "bbox": [
836
+ 173,
837
+ 551,
838
+ 823,
839
+ 579
840
+ ],
841
+ "page_idx": 7
842
+ },
843
+ {
844
+ "type": "equation",
845
+ "img_path": "images/cf1340b64e7dea43e7ba8813f0bad358c01a42d13b806c2cf4c77f077ec893d9.jpg",
846
+ "text": "$$\n\\displaystyle \\Delta L _ { \\mathrm { m a x } } ( \\boldsymbol { X } , \\epsilon ) = \\operatorname* { m a x } _ { \\| \\delta \\| \\leq \\epsilon } L ( f _ { \\boldsymbol { \\theta } } ( \\boldsymbol { X } + \\delta ) , \\boldsymbol { y } ) - L ( f _ { \\boldsymbol { \\theta } } ( \\boldsymbol { X } ) , \\boldsymbol { y } ) ,\n$$",
847
+ "text_format": "latex",
848
+ "bbox": [
849
+ 308,
850
+ 582,
851
+ 689,
852
+ 608
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "which reflects the robustness and invariance of the model in the embedding space. In practice, we use PGD steps as in Eq. 2 to find the value of ${ \\Delta } L _ { \\mathrm { m a x } } ( \\boldsymbol { X } , \\boldsymbol { \\epsilon } )$ . We found that when using a step size of $5 { \\cdot } 1 0 ^ { - 3 }$ and $\\epsilon = 0 . 0 1 \\| X \\| _ { F }$ , the PGD iterations converge to almost the same value, starting from 100 different random initializations of $\\pmb { \\delta }$ for the RoBERTa models, trained with or without FreeLB. This indicates that PGD reliably finds $\\Delta L _ { \\mathrm { m a x } }$ for these models. Therefore, we compute ${ \\Delta } L _ { \\mathrm { m a x } } ( X , \\epsilon )$ for each $\\boldsymbol { X }$ via a 2000-step PGD. ",
859
+ "bbox": [
860
+ 174,
861
+ 611,
862
+ 825,
863
+ 695
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Samples with small margins exist even for models with perfect accuracy, which could give a false sense of vulnerability of the model. To rule out the outlier effect and make ${ \\Delta } L _ { \\mathrm { m a x } } ( \\boldsymbol { X } , \\epsilon )$ comparable across different samples, we only consider samples that all the evaluated models can correctly classify, and search for an $\\epsilon$ for each sample such that the reference model can correctly classify all samples within the $\\epsilon$ ball.12 However, such choice of per-sample $\\epsilon$ favors the reference model by design. To make fair comparisons, Table 5 provides the median of ${ \\Delta } L _ { \\mathrm { m a x } } ( \\boldsymbol { X } , \\epsilon )$ with per-sample $\\epsilon$ from models trained by FreeLB (Max Inc) and PGD (Mac Inc (R)), respectively. ",
870
+ "bbox": [
871
+ 173,
872
+ 702,
873
+ 825,
874
+ 800
875
+ ],
876
+ "page_idx": 7
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "Across all three datasets and different reference models, FreeLB has the smallest median increment even when starting from a larger natural loss than vanilla models. This demonstrates that FreeLB is more robust and invariant in most cases. Such results are also consistent with the models’ dev set performance (the performances for Vanilla/PGD/FreeLB models on RTE, CoLA and MRPC are 86.69/87.41/89.21, 69.91/70.84/71.40, 91.67/91.17/91.17, respectively). ",
881
+ "bbox": [
882
+ 174,
883
+ 806,
884
+ 825,
885
+ 876
886
+ ],
887
+ "page_idx": 7
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "Comparing with YOPO The original implementation of YOPO (Zhang et al., 2019) chooses the first convolutional layer of the ResNets as $f _ { 0 }$ for updating the adversary in the “s-loop”. As a result, each step of the “s-loop” should be using exactly the same value to update the adversary,and YOPO$m { - } n$ degenerates into FreeLB with a $n$ -times large step size. To avoid that, we choose the layers up to the output of the first Transformer block as $f _ { 0 }$ when implementing YOPO. To make the total amount of update on the adversary equal, we take the hyper-parameters for FreeLB- $m$ and only change the step size $\\alpha$ into $\\alpha / n$ for YOPO- $m { \\cdot } n$ . Table 4 shows that FreeLB performs consistently better than YOPO on all three datasets. Accidentally, we also give the results comparing with YOPO- $\\mathbf { \\nabla } m - n$ without changing the step size $\\alpha$ for YOPO in Table 8. The gap between two approaches seem to shrink, which may be caused by using a larger total step size for the YOPO adversaries. We leave exhaustive hyperparameter search for both models as our future work. ",
892
+ "bbox": [
893
+ 174,
894
+ 103,
895
+ 825,
896
+ 256
897
+ ],
898
+ "page_idx": 8
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "5 CONCLUSION ",
903
+ "text_level": 1,
904
+ "bbox": [
905
+ 176,
906
+ 276,
907
+ 318,
908
+ 292
909
+ ],
910
+ "page_idx": 8
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "In this work, we have developed an adversarial training approach, FreeLB, to improve natural language understanding. The proposed approach adds perturbations to continuous word embeddings using a gradient method, and minimizes the resultant adversarial risk in an efficient way. FreeLB is able to boost Transformer-based model (BERT and RoBERTa) on several datasets and achieve new state of the art on GLUE and ARC benchmarks. Empirical study demonstrates that our method results in both higher robustness in the embedding space than natural training and better generalization ability. Such observation is also consistent with recent findings in Computer Vision. However, adversarial training still takes significant overhead compared with vanilla SGD. How to accelerate this process while improving generalization is an interesting future direction. ",
915
+ "bbox": [
916
+ 174,
917
+ 308,
918
+ 825,
919
+ 433
920
+ ],
921
+ "page_idx": 8
922
+ },
923
+ {
924
+ "type": "text",
925
+ "text": "Acknowledgements: Goldstein and Zhu were supported in part by the DARPA GARD, DARPA QED for RML, and AFOSR MURI programs. ",
926
+ "bbox": [
927
+ 176,
928
+ 448,
929
+ 821,
930
+ 477
931
+ ],
932
+ "page_idx": 8
933
+ },
934
+ {
935
+ "type": "text",
936
+ "text": "REFERENCES ",
937
+ "text_level": 1,
938
+ "bbox": [
939
+ 176,
940
+ 497,
941
+ 285,
942
+ 512
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Eneko Agirre, Llu’is M‘arquez, and Richard Wicentowski (eds.). Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007). Association for Computational Linguistics, 2007. ",
949
+ "bbox": [
950
+ 174,
951
+ 520,
952
+ 825,
953
+ 561
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In ICML, 2018. ",
960
+ "bbox": [
961
+ 174,
962
+ 570,
963
+ 821,
964
+ 599
965
+ ],
966
+ "page_idx": 8
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Roy Bar Haim, Ido Dagan, Bill Dolan, Lisa Ferro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. The second PASCAL recognising textual entailment challenge. 2006. ",
971
+ "bbox": [
972
+ 173,
973
+ 607,
974
+ 821,
975
+ 637
976
+ ],
977
+ "page_idx": 8
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Yonatan Belinkov and Yonatan Bisk. Synthetic and natural noise both break neural machine translation. In ICLR, 2018. ",
982
+ "bbox": [
983
+ 174,
984
+ 645,
985
+ 821,
986
+ 674
987
+ ],
988
+ "page_idx": 8
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Luisa Bentivogli, Ido Dagan, Hoa Trang Dang, Danilo Giampiccolo, and Bernardo Magnini. The fifth PASCAL recognizing textual entailment challenge. 2009. ",
993
+ "bbox": [
994
+ 174,
995
+ 681,
996
+ 820,
997
+ 712
998
+ ],
999
+ "page_idx": 8
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Yong Cheng, Lu Jiang, and Wolfgang Macherey. Robust neural machine translation with doubly adversarial inputs. In ACL, 2019. ",
1004
+ "bbox": [
1005
+ 169,
1006
+ 719,
1007
+ 821,
1008
+ 747
1009
+ ],
1010
+ "page_idx": 8
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457, 2018. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 756,
1018
+ 823,
1019
+ 799
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Patrick L Combettes and Jean-Christophe Pesquet. Proximal splitting methods in signal processing. In Fixed-point algorithms for inverse problems in science and engineering. 2011. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 806,
1029
+ 820,
1030
+ 837
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Ido Dagan, Oren Glickman, and Bernardo Magnini. The PASCAL recognising textual entailment challenge. In Machine learning challenges. evaluating predictive uncertainty, visual object classification, and recognising tectual entailment. Springer, 2006. ",
1037
+ "bbox": [
1038
+ 174,
1039
+ 844,
1040
+ 820,
1041
+ 887
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019. ",
1048
+ "bbox": [
1049
+ 174,
1050
+ 895,
1051
+ 821,
1052
+ 924
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the International Workshop on Paraphrasing, 2005. ",
1059
+ "bbox": [
1060
+ 171,
1061
+ 103,
1062
+ 823,
1063
+ 132
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Sanghamitra Dutta, Gauri Joshi, Soumyadip Ghosh, Parijat Dube, and Priya Nagpurkar. Slow and stale gradients can win the race: Error-runtime trade-offs in distributed sgd. In AISTATS, pp. 803–812, 2018. ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 141,
1073
+ 821,
1074
+ 184
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. HotFlip: White-box adversarial examples for text classification. In ACL, 2018. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 193,
1084
+ 823,
1085
+ 222
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In NeurIPS, 2016. ",
1092
+ "bbox": [
1093
+ 171,
1094
+ 231,
1095
+ 823,
1096
+ 261
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL workshop on textual entailment and paraphrasing, 2007. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 268,
1106
+ 826,
1107
+ 313
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Tom Goldstein, Christoph Studer, and Richard Baraniuk. A field guide to forward-backward splitting with a fasta implementation. arXiv preprint 1411.3406, 2014. ",
1114
+ "bbox": [
1115
+ 174,
1116
+ 320,
1117
+ 823,
1118
+ 351
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 358,
1128
+ 823,
1129
+ 388
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Shankar Iyer, Nikhil Dandekar, and Kornl Csernai. First quora dataset release: Question pairs, 2017. URL https://www.quora.com/q/quoradata/ First-Quora-Dataset-Release-Question-Pairs. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 397,
1139
+ 825,
1140
+ 440
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. Adversarial example generation with syntactically controlled paraphrase networks. In NAACL, 2018. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 449,
1150
+ 823,
1151
+ 478
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In EMNLP, 2017. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 487,
1161
+ 823,
1162
+ 516
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In ICLR, 2017. ",
1169
+ "bbox": [
1170
+ 174,
1171
+ 525,
1172
+ 823,
1173
+ 554
1174
+ ],
1175
+ "page_idx": 9
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. arXiv preprint arXiv:1704.04683, 2017. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 563,
1183
+ 825,
1184
+ 593
1185
+ ],
1186
+ "page_idx": 9
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. Albert: A lite bert for self-supervised learning of language representations. ICLR, 2020. ",
1191
+ "bbox": [
1192
+ 174,
1193
+ 601,
1194
+ 825,
1195
+ 631
1196
+ ],
1197
+ "page_idx": 9
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Hector J Levesque, Ernest Davis, and Leora Morgenstern. The Winograd schema challenge. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, 2011. ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 638,
1205
+ 825,
1206
+ 669
1207
+ ],
1208
+ "page_idx": 9
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. In ACL, 2019a. ",
1213
+ "bbox": [
1214
+ 173,
1215
+ 676,
1216
+ 823,
1217
+ 707
1218
+ ],
1219
+ "page_idx": 9
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019b. ",
1224
+ "bbox": [
1225
+ 178,
1226
+ 714,
1227
+ 823,
1228
+ 758
1229
+ ],
1230
+ "page_idx": 9
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018. ",
1235
+ "bbox": [
1236
+ 171,
1237
+ 767,
1238
+ 821,
1239
+ 796
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. arXiv preprint arXiv:1809.02789, 2018. ",
1246
+ "bbox": [
1247
+ 176,
1248
+ 805,
1249
+ 823,
1250
+ 848
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Adversarial training methods for semisupervised text classification. In ICLR, 2017. ",
1257
+ "bbox": [
1258
+ 174,
1259
+ 857,
1260
+ 820,
1261
+ 886
1262
+ ],
1263
+ "page_idx": 9
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. TPAMI, 2019. ",
1268
+ "bbox": [
1269
+ 176,
1270
+ 895,
1271
+ 820,
1272
+ 924
1273
+ ],
1274
+ "page_idx": 9
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Alhussein Fawzi, Soham De, Robert Stanforth, Pushmeet Kohli, et al. Adversarial robustness through local linearization. In NeurIPS, 2019. ",
1279
+ "bbox": [
1280
+ 176,
1281
+ 103,
1282
+ 823,
1283
+ 145
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "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 1910.10683, 2019. ",
1290
+ "bbox": [
1291
+ 176,
1292
+ 156,
1293
+ 821,
1294
+ 199
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. In EMNLP, 2016. ",
1301
+ "bbox": [
1302
+ 173,
1303
+ 208,
1304
+ 821,
1305
+ 238
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Semantically equivalent adversarial rules for debugging NLP models. In ACL, 2018. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 247,
1315
+ 823,
1316
+ 276
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Parsa Saadatpanah, Ali Shafahi, and Tom Goldstein. Adversarial attacks on copyright detection systems. arXiv preprint 1906.07153, 2019. ",
1323
+ "bbox": [
1324
+ 173,
1325
+ 286,
1326
+ 823,
1327
+ 315
1328
+ ],
1329
+ "page_idx": 10
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, 2016. ",
1334
+ "bbox": [
1335
+ 173,
1336
+ 324,
1337
+ 823,
1338
+ 354
1339
+ ],
1340
+ "page_idx": 10
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "A. Shafahi, M. Najibi, A. Ghiasi, Z. Xu, J. Dickerson, C. Studer, L. Davis, G. Taylor, and T. Goldstein. Adversarial Training for Free! In NeurIPS, 2019. ",
1345
+ "bbox": [
1346
+ 168,
1347
+ 363,
1348
+ 823,
1349
+ 392
1350
+ ],
1351
+ "page_idx": 10
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 401,
1359
+ 821,
1360
+ 445
1361
+ ],
1362
+ "page_idx": 10
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Jure Sokolic, Raja Giryes, Guillermo Sapiro, and Miguel Rodrigues. Generalization error of invariant classifiers. In AISTATS, 2017. ",
1367
+ "bbox": [
1368
+ 169,
1369
+ 454,
1370
+ 823,
1371
+ 484
1372
+ ],
1373
+ "page_idx": 10
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Robert Speer, Joshua Chin, and Catherine Havasi. Conceptnet 5.5: An open multilingual graph of general knowledge. In AAAI, 2017. ",
1378
+ "bbox": [
1379
+ 169,
1380
+ 493,
1381
+ 823,
1382
+ 522
1383
+ ],
1384
+ "page_idx": 10
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014. ",
1389
+ "bbox": [
1390
+ 174,
1391
+ 531,
1392
+ 821,
1393
+ 563
1394
+ ],
1395
+ "page_idx": 10
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Kai Sun, Dian Yu, Dong Yu, and Claire Cardie. Improving machine reading comprehension with general reading strategies. arXiv preprint arXiv:1810.13441, 2018. ",
1400
+ "bbox": [
1401
+ 173,
1402
+ 570,
1403
+ 821,
1404
+ 601
1405
+ ],
1406
+ "page_idx": 10
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. Commonsenseqa: A question answering challenge targeting commonsense knowledge. In NAACL, 2019. ",
1411
+ "bbox": [
1412
+ 173,
1413
+ 609,
1414
+ 823,
1415
+ 638
1416
+ ],
1417
+ "page_idx": 10
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In ICLR, 2019. ",
1422
+ "bbox": [
1423
+ 173,
1424
+ 648,
1425
+ 825,
1426
+ 691
1427
+ ],
1428
+ "page_idx": 10
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. Neural network acceptability judgments. arXiv preprint 1805.12471, 2018. ",
1433
+ "bbox": [
1434
+ 171,
1435
+ 702,
1436
+ 823,
1437
+ 731
1438
+ ],
1439
+ "page_idx": 10
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Adina Williams, Nikita Nangia, and Samuel R. Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In NAACL, 2018. ",
1444
+ "bbox": [
1445
+ 171,
1446
+ 739,
1447
+ 823,
1448
+ 770
1449
+ ],
1450
+ "page_idx": 10
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Chaowei Xiao, Ruizhi Deng, Bo Li, Fisher Yu, Mingyan Liu, and Dawn Song. Characterizing adversarial examples based on spatial consistency information for semantic segmentation. In ECCV, 2018. ",
1455
+ "bbox": [
1456
+ 176,
1457
+ 779,
1458
+ 823,
1459
+ 821
1460
+ ],
1461
+ "page_idx": 10
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L. Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In CVPR, 2019. ",
1466
+ "bbox": [
1467
+ 173,
1468
+ 832,
1469
+ 823,
1470
+ 859
1471
+ ],
1472
+ "page_idx": 10
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Huan Xu and Shie Mannor. Robustness and generalization. Machine learning, 2012. ",
1477
+ "bbox": [
1478
+ 173,
1479
+ 869,
1480
+ 728,
1481
+ 886
1482
+ ],
1483
+ "page_idx": 10
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In NeurIPS, 2019. ",
1488
+ "bbox": [
1489
+ 176,
1490
+ 895,
1491
+ 820,
1492
+ 924
1493
+ ],
1494
+ "page_idx": 10
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Dinghuai Zhang, Tianyuan Zhang, Yiping Lu, Zhanxing Zhu, and Bin Dong. You only propagate once: Painless adversarial training using maximal principle. In NeurIPS, 2019. ",
1499
+ "bbox": [
1500
+ 173,
1501
+ 103,
1502
+ 825,
1503
+ 132
1504
+ ],
1505
+ "page_idx": 11
1506
+ },
1507
+ {
1508
+ "type": "text",
1509
+ "text": "Zhengli Zhao, Dheeru Dua, and Sameer Singh. Generating natural adversarial examples. In ICLR, 2018. ",
1510
+ "bbox": [
1511
+ 174,
1512
+ 141,
1513
+ 823,
1514
+ 170
1515
+ ],
1516
+ "page_idx": 11
1517
+ },
1518
+ {
1519
+ "type": "text",
1520
+ "text": "A ADDITIONAL EXPERIMENTAL DETAILS ",
1521
+ "text_level": 1,
1522
+ "bbox": [
1523
+ 176,
1524
+ 102,
1525
+ 534,
1526
+ 118
1527
+ ],
1528
+ "page_idx": 12
1529
+ },
1530
+ {
1531
+ "type": "text",
1532
+ "text": "A.1 PROBLEM FORMULATIONS ",
1533
+ "text_level": 1,
1534
+ "bbox": [
1535
+ 176,
1536
+ 133,
1537
+ 403,
1538
+ 147
1539
+ ],
1540
+ "page_idx": 12
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "For tasks with ranking loss like ARC, CommonsenseQA, WNLI and QNLI, add the perturbation to the concatenation of the embeddings of all question/answer pairs. ",
1545
+ "bbox": [
1546
+ 174,
1547
+ 160,
1548
+ 823,
1549
+ 188
1550
+ ],
1551
+ "page_idx": 12
1552
+ },
1553
+ {
1554
+ "type": "text",
1555
+ "text": "Additional tricks are required to achieve high performance on WNLI and QNLI for the GLUE benchmark. We use the same tricks as Liu et al. (2019b). For WNLI, we use the same WSC data provided by Liu et al. (2019b) for training. For testing, Liu et al. (2019b) also provided the test set with span annotations, but the order is different form the GLUE dataset. We re-order their test set by matching. For the QNLI, we follow Liu et al. (2019b) and formulate the problem as pairwise ranking problem, which is the same for CommonsenseQA. We find the matching pairs for both training set and testing set by matching the queries in the dev set. We predict “entailment” if the candidate has the higher score, and “not entailment” otherwise. ",
1556
+ "bbox": [
1557
+ 173,
1558
+ 194,
1559
+ 825,
1560
+ 306
1561
+ ],
1562
+ "page_idx": 12
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "A.2 HYPER-PARAMETERS ",
1567
+ "text_level": 1,
1568
+ "bbox": [
1569
+ 176,
1570
+ 324,
1571
+ 367,
1572
+ 338
1573
+ ],
1574
+ "page_idx": 12
1575
+ },
1576
+ {
1577
+ "type": "table",
1578
+ "img_path": "images/4a6af4a2ca697bb9e27081b61d517c61fbe771acb7ab6a114f22e5ee01062b9f.jpg",
1579
+ "table_caption": [
1580
+ "Table 6: Additional hyper-parameters on GLUE tasks. "
1581
+ ],
1582
+ "table_footnote": [],
1583
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>MNLI</td><td rowspan=1 colspan=1>QNLI</td><td rowspan=1 colspan=1>QQP</td><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>MRPC</td><td rowspan=1 colspan=1>CoLA</td><td rowspan=1 colspan=1>STS-B</td></tr><tr><td rowspan=1 colspan=1>E</td><td rowspan=1 colspan=1>2E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>4.5E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>6E-1</td><td rowspan=1 colspan=1>4E-1</td><td rowspan=1 colspan=1>2E-1</td><td rowspan=1 colspan=1>3E-1</td></tr><tr><td rowspan=1 colspan=1>a</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>1.5E-1</td><td rowspan=1 colspan=1>3E-2</td><td rowspan=1 colspan=1>1E-1</td><td rowspan=1 colspan=1>4E-2</td><td rowspan=1 colspan=1>2.5E-2</td><td rowspan=1 colspan=1>1E-1</td></tr><tr><td rowspan=1 colspan=1>m</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>3</td></tr></table>",
1584
+ "bbox": [
1585
+ 223,
1586
+ 354,
1587
+ 774,
1588
+ 416
1589
+ ],
1590
+ "page_idx": 12
1591
+ },
1592
+ {
1593
+ "type": "text",
1594
+ "text": "As other adversarial training methods, introduces three additional hyper-parameters: step size $\\alpha$ , maximum perturbation $\\epsilon$ , number of steps $m$ . For all other hyper-parameters such as learning rate and number of iterations, we either search in the same interval as RoBERTa (on CommonsenseQA, ARC, and WNLI), or use exactly the same setting as RoBERTa (except for MRPC, where we find using a learning rate of $5 \\times 1 0 ^ { - 6 }$ gives better results).13. We list the best combinations for $\\alpha , \\epsilon$ and $m$ for each of the GLUE tasks in Table 6. For WSC/WNLI, the best combination is $\\epsilon = 1 e - 2 , \\alpha =$ $5 e - 3 , m = 2$ . Notice even when $m \\alpha < \\epsilon$ , the maximum perturbation could still reach $\\epsilon$ due to the random initialization. ",
1595
+ "bbox": [
1596
+ 173,
1597
+ 459,
1598
+ 825,
1599
+ 571
1600
+ ],
1601
+ "page_idx": 12
1602
+ },
1603
+ {
1604
+ "type": "text",
1605
+ "text": "B VARIANCE OF MAXIMUM INCREMENT OF LOSS ",
1606
+ "text_level": 1,
1607
+ "bbox": [
1608
+ 173,
1609
+ 592,
1610
+ 604,
1611
+ 608
1612
+ ],
1613
+ "page_idx": 12
1614
+ },
1615
+ {
1616
+ "type": "table",
1617
+ "img_path": "images/dc24cb509b23de841340a676916c10c0a5f0d23eba704bba7d0ecdae595f6dc7.jpg",
1618
+ "table_caption": [],
1619
+ "table_footnote": [],
1620
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=3>RTE</td><td rowspan=1 colspan=3>CoLA</td><td rowspan=1 colspan=3>MRPC</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-4)</td><td rowspan=1 colspan=1>M-Inc (R)(10-4)</td><td rowspan=1 colspan=1>N-Loss(10-4)</td><td rowspan=1 colspan=1>M-Inc(10-3)</td><td rowspan=1 colspan=1>M-Inc (R)(10-3)</td><td rowspan=1 colspan=1>N-Loss(10-3)</td></tr><tr><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>5.1(15087)</td><td rowspan=1 colspan=1>5.3(14346)</td><td rowspan=1 colspan=1>4.5(920)</td><td rowspan=1 colspan=1>6.1(13118)</td><td rowspan=1 colspan=1>5.7(14122)</td><td rowspan=1 colspan=1>5.2(447)</td><td rowspan=1 colspan=1>10.2(929)</td><td rowspan=1 colspan=1>10.2(955)</td><td rowspan=1 colspan=1>1.9(76)</td></tr><tr><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>4.7(10138)</td><td rowspan=1 colspan=1>4.9(1828)</td><td rowspan=1 colspan=1>6.2(752)</td><td rowspan=1 colspan=1>128.2(1300)</td><td rowspan=1 colspan=1>130.1(893)</td><td rowspan=1 colspan=1>436.1(1276)</td><td rowspan=1 colspan=1>5.7(321)</td><td rowspan=1 colspan=1>5.7(155)</td><td rowspan=1 colspan=1>5.4(54)</td></tr><tr><td rowspan=1 colspan=1>FreeLB</td><td rowspan=1 colspan=1>3.0(1614)</td><td rowspan=1 colspan=1>2.6(11114)</td><td rowspan=1 colspan=1>4.1(595)</td><td rowspan=1 colspan=1>1.4(1392)</td><td rowspan=1 colspan=1>1.3(6231)</td><td rowspan=1 colspan=1>7.2(615)</td><td rowspan=1 colspan=1>3.6(167)</td><td rowspan=1 colspan=1>3.6(601)</td><td rowspan=1 colspan=1>2.7(54)</td></tr></table>",
1621
+ "bbox": [
1622
+ 173,
1623
+ 627,
1624
+ 825,
1625
+ 695
1626
+ ],
1627
+ "page_idx": 12
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "Table 7: Median and Standard Deviation of the maximum increase in loss in the vicinity of the dev set samples for RoBERTa-Large model finetuned with different methods. Vanilla models are naturally trained RoBERTa’s. Nat Loss is the loss value on clean samples. Notice we require all clean samples here to be correctly classified by all models, which results in 227, 850 and 355 samples for RTE, CoLA and MRPC. ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 707,
1635
+ 825,
1636
+ 757
1637
+ ],
1638
+ "page_idx": 12
1639
+ },
1640
+ {
1641
+ "type": "text",
1642
+ "text": "Table 7 provides the complete results for the increment of loss in the interval, with median and standard deviation. ",
1643
+ "bbox": [
1644
+ 176,
1645
+ 776,
1646
+ 823,
1647
+ 804
1648
+ ],
1649
+ "page_idx": 12
1650
+ },
1651
+ {
1652
+ "type": "text",
1653
+ "text": "C ADDITIONAL RESULTS FOR ABLATION STUDIES ",
1654
+ "text_level": 1,
1655
+ "bbox": [
1656
+ 174,
1657
+ 825,
1658
+ 609,
1659
+ 842
1660
+ ],
1661
+ "page_idx": 12
1662
+ },
1663
+ {
1664
+ "type": "text",
1665
+ "text": "Here we provide some additional results for comparison with YOPO as complementary results to Table 4. We will release the complete results for comparing with YOPO and without variational dropout on each of the GLUE tasks in our next revision. From the current results, there is no need ",
1666
+ "bbox": [
1667
+ 176,
1668
+ 857,
1669
+ 825,
1670
+ 898
1671
+ ],
1672
+ "page_idx": 12
1673
+ },
1674
+ {
1675
+ "type": "table",
1676
+ "img_path": "images/8c04a7228cc8d5061e850a97d495da84f386812487797d0894db7899fc19501f.jpg",
1677
+ "table_caption": [],
1678
+ "table_footnote": [],
1679
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Vanilla</td><td rowspan=1 colspan=1>FreeLB-3</td><td rowspan=1 colspan=1>YOPO-3-2</td><td rowspan=1 colspan=1>YOPO-3-3</td></tr><tr><td rowspan=1 colspan=1>STS-B</td><td rowspan=1 colspan=1>92.20 (.2)</td><td rowspan=1 colspan=1>92.67 (.08)</td><td rowspan=1 colspan=1>92.60 (.17)</td><td rowspan=1 colspan=1>92.60 (0.20)</td></tr><tr><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>96.56 (.3)</td><td rowspan=1 colspan=1>96.79 (.2)</td><td rowspan=1 colspan=1>96.44 (.2)</td><td rowspan=1 colspan=1>96.33 (.1)</td></tr><tr><td rowspan=1 colspan=1>QNLI</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>94.98 (.2)</td><td rowspan=1 colspan=1>94.96 (.1)</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>QQP</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>92.60 (.03)</td><td rowspan=1 colspan=1>92.55 (.05)*</td><td rowspan=1 colspan=1>92.50 (.02)*</td></tr><tr><td rowspan=1 colspan=1>MNLI</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>90.61 (.1)</td><td rowspan=1 colspan=1>90.59 (.2)</td><td rowspan=1 colspan=1>90.45 (.2)</td></tr></table>",
1680
+ "bbox": [
1681
+ 285,
1682
+ 101,
1683
+ 709,
1684
+ 185
1685
+ ],
1686
+ "page_idx": 13
1687
+ },
1688
+ {
1689
+ "type": "text",
1690
+ "text": "Table 8: The median and standard deviation of the scores on the dev sets of STS-B, SST-2, QNLI, QQP and MNLI from the GLUE benchmark, each computed from 5 runs with the same hyper-parameters except for the random seeds (except for the results with YOPO on QQP, which are from 4 runs). Also note here we use a step size of $\\alpha$ for the adversary of YOPO-m-n, so YOPO effectively uses a step size of $_ { n \\alpha }$ . We use FreeLB- $\\mathbf { \\nabla } m$ to denote FreeLB with $m$ ascent steps, and YOPO-3- $\\mathbf { \\nabla } \\cdot \\mathbf { n }$ to denote YOPO with $_ n$ shallow-layer ascents. ",
1691
+ "bbox": [
1692
+ 173,
1693
+ 189,
1694
+ 826,
1695
+ 252
1696
+ ],
1697
+ "page_idx": 13
1698
+ },
1699
+ {
1700
+ "type": "text",
1701
+ "text": "in using extra shallow-layer updates that YOPO advocates, since this consistently deteriorates the performance while introducing extra computations. ",
1702
+ "bbox": [
1703
+ 173,
1704
+ 272,
1705
+ 823,
1706
+ 301
1707
+ ],
1708
+ "page_idx": 13
1709
+ }
1710
+ ]
parse/train/BygzbyHFvB/BygzbyHFvB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BygzbyHFvB/BygzbyHFvB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByldLrqlx/ByldLrqlx.md ADDED
@@ -0,0 +1,496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEPCODER: LEARNING TO WRITE PROGRAMS
2
+
3
+ Matej Balog∗ Department of Engineering University of Cambridge
4
+
5
+ Alexander L. Gaunt, Marc Brockschmidt, Sebastian Nowozin, Daniel Tarlow Microsoft Research
6
+
7
+ # ABSTRACT
8
+
9
+ We develop a first line of attack for solving programming competition-style problems from input-output examples using deep learning. The approach is to train a neural network to predict properties of the program that generated the outputs from the inputs. We use the neural network’s predictions to augment search techniques from the programming languages community, including enumerative search and an SMT-based solver. Empirically, we show that our approach leads to an order of magnitude speedup over the strong non-augmented baselines and a Recurrent Neural Network approach, and that we are able to solve problems of difficulty comparable to the simplest problems on programming competition websites.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ A dream of artificial intelligence is to build systems that can write computer programs. Recently, there has been much interest in program-like neural network models (Graves et al., 2014; Weston et al., 2015; Kurach et al., 2015; Joulin & Mikolov, 2015; Grefenstette et al., 2015; Sukhbaatar et al., 2015; Neelakantan et al., 2016; Kaiser & Sutskever, 2016; Reed & de Freitas, 2016; Zaremba et al., 2016; Graves et al., 2016), but none of these can write programs; that is, they do not generate human-readable source code. Only very recently, Riedel et al. (2016); Bunel et al. (2016); Gaunt et al. (2016) explored the use of gradient descent to induce source code from input-output examples via differentiable interpreters, and Ling et al. (2016) explored the generation of source code from unstructured text descriptions. However, Gaunt et al. (2016) showed that differentiable interpreterbased program induction is inferior to discrete search-based techniques used by the programming languages community. We are then left with the question of how to make progress on program induction using machine learning techniques.
14
+
15
+ In this work, we propose two main ideas: (1) learn to induce programs; that is, use a corpus of program induction problems to learn strategies that generalize across problems, and (2) integrate neural network architectures with search-based techniques rather than replace them.
16
+
17
+ In more detail, we can contrast our approach to existing work on differentiable interpreters. In differentiable interpreters, the idea is to define a differentiable mapping from source code and inputs to outputs. After observing inputs and outputs, gradient descent can be used to search for a program that matches the input-output examples. This approach leverages gradient-based optimization, which has proven powerful for training neural networks, but each synthesis problem is still solved independently—solving many synthesis problems does not help to solve the next problem.
18
+
19
+ We argue that machine learning can provide significant value towards solving Inductive Program Synthesis (IPS) by re-casting the problem as a big data problem. We show that training a neural network on a large number of generated IPS problems to predict cues from the problem description can help a search-based technique. In this work, we focus on predicting an order on the program space and show how to use it to guide search-based techniques that are common in the programming languages community. This approach has three desirable properties: first, we transform a difficult search problem into a supervised learning problem; second, we soften the effect of failures of the neural network by searching over program space rather than relying on a single prediction; and third, the neural network’s predictions are used to guide existing program synthesis systems, allowing us to use and improve on the best solvers from the programming languages community. Empirically, we show orders-of-magnitude improvements over optimized standard search techniques and a Recurrent Neural Network-based approach to the problem.
20
+
21
+ In summary, we define and instantiate a framework for using deep learning for program synthesis problems like ones appearing on programming competition websites. Our concrete contributions are:
22
+
23
+ 1. defining a programming language that is expressive enough to include real-world programming problems while being high-level enough to be predictable from input-output examples; 2. models for mapping sets of input-output examples to program properties; and 3. experiments that show an order of magnitude speedup over standard program synthesis techniques, which makes this approach feasible for solving problems of similar difficulty as the simplest problems that appear on programming competition websites.
24
+
25
+ # 2 BACKGROUND ON INDUCTIVE PROGRAM SYNTHESIS
26
+
27
+ We begin by providing background on Inductive Program Synthesis, including a brief overview of how it is typically formulated and solved in the programming languages community.
28
+
29
+ The Inductive Program Synthesis (IPS) problem is the following: given input-output examples, produce a program that has behavior consistent with the examples.
30
+
31
+ Building an IPS system requires solving two problems. First, the search problem: to find consistent programs we need to search over a suitable set of possible programs. We need to define the set (i.e., the program space) and search procedure. Second, the ranking problem: if there are multiple programs consistent with the input-output examples, which one do we return? Both of these problems are dependent on the specifics of the problem formulation. Thus, the first important decision in formulating an approach to program synthesis is the choice of a Domain Specific Language.
32
+
33
+ Domain Specific Languages (DSLs). DSLs are programming languages that are suitable for a specialized domain but are more restrictive than full-featured programming languages. For example, one might disallow loops or other control flow, and only allow string data types and a small number of primitive operations like concatenation. Most of program synthesis research focuses on synthesizing programs in DSLs, because full-featured languages like $\mathrm { C } { + + }$ enlarge the search space and complicate synthesis. Restricted DSLs can also enable more efficient special-purpose search algorithms. For example, if a DSL only allows concatenations of substrings of an input string, a dynamic programming algorithm can efficiently search over all possible programs (Polozov & Gulwani, 2015). The choice of DSL also affects the difficulty of the ranking problem. For example, in a DSL without if statements, the same algorithm is applied to all inputs, reducing the number of programs consistent with any set of input-output examples, and thus the ranking problem becomes easier. Of course, the restrictiveness of the chosen DSL also determines which problems the system can solve at all.
34
+
35
+ Search Techniques. There are many techniques for searching for programs consistent with inputoutput examples. Perhaps the simplest approach is to define a grammar and then enumerate all derivations of the grammar, checking each one for consistency with the examples. This approach can be combined with pruning based on types and other logical reasoning (Feser et al., 2015). While simple, these approaches can be implemented efficiently, and they can be surprisingly effective.
36
+
37
+ In restricted domains such as the concatenation example discussed above, special-purpose algorithms can be used. FlashMeta (Polozov & Gulwani, 2015) describes a framework for DSLs which allow decomposition of the search problem, e.g., where the production of an output string from an input string can be reduced to finding a program for producing the first part of the output and concatenating it with a program for producing the latter part of the output string.
38
+
39
+ Another class of systems is based on Satisfiability Modulo Theories (SMT) solving. SMT combines SAT-style search with theories like arithmetic and inequalities, with the benefit that theory-dependent subproblems can be handled by special-purpose solvers. For example, a special-purpose solver can easily find integers $x , y$ such that $x < y$ and $y < - 1 0 0$ hold, whereas an enumeration strategy may need to consider many values before satisfying the constraints. Many program synthesis engines based on SMT solvers exist, e.g., Sketch (Solar-Lezama, 2008) and Brahma (Gulwani et al., 2011). They convert the semantics of a DSL into a set of constraints between variables representing the program and the input-output values, and then call an SMT solver to find a satisfying setting of the program variables. This approach shines when special-purpose reasoning can be leveraged, but complex DSLs can lead to very large constraint problems where constructing and manipulating the constraints can be a lot slower than an enumerative approach.
40
+
41
+ Finally, stochastic local search can be employed to search over program space, and there is a long history of applying genetic algorithms to this problem. One of the most successful recent examples is the STOKE super-optimization system (Schkufza et al., 2016), which uses stochastic local search to find assembly programs that have the same semantics as an input program but execute faster.
42
+
43
+ Ranking. While we focus on the search problem in this work, we briefly mention the ranking problem here. A popular choice for ranking is to choose the shortest program consistent with inputoutput examples (Gulwani, 2016). A more sophisticated approach is employed by FlashFill (Singh & Gulwani, 2015). It works in a manner similar to max-margin structured prediction, where known ground truth programs are given, and the learning task is to assign scores to programs such that the ground truth programs score higher than other programs that satisfy the input-output specification.
44
+
45
+ # 3 LEARNING INDUCTIVE PROGRAM SYNTHESIS (LIPS)
46
+
47
+ In this section we outline the general approach that we follow in this work, which we call Learning Inductive Program Synthesis (LIPS). The details of our instantiation of LIPS appear in Sect. 4. The components of LIPS are (1) a DSL specification, (2) a data-generation procedure, (3) a machine learning model that maps from input-output examples to program attributes, and (4) a search procedure that searches program space in an order guided by the model from (3). The framework is related to the formulation of Menon et al. (2013); the relationship and key differences are discussed in Sect. 6.
48
+
49
+ (1) DSL and Attributes. The choice of DSL is important in LIPS, just as it is in any program synthesis system. It should be expressive enough to capture the problems that we wish to solve, but restricted as much as possible to limit the difficulty of the search. In LIPS we additionally specify an attribute function $\mathcal { A }$ that maps programs $P$ of the DSL to finite attribute vectors $\mathbf { \boldsymbol { a } } \overset { \cdot } { = } \mathbf { \bar { A } } ( \mathbf { \boldsymbol { P } } )$ . (Attribute vectors of different programs need not have equal length.) Attributes serve as the link between the machine learning and the search component of LIPS: the machine learning model predicts a distribution $q ( \pmb { a } \mid \mathcal { E } )$ , where $\mathcal { E }$ is the set of input-output examples, and the search procedure aims to search over programs $P$ as ordered by $q ( { \bar { \mathcal { A } } } ( { \bar { P } } ) \mid \varepsilon )$ . Thus an attribute is useful if it is both predictable from input-output examples, and if conditioning on its value significantly reduces the effective size of the search space.
50
+
51
+ Possible attributes are the (perhaps position-dependent) presence or absence of high-level functions (e.g., does the program contain or end in a call to SORT). Other possible attributes include control flow templates (e.g., the number of loops and conditionals). In the extreme case, one may set $\mathcal { A }$ to the identity function, in which case the attribute is equivalent to the program; however, in our experiments we find that performance is improved by choosing a more abstract attribute function.
52
+
53
+ (2) Data Generation. Step 2 is to generate a dataset $( ( P ^ { ( n ) } , \pmb { a } ^ { ( n ) } , \pmb { \mathcal { E } } ^ { ( n ) } ) ) _ { n = 1 } ^ { N }$ of programs $P ^ { ( n ) }$ in the chosen DSL, their attributes $\mathbf { \pmb { a } } ^ { ( n ) }$ , and accompanying input-output examples ${ \mathcal { E } } ^ { ( n ) }$ . Different approaches are possible, ranging from enumerating valid programs in the DSL and pruning, to training a more sophisticated generative model of programs in the DSL. The key in the LIPS formulation is to ensure that it is feasible to generate a large dataset (ideally millions of programs).
54
+
55
+ (3) Machine Learning Model. The machine learning problem is to learn a distribution of attributes given input-output examples, $q ( \pmb { a } \mid \mathcal { E } )$ . There is freedom to explore a large space of models, so long as the input component can encode $\mathcal { E }$ , and the output is a proper distribution over attributes (e.g., if attributes are a fixed-size binary vector, then a neural network with independent sigmoid outputs is appropriate; if attributes are variable size, then a recurrent neural network output could be used). Attributes are observed at training time, so training can use a maximum likelihood objective.
56
+
57
+ (4) Search. The aim of the search component is to interface with an existing solver, using the predicted $q ( \pmb { a } \mid \mathcal { E } )$ to guide the search. We describe specific approaches in the next section.
58
+
59
+ # 4 DEEPCODER
60
+
61
+ Here we describe DeepCoder, our instantiation of LIPS including a choice of DSL, a data generation strategy, models for encoding input-output sets, and algorithms for searching over program space.
62
+
63
+ # 4.1 DOMAIN SPECIFIC LANGUAGE AND ATTRIBUTES
64
+
65
+ We consider binary attributes indicating the presence or absence of high-level functions in the target program. To make this effective, the chosen DSL needs to contain constructs that are not so low-level that they all appear in the vast majority of programs, but at the same time should be common enough so that predicting their occurrence from input-output examples can be learned successfully.
66
+
67
+ Following this observation, our DSL is loosely inspired by query languages such as SQL or LINQ, where high-level functions are used in sequence to manipulate data. A program in our DSL is a sequence of function calls, where the result of each call initializes a fresh variable that is either a singleton integer or an integer array. Functions can be applied to any of the inputs or previously computed (intermediate) variables. The output of the program is the return value of the last function call, i.e., the last variable. See Fig. 1 for an example program of length $T = 4$ in our DSL.
68
+
69
+ ![](images/95255e32da9df33db9a517e94978033a462b93ebbbe24b571c4b80d5e2c7f8e6.jpg)
70
+ Figure 1: An example program in our DSL that takes a single integer array as its input.
71
+
72
+ Overall, our DSL contains the first-order functions HEAD, LAST, TAKE, DROP, ACCESS, MINIMUM, MAXIMUM, REVERSE, SORT, SUM, and the higher-order functions MAP, FILTER, COUNT, ZIPWITH, SCANL1. Higher-order functions require suitable lambda functions for their behavior to be fully specified: for MAP our DSL provides lambdas $( + 1 )$ , $( - 1 )$ , $( \star 2 )$ , $( / 2 )$ ), $( \star \ ( - 1 ) \ )$ ), $( \star \star 2 )$ , $( \star 3 )$ , $( / 3 )$ , $( \star 4 )$ , $( / 4 )$ ; for FILTER and COUNT there are predicates $( > 0 )$ ), $( < 0 )$ , ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 0$ ), ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 1$ ) and for ZIPWITH and SCANL1 the DSL provides lambdas $( + ) , ( - ) , ( \star ) ,$ MIN, MAX. A description of the semantics of all functions is provided in Appendix F.
73
+
74
+ Note that while the language only allows linear control flow, many of its functions do perform branching and looping internally (e.g., SORT, COUNT, ...). Examples of more sophisticated programs expressible in our DSL, which were inspired by the simplest problems appearing on programming competition websites, are shown in Appendix A.
75
+
76
+ # 4.2 DATA GENERATION
77
+
78
+ To generate a dataset, we enumerate programs in the DSL, heuristically pruning away those with easily detectable issues such as a redundant variable whose value does not affect the program output, or, more generally, existence of a shorter equivalent program (equivalence can be overapproximated by identical behavior on randomly or carefully chosen inputs). To generate valid inputs for a program, we enforce a constraint on the output value bounding integers to some predetermined range, and then propagate these constraints backward through the program to obtain a range of valid values for each input. If one of these ranges is empty, we discard the program. Otherwise, input-output pairs can be generated by picking inputs from the pre-computed valid ranges and executing the program to obtain the output values. The binary attribute vectors are easily computed from the program source codes.
79
+
80
+ # 4.3 MACHINE LEARNING MODEL
81
+
82
+ Observe how the input-output data in Fig. 1 is informative of the functions appearing in the program: the values in the output are all negative, divisible by 4, they are sorted in decreasing order, and they happen to be multiples of numbers appearing in the input. Our aim is to learn to recognize such patterns in the input-output examples, and to leverage them to predict the presence or absence of individual functions. We employ neural networks to model and learn the mapping from input-output examples to attributes. We can think of these networks as consisting of two parts:
83
+
84
+ 1. an encoder: a differentiable mapping from a set of $M$ input-output examples generated by a single program to a latent real-valued vector, and 2. a decoder: a differentiable mapping from the latent vector representing a set of $M$ inputoutput examples to predictions of the ground truth program’s attributes.
85
+
86
+ For the encoder we use a simple feed-forward architecture. First, we represent the input and output types (singleton or array) by a one-hot-encoding, and we pad the inputs and outputs to a maximum length $L$ with a special NULL value. Second, each integer in the inputs and in the output is mapped to a learned embedding vector of size $E = 2 0$ . (The range of integers is restricted to a finite range and each embedding is parametrized individually.) Third, for each input-output example separately, we concatenate the embeddings of the input types, the inputs, the output type, and the output into a single (fixed-length) vector, and pass this vector through $H = 3$ hidden layers containing $K = 2 5 6$ sigmoid units each. The third hidden layer thus provides an encoding of each individual input-output example. Finally, for input-output examples in a set generated from the same program, we pool these representations together by simple arithmetic averaging. See Appendix C for more details.
87
+
88
+ The advantage of this encoder lies in its simplicity, and we found it reasonably easy to train. A disadvantage is that it requires an upper bound $L$ on the length of arrays appearing in the input and output. We confirmed that the chosen encoder architecture is sensible in that it performs empirically at least as well as an RNN encoder, a natural baseline, which may however be more difficult to train.
89
+
90
+ DeepCoder learns to predict presence or absence of individual functions of the DSL. We shall see this can already be exploited by various search techniques to large computational gains. We use a decoder that pre-multiplies the encoding of input-output examples by a learned $C \times K$ matrix, where $C = 3 4$ is the number of functions in our DSL (higher-order functions and lambdas are predicted independently), and treats the resulting $C$ numbers as log-unnormalized probabilities (logits) of each function appearing in the source code. Fig. 2 shows the predictions a trained neural network made from 5 input-output examples for the program shown in Fig. 1.
91
+
92
+ ![](images/c3c080b2a8813d24f061fe69fe44372e58ba574c230d52185f026a848a7215ca.jpg)
93
+ Figure 2: Neural network predicts the probability of each function appearing in the source code.
94
+
95
+ # 4.4 SEARCH
96
+
97
+ One of the central ideas of this work is to use a neural network to guide the search for a program consistent with a set of input-output examples instead of directly predicting the entire source code. This section briefly describes the search techniques and how they integrate the predicted attributes.
98
+
99
+ Depth-first search (DFS). We use an optimized version of DFS to search over programs with a given maximum length $T$ (see Appendix D for details). When the search procedure extends a partial program by a new function, it has to try the functions in the DSL in some order. At this point DFS can opt to consider the functions as ordered by their predicted probabilities from the neural network.
100
+
101
+ “Sort and add” enumeration. A stronger way of utilizing the predicted probabilities of functions in an enumerative search procedure is to use a Sort and add scheme, which maintains a set of active functions and performs DFS with the active function set only. Whenever the search fails, the next most probable function (or several) are added to the active set and the search restarts with this larger active set. Note that this scheme has the deficiency of potentially re-exploring some parts of the search space several times, which could be avoided by a more sophisticated search procedure.
102
+
103
+ Sketch. Sketch (Solar-Lezama, 2008) is a successful SMT-based program synthesis tool from the programming languages research community. While its main use case is to synthesize programs by filling in “holes” in incomplete source code so as to match specified requirements, it is flexible enough for our use case as well. The function in each step and its arguments can be treated as the “holes”, and the requirement to be satisfied is consistency with the provided set of input-output examples. Sketch can utilize the neural network predictions in a Sort and add scheme as described above, as the possibilities for each function hole can be restricted to the current active set.
104
+
105
+ $\lambda ^ { 2 }$ . $\lambda ^ { 2 }$ (Feser et al., 2015) is a program synthesis tool from the programming languages community that combines enumerative search with deduction to prune the search space. It is designed to infer small functional programs for data structure manipulation from input-output examples, by combining functions from a provided library. $\lambda ^ { 2 }$ can be used in our framework using a Sort and add scheme as described above by choosing the library of functions according to the neural network predictions.
106
+
107
+ # 4.5 TRAINING LOSS FUNCTION
108
+
109
+ We use the negative cross entropy loss to train the neural network described in Sect. 4.3, so that its predictions about each function can be interpreted as marginal probabilities. The LIPS framework dictates learning $q ( \pmb { a } \mid \mathcal { E } )$ , the joint distribution of all attributes $\textbf { \em a }$ given the input-output examples, and it is not clear a priori how much DeepCoder loses by ignoring correlations between functions. However, under the simplifying assumption that the runtime of searching for a program of length $T$ with $C$ functions made available to a search routine is proportional to $\check { C } ^ { T }$ , the following result for Sort and add procedures shows that their runtime can be optimized using marginal probabilities.
110
+
111
+ Lemma 1. For any fixed program length $T$ , the expected total runtime of a Sort and add search scheme can be upper bounded by a quantity that is minimized by adding the functions in the order of decreasing true marginal probabilities.
112
+
113
+ Proof. Predicting source code functions from input-output examples can be seen as a multi-label classification problem, where each set of input-output examples is associated with a set of relevant labels (functions appearing in the ground truth source code). Dembczynski et al. (2010) showed that in multi-label classification under a so-called Rank loss, it is Bayes optimal to rank the labels according to their marginal probabilities. If the runtime of search with $C$ functions is proportional to $C ^ { T }$ , the total runtime of a Sort and add procedure can be monotonically transformed so that it is upper bounded by this Rank loss. See Appendix E for more details. □
114
+
115
+ # 5 EXPERIMENTS
116
+
117
+ In this section we report results from two categories of experiments. Our main experiments (Sect. 5.1) show that the LIPS framework can lead to significant performance gains in solving IPS by demonstrating such gains with DeepCoder. In Sect. 5.2 we illustrate the robustness of the method by demonstrating a strong kind of generalization ability across programs of different lengths.
118
+
119
+ # 5.1 DEEPCODER COMPARED TO BASELINES
120
+
121
+ We trained a neural network as described in Sect. 4.3 to predict used functions from input-output examples and constructed a test set of $P = 5 0 0$ programs, guaranteed to be semantically disjoint from all programs on which the neural network was trained (similarly to the equivalence check described in Sect. 4.2, we have ensured that all test programs behave differently from all programs used during training on at least one input). For each test program we generated $M = 5$ input-output examples involving integers of magnitudes up to 256, passed the examples to the trained neural network, and fed the obtained predictions to the search procedures from Sect. 4.4. We also considered a RNN-based decoder generating programs using beam search (see Sect. 5.3 for details). To evaluate DeepCoder, we then recorded the time the search procedures needed to find a program consistent with the $M$ input-output examples. As a baseline, we also ran all search procedures using a simple prior as function probabilities, computed from their global incidence in the program corpus.
122
+
123
+ In the first, smaller-scale experiment (program search space size $\sim 2 \times 1 0 ^ { 6 }$ ) we trained the neural network on programs of length $T = 3$ , and the test programs were of the same length. Table 1 shows the per-task timeout required such that a solution could be found for given proportions of the test tasks (in time less than or equal to the timeout). For example, in a hypothetical test set with 4 tasks and runtimes of 3s, 2s, 1s, 4s, the timeout required to solve $50 \%$ of tasks would be 2s. More detailed experimental results are discussed in Appendix B.
124
+
125
+ Table 1: Search speedups on programs of length $T = 3$ due to using neural network predictions.
126
+
127
+ <table><tr><td rowspan="2">Timeout needed to solve</td><td colspan="3">DFS</td><td colspan="3">Enumeration</td><td colspan="3">12</td><td colspan="2">Sketch</td><td>Beam</td></tr><tr><td>20%</td><td>40%</td><td>60%</td><td>20%</td><td>40%</td><td>60%</td><td>20%</td><td>40%</td><td>60%</td><td>20%</td><td>40%</td><td>20%</td></tr><tr><td>Baseline</td><td>41ms</td><td>126ms</td><td>314ms</td><td>80ms</td><td>:335ms861ms</td><td></td><td>18.9s</td><td>49.6s 84.2s</td><td></td><td>&gt;103s</td><td>&gt;103s</td><td>&gt;103s</td></tr><tr><td>DeepCoder</td><td>2.7ms</td><td>33ms</td><td>110ms</td><td>1.3ms</td><td>6.1ms</td><td>27ms</td><td>0.23s</td><td>0.52s 13.5s</td><td></td><td>2.13s</td><td>455s</td><td>292s</td></tr><tr><td>Speedup</td><td>15.2×</td><td>3.9×</td><td>2.9×</td><td>62.2×</td><td>54.6×</td><td>31.5×</td><td>80.4×</td><td>94.6×</td><td>6.2×</td><td>&gt;467×</td><td>&gt;2.2×</td><td>&gt;3.4×</td></tr></table>
128
+
129
+ In the main experiment, we tackled a large-scale problem of searching for programs consistent with input-output examples generated from programs of length $T = 5$ (search space size on the order of $1 0 ^ { \overline { { 1 0 } } }$ ), supported by a neural network trained with programs of shorter length $T = 4$ . Here, we only consider $P = 1 0 0$ programs for reasons of computational efficiency, after having verified that this does not significantly affect the results in Table 1. The table in Fig. 3a shows significant speedups for DFS, Sort and add enumeration, and $\lambda ^ { 2 }$ with Sort and add enumeration, the search techniques capable of solving the search problem in reasonable time frames. Note that Sort and add enumeration without the neural network (using prior probabilities of functions) exceeded the $1 0 ^ { 4 }$ second timeout in two cases, so the relative speedups shown are crude lower bounds.
130
+
131
+ ![](images/a7cd9438bdca3d6b3e822af385015998ac105636d940628b2f68f443f81b05e3.jpg)
132
+ Figure 3: Search speedups on programs of length $T = 5$ and influence of length of training programs.
133
+
134
+ We hypothesize that the substantially larger performance gains on Sort and add schemes as compared to gains on DFS can be explained by the fact that the choice of attribute function (predicting presence of functions anywhere in the program) and learning objective of the neural network are better matched to the Sort and add schemes. Indeed, a more appropriate attribute function for DFS would be one that is more informative of the functions appearing early in the program, since exploring an incorrect first function is costly with DFS. On the other hand, the discussion in Sect. 4.5 provides theoretical indication that ignoring the correlations between functions is not cataclysmic for Sort and add enumeration, since a Rank loss that upper bounds the Sort and add runtime can still be minimized.
135
+
136
+ In Appendix G we analyse the performance of the neural networks used in these experiments, by investigating which attributes (program instructions) tend to be difficult to distinguish from each other.
137
+
138
+ # 5.2 GENERALIZATION ACROSS PROGRAM LENGTHS
139
+
140
+ To investigate the encoder’s generalization ability across programs of different lengths, we trained a network to predict used functions from input-output examples that were generated from programs of length $T _ { \mathrm { t r a i n } } \in \{ 1 , . . . , 4 \}$ . We then used each of these networks to predict functions on 5 test sets containing input-output examples generated from programs of lengths $T _ { \mathrm { t e s t } } \in \{ 1 , . . . , 5 \}$ , respectively. The test programs of a given length $T$ were semantically disjoint from all training programs of the same length $T$ and also from all training and test programs of shorter lengths $T ^ { \prime } < T$ .
141
+
142
+ For each of the combinations of $T _ { \mathrm { t r a i n } }$ and $T _ { \mathrm { t e s t } }$ , Sort and add enumerative search was run both with and without using the neural network’s predictions (in the latter case using prior probabilities) until it solved $2 0 \%$ of the test set tasks. Fig. 3b shows the relative speedup of the solver having access to predictions from the trained neural networks. These results indicate that the neural networks are able to generalize beyond programs of the same length that they were trained on. This is partly due to the search procedure on top of their predictions, which has the opportunity to correct for the presence of functions that the neural network failed to predict. Note that a sequence-to-sequence model trained on programs of a fixed length could not be expected to exhibit this kind of generalization ability.
143
+
144
+ # 5.3 ALTERNATIVE MODELS
145
+
146
+ Encoder We evaluated replacing the feed-forward architecture encoder (Sect. 4.3) with an RNN, a natural baseline. Using a GRU-based RNN we were able to achieve results almost as good as using the feed-forward architecture, but found the RNN encoder more difficult to train.
147
+
148
+ Decoder We also considered a purely neural network-based approach, where an RNN decoder is trained to predict the entire program token-by-token. We combined this with our feed-forward encoder by initializing the RNN using the pooled final layer of the encoder. We found it substantially more difficult to train an RNN decoder as compared to the independent binary classifiers employed above. Beam search was used to explore likely programs predicted by the RNN, but it only lead to a solution comparable with the other techniques when searching for programs of lengths $T \le 2$ , where the search space size is very small (on the order of $1 0 ^ { 3 }$ ). Note that using an RNN for both the encoder and decoder corresponds to a standard sequence-to-sequence model. However, we do do not rule out that a more sophisticated RNN decoder or training procedure could be possibly more successful.
149
+
150
+ # 6 RELATED WORK
151
+
152
+ Machine Learning for Inductive Program Synthesis. There is relatively little work on using machine learning for programming by example. The most closely related work is that of Menon et al. (2013), in which a hand-coded set of features of input-output examples are used as “clues.” When a clue appears in the input-output examples (e.g., the output is a permutation of the input), it reweights the probabilities of productions in a probabilistic context free grammar by a learned amount. This work shares the idea of learning to guide the search over program space conditional on input-output examples. One difference is in the domains. Menon et al. (2013) operate on short string manipulation programs, where it is arguably easier to hand-code features to recognize patterns in the input-output examples (e.g., if the outputs are always permutations or substrings of the input). Our work shows that there are strong cues in patterns in input-output examples in the domain of numbers and lists. However, the main difference is the scale. Menon et al. (2013) learns from a small (280 examples), manually-constructed dataset, which limits the capacity of the machine learning model that can be trained. Thus, it forces the machine learning component to be relatively simple. Indeed, Menon et al. (2013) use a log-linear model and rely on hand-constructed features. LIPS automatically generates training data, which yields datasets with millions of programs and enables high-capacity deep learning models to be brought to bear on the problem.
153
+
154
+ Learning Representations of Program State. Piech et al. (2015) propose to learn joint embeddings of program states and programs to automatically extend teacher feedback to many similar programs in the MOOC setting. This work is similar in that it considers embedding program states, but the domain is different, and it otherwise specifically focuses on syntactic differences between semantically equivalent programs to provide stylistic feedback. Li et al. (2016) use graph neural networks (GNNs) to predict logical descriptions from program states, focusing on data structure shapes instead of numerical and list data. Such GNNs may be a suitable architecture to encode states appearing when extending our DSL to handle more complex data structures.
155
+
156
+ Learning to Infer. Very recently, Alemi et al. (2016) used neural sequence models in tandem with an automated theorem prover. Similar to our Sort and Add strategy, a neural network component is trained to select premises that the theorem prover can use to prove a theorem. A recent extension (Loos et al., 2017) is similar to our DFS enumeration strategy and uses a neural network to guide the proof search at intermediate steps. The main differences are in the domains, and that they train on an existing corpus of theorems. More broadly, if we view a DSL as defining a model and search as a form of inference algorithm, then there is a large body of work on using discriminatively-trained models to aid inference in generative models. Examples include Dayan et al. (1995); Kingma & Welling (2014); Shotton et al. (2013); Stuhlmuller et al. (2013); Heess et al. (2013); Jampani et al. ¨ (2015).
157
+
158
+ # 7 DISCUSSION AND FUTURE WORK
159
+
160
+ We have presented a framework for improving IPS systems by using neural networks to translate cues in input-output examples to guidance over where to search in program space. Our empirical results show that for many programs, this technique improves the runtime of a wide range of IPS baselines by 1-3 orders. We have found several problems in real online programming challenges that can be solved with a program in our language, which validates the relevance of the class of problems that we have studied in this work. In sum, this suggests that we have made significant progress towards being able to solve programming competition problems, and the machine learning component plays an important role in making it tractable.
161
+
162
+ There remain some limitations, however. First, the programs we can synthesize are only the simplest problems on programming competition websites and are simpler than most competition problems. Many problems require more complex algorithmic solutions like dynamic programming and search, which are currently beyond our reach. Our chosen DSL currently cannot express solutions to many problems. To do so, it would need to be extended by adding more primitives and allow for more flexibility in program constructs (such as allowing loops). Second, we currently use five input-output examples with relatively large integer values (up to 256 in magnitude), which are probably more informative than typical (smaller) examples. While we remain optimistic about LIPS’s applicability as the DSL becomes more complex and the input-output examples become less informative, it remains to be seen what the magnitude of these effects are as we move towards solving large subsets of programming competition problems.
163
+
164
+ We foresee many extensions of DeepCoder. We are most interested in better data generation procedures by using generative models of source code, and to incorporate natural language problem descriptions to lessen the information burden required from input-output examples. In sum, DeepCoder represents a promising direction forward, and we are optimistic about the future prospects of using machine learning to synthesize programs.
165
+
166
+ # ACKNOWLEDGMENTS
167
+
168
+ The authors would like to express their gratitude to Rishabh Singh and Jack Feser for their valuable guidance and help on using the Sketch and $\lambda ^ { 2 }$ program synthesis systems.
169
+
170
+ # REFERENCES
171
+
172
+ Alex A. Alemi, Franc¸ois Chollet, Geoffrey Irving, Christian Szegedy, and Josef Urban. DeepMath - deep sequence models for premise selection. In Proocedings of the 29th Conference on Advances in Neural Information Processing Systems (NIPS), 2016.
173
+ Rudy R Bunel, Alban Desmaison, Pawan K Mudigonda, Pushmeet Kohli, and Philip Torr. Adaptive neural compilation. In Proceedings of the 29th Conference on Advances in Neural Information Processing Systems (NIPS), 2016.
174
+ Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The Helmholtz machine. Neural computation, 7(5):889–904, 1995.
175
+ Krzysztof Dembczynski, Willem Waegeman, Weiwei Cheng, and Eyke H ´ ullermeier. On label de- ¨ pendence and loss minimization in multi-label classification. Machine Learning, 88(1):5–45, 2012.
176
+ Krzysztof J. Dembczynski, Weiwei Cheng, and Eyke Hllermeier. Bayes optimal multilabel classification via probabilistic classifier chains. In Proceedings of the 27th International Conference on Machine Learning (ICML), 2010.
177
+ John K. Feser, Swarat Chaudhuri, and Isil Dillig. Synthesizing data structure transformations from input-output examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2015.
178
+ Alexander L. Gaunt, Marc Brockschmidt, Rishabh Singh, Nate Kushman, Pushmeet Kohli, Jonathan Taylor, and Daniel Tarlow. Terpret: A probabilistic programming language for program induction. CoRR, abs/1608.04428, 2016. URL http://arxiv.org/abs/1608.04428.
179
+
180
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural Turing machines. CoRR, abs/1410.5401, 2014. URL http://arxiv.org/abs/1410.5401.
181
+
182
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 2016.
183
+
184
+ Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Proceedings of the 28th Conference on Advances in Neural Information Processing Systems (NIPS), 2015.
185
+
186
+ Sumit Gulwani. Programming by examples: Applications, algorithms, and ambiguity resolution. In Proceedings of the 8th International Joint Conference on Automated Reasoning (IJCAR), 2016.
187
+
188
+ Sumit Gulwani, Susmit Jha, Ashish Tiwari, and Ramarathnam Venkatesan. Synthesis of loop-free programs. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011.
189
+
190
+ Nicolas Heess, Daniel Tarlow, and John Winn. Learning to pass expectation propagation messages. In Proceedings of the 26th Conference on Advances in Neural Information Processing Systems (NIPS), 2013.
191
+
192
+ Varun Jampani, Sebastian Nowozin, Matthew Loper, and Peter V Gehler. The informed sampler: A discriminative approach to Bayesian inference in generative computer vision models. Computer Vision and Image Understanding, 136:32–44, 2015.
193
+
194
+ Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Proceedings of the 28th Conference on Advances in Neural Information Processing Systems (NIPS), 2015.
195
+
196
+ Łukasz Kaiser and Ilya Sutskever. Neural GPUs learn algorithms. In Proceedings of the 4th International Conference on Learning Representations, 2016.
197
+
198
+ Diederik P Kingma and Max Welling. Stochastic gradient VB and the variational auto-encoder. In Proceedings of the 2nd International Conference on Learning Representations (ICLR), 2014.
199
+
200
+ Karol Kurach, Marcin Andrychowicz, and Ilya Sutskever. Neural random-access machines. In Proceedings of the 4th International Conference on Learning Representations 2016, 2015.
201
+
202
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard S. Zemel. Gated graph sequence neural networks. In Proceedings of the 4th International Conference on Learning Representations (ICLR), 2016.
203
+
204
+ Wang Ling, Edward Grefenstette, Karl Moritz Hermann, Toma´s Ko ˇ cisk ˇ y, Andrew Senior, Fumin ´ Wang, and Phil Blunsom. Latent predictor networks for code generation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, 2016.
205
+
206
+ Sarah M. Loos, Geoffrey Irving, Christian Szegedy, and Cezary Kaliszyk. Deep network guided proof search. CoRR, abs/1701.06972, 2017. URL http://arxiv.org/abs/1701.06972.
207
+
208
+ Aditya Krishna Menon, Omer Tamuz, Sumit Gulwani, Butler W Lampson, and Adam Kalai. A machine learning framework for programming by example. In Proceedings of the International Conference on Machine Learning (ICML), 2013.
209
+
210
+ Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. In Proceedings of the 4th International Conference on Learning Representations (ICLR), 2016.
211
+
212
+ Chris Piech, Jonathan Huang, Andy Nguyen, Mike Phulsuksombati, Mehran Sahami, and Leonidas J. Guibas. Learning program embeddings to propagate feedback on student code. In Proceedings of the 32nd International Conference on Machine Learning (ICML), 2015.
213
+
214
+ Oleksandr Polozov and Sumit Gulwani. FlashMeta: a framework for inductive program synthesis. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2015.
215
+
216
+ Scott E. Reed and Nando de Freitas. Neural programmer-interpreters. In Proceedings of the 4th International Conference on Learning Representations (ICLR), 2016.
217
+
218
+ Sebastian Riedel, Matko Bosnjak, and Tim Rocktaschel. Programming with a differentiable forth ¨ interpreter. CoRR, abs/1605.06640, 2016. URL http://arxiv.org/abs/1605.06640.
219
+
220
+ Eric Schkufza, Rahul Sharma, and Alex Aiken. Stochastic program optimization. Commununications of the ACM, 59(2):114–122, 2016.
221
+
222
+ Jamie Shotton, Toby Sharp, Alex Kipman, Andrew Fitzgibbon, Mark Finocchio, Andrew Blake, Mat Cook, and Richard Moore. Real-time human pose recognition in parts from single depth images. Communications of the ACM, 56(1):116–124, 2013.
223
+
224
+ Rishabh Singh and Sumit Gulwani. Predicting a correct program in programming by example. In Proceedings of the 27th Conference on Computer Aided Verification (CAV), 2015.
225
+
226
+ Armando Solar-Lezama. Program Synthesis By Sketching. PhD thesis, EECS Dept., UC Berkeley, 2008.
227
+
228
+ Andreas Stuhlmuller, Jessica Taylor, and Noah D. Goodman. Learning stochastic inverses. In ¨ Proceedings of the 26th Conference on Advances in Neural Information Processing Systems (NIPS), 2013.
229
+
230
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In Proceedings of the 28th Conference on Advances in Neural Information Processing Systems (NIPS), 2015.
231
+
232
+ Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2015.
233
+
234
+ Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. In Proceedings of the 33nd International Conference on Machine Learning (ICML), 2016.
235
+
236
+ # A EXAMPLE PROGRAMS
237
+
238
+ This section shows example programs in our Domain Specific Language (DSL), together with inputoutput examples and short descriptions. These programs have been inspired by simple tasks appearing on real programming competition websites, and are meant to illustrate the expressive power of our DSL.
239
+
240
+ # Program 0:
241
+
242
+ $\mathrm { k } $ int b ← [int] c ← SORT b d ← TAKE k c e ← SUM d
243
+
244
+ Input-output example:
245
+ Input:
246
+ 2, [3 5 4 7 5]
247
+ Output:
248
+ [7]
249
+
250
+ Description:
251
+
252
+ A new shop near you is selling $n$ paintings. You have $k \ < \ n$ friends and you would like to buy each of your friends a painting from the shop. Return the minimal amount of money you will need to spend.
253
+
254
+ # Program 1:
255
+
256
+ $\bar { w } $ [int]
257
+ t ← [int]
258
+ c ← MAP (\*3) w
259
+ d ← ZIPWITH (+) c t
260
+ e ← MAXIMUM d
261
+ Input-output example:
262
+ Input:
263
+ [6 2 4 7 9],
264
+ [5 3 6 1 0]
265
+ Output:
266
+ 27
267
+
268
+ Description:
269
+
270
+ In soccer leagues, match winners are awarded 3 points, losers 0 points, and both teams get 1 point in the case of a tie. Compute the number of points awarded to the winner of a league given two arrays $w , t$ of the same length, where $w [ i ]$ (resp. $t [ i ] ,$ ) is the number of times team $i$ won (resp. tied).
271
+
272
+ # Program 2:
273
+
274
+ a ← [int]
275
+ b ← [int]
276
+ c ← ZIPWITH (-) b a $\mathsf { d } \gets \mathbf { C o u v r } \mathsf { T }$ $( > 0 )$ ) c
277
+
278
+ # Input-output example:
279
+
280
+ Input:
281
+ [6 2 4 7 9],
282
+ [5 3 2 1 0]
283
+ Output:
284
+ 4
285
+
286
+ Description:
287
+
288
+ Alice and Bob are comparing their results in a recent exam. Given their marks per question as two arrays $a$ and $b$ , count on how many questions Alice got more points than Bob.
289
+
290
+ # Program 3:
291
+
292
+ h ← [int]
293
+ b ← SCANL1 MIN h
294
+ c ← ZIPWITH (-) h b $\mathrm { ~ d ~ } $ FILTER $( > 0 )$ ) c
295
+ $\mathrm { ~ e ~ } { \gets } \mathbf { S } \mathbf { U } \mathbf { M } \mathrm { ~ d ~ }$
296
+ Input-output example:
297
+ Input:
298
+ [8 5 7 2 5]
299
+ Output:
300
+ 5
301
+
302
+ Description:
303
+
304
+ Perditia is very peculiar about her garden and wants that the trees standing in a row are all of non-increasing heights. Given the tree heights in centimeters in order of the row as an array h, compute how many centimeters she needs to trim the trees in total.
305
+
306
+ # Program 4:
307
+
308
+ x ← [int]
309
+ y ← [int]
310
+ $\mathbf { \boldsymbol { \mathrm { c } } } \gets \mathbf { \boldsymbol { S } } \mathbf { \boldsymbol { O } } \mathbf { R } \mathbf { \boldsymbol { T } } \ \mathbf { \boldsymbol { x } }$
311
+ d ← SORT y
312
+ e ← REVERSE d
313
+ f ← ZIPWITH (\*) d e
314
+ $\mathsf { g } \gets \mathsf { S U M } \mathrm { ~ f ~ }$
315
+ Input-output example:
316
+ Input:
317
+ [7 3 8 2 5],
318
+ [2 8 9 1 3]
319
+ Output:
320
+ 79
321
+
322
+ Description:
323
+
324
+ Xavier and Yasmine are laying sticks to form non-overlapping rectangles on the ground. They both have fixed sets of pairs of sticks of certain lengths (represented as arrays x and y of numbers). Xavier only lays sticks parallel to the x axis, and Yasmine lays sticks only parallel to y axis. Compute the area their rectangles will cover at least.
325
+
326
+ Program 5:
327
+ $\ a \gets$ [int]
328
+ $\ u \text b \gets$ REVERSE a
329
+ $\subset $ ZIPWITH MIN a b
330
+ Input-output example:
331
+ Input:
332
+ [3 7 5 2 8]
333
+ Output:
334
+ [3 2 5 2 3]
335
+
336
+ # Description:
337
+
338
+ A sequence called Billy is looking into the mirror, wondering how much weight it could lose by replacing any of its elements by their mirror images. Given a description of Billy as an array $b$ of length $n$ , return an array $c$ of minimal sum where each element $c [ i ]$ is either $b [ i ]$ or its mirror image $b [ n - i - 1 ]$ .
339
+
340
+ <table><tr><td colspan="2"></td></tr><tr><td>Program 6: IO example: t←[int] Input: p←[int] [4 8 11 2], C←MAP(-1)t [2341] d←MAP(-1)p Output: e ←ZIPWITH(+)c d 1 f←MINIMUMe</td><td>Description: Umberto has a large collection of ties and match- ing pocket squares—too large, his wife says—and he needs to sell one pair. Given their values as arrays t and p,assuming that he sells the cheapest pair, and selling costs 2,how much will he lose from the sale?</td></tr><tr><td>Program 7: IO example: s←[int] Input: p←[int] [4723], C ← SCANL1(+)p [2131] d ←ZIPWITH(*)S C Output: e←SUMd 62</td><td>Description: Zack always promised his n friends to buy them candy, but never did. Now he won the lottery and counts how often and how much candy he promised to his friends,obtaining arrays p (num- ber of promises) and s (number of promised sweets). He announces that to repay them,he will buy s[1]+s[2]+...+s[n] pieces of candy for the firstp[1]days,thens[2]+s[3]+...+s[n]for p[2] days,and so on,until he has fulfilled all promises. How much candy will he buy in total?</td></tr><tr><td>Program 8: IO example: s←[int] Input: b ←REVERSE S [12457] C ←ZIPWITH(-)b s Output: d ←FILTER(&gt;O)C 9 e←SuMd</td><td>Description: Vivian loves rearranging things.Most of all,when she sees a row of heaps, she wants to make sure that each heap has more items than the one to its left. She is also obsessed with efficiency, so always moves the least possible number of items.Her dad really dislikes if she changes the size of heaps,so she only moves single items between them,making sure that the set of sizes of the heaps is the same as at the start; they are only in a different order. When you come in, you see heaps of sizes (of course,sizes strictly monotonically increasing)s[O],s[1],... s[n].What is the maximal number of items that Vivian could have moved?</td></tr></table>
341
+
342
+ ![](images/6d29878119ef08e20bad2e228bb9a4b1140e7a88251e4c13cbe46fb4f2478484.jpg)
343
+ Fig. 4 shows the predictions made by a neural network trained on programs of length $T = 4$ that were ensured to be semantically disjoint from all 9 example programs shown in this section. For each task, the neural network was provided with 5 input-output examples.
344
+ Figure 4: Predictions of a neural network on the 9 example programs described in this section. Numbers in squares would ideally be close to 1 (function is present in the ground truth source code), whereas all other numbers should ideally be close to 0 (function is not needed).
345
+
346
+ # B EXPERIMENTAL RESULTS
347
+
348
+ Results presented in Sect. 5.1 showcased the computational speedups obtained from the LIPS framework (using DeepCoder), as opposed to solving each program synthesis problem with only the information about global incidence of functions in source code available. For completeness, here we show plots of raw computation times of each search procedure to solve a given number of problems.
349
+
350
+ Fig. 5 shows the computation times of DFS, of Enumerative search with a Sort and add scheme, of the $\lambda ^ { 2 }$ and Sketch solvers with a Sort and add scheme, and of Beam search, when searching for a program consistent with input-output examples generated from $P = 5 0 0$ different test programs of length $T = 3$ . As discussed in Sect. 5.1, these test programs were ensured to be semantically disjoint from all programs used to train the neural networks, as well as from all programs of shorter length (as discussed in Sect. 4.2).
351
+
352
+ ![](images/69617f5d9c5e8b7b5a7be3c5b88b0456a2865590e84e41413e9067abe2f41f17.jpg)
353
+ Figure 5: Number of test problems solved versus computation time.
354
+
355
+ The “steps” in the results for Beam search are due to our search strategy, which doubles the size of the considered beam until reaching the timeout (of 1000 seconds) and thus steps occur whenever the search for a beam of size $2 ^ { k }$ is finished. For $\dot { \lambda ^ { 2 } }$ , we observed that no solution for a given set of allowed functions was ever found after about 5 seconds (on the benchmark machines), but that $\lambda ^ { 2 }$ continued to search. Hence, we introduced a hard timeout after 6 seconds for all but the last iterations of our Sort and add scheme.
356
+
357
+ Fig. 6 shows the computation times of DFS, Enumerative search with a Sort and add scheme, and $\lambda ^ { 2 }$ with a Sort and add scheme when searching for programs consistent with input-output examples generated from $P = 1 0 0$ different test programs of length $T = 5$ . The neural network was trained on programs of length $T = 4$ .
358
+
359
+ ![](images/8d83b6177f99db604465ccbe078168c96645752256eb9f14da14c4754aa158fd.jpg)
360
+ Figure 6: Number of test problems solved versus computation time.
361
+
362
+ # C THE NEURAL NETWORK
363
+
364
+ As briefly described in Sect. 4.3, we used the following simple feed-forward architecture encoder:
365
+
366
+ • For each input-output example in the set generated from a single ground truth program:
367
+
368
+ – Pad arrays appearing in the inputs and in the output to a maximum length $L = 2 0$ with a special NULL value.
369
+ – Represent the type (singleton integer or integer array) of each input and of the output using a one-hot-encoding vector. Embed each integer in the valid integer range $( - 2 5 6$ to 255) using a learned embedding into $E = 2 0$ dimensional space. Also learn an embedding for the padding NULL value.
370
+
371
+ – Concatenate the representations of the input types, the embeddings of integers in the inputs, the representation of the output type, and the embeddings of integers in the output into a single (fixed-length) vector. – Pass this vector through $H = 3$ hidden layers containing $K = 2 5 6$ sigmoid units each.
372
+
373
+ • Pool the last hidden layer encodings of each input-output example together by simple arithmetic averaging.
374
+
375
+ Fig. 7 shows a schematic drawing of this encoder architecture, together with the decoder that performs independent binary classification for each function in the DSL, indicating whether or not it appears in the ground truth source code.
376
+
377
+ ![](images/1b4ae4043ae84d4ac119b02713a27cb85173d4a2d0a85116dc32199039ab2623.jpg)
378
+ Figure 7: Schematic representation of our feed-forward encoder, and the decoder.
379
+
380
+ While DeepCoder learns to embed integers into a $E = 2 0$ dimensional space, we built the system up gradually, starting with a $E = 2$ dimensional space and only training on programs of length $T = 1$ . Such a small scale setting allowed easier investigation of the workings of the neural network, and indeed Fig. 8 below shows a learned embedding of integers in $\mathbb { R } ^ { 2 }$ . The figure demonstrates that the network has learnt the concepts of number magnitude, sign (positive or negative) and evenness, presumably due to FILTER $( > 0 )$ , FILTER $( < 0 )$ , FILTER ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 0$ ) and FILTER ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 1$ ) all being among the programs on which the network was trained.
381
+
382
+ # D DEPTH-FIRST SEARCH
383
+
384
+ We use an optimized $\mathrm { C } { + } { + }$ implementation of depth-first search (DFS) to search over programs with a given maximum length $T$ . In depth-first search, we start by choosing the first function (and its arguments) of a potential solution program, and then recursively consider all ways of filling in the rest of the program (up to length $T$ ), before moving on to a next choice of first instruction (if a solution has not yet been found).
385
+
386
+ A program is considered a solution if it is consistent with all $M = 5$ provided input-output examples. Note that this requires evaluating all candidate programs on the $M$ inputs and checking the results for equality with the provided $M$ respective outputs. Our implementation of DFS exploits the sequential structure of programs in our DSL by caching the results of evaluating all prefixes of the currently considered program on the example inputs, thus allowing efficient reuse of computation between candidate programs with common prefixes.
387
+
388
+ This allows us to explore the search space at roughly the speed of $\sim 3 \times 1 0 ^ { 6 }$ programs per second.
389
+
390
+ ![](images/94148f752106bd924a4f80c9c825128a3efe588caf08184e8765377bb5e169db.jpg)
391
+ Figure 8: A learned embedding of integers $\{ - 2 5 6 , - 2 5 5 , \ldots , - 1 , 0 , 1 , \ldots , 2 5 5 \}$ in $\mathbb { R } ^ { 2 }$ . The color intensity corresponds to the magnitude of the embedded integer.
392
+
393
+ When the search procedure extends a partial program by a new function, it has to try the functions in the DSL in some order. At this point DFS can opt to consider the functions as ordered by their predicted probabilities from the neural network. The probability of a function consisting of a higherorder function and a lambda is taken to be the minimum of the probabilities of the two constituent functions.
394
+
395
+ # E TRAINING LOSS FUNCTION
396
+
397
+ In Sect. 4.5 we outlined a justification for using marginal probabilities of individual functions as a sensible intermediate representation to provide a solver employing a Sort and add scheme (we considered Enumerative search and the Sketch solver with this scheme). Here we provide a more detailed discussion.
398
+
399
+ Predicting program components from input-output examples can be cast as a multilabel classification problem, where each instance (set of input-output examples) is associated with a set of relevant labels (functions appearing in the code that generated the examples). We denote the number of labels (functions) by $C$ , and note that throughout this work $C = 3 4$ .
400
+
401
+ When the task is to predict a subset of labels $\mathbf { y } \in \{ 0 , 1 \} ^ { C }$ , different loss functions can be employed to measure the prediction error of a classifier $\mathbf { h } ( \mathbf { x } )$ or ranking function $\mathbf { f } \left( \mathbf { x } \right)$ . Dembczynski et al. (2010) discuss the following three loss functions:
402
+
403
+ • Hamming loss counts the number of labels that are predicted incorrectly by a classifier h:
404
+
405
+ $$
406
+ L _ { H } ( \mathbf { y } , \mathbf { h } ( \mathbf { x } ) ) = \sum _ { c = 1 } ^ { C } \mathbb { 1 } _ { \{ y _ { c } \neq h _ { c } ( \mathbf { x } ) \} }
407
+ $$
408
+
409
+ • Rank loss counts the number of label pairs violating the condition that relevant labels are ranked higher than irrelevant ones by a scoring function f:
410
+
411
+ $$
412
+ L _ { r } ( \mathbf { y } , \mathbf { f } ( \mathbf { x } ) ) = \sum _ { ( i , j ) : y _ { i } = 1 , y _ { j } = 0 } ^ { C } \mathbb { 1 } _ { \{ f _ { i } < f _ { j } \} }
413
+ $$
414
+
415
+ • Subset Zero-One loss indicates whether all labels have been correctly predicted by $\mathbf { h }$ :
416
+
417
+ $$
418
+ L _ { s } ( \mathbf { y } , \mathbf { h } ( \mathbf { x } ) ) = \mathbb { 1 } _ { \{ \mathbf { y } \neq \mathbf { h } ( \mathbf { x } ) \} }
419
+ $$
420
+
421
+ Dembczynski et al. (2010) proved that Bayes optimal decisions under the Hamming and Rank loss functions, i.e., decisions minimizing the expected loss under these loss functions, can be computed from marginal probabilities $p _ { c } ( y _ { c } | \mathbf { x } )$ . This suggests that:
422
+
423
+ • Multilabel classification under these two loss functions may not benefit from considering dependencies between the labels.
424
+ • ”Instead of minimizing the Rank loss directly, one can simply use any approach for single label prediction that properly estimates the marginal probabilities.” (Dembczynski et al., ´ 2012)
425
+
426
+ Training the neural network with the negative cross entropy loss function as the training objective is precisely a method for properly estimating the marginal probabilities of labels (functions appearing in source code). It is thus a sensible step in preparation for making predictions under a Rank loss.
427
+
428
+ It remains to discuss the relationship between the Rank loss and the actual quantity we care about, which is the total runtime of a Sort and add search procedure. Recall the simplifying assumption that the runtime of searching for a program of length $T$ with $C$ functions made available to the search is proportional to $C ^ { T }$ , and consider a Sort and add search for a program of length $T$ , where the size of the active set is increased by 1 whenever the search fails. Starting with an active set of size 1, the total time until a solution is found can be upper bounded by
429
+
430
+ $$
431
+ 1 ^ { T } + 2 ^ { T } + \cdot \cdot \cdot + C _ { A } ^ { T } \leq C _ { A } ^ { T + 1 } \leq C C _ { A } ^ { T }
432
+ $$
433
+
434
+ where $C _ { A }$ is the size of the active set when the search finally succeeds (i.e., when the active set finally contains all necessary functions for a solution to exist). Hence the total runtime of a Sort and add search can be upper bounded by a quantity that is proportional to $C _ { A } ^ { T }$ .
435
+
436
+ Now fix a valid program solution $P$ that requires $C _ { P }$ functions, and let $\mathbf { y } _ { P } \in \{ 0 , 1 \} ^ { C }$ be the indicator vector of functions used by $P$ . Let $D : = C _ { A } - C _ { P }$ be the number of redundant operations added into the active set until all operations from $P$ have been added.
437
+
438
+ Example 1. Suppose the labels, as sorted by decreasing predicted marginal probabilities $\mathbf { f } \left( \mathbf { x } \right)$ , are as follows:
439
+
440
+ $$
441
+ \begin{array} { r l r l r } { 1 \mathrm { ~ 1 ~ 1 ~ 1 ~ } } & { { } } & { 1 } & \qquad 1 \mathrm ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 0 ~ 0 ~ 0 ~ 0 ~ 0 0 \end{array}
442
+ $$
443
+
444
+ Then the solution $P$ contains $C _ { P } = 6$ functions, but the active set needs to grow to size $C _ { A } = 1 1$ to include all of them, adding $D = 5$ redundant functions along the way. Note that the rank loss of the predictions $\mathbf { f } \left( \mathbf { x } \right)$ is $L _ { r } ( \mathbf { y } _ { P } , \mathbf { f } ( \mathbf { x } ) ) = 2 + 5 = 7$ , as it double counts the two redundant functions which are scored higher than two relevant labels.
445
+
446
+ Noting that in general $L _ { r } ( \mathbf { y } _ { P } , \mathbf { f } ( \mathbf { x } ) ) \ge D$ , the previous upper bound on the runtime of Sort and add can be further upper bounded as follows:
447
+
448
+ $$
449
+ C _ { A } ^ { T } = ( C _ { P } + D ) ^ { T } \leq \mathrm { c o n s t } + \mathrm { c o n s t } \times D ^ { T } \leq \mathrm { c o n s t } + \mathrm { c o n s t } \times L _ { r } ( \mathbf { y } _ { P } , \mathbf { f } ( \mathbf { x } ) ) ^ { T }
450
+ $$
451
+
452
+ Hence we see that for a constant value of $T$ , this upper bound can be minimized by optimizing the Rank loss of the predictions $\mathbf { f } \left( \mathbf { x } \right)$ . Note also that $\bar { L _ { r } } ( { \bf y } _ { P } , { \bf f } ( { \bf x } ) ) = 0$ would imply $D = 0$ , in which case $C _ { A } = C _ { P }$ .
453
+
454
+ # F DOMAIN SPECIFIC LANGUAGE OF DEEPCODER
455
+
456
+ Here we provide a description of the semantics of our DSL from Sect. 4.1, both in English and as a Python implementation. Throughout, NULL is a special value that can be set e.g. to an integer outside the working integer range.
457
+
458
+ First-order functions:
459
+
460
+ • HEAD :: [int] -> int lambda xs: xs[0] if len $( \mathbf { \nabla } _ { \mathbf { X } } \mathbf { S } \mathbf { \nabla } ) > 0$ else Null Given an array, returns its first element (or NULL if the array is empty).
461
+ • LAST :: [int] $- >$ int lambda xs: xs[-1] if len $( \mathbf { \nabla } _ { \mathbf { X } } \mathbf { s } ) > 0$ else Null Given an array, returns its last element (or NULL if the array is empty).
462
+ • TAKE :: int $- >$ [int] -> int lambda n, xs: xs[:n] Given an integer n and array xs, returns the array truncated after the $\boldsymbol { \mathrm { n } }$ -th element. (If the length of xs was no larger than n in the first place, it is returned without modification.)
463
+ • DROP :: int $- >$ [int] $- >$ int lambda n, xs: xs[n:] Given an integer n and array $_ { \textrm { x S } }$ , returns the array with the first n elements dropped. (If the length of xs was no larger than n in the first place, an empty array is returned.)
464
+ • ACCESS :: int $- >$ [int] $- >$ int lambda n, xs: xs[n] if $\mathrm { n } > = 0$ and len $( \mathsf { x s } ) > \mathsf { n }$ else Null Given an integer n and array $_ { \textrm { x S } }$ , returns the $( \mathrm { n } { + } 1 )$ -st element of $_ { \textrm { x S } }$ . (If the length of xs was less than or equal to $\boldsymbol { \mathrm { n } }$ , the value NULL is returned instead.)
465
+ • MINIMUM :: [int] $- >$ int lambda xs: min(xs) if len $( \mathbf { \nabla } _ { \mathbf { X } } \mathbf { S } ) > 0$ else Null Given an array, returns its minimum (or NULL if the array is empty).
466
+ • MAXIMUM :: [int] $- >$ int lambda xs: max(xs) if len $( \mathbf { \nabla } _ { \mathbf { X } } \mathbf { S } ) > 0$ else Null Given an array, returns its maximum (or NULL if the array is empty). REVERSE :: [int] $- >$ [int] lambda xs: list(reversed(xs)) Given an array, returns its elements in reversed order.
467
+ • SORT :: [int] -> [int] lambda xs: sorted(xs) Given an array, return its elements in non-decreasing order. SUM :: [int] $- >$ int lambda xs: sum(xs) Given an array, returns the sum of its elements. (The sum of an empty array is 0.)
468
+
469
+ Higher-order functions:
470
+
471
+ • MAP :: (int -> int) -> [int] -> [int] lambda f, xs: [f(x) for x in xs] Given a lambda function f mapping from integers to integers, and an array xs, returns the array resulting from applying f to each element of xs.
472
+ • FILTER :: (int $- >$ bool) $- >$ [int] -> [int] lambda f, xs: [x for x in xs if f(x)] Given a predicate f mapping from integers to truth values, and an array xs, returns the elements of xs satisfying the predicate in their original order.
473
+ • COUNT :: (int $- >$ bool) $- >$ [int] $- >$ int lambda f, xs: len([x for x in xs if f(x)]) Given a predicate f mapping from integers to truth values, and an array xs, returns the number of elements in xs satisfying the predicate.
474
+ • ZIPWITH :: (int $- >$ int $- >$ int) $- >$ [int] -> [int] -> [int] lambda f, xs, ys: [f(x, y) for (x, y) in zip(xs, ys)] Given a lambda function f mapping integer pairs to integers, and two arrays xs and ys, returns the array resulting from applying f to corresponding elements of xs and ys. The length of the returned array is the minimum of the lengths of $_ { \textrm { x S } }$ and ys. SCANL1 :: (int $- >$ int $- >$ int) $- >$ [int] -> [int] Given a lambda function f mapping integer pairs to integers, and an array $_ { \textrm { x S } }$ , returns an array ys of the same length as xs and with its content defined by the recurrence $\begin{array} { r l } { \mathrm { y s } \left[ 0 \right] } & { { } = } \end{array}$ $\mathbf { x } \mathbf { s } \left[ 0 \right] , \mathbf { y } \mathbf { s } \left[ \mathrm { n } \right] \mathbf { \Psi } = \mathbf { \Psi } \mathbf { f } \left( \mathbf { y } \mathbf { s } \left[ \mathrm { n - 1 } \right] \right.$ , $\mathtt { x s } [ \mathtt { n } ]$ ) for $n \geq 1$ .
475
+
476
+ The INT INT lambdas $\left( + 1 \right) , \left( - 1 \right) , \left( \star 2 \right) , \left( / 2 \right) , \left( \star \left( - 1 \right) \right) , \left( \star \star 2 \right) , \left( \star 3 \right) , \left( / 3 \right) , \left( \star 4 \right) , \left( / 4 \right) , \left( \star 3 \right) , \left( \star 4 \right) .$ ) provided by our DSL map integers to integers in a self-explanatory manner. The $\mathrm { I N T } { } \mathrm { B O O L }$ lambdas $( > 0 )$ , $( < 0 )$ , ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 0$ ), ( $\scriptstyle { \frac { 0 } { 0 } } 2 = = 1$ ) respectively test positivity, negativity, evenness and oddness of the input integer value. Finally, the $\mathrm { I N T } { } \mathrm { I N T } { } \mathrm { I N T }$ lambdas $( + ) , ( - ) , ( \star )$ , MIN, MAX apply a function to a pair of integers and produce a single integer.
477
+
478
+ As an example, consider the function SCANL1 MAX, consisting of the higher-order function SCANL1 and the $\mathrm { I N T } { } \mathrm { I N T } { } \mathrm { I N T }$ lambda MAX. Given an integer array a of length $L$ , this function computes the running maximum of the array a. Specifically, it returns an array $\mathrm { b }$ of the same length $L$ whose $i$ -th element is the maximum of the first $i$ elements in $\exists$ .
479
+
480
+ ![](images/da5620eb6e4f0a76e4439147498cbeb617797fc9a1d092bb07c51b51e15fdcb8.jpg)
481
+ Figure 9: Conditional confusion matrix for the neural network and test set of $P = 5 0 0$ programs of length $T = 3$ that were used to obtain the results presented in Table 1. Each cell contains the average false positive probability (in larger font) and the number of test programs from which this average was computed (smaller font, in brackets). The color intensity of each cell’s shading coresponds to the magnitude of the average false positive probability.
482
+
483
+ # G ANALYSIS OF TRAINED NEURAL NETWORKS
484
+
485
+ We analyzed the performance of trained neural networks by investigating which program instructions tend to get confused by the networks. To this end, we looked at a generalization of confusion matrices to the multilabel classification setting: for each attribute in a ground truth program (rows) measure how likely each other attribute (columns) is predicted as a false positive. More formally, in this matrix the $( i , j )$ -entry is the average predicted probability of attribute $j$ among test programs that do possess attribute $i$ and do not possess attribute $j$ . Intuitively, the $i$ -th row of this matrix shows how the presence of attribute $i$ confuses the network into incorrectly predicting each other attribute $j$ .
486
+
487
+ Figure 9 shows this conditional confusion matrix for the neural network and $P = 5 0 0$ program test set configuration used to obtain Table 1. We re-ordered the confusion matrix to try to expose block structure in the false positive probabilities, revealing groups of instructions that tend to be difficult to distinguish. Figure 10 show the conditional confusion matrix for the neural network used to obtain the table in Fig. 3a. While the results are somewhat noisy, we observe a few general tendencies:
488
+
489
+ • There is increased confusion amongst instructions that select out a single element from an array: HEAD, LAST, ACCESS, MINIMUM, MAXIMUM.
490
+ • Some common attributes get predicted more often regardless of the ground truth program: FILTER, $( > 0 )$ ), $( < 0 )$ , ( $\scriptstyle { \frac { \circ } { \circ } } 2 = = 1$ ), ( $\scriptstyle { \frac { 0 } { \circ } } 2 = = 0$ ), MIN, MAX, (+), (-), ZIPWITH.
491
+ There are some groups of lambdas that are more difficult for the network to distinguish within: $( + )$ vs $( - ) ~ ; ~ ( + 1 )$ vs $( - 1 ) \ ; \ ( \ / 2 )$ vs (/3) vs (/4).
492
+ • When a program uses $( \star \star 2 )$ , the network often thinks it’s using $( \star )$ , presumably because both can lead to large values in the output.
493
+
494
+ ![](images/a2f6e1ddd3c6cc3aed7aca84775a0568e1abe730347297f96f96da4cfd262c8d.jpg)
495
+
496
+ Figure 10: Conditional confusion matrix for the neural network and test set of $P = 5 0 0$ programs of length $T = 5$ . The presentation is the same as in Figure 9.
parse/train/ByldLrqlx/ByldLrqlx_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByldLrqlx/ByldLrqlx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByxXZpVtPB/ByxXZpVtPB.md ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HOMOGENEOUS LINEAR INEQUALITY CONSTRAINTS FOR NEURAL NETWORK ACTIVATIONS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We propose a method to impose homogeneous linear inequality constraints of the form $A x \le 0$ on neural network activations. The proposed method allows a datadriven training approach to be combined with modeling prior knowledge about the task. One way to achieve this task is by means of a projection step at test time after unconstrained training. However, this is an expensive operation. By directly incorporating the constraints into the architecture, we can significantly speed-up inference at test time; for instance, our experiments show a speed-up of up to two orders of magnitude over a projection method. Our algorithm computes a suitable parameterization of the feasible set at initialization and uses standard variants of stochastic gradient descent to find solutions to the constrained network. Thus, the modeling constraints are always satisfied during training. Crucially, our approach avoids to solve an optimization problem at each training step or to manually trade-off data and constraint fidelity with additional hyperparameters. We consider constrained generative modeling as an important application domain and experimentally demonstrate the proposed method by constraining a variational autoencoder.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep learning models (LeCun et al., 2015) have demonstrated remarkable success in tasks that require exploitation of subtle correlations, such as computer vision (Krizhevsky et al., 2012) and sequence learning (Sutskever et al., 2014). Typically, humans have strong prior knowledge about a task, e.g., based on symmetry, geometry, or physics. Learning such a priori assumptions in a purely data-driven manner is inefficient and, in some situations, may not be feasible at all. While certain prior knowledge was successfully imposed – for example translational symmetry through convolutional architectures (LeCun et al., 1998) – incorporating more general modeling assumptions in the training of deep networks remains an open challenge. Recently, generative neural networks have advanced significantly (Goodfellow et al., 2014; Kingma & Welling, 2014). With such models, controlling the generative process beyond a data-driven, black-box approach is particularly important.
12
+
13
+ In this paper, we present a method to impose prior knowledge through homogeneous linear inequality constraints of the form $A x \le 0$ on the activations of deep learning models. We directly impose these constraints through a suitable parameterization of the feasible set. This has several advantages:
14
+
15
+ • The constraints are hard-constraints in the sense that they are satisfied at any point during training and inference.
16
+ • Inference on the constrained network incurs no overhead compared to unconstrained inference.
17
+ • There is no manual trade-off between constraint satisfaction and data representation.
18
+
19
+ In summary, the main contribution of our method is a reparameterization that incorporates homogeneous linear inequality hard-constraints on neural network activations and allows for efficient test time predictions, i.e., our method is faster up to two orders of magnitude. The model can be optimized by standard variants of stochastic gradient descent. As an application in generative modeling, we demonstrate that our method is able to produce authentic samples from a variational autoencoder while satisfying the imposed constraints.
20
+
21
+ ![](images/6ff2de8059afd1546259716b3fa3bcc6f284f19dca82e98544dec5426da694f1.jpg)
22
+ Figure 1: Samples drawn from a variational autoencoder trained on MNIST without constraints (left) and with a checkerboard constraint on the output domain (right). For a pixel intensity domain $[ - 1 , 1 ]$ , the checkerboard constraint forces the image tiles to have average positive or negative brightness.
23
+
24
+ # 2 RELATED WORK
25
+
26
+ Various works have introduced methods to impose some type of hard constraint on neural network activations. This differs from a classical constrained optimization problem (Nocedal & Wright, 2006) in that the constraints are on the image of a parameterized function rather than on the neural network parameters.
27
+
28
+ Marquez-Neila et al. (2017) formulated generic differentiable equality constraints as soft constraints ´ and employed a Lagrangian approach to train their model. While this is a principled approach to constrained optimization, it does not scale well to practical deep neural network models with their vast number of parameters. To make their method computationally tractable, a subset of the constraints is selected at each training step. In addition, these constraints are locally linearized; thus, there is no guarantee that this subset will be satisfied after a parameter update.
29
+
30
+ For the specific problem of weakly supervised segmentation, Pathak et al. (2015) proposed an optimization scheme that alternates between optimizing the deep learning model and fitting a constrained distribution to these intermediate models. However, this method involves solving a (convex) optimization problem at each training step. Furthermore, the overall convergence path depends on how the alternating optimization steps are combined, which introduces an additional hyperparameter that must be tuned. Briq et al. (2018) approached the weakly supervised segmentation problem with a layer that implements the orthogonal projection onto a simplex, thereby directly constraining the activations to a probability distribution. This optimization problem can be solved efficiently, but does not generalize to other types of inequality constraints.
31
+
32
+ OptNet, an approach to solve a generic quadratic program as a differentiable network layer, was proposed by Amos & Kolter (2017). OptNet backpropagates through the first-order optimality conditions of the quadratic program, and linear inequality constraints can be enforced as a special case. The formulation is flexible; however, it scales cubically with the number of variables and constraints. Thus, it becomes prohibitively expensive to train large-scale deep learning models.
33
+
34
+ Finally, several works have proposed handcrafted solutions for specific applications, such as skeleton prediction (Zhou et al., 2016) and prediction of rigid body motion (Byravan & Fox, 2017). In contrast, to avoid laborious architecture design, we argue for the value of generically modeling constraint classes. In practice, this makes constraint methods more accessible for a broader class of problems.
35
+
36
+ Contribution In this work, we tackle the problem of imposing homogeneous linear inequality constraints on neural network activations. Rather than solving an optimization problem during training, we split this task into a feasibility step at initialization and an optimality step during training. At initialization, we compute a suitable parameterization of the constraint set (a polyhedral cone) and use the neural network training algorithm to find a good solution within this feasible set. Conceptually, we are trading-off computational cost during initialization to obtain a model that has no overhead at test time. The proposed method is implemented as a neural network layer that is specified by a set of homogeneous linear inequalities and whose output parameterizes the feasible set.
37
+
38
+ We consider a generic $L$ layer neural network $F _ { \theta }$ with model parameters $\theta$ for inputs $x$ as follows:
39
+
40
+ $$
41
+ F _ { \theta } ( x ) = f _ { \theta _ { L } } ^ { ( L ) } ( \sigma ( f _ { \theta _ { L - 1 } } ^ { ( L - 1 ) } ( \sigma ( \dots f _ { \theta _ { 1 } } ^ { ( 1 ) } ( x ) \dots ) ) ) ) ,
42
+ $$
43
+
44
+ where $f _ { \theta _ { l } } ^ { ( l ) }$ are affine functions, e.g., a fully-connected or convolutional layer, and $\sigma$ is an elementwise non-linearity1, e.g., a sigmoid or rectified linear unit (ReLU). In supervised learning, training targets $y$ are known and a loss $\mathcal { L } _ { y } ( F _ { \theta } ( x ) )$ is minimized as a function of the network parameters $\theta$ . A typical loss for a classification task is the cross entropy between the network output and the empirical target distribution, while the mean-squared error is commonly used for a regression task. The proposed method can be applied to constrain any linear activations $z ^ { ( l ) } = f _ { \theta _ { l } } ^ { ( l ) } ( a ^ { ( l - 1 ) } )$ or non-linear activations $a ^ { ( l ) } = \sigma ( z ^ { ( l ) } )$ . In most cases, one would like to constrain the output $F _ { \theta } ( x )$ .
45
+
46
+ The feasible set for $m$ linear inequality constraints in $d$ dimensions is the convex polyhedron
47
+
48
+ $$
49
+ \mathcal { C } : = \left\{ z \bigg | A z \leq b , A \in \mathbb { R } ^ { m \times d } , b \in \mathbb { R } ^ { m } \right\} \subseteq \mathbb { R } ^ { d } .
50
+ $$
51
+
52
+ A suitable description of the convex polyhedron $\mathcal { C }$ is obtained by the decomposition theorem for polyhedra.
53
+
54
+ Theorem 1 (Decomposition of polyhedra, Minkowski-Weyl). $A$ set $\mathcal { C } \subset \mathbb { R } ^ { d }$ is a convex polyhedron of the form (2) if and only $i f$
55
+
56
+ $$
57
+ \begin{array} { l } { { \displaystyle { \mathcal C } = \mathrm { c o n v } \big ( \upsilon _ { 1 } , \ldots , \upsilon _ { n } \big ) + \mathrm { c o n e } \big ( r _ { 1 } , \ldots , r _ { s } \big ) } \ ~ } \\ { { \displaystyle ~ = \left\{ \sum _ { i = 1 } ^ { n } \lambda _ { i } \upsilon _ { i } + \sum _ { j = 1 } ^ { s } \mu _ { j } r _ { j } \bigg | \lambda _ { i } , \mu _ { j } \geq 0 , \sum _ { i = 1 } ^ { n } \lambda _ { i } = 1 \right\} } \ } \end{array}
58
+ $$
59
+
60
+ for finitely many vertices $\{ v _ { 1 } , \ldots , v _ { n } \}$ and rays $\{ r _ { 1 } , \ldots , r _ { s } \}$
61
+
62
+ Furthermore, $\mathcal { C } = \left\{ z | A z \leq 0 , A \in \mathbb { R } ^ { m \times d } \right\}$ if and only if
63
+
64
+ $$
65
+ \mathcal { C } = \mathrm { c o n e } ( r _ { 1 } , . . . , r _ { s } )
66
+ $$
67
+
68
+ for finitely many rays $\{ r _ { 1 } , \ldots , r _ { s } \}$
69
+
70
+ The theorem states that an intersection of half-spaces (half-space or $\mathrm { H } \cdot$ -representation) can be written as the Minkowski sum of a convex combination of the polyhedron’s vertices and a conical combination of some rays (vertex or $\mathrm { V } .$ -representation). One can switch algorithmically between these two viewpoints via the double description method (Motzkin et al., 1953; Fukuda & Prodon, 1996), which we discuss in the following. Thus, the $\mathrm { H }$ -representation, which is natural when modeling inequality constraints, can be transformed into the V-representation, which can be incorporated into gradient-based neural network training.
71
+
72
+ In this paper, we focus on homogeneous constraints of the form (4), for which the feasible set is a polyhedral cone. Due to the special structure of this set, we can avoid to work with the convex combination parameters in (3), which is numerically advantageous (Section 3.5), and we can efficiently combine modeling constraints and domain constraints, such as a $[ - 1 , 1 ]$ -pixel domain for images (Section 3.3). Such a polyhedral cone is shown in Figure 2.
73
+
74
+ # 3.1 DOUBLE DESCRIPTION METHOD
75
+
76
+ The double description method converts between the half-space and vertex representation of a system of linear inequalities. It was originally proposed by Motzkin et al. (1953) and further refined by Fukuda & Prodon (1996).2 Here, we are only interested in the conversion from $\mathrm { H } \cdot$ -representation to V-representation for homogeneous constraints (4),
77
+
78
+ $$
79
+ \mathcal { H } \to \mathrm { c o n e } ( r _ { 1 } , \dots , r _ { s } ) \ .
80
+ $$
81
+
82
+ ![](images/e34f7d5efaaf63be07414ce913edd9a6616ef7e1dcd0ac505ab2653737bf016f.jpg)
83
+ Figure 2: Diagram illustrating an iteration of the double description method. Adding a constraint to the $k$ -constraint set $A ^ { k }$ at iteration $k + 1$ introduces a hyperplane $H$ . The intersection points of $H$ with the boundary of the current polyhedron $R ^ { k }$ (marked by $\circ ^ { \prime }$ ) are added as rays $r _ { 6 }$ and $r _ { 7 }$ to the polyhedral cone. The ray $r _ { 2 }$ is cut-off by the hyperplane $H$ and is removed from $R ^ { k }$ . The result is the next iterate Rk+1.
84
+
85
+ The core algorithm proceeds as follows. Let the rows of $A$ define a set of homogeneous inequalities and let $R = [ r _ { 1 } , \ldots , r _ { s } ]$ be the matrix whose columns are the rays of the corresponding cone. Here, $( A , R )$ form a double description pair. The algorithm iteratively builds a double description pair $( A ^ { k + 1 } , R ^ { k + 1 } )$ from $( A ^ { k } , R ^ { k } )$ in the following manner. The rows in $A ^ { k }$ represent a $k$ -subset of the rows of $A$ and thus define a convex polyhedron associated with $R ^ { k }$ . Adding a single row to $A ^ { k }$ introduces an additional half-space constraint, which corresponds to a hyperplane. If the vector $r _ { i } - r _ { j }$ for two columns $r _ { i } , r _ { j }$ of $\bar { \boldsymbol { R } } ^ { k }$ intersects with this hyperplane then this intersection point is added to $R ^ { k }$ . Existing rays that are cut-off by the additional hyperplane are removed from $R ^ { k }$ . The result is the double description pair $( A ^ { k + 1 } , \dot { R } ^ { k + 1 } )$ . This procedure is shown in Figure 2.
86
+
87
+ Adding a hyperplane might drastically increase the number of rays in intermediate representations, which, in turn, contribute combinatorically in the subsequent iteration. In fact, there exist worst case polyhedra for which the algorithm has exponential run time as a function of the number of inequalities and the input dimension, as well as the number of rays (Dyer, 1983; Bremner, 1999). Overall, one can expect the algorithm to be efficient only for problems with a reasonably small number $m$ of inequalities and dimension $d$ .
88
+
89
+ # 3.2 INTEGRATION IN NEURAL NETWORK ARCHITECTURES
90
+
91
+ We parameterize the homogeneous form (4) via a neural network layer. This layer takes as input some (latent) representation of the data, which is mapped to activations satisfying the desired hard constraints. The algorithm is provided with the $_ \mathrm { H }$ -representation of linear inequality constraints, i.e., a matrix $A \in \breve { \mathbb { R } } ^ { m \times d }$ for $m$ constraints in $d$ dimensions to specify the feasible set (4). At initialization, we convert this to the $\mathrm { V } .$ -representation via the double description method (Section 3.1). This corresponds to computing the set of rays $\{ r _ { 1 } , \ldots , r _ { s } \}$ to represent the polyhedral cone. During training, the neural network training algorithm is used to optimize within in the feasible set. There are two critical aspects in this procedure. First, as outlined in Section 3.1, the run-time complexity of the double description method may be prohibitive. Conceptually, the proposed approach allows for significant compute time at initialization to obtain an algorithm that is very efficient at training and test time. Second, we must ensure that the mapping from the latent representation to the parameters integrates well with the training algorithm. We assume that the model is trained with gradient-based backpropagation, as is common for current deep learning applications. The constraint layer comprises a batch normalization layer and an affine mapping (fully-connected layer with biases) followed by the element-wise absolute value function that ensures the non-negativity required by the conical combination parameters. In theory, any function $f : \mathbb { R } \to \mathbb { R } _ { \geq 0 }$ would fulfill this requirement; however, care must be taken to not interfere with backpropagated gradients.
92
+
93
+ # 3.3 COMBINING MODELING AND DOMAIN CONSTRAINTS
94
+
95
+ Domain constraints are often formulated as unit box constraints, $B : = \{ x \in \mathbb { R } ^ { d } | - 1 \leq x _ { i } \leq 1 \}$ , such as a pixel domain for images. Box constraints are particularly unfit to be converted using the double description method because the number of vertices is exponential in the dimension. Therefore, we distinguish modeling constraints and domain constraints and only convert the former into $\mathrm { V } .$ - representation. Based on this representation, we obtain a point in the modeling constraint set, $x \in { \mathcal { C } }$ . However, this point may not be in the unit box $\boldsymbol { B }$ . To arrive at a point in the intersection $\mathcal { C } \cap \mathcal { B }$ , we normalize $x$ by its infinity norm if $x \notin B$ , $\hat { x } = x / \operatorname* { m a x } \{ \| x \| _ { \infty } , 1 \bar \}$ . Indeed, $\hat { x } \in \mathcal { C } \cap B$ since scaling by a positive constant remains in the cone, i.e., if $x \in { \mathcal { C } }$ , then $\alpha x \in \mathcal { C } \forall \alpha \geq 0$ .
96
+
97
+ # 3.4 APPLICATIONS OF HOMOGENEOUS LINEAR INEQUALITY CONSTRAINTS
98
+
99
+ A natural application of constraints of the form $A x \le 0$ is a parameterization of a set of binary classifiers. If each row $a _ { i }$ of $A$ is such a binary classifier, then the method presented in this paper parameterizes the set $\{ x | a _ { i } ^ { T } x \le 0 \ \forall i \}$ . Consequently, it can be guaranteed that neural network activations satisfy a set of binary criteria. Another domain is to express certain direct relations between neural network activations. Notably, one can guarantee mathematical properties such as monotonicity via $x _ { i + 1 } \geq x _ { i }$ and convexity via $x _ { i + 1 } - 2 x _ { i } + x _ { i - 1 } \geq 0$ .
100
+
101
+ # 3.5 EXTENSION TO GENERAL LINEAR INEQUALITY CONSTRAINTS
102
+
103
+ The proposed method takes advantage of the special structure of a polyhedral cone to efficiently combine modeling and domain constraints (Section 3.3). General linear inequality constraints of the form $A x \leq b$ without restrictions on $A$ and $b$ possibly require the conic and convex component of (3) for their $\mathrm { v } .$ -representation. The main approach of this paper may be used in this case, i.e., our layer additionally needs to predict convex combination parameters. However, we observed slow convergence, which we ascribe to the simplex parameterization for the convex combination parameters. We used a softmax function $f ( x ) _ { i } = { \mathrm { { \bar { e x p } } } ( x _ { i } ) } / { \sum _ { j = 1 } ^ { m } \exp ( x _ { j } ) }$ to enforce the constraints $\begin{array} { r } { \lambda _ { i } \ge 0 , \sum _ { i = 1 } ^ { m } \lambda _ { i } = 1 } \end{array}$ of the convex combination parameters in (3). This function has vanishing gradients when one $x _ { i }$ is significantly greater than the other vector entries. Furthermore, this most general setting does not allow for efficient incorporation of domain constraints, as this would require an efficient parameterization of the intersection of a general convex polyhedron and the unit box.
104
+
105
+ # 4 NUMERICAL RESULTS
106
+
107
+ We compare the proposed constraint parameterization algorithm with an algorithm that trains without constraints, but requires a projection step at test time. We call this latter algorithm test time projection. We analyze these algorithms in two different settings. In an initial experiment, we learn the orthogonal projection onto a constraint set to demonstrate properties of these algorithms. Here, the result can be compared to the optimal solution of the convex optimization problem. In a second experiment, consistent with our motivation to constrain the output of generative models, we apply these algorithms to a variational autoencoder. Finally, we evaluate the running time of inference for these problems and show that the proposed algorithm is significantly more efficient compared to the test time projection method.
108
+
109
+ We used the MNIST dataset (LeCun et al.) for both experiments (59000 training, 1000 validation, and 10000 test samples). We chose PyTorch (Paszke et al., 2017) for our implementation3 and all experiments were performed on a single Nvidia Titan X GPU. All networks were optimized with the Adam optimizer and we evaluated learning rates in the range $[ 1 0 ^ { - 5 } , 1 0 ^ { - 3 } ]$ . The initial learning rate was annealed by a factor of $1 / 2$ if progress on the validation loss stagnated for more than 5 epochs. We used OSQP (Stellato et al., 2017) as an efficient solver to compute orthogonal projections.
110
+
111
+ Both experiments were performed with a checkerboard constraint with 16 tiles, where neighboring tiles are constrained to be on average either below or above pixel domain midpoint. For a $[ - 1 , 1 ]$ -pixel domain, the tiles’ average intensity is positive or negative, respectively. The initial computational cost of converting these constraints into $\mathrm { v } .$ -representation via the double description method is negligible (less than 1s). We observed that it is numerically advantageous to activate unit box scaling after the constraint parameterization model was initially optimized only with modeling constraints for a specified number of epochs.
112
+
113
+ One might consider OptNet (Amos & Kolter, 2017) and an analogous version of the method introduced by Pathak et al. (2015) as baselines. However, these approaches incur a significant drawback for the setup presented in this paper as they are are computationally expensive at training time. An OptNet layer solves a generic quadratic program as a differentiable network layer, which scales cubically with the number of variables and constraints. The method by Pathak et al. (2015) for the regression problems in this paper alternates between optimization steps in the network parameters via a variant of stochastic gradient descent and projecting the network output onto the constraints, which is computationally expensive.
114
+
115
+ # 4.1 ORTHOGONAL PROJECTION ONTO A CONSTRAINT SET
116
+
117
+ We learn an orthogonal projection to demonstrate general properties of both algorithms. For given linear inequalities specified in H-representation, we solve the following problem:
118
+
119
+ $$
120
+ \operatorname* { m i n } _ { z \in \mathbb { R } ^ { d } } \left\| z - y \right\| _ { 2 } \quad \mathrm { s . t . } A z \leq 0 \qquad ,
121
+ $$
122
+
123
+ where $y$ is an MNIST image. Here, the problem is convex; therefore, the global optimum can be readily computed and compared to the performance of the learning algorithms. In this setting, we can expect that training an unconstrained network with subsequent projection onto the constraint set at test time yields good results, which can be seen as follows. Let $\begin{array} { r } { \mathcal { P } c ( y ) : = \arg \operatorname* { m i n } _ { z \in \mathcal { C } } \| z - y \| _ { 2 } } \end{array}$ be the orthogonal projection onto the constraint set $\mathcal { C }$ and denote the mean-squared error as $\mathcal { L } _ { y } ( x ) : =$ $\| x - y \| _ { 2 }$ . Both mappings are Lipschitz continuous with Lipschitz constant $L = 1$ . Consequently, for an output $\hat { y }$ of an unconstrained model,
124
+
125
+ $$
126
+ \begin{array} { r } { \displaystyle \Big | \mathcal { L } _ { y } ( \mathcal { P } _ { \mathcal { C } } ( \hat { y } ) ) - \mathcal { L } _ { y } ( \mathcal { P } _ { \mathcal { C } } ( y ) ) \Big | \le \left\| \mathcal { P } _ { \mathcal { C } } ( \hat { y } ) - \mathcal { P } _ { \mathcal { C } } ( y ) \right\| _ { 2 } \le \left\| \hat { y } - y \right\| _ { 2 } , } \end{array}
127
+ $$
128
+
129
+ where, by definition, the term $\mathcal { L } _ { y } ( \mathcal { P } c ( y ) )$ is the optimal value of problem (6). The training algorithm fits $\hat { y }$ to $y$ ; therefore, projecting the unconstrained output $\hat { y }$ onto the constraint set will yield an objective value that is close to the optimal value of the constrained optimization problem.
130
+
131
+ To have a comparable number of parameters for both methods, we use a single fully-connected layer in both cases. For the unconstrained model, we employ an $F C ( 7 8 4 , 7 8 4 )$ layer, and for the constrained model we employ an $F C ( 7 8 4 , n _ { r } )$ layer with $n _ { r } = 1 5 5 2$ many rays to represent the constraint set in V-representation. Additionally, the constraint layer first applies a batch normalization operation (Ioffe & Szegedy, 2015). Both models were optimized with an initial learning rate of $1 0 ^ { - 4 }$ , which was annealed by a factor of 0.1 if progress on the validation loss stagnated for more than 5 epochs. The batch size was chosen to be 256. The unit box constraints were activated after 25 epochs. Additionally, the data for training the model with all constraints being active is shown. This mode eventually results in worse generalization. Figure 3 shows that the mean-squared validation objective for both algorithms converges close to the average optimum. The constraint parameterization method has a larger variance and optimality gap, which hints at the numerical difficulty of training the constrained network. To be precise, the best average validation error during training is within $9 \%$ of the optimum for the constraint parameterization method and within $1 \%$ of the optimum for the test time projection method. Figure 4 shows a test set sample and the respective output of the learned models.
132
+
133
+ ![](images/ccb26edf90e7c914ec8c93ff4de1521e67d3e69261ccf2961a943d7f3e77649f.jpg)
134
+ Figure 3: Mean-squared validation loss averaged over all pixels for 10 runs; shaded area denotes standard deviation. The objective function (6) is computed on a held-out validation set for the proposed constraint parameterization method and unconstrained optimization with subsequent test time projection. The average optimum over the validation set is obtained as a solution to a convex optimization problem. For the box delay curve, the box constraints are activated after 25 epochs (after $\sim \mathrm { 3 0 s }$ ), which results in better generalization. The best average validation error during training is within $9 \%$ of the optimum for the constraint parameterization method with box constraint delay and within $1 \%$ of the optimum for the test time projection method.
135
+
136
+ ![](images/49fc0106d7c90222b808e52dcf5a411c2b40977fc67fcc1408d6bbddb9492dbf.jpg)
137
+ Figure 4: Learning to solve the orthogonal projection onto a constraint set as defined in (6). From left to right: MNIST sample from a test set, optimal projection by solving a quadratic program, constraint parameterization model inference, and test time projection model inference.
138
+
139
+ # 4.2 CONSTRAINED GENERATIVE MODELING WITH VARIATIONAL AUTOENCODERS
140
+
141
+ Variational autoencoders (VAE) are a class of generative models that are jointly trained to encode observations into latent variables via an encoder or inference network and decode observations from latent variables using a decoder or generative network (Kingma & Welling, 2014). We base our implementation on (Baumgartner, 2018). The model has a fully-connected architecture: ¨
142
+
143
+ Here, $\mathrm { R e L U } ( x ) = \operatorname* { m a x } ( 0 , x )$ and the sigmoid non-linearity takes the form $\sigma ( x ) = 1 / ( 1 { + } \mathrm { e x p } ( - x ) )$ . In contrast to a standard VAE, we constrain the samples generated by the model to obey a checkerboard constraint. The model was optimized with an initial learning rate of $1 0 ^ { - 4 }$ , which was annealed by a factor of 0.1 if progress on the validation loss stagnated for more than 5 epochs. The batch size was chosen to be 64. The model was trained for 200 epochs while the unit box constraints were activated after 100 epochs. To generate images, we sample the latent space prior $z \sim \mathcal { N } ( 0 , I )$ and evaluate the decoding neural network (Figure 5). The model is able to sample authentic digits while obeying the checkerboard constraint.
144
+
145
+ # 4.3 FAST INFERENCE WITH CONSTRAINED NEURAL NETWORKS
146
+
147
+ The main advantage of the proposed method over a simple projection method is a vast speed-up at test time. Since the constraint is incorporated into the neural network architecture, a forward pass has almost no overhead compared to an unconstrained network. On the other hand, for a network that was trained without constraints, a final projection step is necessary; this requires solving a convex optimization problem, which is relatively costly. Table 1 shows inference times for both models for the above numerical experiments. The constraint parameterization approach is up to two orders of magnitude faster at test time compared to the test time projection algorithm.
148
+
149
+ ![](images/02f0cfe4745a3f1d0401396a1e80304dc0a37a9588d7f9d2d50cf658cde58b72.jpg)
150
+ Figure 5: Samples from a constrained variational autoencoder trained with the test time projection method and our constraint parameterization method. The images represent authentic digits while satisfying the imposed checkerboard constraint. Inference is significantly faster using our method.
151
+
152
+ Table 1: Inference time for test time projection and constraint parameterization methods. Mean and standard deviation of running times are computed over 100 runs of 59000 samples with a batch size of 256.
153
+
154
+ <table><tr><td>METHOD</td><td>PROJECTION</td><td>VAE</td></tr><tr><td>Test time projection</td><td>82±1 s</td><td>40±1s</td></tr><tr><td>Constraint parameterization (ours)</td><td>0.46 ± 0.02 s</td><td>0.75 ± 0.04 s</td></tr></table>
155
+
156
+ # 5 CONCLUSION
157
+
158
+ To combine a data-driven task with modeling constraints, we have developed a method to impose homogeneous linear inequality constraints on neural network activations. At initialization, a suitable parameterization is computed and subsequently a standard variant of stochastic gradient descent is used to train the reparameterized network. In this way, we can efficiently guarantee that network activations – in the final or any intermediate layer – satisfy the constraints at any point during training. The main advantage of our method over simply projecting onto the feasible set after unconstrained training is a significant speed-up at test time of up to two orders of magnitude. An important application of the proposed method is generative modeling with prior assumptions. Therefore, we demonstrated experimentally that the proposed method can be used successfully to constrain the output of a variational autoencoder. Our method is implemented as a layer, which is simple to combine with existing and novel neural network architectures in modern deep learning frameworks and is therefore readily available in practice.
159
+
160
+ # REFERENCES
161
+
162
+ Brandon Amos and J. Zico Kolter. OptNet: Differentiable optimization as a layer in neural networks. In Proceedings of the 34th International Conference on Machine Learning (ICML 2017), pp. 136– 145, 2017.
163
+
164
+ Tim Baumgartner.¨ VAE-CVAE-MNIST. https://github.com/timbmg/ VAE-CVAE-MNIST, 2018. commit: e4ba231.
165
+
166
+ David Bremner. Incremental convex hull algorithms are not output sensitive. Discrete & Computational Geometry, 21(1):57–68, 1999.
167
+
168
+ Rania Briq, Michael Moeller, and Juergen Gall. Convolutional Simplex Projection Network (CSPN) for Weakly Supervised Semantic Segmentation. BMVC 2018, 2018.
169
+
170
+ Arunkumar Byravan and Dieter Fox. SE3-nets: Learning rigid body motion using deep neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), 2017.
171
+
172
+ Martin E. Dyer. The complexity of vertex enumeration methods. Mathematics of Operations Research, 8(3):381–402, 1983.
173
+
174
+ Komei Fukuda and Alain Prodon. Double description method revisited, pp. 91–111. Combinatorics and Computer Science: 8th Franco-Japanese and 4th Franco-Chinese Conference Brest, France, July 3–5, 1995 Selected Papers. Springer Berlin Heidelberg, 1996.
175
+
176
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27 (NIPS 2014), pp. 2672–2680. 2014.
177
+
178
+ Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proceedings of the 32nd International Conference on Machine Learning, volume 37, pp. 448–456. PMLR, 07–09 Jul 2015.
179
+
180
+ Diederik Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations (ICLR 2014), 2014.
181
+
182
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton. ImageNet classification with deep convolutional neural networks. In Proceedings of the 25th International Conference of Neural Information Processing Systems (NIPS 2012), 2012.
183
+
184
+ Yann LeCun, Corinna Cortes, and Christopher Burges. The MNIST database of handwritten digits. URL http://yann.lecun.com/exdb/mnist/.
185
+
186
+ 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.
187
+
188
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
189
+
190
+ Pablo Marquez-Neila, Mathieu Salzmann, and Pascal Fua. Imposing hard constraints on deep net- ´ works: Promises and limitations. First Workshop on Negative Results in Computer Vision, CVPR 2017, 2017.
191
+
192
+ T. S. Motzkin, H. Raiffa, G. L. Thompson, and R. M. Thrall. The double description method. In Contributions to the Theory of Games II, volume 8 of Ann. of Math. Stud., pp. 51–73. Princeton University Press, 1953.
193
+
194
+ Jorge Nocedal and Stephen Wright. Numerical Optimization. Springer Series in Operations Research and Financial Engineering. Springer, 2006.
195
+
196
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. Autodiff Workshop, NIPS 2017, 2017.
197
+
198
+ Deepak Pathak, Philipp Krahenb ¨ uhl, and Trevor Darrell. Constrained Convolutional Neural Net- ¨ works for Weakly Supervised Segmentation. In International Conference on Computer Vision (ICCV 2015), 2015.
199
+
200
+ Bartolomeo Stellato, Goran Banjac, Paul Goulart, Alberto Bemporad, and Stephen Boyd. OSQP: An Operator Splitting Solver for Quadratic Programs. ArXiv e-prints, 2017.
201
+
202
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to Sequence Learning with Neural Networks. In Proceedings of the 27th International Conference of Neural Information Processing Systems (NIPS 2014), 2014.
203
+
204
+ Xingyi Zhou, Xiao Sun, Wei Zhang, Shuang Liang, and Yichen Wei. Deep Kinematic Pose Regression. Workshop on Geometry Meets Deep Learning, ECCV 2016, 2016.
parse/train/ByxXZpVtPB/ByxXZpVtPB_content_list.json ADDED
@@ -0,0 +1,1079 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "HOMOGENEOUS LINEAR INEQUALITY CONSTRAINTS FOR NEURAL NETWORK ACTIVATIONS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
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": "We propose a method to impose homogeneous linear inequality constraints of the form $A x \\le 0$ on neural network activations. The proposed method allows a datadriven training approach to be combined with modeling prior knowledge about the task. One way to achieve this task is by means of a projection step at test time after unconstrained training. However, this is an expensive operation. By directly incorporating the constraints into the architecture, we can significantly speed-up inference at test time; for instance, our experiments show a speed-up of up to two orders of magnitude over a projection method. Our algorithm computes a suitable parameterization of the feasible set at initialization and uses standard variants of stochastic gradient descent to find solutions to the constrained network. Thus, the modeling constraints are always satisfied during training. Crucially, our approach avoids to solve an optimization problem at each training step or to manually trade-off data and constraint fidelity with additional hyperparameters. We consider constrained generative modeling as an important application domain and experimentally demonstrate the proposed method by constraining a variational autoencoder. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 488
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 516,
55
+ 336,
56
+ 531
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep learning models (LeCun et al., 2015) have demonstrated remarkable success in tasks that require exploitation of subtle correlations, such as computer vision (Krizhevsky et al., 2012) and sequence learning (Sutskever et al., 2014). Typically, humans have strong prior knowledge about a task, e.g., based on symmetry, geometry, or physics. Learning such a priori assumptions in a purely data-driven manner is inefficient and, in some situations, may not be feasible at all. While certain prior knowledge was successfully imposed – for example translational symmetry through convolutional architectures (LeCun et al., 1998) – incorporating more general modeling assumptions in the training of deep networks remains an open challenge. Recently, generative neural networks have advanced significantly (Goodfellow et al., 2014; Kingma & Welling, 2014). With such models, controlling the generative process beyond a data-driven, black-box approach is particularly important. ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 825,
67
+ 686
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In this paper, we present a method to impose prior knowledge through homogeneous linear inequality constraints of the form $A x \\le 0$ on the activations of deep learning models. We directly impose these constraints through a suitable parameterization of the feasible set. This has several advantages: ",
74
+ "bbox": [
75
+ 176,
76
+ 694,
77
+ 825,
78
+ 736
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "• The constraints are hard-constraints in the sense that they are satisfied at any point during training and inference. \n• Inference on the constrained network incurs no overhead compared to unconstrained inference. \n• There is no manual trade-off between constraint satisfaction and data representation. ",
85
+ "bbox": [
86
+ 215,
87
+ 747,
88
+ 825,
89
+ 828
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In summary, the main contribution of our method is a reparameterization that incorporates homogeneous linear inequality hard-constraints on neural network activations and allows for efficient test time predictions, i.e., our method is faster up to two orders of magnitude. The model can be optimized by standard variants of stochastic gradient descent. As an application in generative modeling, we demonstrate that our method is able to produce authentic samples from a variational autoencoder while satisfying the imposed constraints. ",
96
+ "bbox": [
97
+ 174,
98
+ 840,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/6ff2de8059afd1546259716b3fa3bcc6f284f19dca82e98544dec5426da694f1.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Samples drawn from a variational autoencoder trained on MNIST without constraints (left) and with a checkerboard constraint on the output domain (right). For a pixel intensity domain $[ - 1 , 1 ]$ , the checkerboard constraint forces the image tiles to have average positive or negative brightness. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 356,
113
+ 101,
114
+ 637,
115
+ 203
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 RELATED WORK ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 310,
126
+ 341,
127
+ 327
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Various works have introduced methods to impose some type of hard constraint on neural network activations. This differs from a classical constrained optimization problem (Nocedal & Wright, 2006) in that the constraints are on the image of a parameterized function rather than on the neural network parameters. ",
134
+ "bbox": [
135
+ 174,
136
+ 349,
137
+ 823,
138
+ 406
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Marquez-Neila et al. (2017) formulated generic differentiable equality constraints as soft constraints ´ and employed a Lagrangian approach to train their model. While this is a principled approach to constrained optimization, it does not scale well to practical deep neural network models with their vast number of parameters. To make their method computationally tractable, a subset of the constraints is selected at each training step. In addition, these constraints are locally linearized; thus, there is no guarantee that this subset will be satisfied after a parameter update. ",
145
+ "bbox": [
146
+ 174,
147
+ 412,
148
+ 825,
149
+ 497
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "For the specific problem of weakly supervised segmentation, Pathak et al. (2015) proposed an optimization scheme that alternates between optimizing the deep learning model and fitting a constrained distribution to these intermediate models. However, this method involves solving a (convex) optimization problem at each training step. Furthermore, the overall convergence path depends on how the alternating optimization steps are combined, which introduces an additional hyperparameter that must be tuned. Briq et al. (2018) approached the weakly supervised segmentation problem with a layer that implements the orthogonal projection onto a simplex, thereby directly constraining the activations to a probability distribution. This optimization problem can be solved efficiently, but does not generalize to other types of inequality constraints. ",
156
+ "bbox": [
157
+ 174,
158
+ 503,
159
+ 825,
160
+ 630
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "OptNet, an approach to solve a generic quadratic program as a differentiable network layer, was proposed by Amos & Kolter (2017). OptNet backpropagates through the first-order optimality conditions of the quadratic program, and linear inequality constraints can be enforced as a special case. The formulation is flexible; however, it scales cubically with the number of variables and constraints. Thus, it becomes prohibitively expensive to train large-scale deep learning models. ",
167
+ "bbox": [
168
+ 174,
169
+ 636,
170
+ 823,
171
+ 705
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Finally, several works have proposed handcrafted solutions for specific applications, such as skeleton prediction (Zhou et al., 2016) and prediction of rigid body motion (Byravan & Fox, 2017). In contrast, to avoid laborious architecture design, we argue for the value of generically modeling constraint classes. In practice, this makes constraint methods more accessible for a broader class of problems. ",
178
+ "bbox": [
179
+ 174,
180
+ 713,
181
+ 825,
182
+ 782
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Contribution In this work, we tackle the problem of imposing homogeneous linear inequality constraints on neural network activations. Rather than solving an optimization problem during training, we split this task into a feasibility step at initialization and an optimality step during training. At initialization, we compute a suitable parameterization of the constraint set (a polyhedral cone) and use the neural network training algorithm to find a good solution within this feasible set. Conceptually, we are trading-off computational cost during initialization to obtain a model that has no overhead at test time. The proposed method is implemented as a neural network layer that is specified by a set of homogeneous linear inequalities and whose output parameterizes the feasible set. ",
189
+ "bbox": [
190
+ 174,
191
+ 811,
192
+ 825,
193
+ 924
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "We consider a generic $L$ layer neural network $F _ { \\theta }$ with model parameters $\\theta$ for inputs $x$ as follows: ",
200
+ "bbox": [
201
+ 171,
202
+ 132,
203
+ 816,
204
+ 147
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "equation",
210
+ "img_path": "images/0ea9f946da75e03aa20d0e9e0bf4f7ce7c4abdbc95f203880c817c6911ffa619.jpg",
211
+ "text": "$$\nF _ { \\theta } ( x ) = f _ { \\theta _ { L } } ^ { ( L ) } ( \\sigma ( f _ { \\theta _ { L - 1 } } ^ { ( L - 1 ) } ( \\sigma ( \\dots f _ { \\theta _ { 1 } } ^ { ( 1 ) } ( x ) \\dots ) ) ) ) ,\n$$",
212
+ "text_format": "latex",
213
+ "bbox": [
214
+ 343,
215
+ 151,
216
+ 653,
217
+ 174
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "where $f _ { \\theta _ { l } } ^ { ( l ) }$ are affine functions, e.g., a fully-connected or convolutional layer, and $\\sigma$ is an elementwise non-linearity1, e.g., a sigmoid or rectified linear unit (ReLU). In supervised learning, training targets $y$ are known and a loss $\\mathcal { L } _ { y } ( F _ { \\theta } ( x ) )$ is minimized as a function of the network parameters $\\theta$ . A typical loss for a classification task is the cross entropy between the network output and the empirical target distribution, while the mean-squared error is commonly used for a regression task. The proposed method can be applied to constrain any linear activations $z ^ { ( l ) } = f _ { \\theta _ { l } } ^ { ( l ) } ( a ^ { ( l - 1 ) } )$ or non-linear activations $a ^ { ( l ) } = \\sigma ( z ^ { ( l ) } )$ . In most cases, one would like to constrain the output $F _ { \\theta } ( x )$ . ",
224
+ "bbox": [
225
+ 173,
226
+ 179,
227
+ 825,
228
+ 290
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "The feasible set for $m$ linear inequality constraints in $d$ dimensions is the convex polyhedron ",
235
+ "bbox": [
236
+ 174,
237
+ 295,
238
+ 781,
239
+ 310
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/948dee054635b23f991212ed43f04568c86d4c01a4fc9f9e26ec04531537dd24.jpg",
246
+ "text": "$$\n\\mathcal { C } : = \\left\\{ z \\bigg | A z \\leq b , A \\in \\mathbb { R } ^ { m \\times d } , b \\in \\mathbb { R } ^ { m } \\right\\} \\subseteq \\mathbb { R } ^ { d } .\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 339,
250
+ 314,
251
+ 656,
252
+ 356
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "A suitable description of the convex polyhedron $\\mathcal { C }$ is obtained by the decomposition theorem for polyhedra. ",
259
+ "bbox": [
260
+ 173,
261
+ 358,
262
+ 823,
263
+ 387
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Theorem 1 (Decomposition of polyhedra, Minkowski-Weyl). $A$ set $\\mathcal { C } \\subset \\mathbb { R } ^ { d }$ is a convex polyhedron of the form (2) if and only $i f$ ",
270
+ "bbox": [
271
+ 174,
272
+ 388,
273
+ 823,
274
+ 419
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "equation",
280
+ "img_path": "images/8ed8d31f28a2dfeb5fbe089d56a5410cabba0f133327c41c7397573ce679b99d.jpg",
281
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle { \\mathcal C } = \\mathrm { c o n v } \\big ( \\upsilon _ { 1 } , \\ldots , \\upsilon _ { n } \\big ) + \\mathrm { c o n e } \\big ( r _ { 1 } , \\ldots , r _ { s } \\big ) } \\ ~ } \\\\ { { \\displaystyle ~ = \\left\\{ \\sum _ { i = 1 } ^ { n } \\lambda _ { i } \\upsilon _ { i } + \\sum _ { j = 1 } ^ { s } \\mu _ { j } r _ { j } \\bigg | \\lambda _ { i } , \\mu _ { j } \\geq 0 , \\sum _ { i = 1 } ^ { n } \\lambda _ { i } = 1 \\right\\} } \\ } \\end{array}\n$$",
282
+ "text_format": "latex",
283
+ "bbox": [
284
+ 323,
285
+ 421,
286
+ 673,
287
+ 491
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "for finitely many vertices $\\{ v _ { 1 } , \\ldots , v _ { n } \\}$ and rays $\\{ r _ { 1 } , \\ldots , r _ { s } \\}$ ",
294
+ "bbox": [
295
+ 171,
296
+ 493,
297
+ 575,
298
+ 510
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "Furthermore, $\\mathcal { C } = \\left\\{ z | A z \\leq 0 , A \\in \\mathbb { R } ^ { m \\times d } \\right\\}$ if and only if ",
305
+ "bbox": [
306
+ 173,
307
+ 515,
308
+ 553,
309
+ 531
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "equation",
315
+ "img_path": "images/141c5be6d1de4af0a7e4ef915e90293fa419f7830888a5d6491eb626c5e933aa.jpg",
316
+ "text": "$$\n\\mathcal { C } = \\mathrm { c o n e } ( r _ { 1 } , . . . , r _ { s } )\n$$",
317
+ "text_format": "latex",
318
+ "bbox": [
319
+ 426,
320
+ 536,
321
+ 571,
322
+ 553
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "for finitely many rays $\\{ r _ { 1 } , \\ldots , r _ { s } \\}$ ",
329
+ "bbox": [
330
+ 173,
331
+ 556,
332
+ 403,
333
+ 571
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "The theorem states that an intersection of half-spaces (half-space or $\\mathrm { H } \\cdot$ -representation) can be written as the Minkowski sum of a convex combination of the polyhedron’s vertices and a conical combination of some rays (vertex or $\\mathrm { V } .$ -representation). One can switch algorithmically between these two viewpoints via the double description method (Motzkin et al., 1953; Fukuda & Prodon, 1996), which we discuss in the following. Thus, the $\\mathrm { H }$ -representation, which is natural when modeling inequality constraints, can be transformed into the V-representation, which can be incorporated into gradient-based neural network training. ",
340
+ "bbox": [
341
+ 173,
342
+ 580,
343
+ 825,
344
+ 679
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "In this paper, we focus on homogeneous constraints of the form (4), for which the feasible set is a polyhedral cone. Due to the special structure of this set, we can avoid to work with the convex combination parameters in (3), which is numerically advantageous (Section 3.5), and we can efficiently combine modeling constraints and domain constraints, such as a $[ - 1 , 1 ]$ -pixel domain for images (Section 3.3). Such a polyhedral cone is shown in Figure 2. ",
351
+ "bbox": [
352
+ 174,
353
+ 685,
354
+ 825,
355
+ 756
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "3.1 DOUBLE DESCRIPTION METHOD ",
362
+ "text_level": 1,
363
+ "bbox": [
364
+ 176,
365
+ 772,
366
+ 437,
367
+ 786
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "The double description method converts between the half-space and vertex representation of a system of linear inequalities. It was originally proposed by Motzkin et al. (1953) and further refined by Fukuda & Prodon (1996).2 Here, we are only interested in the conversion from $\\mathrm { H } \\cdot$ -representation to V-representation for homogeneous constraints (4), ",
374
+ "bbox": [
375
+ 173,
376
+ 797,
377
+ 825,
378
+ 854
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/07953e3b7708217b360452246e0af32fd666d060d8d31f24becee732886e0ca0.jpg",
385
+ "text": "$$\n\\mathcal { H } \\to \\mathrm { c o n e } ( r _ { 1 } , \\dots , r _ { s } ) \\ .\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 416,
389
+ 858,
390
+ 580,
391
+ 875
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "image",
397
+ "img_path": "images/e34f7d5efaaf63be07414ce913edd9a6616ef7e1dcd0ac505ab2653737bf016f.jpg",
398
+ "image_caption": [
399
+ "Figure 2: Diagram illustrating an iteration of the double description method. Adding a constraint to the $k$ -constraint set $A ^ { k }$ at iteration $k + 1$ introduces a hyperplane $H$ . The intersection points of $H$ with the boundary of the current polyhedron $R ^ { k }$ (marked by $\\circ ^ { \\prime }$ ) are added as rays $r _ { 6 }$ and $r _ { 7 }$ to the polyhedral cone. The ray $r _ { 2 }$ is cut-off by the hyperplane $H$ and is removed from $R ^ { k }$ . The result is the next iterate Rk+1. "
400
+ ],
401
+ "image_footnote": [],
402
+ "bbox": [
403
+ 277,
404
+ 103,
405
+ 710,
406
+ 301
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "The core algorithm proceeds as follows. Let the rows of $A$ define a set of homogeneous inequalities and let $R = [ r _ { 1 } , \\ldots , r _ { s } ]$ be the matrix whose columns are the rays of the corresponding cone. Here, $( A , R )$ form a double description pair. The algorithm iteratively builds a double description pair $( A ^ { k + 1 } , R ^ { k + 1 } )$ from $( A ^ { k } , R ^ { k } )$ in the following manner. The rows in $A ^ { k }$ represent a $k$ -subset of the rows of $A$ and thus define a convex polyhedron associated with $R ^ { k }$ . Adding a single row to $A ^ { k }$ introduces an additional half-space constraint, which corresponds to a hyperplane. If the vector $r _ { i } - r _ { j }$ for two columns $r _ { i } , r _ { j }$ of $\\bar { \\boldsymbol { R } } ^ { k }$ intersects with this hyperplane then this intersection point is added to $R ^ { k }$ . Existing rays that are cut-off by the additional hyperplane are removed from $R ^ { k }$ . The result is the double description pair $( A ^ { k + 1 } , \\dot { R } ^ { k + 1 } )$ . This procedure is shown in Figure 2. ",
413
+ "bbox": [
414
+ 174,
415
+ 416,
416
+ 825,
417
+ 544
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "Adding a hyperplane might drastically increase the number of rays in intermediate representations, which, in turn, contribute combinatorically in the subsequent iteration. In fact, there exist worst case polyhedra for which the algorithm has exponential run time as a function of the number of inequalities and the input dimension, as well as the number of rays (Dyer, 1983; Bremner, 1999). Overall, one can expect the algorithm to be efficient only for problems with a reasonably small number $m$ of inequalities and dimension $d$ . ",
424
+ "bbox": [
425
+ 174,
426
+ 550,
427
+ 825,
428
+ 633
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "3.2 INTEGRATION IN NEURAL NETWORK ARCHITECTURES ",
435
+ "text_level": 1,
436
+ "bbox": [
437
+ 174,
438
+ 660,
439
+ 588,
440
+ 672
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "We parameterize the homogeneous form (4) via a neural network layer. This layer takes as input some (latent) representation of the data, which is mapped to activations satisfying the desired hard constraints. The algorithm is provided with the $_ \\mathrm { H }$ -representation of linear inequality constraints, i.e., a matrix $A \\in \\breve { \\mathbb { R } } ^ { m \\times d }$ for $m$ constraints in $d$ dimensions to specify the feasible set (4). At initialization, we convert this to the $\\mathrm { V } .$ -representation via the double description method (Section 3.1). This corresponds to computing the set of rays $\\{ r _ { 1 } , \\ldots , r _ { s } \\}$ to represent the polyhedral cone. During training, the neural network training algorithm is used to optimize within in the feasible set. There are two critical aspects in this procedure. First, as outlined in Section 3.1, the run-time complexity of the double description method may be prohibitive. Conceptually, the proposed approach allows for significant compute time at initialization to obtain an algorithm that is very efficient at training and test time. Second, we must ensure that the mapping from the latent representation to the parameters integrates well with the training algorithm. We assume that the model is trained with gradient-based backpropagation, as is common for current deep learning applications. The constraint layer comprises a batch normalization layer and an affine mapping (fully-connected layer with biases) followed by the element-wise absolute value function that ensures the non-negativity required by the conical combination parameters. In theory, any function $f : \\mathbb { R } \\to \\mathbb { R } _ { \\geq 0 }$ would fulfill this requirement; however, care must be taken to not interfere with backpropagated gradients. ",
447
+ "bbox": [
448
+ 173,
449
+ 688,
450
+ 825,
451
+ 924
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "3.3 COMBINING MODELING AND DOMAIN CONSTRAINTS ",
458
+ "text_level": 1,
459
+ "bbox": [
460
+ 174,
461
+ 104,
462
+ 575,
463
+ 117
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Domain constraints are often formulated as unit box constraints, $B : = \\{ x \\in \\mathbb { R } ^ { d } | - 1 \\leq x _ { i } \\leq 1 \\}$ , such as a pixel domain for images. Box constraints are particularly unfit to be converted using the double description method because the number of vertices is exponential in the dimension. Therefore, we distinguish modeling constraints and domain constraints and only convert the former into $\\mathrm { V } .$ - representation. Based on this representation, we obtain a point in the modeling constraint set, $x \\in { \\mathcal { C } }$ . However, this point may not be in the unit box $\\boldsymbol { B }$ . To arrive at a point in the intersection $\\mathcal { C } \\cap \\mathcal { B }$ , we normalize $x$ by its infinity norm if $x \\notin B$ , $\\hat { x } = x / \\operatorname* { m a x } \\{ \\| x \\| _ { \\infty } , 1 \\bar \\}$ . Indeed, $\\hat { x } \\in \\mathcal { C } \\cap B$ since scaling by a positive constant remains in the cone, i.e., if $x \\in { \\mathcal { C } }$ , then $\\alpha x \\in \\mathcal { C } \\forall \\alpha \\geq 0$ . ",
470
+ "bbox": [
471
+ 173,
472
+ 128,
473
+ 825,
474
+ 241
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "3.4 APPLICATIONS OF HOMOGENEOUS LINEAR INEQUALITY CONSTRAINTS ",
481
+ "text_level": 1,
482
+ "bbox": [
483
+ 174,
484
+ 260,
485
+ 704,
486
+ 272
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "A natural application of constraints of the form $A x \\le 0$ is a parameterization of a set of binary classifiers. If each row $a _ { i }$ of $A$ is such a binary classifier, then the method presented in this paper parameterizes the set $\\{ x | a _ { i } ^ { T } x \\le 0 \\ \\forall i \\}$ . Consequently, it can be guaranteed that neural network activations satisfy a set of binary criteria. Another domain is to express certain direct relations between neural network activations. Notably, one can guarantee mathematical properties such as monotonicity via $x _ { i + 1 } \\geq x _ { i }$ and convexity via $x _ { i + 1 } - 2 x _ { i } + x _ { i - 1 } \\geq 0$ . ",
493
+ "bbox": [
494
+ 174,
495
+ 284,
496
+ 825,
497
+ 368
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "3.5 EXTENSION TO GENERAL LINEAR INEQUALITY CONSTRAINTS ",
504
+ "text_level": 1,
505
+ "bbox": [
506
+ 176,
507
+ 387,
508
+ 640,
509
+ 400
510
+ ],
511
+ "page_idx": 4
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "The proposed method takes advantage of the special structure of a polyhedral cone to efficiently combine modeling and domain constraints (Section 3.3). General linear inequality constraints of the form $A x \\leq b$ without restrictions on $A$ and $b$ possibly require the conic and convex component of (3) for their $\\mathrm { v } .$ -representation. The main approach of this paper may be used in this case, i.e., our layer additionally needs to predict convex combination parameters. However, we observed slow convergence, which we ascribe to the simplex parameterization for the convex combination parameters. We used a softmax function $f ( x ) _ { i } = { \\mathrm { { \\bar { e x p } } } ( x _ { i } ) } / { \\sum _ { j = 1 } ^ { m } \\exp ( x _ { j } ) }$ to enforce the constraints $\\begin{array} { r } { \\lambda _ { i } \\ge 0 , \\sum _ { i = 1 } ^ { m } \\lambda _ { i } = 1 } \\end{array}$ of the convex combination parameters in (3). This function has vanishing gradients when one $x _ { i }$ is significantly greater than the other vector entries. Furthermore, this most general setting does not allow for efficient incorporation of domain constraints, as this would require an efficient parameterization of the intersection of a general convex polyhedron and the unit box. ",
516
+ "bbox": [
517
+ 173,
518
+ 411,
519
+ 825,
520
+ 568
521
+ ],
522
+ "page_idx": 4
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "4 NUMERICAL RESULTS ",
527
+ "text_level": 1,
528
+ "bbox": [
529
+ 176,
530
+ 588,
531
+ 390,
532
+ 604
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "We compare the proposed constraint parameterization algorithm with an algorithm that trains without constraints, but requires a projection step at test time. We call this latter algorithm test time projection. We analyze these algorithms in two different settings. In an initial experiment, we learn the orthogonal projection onto a constraint set to demonstrate properties of these algorithms. Here, the result can be compared to the optimal solution of the convex optimization problem. In a second experiment, consistent with our motivation to constrain the output of generative models, we apply these algorithms to a variational autoencoder. Finally, we evaluate the running time of inference for these problems and show that the proposed algorithm is significantly more efficient compared to the test time projection method. ",
539
+ "bbox": [
540
+ 173,
541
+ 621,
542
+ 825,
543
+ 744
544
+ ],
545
+ "page_idx": 4
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "We used the MNIST dataset (LeCun et al.) for both experiments (59000 training, 1000 validation, and 10000 test samples). We chose PyTorch (Paszke et al., 2017) for our implementation3 and all experiments were performed on a single Nvidia Titan X GPU. All networks were optimized with the Adam optimizer and we evaluated learning rates in the range $[ 1 0 ^ { - 5 } , 1 0 ^ { - 3 } ]$ . The initial learning rate was annealed by a factor of $1 / 2$ if progress on the validation loss stagnated for more than 5 epochs. We used OSQP (Stellato et al., 2017) as an efficient solver to compute orthogonal projections. ",
550
+ "bbox": [
551
+ 174,
552
+ 752,
553
+ 823,
554
+ 837
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "Both experiments were performed with a checkerboard constraint with 16 tiles, where neighboring tiles are constrained to be on average either below or above pixel domain midpoint. For a $[ - 1 , 1 ]$ -pixel domain, the tiles’ average intensity is positive or negative, respectively. The initial computational cost of converting these constraints into $\\mathrm { v } .$ -representation via the double description method is negligible (less than 1s). We observed that it is numerically advantageous to activate unit box scaling after the constraint parameterization model was initially optimized only with modeling constraints for a specified number of epochs. ",
561
+ "bbox": [
562
+ 176,
563
+ 843,
564
+ 823,
565
+ 898
566
+ ],
567
+ "page_idx": 4
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "",
572
+ "bbox": [
573
+ 174,
574
+ 103,
575
+ 823,
576
+ 146
577
+ ],
578
+ "page_idx": 5
579
+ },
580
+ {
581
+ "type": "text",
582
+ "text": "One might consider OptNet (Amos & Kolter, 2017) and an analogous version of the method introduced by Pathak et al. (2015) as baselines. However, these approaches incur a significant drawback for the setup presented in this paper as they are are computationally expensive at training time. An OptNet layer solves a generic quadratic program as a differentiable network layer, which scales cubically with the number of variables and constraints. The method by Pathak et al. (2015) for the regression problems in this paper alternates between optimization steps in the network parameters via a variant of stochastic gradient descent and projecting the network output onto the constraints, which is computationally expensive. ",
583
+ "bbox": [
584
+ 174,
585
+ 151,
586
+ 825,
587
+ 265
588
+ ],
589
+ "page_idx": 5
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "4.1 ORTHOGONAL PROJECTION ONTO A CONSTRAINT SET ",
594
+ "text_level": 1,
595
+ "bbox": [
596
+ 173,
597
+ 311,
598
+ 586,
599
+ 325
600
+ ],
601
+ "page_idx": 5
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "We learn an orthogonal projection to demonstrate general properties of both algorithms. For given linear inequalities specified in H-representation, we solve the following problem: ",
606
+ "bbox": [
607
+ 174,
608
+ 348,
609
+ 825,
610
+ 377
611
+ ],
612
+ "page_idx": 5
613
+ },
614
+ {
615
+ "type": "equation",
616
+ "img_path": "images/74fc678c3f170e82d36e5079493783b48948763b7547bae099077e8fe93f45c2.jpg",
617
+ "text": "$$\n\\operatorname* { m i n } _ { z \\in \\mathbb { R } ^ { d } } \\left\\| z - y \\right\\| _ { 2 } \\quad \\mathrm { s . t . } A z \\leq 0 \\qquad ,\n$$",
618
+ "text_format": "latex",
619
+ "bbox": [
620
+ 385,
621
+ 410,
622
+ 612,
623
+ 435
624
+ ],
625
+ "page_idx": 5
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "where $y$ is an MNIST image. Here, the problem is convex; therefore, the global optimum can be readily computed and compared to the performance of the learning algorithms. In this setting, we can expect that training an unconstrained network with subsequent projection onto the constraint set at test time yields good results, which can be seen as follows. Let $\\begin{array} { r } { \\mathcal { P } c ( y ) : = \\arg \\operatorname* { m i n } _ { z \\in \\mathcal { C } } \\| z - y \\| _ { 2 } } \\end{array}$ be the orthogonal projection onto the constraint set $\\mathcal { C }$ and denote the mean-squared error as $\\mathcal { L } _ { y } ( x ) : =$ $\\| x - y \\| _ { 2 }$ . Both mappings are Lipschitz continuous with Lipschitz constant $L = 1$ . Consequently, for an output $\\hat { y }$ of an unconstrained model, ",
630
+ "bbox": [
631
+ 173,
632
+ 467,
633
+ 825,
634
+ 566
635
+ ],
636
+ "page_idx": 5
637
+ },
638
+ {
639
+ "type": "equation",
640
+ "img_path": "images/920f3f8c46ba6ecacc05ead4128f3ba6ca78c605e3362ed6634c6044f0a99b5d.jpg",
641
+ "text": "$$\n\\begin{array} { r } { \\displaystyle \\Big | \\mathcal { L } _ { y } ( \\mathcal { P } _ { \\mathcal { C } } ( \\hat { y } ) ) - \\mathcal { L } _ { y } ( \\mathcal { P } _ { \\mathcal { C } } ( y ) ) \\Big | \\le \\left\\| \\mathcal { P } _ { \\mathcal { C } } ( \\hat { y } ) - \\mathcal { P } _ { \\mathcal { C } } ( y ) \\right\\| _ { 2 } \\le \\left\\| \\hat { y } - y \\right\\| _ { 2 } , } \\end{array}\n$$",
642
+ "text_format": "latex",
643
+ "bbox": [
644
+ 289,
645
+ 598,
646
+ 707,
647
+ 633
648
+ ],
649
+ "page_idx": 5
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "where, by definition, the term $\\mathcal { L } _ { y } ( \\mathcal { P } c ( y ) )$ is the optimal value of problem (6). The training algorithm fits $\\hat { y }$ to $y$ ; therefore, projecting the unconstrained output $\\hat { y }$ onto the constraint set will yield an objective value that is close to the optimal value of the constrained optimization problem. ",
654
+ "bbox": [
655
+ 173,
656
+ 665,
657
+ 825,
658
+ 709
659
+ ],
660
+ "page_idx": 5
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "To have a comparable number of parameters for both methods, we use a single fully-connected layer in both cases. For the unconstrained model, we employ an $F C ( 7 8 4 , 7 8 4 )$ layer, and for the constrained model we employ an $F C ( 7 8 4 , n _ { r } )$ layer with $n _ { r } = 1 5 5 2$ many rays to represent the constraint set in V-representation. Additionally, the constraint layer first applies a batch normalization operation (Ioffe & Szegedy, 2015). Both models were optimized with an initial learning rate of $1 0 ^ { - 4 }$ , which was annealed by a factor of 0.1 if progress on the validation loss stagnated for more than 5 epochs. The batch size was chosen to be 256. The unit box constraints were activated after 25 epochs. Additionally, the data for training the model with all constraints being active is shown. This mode eventually results in worse generalization. Figure 3 shows that the mean-squared validation objective for both algorithms converges close to the average optimum. The constraint parameterization method has a larger variance and optimality gap, which hints at the numerical difficulty of training the constrained network. To be precise, the best average validation error during training is within $9 \\%$ of the optimum for the constraint parameterization method and within $1 \\%$ of the optimum for the test time projection method. Figure 4 shows a test set sample and the respective output of the learned models. ",
665
+ "bbox": [
666
+ 173,
667
+ 715,
668
+ 825,
669
+ 924
670
+ ],
671
+ "page_idx": 5
672
+ },
673
+ {
674
+ "type": "image",
675
+ "img_path": "images/ccb26edf90e7c914ec8c93ff4de1521e67d3e69261ccf2961a943d7f3e77649f.jpg",
676
+ "image_caption": [
677
+ "Figure 3: Mean-squared validation loss averaged over all pixels for 10 runs; shaded area denotes standard deviation. The objective function (6) is computed on a held-out validation set for the proposed constraint parameterization method and unconstrained optimization with subsequent test time projection. The average optimum over the validation set is obtained as a solution to a convex optimization problem. For the box delay curve, the box constraints are activated after 25 epochs (after $\\sim \\mathrm { 3 0 s }$ ), which results in better generalization. The best average validation error during training is within $9 \\%$ of the optimum for the constraint parameterization method with box constraint delay and within $1 \\%$ of the optimum for the test time projection method. "
678
+ ],
679
+ "image_footnote": [],
680
+ "bbox": [
681
+ 303,
682
+ 103,
683
+ 684,
684
+ 237
685
+ ],
686
+ "page_idx": 6
687
+ },
688
+ {
689
+ "type": "image",
690
+ "img_path": "images/49fc0106d7c90222b808e52dcf5a411c2b40977fc67fcc1408d6bbddb9492dbf.jpg",
691
+ "image_caption": [
692
+ "Figure 4: Learning to solve the orthogonal projection onto a constraint set as defined in (6). From left to right: MNIST sample from a test set, optimal projection by solving a quadratic program, constraint parameterization model inference, and test time projection model inference. "
693
+ ],
694
+ "image_footnote": [],
695
+ "bbox": [
696
+ 207,
697
+ 395,
698
+ 787,
699
+ 500
700
+ ],
701
+ "page_idx": 6
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "4.2 CONSTRAINED GENERATIVE MODELING WITH VARIATIONAL AUTOENCODERS",
706
+ "text_level": 1,
707
+ "bbox": [
708
+ 173,
709
+ 582,
710
+ 750,
711
+ 594
712
+ ],
713
+ "page_idx": 6
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "Variational autoencoders (VAE) are a class of generative models that are jointly trained to encode observations into latent variables via an encoder or inference network and decode observations from latent variables using a decoder or generative network (Kingma & Welling, 2014). We base our implementation on (Baumgartner, 2018). The model has a fully-connected architecture: ¨ ",
718
+ "bbox": [
719
+ 174,
720
+ 606,
721
+ 825,
722
+ 662
723
+ ],
724
+ "page_idx": 6
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "Here, $\\mathrm { R e L U } ( x ) = \\operatorname* { m a x } ( 0 , x )$ and the sigmoid non-linearity takes the form $\\sigma ( x ) = 1 / ( 1 { + } \\mathrm { e x p } ( - x ) )$ . In contrast to a standard VAE, we constrain the samples generated by the model to obey a checkerboard constraint. The model was optimized with an initial learning rate of $1 0 ^ { - 4 }$ , which was annealed by a factor of 0.1 if progress on the validation loss stagnated for more than 5 epochs. The batch size was chosen to be 64. The model was trained for 200 epochs while the unit box constraints were activated after 100 epochs. To generate images, we sample the latent space prior $z \\sim \\mathcal { N } ( 0 , I )$ and evaluate the decoding neural network (Figure 5). The model is able to sample authentic digits while obeying the checkerboard constraint. ",
729
+ "bbox": [
730
+ 174,
731
+ 712,
732
+ 825,
733
+ 824
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "4.3 FAST INFERENCE WITH CONSTRAINED NEURAL NETWORKS ",
740
+ "text_level": 1,
741
+ "bbox": [
742
+ 179,
743
+ 842,
744
+ 625,
745
+ 856
746
+ ],
747
+ "page_idx": 6
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "The main advantage of the proposed method over a simple projection method is a vast speed-up at test time. Since the constraint is incorporated into the neural network architecture, a forward pass has almost no overhead compared to an unconstrained network. On the other hand, for a network that was trained without constraints, a final projection step is necessary; this requires solving a convex optimization problem, which is relatively costly. Table 1 shows inference times for both models for the above numerical experiments. The constraint parameterization approach is up to two orders of magnitude faster at test time compared to the test time projection algorithm. ",
752
+ "bbox": [
753
+ 174,
754
+ 867,
755
+ 823,
756
+ 924
757
+ ],
758
+ "page_idx": 6
759
+ },
760
+ {
761
+ "type": "image",
762
+ "img_path": "images/02f0cfe4745a3f1d0401396a1e80304dc0a37a9588d7f9d2d50cf658cde58b72.jpg",
763
+ "image_caption": [
764
+ "Figure 5: Samples from a constrained variational autoencoder trained with the test time projection method and our constraint parameterization method. The images represent authentic digits while satisfying the imposed checkerboard constraint. Inference is significantly faster using our method. "
765
+ ],
766
+ "image_footnote": [],
767
+ "bbox": [
768
+ 187,
769
+ 99,
770
+ 803,
771
+ 308
772
+ ],
773
+ "page_idx": 7
774
+ },
775
+ {
776
+ "type": "table",
777
+ "img_path": "images/bdbfdf545c0c3896e0aaa1f7c2727179f15affae2568d69cb68ede176ba81380.jpg",
778
+ "table_caption": [
779
+ "Table 1: Inference time for test time projection and constraint parameterization methods. Mean and standard deviation of running times are computed over 100 runs of 59000 samples with a batch size of 256. "
780
+ ],
781
+ "table_footnote": [],
782
+ "table_body": "<table><tr><td>METHOD</td><td>PROJECTION</td><td>VAE</td></tr><tr><td>Test time projection</td><td>82±1 s</td><td>40±1s</td></tr><tr><td>Constraint parameterization (ours)</td><td>0.46 ± 0.02 s</td><td>0.75 ± 0.04 s</td></tr></table>",
783
+ "bbox": [
784
+ 250,
785
+ 434,
786
+ 746,
787
+ 479
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "",
794
+ "bbox": [
795
+ 174,
796
+ 503,
797
+ 826,
798
+ 546
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "5 CONCLUSION ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 176,
808
+ 566,
809
+ 318,
810
+ 583
811
+ ],
812
+ "page_idx": 7
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "To combine a data-driven task with modeling constraints, we have developed a method to impose homogeneous linear inequality constraints on neural network activations. At initialization, a suitable parameterization is computed and subsequently a standard variant of stochastic gradient descent is used to train the reparameterized network. In this way, we can efficiently guarantee that network activations – in the final or any intermediate layer – satisfy the constraints at any point during training. The main advantage of our method over simply projecting onto the feasible set after unconstrained training is a significant speed-up at test time of up to two orders of magnitude. An important application of the proposed method is generative modeling with prior assumptions. Therefore, we demonstrated experimentally that the proposed method can be used successfully to constrain the output of a variational autoencoder. Our method is implemented as a layer, which is simple to combine with existing and novel neural network architectures in modern deep learning frameworks and is therefore readily available in practice. ",
817
+ "bbox": [
818
+ 173,
819
+ 598,
820
+ 825,
821
+ 765
822
+ ],
823
+ "page_idx": 7
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "REFERENCES ",
828
+ "text_level": 1,
829
+ "bbox": [
830
+ 174,
831
+ 103,
832
+ 287,
833
+ 117
834
+ ],
835
+ "page_idx": 8
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "Brandon Amos and J. Zico Kolter. OptNet: Differentiable optimization as a layer in neural networks. In Proceedings of the 34th International Conference on Machine Learning (ICML 2017), pp. 136– 145, 2017. ",
840
+ "bbox": [
841
+ 173,
842
+ 126,
843
+ 823,
844
+ 169
845
+ ],
846
+ "page_idx": 8
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "Tim Baumgartner.¨ VAE-CVAE-MNIST. https://github.com/timbmg/ VAE-CVAE-MNIST, 2018. commit: e4ba231. ",
851
+ "bbox": [
852
+ 168,
853
+ 178,
854
+ 821,
855
+ 208
856
+ ],
857
+ "page_idx": 8
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "David Bremner. Incremental convex hull algorithms are not output sensitive. Discrete & Computational Geometry, 21(1):57–68, 1999. ",
862
+ "bbox": [
863
+ 171,
864
+ 217,
865
+ 823,
866
+ 246
867
+ ],
868
+ "page_idx": 8
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "Rania Briq, Michael Moeller, and Juergen Gall. Convolutional Simplex Projection Network (CSPN) for Weakly Supervised Semantic Segmentation. BMVC 2018, 2018. ",
873
+ "bbox": [
874
+ 169,
875
+ 256,
876
+ 823,
877
+ 285
878
+ ],
879
+ "page_idx": 8
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "Arunkumar Byravan and Dieter Fox. SE3-nets: Learning rigid body motion using deep neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), 2017. ",
884
+ "bbox": [
885
+ 173,
886
+ 294,
887
+ 823,
888
+ 324
889
+ ],
890
+ "page_idx": 8
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "Martin E. Dyer. The complexity of vertex enumeration methods. Mathematics of Operations Research, 8(3):381–402, 1983. ",
895
+ "bbox": [
896
+ 173,
897
+ 333,
898
+ 821,
899
+ 363
900
+ ],
901
+ "page_idx": 8
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Komei Fukuda and Alain Prodon. Double description method revisited, pp. 91–111. Combinatorics and Computer Science: 8th Franco-Japanese and 4th Franco-Chinese Conference Brest, France, July 3–5, 1995 Selected Papers. Springer Berlin Heidelberg, 1996. ",
906
+ "bbox": [
907
+ 173,
908
+ 372,
909
+ 825,
910
+ 415
911
+ ],
912
+ "page_idx": 8
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27 (NIPS 2014), pp. 2672–2680. 2014. ",
917
+ "bbox": [
918
+ 173,
919
+ 424,
920
+ 823,
921
+ 468
922
+ ],
923
+ "page_idx": 8
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proceedings of the 32nd International Conference on Machine Learning, volume 37, pp. 448–456. PMLR, 07–09 Jul 2015. ",
928
+ "bbox": [
929
+ 174,
930
+ 477,
931
+ 823,
932
+ 521
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Diederik Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations (ICLR 2014), 2014. ",
939
+ "bbox": [
940
+ 169,
941
+ 530,
942
+ 823,
943
+ 559
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton. ImageNet classification with deep convolutional neural networks. In Proceedings of the 25th International Conference of Neural Information Processing Systems (NIPS 2012), 2012. ",
950
+ "bbox": [
951
+ 174,
952
+ 568,
953
+ 823,
954
+ 612
955
+ ],
956
+ "page_idx": 8
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "Yann LeCun, Corinna Cortes, and Christopher Burges. The MNIST database of handwritten digits. URL http://yann.lecun.com/exdb/mnist/. ",
961
+ "bbox": [
962
+ 174,
963
+ 621,
964
+ 821,
965
+ 650
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "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. ",
972
+ "bbox": [
973
+ 174,
974
+ 660,
975
+ 823,
976
+ 689
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. ",
983
+ "bbox": [
984
+ 173,
985
+ 698,
986
+ 823,
987
+ 727
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Pablo Marquez-Neila, Mathieu Salzmann, and Pascal Fua. Imposing hard constraints on deep net- ´ works: Promises and limitations. First Workshop on Negative Results in Computer Vision, CVPR 2017, 2017. ",
994
+ "bbox": [
995
+ 173,
996
+ 737,
997
+ 825,
998
+ 780
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "T. S. Motzkin, H. Raiffa, G. L. Thompson, and R. M. Thrall. The double description method. In Contributions to the Theory of Games II, volume 8 of Ann. of Math. Stud., pp. 51–73. Princeton University Press, 1953. ",
1005
+ "bbox": [
1006
+ 173,
1007
+ 789,
1008
+ 823,
1009
+ 833
1010
+ ],
1011
+ "page_idx": 8
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Jorge Nocedal and Stephen Wright. Numerical Optimization. Springer Series in Operations Research and Financial Engineering. Springer, 2006. ",
1016
+ "bbox": [
1017
+ 169,
1018
+ 842,
1019
+ 823,
1020
+ 872
1021
+ ],
1022
+ "page_idx": 8
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. Autodiff Workshop, NIPS 2017, 2017. ",
1027
+ "bbox": [
1028
+ 176,
1029
+ 881,
1030
+ 825,
1031
+ 924
1032
+ ],
1033
+ "page_idx": 8
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Deepak Pathak, Philipp Krahenb ¨ uhl, and Trevor Darrell. Constrained Convolutional Neural Net- ¨ works for Weakly Supervised Segmentation. In International Conference on Computer Vision (ICCV 2015), 2015. ",
1038
+ "bbox": [
1039
+ 173,
1040
+ 103,
1041
+ 823,
1042
+ 146
1043
+ ],
1044
+ "page_idx": 9
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Bartolomeo Stellato, Goran Banjac, Paul Goulart, Alberto Bemporad, and Stephen Boyd. OSQP: An Operator Splitting Solver for Quadratic Programs. ArXiv e-prints, 2017. ",
1049
+ "bbox": [
1050
+ 171,
1051
+ 155,
1052
+ 823,
1053
+ 184
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to Sequence Learning with Neural Networks. In Proceedings of the 27th International Conference of Neural Information Processing Systems (NIPS 2014), 2014. ",
1060
+ "bbox": [
1061
+ 174,
1062
+ 193,
1063
+ 823,
1064
+ 234
1065
+ ],
1066
+ "page_idx": 9
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Xingyi Zhou, Xiao Sun, Wei Zhang, Shuang Liang, and Yichen Wei. Deep Kinematic Pose Regression. Workshop on Geometry Meets Deep Learning, ECCV 2016, 2016. ",
1071
+ "bbox": [
1072
+ 173,
1073
+ 244,
1074
+ 823,
1075
+ 272
1076
+ ],
1077
+ "page_idx": 9
1078
+ }
1079
+ ]
parse/train/ByxXZpVtPB/ByxXZpVtPB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByxXZpVtPB/ByxXZpVtPB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/EKV158tSfwv/images/016738b1658887d5192d6f9e87ae2c0aaf68ba3c2aac34ac95050e000e8ca2f0.jpg ADDED

Git LFS Details

  • SHA256: 3a5926e60669827d033110cd0f224dd2d74cbce3f3c2360b0d1a21a65adc27dc
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
parse/train/EKV158tSfwv/images/028476a532884b39d36ed3d14d0db7a5693b209303ea005750d6a939c583b0e4.jpg ADDED

Git LFS Details

  • SHA256: 6bc984260cc95041662361028f4105bb497f7671a51d3f58dac5d763635c3331
  • Pointer size: 130 Bytes
  • Size of remote file: 39.2 kB
parse/train/EKV158tSfwv/images/083d3d70eab9424ca9b0bc47b41d1556871b469c3a9a0ddc9deacfbd3e06483c.jpg ADDED

Git LFS Details

  • SHA256: eae9622f8d7704b15db72fc57dad906cfb402d26f4b697a4c788607e831c65e1
  • Pointer size: 130 Bytes
  • Size of remote file: 76.9 kB
parse/train/EKV158tSfwv/images/0bd238f81d39c3e37eddb8a3fcdde86a0f81b76b0afada83a88f67d100209e35.jpg ADDED

Git LFS Details

  • SHA256: 045dd851f266c636b8000fdc2b7b4da211e894fa6c63d2f45885204bf18fd274
  • Pointer size: 130 Bytes
  • Size of remote file: 43.5 kB
parse/train/EKV158tSfwv/images/1272484bc875f051f390fdeccd1c2700634a8673e6ea94a155ffda24e58342bc.jpg ADDED

Git LFS Details

  • SHA256: f412bb13476dba7415ea19484876ec59c4afd7d1e878196244bd4243754901e8
  • Pointer size: 129 Bytes
  • Size of remote file: 8.23 kB
parse/train/EKV158tSfwv/images/17ec080f437c916f8123c572d38285089522fcd5f80eed018f3fc0c58bfb21af.jpg ADDED

Git LFS Details

  • SHA256: d5d247d1725324eacf2497c2a2cd21340d83fdc7fa4cd1a82a654371f9445ee2
  • Pointer size: 131 Bytes
  • Size of remote file: 128 kB
parse/train/EKV158tSfwv/images/18951c913dca68571b45e1955eace7e2d03a5c698fa611b719202969d087b335.jpg ADDED

Git LFS Details

  • SHA256: 40f6c39c08b6b46f3753f24841ac068ed7db51d0ddda4a79f05361b08eeed4b1
  • Pointer size: 130 Bytes
  • Size of remote file: 93.2 kB
parse/train/EKV158tSfwv/images/19e05e392812d42406123d639dd61a923b2b18b886de39e192f7f8e449684371.jpg ADDED

Git LFS Details

  • SHA256: 2ef4987e40836e1e9633f563dc41b07db819ffe65fe1c91a9c423bb7da8f1702
  • Pointer size: 129 Bytes
  • Size of remote file: 6.84 kB
parse/train/EKV158tSfwv/images/1adb9d55c3614fa5d4deaba0752d1adc6648392ab75eb084c920a1da96e037c5.jpg ADDED

Git LFS Details

  • SHA256: 9885b851037657d4f63d1d680a1eda9cd566ed78850b2997e69aebf09504be16
  • Pointer size: 130 Bytes
  • Size of remote file: 55.9 kB
parse/train/EKV158tSfwv/images/1ae2e2c3ba83e67857d3467fc348e39ce56a1f2a46fc0456ba5962b51088041f.jpg ADDED

Git LFS Details

  • SHA256: bb598db4fcdabec80476905d0ffac493677ab493f20f1834fff95a83429ec5ef
  • Pointer size: 129 Bytes
  • Size of remote file: 7.16 kB
parse/train/EKV158tSfwv/images/230f3e209fbceb452e0cacbf145a045e0f776bcfbd699b15f3d9a268719828f7.jpg ADDED

Git LFS Details

  • SHA256: 983684c58eb9cda920176cdbf69b788aa868515ab734447408ce890deb0486a8
  • Pointer size: 130 Bytes
  • Size of remote file: 57.3 kB
parse/train/EKV158tSfwv/images/2dc9622e275140a89614cd4a116278b803f8a74ab43fb682e99cdda4e2983efd.jpg ADDED

Git LFS Details

  • SHA256: 992bf5b9872f408ca9742287699d03f71a9b37bc9108218e7243c27e7e90e135
  • Pointer size: 130 Bytes
  • Size of remote file: 97.9 kB
parse/train/EKV158tSfwv/images/2ea410f33d13c5bf4d54f8759d58fa63e926c7a4261f5285df87a257976071e0.jpg ADDED

Git LFS Details

  • SHA256: 0346c84c63eaa707ec4113fd733a3c8c8a048ae9c14a3e618f7a8f9dba522015
  • Pointer size: 131 Bytes
  • Size of remote file: 139 kB
parse/train/EKV158tSfwv/images/3082a0205f8ca0fa19bad584c2bc254cb66610f53905d3b82bb0fc293c8f4f1b.jpg ADDED

Git LFS Details

  • SHA256: 543f4fbd441d6378a4e67bc56dfb68fe8dfcf4c5357597a4093d414b93ad18d8
  • Pointer size: 130 Bytes
  • Size of remote file: 88.5 kB
parse/train/EKV158tSfwv/images/59faebc170755326f1a741f053a3e3239331feaa8c6c73c0c49a37833915a29c.jpg ADDED

Git LFS Details

  • SHA256: 488ce0eff22cb811ed8f813529bab8b6d53c8d523c9f9810c1dad6172da90817
  • Pointer size: 130 Bytes
  • Size of remote file: 36 kB
parse/train/EKV158tSfwv/images/5baa71ed36db05c11ad982d836213faf594098a0f7cc817d7543b4bd2c7b1d9b.jpg ADDED

Git LFS Details

  • SHA256: a611b1f5b34f1aa34c8aab959b9517e9b4c17e4174381f214691dcbd2834db3b
  • Pointer size: 131 Bytes
  • Size of remote file: 114 kB
parse/train/EKV158tSfwv/images/61cfdcc751c8306c0d6dc61c857c5d35f3f6a62b6aadd3c2faf676f9dce5244a.jpg ADDED

Git LFS Details

  • SHA256: 60b1328f09ebfe82e7cc2083bab2a10837347e456102637f57cf85a0b6171f75
  • Pointer size: 129 Bytes
  • Size of remote file: 7.55 kB
parse/train/EKV158tSfwv/images/6504675e7bba4e4b29771df9cad8ef0f1bc1ac16fed6ca3940a427444b617353.jpg ADDED

Git LFS Details

  • SHA256: a68d6d5e36cdf01fb3f6814b00f12695811182b700a3d1ed43bf01d22c09977b
  • Pointer size: 130 Bytes
  • Size of remote file: 35.2 kB
parse/train/EKV158tSfwv/images/6c312df5ec5b36e73d7097e7dae5f64a03e8198a7eae4af2f0c439e27b2827a2.jpg ADDED

Git LFS Details

  • SHA256: 7e4c62e4db9b8c964e908b2345af03097f1b3f44598b87096d2bd53f388f038b
  • Pointer size: 130 Bytes
  • Size of remote file: 21 kB
parse/train/EKV158tSfwv/images/6dff23a033f50eadf42c3616ebcec2d95d6d4472f4a2b701f6fca905189a98da.jpg ADDED

Git LFS Details

  • SHA256: 8eb5d8c0b96c75dea362e632ad2e3a2b4752d2db98c985e13e61e924095ea16f
  • Pointer size: 130 Bytes
  • Size of remote file: 19.4 kB
parse/train/EKV158tSfwv/images/759286d18791fab6aab94014e7f91dfc3b7de4d642a759d9c8422f4f9d06cb25.jpg ADDED

Git LFS Details

  • SHA256: 1db719247ea31e3fdd50796cf324ecd30c7fa7b5af602483200dd5809d52f76a
  • Pointer size: 130 Bytes
  • Size of remote file: 90.6 kB
parse/train/EKV158tSfwv/images/7b30aa5f903208aed3d4c412129bb3a9ed61a9c1503e1613bdb5586fd7bb7360.jpg ADDED

Git LFS Details

  • SHA256: c01b9c440c412ea8442069f17139bca4210e7d54181e2531237f51e62c081a04
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
parse/train/EKV158tSfwv/images/80fddaac0df5b077969f77da997b9aa2b510857222eb5466257ea9d6faf78119.jpg ADDED

Git LFS Details

  • SHA256: 0332beab84dfd46822a4b5dc0c8b86870d8f00baddb833723e275f05a391cd11
  • Pointer size: 130 Bytes
  • Size of remote file: 54.8 kB
parse/train/EKV158tSfwv/images/889d3259c5a7dd19b9331e75f9781a2265e65a2772c75f10eac7863ed58d9891.jpg ADDED

Git LFS Details

  • SHA256: e0f380933f30e78f7934ea0f79d803304b832f2b3bff6f2b7b3382f88e762558
  • Pointer size: 131 Bytes
  • Size of remote file: 294 kB
parse/train/EKV158tSfwv/images/96bc8addaa4f716f3390db0c46fc0893bb3015b718fc1ff093a67d8cda261f87.jpg ADDED

Git LFS Details

  • SHA256: 5d9a86351be6cce0b6cb6b2df63862a1260b250e2550c172f67f6948dc1f3263
  • Pointer size: 130 Bytes
  • Size of remote file: 11.3 kB
parse/train/EKV158tSfwv/images/9aab59e7cb45f4b818552a6b812185f6a2881323d9a51a2afbe47c773e351103.jpg ADDED

Git LFS Details

  • SHA256: e7744c529c7ad4997a549f3346d624dbbe6dd7bd45ec62e5e486a7aeb4dc5774
  • Pointer size: 130 Bytes
  • Size of remote file: 29.1 kB
parse/train/EKV158tSfwv/images/b4c9f6d5bbe628ccb586a62d611eebc4165991a353062d8e7707476de15105b0.jpg ADDED

Git LFS Details

  • SHA256: b8c50b5dff251c333c6027abe6ffc384d8bc38a91ef2940e5154210178059e26
  • Pointer size: 130 Bytes
  • Size of remote file: 35.2 kB